W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2003

xslt20/#xhtml-output : suggestion for additional item: "only one ns decl"

From: Tobias Reif <tobiasreif@pinkjuice.com>
Date: Thu, 13 Feb 2003 17:27:47 +0100
Message-ID: <3E4BC783.5020502@pinkjuice.com>
To: public-qt-comments@w3.org

Hi

I think it would make sense to add the following to
http://www.w3.org/TR/xslt20/#xhtml-output

######################################################################

   * [other HTML compatibility items]
   * If the whole document is in the XHTML namespace, the serializer
     should add only one namespace delaration, on the root element.

######################################################################

(No additional redundant XHTML namespace delarations, no null namespace 
delarations, and no other namespace delarations at all.)

This would increase "HTML compatibility". Older browsers and validators 
often get confused if there are many other namespace delarations in many 
other locations. My current workaround is to not qualify any result 
fragments (I simply don't declare the XHTML namespace anywhere), then 
insert a single namespace declaration on the root element, via a script.

I think there should be a solution offered by the XSLT2 spec; any way 
which achieves what I describe is OK.

One solution addressing pipelining issues could be to write s.th. like 
the following:

######################################################################

[attributes of element output]

Attribute single-ns-decl defaults to "no".

       Beware: If single-ns-decl="yes",
       serialization can not be pipelined.

[#xhtml-output]

   * [other HTML compatibility items]
   * If the whole document is in the XHTML namespace, the serializer
     should add only one namespace delaration, on the root element.
     In other words:
     method="xhtml" sets single-ns-decl="yes", but it can be reset
     by explicitly specifying single-ns-decl="no", eg to allow for
     pipelining.

######################################################################

AFAICS some solution must be found, if xslt20/#xhtml-output is to really 
address the needs of those who serve "HTML compatible" XHTML.

TIA,
Tobi
Received on Thursday, 13 February 2003 11:28:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:24 GMT