W3C home > Mailing lists > Public > www-xml-fragment-comments@w3.org > March 1999

Entity references

From: James Clark <jjc@jclark.com>
Date: Mon, 08 Mar 1999 10:02:10 +0700
Message-ID: <36E33DB2.D0DDAF26@jclark.com>
To: www-xml-fragment-comments@w3.org
The example fragment in B.2 is not well-formed XML: in the p:body
element there is an reference to an entity author that has not been
defined.  Any conforming XML processor will give a fatal error on the
fragment.  This seems like a flaw in the design: you surely can't be
proposing that a packaging mechanism relies on illegal XML.

The possible solutions that occur to me are:

(a) Expand the entity references. This is fine if you're just displaying
the document; not so good if you're editing it.

(b) Elementize the entity references.  By this I mean, within the
package body turn &author; into <p:entity-ref name="author"/>.  To make
this work for entity references in attribute values, you would have to
elementize attributes as well, by for example, turning

  <foo att="&e;">data</foo>


  <foo><p:attribute name="att"><p:entity-ref

(c) Add to the fragment an internal subset that includes the appropriate
entity declarations.

Received on Sunday, 7 March 1999 23:01:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:52:37 UTC