db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2739) Use DOM interfaces to implement XML operators
Date Fri, 18 Feb 2011 15:34:38 GMT

     [ https://issues.apache.org/jira/browse/DERBY-2739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Knut Anders Hatlen updated DERBY-2739:

    Attachment: xml-interfaces-3.diff

Uploading version 3 of the patch, with these minor changes:

1) Removed some debug code that I'd forgotten in the test framework.

2) Improved the checking of XPath requirements by using DOMImplementation.getFeature() instead
of DOMImplementation.hasFeature(). The problem solved by this change is when a recent and
fully capable Xalan is on the classpath with a Java 1.4.2 implementation, but not in an endorsed
directory. In that case, the Xalan implementation satisfies the requirements, but the interfaces
don't (because xml-apis.jar doesn't override the old interfaces that come with the JVM unless
it's in an endorsed directory).

Since hasFeature() is a DOM Level 2 method available in Java 1.4.2, whereas getFeature() is
DOM Level 3, we could have the situation where hasFeature() exists and says that XPath level
3 is supported by the implementation (which is true), but when we try to use it by calling
getFeature(), we get a NoSuchMethodError because the interface is too old.

By using the getFeature() method to check the level of support, we'll detect this lack of
supporting interfaces earlier so that we don't attempt to call methods that don't exist on
the platform.

> Use DOM interfaces to implement XML operators
> ---------------------------------------------
>                 Key: DERBY-2739
>                 URL: https://issues.apache.org/jira/browse/DERBY-2739
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: infinity-NaN.diff, ns-npe.diff, numeric-tests.diff, stricter-assertions.diff,
xml-interfaces-2.diff, xml-interfaces-3.diff, xml-interfaces.diff
> Sun's Java 1.5.0 and higher includes Xalan, but Derby doesn't find it because it has
been moved to a non-standard package. Derby should be able to detect and use these classes
if it cannot find Xalan in the standard package on the classpath. This would make it easier
for many users to start using Derby's XML features.
> See also the discussion in this thread: <URL:http://mail-archives.apache.org/mod_mbox/db-derby-dev/200705.mbox/%3c465F015C.9070404@gmail.com%3e>

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message