Re: XSLT bug
| From: | (Matt McClanahan) | Date: | Thu, 18 Apr 2002 17:48:47 +0000 |
| Subject: | Re: XSLT bug | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-82952@lists.php.net to get a copy of this message | ||
On Thu, Apr 18, 2002 at 12:57:21AM -0400, Ken Egervari wrote:
> If I have an XML document with 2 applications nodes and the following
> template in the style sheet
>
> <xsl:template match="application">
> <xsl:number format="a" value="position()" />
> <xsl:value-of select="@name" />
> <br />
> </xsl:template>
>
> the result is
>
> b. the name
> d. the name2
>
> When I think it should be "a. " and "b .". For some reason,
> position() is returning the wrong result.
Out of curiousity, why are you forcing the <xsl:number> value? With
value="position()" I see the same numbering (b, d) as you when I test
it with xsltproc (Which doesn't use sablotron). Taking the value
attribute out gives the desired a, b listing.
So, perhaps it's not a bug, but instead sablotron was doing it wrong
beforehand, and has been fixed. When behavior changes, it doesn't
always mean that the old behavior was correct.
Matt