This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
position() returning incorrect results
- From: jon wa <jonni at gmx dot co dot uk>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 14 Feb 2002 16:23:15 +0100 (MET)
- Subject: [xsl] position() returning incorrect results
- Reply-to: xsl-list at lists dot mulberrytech dot com
hi!
i discovered something weird in xsl yesterday and i can't work out why it
happens.....
i just had an <xsl:apply-templates> to get the stylesheet to work on an html
like file, which just had lots of <p> tags for paragraphs in it.
when i do the <xsl:template match="p"> and then try to print the position()
it all goes wrong and seems to count up in twos.
what confuses me more is that if i have a seperate template for
<xsl:template match="p[1]"> it will correctly pick out the first paragraph and report
it's position() as being 1.
is there some restriction on position(), i can't see that both my xsl
processors are wrong so it must be me :)
thanks.
jw.
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list