Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JDOM User »

[jdom-interest] Comments on JDOM b10-rc1

Elliotte Rusty Harold

2004-02-06

Replies:

At 1:09 AM -0800 2/6/04, Jason Hunter wrote:
>Good news!
>
>After today's work I'm proud to report there are NO known API
>changes required before our 1.0 release. What we have now is my
>best effort at a 1.0 release API.
>

Any chance to get CVSWeb working so we can look at the source code easily?

Is there some reason Content is not called Node or perhaps Child? To
my way of thinking "Content" refers to a list of all the content, not
one node. This is in keeping with the XML spec which says:

[Definition: The text between the start-tag and end-tag is called the
element's content:]

Content of Elements

[43] content ::= CharData? ((element | Reference | CDSect | PI |
Comment) CharData?)*

Using words in a different sense than they're used in the XML spec is
asking for confusion.

If the equals semantics is the same for all Content subclasses (Node
identity, ==) then it could be pushed up into Content. I think it is
== for all such cases, but I'm not sure. The JavaDocs for some
classes like Comment and Attribute don't say. If it isn't the same,
then it needs to be spelled out in the JavaDoc.

Does the mapping code in processing instruction actually works on
cases like PHP processing instructions that can contain essentially
anything? Is it tested? I thought we had decided to ditch all the
pseudo-attribute parsing code.

Are all the overloaded methods in JDOMFactory really necessary? Does
the Builder actually call all of these, or could some of them be cut?

Finally, I strongly recommend using code coverage tools like Clover
or Jester or both to measure the test coverage before releasing. In
my experience this turns up a huge amount of untested code,
unreachable code, and outright bugs. It's also worth hitting the code
base with static analysis tools like PMD.

--

 Elliotte Rusty Harold
 elharo@(protected)
 Effective XML (Addison-Wesley, 2003)
 http://www.cafeconleche.org/books/effectivexml        
 http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA
_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.