This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: XML to XML transformation
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: XML to XML transformation
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Thu, 23 Nov 2000 12:55:53 -0000
- Reply-To: xsl-list at mulberrytech dot com
> <!-- First of all, copy the root and apply-templates -->
> <xsl:template match="/">
> <copy>
> <!-- this copies the attributes(if any) of the root element
-->
> <copy-of select="@*"/>
> <xsl:apply-templates/>
> </copy>
> </xsl:template>
>
Confusion here: "/" matches the root node, which is not an element, it is
the parent of the outermost element, which is sometimes (but not in
XPath/XSLT) called the document element or root element. The root node will
never have attributes so the <xsl:copy-of> here is redundant.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list