It's difficult to figure out what's causing your problem without more information. 1. What XSLT processor and build are you using? 2. On what platform? 3. In what environment (PHP, Perl, Java, an IDE like XML Spy or Stylus Studio)? 4. What elements are you using the XPath queries in (xsl:for-each, xsl:template)? It would help if you could reduce it to a simple test case and provide the XML and XSLT sources. Having the XPath queries helps, but it's not enough in this case. Regards, S. G.