RE: Error on Element Declaration

Michael Amster writes:
 > I agree with Andrew:
 > 
 > In many cases, the XML parsers will have expanded the entity references
 > during parsing - that will be true in SAX parsers (at least at SAX level
 > 1).  It is not clear to me how parser writers should be treating Entity
 > References.  Are they used as mere variables in which case, we should
 > maintain them in nodes so that application writers can change their values
 > and have the DOM represent the current value, or are they more like a
 > classical preparser convenience, substituted before building the DOM.

Actually, SAX is a little more complicated -- the application has
two options for each external entity reference:

1) ask the parser to resolve it; or

2) provide an alternative resolution (including possibly an empty
   stream). 

More generally, entity references should be invisible to production
processes (such as those targeted by SAX), but they will, of course,
matter to authoring tools.


All the best,


David

-- 
David Megginson                 ak117@freenet.carleton.ca
Microstar Software Ltd.         dmeggins@microstar.com
      http://home.sprynet.com/sprynet/dmeggins/

Received on Monday, 4 May 1998 17:32:34 UTC