I see someone else has now reported this as a bug [Bug 4506 on 30 Oct 2001].
Hopefully, it won't be ignored this time!  I reported this back in late
September but was dismissed because 'it can't be a bug because that is
checked in the automated test cases'.  At least now, I know that I am not
losing my mind.

I find it a bit annoying when somebody goes to the bother of reporting a bug
and is then dismissed before anyone has even tested the code for themselves.
Given that I am new to XSLT, I have spent the last two months wondering if I
was making a trivial error.

Matt


--
s&&!msfQ!&&s&$&utvK&&s&(Q)&\1!sfiupoB&&s&^&reverse Ibdlfs&e&s&^&#
&&s&$&#!uojsq&&s&(.)&chr(ord($1)-1)&ge&s&(.*)&reverse $1&see

----- Original Message -----
From: "Matthew Robinson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 20, 2001 10:08 PM
Subject: Re: Possible Xalan Bug on position()=last()


> From: <[EMAIL PROTECTED]> on Thursday, September 20, 2001 10:40 PM
>
> >
> > 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 am using Xalan-J_2_2_D10 on W2K with Javasoft JRE 1.3.0_02, which I
> downloaded today.  The output I get when I terminate the process is as
> follows:
>
> See also: demilitarized zone, wildcard character, wildcard character,
> wildcard character, wildcard character, wildcard character, wildcard
> character, wildcard character, wildcard character, wildcard character,
> wildcard character, wildcard character, wildcard character, wildcard
> character, wildcard character, wildcard character, wildcard character,
> wildcard character, wildcard character, wildcard character, wildcard
> character, wildcard
>
> and continues as such indefinitely.  This to me resembles an infinite loop
> :)
>
> >
> > 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()"/>
>
> When I try this I get the correct index numbers displayed after the link:
>
> See also: demilitarized zone1pattern-matching character2wildcard
character3
>
> > 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.
>
> When I replace position() with last() I get an infinite loop which results
> in output such as:
>
> See also: demilitarized zone3wildcard character3wildcard
character3wildcard
> character3wildcard character3wildcard character3wildcard
character3wildcard
> character3wildcard character3wildcard character3wildcard
character3wildcard
> character3wildcard character3wildcard character3wildcard
character3wildcard
>
>
> All of these tests work correctly with Saxon and also Xalan 1.
>
> > .................David Marston
>
> Matt
>

Reply via email to