- From: C M Sperberg-McQueen <cmsmcq@uic.edu>
- Date: Tue, 11 Aug 1998 14:07:19 -0500
- To: richard@goon.stg.brown.edu
- CC: xml-editor@w3.org, cmsmcq@uic.edu
>Date: Tue, 11 Aug 1998 14:22:17 -0400 >From: "Richard L. Goerwitz III" <richard@goon.stg.brown.edu> >Just as > > <!ENTITY % firstpart "<!ELEMENT"> > >is invalid, so also should > > <!ENTITY % firstpart "'start"> The first declaration is not, in itself, invalid. >Wording: > > Parameter entities may not expand to partial quoted strings > such as "'start" or "end'". > >The reason it would be a bad idea to allow "'start" or "end'" >is that people will try things like: > > <!ENTITY % firstpart "'start"> > <!ENTITY % lastpart "end'"> > <!ENTITY bothparts %firstpart;%lastpart;> The example shown is illegal in SGML and should, I believe, be illegal in XML; I need to consult the spec to see whether the current wording effectively forbids it or not. Note, however, that the following example is legal SGML and should, I believe, be legal in XML: <!ENTITY % firstpart "'start"> <!ENTITY % lastpart "end'"> <!ENTITY bothparts "%firstpart;%lastpart;"> <!ENTITY legal %bothparts; > When the work group discussed the constraints on parameter entities, the discussion made clear that although token-pasting of the kind shown in this example can be confusing and error-prone, it is nevertheless necessary for some things which the work group was loath to forbid. >Does this make sense? I think so. -C. M. Sperberg-McQueen
Received on Tuesday, 11 August 1998 15:08:58 UTC