[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: continuation of xsl:number
To answer my own question (too quick to post ;) <xsl:value-of select="count(preceding::step1|.)"/> <xsl:if test="local-name()='step2'"> <xsl:number level="multiple" format=".1.1" count="step2|step3|step4|step5"/> </xsl:if> cheers andrew > -----Original Message----- > From: Andrew Welch > Sent: 21 August 2002 12:19 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: continuation of xsl:number > > > > Hi all, > > The data I have contains many nested steps, both in say <start> and > <end>. To number these steps I use xsl:number - however > because of the > doc structure <steps> in <end> start from 1 again (as it > should), but I > need it to continue counting from the last step: > > <root> > <start> > <s1> > <para>1</para> > <s2> > <para>1.1</para> > </s2> > </s1> > <s1> > <para>2</para> > </s1> > </start> > <end> > <s1> > <para>3</para> > <s2>3.1....</s2> > </s1> > </end> > </root> > > As in the example, the numbering of the steps in the end > should carry on > from the last step. > > Is the only way to use count() instead of some neat use of > xsl:number?? > (they could go 9 steps deep so it would be quite a line of code...) > > cheers > andrew > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.381 / Virus Database: 214 - Release Date: 02/08/2002 > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > > > > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.381 / Virus Database: 214 - Release Date: 02/08/2002 > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.381 / Virus Database: 214 - Release Date: 02/08/2002 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|