[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to use generate-id() inside an xsl:function w
Dimitre Novatchev wrote:
I think in this case generate-id() will be applied on the same node again and again and will return the same string -- this is why I want always to have a new copy of it -- or am I wrong? I am honoured with so much attention for such a seemingly simple question ;) Inside a function, apparently, the node is recreated on each function call. Whether it is this: <xsl:function name="my:getNode"><node /></xsl:function> <xsl:function name="my:getId"><xsl:value-of select="generate-id(my:getNode())" /></xsl:function> or whether you use variables to achieve the same result. Apparently, the node need not be part of the result tree to achieve this effect (maybe it is, I don't know, but it is never output at least). The variable-inside-one-function (like David's solution) is the one I currently employ, but any variant is likely to succeed if I understand Michael Kay correctly. -- Abel Braaksma
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|