[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: continuation of xsl:number

Subject: RE: continuation of xsl:number
From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx>
Date: Wed, 21 Aug 2002 12:50:55 +0100
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.