|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Storing a reference to a node
Kuijk van, David
>I am new to XSLT, and I was wondering whether it is possible to store a
>reference to a paticular node. This can be useful if one would want to
>postpone generating output for a particular node after nodes
>further down
>the tree have been processed.
At the point at which you want to add something to the output,
use the strength of XPATH to 'find' the previous bit you wanted.
E.g. if the bit you want to ignore (in document order) is <save-for-later>
and the point at which you want to output it is <now>
<xsl:template match="now">
<tag><xsl:value-of select ="../../../../save-for-later"/>
This assumes a structure of
<save-for-later>
<tag1>
<tag2>
<tag3>
<tag4>
<now>
Vary the path to get to the right node further up the tree.
HTH DaveP
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








