This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: maintaining pointer to original doc
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 23 Sep 2002 15:19:12 +0100
- Subject: RE: [xsl] maintaining pointer to original doc
- Reply-to: xsl-list at lists dot mulberrytech dot com
> I'm attempting to create an xml sub-tree from an xml doc
> using copy-of.
> I'm running a transform and I get the subtree but if I make
> changes on this subtree doc it has no impact on the original
> doc. I assume that it's because I'm using copy-of. Is there
> another way of getting a subtree without loosing access to
> the original doc thru the subtree doc?
>
You can select nodes using
<xsl:variable name="nodes" select="... path expression ..."/>
The variable will contain references to the original nodes. You can't
update these nodes using XSLT. Some processors may allow you to update
them using extension functions, but it's not to be recommended.
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list