Re: Trouble using libxmlj in GNUJAXP classpath 0.90

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Herve" == Herve Chang <Herve.Chang@xxxxxxxx> writes:

Herve> So, as I want to use DOM/XML in classpath, I'd like to have your
Herve> comments/feedbacks about:

Herve> - Is the use of libxmlj mandatory? (according to my comments below,
Herve>   seems to be yes)

I don't think it is.  See below.

Herve> AFAIU, The DOM Boostrapping fallback class
Herve> gnu.xml.dom.ImplementationSource loads
Herve> gnu.xml.libxmlj.dom.GnomeDocumentBuilder which contains the
Herve> following static code:

Note the code in ImplementationSource:

    try
      {
        Class t = Class.forName("gnu.xml.libxmlj.dom.GnomeDocumentBuilder");
        acc.add(t.newInstance());
      }
    catch (Exception e)
      {
        // libxmlj not available        
      }
    catch (UnsatisfiedLinkError e)
      {
        // libxmlj not available
      }

In particular catching UnsatisfiedLinkError should guarantee that if
libxmlj is not found, then we can still proceed.

This definitely isn't ideal (IMO) but it seems like it ought to work
ok.

Tom


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux