Re: content of PIs and comments

On Mon, 2003-09-15 at 11:06, Robin Berjon wrote:
> Hi,
> 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:
>    <foo>
>      <?pi char?&gt;char?>
>      <!-- comment &#41;- foo -->
>    </foo>
> I believe this generates a PI the content of which is "char?>char" and a comment 
> the content of which is " comment -- foo " 

Well, it would if general-entity references were recognized,
and the entities expanded, within processing instructions and
comments.  But they aren't.

Of course, what you say may be true of synthetic infosets.

(And by the way, shouldn't these comments on the spec be going to ?)

-C. M. Sperberg-McQueen

Received on Monday, 15 September 2003 15:59:06 UTC