support apply template from a remote tag(#142)

Hi @n8han 
Here is a pull request for apply template from a remote tag(#142). Would you mind help to take a look and let me know if you're happy with it.

You can reach me via miawang @ ebay.com for any further concern. Many thanks