RE: Storing a reference to a node

Subject: RE: Storing a reference to a node
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Mon, 29 Nov 1999 18:26:18 -0000
> I am new to XSLT, and I was wondering whether it is possible 
> to store a reference to a paticular node.

 <xsl:variable name="thisnode" select="."/>
 <xsl:value-of select="$thisnode/>

> I tried to achieve sth like this by using generate-id() to 
> store the id for a specific node in a xsl:variable, and then look up the
> with id(), but that does not seem to work:

generate-id() generates a new identifier for a node, unrelated to any
identifier present in the source document; id() locates a node using an
identifier already present in the source document. There is no inverse to
generate-id() (ie. find the node whose generated id would be X), other than
of course the horrendous "//node()[generate-id()==$id]".

Mike Kay

 XSL-List info and archive:

Current Thread