updated the xsl structure to use apply-templates