Added call chaining support to XTemplate, #1263