[XML-SIG] First cut at SAX tutorial

Paul Prescod papresco@technologist.com
Mon, 25 May 1998 12:27:11 -0400


Andrew Kuchling wrote:
> 
> Something I'm not sure of: are there any cases where the user has to
> perform entity substitution themselves, such as turning é into
> the right character, or would any such XML parser be considered
> broken?  (For example, what if it's not a standalone document, and the
> parser doesn't read the DTD.  Wondering if I need to document how to
> do that...)

Yes, it is possible that an XML parser could pass an entity reference
instead of the contents of an entity to the application. Let me try to
clarify a few things:

All processors must read at least part of the DTD. But they do not have to
read all of the DTD (e.g. they may skip external parts) When they do not
read the full DTD, they cannot expand some external entities. Even when
they do read the full DTD, they can choose not to expand some (any!)
external entities, as long as the processor does not claim to be a
validating parser.

Paul Prescod  - http://itrc.uwaterloo.ca/~papresco

"A writer is also a citizen, a political animal, whether he likes it or 
not. But I do not accept that a writer has a greater obligation 
to society than a musician or a mason or a teacher. Everyone has
a citizen's commitment."  - Wole Soyinka, Africa's first Nobel Laureate