W3C home > Mailing lists > Public > www-dom@w3.org > July to September 1998

Re: Question about Entity and EntityReferance again.

From: Mike Champion <mcc@arbortext.com>
Date: Thu, 20 Aug 1998 09:30:44 -0400
Message-Id: <>
To: KAZUMI Saito <ksaito@flab.fujitsu.co.jp>, www-dom@w3.org
At 12:15 PM 8/20/98 +0900, KAZUMI Saito wrote:
>I want to implement Entity and EntityReference as "Entity has expanded entity
>as its children and EntityReference dosen't have children only have entity

Not quite, but I think you can achieve your objectives and still be DOM

Any implementation is legal so long as it preserves the DOM interfaces.
The DOM API "presents the illusion" that all expanded entity references
have the subtree that would result from parsing the entity replacement text
as its children.  Since the DOM Level 1 does not allow entity declarations
to be edited, these subtrees can be shared by all references to the same
entity, I believe.  The implementation would have to get tricky to handle
the getParent() method on the top of this subtree so that it navigated back
to the EntityReference rather than the Entity, but other than that, I don't
see a problem *physically* hanging the subtree off Entity and having
EntityReference point back to the Entity.  BUT this has to be hidden from
the DOM user, who will *see* the EntityReference as having the expansion as
its children.

Is this any clearer?

Mike Champion
Received on Thursday, 20 August 1998 09:30:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:04 UTC