This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Function position()
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Function position()
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Thu, 1 Feb 2001 14:21:01 GMT
- References: <200102011233370350.0104A42B@mailhost.rz.uni-karlsruhe.de>
- Reply-To: xsl-list at lists dot mulberrytech dot com
<xsl:template match"Paragraph">
<xsl:value-of select="Text"/>
<xsl:apply-template select="StretchText"/>
</xsl:template>
That doesn't seem to match your tre ediagram that had multiple text and
stretchtext children of Paragraph.
The obove will give you th echaracters from (only) the first Text,
followed by the result of applying all the StretchTexts (even if they
came before the Text in the source).
Why not
<xsl:template match"Paragraph">
<xsl:apply-templates/>
</xsl:template>
which will process both kinds of children in document order?
<xsl:template match"StretchText">
<xsl:value-of select="position()"/> ---> THIS doesn't work in my case.
</xsl:template>
use <xsl:number/> possibly with level="multiple" depending on exactly
what it is you are counting.
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list