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

Re: c14n/exc-c14n interop samples

From: merlin <merlin@baltimore.ie>
Date: Fri, 31 May 2002 18:52:57 +0100
To: Aleksey Sanin <aleksey@aleksey.com>
Cc: w3c-ietf-xmldsig@w3.org
Message-Id: <20020531175257.33E084432D@yog-sothoth.ie.baltimore.com>

Hi Aleksey;

>Thanks for your explanation. I agree with you that your result
>seems correct. However, the C14N spec has following example:
>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>
>Can you explain why there is no xmlns:a="http://www.w3.org" declaration
>in <e8>, please?

Sure; that document fragment is not an XPath node set, it
is a serialized XML document. When parsed, the XPath node
set will be:
  <e6 xmlns:a="http://www.w3.org">
    <e7 xmlns="http://www.ietf.org" xmlns:a="http://www.w3.org">
      <e8 xmlns:a="http://www.w3.org">
        <e9 xmlns:a="http://www.ietf.org"/>

That is to say, xmlns="" does not exist in the XPath node
set, and all the namespace attributes are propagated down.

So, the xmlns:a namespace node on e8 is suppressed because
it is present in the node set of the nearest ancestor of
e8, e7 which, during parsing, inherited it from e6.

Received on Friday, 31 May 2002 13:54:10 UTC

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