Re: Clarification

--On Mittwoch, 14. August 2002 10:46 -0700 "Dournaee, Blake" <bdournaee@rsasecurity.com> wrote:

>
> Hello All,
>
> I came across something that wasn't quite clear to me in the XML Signature
> Recommendation.
>
> Consider Section 4.3.3.2 in http://www.w3.org/TR/xmldsig-core/
>
> Next consider Case 1 and Case 2 below:
>
> Case 1: <Reference URI="#frag1">....</Reference>

URI="#frag1": The nodes under the element with ID-type attr with value "frag1" without comments

<Object Id="frag1"> <hello> world </hello>  </Object>


> Case 2: <Reference URI="xpointer(id('frag1')"> ..... </Reference>
                          ^ '#' missing

URI="#xpointer(id('frag1')": The nodes under the element with ID-type attr with value "frag1" with comments

<Object Id="frag1"> <hello> world </hello> <!-- today is cool --> </Object>

> Consider:
>
> <Object Id="frag1"> <hello> world </hello> <!-- today is cool --> </Object>
>
>
> The spec clearly says that Case 1 should Reference a node set without
> comments, but for Case 2, it does not clearly say that comments should be
> preserved or stripped (although comment preservation is implied).
>
> Is this clear somewhere else, or am I missing something?

4.3.3.3 states:

   "if the URI is not a full XPointer, then delete all
    comment nodes"

and

   "Therefore to retain the default behavior of stripping
    comments when passed a node-set, they are removed in
    the last step if the URI is not a full XPointer."

So *if* it's an XPointer, comments are not removed.


Christian

Received on Wednesday, 14 August 2002 15:22:25 UTC