- From: John Boyer <jboyer@PureEdge.com>
- Date: Tue, 3 Oct 2000 12:53:36 -0700
- To: "merlin" <merlin@baltimore.ie>, <w3c-ietf-xmldsig@w3.org>
- Cc: "Doug Bunting" <Doug@ariba.com>
Hi Merlin, Firstly, note that the specific examples you give are now illegal because they are not absolute URIs. The c14n document will soon be changed such that the examples contain a leading scheme. This is aside from your main point though. As to that point, the omission of xmlns:foo="rab" should actually have no effect on the namespace URI of foo:attr. The assignment of namespace URI is done at parse time and does not change based on omissions from the node-set. In order for an omission to have such an effect, you would have to create the canonical form, then parse the canonical form. Since sorting by namespace URI does not cause the problem you mention, this should get rid of the major part of the objection to sorting by namespace URI. As for why we do this, we sort by namespace URI because this follows more closely the intent of XML Names, which is to identify namespaces by URI+localname, not by prefix+localname. Thus, the effect of the sort is to group together all attributes that are in the same namespace. Though not a requirement for producing an unambiguous canonical form, it is preferrable, particularly if one factors in the optics of *appearing* to violate the intent of XML names by sorting with prefixes, even if one is not technically violating the intent. John Boyer Development Team Leader, Distributed Processing and XML PureEdge Solutions Inc. Creating Binding E-Commerce v: 250-479-8334, ext. 143 f: 250-479-3772 1-888-517-2675 http://www.PureEdge.com <http://www.pureedge.com/> -----Original Message----- From: w3c-ietf-xmldsig-request@w3.org [mailto:w3c-ietf-xmldsig-request@w3.org]On Behalf Of merlin Sent: Tuesday, October 03, 2000 11:55 AM To: w3c-ietf-xmldsig@w3.org Cc: Doug Bunting; John Boyer Subject: Re: C14N Last Call Hi, I strongly agree with Doug Bunting's note: r/Doug@ariba.com/2000.09.26/12:47:45 >* In [the bullets near the end of section 2.2], why are attribute nodes >output using an order derived from the namespace URI values? Such a >requirement seems more appropriate if the Canonical XML recommendation >includes namespace re-writing rules. As things are now, why not sort >the attributes using the namespace prefix as the primary key? Sorting by URI value is reasonably more complex than sorting by prefix. Additionally, consider the following document: <Foo xmlns:foo="bar" xmlns:bar="baz"> <Bar xmlns:foo="rab" foo:attr="value" bar:attr="value" /> </Foo> And consider a node set including everything but xmlns:foo="rab". For sorting purposes, is the namespace URI of foo:attr equal to "rab" or "bar"? According to my parser, it is equal to "rab" but according to my node set it is "bar". 2.2 states that "an element E has namespace nodes that represent its namespace declarations..." which does not preclude namespace attributes absent from the node set. If we sort by namespace prefix then this problem does not arise because interpretation of the attribute's namespace URI does not affect sorting. Merlin
Received on Tuesday, 3 October 2000 15:53:39 UTC