This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 4845 - Do we need an error for "]]>" in replacement text?
Summary: Do we need an error for "]]>" in replacement text?
Status: CLOSED INVALID
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Update Facility (show other bugs)
Version: Working drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-10 22:54 UTC by Don Chamberlin
Modified: 2007-07-31 20:55 UTC (History)
0 users

See Also:


Attachments

Description Don Chamberlin 2007-07-10 22:54:53 UTC
In http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2007May/0044.html, Mohamed Zergaoui suggested several changes to the update spec, labeled "Editorial". All but one of the changes are indeed editorial and I will implement them. But I think one of the changes deserves the attention of the working group. Here it is:

In 2.4.3.2 Replacing the Value of a Node

[[
If $target is a comment node, and $string contains two adjacent
hyphens or ends with a hyphen, a dynamic error is raised
[err:XQDY0072].

If $target is a processing instruction node, and $string contains the
substring "?>", a dynamic error is raised [err:XQDY0026].
]]

The case of -- in comment and "?>" has been taken into account. But
what about "]]>" everywhere in the content ?

I request that the working group consider this issue at a future meeting.

Regards,
Don Chamberlin
Comment 1 David Carlisle 2007-07-10 23:16:24 UTC
I think that unlike the -- in comments case the ]]> restriction isn't a restriction on values in the data model, so shouldn't concern update, it's just that an xml serialisation needs to serialise ]]> as ]]> or some such.

David
Comment 2 Michael Kay 2007-07-11 10:24:58 UTC
Agree with David C. There's no problem having a text or attribute node with ']]>' in it.
Comment 3 Don Chamberlin 2007-07-31 20:55:10 UTC
On July 31, 2007, the Query working group decided to close this bug report with no change to the specifications. The string "]]>" is valid as text content in the XQuery Data Model. When a Data Model instance containing this string is serialized, the string will be escaped appropriately.
--Don Chamberlin (for the Query working group)