Re: Entity nodes

>"The DOM Level 2 does not support editing Entity nodes; ..."

At this time, Entity nodes and their descendents (the description of an
Entity's value) are always read-only, and the DOM spec offers no way to
alter them. Theoretically, since you Entities are stored in a NamedNodeMap,
you could replace one Entity with another -- but since there is no
createEntity method, there is no promise that this will work. And if you do
somehow manage to step outside the limits of the DOM and change the
Entity's value, there is no promise that references to this Entity in the
main document which reference this Entity will have their values updated to
reflect the change.

So if you really want to edit part of the document which was represented by
an entity, the best you can do is to explicitly clone of the Entity's
contents, edit this clone tree (which will _not_ be read-only), and then
find and replace all the references to this Entity with the new value. All
of that has to be done in application or middleware code.

DOM Level 3's "Content Model' chapter may or may not  make entities
editable. The largest challenge is determining how and when changes to the
entity definition are published into the main DOM tree, as this may have
significant side effects if the user has pointers into the EntityReference.

______________________________________
Joe Kesselman  / IBM Research

Received on Tuesday, 5 September 2000 09:43:08 UTC