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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Yet another niggling XML syntax question

[ Lists Home | Date Index | Thread Index ]
  • From: David Brownell <db@Eng.Sun.COM>
  • To: roddey@us.ibm.com
  • Date: Mon, 01 Mar 1999 14:14:57 -0800

roddey@us.ibm.com wrote:
> 
> Does the following violate the 'partial markup in entity' rule of XML?
> 
> <!ENTITY Part1 "<!ELEMENT ">
> <!ENTITY Part2 " Bubba ANY>">
> <!ENTITY Whole "%Part1;%Part2">
> %Whole;

I'll assume you intended to work with parameter entities; then as Richard
pointed out this can be legal ... if the three syntax errors are corrected
("<ENTITY % Part" twice, "%Part2;") AND if this is found in an external
parameter entity not an internal one (which disallows PEs inside entity
declarations -- a WF constraint).


> So I'm assuming
> that this is ok, that the prohibition against partial markup refers to the
> eventual use of the entity, not to the definition thereof?

Right -- this would violate _validity_ constraints (but a nonvalidating
parser should accept it just fine):

	<!DOCTYPE Bubba [
	  <!ENTITY % Part1 "<!ELEMENT ">
	  <!ENTITY % Part2 " Bubba ANY>">
	  <!-- next is a validity error in both internal
		 and external subsets -->
	  %Part1;%Part2;
	]>
	<Bubba></Bubba>

Another way to make an error out of your declarations is to make the
PEs be external, not internal -- then they'd not match full grammatical
productions.

- Dave

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/ and on CD-ROM/ISBN 981-02-3594-1
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