[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Newbie wants comments too . . .
So I am very new to XSL and teaching myself as I go.
I am trying to transform and existing XML database to a new format. The scrips works (see below), EXCEPT comments in the original file are not copied into the output file. The individual database items are converted as I want them, but the comments are lost. What do I need to do so that the original file comments also get copied to the output file? Frank <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml"/> <xsl:preserve-space elements="*"/> <xsl:template match="/"> <xsl:text> </xsl:text> <aitags><xsl:text> </xsl:text> <xsl:for-each select="AsiaInfoDb/*"> <aitag><xsl:copy-of select="@*"/><xsl:attribute name="id"><xsl:value-of select="name()"/></xsl:attribute><xsl:value-of select="."/></aitag><xsl:text> </xsl:text> </xsl:for-each> </aitags> </xsl:template> </xsl:stylesheet>
|
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
|