Re: [xml] PEReferences - tricky and error-prone



Hi Norma, All,

Norman Walsh <ndw nwalsh com> wrote:
[..]
Hmfph. One person's tricky and error-prone is another person's
good and flexible design, I suppose.

Sure, I have seen good uses for PEReferences. But one may wonder
whether it would have been possible to have them without the
obscurities. Also it reminds me of a quote from long ago and 
forgotten source:
"How desirable a language feature is, depends on which side
of the compiler you are".

But what I really wanted to say in this message:

Given that the original example is valid, I assume
the following one is also valid, due to the automatic
insertion of blanks around the replacement text:

<!ENTITY % percent "&#x25;">
<!ENTITY%percent;def "ghi">
<!ENTITY abc "%def;">
<!ELEMENT root (#PCDATA)>

And I assume, that unescaped use of the
percent sign (as seen in Matthias' SGML
example) is not valid XML:

<!ENTITY % percent "%">
<!ENTITY %percent; def "ghi">
<!ENTITY abc "%def;">
<!ELEMENT root (#PCDATA)>


Regards,
Peter Jacobi





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]