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

RE: restoring document context

Subject: RE: restoring document context
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Wed, 4 Feb 2004 08:53:12 -0000
xsl node set
> I'm having a problem with my document context switching from 
> the XML file I'm processing to a node-set contained in the 
> XSL to back to the XML file.    I don't know how to get back 
> to the XML file once I switch to the XSL node-set.  

The answer is always to declare a variable before you switch away from
the document:

<xsl:variable name="doc1" select="/">
<xsl:for-each select="$doc2/a/b">
   ...
   <xsl:for-each select="$doc1/c/d"

If doc1 is the principal source document this can be a global variable.

Michael Kay
   


 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.