[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

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: Niko Matsakis <niko@xxxxxxxxxxxxx>
Date: Tue, 17 Dec 2002 15:34:12 -0500



From this and the behaviour that you report, I'd say that Saxon
conforms and both Xalan and MSXML don't.



Which version of Xalan are we talking about? The version of Xalan-J we use in production has no problem writing <br/> as <br>. Would this have something to do with not using -HTML when invoking the transformer?



The point in question, which I think that Jeni missed, is that the XSLT spec states that only elements with a NULL URI should be handled specially when using the HTML output method. However, some processors (such as Saxon) treat the HTML URI as equivalent to the NULL URI code, and output elements from that namespace with the special HTML forms (such as <br>). [1]

Xalan does not, and therefore outputs '<br xmlns="http://www.w3.org/TR/REC-html40"></br>' as '<br xmlns="http://www.w3.org/TR/REC-html40" />'. Saxon, on other hand, outputs something like '<br>'.

I am not positive that is the right namespace, but the general idea is correct.


niko


[1] XSLT Spec 16.2: 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.


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




Current Thread
Keywords