[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Parameter entities in internal subset
Ron, I happened to be searching for some info and stumbled across your email… almost a year late! Thought I’d chime in since I saw no other responses. The only way I’ve been able to make heads-or-tails of this is to interpret that the entity value as not quite IN an entity declaration (or, rather, it’s an opaque unit within the declaration). That interpretation is, certainly a little bit convenient/contrived, but I suspect matches the intent. As I see it, entity values seem to get a bit of special treatment here, since they allow parameter entities in them when other literals do not. Further, a parameter entity can’t (as far as I know) span the start of a literal. That is, this doesn’t seem to be OK: <!ENTITY % outch 'foo “start’> <!ENTITY %outch; and end’> I’ve always argued to myself that this violates some of the senses of things being properly nested (with the view that the literal’s open and close quotes together form a nestable unit), even though I don’t think this is stated in this case (there’s plenty of other places, though, that concern of nesting is stated). So, with the notion that the entity value isn’t really a divisible unit here, I then extend my thinking to believe that its contents aren’t really IN the markup. Sincerely (while doffing my apologist’s hat) David > On Jan 6, 2018, at 15:09, Ronald Bourret <rpbourret@rpbourret.com> wrote: > > I haven't been here for quite a while, so hello to everyone. > > As a way to learn git, I've been fixing some ancient bugs in my DTD Parser, and that has led me to the Joy of Entities. I understand the intent, but am missing a few details and the deeper I dig, the more my head spins. > > Section 2.8 (Prolog and Document Type Declaration), has a well-formedness constraint: "PEs in Internal Subset: In the internal DTD subset, parameter-entity references must not occur within markup declarations" > > Paragraph 2 of section 4.5 states, "The literal entity value as given in an internal entity declaration (EntityValue) may contain character, parameter-entity, and general-entity references" and goes on to state that parameter-entity references are replaced. > > Since markup declarations include entity declarations, why doesn't section 4.5 contradict section 2.8? > > Thanks, > > -- Ron > > _______________________________________________________________________ > > XML-DEV is a publicly archived, unmoderated list hosted by OASIS > to support XML implementation and development. To minimize > spam in the archives, you must subscribe before posting. > > [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/ > Or unsubscribe: xml-dev-unsubscribe@lists.xml.org > subscribe: xml-dev-subscribe@lists.xml.org > List archive: http://lists.xml.org/archives/xml-dev/ > List Guidelines: http://www.oasis-open.org/maillists/guidelines.php [Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
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
|