Hi,
 
I am a newcomer to XSLT, I am currently working through the new O'Reilly XSLT book.
 
I have come across one of the books example stylesheets which fails to work with Xalan 2 but does work with Xalan 1 and also Saxon.  I am not a Java programmer and cannot, therefore, offer any solutions.
 
All of the book examples are contained in the archive located at http://examples.oreilly.com/xslt/xslt_examples.zip
 
The problem stylesheet is Chapter5\crossref1.xsl, which when run against the input terms.xml appears to go into an infinite loop.  However, it works fine with Xalan 1 and Saxon.
 
The problem seems to be centred around the following in the match for <seealso>, specifically the last() function:
 
      <xsl:if test="not(position()=last())">
        <xsl:text>, </xsl:text>
      </xsl:if>
 
Apologies if I have missed something obvious but given that the same stylesheet works in both Xalan 1 and Saxon I have to assume the problem is with Xalan 2 rather than the example.
 
Thanks
 
Matt

Reply via email to