Menu

com.sun.xml.tree dependency

2001-10-31
2001-10-31
  • Eric Friedman

    Eric Friedman - 2001-10-31

    A number of classes in grok depend on the com.sun.xml.tree package.  My understanding is that this package is an implementation of the DOM API.  As such, it should be possible to program against the DOM APIs, leaving the choice of DOM implementation up to the user (I would prefer to use xerces, for instance).

    Is anyone aware of any hard assumptions that the implementation of DOM is Sun's?  May I undertake the work to make this an interface-only dependency?

     
    • Gann Bierner

      Gann Bierner - 2001-10-31

      That would be fine with me.  I don't recall making any specific use of the Sun implementation.  The truthful answer is that when I wrote that code I didn't know much about XML and java implementations.

      A more general approach would be welcome as long as, by default, it doesn't require any special configuration.

      Jason?

       
    • Jason Baldridge

      Jason Baldridge - 2001-10-31

      Actually, Joao is now working on getting rid of the com.sun.xml stuff from the opennlp.common package, and then he was going to move on to Grok after that.  If you don't mind waiting, it will come along soon enough, but if you need to have this changed over now, go ahead!

       
      • Eric Friedman

        Eric Friedman - 2001-10-31

        Is he moving over to jaxp?  I tried a naive search and replace and it worked for almost all cases except the ones where you use XmlDocument to *create* Document instances.  For that we'd need to go to jaxp to hide the vendor-specifics for DOM parsing.

         
        • Jason Baldridge

          Jason Baldridge - 2001-10-31

          We're moving things over to JDOM. I've already started using JDOM in Grok and OpenNLP, and have been quite happy with it.  So, actually, a lot of the code will change as to how we traverse around XML documents, using the Java-centric methods of JDOM.  If you want to do a quick fix that gets rid of the com.sun.xml dependency for the time being, though, that would be fine --- and, in fact, quite welcome!

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.