You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Lyle Coder <x_...@hotmail.com> on 2001/01/03 22:25:16 UTC

XSL bug?

I am new to XSL, and I may have a bug in my XSL file, but shouldnt the
following XSL file copy an XHTML file 1:1 (that is, copy the input AS IS
exactly to output)?

When I run it under testXSLT, the attributes of a tag appear in the child
tag!  For example, the version attribute in the HTML tag appears in the meta
tag and the attributes of the meta tag appear in the title tag and so on...

<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
    <xsl:template match="/">
        <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="*">
        <xsl:copy>
            <xsl:copy-of select="attribute::*"/>
            <xsl:apply-templates/>
        </xsl:copy>
    </xsl:template>
</xsl:stylesheet>


Please advise on what may be wrong

Thanks
Lyle