Page 1 of 1

Using Saxon CollectionFinder from Oxygen XML

Posted: Wed Aug 05, 2020 10:07 am
by oyvindlg
Hello,

I'm successfully running transformations using a CollectionFinder, using
ant and command line with the flag
--collection-finder-class:no.uib.saxon.ef.XlsxCollectionFinder.

When I try to run the same transformation frorth adding for the transform options in om Oxygen XML with a config
file containing

Code: Select all

<configuration xmlns="http://saxon.sf.net/ns/configuration";
    edition="EE">
    <global collectionFinder="no.uib.saxon.ef.XlsxCollectionFinder"

    />
</configuration>
I get "Content not allowed in prolog" and no error message from the
configuration.
I know the config file is used (and the class in the classpath), because I
get a warning (that the class Doesn't implement collectionUriResolver) if I
add/use the same class in the collectionUriResolver attribute in the global
element.

The Saxon version is SaxonEE 9.8.0.12 (Oxygen 21.1).

Suggestion:
I like the

Code: Select all

saxon.custom.options
property in the xspec ant build , would something similar be useful for adding ad-hoc options in Oxygen on xml-transforms for scenarios and debugging?

Best regards,
Øyvind Gjesdal

Re: Using Saxon CollectionFinder from Oxygen XML

Posted: Thu Aug 06, 2020 2:25 pm
by tavy
Hello,

You can also set in Oxygen the "saxon.custom.options" property. For this you need to edit the "Run XSpec Test" transformation scenario, select the "Parameters" tab, then edit the "saxon.custom.options" property and set the value to "-init:no.uib.saxon.ef.SimmetricsInitializer --collection-finder-class:no.uib.saxon.ef.XlsxCollectionFinder".
You need also to add the library containing the "no.uib.saxon.ef.XlsxCollectionFinder" class in the scenario. For this need to go in the scenario Options tab, click on the "Libraries" button, and add the library.

Yes, If I use the Saxon configuration file the transformation does not work. But this does not work also if I use Saxon from command line and I specify the given configuration using "-config" option. Probably it is a problem in Saxon or in the configuration file. I will reply to your email from the Saxon mailing list with this issue.

Best Regards,
Octavian

Re: Using Saxon CollectionFinder from Oxygen XML

Posted: Thu Aug 06, 2020 10:33 pm
by oyvindlg
Hi Octavian,

Thank you for the detailed explanation and following up on the Saxon configuration file. I did not think of testing the config file from command line, since I thought I needed PE or EE edition, but I see that the facility was made available already in Saxon 9.4. :)

Best regards
Øyvind

Re: Using Saxon CollectionFinder from Oxygen XML

Posted: Tue Oct 06, 2020 11:16 am
by nkutsche
Hi,

FYI: I created an issue on the Saxon issue tracker for this: https://saxonica.plan.io/issues/4784

Michael committed that the collectionFinder attribute is ignored completely from the Saxon.

(I have a similar problem, but I'm calling Saxon not directly but using the calabash for an XProc pipeline)

BR, Nico