W3C home > Mailing lists > Public > www-xpath-comments@w3.org > July to September 1999

Re: Text(): Unifying DOM/Infoset/XPath/XSL

From: James Clark <jjc@jclark.com>
Date: Sun, 15 Aug 1999 11:21:56 +0700
Message-ID: <37B64064.1C16A014@jclark.com>
To: caro@adobe.com
CC: www-xpath-comments@w3.org
"Perry A. Caro" wrote:

> Since the XML Infoset recognizes that distinguishing CDATA sections in the
> midst of text is useful, I'd like the XPath spec to do the same.

The Infoset makes it available as an *optional* property (actually at
the moment the infoset doesn't provide enough to recreate the CDATA
sections exactly).  Optional properties provide information that is
useful for some applications but not others.  There are many other
optional infoset properties that XPath does not expose (eg entity
references).  CDATA sections and entity references are important for
some classes of application, like XML editors. However, CDATA sections
are not part of the logical structure of the XML document; the XML Rec
makes it clear that they are just another way of escaping data.  As
such, I believe it would be harmful for CDATA sections to be exposed to
XPath and thus to XSLT and XPointer.

(If anybody extends XPath to do this, cdata-section() should match only
CDATASection nodes but text() should match both CDATASectopm nodes and
text nodes, just as in the DOM the CDATASection interface extends the
Text interface.)

Received on Sunday, 15 August 1999 01:14:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:02:13 UTC