Re: [XQuery] Computed CDATA constructor (qt-2004Jan0042-01)

Hi Sarah,

The XML Query Working Group has considered your feedback in the
following message:

http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2004Jan/0042.html

The following is an official response from the XML Query Working
Group:

You have correctly pointed out a confusing inconsistency in our
specification. The reason for this inconsistency is that a
CompCdataConstructor does not actually create a CDATA node - in fact,
there is no such thing as a CDATA node in the Data Model. Although the
syntax of CDATA section in XML looks a lot like other things that
really are constructors in XML, and probably would be treated as a
constructor if CDATA nodes existed, this is not the case. (We
confirmed in yesterday's meeting that the WG does not want to add
CDATA sections to the data model.)

 From an XQuery or XSLT perspective, a CDATA section is merely a way of
changing the treatment of special characters within a region of
text. We have decided to change XQuery in the following way:

1. Remove all references to CData sections from Section 3.7.2 ("Other
Direct Constructors"). There should be no reference to a "CData
Section constructor" anywhere in the language document.

2. Remove CdataSection from the production named Constructor, but
leave it in the production named ElementContent. Move the production
named CdataSection to the top of Section 3.7 ("Constructors"), near
the production named ElementContent.

3. In Section 3.7.1.3 ("Direct Element Constructors--Content"), in the
list of rules labeled "Conceptually, the content of an element
constructor is processed as follows", change the rule (1a) to:
"Predefined entity references and character references are expanded
into their referenced strings, as described in 3.1.1 Literals
<http://www.w3.org/TR/xquery/#id-literals#id-literals>. Characters
inside of a CDataSection are treated like XML CData sections and are
mapped directly into string content. The content of a CdataSection may
not contain the string "]]>" since this string is used to delimit the
CdataSection".

We believe this improves our specification by making it more
consistent with the semantics of our data model, and thank you for
your input.
		
Please let us know if this response is satisfactory for you,

Jonathan

Received on Wednesday, 21 January 2004 17:12:06 UTC