[jdom-interest] First pass at Namespace revision[eg]

Joseph Bowbeer jozart at csi.com
Wed Apr 4 11:33:06 PDT 2001

Elliotte Rusty Harold elharo at metalab.unc.edu writes:

> [Concerning setName() and setNamespace() ... ] I'm worried
> that we're going to end up with something like the mess CDATA
> sections have become in XML, where they're used for everything
> except what they were actually meant to be used for, and
> consequently end up polluting an otherwise very clean model.

I think you're applying your vigilance at the wrong level.  The JDOM API is
too low-level and too general-purpose (though still not a kitchen sink) for
us to concern ourselves too much with whether its users are doing XML

Concern over "rightness" has more weight in a higher-level API designed
for a particular application, or style of use, or level of user.  Although
JDOM isn't designed for every use, it is designed for many different ones.
Furthermore, JDOM is designed to be used by experts (many of whom are
smarter than us) as well as beginners.

> Every setter method you add makes thread safety that much trickier.

*Any* setter method or internal cache makes thread safety that much
We've already crossed the thread safety threshold.

On the other hand, consistency and generality are good qualities in any API,
and one can argue for setName and setNamespace on those grounds alone.

Joe Bowbeer

More information about the jdom-interest mailing list