Hello dear list members,

it seems that xsl:output method="html" does not really output html but xml 
when the source document contains a namespace node.

Try the following:

Source document:
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="de">
    <head>
        <title>Test</title>
    </head>
    <body>
        <p>
            Line
            <br />
            Next Line
        </p>
    </body>
</html>

Transform:
<xsl:transform
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>

    <xsl:output
        method="html"
    />

    <xsl:template match="@*|node()">
        <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
    </xsl:template>

</xsl:transform>

And take a look at the result.
Expected: <br>
Result: <br />

When the namespace declaration is removed from the source document, the result 
is as expected:
Expected: <br>
Result: <br>

Is this a documented and expected behaviour, have I missed something or is 
this a bug?

It's really annoying since I write XHTML Basic as source documents (which are 
validated using the xmlvalidate task of ant) and want to transform them to 
XHTML 1.1 and HTML 4.01.

Bye
-- 
ITCQIS GmbH
Christian Wolfgang Hujer
GeschÃftsfÃhrender Gesellschafter
Telefon: +49  (0)89  27 37 04 37
Telefax: +49  (0)89  27 37 04 39
E-Mail: [EMAIL PROTECTED]
WWW: http://www.itcqis.com/

Reply via email to