W3C home > Mailing lists > Public > www-ql@w3.org > July to September 2003

content of PIs and comments

From: Robin Berjon <robin.berjon@expway.fr>
Date: Mon, 15 Sep 2003 19:06:11 +0200
Message-ID: <3F65F183.8060104@expway.fr>
To: www-ql@w3.org


in the data model spec, there are two points -- respectively 4.6.1 third item of 
the last list and 4.7.1 second item of the last list -- that I find surprising.

They say that a PI's data cannot contain "?>" and that a comment's content 
cannot contain "--". That's true at the lexical (XML 1.x) level, but I believe 
it is wrong at the Infoset level. The following document appears to me to be 
well-formed, and indeed several parsers seem happy about it:

     <?pi char?&gt;char?>
     <!-- comment &#41;- foo -->

I believe this generates a PI the content of which is "char?>char" and a comment 
the content of which is " comment -- foo " even though naturally they must be 
escaped when serialised.

Is there a reason for these limitations?

PS: there's also a small cut-and-paste typo in 4.6.1 where it says "Namespace 
nodes" when it means "Processing instruction nodes".

Robin Berjon <robin.berjon@expway.fr>
Research Scientist, Expway      http://expway.com/
7FC0 6F5F D864 EFB8 08CE  8E74 58E6 D5DB 4889 2488
Received on Monday, 15 September 2003 13:07:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:43:43 UTC