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

[
addition to
http://lists.w3.org/Archives/Public/public-qt-comments/2003Feb/0024.html
and
http://lists.w3.org/Archives/Public/public-qt-comments/2003Feb/0029.html
]

1. Why have only one namespace declaration, on the root element?

Here are some test results demonstrating the requirement:

files:
http://www.pinkjuice.com/temp/xhtml/multi_decl.xhtml
http://www.pinkjuice.com/temp/xhtml/single_decl.xhtml
results:
http://www.pinkjuice.com/temp/xhtml/results.txt

I think XSLT 2.0 could and should offer a feature which allows authors
to specify that they want only one namespace declaration, on the root
element, and allows them to rely on it, so that their "HTML compatible
XHTML" can work in older browsers and in popular validators.

2. Why have a namespace declaration at all?

When the XHTML document gets opened locally (not over http), then 
namespace-aware browsers like Mozilla need it to recognize the thing as 
HTML (XHTML). From my experience, the http-equiv meta element does not 
suffice in all scenarios.

So having this one namespace declaration helps. And it doesn't do any 
harm either for the browsers an validators I support.

"HTML compatibility" is not something absolute. By (conceptual, 
historical, abstract, big picture) definition, XHTML is a subset of HTML 
(grammar is the same: HTML4; syntax/notation is a subset: XML of SGML), 
but in reality, it isn't. So until browsers etc properly support XHTML 
(served as application/xhtml+xml), we can choose to go with a temporary 
workaround named "HTML compatibility".

http://www.w3.org/TR/xhtml1/#guidelines is not normative, and could not 
be. So each developer has to find the best compromise for each scenario 
with its specific set of requirements. Some of these solutions to achive 
maximum backwards- and forwards- compatibility include one namespace 
declaration.

BTW, the example in Appendix C
http://www.w3.org/TR/xhtml1/#guidelines
has a single one :
<html xmlns="http://www.w3.org/1999/xhtml"

Tobi

-- 
http://www.pinkjuice.com/

Received on Friday, 14 February 2003 05:09:52 UTC