xsl-list
[Top] [All Lists]

Re: [xsl] How to use generate-id() inside an xsl:function without a node available?

2007-02-27 15:28:21
On 2/27/07, Abel Braaksma <abel(_dot_)online(_at_)xs4all(_dot_)nl> wrote:
<xsl:for-each select="(1 to 20)" >
   <xsl:variable name="id-node"><some-node /></xsl:variable>
   <some-elem id="{generate-id($id-node)}" />
</xsl:for-each>

Out of interest, how can you call a function multiple times and not be
able to create an ID in the code in the code that makes the call?

For example, in the above code snippet you have (1 to 20) to use.  If
you were iterating over nodes you could use them.  In a recursive
named template you could use the value you're recursing with etc...

My point is - in what situation would you need to create a node to
call generate-id() on?

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>