Re: XML schema DTD not well formed?

Liam Quin <liam@holoweb.net> writes:

> How does the use of paramter entities in the DTD for a schema
> relate to 4.4.8 of XML1.0,
>     When a parmeter-entity reference is recognized in teh DTD and included,
>     its replacment text si enlarged by the attacment of one leading
>     and one following space
> ?
> 
> In other words, the following is illegal in XML 1.0 as I understand it:
> <!ENTITY prefix 'x:'>
> <!ELEMENT %prefix;nwf (Not,well,formed)>
> 
> But this is precisely what that DTD in XSchema 1 advocates.

Oh no it's not :-)

It very carefully uses one level of indirection, e.g.

<!ENTITY % p 'xs:'>
<!ENTITY % unique "%p;unique">
<!ELEMENT %unique; (unique, never, is, quite, unusable, element)>

4.4.8 [1] which you quote above does not apply within entity
definitions, where 4.4.5 [2] applies:

  "When an entity reference appears in an attribute value, or a
  parameter entity reference appears in a literal entity value, its
  replacement text is processed in place of the reference itself as
  though it were part of the document at the location the reference
  was recognized, . . ."

ht

[1] http://www.w3.org/TR/REC-xml.html#as-PE
[2] http://www.w3.org/TR/REC-xml.html#inliteral
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/

Received on Monday, 5 March 2001 06:53:52 UTC