RE: [xsl] copying source tree

Subject: RE: [xsl] copying source tree
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Wed, 14 Mar 2001 15:40:55 -0000
>
> Shouldn't the following copy source to the result tree?
>
> <xsl:template match="@*|node()" >
>    <xsl:apply-templates
>     select = "@*|node()"/>
> </xsl:template>
> <xsl:template match="/">
>         <xsl:apply-templates select="*" />
> </xsl:template>
>

No, it does nothing. Since you've defined rules for all node types (except
namespaces) and since your stylesheet has no instructions that output
anything, it's easy to see that this stylesheet produces no output.

There's an example of an identity stylesheet in the XSLT Recommendation
under <xsl:copy> if I remember right.

Mike Kay
Software AG


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread