Saxonica Developer Community: Issueshttps://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2022-08-08T08:42:54ZSaxonica Developer Community
Planio SaxonC - Feature #5638 (New): Support extension functions in Pythonhttps://saxonica.plan.io/issues/56382022-08-08T08:42:54ZPeter Jan
<p>Hi!</p>
<p>As written on <a href="https://www.saxonica.com/saxon-c/documentation11/index.html#!extensibility" class="external">https://www.saxonica.com/saxon-c/documentation11/index.html#!extensibility</a>:
"It is not currently possible to write extension functions in Python."</p>
<p>I would very much like to register custom functions in Python, as can be done with PHP already. I would prefer to use the PHP language, however I'm on PHP 8.1 which is not supported (yet).</p> SaxonC - Bug #5621 (New): C++ build-windows.bat gives warning "SaxonProcessor.obj : warning LNK40...https://saxonica.plan.io/issues/56212022-07-28T18:13:26ZMartin Honnenmartin.honnen@gmx.de
<p>The build bat file for Windows HEC 11.4 still needs some improvement, for all samples it outputs a warning</p>
<blockquote>
<p>C++ build-windows.bat gives warning "SaxonProcessor.obj : warning LNK4042: object specified more than once; extras ignored</p>
</blockquote>
<p>so somewhere SaxonProcessor.c is duplicated in the commands.</p> SaxonC - Bug #5562 (New): strange error when calling transform_to_file in a loophttps://saxonica.plan.io/issues/55622022-06-11T18:00:56ZLou Burnard
<p>I need to run a sequence of transforms, one after another, each one operating on the output of the preceding one. Here's the code I am currently trying:</p>
<pre><code>with saxonc.PySaxonProcessor(license=False) as proc:
print(proc.version)
# Initialize the XSLT 3.0. processor
xsltproc = proc.new_xslt30_processor()
for i in (0,1,2,3,4) :
print(i)
SCRIPT=scriptRoot+"pt"+str(i)+".xsl"
TEMP=tempRoot+"temp-"+str(i+1)+".xml"
print("Running "+SCRIPT+" on "+FILE+" producing "+TEMP)
xsltproc.transform_to_file(source_file=FILE, stylesheet_file=SCRIPT, output_file=TEMP)
FILE=TEMP
</code></pre>
<p>First time round the loop this behaves as expected. But then I get an I/O error on the output file I am trying to create?!</p>
<pre><code>SaxonC-HE 11.3 from Saxonica
0
Running /home/lou/Public/pdf2tei/pt0.xsl on /home/lou/Desktop/LacyWork/outgoing/0101Time/temp.xml
producing /home/lou/Desktop/LacyWork/outgoing/0101Time/temp/temp-1.xml
1
Running /home/lou/Public/pdf2tei/pt1.xsl on /home/lou/Desktop/LacyWork/outgoing/0101Time/temp/temp-1.xml
producing /home/lou/Desktop/LacyWork/outgoing/0101Time/temp/temp-2.xml
Error
I/O error reported by XML parser processing
/home/lou/Desktop/LacyWork/outgoing/0101Time/temp/temp-2.xml: No such file or directory.
Caused by java.io.FileNotFoundException: No such file or directory
</code></pre> SaxonC - Bug #5561 (New): misleading error message on failure to find external DTDhttps://saxonica.plan.io/issues/55612022-06-11T17:08:01ZLou Burnard
<p>If the source file being transformed by a stylesheet contains a DOCTYPE statement which references a non-existent file, an I/O error is raised. That's fine, but the diagnostic message suggests that it's the source file which doesn't exist, rather than a file it references.</p>
<pre><code>SaxonC-HE 11.3 from Saxonica
source in transformFiletoString=/home/lou/Desktop/LacyWork/outgoing/0101Time/temp.xml
stylsheet=/home/lou/Public/pdf2tei/pt0.xsl
Error
I/O error reported by XML parser processing
/home/lou/Desktop/LacyWork/outgoing/0101Time/temp.xml: No such file or directory. Caused
by java.io.FileNotFoundException: No such file or directory
</code></pre>
<p>Simply doing <code>touch [dtdFilename]</code> makes this error go away.</p>
<p>Here for comparison is the message provided if the source file really doesn't exist</p>
<pre><code>SaxonC-HE 11.3 from Saxonica
source in transformFiletoString=/home/lou/Desktop/LacyWork/outgoing/0101Time/tump.xml
stylsheet=/home/lou/Public/pdf2tei/pt0.xsl
Error
I/O error reported by XML parser processing
/home/lou/Desktop/LacyWork/outgoing/0101Time/tump.xml: No such file or directory. Caused
by java.io.FileNotFoundException: No such file or directory
</code></pre>
<p>Can you see any difference? Me neither.</p> SaxonC - Bug #5344 (In Progress): java.lang.UnsatisfiedLinkError: Can't load library: /C:/Progra...https://saxonica.plan.io/issues/53442022-02-21T23:01:47ZO'Neil Delprattoneil@saxonica.com
<p>Reported by user in the forum post: <a href="https://saxonica.plan.io/boards/4/topics/8562" class="external">https://saxonica.plan.io/boards/4/topics/8562</a></p>
<p>Writing an extension function on Windows C++ and PHP currently fails with the following error message:</p>
<pre><code> java.lang.UnsatisfiedLinkError: Can't load library: /C:/Program Files/Saxonica/SaxonC EE 11.2/samples/cppTests/cppExtensionFunction.dll
</code></pre>
<p>The failure is in the Java code. We incorrectly create a leading slash: We are failing resolve the file path. Specifically the cwd is not currently been passed and we fail the fallback of using the SAXONC_HOME environment variable.</p> SaxonC - Bug #4665 (New): Limitation of command-line options not indicated in documentationhttps://saxonica.plan.io/issues/46652020-08-03T10:57:32ZO'Neil Delprattoneil@saxonica.com
<p>There general statement mentioned in the section about <a href="http://www.saxonica.com/saxon-c/documentation/index.html#!starting/running" class="external">command-line interface</a>: “The same command line options as in the Java products are available in the Saxon/C command line tool. Please see the relevant sections of the Saxon 9.9 documentation for details:”</p>
<p>Perhaps it could go in the Limitations section here? <a href="http://www.saxonica.com/saxon-c/documentation/index.html#!technical" class="external">http://www.saxonica.com/saxon-c/documentation/index.html#!technical</a></p> SaxonC - Bug #4609 (New): Lack of documentation to package Saxon/C C++ in third-party systemshttps://saxonica.plan.io/issues/46092020-06-22T12:00:52ZO'Neil Delprattoneil@saxonica.com
<p>This bug is created as a result of a user enquiry.</p>
<p>There seems to be a lack of documentation on how to package Saxon/C C++ API in a third-party system. There needs to be a clear guide to say what needs building in advance to create the required executable files for another system within the C++ environment (i.e. modules/dlls/components for Saxon/C runtime?)</p> SaxonC - Bug #4477 (New): Extension function code should be removed Saxon-HE/Chttps://saxonica.plan.io/issues/44772020-03-10T11:48:56ZO'Neil Delprattoneil@saxonica.com
<p>As a result of the following stackover flow question:
<a href="https://stackoverflow.com/questions/60613404/saxon-c-centos8-compile" class="external">saxon-c-centos8-compile</a></p>
<p>It is clear the Saxon-He/C code base should not have code for the extension function feature.
Should only be available in Saxon-PE/C and Saxon-EE/C.</p>
<p>Also when the compile flag <code>-Werror=sizeof-pointer-div</code> is used we get the following error:</p>
<pre><code>../../Saxon.C.API/SaxonProcessor.h:599:32: error: division ‘sizeof (JNINativeMethod*) / sizeof (JNINativeMethod)’
does not compute the number of array
elements [-Werror=sizeof-pointer-div] gMethods, sizeof(gMethods) / sizeof(gMethods[0]));
</code></pre> SaxonC - Bug #4312 (New): XDM_NODE_KIND enumeration type not available in PHPhttps://saxonica.plan.io/issues/43122019-09-13T10:08:25ZO'Neil Delprattoneil@saxonica.com
<p>It would be good to have XDM_NODE_KIND enumeration type available in the Saxon/C PHP extension.</p>
<p>This would be similar to what we have in the C++ API.</p> SaxonC - Bug #4178 (In Progress): License file not found with symbolic linkshttps://saxonica.plan.io/issues/41782019-03-25T10:48:28ZO'Neil Delprattoneil@saxonica.com
<p>Reported by user:</p>
<p>There's a bit of inconsistency over how co-locating the licence file and libsaxoneec.so works when used with softlinks.</p>
<p>Soft linking libraries is pretty typical in /usr/lib so I think Saxon should support this.</p>
<p>If I have the below setup in /usr/lib it doesn't work:</p>
<p>lrwxrwxrwx 1 root root 43 Mar 21 22:27 /usr/lib/libsaxoneec.so -> /opt/Saxonica/Saxon-EEC1.1.2/libsaxoneec.so<br>
lrwxrwxrwx 1 root root 31 Oct 16 14:53 /usr/lib/saxon-license.lic -> /opt/Saxonica/saxon-license.lic</p>
<p>Guessing that the softlink for libsaxoneec.so is resolved to it's real path I tried putting saxon-licence.lic in the same directory, but it doesn't work either:</p>
<p>/opt/Saxonica/Saxon-EEC1.1.2/</p>
<p>Some sort of resolving required.</p> SaxonC - Bug #3726 (New): Saxon License not being picked up relative to library filehttps://saxonica.plan.io/issues/37262018-03-26T15:48:57ZO'Neil Delprattoneil@saxonica.com
<p>According to the documentation:</p>
<p><a href="http://saxonica.com/saxon-c/index.xml#license" class="external">http://saxonica.com/saxon-c/index.xml#license</a></p>
<pre><code>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.
</code></pre>
<p>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.</p> SaxonC - Feature #3705 (In Progress): Build PHP extension of Saxon for Windowshttps://saxonica.plan.io/issues/37052018-02-28T14:45:56ZO'Neil Delprattoneil@saxonica.com
<p>Reported here: <a href="https://stackoverflow.com/questions/49010431/build-php-extension-of-saxon-for-windows" class="external">https://stackoverflow.com/questions/49010431/build-php-extension-of-saxon-for-windows</a></p>
<p>Bug issue created to track the progress of building a PHP extension for Saxon/C 1.1.0 on windows.</p> SaxonC - Support #2136 (In Progress): php_saxon.dll on WAMPhttps://saxonica.plan.io/issues/21362014-08-26T15:02:11ZMark Forstermark@loadsbetter.com
<p>Hi,</p>
<p>This is my first support issue so I'll try to do it properly but I may get things muddle up a bit.</p>
<p>I've developed a lot with XSLT 1.0 and I've started developing with Saxon CE to learn more about XSLT 2.0 and now I want to do more, like schema-aware processing.</p>
<p>I've tried to get Saxon HE to work on WAMP server 2.4. I think I've done everything correctly but I get this error that appears in the Apache error log.</p>
<p>c:/wamp/bin/php/php5.4.12/ext/php_saxon.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0</p>
<p>I've tried to search for an answer but I haven't found anything that helps.</p>
<p>I'm not particularly expert at WAMP. I've installed it so I can develop with PHP on my Windows PC, which has Windows 7 Home Premium Service Pack 1 64-bit operating system.</p>
<p>Many thanks for any help you can give me.</p>
<p>Mark</p> SaxonC - Support #1962 (New): Saxon/C and pkg-confighttps://saxonica.plan.io/issues/19622013-12-16T10:41:57ZO'Neil Delprattoneil@saxonica.com
<p>Reported by Tony Graham:</p>
<blockquote>
<p>From the 'pkg-config' page at [1]:</p>
</blockquote>
<p>pkg-config is a helper tool used when compiling applications</p>
<p>and libraries.</p>
<p>See also "Guide to pkg-config" at [2].</p>
<p>If Saxon/C is to play nicely with other Linux, etc., packages, you may</p>
<p>want to look at producing a 'pkg-config' file to make it easier for people</p>
<p>building the other packages -- particularly but not limited to people</p>
<p>building using Autotools -- to find how to refer to Saxon/C when compiling</p>
<p>and linking.</p>
<p>Here's what I've been faking as 'saxon-c.pc':</p>
<hr>
<pre><code>prefix=/usr/local/src/saxon-c/Saxonica/Saxon-HEC0.1
exec_prefix=${prefix}
libdir=${exec_prefix}
pkgincludedir=${prefix}/Saxon-C-API
Name: Saxon/C
Description: Saxon/C
Version: 0.1
Libs: -L${libdir} -lsaxon
Cflags: -I${pkgincludedir} -I/usr/lib/jvm/java-6-openjdk-amd64/include
</code></pre>
<hr>
<p>and here's what I've put in 'configure.ac' for xmlroff:</p>
<hr>
<pre><code>#
# Checks for Saxon/C
#
SAXON_C_PACKAGES=saxon-c
SAXON_C_REQUIRED_VERSION=0.1
AH_TEMPLATE([ENABLE_SAXON_C],
[Enable support for Saxon/C XSLT 2.0 processor.])
AC_ARG_ENABLE(saxon_c,
AC_HELP_STRING([--enable-saxon-c],
[build Saxon/C XSLT processor capability (default=yes)]),
enable_saxon_c_arg="$enableval",
enable_saxon_c_arg=yes)
if test "x$enable_saxon_c_arg" != "xyes" ; then
enable_saxon_c_arg=no
fi
enable_saxon_c=false
SAXON_C_REQUIRES=""
have_saxon_c=false
if test "x$enable_saxon_c_arg" = "xyes" ; then
#
# Check for Saxon/C support requirement
#
have_saxon_c=false
PKG_CHECK_MODULES(SAXON_C,
$SAXON_C_PACKAGES >= $SAXON_C_REQUIRED_VERSION,
have_saxon_c=true,
if $have_saxon_c; then
enable_saxon_c=true
AC_DEFINE(ENABLE_SAXON_C,1)
else
AC_DEFINE(ENABLE_SAXON_C,0)
SAXON_C_LIBS=""
SAXON_C_CFLAGS=""
fi
fi
AC_SUBST(SAXON_C_ENABLED, [$enable_saxon_c])
AC_SUBST(SAXON_C_REQUIRES)
AC_SUBST(SAXON_C_LIBS)
AC_SUBST(SAXON_C_CFLAGS)
AC_SUBST(ENABLE_SAXON_C, [$enable_saxon_c])
AM_CONDITIONAL(ENABLE_SAXON_C, [$enable_saxon_c])
</code></pre>
<hr>
<p>Tony Graham <a href="mailto:tgraham@mentea.net" class="email">tgraham@mentea.net</a></p>
<p>Consultant <a href="http://www.mentea.net" class="external">http://www.mentea.net</a></p>
<p>Mentea 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland</p>
<hr>
<pre><code>XML, XSL-FO and XSLT consulting, training and programming
Chair, Print and Page Layout Community Group @ W3C
</code></pre>
<p>[1] <a href="http://www.freedesktop.org/wiki/Software/pkg-config/" class="external">http://www.freedesktop.org/wiki/Software/pkg-config/</a></p>
<p>[2] <a href="http://people.freedesktop.org/~dbn/pkg-config-guide.html" class="external">http://people.freedesktop.org/~dbn/pkg-config-guide.html</a></p> SaxonC - Support #1960 (In Progress): PHP Windows builds required for the different compiler vers...https://saxonica.plan.io/issues/19602013-12-16T09:26:00ZO'Neil Delprattoneil@saxonica.com
<p>Bug reported by Vasil Rangelov,</p>
<p>I've tried all of the combos with this DDL, and sadly, it's only</p>
<p>useful for PHP 5.4.* TS VC9 x86 builds, and nothing else (that is,</p>
<p>other combos don't even register at phpinfo()).</p>
<p>The necessary binaries for addressing all common Windows PHP setups would be:</p>
<p>PHP 5.4 TS VC9</p>
<p>PHP 5.4 NTS VC9</p>
<p>PHP 5.5 TS VC11</p>
<p>PHP 5.5 NTS VC11</p>
<p>(all x86)</p>
<p>I also tested PHP 5.3 (N)TS VC9 x86, and that too doesn't work. While</p>
<p>I see no reason not to also make PHP 5.3 VC9 (N)TS binaries, the PHP</p>
<p>5.3 is now in "security fixes only" mode, soon to be completely</p>
<p>EOL-ed, so IMHO, it's OK to not have it... it would hopefully</p>
<p>encourage more people to upgrade.</p>