[jsword-devel] Streamlining of Commons

DM Smith dmsmith555 at yahoo.com
Wed Sep 22 10:23:22 MST 2004


Here is a BugParade report of the problem Joe mentioned:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4952331

There were reports of other re-parenting problems.

In some cases the recommendation was to not use crimson, but xerces instead.

DM Smith wrote:

> Thanks for the input. I am always looking ahead, and for ways to 
> simplify and reduce.
>
> I took a look at jdk1.4 and it is using crimson, which is an old, old 
> implementation. I seem to remember it in JDK1.3.
> JDK 1.5 will be using Xerces 2.6.2.
>
> My guess (w/o testing) is that crimson has the problems, even though 
> the code has what looks like an implementation of importNode().
>
> According to JDom is that it is lightweight (wrt core) compared to 
> other DOM implementations.
>
> I have upgraded to JDom 1.0, tested it (looks ok) and checked it in. I 
> think we will be w/ it for a while. At least through JSword 1.0.
>
> Troy A. Griffitts wrote:
>
>> Joe and co.,
>>     If your parser claims to be DOM Level 2 compliant it needs to 
>> support Node::importNode for doing this.  Many parsers, a few years 
>> back, were not level 2 compliant.  Here is an example of code that 
>> will fail on these parsers (and is exactly what I think Joe wants to 
>> do by moving nodes between trees).
>>
>> Node newNode = tree2Node.getOwnerDocument().importNode(tree1Node, true);
>> tree2Node.appendChild(newNode);
>>
>>     Hope this helps and isn't totally off the wall.
>>
>>         -Troy.
>>
>>
>>
>> Joe Walker wrote:
>>
>>> We used to use DOM for parsing most things but there was a major flaw
>>> - it was not possible to move nodes from one tree to another which is
>>> easy with JDOM. I would be hesitant about ditching JDOM without us
>>> knowing that this problem is fixed.
>>>
>>> Joe.
>>>
>>> On Tue, 21 Sep 2004 13:28:27 -0400, DM Smith <dmsmith555 at yahoo.com> 
>>> wrote:
>>>
>>>> I have streamlined JSword by eliminating the dependency upon apache
>>>> commons and log4j. I also finished the elimination of winlaf (it was
>>>> still in the build and the jnlp file).
>>>>
>>>> Turns out our use of commons was fairly trivial and in most cases
>>>> represented a capability that is now present in Java 1.4.
>>>> I did add a few methods to StringUtil and to ClassUtil. And I replace
>>>> the for Enums with the same Type Safe Enumeration I had created 
>>>> elsewhere.
>>>>
>>>> These jars total about 550K. Net result is that BibleDesktop is under
>>>> 1.8M (it wen up to about 2.3 when lucene was added)
>>>>
>>>> The only other jar that commons depends upon is jdom and it is 
>>>> about 150K.
>>>>
>>>> WRT using commons.jar with FlashCard, the changes that have been done
>>>> mean that it will not need jdom.jar.
>>>>
>>>> I am wondering how it differs from the built-in dom that's in Java 
>>>> 1.4.
>>>> Does it add value over that?
>>>>
>>>> I have used Java 1.4's DOM to do the same kind of thing that JDom is
>>>> being used for.
>>>>
>>>> I am in the process of checking in the changes now.
>>>>
>
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel
>



More information about the jsword-devel mailing list