Subject: RE: restoring document context
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Wed, 4 Feb 2004 08:53:12 -0000
|
> 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
|