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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: External DTD Grammar

[ Lists Home | Date Index | Thread Index ]
  • From: Chris Hubick <maillist@chris.hubick.com>
  • To: xml-dev@ic.ac.uk
  • Date: Wed, 5 Aug 1998 16:06:01 +0000 (GMT)

On Wed, 5 Aug 1998, John Cowan wrote:

> Quite right; my mistake.  So "%foo;" is an eager PE reference, but
> "&#37;foo;" within an entity value is a lazy PE reference (or
> more accurately, a deferred-once reference).

	Hmm, this got me thinking, and I think I might understand now.
Basically I have been trying to figure out that if the grammar in the spec
is that for *after* PE's have been included, why does it contain
PEReferences?  There are two instances of PEReference in the DTD
grammar, one in DocTypeDecl and the other in EntityValue.  I can't see
any way to create a deferred PEReference in the internal subset and the
only way I can see to create one in the external subset, as sighted above,
is to use a CharRef (is this right?).  So if you (non-recursively) process
all PEReferences at the "lexical" level, you will catch all the eager 
ones, but the deferred ones will still make it up past the "lexical"
level. Since CharRef's are forbidden in the DTD, if you process
PEREferences at the "lexical" level, the only places a (deferred)
PEReference can occur above this level is (only while processing the
external subset) at the two places the grammar allows, DocTypeDecl and

<!DOCTYPE test [
<!ENTITY % p2 "<!ENTITY e1 'not'>">
<!ENTITY % p1 "&#37;p2;">
<test>This is &e1; obvious</test>

My HXP parser currently can recursively evaluate PEReferences occuring in
these two positions, so all I have to do to be able to add support for
parsing the external subset as well, is to process PEReferences at
the lexical level rather than just where specified by the grammar.  Now as
I see it, this lower level processing doesn't need to be recursive to
bring everything inline with the grammar, does anyone disagree with this?
I am also under the impression that I don't need to process CharRef's at
this lower level either?

	Much Thanks!

Chris Hubick

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


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

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