opengeospatial / teamengine

TEAM Engine (Test, Evaluation, And Measurement Engine) is an engine for testing web services and other resources written in JAVA. It executes test scripts written in Compliance Test Language (CTL), TestNG and other languages. It is lightweight and easy to run as a command line or to setup as a service. It can be used to test any type of service or encoding. It is also the official tool used by the Open Geospatial Consortium (OGC) for compliance testing.
Apache License 2.0
45 stars 41 forks source link

Update Saxon library to Saxon-HE #32

Open bermud opened 10 years ago

bermud commented 10 years ago

TE is using and old saxon library Saxon-B 9.0.0.8. It should be update to use 9.2 or later.

rjmartell commented 9 years ago

This would not be a simple undertaking since TE exploits an extension mechanism in Saxon-B that changed in version 9.2. The open-source "Home" edition (HE) includes most of what was in Saxon-B, with the exception of Saxon extensions and extensibility features that now require paid licenses to use. A considerable amount of technical debt has accrued.

rjmartell commented 8 years ago

The Saxon-B 9.0 library currently used by teamengine v4 is now 7 years old (2008) and has been obsolete for many years. The current release of Saxon-HE is 9.6. Since Saxon 9.2 the "old way" of binding extension functions by mapping the namespace URI of the function name to a Java class is not available in Saxon-HE; it is this change that impedes the upgrade from 9.0. The new extension mechanism is referred to as integrated extension functions.

The immediate aim is to determine what exactly breaks and to assess what would need to be changed in order to use the extension facilities in Saxon-HE.

rjmartell commented 8 years ago

The latest Saxon-HE library is available in Maven Central:

<dependency>
    <groupId>net.sf.saxon</groupId>
    <artifactId>Saxon-HE</artifactId>
    <version>9.6.0-7</version>
</dependency>

There are 50 compilation errors reported when attempting to build the teamengine-core module. Most of these occur in the following four classes:

Created new branch: upgrade/32-saxon-he

rjmartell commented 8 years ago

The stylesheets used to generate the executable scripts make use of capabilities that are not available in the Saxon-HE edition. For example, in generate_xsl.xsl (see the teamengine-resources module) several Saxon functions are used, all of which require Saxon-PE or Saxon-EE:

There are also several reflexive calls to Java methods (java.io.File, java.net.URI classes) that are not available under Saxon-HE; these can likely be replaced by integrated extension functions.

rjmartell commented 8 years ago

Some things to note:

rjmartell commented 8 years ago

I confirmed that a reflexive method call can be replaced with an integrated extension function that implements the Saxon APIs and is then registered with the processor. For example, file:new($path) can be replaced by an integrated function, tns:new-file($path), that returns an XdmExternalObject wrapping a java.io.File object. Here's the function definition using the "simple" interface.

dstenger commented 3 years ago

I noticed that the Saxon Artifact has id org.opengis.cite.saxon:saxon9:9.0.0.8. Why does the group id contain cite? Where is the source code located? Maybe, it is exactly same artifact downloadable here? https://sourceforge.net/projects/saxon/files/Saxon-B/9.0.0.8/

keshavnangare commented 3 years ago

I have added changes for upgrading Saxon to Saxon-HE. Please find the changes in #468 PR.