[jdom-interest] EntityRef questions

philip.nelson at omniresources.com philip.nelson at omniresources.com
Mon Jun 4 19:04:46 PDT 2001

> I see no harm in making immutable Entity available for external
> entities. In fact, I think is a good ideea. DOM useses both Entity and
> EntityRef.
> An entity contains a list of Strings, Elements, EntityRefs, 
> PIs, Comments
> and CDATAs.
> Why not make available a method for adding a list of those 
> objects to the
> element's content? Element could have something like 
> addContent(Collection
> c). I know that's a little bit tricky because we don't have a common
> parrent for those classes (other than Object), but I say
> addContent(Collection c) could be very useful for developers.

You know, we pretty much had that with the original Entity class, which was
broken most of the time it was there and (almost) nobody noticed!  Now you
can work with the expanded entity and not expect to change it or when one of
us gets around to it, work with an unexpanded entity in the internal subset
as a string.  Yes we could parse that string into a nice object model, but
so could you or anybody else.  Perhaps the majority case with entities is
external entities, I don't know, but without a large cry from developers for
this (possibly speed reducing) feature, I think the planned approach is the

More information about the jdom-interest mailing list