[jdom-interest] Is JDOM dying?

Stephan Trebels stephan at ncube.de
Thu Mar 13 23:56:45 PST 2003


I think this list has seen the different approaches in detail.  After
sympathizing with your approach initially I have to admit, I converted
to the JDOM approach for stability.  None of the approaches is right or
wrong, AFAICS.  They are just have different goals.

The current JDOM approach means, that an Element will be in the
namespace it was created in and the syntax of it will valid or invalid
if you do not modify it.  This will not change just because I add it to
a tree which suddenly could arbitrarily change the default namespace.  I
like that, even if it adds to the complexity of creating an Element. 
(Actually I always know which namespace I want for an Element, hmmm...)

In a way you want a convenience method that allows you to use JDOM like
serialized XML, while JDOM is a java representation of parsed XML.  

Would it be a workable compromise  to have a Namespace.INHERIT for an
Element as a possible namespace argument?  

I'd never use it (I hope), but it'd enable the usage patterns
described.  Then I still get the immutable Elements, and you have your
namespace inheritence should you really really need it.  The only change
I see is outputters...

Stephan

On Fri, 2003-03-14 at 06:00, Malachi de AElfweald wrote:
> Well, I am creating schemas anyways, so that I can validate the XML - which
> I never got to work with JDOM (though without JDOM it worked).
> 
> As far as the namespace stuff... it is just really annoying to have to
> add it for every single element... a lot of my applications pass Element's
> around -- and the classes handle that specific element, without any 
> namespace
> knowledge...  For example, I implemented a JFileChooser that handles remote
> filesystems (windows or unix)... They serialize the filesets, without any
> knowledge of what enclosing tags they will be embedded in.  Most of the 
> time,
> things like that are in a common routine, and the one actually 
> sending/receiving
> the XML are in an application-specific handler... As such, two or three 
> different
> classes may wrap it differently....
> 
> I am planning on writing a schema for the fileset stuff -- but right now I 
> don't have
> one.  As such, I am outputting everything without any namespaces, since 
> there is no way
> for the application-specific logic to make the decision for the common 
> routines (without
> making lots of ugly overloaded methods)...
> 
> With JAXB, I say something like getFileset() and it returns me an object 
> that handles
> it, and manages all the namespaces behind the scenes.  I set the namespaces 
> once on the
> root element and am done with it. Much more convenient.
> 
> Malachi
> 
> On Thu, 13 Mar 2003 09:51:07 -0800, Jason Hunter <jhunter at servlets.com> 
> wrote:
> 
> > Last I checked, JAXB required schemas for every document format and
> > wouldn't let you create a new document with a different schema.
> >
> > What's the problem with namespace mgmt?
> >
> > -jh-
> >
> > Malachi de AElfweald wrote:
> >>
> >> I have to say that I am honestly considering moving to JAXB.
> >> The biggest reason? Namespace management. Oh, and never having to do 
> >> detach
> >> again.
> >>
> >> Malachi
> >>
> >> On Wed, 12 Mar 2003 14:25:45 -0500, <Kevin.Bedell at sunlife.com> wrote:
> >>
> >> >
> >> >
> >> > I use it all the time as well and share Jason's concerns.
> >> >
> >> > I wouldn't consider movingback to straight DOM-or SAX-basd parsing.
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > "Jason Long"                      To: "JDOM" <jdom-interest at jdom.org>
> >> > <jason at supernovasoftware.co       cc: (bcc: Kevin
> >> > Bedell/Systems/USHO/SunLife)
> >> > m>                                Subject:  [jdom-interest] Is JDOM
> >> > dying?                                                Sent by:
> >> > jdom-interest-admin at jdom.or
> >> > g
> >> > 03/12/2003 02:26 PM
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > I have been using JDOM for some time, and I have noticed the following
> >> > problems:
> >> >
> >> > 1.  There seems to be no desire to have a new release or even talk 
> >> about
> >> > it.
> >> > 2.  There hasn't been any update to the web site in a year.
> >> > 3.  Very few messages are posted to this list.
> >> >
> >> > I enjoy using JDOM, if fact my project rely heavily on it.
> >> >
> >> >
> >> > Jason Long - CEO and Chief Software Engineer
> >> > Supernova Software - supernovasoftware.com
> >> > BS Physics, MS  Chemical Engineering
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > ----------------------------------------------------------------------- 
> >>
> >>
> >> ---
> >> >
> >> >
> >> > -
> >> > This e-mail message (including attachments, if any) is intended for 
> >> the
> >> > use
> >> > of the individual or entity to which it is addressed and may contain
> >> > information that is privileged, proprietary , confidential and exempt
> >> > from
> >> > disclosure.  If you are not the intended recipient, you are notified 
> >> that
> >> > any dissemination, distribution or copying of this communication is
> >> > strictly prohibited.  If you have received this communication in 
> >> error,
> >> > please notify the sender and erase this e-mail message immediately.
> >> > ----------------------------------------------------------------------- 
> >>
> >>
> >> ---
> >> >
> >> >
> >> > -
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > To control your jdom-interest membership:
> >> > http://lists.denveronline.net/mailman/options/jdom-
> >> > interest/youraddr at yourhost.com
> >> >
> >> >
> >>
> >> --
> >>
> >> _______________________________________________
> >> To control your jdom-interest membership:
> >> http://lists.denveronline.net/mailman/options/jdom- 
> >> interest/youraddr at yourhost.com
> >
> >
-- 
        Stephan Trebels <stephan at ncube.de>   Consultant
company: nCUBE Deutschland GmbH, Hanauer Str. 56, 80992 Munich, Germany
phone: cell:+49 172 8433111  office:+49 89 1498930  fax:+49 89 14989350





More information about the jdom-interest mailing list