Subject: Re: [xsl] xsl:strip-space and position() From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 8 Mar 2006 13:03:15 GMT |
I understand this if we use "node()" as part of the XPath expression, implicitly or explicitly, but in all cases, I can think of, when using the position() function, we will always be more specific in order to include the proper elements only. why say that? node() is the default selection with apply-templates and so is almost certainly the most common xpath selection to be used in xslt. Could someone give me a realistic markup example of the position() function not working properly if xsl:strip-space is not used? input <a> <b/> <b/> <b/> </a> stylesheet <xsl:template match="a"> <xsl:apply-templates/> </xsl:template> <xsl:template match="b"> position: <xsl:value-of select="position()"/> </xsl:template> David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xsl:strip-space and position(, Jesper Tverskov | Thread | Re: [xsl] xsl:strip-space and posit, G. Ken Holman |
[xsl] xsl:strip-space and position(, Jesper Tverskov | Date | Re: [xsl] xsl:strip-space and posit, G. Ken Holman |
Month |