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

Kay, Michael wrote:

> I don't think a serialization option that required look-ahead would be a
> particularly good idea,


It would be an option, with pros and cons; the current behaviour would 
still be available, and would be the default, and could also be the 
default for XHTML output. No one would miss anything.

> and I don't think it's right that serialization
> should output an XML document that is not a faithful representation of the
> result tree.


Neither do I.
I can't see what part of my post suggested to do that.

If all elements of the whole doc/file are in the XHTML namespace, then 
it seems to be quite a faithful representation to add one default 
namespace declaration on the root element thus qualifying all elements.


> I also think that your suggestion is quite hard to specify precisely. Are
> you suggesting that elements and attributes should be somehow be treated as
> if they were in the XHTML namespace when they are not?


No! Sorry for the confusion. (The null namespace mention was an 
unnecessary and confusing addition; please delete it from your memory :)


> We have done quite a lot in XSLT 2.0 to make it easier to avoid
> proliferation of namespaces in the result tree. There is now an option #all
> on exclude-result-prefixes, and there is the option copy-namespaces="no" on
> xsl:copy. I think these features should reduce the usability problems in
> generating XHTML.


I need XHTML output with a single namespace declaration, on the root 
element. And I need a way to specify that, so that I can rely on it, 
100%. (I can not manually check each output file)

single-ns-decl="yes" or "no" seems to be one way to offer this assurance.

Tobi

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

Received on Thursday, 13 February 2003 16:21:56 UTC