This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
K2-DirectConElem-38 evalutes: <e xmlns:xml="http://www.w3.org/XML/1998/namespace"/> The required output in K2-DirectConElem-38.txt is: <e xmlns:xml="http://www.w3.org/XML/1998/namespace"/> Since the xml prefix declaration is redundant, it seems like it should be optional in the output, so this should also be allowed: <e/>
In fact, I might make a stronger statement: (1) All elements provide a namespace binding for the xml prefix. (2) The xml namespace binding should not be printed when it is implicit. (3) There is no provision in the data model for a flag to indicate whether there was an explicit binding for the xml prefix. (4) Hence, the xml namespace binding should not be printed when it is explicit either.
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
section 2.3 of c14n explicitly says ...except omit namespace node with local name xml, which defines the xml prefix, if its string value is http://www.w3.org/XML/1998/namespace. So I think that the canonical form never has a declaration of the xml namespace. Since the published results are not in canonical form but the xml comparison is supposed to involve generating the canonical form of each and comparing them, I think that the expected result files are technically OK as they are, although, there's no reason not to make the expected result files be in canon form, which in this case would mean removing the declartion. David
>section 2.3 of c14n explicitly says ...except omit namespace node with local name xml Thanks, I missed that one.
An attempted fix has been committed to CVS, and should be part of XQTS_current.zip. Feel free to verify that the fix is acceptable, and if so, change status to CLOSED. If the attempted fix is not acceptable, reopen this report. If no opinion about this resolution is expressed within two weeks, it will be closed.
Works for me. Thanks.