[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: External DTD Grammar
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 EntityValue: <!DOCTYPE test [ <!ENTITY % p2 "<!ENTITY e1 'not'>"> <!ENTITY % p1 "%p2;"> %p1; ]> <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 mailto:chris@h... http://www.hubick.com/ xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|