[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
> 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? no a literal result element like <x/> is (more or less) the same as using <xsl:element name="x"/> it's a single node in the stylesheet but it generates a new node each time it's executed, and generate-id() is being applied to that result. You don't need an element at all of course, a text node will do <xsl:function name="pref:myId" as="xs:string"> <xsl:variable name="myNode">x</xsl:variable> <xsl:sequence select="generate-id($myNode)"/> <xsl:function (you can't use <xsl:variable name="myNode"/> as that generates a zero length string not a node at all, for reasons of xslt1 cmpatibility) David
|
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
|