Re: questions about exc-c14n

On Sunday 03 March 2002 03:16, Aleksey Sanin wrote:
> I am working on C14N and Exc-C14N standards implementation
> based on gnome-xml library and I have few questions about ext-c14n.
> It'll be great if someone can help me with it.

Hello, thank you for the comments! These are good examples for interop 
"screw-cases". If you have and example that tests these, please send it on 
and the other implementors can try it out.

> 1) Do we need to exclude default "xml" namespace "xml"
> with href="http://www.w3.org/XML/1998/namespace" when
> a node has an attribute in this namespace (for example,
> "xml:space") as it is done in C14N? I suspect that the answer
> is "yes" but want to confirm it.

Correct.

http://www.w3.org/TR/2001/REC-xml-c14n-20010315
To finish processing L, simply process every namespace node in L, 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.

http://www.w3.org/TR/2002/CR-xml-exc-c14n-20020212
The data model, processing, input parameters, and output data for Exclusive 
XML Canonicalization are the same as for Canonical XML [XML-C14N] with the 
following exceptions [and I see no relevant exception].

> 2) The same as above but the default namespace is in the
> InclusiveNamespaces PrefixList?

Excluded. (And for this reason I've yet to come up with a good test case 
for testing this feature, but I haven't thought about it hard enough.)

> 3) From the documentation it is not clear should the
> namespace utilized by an "invisible" attribute (i.e.
> the attribute not in the XPath subset). I guess the answer
> is "no" but it'll be better to make it more clear.

The following text, "if E or an attribute node in the document subset" 
covers this case, right? 


[1] http://www.w3.org/TR/2002/CR-xml-exc-c14n-20020212#sec-Terminology
"An element E in a document subset visibly utilizes a namespace 
declaration, i.e. a namespace prefix P and bound value V, if E or an 
attribute node in the document subset with parent E has a qualified name in 
which P is the namespace prefix." 

> 4) one of exc-c14n tests I found in this mailing lists
> (http://lists.w3.org/Archives/Public/w3c-ietf-xmldsig/2002JanMar/0097.htm
>l) processes attached document test.xml with following
> Will you clarify this, please?

As you noted, my example was in error.

Also, note some other interesting issues that have come up recently:
1. If you serialize (just) an attribute bound to a prefix, the result is 
just the attribute, it is not accompanied by a namespace declaration. (This 
is probably not a good thing... still thinking about it though.)
2. If you serialize a value price="euro:1" the fact that the attribute  
value seemingly uses a namespace prefix does not fit the definition of 
utilized by these exc-c14n. (This is probably reasonable.)
3. I just noted this point today, but when I was testing my implementation 
I noted a declaration of xmlns:xml="http://www.w3.org/XML/1998/namespace" 
caused a parser "Invalid namespace" error. I note Tim Bray addressed [2] 
this issue, and it was discussed last week at the W3C plenary and expect an 
erratum to be published that permits this.

[2] http://lists.xml.org/archives/xml-dev/200201/msg01733.html
-- 

Joseph Reagle Jr.                 http://www.w3.org/People/Reagle/
W3C Policy Analyst                mailto:reagle@w3.org
IETF/W3C XML-Signature Co-Chair   http://www.w3.org/Signature/
W3C XML Encryption Chair          http://www.w3.org/Encryption/2001/

Received on Monday, 4 March 2002 16:26:28 UTC