|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Numbering - how to exclude "cousin" elements?
Thanks to Josh and Charles for your answers. Both strategies worked for the
sample given.
As usual, the real code is more complex. In practice, I needed to be able to
put the Standalone="true" on a few other levels as well. What I've now
started to use is similar to this:
<xsl:template match="Sentence">
<xsl:variable name="StartFrom">
<xsl:value-of select="generate-id(ancestor::*[@Standalone='true'][1])"/>
</xsl:variable>
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:attribute name="Number">
<xsl:number
count="Sentence[generate-id(ancestor::*[@Standalone='true'][1])=$
StartFrom]" level="any"/>
</xsl:attribute>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
Thanks again!
Glen
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








