This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: XML -> XSL -> same XML


Several people have replied with answers using xsl:copy, but if you want to
copy an entire subtree, it's easier to use xsl:copy-of:

<xsl:template match="/">
	<header/>
	<xsl:copy-of select="."/>
	<footer/>
</xsl:template>

Many people miss this because the spec's description of xsl:copy-of is
strangely-worded and in the wrong place.

Mike Kay

 
> How do I transform an XML with an XSL that spits out the same 
> XML document
> that was inputted, except with a particular heading or 
> footer.  


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]