[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XML to XML transformation
> <!-- 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|