Questions tagged [saxon-c]

For questions relating to the Saxon/C product - a variant of Saxonica's XSLT and XQuery processor designed to be used from C, C++, PHP, or Python applications. Use the tag for both the open source (HE) and commercial (PE, EE) editions of the product.

You can find SaxonC 11.4, the latest stable release as of January 2023, at https://www.saxonica.com/download/c.xml, the documentation, as far as installing SaxonC and using its C/C++ or Python or PHP APIs is concerned, is at https://www.saxonica.com/saxon-c/documentation11/index.html#!starting, otherwise, for XSLT, XPath, XQuery reference the normal Saxon 11 documentation at https://www.saxonica.com/html/documentation11/about/index.html helps.

However, on January 13th, 2023, SaxonC 12.0 was released, reengineered to no longer rely on the defunct ExcelsiorJET but built using GraalVM instead. It continues to provide a C/C++, PHP and Python API, the Saxonica product is downloadable from https://www.saxonica.com/download/c.xml and documented at https://www.saxonica.com/saxon-c/documentation12/index.html, with the various APIs at https://www.saxonica.com/saxon-c/documentation12/index.html#!api/saxon_c_cpp_api and https://www.saxonica.com/saxon-c/documentation12/index.html#!api/saxon_c_php_api and https://www.saxonica.com/saxon-c/documentation12/index.html#!api/saxon_c_python_api, respectively.

Furthermore, for Python all three editions of SaxonC 12, i.e. HE, PE, and EE, are now also available on PyPi for easy installation with pip e.g. python3 -m pip install saxonche, python3 -m pip install saxoncpe or python3 -m pip install saxoncee, respectively.

The previous release is Saxon-C 1.2.1, based on Saxon Java 9.9, is available at https://www.saxonica.com/saxon-c/index.xml#archive and documented at https://www.saxonica.com/saxon-c/documentation1.2/index.html.

The Saxonica SaxonC bug tracker is at https://saxonica.plan.io/projects/saxon-c/issues, the Saxonica SaxonC forum at https://saxonica.plan.io/projects/saxon-c/boards.

33 questions
7
votes
2 answers

Making saxon-c available in Python

I have just read that Saxon is now available for Python, and that's just great fun and good, but can anyone write a tutorial on how to make it available for Python/Anaconda/WingIDE or similar? I am used to installing with pip or conda, and pointing…
Zug_Bug
  • 186
  • 10
3
votes
2 answers

Using conditional includes/static parameters in Saxon/C?

I'm trying to use XSLT conditional includes/static parameters with Saxon/C HE, but I'm getting the following error: Error Parameter $some_param cannot be supplied dynamically because it is declared as static To reproduce, I've used an example…
Daniel Haley
  • 51,389
  • 6
  • 69
  • 95
2
votes
1 answer

XSLT transformation using a xdm_node returns an error - Using Saxon-HE 9.9.1.5C with Python 3.9

I have a problem with Saxon HE in Python. When I parse a XML file I get as return a type PyXdmNode. After that I want to do an XSLT transformation and use the method transform_to_value(xdm_node= ... ). When I do this, I get the following…
Görgen
  • 77
  • 5
1
vote
2 answers

How to use the collection()-function with saxonche

I am trying to use the collection()-function using the new saxonche-Python-Module (https://pypi.org/project/saxonche/). I would expect, that it returns all XML-documents inside the current directory. Instead it just returns None. My code looks…
B Polit
  • 162
  • 8
1
vote
1 answer

Saxon/C HE 11.2 prints empty output when XSLT has an include or using "xsl::result-document"

When i change the xsl:include to xsl:import it somehow works and doesnt return an empty file. I am using the Xslt30Processor class and function Xslt30Processor::TransformFiletoFile(), even The transform.c doesnt work. When my xslt has a…
1
vote
0 answers

Install saxon-c on linux

I don’t understand the installation of saxon/c: https://www.saxonica.com/saxon-c/documentation/index.html#!starting/installing/installingLinux When I unzip libsaxon-HEC-setup64-v1.2.1.zip on my raspberry pi and execute the…
1
vote
0 answers

How to prevent Saxon/C Python bindings from trying to start a new java VM when another is active? (JNI_CreateJavaVM() failed with result: -5)

I am building a flask api that allows users to pass an xml and a transformation that returns the xml on which the transformation is performed using Saxon/C's python API (https://www.saxonica.com/saxon-c/doc/html/saxonc.html). The incoming endpoint…
Korfoo
  • 571
  • 2
  • 12
1
vote
0 answers

Can Python run XSLT-2.0 transforms *and* call extension functions written in Python?

I developed a set of XSLT-2.0 XML-to-XML transforms with Oxygen that include some simple xsl:functions. Now, I wish to run some functions on the nodes that are beyond what xsl:functions can reasonably do. To be more precise, I want to call an…
1
vote
1 answer

Saxon/C PHP extension name (ext-saxon/c vs ext-saxonc)

I've build the Saxon/C PHP extension in a PHP-FPM docker image. The current extension name is ext-saxon/c, while PhpStorm and composer expect the extension name to be ext-saxonc. Is it possible to change/override that in either the Saxon build…
kilar
  • 95
  • 2
  • 8
1
vote
1 answer

Saxon-C CentOS8 Compile

I am trying to evaluate Saxon-C 1.2.1 HE on CentOS8 and installation seems to have gone ok. Trying out the samples by cd samples/cppTests && build64-linux.sh though leads to a myriad of compilation errors to the tune of the…
Waslap
  • 572
  • 3
  • 23
1
vote
2 answers

XSLT: Json to given xml format

Problem: I have a given JSON output and need to transform this into a xml with a given format to use it for another input. The JSON-document: report.json { "Diagnostic Cycle" : "2019-02-13T08:19:44ZZ", "01 Tester" : { "01 Name" …
1
vote
1 answer

Using Saxon/C with Perl

The Saxon website says Saxon/C can be invoked from Perl, but I can't find any examples. The only thing I've found that interfaces to Saxon is one old Perl module (XML::Saxon::XSLT2) which uses Inline::Java and apparently is very slow. But I can…
lschult2
  • 588
  • 2
  • 5
  • 16
0
votes
1 answer

Why is my xslt code causing saxonc to bomb?

I keep getting this error. I'm doing a loop and calling my xslt.transform() method (see listing) about 3 times in a row. It bombs about 50% of the time trying to make it to the end of the loop. My question is, what is wrong with my code? Am I not…
toddmo
  • 20,682
  • 14
  • 97
  • 107
0
votes
2 answers

Saxonc python extension issue with macOs

I am trying to install saxonC extension for python in mac OS for xml transformation using xsl and i am getting the below error when i run "python3 saxon-setup.py build_ext -if" as mentioned in the documentation here:…
0
votes
2 answers

XPDY0002 The context item for axis step $nodeset is absent

I'm getting the XPDY0002 context item is absent error. I've seen the other questions regarding this but I don't really understand the answers nor do I see how to apply them to my python code. The problem seems to occur in this strange xslt 1.0 setup…
woodduck
  • 339
  • 2
  • 12
1
2 3