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

RE: Equivalent of a Global Counter

Subject: RE: Equivalent of a Global Counter
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Wed, 15 Nov 2000 10:12:03 -0000
RE: Equivalent of a Global Counter
> So, what I'm looking for would look something like this (... 
> means any id):
> 
> <front id="...">
> 	<prov id="...1">
> 		<subprov id="..."></subprov>
> 	</prov>
> 	<label.para id="...">
> 		<para id="...2"></para>
> 	</label.para>
> 	<clause id="...3"></clause>
> </front>
> 
> as you can see, the structure of the document is not relevant 
> in terms of what number is used, its more of an incremental concept.

I think I would solve this either with an extension function,
getSequenceNumber(), which returns a stream of sequence numbers, or with a
two-pass transformation, in which the sequence numbers are added in the
second phase using <xsl:number/> or count(preceding::*). Or perhaps even
with a post-processing SAX filter which adds the id's. None of these is a
particularly "pure" XSLT solution, but when it comes down to doing real
work, I'm a pragmatist.

Mike Kay 


 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.