From: Madeleine Wright [mailto:[log in to unmask]]
Sent: Wednesday, August 01, 2001 6:58 AM
To: [log in to unmask]
Subject: Re: external subset in the EBNF
Thanks. That was really helpful.
Quoting Ronald Bourret <[log in to unmask]>:
> Got it. Note that the net effect of the latter errata change is simply
> readability. It appears that DeclSep was originally added to clarify
> use of PE references in the internal subset, something that was only
> handled in text (not EBNF) before. Note that PE references in external
> subsets is still not covered in the EBNF -- given that that the can
> appear anywhere (? -- I can't remember the details), this would make
> EBNF almost unreadable.
> > leap from the External ID to the external subset?
> What I did in my DTD parser (and I think other people did in theirs,
> I think I copied the idea from Aelfred) is as follows:
> 1) Constantly scan for PE references. Note that you have to do this
> anyway for internal PE references.
> 2) When you hit an external PE reference, push the current
> buffer/Reader/etc. onto a stack and continue parsing with the new
> buffer/Reader/etc., which represents the external subset.
> 3) When you hit the end of the external subset, pop the old
> buffer/Reader/etc. off the stack.
> The general way to do this is to separate the parsing code from the
> buffer reading code by means of a function to get the next character.
> For an example of how to do this, see the class SubsetToDTD in .
> that there might be bugs in this, as I've gotten a few untrackable bug
> reports about it. You could also look at the code in Xerces, which is
> Open Source.
> As a final consolation, entity processing is by far the hardest part
> parsing an XML document.
> -- Ron
>  http://www.rpbourret.com/schemas/schema101.zip
> > Madeleine
> Ronald Bourret
> Programming, Writing, and Training
> XML, Databases, and Schemas