Lists Home |
Date Index |
- From: Chris Hubick <email@example.com>
- To: firstname.lastname@example.org
- 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
> "%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 "%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?
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)