Subject: Re: [xsl] Re: Creating unique node attributes in output From: Gregory Propf <gpropf@xxxxxxxxxx> Date: Sat, 03 May 2003 21:39:51 -0400 |
"Gregory Propf" <gpropf@xxxxxxxxxx> wrote in message news:3EB3E7C6.6010004@xxxxxxxxxxxxx
I am trying to write a stylesheet that processes an xml file and assigns a globally unique id tag to the output of each node I process. These tags are not present in the original xml. I thought of just creating a variable and incrementing it and using that but it seems that varaibles are not really so variable in xsl. How is this done?
In the general case even using generate-id() will not provide uniqueness -- the same node may be produced many times, or sometimes different nodes (in
temporary trees) are assigned the same (re-used when a temporary tree has
been disposed of) id.
This is a typical use-case for a Monad.
I would be at XML Europe next week and if somebody would be interested I can demonstrate the current Monadic Computation implementation, which is part of FXSL.
===== Cheers,
Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
<a> <b/> <b> <c/> <c/> </b> <b> <c/> </b> </a>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Comparing comma seperated, Peter Flynn | Thread | [xsl] path for import or include, florian |
Re: [xsl] Comparing comma seperated, Mike Brown | Date | RE: [xsl] Numbered Elements, Jack Cane |
Month |