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

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 UTC