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



/ "Peter Jacobi" <pj walter-graphtek com> was heard to say:
| While trying to eliminate the last usage of ctxt->token, I had to do
| some experiments with PERefences. As already the W3C REC points
| out, PERefeferences are primary used to author tricky and
| error-prone XML, and so I'm somewhat confused. 

Hmfph. One person's tricky and error-prone is another person's
good and flexible design, I suppose.

| Is the following is valid (current libxml2 votes no, as 
| does XMLSpy 3.5):
|
| t4.xml
| <?xml version='1.0'?>
| <!DOCTYPE root SYSTEM 't4.dtd'>
| <root>&abc;</root>
|
| t4.dtd
| <!ENTITY % percent "&#x25;">
| <!ENTITY %percent; def "ghi">
| <!ENTITY abc "%def;">
| <!ELEMENT root (#PCDATA)>
|
| This example tests, whether it is O.K. to have the
| '%' of an EntitityDecl given by an PEReference.

Yes, the preceding test is valid, for precisely the sections of the
REC that you quoted. Whether it represents good and flexible design is
another question :-)

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw nwalsh com> | All of us are creatures of a day; the
http://nwalsh.com/            | rememberer and the remembered
                              | alike.--Marcus Aurelius



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