fix template load document to YUI Node
implement XML Template unit test (JS)