W3C home > Mailing lists > Public > public-xmlsec@w3.org > April 2011

RE: Special cases for PrefixRewrite in C14N 2.0

From: Pratik Datta <pratik.datta@oracle.com>
Date: Thu, 28 Apr 2011 09:24:50 -0700 (PDT)
Message-ID: <03f70040-bba5-4f98-aa81-5975d94d1ea5@default>
To: "Cantor, Scott E." <cantor.2@osu.edu>, public-xmlsec@w3.org
Yes this is a new requirement. 

However it is problem for non disjoint subtrees too.

In the example 3 that I had given
Example 3: With prefixes being pushed down

<a:foo xmlns:a="http://a1" xmlns:b="http://a2" >

<a:foo> is one subtree. 
It has a declaration xmlns:b which is not visibly utilized by <a:foo> element, so this declaration cannot be emitted at this point
Instead it needs to be emitted with each of the <b:bar/> elements.
Each <b:bar> element is really a separate subtree, so with the current algorithm, each one will get rewritten prefix, i.e. it will become like this:

<n0:foo xmlns:ns0="http://a1" >
  <n1:bar xmlns:ns1="http://a2" />
  <n2:bar xmlns:ns2="http://a2" />

 If we have to fix this so that both the "b" prefixes get mapped to "n1", then  that fix should take care of disjoint subtrees as well.


-----Original Message-----
From: Cantor, Scott E. [mailto:cantor.2@osu.edu] 
Sent: Wednesday, April 27, 2011 7:12 PM
To: Pratik Datta; public-xmlsec@w3.org
Subject: Re: Special cases for PrefixRewrite in C14N 2.0

On 4/27/11 9:44 PM, "Pratik Datta" <pratik.datta@oracle.com> wrote:
>I think we should do for disjoint subtrees also.
>Let us say some one wants to sign all "CreditCard" elements in the
>document, then have an xpath like this  //c1:CreditCard
>So will each credit card element will be a different disjoint subtree.
>But should each one get a different prefix?  That will be confusing.

I'll defer to current implementers, I wasn't sure if it was worth imposing
a new requirement to remember all the prefix bindings defined in walking
the subtrees. That is a new requirement, right?

-- Scott
Received on Thursday, 28 April 2011 16:25:26 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:55:15 UTC