SAX and delayed entity loading

david at david at
Thu Dec 3 15:39:51 GMT 1998

Gabe Beged-Dov writes:

 > Well, entities are a confusing area of XML :-).  linking is
 > currently "missing in action" in most implementations that are
 > available. Much hay is made of XML's ability to gracefully handle
 > large information sets over the public internet.  Are you saying
 > that external parsed entities are not intended to play any role in
 > addressing how to deal with incremental loading of XML documents?

I'm saying, at least, that they should not be used in that way.
External entities should be used exclusively as a convenience to the
author: to break up a long document into several parts, or to allow a
document to be assembled from several sources.  You can do some pretty
fun things with external entities and URLs, such as the following:

  <!ENTITY table SYSTEM "">

Every time the document is parsed, the parser (if it supports external
entities) will automatically request the latest weather table from
this (fake) CGI.  You could also assemble a document from many
different hosts: Chapter 1 could be in Phoenix, Chapter 2, in
Singapore, Chapter 3 in Milan, etc.; to the parser, it would all still
be a single document.  Of course, this would be a silly choice in a
time-critical environment, but it is the author's silly choice (just
as putting a document on a slow server is an author's choice).

External parsed entities have to do with the author's view of the
document, not with the reader's/receiver's view.  XML 1.0 should
either have forbidden external parsed entities or made support for
them compulsory; by including them but allowing them to be skipped,
the spec has caused a great deal of unnecessary confusion and
implementation headaches.

 > I guess I am looking for a pragmatic explanation of what the mix of
 > political vs. technical issues is involved in external entity usage. Given
 > the fact that a non-validating processor isn't even required to handle them,
 > I'm still struggling to see if they and the associated NOTATION facilities
 > are going to be useful to most XML users.

I think that notations and unparsed entities in XML have proven
themselves to be non-starters.  They worked well in the SGML and have
done me good service, but MIME types and hrefs provide the same
functionality (if somewhat weaker validation) and they work with or
without a document type declaration.

All the best,


David Megginson                 david at

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as:
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list