W3C home > Mailing lists > Public > public-qt-comments@w3.org > January 2004

RE: [XQueryX] 5 A Trivial Embedding of XQuery

From: David Carlisle <davidc@nag.co.uk>
Date: Wed, 14 Jan 2004 23:11:11 GMT
Message-Id: <200401142311.XAA13956@e3000>
To: mrys@microsoft.com
Cc: xquery@comcast.net, public-qt-comments@w3.org


> [Michael Rys] I agree that you always should entitize XQueries in the
> trivial embedding...

Thanks, that was my main point.
(Although as I said it would be nice if the "obvious" interpretation of
<foo a="b">aaa</a> 
as XML could be made safe, as people will try it  unless this section
strongly warns against that.

[Michael Rys] This is clearly incorrect. An XML document clearly can
contain ]]>. 

Er, depends on your definition of "clearly" I think:-)


http://www.w3.org/TR/2000/REC-xml-20001006#syntax

  The right angle bracket (>) may be represented using the string "&gt;",
  and must, for compatibility, be escaped using "&gt;" or a character
  reference when it appears in the string "]]>" in content, when that
  string is not marking the end of a CDATA section


For example msxml3 (in IE6)  says
of

<foo>]]></foo>

The XML page cannot be displayed 
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh button, or try again later. 


--------------------------------------------------------------------------------

The literal string ']]>' is not allowed in element content. Error
processing resource 'file:///C:/cygwin/w3ccvs/entities/foo.xml'. Line 1,
Position 6 

<foo>]]></foo>
-----^


-- 
http://www.dcarlisle.demon.co.uk/matthew
Received on Wednesday, 14 January 2004 18:12:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:04 GMT