This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Equivalent of a Global Counter


Michael,

I have a similar problem.

Does a two-pass transformation involve having on stylesheets applied to the
XMLSource and another stylesheet applied to the resultant XML Document? Or
can it be encapsulated in the same stylesheet?

Thanks.

Suk.

> -----Original Message-----
> From:	Kay Michael [SMTP:Michael.Kay@icl.com]
> Sent:	Wednesday, November 15, 2000 10:12 AM
> To:	'xsl-list@mulberrytech.com'
> Subject:	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
*****************************************************************
DISCLAIMER:   The information contained in this e-mail may be confidential
and is intended solely for the use of the named addressee.  Access, copying
or re-use of the e-mail or any information contained therein by any other
person is not authorized.  If you are not the intended recipient please
notify us immediately by returning e-mail to the originator.    


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]