RE: [xsl] output method html doesnt work with namespace in source tree

Subject: RE: [xsl] output method html doesnt work with namespace in source tree
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Tue, 17 Dec 2002 22:08:52 -0000
You are right, Saxon is getting this wrong. It's deciding whether to use
a closing tag based solely on the displayed name, not on the underlying
namespace.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Andrew Welch
> Sent: 17 December 2002 16:14
> To: Xsl-List (E-mail)
> Subject: [xsl] output method html doesnt work with namespace 
> in source tree
> 
> 
> 
> 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
> 


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


Current Thread