W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2000

Re: ANN: JDOM

From: Jason Hunter <jhunter@acm.org>
Date: Thu, 27 Apr 2000 17:46:27 -0400 (EDT)
Message-ID: <3908B121.651D@acm.org>
To: Arnaud Le Hors <lehors@us.ibm.com>
Cc: xerces-j-dev@xml.apache.org, xalan-dev@xml.apache.org, cocoon-dev@xml.apache.org, Ivan Valdiva <ivanv@center7.com>, Matt Phillipps <mattp@center7.com>, Ken Beyer <kab@metatec.com>, Vamshi Jonnalagadda <jvamshi@rens.com>, Jeff McCarrell <jwm@emptech.com>, Nick Crossley <ndjc@ncrossley.com>, Tommy Jasmin <jasmin@berbee.com>, Steve Drake <drake@comet.ucar.edu>, Stephen Figgens <fig@oreilly.com>, David Schaer <david@cu.net>, Manon Girard <girardm@grics.gc.ca>, Jeff Jones <jajones@weather.com>, "T. K. Lin" <tlin@electronics-today.com>, Wes Biggs <wbiggs@elite.com>, Scott Carpenter <scott_carpenter@BIGFOOT.COM>, Debra Elliott <debra_elliott@agilent.com>, Isaac Hands <ihands@databeam.com>, Jim Lawwill <jlawwill@databeam.com>, Eduardo Neeter <eneeter@intraspect.com>, Steven Layten <slayten@cas.org>, Chad Hinkel <chad_hinkel@cargill.com>, Ricardo Garcia <ricardo.garcia@gamers.com>, Ron Norman <ronald.norman@togethersoft.com>, David Soleno <dsoleno@doccity.com>, Kausten Tuoff <utuott@get2chip.com>, Joseph Sze <joseph.sze@cigna.com>, Richard Ritchie <richard.ritchie@cigna.com>, Thomas Hill <thomas.hill@openmarket.com>, Steve Cavin <scavin@earthbridge.com>, Rance Shields <rance.shields@deqmail.state.ok.us>, Christopher Powell <chrspw@aol.com>, Tom Moos <tomm@fc.hp.com>, Patrick Harper <patrickh@extendsys.com>, Ben Jacobs <random@well.com>, Shin Takagi <takagi@megaships.co.jp>, Masoud Mansouri-Samani <masoud_mansouri-samani@agilent.com>, Christopher Mileto <cfmileto@southernco.com>, Geoff Krampitz <geoffkrampitz@hotmail.com>, Wang Conghni <gwang@houston.geoqest.slb.com>, Cindy Hsieh <chsieh@onlink.com>, Jody Wheat <jwheat@strykerendo.com>, Gary Haines <gary.haines@usafa.af.mil>, Ted Hsieh <ted_hsieh@hp.com>, Gary Shea <shea@gtsdesign.com>, Paul Gregson <paul@gamers.com>, Norman Yee <norm@gamers.com>, Ben Vandgrift <benji@ecorporation.com>, Jay Disilvejiri <jay@adei.com>, Jason Hunter <jason@servlets.com>, Raj Gupta <rajg@adventa.com>, Paul Chomg <pchang@cybersource.com>, Gary Horton <horton@ucar.edu>, Kay Sampacngern <kay.sampacngern@marchfirst.com>, Ramesh Patrone <rpatrone@cisco.com>, Ted Hollman <ted.hollman@compaq.com>, Mark McNiff <mark.mcniff@integ.com>, Richard Sears <richard.sears@sun.com>, Wes Gamble <weyus@att.net>, Amit Bhati <amit@visi.com>, David Sanford <davids@vitessa.net>, Lance Reck <lange.reck@inktomi.com>, Zach Brand <zbrand@wpni.com>, Tvan Ho <tho@synapta.com>, Keith Goettert <keith@activesw.com>, Elliot Schwartz <es@mit.edu>, Steve Mann <smann@cdpubs.com>, Kwei Chan <kwei_chan@intuit.com>, Alex Kovkov <alexvk@sgi.com>, Jim King <jim.king@gene.ge.com>, Charles Lewis <charlesonline@yahoo.com>, Kim Goings <kim.goings@mail.sprint.com>, Alan Preston <apreston@allaire.com>, Ernest Kim <ernest@mysimon.com>, E Wolf <wolf@ap.net>, Suresb Chandraskchanah <suresbc@eng.sun.com>, Aaron Boeck <aboeck@zland.com>, Dave Holzer <dholzer@kaverinetworks.com>, Diane Murphy <diane_murphy@epicdata.com>, Van Smith <smith.van@menlolog.com>, J C Dorng <jcdorng@home.com>, Shikka Gottfried <shikka@cv.hp.com>, Kim Vo <kvo@rfc.com>, Dave DeCruz <decruzda@pebio.com>, Geary Arceneaux <geary.arceneaux@compaq.com>, Tim Webster <tim@thecolorworks.com>, "Chris O'Neil" <chris@svwp.com>, Rafael Saucedo <rsaucedo@earthling.net>, Kaylynn Nelson <kalynn@uen.org>, Joe Kathan <joeka@medcmp.com>, Arnie Carter <acarter@acs.utah.edu>, Tom Austin <taustin@realcities.com>, Linda Jewett <linda.jewett@gene.ge.com>, Judy Ng <jade@cisco.com>, Tom Poffenberger <tpoffenb@cisco.com>, Bruno Melloni <bruno@melloni.com>, Henrik Rodshagen <hrodshagen@cdgzd.com>, Kristian Woyna <kwoyna@ucar.edu>, Michael Brinkman <michaelbr@raremedium.com>, Hristo Tonev <htoner@us.oracle.com>, Craig Scurlock <cscurlock@sportsnetwork.com>, Narjala Bhasker <narjalal.bhasker@intel.com>, Greg Moxness <jgmoxness@west.raytheon.com>, Reena Mathew <rmathew@inventa.com>, "K. R. Balaji" <krb@mti.sgi.com>, Jeremy Bower <jeremy.bower@pervasive.com>, Michael Oldham <michael_oldham@hp.com>, Nick Ludden <Nicholas.Ludden@sun.com>, Don Gilchrest <donald.gilchrest@east.sun.com>, Mike Figueroa <mike.figueroa@sun.com>, Beatrice Yeh <beatrice.yeh@ericsson.com>, Anjan Bacchu <bacchu_anjan@yahoo.com>, Todd Thal <todd_thal@hotmail.com>, Derek Roller <derek_roller@hp.com>, Jeff Hutchinson <jhut@inst.strykercorp.com>, Newton Chan <newtonc@mail.com>, Moshe Sambol <msambol@gte.com>, www-dom@w3.org
Arnaud Le Hors wrote:
> 
> Hi all,

