- From: Richard L. Goerwitz III <richard@goon.stg.brown.edu>
- Date: Tue, 11 Aug 1998 14:22:17 -0400
- To: xml-editor@w3.org
Just as <!ENTITY % firstpart "<!ELEMENT"> is invalid, so also should <!ENTITY % firstpart "'start"> 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 problem with this is a) the parameter entities will get pad- ded with spaces, leading to unexpected results, and b) implementa- tions must now expand %firstpart; and %lastpart; before parsing the line (if %firstpart; then the input stream is examined, no closing quote will be found). It is preferable to allow implementors to make decisions like this (incremental expansion vs. chunked expansion) on their own. And it is preferable not to allow people to do things that will create unanticipated results like &bothparts -> 'start end' with a space in between the "start" and "end", despite that fact that %firstpart; and %lastpart; have no spaces in their defs, and that bothparts has no space between them. Does this make sense? Richard Goerwitz STG
Received on Tuesday, 11 August 1998 14:21:57 UTC