xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lyle Coder" <x_co...@hotmail.com>
Subject Best XSL to copy a source document
Date Thu, 04 Jan 2001 00:41:30 GMT
Hi,
Is this really the best way to copy a source XML file with out any changes
or transformations to the output?

<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
        <xsl:template match="/">
                <xsl:apply-templates/>
        </xsl:template>
        <xsl:template match="node()">
                <xsl:copy>
                        <xsl:for-each select="attribute::*">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="."/>
                                </xsl:attribute>
                        </xsl:for-each>
                        <xsl:apply-templates/>
                </xsl:copy>
        </xsl:template>
</xsl:stylesheet>


Thanks
Lyle

Mime
View raw message