[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

output method html doesnt work with namespace in sourc

Subject: output method html doesnt work with namespace in source tree
From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx>
Date: Tue, 17 Dec 2002 16:14:05 -0000
xml output method html
An interesting issue was raised by Christian Hujer over on xalan-j-users
that might interest the list.  Consider the source:

<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>

With this stylesheet:

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

    <xsl:output method="html"/>

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

</xsl:transform>

An identity transform that specifies an output method of html, applied
to a source where all elements are in a non-null namespace.  The usual
suspect is the way <br /> is output:

Xalan: <br/>
Saxon: <br>
MSXML4: <br></br>

Now to quote the spec:
(http://www.w3.org/TR/xslt#section-HTML-Output-Method)
The html output method should not output an element differently from the
xml output method unless the expanded-name of the element has a null
namespace URI; an element whose expanded-name has a non-null namespace
URI should be output as XML. If the expanded-name of the element has a
null namespace URI, but the local part of the expanded-name is not
recognized as the name of an HTML element, the element should output in
the same way as a non-empty, inline element such as span.

>From that I would say Xalan conforms, Saxon doesnt and MSXML is
confused... ;-)


cheers
andrew


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.427 / Virus Database: 240 - Release Date: 06/12/2002
 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.