Bug #3726
openSaxon License not being picked up relative to library file
0%
Description
According to the documentation:
http://saxonica.com/saxon-c/index.xml#license
Location of the Saxon license file for commercial products: Saxon/C looks in the path relative to where the main library has been installed. For example, in '/usr/lib', if this is where libsaxon[EDITION]c.so has been installed. Alternatively, Saxon also looks for the license according to the environment variable SAXONC_HOME, if this has been set.
After inspecting the code it seems to me that the license Verify class does not look in the directory relative to the main library. Therefore the license file can only be picked up either by the setting of the SAXONC_HOME environment variable or by placing the license file relative to the XSLT stylesheet.
Updated by O'Neil Delpratt almost 2 years ago
- Description updated (diff)
The text on the license file location is outdated: http://saxonica.com/saxon-c/index.xml#license
Updated by Debbie Lockett over 1 year ago
This bug was originally raised 5 years ago against Saxon/C 1.1. There were two public releases in this series: 1.1.0 on 2017-09-27, and 1.1.2 on 2019-02-21. The next release was the next major release 1.2.0 on 2019-10-16. I don't know where to look in the source code to see if this bug with the Verifier was fixed before the 1.1.2 or 1.2.0 releases.
Since 1.2, in the SaxonC documentation (as opposed to the "License" section of the saxon-c/index.xml webpage which has indeed been neglected, so it is no longer consistent with the documentation) we document that SaxonC looks for the license key: "in the path relative to where the main library has been installed"; "according to the environment variable SAXONC_HOME
"; and "Alternatively the licenseFileLocation
configuration property can be used to provide the license location".
Do we now run any tests to check that these mechanisms all work?
Updated by Debbie Lockett over 1 year ago
Comparing to the main Saxon documentation (https://www.saxonica.com/documentation12/index.html#!about/license/licensekey), I suggest that we update the SaxonC documentation at https://www.saxonica.com/saxon-c/documentation12/index.html#!starting/licensing as follows:
Location of the Saxon license file
SaxonC will search for the license key in the following locations:
-
If you supply a Saxon configuration file, the location given in the
licenseFileLocation
attribute of the outermost configuration element in this file. -
The location specified using the configuration property
licenseFileLocation
.
When this configuration property is set, Saxon will immediately attempt to load the specified file, avoiding any subsequent attempt to search for it on the classpath and elsewhere.
See Configuration for more details about setting configuration properties with SaxonC. For example, to provide the licenseFileLocation in PHP:
$saxonProc = new Saxon\SaxonProcessor(true);
$saxonProc->setConfigurationProperty("http://saxon.sf.net/feature/licenseFileLocation", "/usr/lib/saxon-license.lic");
- The directory where the main SaxonC library has been installed.
For example on Linux, in /usr/lib
if this is where libsaxon-[EDITION]c-[VERSION].so
has been installed.
- The directory identified by the environment variable
SAXONC_HOME
.
Updated by Debbie Lockett over 1 year ago
SaxonC documentation update (in section starting/licensing, as suggested in #note-3) committed on saxon12
and main
branches. The online SaxonC 12 documentation will be updated with the next maintenance release.
I have also added details relevant for SaxonC in the main Saxon documentation section about finding the license key (about/license/licensekey). Again, this Saxon 12 documentation will be updated online with the next maintenance release.
The "License" section on the SaxonC webpage (https://www.saxonica.com/saxon-c/index.xml#license) has also been updated and corrected to match this information in the documentation.
Updated by O'Neil Delpratt 6 months ago
- Assignee changed from O'Neil Delpratt to Matt Patterson
Updated by Matt Patterson 5 months ago
I added more explicit instructions to the README.md in the pypi folder, which tackles part of this. The SaxonC/Python documentation on Saxonica.com should probably be updated to reflect that too.
Please register to edit this issue