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

RE: new increment question

Subject: RE: new increment question
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 3 Oct 2006 08:50:26 +0100
RE:  new increment question
There's a vast amount of flexibility in xsl:number, it's worth reading up on
the instruction. You can achieve this kind of thing quite easily by writing
count="e|f|g". 

Michael Kay
http://www.saxonica.com/



> -----Original Message-----
> From: Jonathan Marenus [mailto:jonathanmarenus@xxxxxxxxx] 
> Sent: 03 October 2006 03:32
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  new increment question
> 
> 
> Michael's previous answer helped a lot.  Thanks.
> 
> The functionality I would like to achieve now is similar to 
> the first.  The updated XML structure is the following:
> 
> <a>
>   <b>
>     <c>
>       <d>
>          <e/>
>          <f/>
>          <g/>
>       </d>
>     </c>
>     <c>
>       <d>
>          <e/>
>          <f/>
>          <g/>
>       </d>
>     </c>
>   </b>
>   <b>
>     <c>
>       <d>
>          <e/>
>          <f/>
>          <g/>
>       </d>
>     </c>
>     <c>
>       <d>
>          <e/>
>          <f/>
>          <g/>
>       </d>
>     </c>
>   </b>
> </a>
>    
> Here, I would like to output an incremental value for each e,f, or g.
> 
> In the case above,
> 
> first e: 1
> first f: 2
> first g: 3
> second e: 4
> second f: 5
> second g; 6
> 
> There will be situations where not all three elements
> (e,f,g) are within d.
> 
> So if there is only e in the first d and e,g in the second d, 
> the desired output will be:
> 
> first e: 1
> second e: 2
> g: 3
> 
> The output value should reset to 1 for every new a encountered.
> 
> Thank you.
> 
> Jonathan Marenus
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection 
> around http://mail.yahoo.com 

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-2007 All Rights Reserved.