W3C home > Mailing lists > Public > w3c-ietf-xmldsig@w3.org > April to June 2002

Re: c14n/exc-c14n interop samples

From: Aleksey Sanin <aleksey@aleksey.com>
Date: Fri, 31 May 2002 00:16:46 -0700
Message-ID: <3CF7235E.8070705@aleksey.com>
To: Christian Geuer-Pollmann <geuer-pollmann@nue.et-inf.uni-siegen.de>
Cc: merlin <merlin@baltimore.ie>, w3c-ietf-xmldsig@w3.org
You are not alone :) For example, I do see problems with C14N spec:

    Section 2.3 (http://www.w3.org/TR/xml-c14n#ProcessingModel)   
    Namespace Nodes
    A namespace node N is ignored if the nearest ancestor element of the
    node's parent element that is in the node-set has a namespace node in
    the node-set with the same local name and value as N . Otherwise, 
process
    the namespace node N in the same way as an attribute node, except 
assign
    the local name xmlns to the default namespace node if it exists (in 
XPath, the
    default namespace node has an empty URI and local name).

    Section 3.3 (http://www.w3.org/TR/xml-c14n#Example-SETags)
    <e6 xmlns="" xmlns:a="http://www.w3.org">
      <e7 xmlns="http://www.ietf.org">
         <e8 xmlns="" xmlns:a="http://www.w3.org">
            <e9 xmlns="" xmlns:a="http://www.ietf.org"/>
         </e8>
      </e7>
   </e6>

    is canonicalized to

    <e6 xmlns:a="http://www.w3.org">
      <e7 xmlns="http://www.ietf.org">
         <e8 xmlns="">
            <e9 xmlns:a="http://www.ietf.org" attr="default"></e9>
         </e8>
      </e7>
   </e6>

    (note that there is no xmlns:a="http://www.w3.org" declaration in <e8>)


Aleksey.



Christian Geuer-Pollmann wrote:

>
> Hi Aleksey,
>
> I would agree on that, but since two weeks, my understanding of c14n 
> is a little bit puzzled ;-))
>
> Christian
>
> --On Donnerstag, 30. Mai 2002 22:24 -0700 Aleksey Sanin 
> <aleksey@aleksey.com> wrote:
>
>>
>> Hi, Merlin!
>>
>> I have a question regarding your examples. You've canonicalized the 
>> second
>> reference as follows (c14n-1.txt):
>>
>> <bar:Something xmlns:bar="http://example.org/bar" xml:lang="en-ie">
>>      <foo:Something xmlns:foo="http://example.org/foo">
>>         <bar:Something xmlns:bar="http://example.org/bar">
>>            <foo:Something xmlns:foo="http://example.org/foo">
>>              <baz:Something
>> xmlns:baz="http://example.org/baz"></baz:Something>
>> </foo:Something>
>>         </bar:Something>
>>      </foo:Something>
>>   </bar:Something>
>>
>> and it seems to me that according to
>> http://www.w3.org/TR/xml-c14n#SuperfluousNSDecl the correct c14n form is
>> the following (unnecessary namespace declarations are removed):
>>
>> <bar:Something xmlns:bar="http://example.org/bar" xml:lang="en-ie">
>>      <foo:Something xmlns:foo="http://example.org/foo">
>>         <bar:Something>
>>            <foo:Something>
>>              <baz:Something
>> xmlns:baz="http://example.org/baz"></baz:Something>
>> </foo:Something>
>>         </bar:Something>
>>      </foo:Something>
>>   </bar:Something>
>>
>>
>> With best regards,
>>
>> Aleksey Sanin
>
Received on Friday, 31 May 2002 03:15:52 GMT

This archive was generated by hypermail 2.2.0 + w3c-0.29 : Thursday, 13 January 2005 12:10:15 GMT