W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2000

c14n messes up qnames in attribute values

From: Dan Connolly <connolly@w3.org>
Date: Mon, 20 Mar 2000 11:33:21 -0600
Message-ID: <38D660E1.D02EC720@w3.org>
To: www-xml-canonicalization-comments@w3.org
According to
http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#sec-namespaces

the canonical form of:

<aDoc xmlns:aPrefix="http://example.com/">
<anElt anAttr="aPrefix:anNCName">
</aDoc>

is:

<n1:aDoc xmlns:n1="http://example.com/">
<n1:anElt xmlns:n1="http://example.com/" anAttr="aPrefix:anNCName">
</n1:aDoc>

Note that aPrefix in the attr value didn't get changed to n1.
Ouch!

This merits at least a warning in the datatypes spec
	http://www.w3.org/TR/2000/WD-xmlschema-2-20000225/#QName
(if not in the c14n spec too).

A hack would be to revise the namespaces spec to specify a syntax
for attribute names for attributes whose names are qnames, ala:

	anAttr:="aPrefix:anNCName"

then the c14n spec could say how to canonicalize such attribute values.


-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Monday, 20 March 2000 12:34:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:46 GMT