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

RE: Question for implementors: XPath model and CDATA sections

From: Karl Scheibelhofer <Karl.Scheibelhofer@iaik.at>
Date: Fri, 15 Feb 2002 08:53:26 +0100
To: "'Philippe Le Hegaret'" <plh@w3.org>, "'Christian Geuer-Pollmann'" <geuer-pollmann@nue.et-inf.uni-siegen.de>
Cc: <w3c-ietf-xmldsig@w3.org>, "'Martin Duerst'" <duerst@w3.org>
Message-ID: <015c01c1b5f5$d9a63d10$64981b81@iaik.at>
i just read some of the XPath sections again. i cannot figure out how
the behavior of Xalan can be compliant with the XPath 1.0 recommendation
(i really do not care about any working draft for a future version).
maybe it is compliant with the mentioned working draft, but i guess it
is not compliant to XPath 1.0. 
perhaps, it is very hard or not possible to be compliant with XPath 1.0,
if you are working with DOM as it comes out of a parser.
however, this situation is really unsatisfying for me.

regards

  Karl

--

Karl Scheibelhofer, <mailto:Karl.Scheibelhofer@iaik.at>
Institute for Applied Information Processing and Communications (IAIK)
at Graz University of Technology, Austria, http://www.iaik.at and
http://jcewww.iaik.at
Phone: (+43) (316) 873-5540


> -----Original Message-----
> From: w3c-ietf-xmldsig-request@w3.org 
> [mailto:w3c-ietf-xmldsig-request@w3.org] On Behalf Of 
> Philippe Le Hegaret
> Sent: Tuesday, February 12, 2002 5:53 PM
> To: Christian Geuer-Pollmann
> Cc: w3c-ietf-xmldsig@w3.org; Martin Duerst
> Subject: Re: Question for implementors: XPath model and CDATA sections
> 
> 
>  "So when you run an XPath against a DOM and
>    return text as a DOM node, we return the
>    _first_ such node in the contiguous text,
>    whether it's Text or CDATASection. It is
>    the caller's responsibility to check whether
>    additional text follows, if that's relevant
>    for your application."
> 
> and Xalan is right on that. They are following the DOM Level 
> 3 Xpath working draft: [[ The XPath model relies on the XML 
> Information Set [XML Information set] ands represents 
> Character Information Items in a single logical text node 
> where DOM may have multiple fragmented Text nodes due to 
> cdata sections, entity references, etc. Instead of returning 
> multiple nodes where XPath sees a single logical text node, 
> only the first non-empty DOM Text or CDATASection node of any 
> logical XPath text will be returned in the node set. ]] 
http://www.w3.org/TR/2002/WD-DOM-Level-3-XPath-20020208/xpath.html#TextN
odes

You'll need to use the wholeText property, introduced in DOM Level 3
Core to retrieve the text. Or, in the meantime, look for the text
yourself.

Philippe
Received on Friday, 15 February 2002 02:59:24 GMT

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