RE: Section

Hi Joseph and Blake,

If C14N is called with a node-set, then it processes the node-set.  Only
if it is called with an octet stream does it behave as if running an
XPath that eliminates comments.  Therefore to retain the default
behavior of stripping comments, we defined the processing model for
References as stripping the comments out.

As to why comment stripping is the default and required c14n, the WG
decided that comment stripping represented the lowest common denominator
XML processor, which is not strictly required to provide comments to the
calling application.

John Boyer
Senior Product Architect, Software Development
Internet Commerce System (ICS) Team
PureEdge Solutions Inc. 
Trusted Digital Relationships
v: 250-708-8047  f: 250-708-8010
1-888-517-2675 <>  	

-----Original Message-----
From: Joseph M. Reagle Jr. []
Sent: Friday, July 27, 2001 2:24 PM
To: Dournaee, Blake; John Boyer
Cc: Donald E. Eastlake 3rd;; Shi, Angela
Subject: Re: Section

At 19:37 7/9/2001, Dournaee, Blake wrote:
>We have a question about the XML DSig spec regarding Section,
>Reference Processing Model.
>Consider the following clarification, and please let us know if this is
>correct interpretation:
>When a same-document reference (1) or a bare fragment identifier (2) is
>as a URI Reference,  it must be dereferenced as an XPath node-set. This

>node-set must have ALL comments stripped from it  (e.g. equivalent to 
>passing the node-set through an arbitrary 'comment stripping' 
>transformation) before canonicalization is used. The type of 
>canonicalization used is orthogonal to the stripping of all comments.
>example, comments must still be stripped even if a canonicalization
>that preserves comments is used.
>And finally, why must comments be stripped anyway?

I too am a little foggy on the relationship of XPointer and comments
The appropriate text is:
>5. if the URI is not a full XPointer, then delete all comment nodes
>The last step is performed for null URIs, barename XPointers and child 
>sequence XPointers. To retain comments while selecting an element by an

>identifier ID, use the following full XPointer:
>To retain comments while selecting the entire document, use the
>full XPointer: URI='#xpointer(/)'. This XPointer contains a simple
>expression that includes the root node, which the second to last step
>replaces with all nodes of the parse tree (all descendants, plus all 
>attributes, plus all namespaces nodes).

Since one has the option of deciding which c14n to use (the implicit
comments, or an explicit with comments, or an explicit without) I no
remember why the XPath nodeset processing needs this final step? John?

Joseph Reagle Jr.       
W3C Policy Analyst      
IETF/W3C XML-Signature Co-Chair
W3C XML Encryption Chair

Received on Friday, 27 July 2001 17:36:57 UTC