Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] new increment question

From: "Michael Kay" <mike@------------>
To:
Date: 10/3/2006 7:51:00 AM
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: [xsl] 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


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent