[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Storing a reference to a node

Subject: RE: Storing a reference to a node
From: DPawson@xxxxxxxxxxx
Date: Thu, 25 Nov 1999 14:01:18 -0000
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.