OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Quotes in PEReferences

[ Lists Home | Date Index | Thread Index ]
  • From: Richard Tobin <richard@cogsci.ed.ac.uk>
  • To: Chris Hubick <maillist@chris.hubick.com>, xml-dev@ic.ac.uk
  • Date: Fri, 7 Aug 1998 01:18:43 +0100

> <!DOCTYPE test [
> <!ELEMENT test (#PCDATA)>
> <!ENTITY % p0 "a quote (&#34;) test">
> <!ENTITY % p1 "<!ENTITY e1 &#34;">
> %p1;%p0;">
> ]>
> <test>This is&e1; .</test>
> 
> From what I understand, this seems well formed!? 

First of all, PE references in the internal subset are required to
be whole declarations, so it's not well formed for that reason.

So suppose it was instead in the external subset.  It would still be wrong
(invalid) because declarations must start and end in the same entity
(validity constraint on production 29).

This doesn't rule out something like

<!ENTITY % p1 "&#34;abc">
<!ENTITY % p2 "def&#34;">
<!ENTITY e1 %p1;%p2>

or (more simply)

<!ENTITY % p1 "'abc">
<!ENTITY % p2 "def'">
<!ENTITY e1 %p1;%p2>

I'm sure it was not intended that these be allowed - the purpose
of the extra space added to the expansion of PEs was to ensure that they
produce complete tokens - but I don't see where it is prohibited.

My parser reports "Error: Quoted string goes past entity end" for this
example, and I believe this is the right behaviour.

-- Richard



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS