W3C home > Mailing lists > Public > public-xml-core-wg@w3.org > March 2007

Re: C14N and namespace undeclaring

From: Richard Tobin <richard@inf.ed.ac.uk>
Date: Wed, 28 Mar 2007 13:03:51 +0100 (BST)
To: Konrad Lanz <Konrad.Lanz@iaik.tugraz.at>, Richard Tobin <richard@inf.ed.ac.uk>
Cc: public-xml-core-wg@w3.org
Message-Id: <20070328120351.C59EE1CF0B2@macpro.inf.ed.ac.uk>

There are two issues here.  One is what XPath data model you get from
an XML+Namespaces 1.1 document, and the other is how to canonicalise
nodes from such a model.

Of course XPath 1.0 doesn't say anything about 1.1 documents.  And I
don't think there is any plan to update XPath 1.0.  So if C14N is
based on XPath 1.0 and C14N wants to handle Namespaces 1.1, it will
have to explain how to extend XPath 1.0.  In section 5.4 XPath 1.0

  Each element has an associated set of namespace nodes, one for each
  distinct namespace prefix that is in scope for the element [...]

It then summarises - based on Namespaces 1.0 - what namespace nodes
an element will have, and in non-normative Appendix B describes
the correspondence with an obsolete draft of the Infoset spec.  But
the sentence quoted above clearly expresses the intended mapping
between in-scope namespaces and namespace nodes.

Interpreting that with respect to Namespaces 1.1 would give the
natural result that there are no namespace nodes for prefixes that
have been undeclared.  To do anything else would be to subvert the
whole point of namespace undeclaring, and destroy the correspondence
between the XPath data model and the Infoset (which *has* been updated
to take account of Namespaces 1.1).

I don't really have an opinion about what C14N should do.  The whole
idea of canonicalising fragments of documents with element layers
omitted seems like a bad idea to me.  But I would object if it
attempted to define a mapping of XML 1.1 to the XPath data model
that did not correspond to the Infoset.

-- Richard
Received on Wednesday, 28 March 2007 12:04:26 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:37 UTC