This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: copying child nodes n-level deep
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] copying child nodes n-level deep
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Thu, 26 Jul 2001 16:55:25 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
With B as the context node:
<xsl:copy-of select="*/*"/>
Mike Kay
Software AG
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Ram Anantha
> Sent: 26 July 2001 15:49
> To: 'XSL-List@lists.mulberrytech.com'
> Subject: [xsl] copying child nodes n-level deep
>
>
>
> Given:
> <A>
> <B>
> <C id="1">
> <D id1="2">
> <E>hello</E>
> </D>
> </C>
> </B>
> </A>
>
> I would like to copy all the elements and their children
> starting from D.
> The logic is, take the grand-child of B (in this case D) and
> copy it (along
> with all its children). The only known element name is B..How
> can I write a
> generic xsl code such that from the following schema:
>
> <AA>
> <B>
> <CC id="1">
> <DD id1="2">
> <EE>hello</EE>
> <FF>hello2</FF>
> </DD>
> </CC>
> </B>
> </AA>
>
> I can copy (B's grand child (DD) and its children):
> <DD id1="2">
> <EE>hello</EE>
> <FF>hello2</FF>
> </DD>
>
> Thanks a lot for the help.
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list