[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: External DTD Grammar

  • From: Chris Hubick <maillist@c...>
  • To: xml-dev@i...
  • Date: Wed, 5 Aug 1998 16:06:01 +0000 (GMT)

create external dtd
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
EntityValue:

<!DOCTYPE test [
<!ENTITY % p2 "<!ENTITY e1 'not'>">
<!ENTITY % p1 "&#37;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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.