[jdom-interest] Is JDOM dying?
Malachi de AElfweald
malachi at tremerechantry.com
Fri Mar 14 23:19:35 PST 2003
Yeah, I think that would do it -- because, from what I understand, they
are supposed to inherit from the enclosing node automatically -- which
isn't currently possible in JDOM because of the addition of the ns="".
If the Namespace.INHERIT just told it "don't do the ns=''", then all should
work as is -- I think.
I do understand why one would have specific classes always output in a
specific
namespace -- for example, a SOAP class should always use the SOAP spec,
regardless.
However, a URL that wraps itself to an 'href' could easily fit into many
namespaces --
and you don't want to have to specify at URL construction time (cuz then
you loose
the ability to pass the generic URL back and forth), and you don't want to
extend it
for every single possible use.
I think you are right about the representation... I think JDOM is more like
a
more-convenient DOM concept -- whereas I would prefer something that
reads/writes
the XML as seen in the textual representation -- after all, that is how the
tutorials
teach it, you read it, you write it, etc etc....
Malachi
On 14 Mar 2003 08:56:45 +0100, Stephan Trebels <stephan at ncube.de> wrote:
> 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
>> >
>> >
--
More information about the jdom-interest
mailing list