Re: CDATA by any other name... (was The raw and the cooked)

Richard Tobin (david@megginson.com)
Fri, 30 Oct 1998 11:44:58 -0500 (EST)


Richard Tobin writes:

> Note that the XML 1.0 recommendation requires that character and
> internal entities be expanded before passing the data to the
> application.

It doesn't forbid the parser from informing the application about what
has been expanded. In an event-based API, for example, for

text &foo; text

the parser could deliver an event stream like

characters("text ")
startEntityRef("foo")
characters("entity value")
endEntityRef("foo")
characters(" text")

For normal downstream processing, this level of reporting is simply a
waste of resources, but it could be essential for authoring tools.

All the best,

David

-- 
David Megginson                 david@megginson.com
           http://www.megginson.com/