W3C home > Mailing lists > Public > w3c-ietf-xmldsig@w3.org > January to March 2005

RE: Interpretation issue regarding PI nodes

From: John Boyer <JBoyer@PureEdge.com>
Date: Thu, 6 Jan 2005 13:18:58 -0800
Message-ID: <7874BFCCD289A645B5CE3935769F0B52D88747@tigger.pureedge.com>
To: "Lars Marius Garshol" <larsga@ontopia.net>, <w3c-ietf-xmldsig@w3.org>

The spec states that every node of the nodeset is considered separately.
In other words, a node is NOT processed by canonicalizing the subtree 
rooted by that node.

A nodeset containing only element <a> will canonicalize to <a></a> 
whether there is text or text and a PI.

If you include the element <a> and its text node child (in 
your example of <a>Hey <?a pi?></a>), then the c14n will be
<a>Hey </a> because the text node child contains "Hey " and,
most importantly, was included in the nodeset to be canonicalized.

If you want to include the PI in the output, then you have to
include it in the nodeset.

Best regards,
John Boyer, Ph.D.
Senior Product Architect and Research Scientist
PureEdge Solutions Inc.



-----Original Message-----
From: Lars Marius Garshol [mailto:larsga@ontopia.net]
Sent: Thursday, January 06, 2005 8:39 AM
To: w3c-ietf-xmldsig@w3.org
Subject: Interpretation issue regarding PI nodes




I'm uncertain how PI nodes which are not included in the input node
set should be processed. As far as I understand the specification,
given the document

  <doc><a>Hey</a> <b>Ho</b></doc>

and a node set containing only the <a> element, the output of
canonicalization will be

  <a>Hey</a>

which is fine.


However, given the document

  <doc><a>Hey <?a pi?></a> <b>Ho</b></doc>

and the same node set (still only the <a> node), what is the output?

Is it

  <a>Hey </a>

or

  <a>Hey <?a pi?></a>


Whether this merits an erratum I don't know, but I would certainly
appreciate knowing the answer. :)

-- 
Lars Marius Garshol, Ontopian         <URL: http://www.ontopia.net >
GSM: +47 98 21 55 50                  <URL: http://www.garshol.priv.no >
Received on Thursday, 6 January 2005 21:23:34 GMT

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