And an awful lot of "all" there are!  I'm replying to everyone since 
I think we need to hear from both viewpoints here.  PLEASE IF YOU WANT
TO REPLY, join and post to jdom-interest (see http://jdom.org for
sign-up).

> I'll be the first one to say that the DOM is far from being the
> cleanest and leanest API one could dream of but, unlike JDOM, at 
> least it truthfully represents XML.

The goal of JDOM is to solve 80% (or more) of a Java programmer's XML
problems with 20% (or less) of the traditional effort.  We also need to
be lightweight and fast.  This means that some end cases will not be
supported, because to support them would overly complicate learning the
API, overly complicate using the API, require too much memory overhead,
and/or require too much CPU work.

> JDOM appears to fail to even simply represent the XML document tree as
> it should. Processing instructions, for instance, aren't found in the
> tree but instead are stored at the document level.

Yes, this was a conscious decision.  In our analysis, we believe that
PIs are (by far) most commonly used by Java programmers without regard
to placement in the Document.  Cocoon is a good example.  By our
attaching PIs to the Document itself they can easily be retrieved
together, retrieved by name, and manipulated as a set.  Order of
appearance is always respected.  

We could place them in the tree like we place Comment objects.  But do
people really think that's part of the 80% and that losing the
simplicity and efficiency of retrieval (you'd have to walk the tree to
get them) doesn't extend us beyond the 20%?  That's a serious 
question.  Post answers to jdom-interest.

> JDOM confuses entity references and entities. While entity refs are
> represented by an Entity object, entities are simply absent.

Entities are an area of active design.  We haven't talked much about
them because they aren't finished.  Please join the jdom lists and make
suggestions.

> The way namespaces are handled show a clear misunderstanding of the
> basics of XML namespaces and, unless a serious redesign is undertaken,
> it will only work for simple cases.

It doesn't represent a clear misunderstanding.  It represents an
intentional simplification.  Implementing scoped namespaces
*efficiently* is quite a challenge.  The obvious approach is to store
all the namespace information inside every Element, but that causes
tremendous memory bloat and makes it a lot harder to move elements
between documents.  We're investigating good designs.  If you have
ideas, pipe up.

> So, if the DOM is "ridiculously complex", JDOM appears to be
> ridiculously simple... Sorry, I couldn't resist. ;-)

Hey, Java can't do everything C can do either.  :-)

-jh-

P.S.  Remember, follow-ups to jdom-interest.  Let's not annoy everybody.
Received on Thursday, 27 April 2000 19:34:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:47 GMT