https://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2023-02-01T10:57:49ZSaxonica Developer CommunitySaxonC - Bug #3726: Saxon License not being picked up relative to library filehttps://saxonica.plan.io/issues/3726?journal_id=228132023-02-01T10:57:49ZO'Neil Delprattoneil@saxonica.com
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/22813/diff?detail_id=30283">diff</a>)</li></ul><p>The text on the license file location is outdated: <a href="http://saxonica.com/saxon-c/index.xml#license" class="external">http://saxonica.com/saxon-c/index.xml#license</a></p> SaxonC - Bug #3726: Saxon License not being picked up relative to library filehttps://saxonica.plan.io/issues/3726?journal_id=231072023-02-28T11:27:47ZDebbie Lockettdebbie@saxonica.com
<ul></ul><p>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 <strong>was</strong> fixed before the 1.1.2 or 1.2.0 releases.</p>
<p>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 <code>SAXONC_HOME</code>"; and "Alternatively the <code>licenseFileLocation</code> configuration property can be used to provide the license location".</p>
<p>Do we now run any tests to check that these mechanisms all work?</p> SaxonC - Bug #3726: Saxon License not being picked up relative to library filehttps://saxonica.plan.io/issues/3726?journal_id=231082023-02-28T11:39:32ZDebbie Lockettdebbie@saxonica.com
<ul></ul><p>Comparing to the main Saxon documentation (<a href="https://www.saxonica.com/documentation12/index.html#!about/license/licensekey" class="external">https://www.saxonica.com/documentation12/index.html#!about/license/licensekey</a>), I suggest that we update the SaxonC documentation at <a href="https://www.saxonica.com/saxon-c/documentation12/index.html#!starting/licensing" class="external">https://www.saxonica.com/saxon-c/documentation12/index.html#!starting/licensing</a> as follows:</p>
<p><strong>Location of the Saxon license file</strong></p>
<p>SaxonC will search for the license key in the following locations:</p>
<ol>
<li>
<p>If you supply a Saxon configuration file, the location given in the <code>licenseFileLocation</code> attribute of the outermost configuration element in this file.</p>
</li>
<li>
<p>The location specified using the configuration property <code>licenseFileLocation</code>.</p>
</li>
</ol>
<p>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.</p>
<p>See <a href="/configuration">Configuration</a> for more details about setting configuration properties with SaxonC. For example, to provide the licenseFileLocation in PHP:</p>
<pre><code class="php syntaxhl" data-language="php"><span class="nv">$saxonProc</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Saxon\SaxonProcessor</span><span class="p">(</span><span class="kc">true</span><span class="p">);</span>
<span class="nv">$saxonProc</span><span class="o">-></span><span class="nf">setConfigurationProperty</span><span class="p">(</span><span class="s2">"http://saxon.sf.net/feature/licenseFileLocation"</span><span class="p">,</span> <span class="s2">"/usr/lib/saxon-license.lic"</span><span class="p">);</span>
</code></pre>
<ol start="3">
<li>The directory where the main SaxonC library has been installed.</li>
</ol>
<p>For example on Linux, in <code>/usr/lib</code> if this is where <code>libsaxon-[EDITION]c-[VERSION].so</code> has been installed.</p>
<ol start="4">
<li>The directory identified by the environment variable <code>SAXONC_HOME</code>.</li>
</ol> SaxonC - Bug #3726: Saxon License not being picked up relative to library filehttps://saxonica.plan.io/issues/3726?journal_id=231752023-03-07T17:22:41ZDebbie Lockettdebbie@saxonica.com
<ul></ul><p>SaxonC documentation update (in section starting/licensing, as suggested in <a href="#note-3">#note-3</a>) committed on <code>saxon12</code> and <code>main</code> branches. The online SaxonC 12 documentation will be updated with the next maintenance release.</p>
<p>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.</p>
<p>The "License" section on the SaxonC webpage (<a href="https://www.saxonica.com/saxon-c/index.xml#license" class="external">https://www.saxonica.com/saxon-c/index.xml#license</a>) has also been updated and corrected to match this information in the documentation.</p>