OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: SAX2: relative ordering of startDocument() & startDTD() events?

[ Lists Home | Date Index | Thread Index ]
  • From: David Brownell <david-b@pacbell.net>
  • To: Ken MacLeod <ken@bitsko.slc.ut.us>
  • Date: Wed, 01 Mar 2000 12:20:40 -0800

Ken MacLeod wrote:
> David Brownell <david-b@pacbell.net> writes:
> > ... which conflicts a bit with the simple true/false
> > model of "handles external {parameter,general} entities" flag.
> >
> > So while I could see how to make that approach work (callback is a
> > predicate saying include/exclude the specified entity), I'm not sure
> > it's a good idea to even start walking in that direction, without
> > some compelling reason to do so.
> >
> > Seemed like you might have some particular use cases to motivate
> > such a thing though.
> The two cases I can think of are the XML editor (or pass-through
> processor) and "ordinary users".  The XML editor wants unexpanded
> entities, maybe expanding them later, and the ordinary user doesn't
> want to even know about entities.

Hmmm ... editor functionality seems to need pretty much a tokenized
access to XML text, which is way below what SAX exposes.  I've seen
editor requirements pretty regularly, and in every case (!) they seem
to me like they'd not be useful except to an editor.  For one large
class of examples, editors need to be able to deal with malformed
text, where applications by definition only see well formed data.

Perhaps there's a need for a token level API that an editor could use?
I'm not sure how it'd relate to SAX though.

As an "ordinary user" I don't want to know about the refs, only the
information behind them.  But I think you're saying you don't even
want that information -- going by your comments about the Expat API,
which doesn't normally fetch it.

Still, a "should I expand this external entity?" callback would seem
to address your non-editor issues.  Unless David adds it to SAX2, that'd
seem to be a candidate for an "extension" handler ... perhaps also with
a way to query whether entities should be pre-expanded in attributes.
(If they're not expanded, the application must handle renormalization.)
And maybe with a parser flag to say whether the resource being parsed
is a document (default) or an external entity.

- Dave

This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/threads.html


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS