[jdom-interest] How about JDOM# instead of JDOM+?

Rajendra Paul rajendra at loudeye.com
Mon Dec 18 09:34:37 PST 2000


Let us learn from MSFT.



-----Original Message-----
From: jdom-interest-request at jdom.org
[mailto:jdom-interest-request at jdom.org]
Sent: Friday, December 15, 2000 11:11 PM
To: jdom-interest at jdom.org
Subject: jdom-interest digest, Vol 1 #392 - 5 msgs


Send jdom-interest mailing list submissions to
	jdom-interest at jdom.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.denveronline.net/mailman/listinfo/jdom-interest
or, via email, send a message with subject or body 'help' to
	jdom-interest-request at jdom.org

You can reach the person managing the list at
	jdom-interest-admin at jdom.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of jdom-interest digest..."


Today's Topics:

   1. Re: Unable to load a valid xml document (Jason Hunter)
   2. Re: Announce: JDOMPlus a flexible XML framework for Java (Andy
Heninger)
   3. Re: Re: Announce: JDOMPlus a flexible XML framework for
       Java (Jason Hunter)
   4. [Fwd: [jdom-commits] CVS update: jdom/src/java/org/jdom] (Jason
Hunter)

--__--__--

Message: 1
Date: Fri, 15 Dec 2000 14:54:51 -0800
From: Jason Hunter <jhunter at collab.net>
To: kgoss at interactcommerce.com
CC: jdom-interest at jdom.org
Subject: Re: [jdom-interest] Unable to load a valid xml document

The answer is in the list archives...

-jh-

Subject: 
        RE: [jdom-interest] debugging with Visual Cafe 4.0
   Date: 
        Mon, 13 Nov 2000 12:41:57 +0100
   From: 
        ARNULFO Franck <FARNULFO at cpr.fr>
     To: 
        "'Naveen Pasumarthi'" <npasumar at hotmail.com>,
jdom-interest at jdom.org

You must disable the catching of a
java.lang.ArrayIndexOutOfBoundsException 
in your VisualCafe Debugger Configuration. 
Some parsers (xerces included) uses this exception instead of testing
the end of an array 
and IDE's debugger are configured to catch/debug this exception. 
If you look at the source on Xerces  you can see that this exception is
correctly catched. 

Franck Arnulfo 


kgoss at interactcommerce.com wrote:
> 
> I recently downloaded the JDOM source and sucessfully built the JAR files
as
> described in the ReadMe. Following this, I downloaded and referenced the
> Xerces.jar file from apache.org. Although everything compiles fine, I'm
> unable to sucessfully load a document.
> I continue to get the following error:
> main (11:41:34): Exception raised:
> "java.lang.ArrayIndexOutOfBoundsException: 8"
> main (11:41:34): You may press F5 to continue with default exception
> handling)
> VisualCafe (11:41:34): Warning:
> org\apache\xerces\utils\SymbolCache.java(201): Source File not found
> I have referenced both the JDOM and Xerces JAR files... but no luck.
> My code is as follows... and the File object does return true to its
> exists() method... any help is appreciated, thanks
> Kris
> ________________________________
> public static void main(String[] args) {
>         ScreenFlowXMLDAO test = new
> ScreenFlowXMLDAO("D;framework;webpages;xml");
> }
> 
> /**
> * Default constructor that loads XML files from the specified file path
> */
> public ScreenFlowXMLDAO(String resourcesFilePath) {
>         // this builds the documents using SAX and Xerces, no validation
>         try {
>                 DOMBuilder builder = new DOMBuilder();
>                 File f = new File("requestmappings.xml");
>                 System.out.println(f.exists());
> 
>                 // load the xml documents
>                 Document maps = builder.build(new
> File("requestmappings.xml"));
>                 Document screens = builder.build(new
> File("screendefinitions.xml"));
> 
>                 // "objectify" the xml now into hashmaps
>                 loadRequestMappings(maps.getRootElement());
>                 loadScreenDefinitions(screens.getRootElement());
>         }
>         catch (JDOMException e) {
>                 if (e.getRootCause() != null) {
>                         e.getRootCause().printStackTrace();
>                 }
>                 else {
>                         e.printStackTrace();
>                 }
>         }
>         catch (Exception e) {
>                 Debug.print(e);
>         }
> }
> 
> _______________________________________________
> To control your jdom-interest membership:
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com

--__--__--

Message: 2
Reply-To: "Andy Heninger" <heninger at us.ibm.com>
From: "Andy Heninger" <heninger at us.ibm.com>
To: <jdom-interest at jdom.org>
Date: Fri, 15 Dec 2000 16:44:22 -0800
Organization: IBM
Subject: [jdom-interest] Re: Announce: JDOMPlus a flexible XML framework for
Java

Jason Hunter wrote

> The name "JDOM", however, is protected.  As everyone can see from
> reading the LICENSE.txt file and the license text attached to the head
> of every source file, the JDOM code is licensed under an Apache-style
> license and license terms 3 and 4 protect the original project name and
> allow its use only with written permission from JDOM Project
> management.  James has not sought after or received permission to use
> the name JDOM, and thus we have asked James to select another name for
> his project that complies with the license and does not include "JDOM",
> and also to choose web site names that do not include JDOM either.

I'm sorry, but this sounds a bit like the pot calling the kettle
black.  I really think that if the name of this new JDOM-like thing
is going to contain the string "DOM" at all, that it should include
"JDOM", as it is clearly derived from and based on JDOM and has
nothing at all in common with the standard DOM.  JDOMPlus or
JDOM++ or some such strike me as being wholly appropriate.

As a quick intro, since I haven't posted here before, I work on
xerces-c at IBM, and am a member of the W3C DOM working group.
I am neither for or against JDOM or JDOMPlus, but would like to
see names chosen that avoid unnecessary confusion.

Andy Heninger
IBM XML Technology Group, Cupertino, CA
heninger at us.ibm.com



--__--__--

Message: 3
Date: Fri, 15 Dec 2000 18:21:38 -0800
From: Jason Hunter <jhunter at collab.net>
To: Andy Heninger <heninger at us.ibm.com>
CC: jdom-interest at jdom.org
Subject: Re: [jdom-interest] Re: Announce: JDOMPlus a flexible XML framework
for 
 Java

Andy Heninger wrote:
> 
> I'm sorry, but this sounds a bit like the pot calling the kettle
> black.  I really think that if the name of this new JDOM-like thing
> is going to contain the string "DOM" at all, that it should include
> "JDOM", as it is clearly derived from and based on JDOM and has
> nothing at all in common with the standard DOM.  

Any derivative with JDOM in the name violates the software license. 
It's a simple issue, and James has already changed the name.

> As a quick intro, since I haven't posted here before, I work on
> xerces-c at IBM, 

Glad to have you lurking (and now posting).  But let me point out your
own license doesn't allow a Xerces fork to contain the name Xerces.

http://xml.apache.org/websrc/cvsweb.cgi/xml-xerces/c/LICENSE.txt?rev=1.2&con
tent-type=text/vnd.viewcvs-markup

I'm sure if someone forked Xerces you'd enforce that license clause.  

-jh-

--__--__--

Message: 4
Date: Fri, 15 Dec 2000 20:44:39 -0800
From: Jason Hunter <jhunter at collab.net>
To: JDOM Interest <jdom-interest at jdom.org>
Subject: [jdom-interest] [Fwd: [jdom-commits] CVS update:
jdom/src/java/org/jdom]

This is a multi-part message in MIME format.
--------------F9D8A694BE9A19D37B2AAFEC
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

An important commit.

-jh-
--------------F9D8A694BE9A19D37B2AAFEC
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Delivered-To: jhunter at collab.net
Return-Path: jdom-commits-admin at dorothy.denveronline.net
Received: (qmail 86041 invoked from network); 16 Dec 2000 04:38:53 -0000
Received: from mail.acm.org (199.222.69.4)
  by laswell.collab.net with SMTP; 16 Dec 2000 04:38:53 -0000
Received: from dorothy.denveronline.net (dorothy.denveronline.net
[206.168.141.2])
	by mail.acm.org (8.9.3/8.9.3) with ESMTP id XAA148140
	for <jhunter at acm.org>; Fri, 15 Dec 2000 23:38:50 -0500
Received: from dorothy.denveronline.net (localhost [127.0.0.1])
	by dorothy.denveronline.net (8.9.3/8.9.3) with ESMTP id VAA02897;
	Fri, 15 Dec 2000 21:38:07 -0700 (MST)
Received: from nmemonix.com (www.nmemonix.com [195.74.128.200])
	by dorothy.denveronline.net (8.9.3/8.9.3) with SMTP id VAA02686
	for <jdom-commits at jdom.org>; Fri, 15 Dec 2000 21:30:21 -0700 (MST)
From: jhunter at cvs.jdom.org
Received: (qmail 4148 invoked by uid 514); 16 Dec 2000 04:04:44 -0000
Message-ID: <20001216040443.4147.qmail at nmemonix.com>
To: jdom-commits at jdom.org
Subject: [jdom-commits] CVS update: jdom/src/java/org/jdom
Sender: jdom-commits-admin at dorothy.denveronline.net
Errors-To: jdom-commits-admin at dorothy.denveronline.net
X-BeenThere: jdom-commits at lists.denveronline.net
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:jdom-commits-request at lists.denveronline.net?subject=help>
List-Post: <mailto:jdom-commits at lists.denveronline.net>
List-Subscribe:
<http://lists.denveronline.net/mailman/listinfo/jdom-commits>,
	
<mailto:jdom-commits-request at lists.denveronline.net?subject=subscribe>
List-Id: JDOM Mailing List for CVS Commits
<jdom-commits.lists.denveronline.net>
List-Unsubscribe:
<http://lists.denveronline.net/mailman/listinfo/jdom-commits>,
	
<mailto:jdom-commits-request at lists.denveronline.net?subject=unsubscribe>
List-Archive: <http://lists.denveronline.net/lists/jdom-commits/>
Date: 16 Dec 2000 04:04:43 -0000
X-Mozilla-Status2: 00000000


Date:	Saturday December 16, 2000 @ 4:04
Author:	jhunter

Update of /home/cvspublic/jdom/src/java/org/jdom
In directory www.nmemonix.com:/tmp/cvs-serv3455

Modified Files:
	Attribute.java CDATA.java Comment.java Document.java 
	Element.java Entity.java IllegalAddException.java 
	ProcessingInstruction.java Verifier.java 
Log Message:
Big change...

Added parentage for Attribute, Comment, Element, Entity, and PI!
They all now have getParent() methods.  All but Attribute have
getDocument() methods also (perhaps Attribute should have it too?).

The addContent() and addAttribute() methods now check parentage and
don't allow an item to be added if it's already held by another.  This
may break existing programs that use the same item in multiple places
in the tree.  That's really a good thing tho because we now avoid the
weird side effects where an item can exist in multiple places and 
changing one item value can accidentally change multiple item values.

Testing shows no noticeable speed loss.  A couple extra gets and
sets on each add aren't significant compared to the other work being 
performed.  (OptimizeIt is a great tool.)  We are eating extra bytes
to hold parentage for Attribute, Comment, Entity, and PI, but we can
make sure it's only one variable pointer by using the same object for
the containing (Element or Document) object (an optimization for later).

Note the PartialList impl does *not* yet check parentage.  I left it 
alone  because it's on the slate to be rewritten soon.  The rewrite 
will do the checking.

FWIW, I did try a test using a ThreadLocal variable set in SAXBuilder to 
say "don't bother with sanity checking parentage or XML names" (mostly to
save the time doing XML name checking cuz parentage is so fast it doesn't
even show up in the OptimizeIt list).  But turns out it took more time 
to access the ThreadLocal variable than to sanity check!  Parentage 
checking is essentially free, and XML name checking is still relatively
cheap.

Another thing, I removed the deprecated add methods leftover from beta5.  
With this new model I didn't want to mix the old model.

And I removed CDATA.setText().  I wasn't sure about adding parentage
to CDATA sections (seems weird since we don't have it for String).  And
so if we don't manage parentage it should be immutable, lest people 
get strange bugs with changing one item changing many.

I tried various approaches with a Node interface, but XML is so damn
quirky that it's hard for Node to be useful.  For example, I want to
use Node to say this.getParent().removeContent(this) to remove an element 
and have it work if the "parent" was either an elt or doc.  But the sad
news is that a document can't have a removeContent(Element) because a doc
must always have exactly one root to be well-formed.  So then Node
really shouldn't have a removeContent(Element) either, and that really
limits its generic usefulness.  Gotta think more about this.

-jh-


===================================================================
File: Attribute.java   	Status: Up-to-date

   Working revision:	1.18	Sat Dec 16 04:04:37 2000
   Repository revision:	1.18
/home/cvspublic/jdom/src/java/org/jdom/Attribute.java,v

   Existing Tags:
	start                    	(revision: 1.1.1.1)
	jdom                     	(branch: 1.1.1)

===================================================================
File: CDATA.java       	Status: Up-to-date

   Working revision:	1.4	Sat Dec 16 04:04:37 2000
   Repository revision:	1.4
/home/cvspublic/jdom/src/java/org/jdom/CDATA.java,v

   Existing Tags:
	No Tags Exist

===================================================================
File: Comment.java     	Status: Up-to-date

   Working revision:	1.10	Sat Dec 16 04:04:38 2000
   Repository revision:	1.10
/home/cvspublic/jdom/src/java/org/jdom/Comment.java,v

   Existing Tags:
	start                    	(revision: 1.1.1.1)
	jdom                     	(branch: 1.1.1)

===================================================================
File: Document.java    	Status: Up-to-date

   Working revision:	1.25	Sat Dec 16 04:04:38 2000
   Repository revision:	1.25
/home/cvspublic/jdom/src/java/org/jdom/Document.java,v

   Existing Tags:
	start                    	(revision: 1.1.1.1)
	jdom                     	(branch: 1.1.1)

===================================================================
File: Element.java     	Status: Up-to-date

   Working revision:	1.49	Sat Dec 16 04:04:39 2000
   Repository revision:	1.49
/home/cvspublic/jdom/src/java/org/jdom/Element.java,v

   Existing Tags:
	start                    	(revision: 1.1.1.1)
	jdom                     	(branch: 1.1.1)

===================================================================
File: Entity.java      	Status: Up-to-date

   Working revision:	1.8	Sat Dec 16 04:04:40 2000
   Repository revision:	1.8
/home/cvspublic/jdom/src/java/org/jdom/Entity.java,v

   Existing Tags:
	start                    	(revision: 1.1.1.1)
	jdom                     	(branch: 1.1.1)

===================================================================
File: IllegalAddException.java	Status: Up-to-date

   Working revision:	1.7	Sat Dec 16 04:04:40 2000
   Repository revision:	1.7
/home/cvspublic/jdom/src/java/org/jdom/IllegalAddException.java,v

   Existing Tags:
	start                    	(revision: 1.1.1.1)
	jdom                     	(branch: 1.1.1)

===================================================================
File: ProcessingInstruction.java	Status: Up-to-date

   Working revision:	1.8	Sat Dec 16 04:04:40 2000
   Repository revision:	1.8
/home/cvspublic/jdom/src/java/org/jdom/ProcessingInstruction.java,v

   Existing Tags:
	start                    	(revision: 1.1.1.1)
	jdom                     	(branch: 1.1.1)

===================================================================
File: Verifier.java    	Status: Up-to-date

   Working revision:	1.15	Sat Dec 16 04:04:41 2000
   Repository revision:	1.15
/home/cvspublic/jdom/src/java/org/jdom/Verifier.java,v

   Existing Tags:
	start                    	(revision: 1.1.1.1)
	jdom                     	(branch: 1.1.1)

_______________________________________________
To control your jdom-commits membership:
http://lists.denveronline.net/mailman/options/jdom-commits/youraddr@yourhost
.com


--------------F9D8A694BE9A19D37B2AAFEC--



--__--__--

_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com

End of jdom-interest Digest



More information about the jdom-interest mailing list