- From: James Clark <jjc@jclark.com>
- Date: Mon, 08 Mar 1999 10:02:10 +0700
- 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> into <foo><p:attribute name="att"><p:entity-ref name="e"/></p:attribute>data</foo> (c) Add to the fragment an internal subset that includes the appropriate entity declarations. James
Received on Sunday, 7 March 1999 23:01:11 UTC