Matt Robinson writes:
>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>

Our position11 test has this exact code sequence in it, so we would catch
a breakage in our automated testing. Are you using a recent version of
Xalan-J 2.x? Note also that infinite loops are exotic creatures in XSLT
and your diagnostic thinking should steer away from such ideas.

I gather that you edited the stylesheet to remove just this part, and
you got what you expected (the list without commas). If so, try this
<xsl:value-of select="position()"/>
in place of the above three lines. If that gets a sequence of numbers
instead of the commas, then try last() in place of position() and see
if you get the highest number every time.
.................David Marston

Reply via email to