[Bug 4217] xml prefix should be optional in K2-DirectConElem-38 expected output

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4217





------- Comment #2 from mike@saxonica.com  2007-01-15 11:13 -------
Oh dear, can of worms here.

The serialization spec does NOT prohibit the output of redundant namespace
declarations (such as the declaration of the XML namespace).

The canonicalization spec, which we use to compare results, does say (see [1])
that superfluous namespace declarations should be ignored. However, a literal
reading of that section suggests that declaring the XML namespace is considered
superfluous if it appears on a child element, but not if it appears on the
outermost element.

In practice, I think it would be sensible for your XML comparator to ignore any
declaration of the XML namespace, wherever it appears. (It would also be
sensible for published test results not to include a declaration of the XML
namespace, since I would think that most serializers will remove it even though
they aren't strictly required to.)

[1] http://www.w3.org/TR/xml-c14n#SuperfluousNSDecl

Received on Monday, 15 January 2007 11:13:50 UTC