Questions tagged [saxon]

Saxon is an implementation of XSLT, XQuery, XPath, and XSD. In supports the latest W3C standards including XSLT 3.0, XQuery 3.1, XPath 3.1, and XSD 1.1. There are versions for Java, .NET, and C, in both open source and commercial editions. The latest addition to the product set is Saxon-JS, an XSLT runtime which will run in most browsers.

Filter by
Sorted by
Tagged with
0 votes
1 answer
26 views

Why is the 'quot' entity not being escaped?

When I run (let [processor (Processor.) builder (.newDocumentBuilder processor) xdm-node (.build builder (StreamSource. (StringReader. ...
akond's user avatar
  • 15.9k
0 votes
1 answer
29 views

Saxon 9.9.1 to 12.3 upgrade is breaking sql:connect

I've been running sql connections successfully on 9.9.1. I'm upgrading to 12.3, and am getting sql connection errors I can't figure out. Looking at the documentation, the only difference I see from ...
lschult2's user avatar
  • 604
0 votes
1 answer
33 views

Unexpected EOF in prolog in Camel Xslt when input is InputStreamCache

Since version 3.17, Camel have automatic conversion to Stream Caches. When upgrading (from version 3.14 to version 4.0.2) we face a strange problem. We use the Saxon Xslt component to transform Xml ...
Mathias Olausson's user avatar
1 vote
1 answer
99 views

String-join() function is affected by order of XML structure (Nodes)

I normally use String-join() functions extensively for handling and joining values coming from Database, however currently I observed if the second variable of the function is first fetched/present in ...
Siddhant K.'s user avatar
0 votes
2 answers
55 views

How to make an error listener for Saxon errors in s9api?

I'm trying to listen to the errors in s9api going to stdout, but I'm not finding a good working example. Here's what I have: XsltCompiler compiler = processor.newXsltCompiler(); compiler....
lschult2's user avatar
  • 604
0 votes
1 answer
35 views

Dynamic XQuery using saxon:evaluate not working in Oxygen with an XPath 3.1 type expression?

I'm interested in using the saxon:evaluate in an XQuery (using the Oxygen XML Editor 24.0) and wanted to see it working in a very simple example using XPath 3.1 type expression so I can select a value ...
Alex's user avatar
  • 1
0 votes
2 answers
54 views

Init error with Saxon HE Java Extension function in Oxygen XML

I'm trying to learn how to create extension functions for XSLT using Java & Saxon-HE using the ExtensionFunctionDefinition class. So far, I've been able to extract and then re-compile a .jar using ...
Jason Coleman's user avatar
0 votes
2 answers
58 views

XInclude not working properly on command line Saxon, but does work with oXygen

I have some XML files transcribing manuscripts that draw from a shared description of the book those manuscripts are in. It's formatted in my XML via three include statements that are laid out as ...
medievalmatt's user avatar
0 votes
2 answers
55 views

Optimal way to chain/pipeline transforms

I've done some research on saxonica.com, Google, and Chat GPT to find the optimal way to chain/pipeline transforms without incurring serialization and parsing. I found ways to do it with s9api, JAXP, ...
lschult2's user avatar
  • 604
0 votes
1 answer
67 views

document-uri() is not working when using collection()

I'm using saxonche version 12.3.0 installed using pip in Python 3.11.5. When using collection() in XSLT, document-uri() doesn't seem to be working. I've created a small test: Python import saxonche ...
Daniel Haley's user avatar
  • 51.8k
0 votes
1 answer
37 views

Saxon SQL maps missing some values

I've been able to get sql:prepared-query($connection, $sql)() working for simple SQL. SELECT column1 FROM table This works great, and I can access the value with $sql-result-map[1]?column1 It also ...
lschult2's user avatar
  • 604
0 votes
1 answer
51 views

Forcing a newline in HTML output from XSLT

I have a requirement to be able to output HTML with a forced newline from XSLT (Saxon 12), basically to separate paragraphs. Things I've tried that didn't work: Putting <br /> inside the xsl:...
LHMathies's user avatar
  • 2,384
0 votes
2 answers
44 views

Configuring Saxon for MySQL

I'm having difficulty getting Saxon configured to use MySQL, in oXygen and in eXist-db. Here is my attempt in eXist-db xquery. There are no errors, I do get a connection object (so the fields ...
lschult2's user avatar
  • 604
1 vote
1 answer
41 views

format-number() rounding inconsistency

I'm noticing some inconsistency in rounding with format-number(): format-number(37.5,'#') ( 38 : String ) format-number(38.5,'#') ( 38 : String ) To expand on this: (1 to 10) ! (. + 0.5) ! format-...
lschult2's user avatar
  • 604
0 votes
1 answer
63 views

XSLT transformation is stuck after migrating from saxon 8 to 10.6 EE

My customer has an input xml file of size 28 MB (~7L+ lines of code) to be transformed using Saxon. Transformation was working while in Saxon 8. After migrating to Saxon 10.6 EE, the transformation ...
Rajarshi's user avatar
0 votes
2 answers
27 views

Delet with XSLT2 elements who doesN’T match a regex

The new version of the question (2023-10-01) General overview I try to make the table of content (TOC) of a document by picking only his title nodes like h1, h2… h9 (h[0-9]), and so delete all the ...
fauve's user avatar
  • 230
0 votes
2 answers
66 views

XSLT create new array iterating over an existing array

I am trying to collect strings of my interest by iterating over an array of objects and create a new array. I would use this new array later in my transformation to generate the output. Below is my ...
technocrat's user avatar
1 vote
2 answers
66 views

XSL output array of string as text

I am trying to create an array and append few values to it and output the transformed text by iterating over this array. But the output is ignoring the content of xsl:text. <xsl:stylesheet ...
technocrat's user avatar
2 votes
1 answer
44 views

How to read doctype declaration of an xml using xslt?

Is there a way to read the doctype declaration of an xml using xslt? Example XML doctype declaration: <!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD ...
GreatPretender's user avatar
2 votes
1 answer
67 views

Sort strings, treating hyphen, slash, and space as equal, using UCA collation

Problem I'm using Saxon-EE 11 and my platform's language is en-us. I'm attempting to implement custom sorting behavior for an <xsl:sort> instruction by specifying a UCA collation. Ignoring the ...
Trevor Lawrence's user avatar
1 vote
1 answer
41 views

Current-dateTime() Microsecond precision Issue

Previously, when using the function current-dateTime() [XPATH 2.0 & SAXON 9], I would get a value like 2023-07-15T13:11:43.618+02:00. However after migration to [XPATH 3.1 & SAXON 10], now for ...
Siddhant K.'s user avatar
0 votes
1 answer
35 views

Saxonica EE : compilation of xslt and transformation can we overwrite or ignore select value of

we are using saxonica EE license , i want to know if we can ignore or overwrite (ignore is preferred) select value of (which calls some other apps logic, which we want to ignore), example code as ...
kantesh's user avatar
  • 61
0 votes
1 answer
90 views

error: Cannot find a matching 0-argument function with XSLT 2.0 with Saxon EE( with License File in Place in same folder that of JAR)

I am Using saxon EE processor for conversion of XML with XSLT-2.0. but its giving error for XSL file . Below is the Code for XSL File <?xml version="1.0"?> <xsl:stylesheet ...
ashish sharma's user avatar
0 votes
1 answer
27 views

How to pass xml fileset into Ant xslt task as input with one xml output file saxon xslt 3.0

I have a folder of XML files. I'd like to copy some lines from each file into one XML file that I can then use as a lookup. I have an xslt file and an ANT build file but I'm sure there has to be a ...
Caroline's user avatar
  • 171
0 votes
1 answer
37 views

why does - result-document method="text" - export an xml declaration?

Sadly this question is wrong - i can't seem to replicate the behaviour, thanks to Martin Honnen below for forcing me to revisit my assumptions - I can't delete it. Saxon 11.4 if I run this <xsl:...
MrD at KookerellaLtd's user avatar
0 votes
1 answer
58 views

SAXON-HE Problem - Oracle Unified Directory (OUD) won't start when Saxon-HE 11_5 added as dependency

We are working on a plugin for the Oracle's Oracle Unified Directory (OUD) product, and in this case, we needed to add support for XSLT in Java. So I tried adding SAXON-HE 11_5 as a Maven dependency ...
user555303's user avatar
  • 1,176
0 votes
1 answer
41 views

How to properly run SQL extensions thru Saxon in Oxygen

I am trying to test usage of the sql extensions of Saxon EE thru Oxygen. I am getting an error that the driver failed to load: Engine name: Saxon-EE 11.4 Severity: fatal Problem ID: SXSQ0003 ...
twfurst's user avatar
  • 215
0 votes
1 answer
37 views

comment the <xref> tag and keep the text as plain, if section/@id is not matched with in folder xml or outside folder xml file

We want to comment the <xref> tags if section/@id is not matched in the same folder xml files or other folder xml files: Each folder have multiple/single xml files and <xref> and section/@...
Kita Ansari's user avatar
0 votes
1 answer
89 views

After upgrading from SaxonCS from 11 to 12 ExtensionFunction are no longer working

I have tried upgrading from SaxonCS 11 to 12 after my ExtensionFunctions are no longer called I get the following exception when I try to compile my xslt. Saxon.Hej.trans.XPathException: 'Cannot find ...
Kingpin's user avatar
  • 1,077
0 votes
1 answer
57 views

Saxon XSLT SQL connection

I have this html which I want to parse into sections and insert into an SQLite database: <html lang="en"> <head> <title>Title</title> ...
Paulb's user avatar
  • 1,491
0 votes
2 answers
88 views

Using SaxonEE 9.9.1 with XSLT2.0 getting error Reflexive calls to Java methods require a Saxon-PE or Saxon-EE license, and none was found

I am using SAXONEE with XSLT 2.0. In order fix this issue is ExtensionFunction is the way? To import my JAVA class below is code I am using: xmlns:myclass="java:com.output.extensionFile" ...
devQuery's user avatar
2 votes
1 answer
137 views

How can I embed DocBook XSLT transformation in a Java web app?

I'm at the proof-of-concept phase of building some DocBook → PDF transformation into a web application. The basic requirements are: It has to run "out of the JAR"—setting up the stylesheet ...
Paul A. Hoadley's user avatar
0 votes
1 answer
70 views

Facing Issue while using Saxon Processor For XML Conversion in XSLT-2.0

I am Using saxon processor for conversion of XML with XSLT-2.0. but its giving error for XSL file . Below is the Code for XSL File <?xml version="1.0"?> <xsl:stylesheet version=&...
ashish sharma's user avatar
0 votes
0 answers
71 views

XSLT 2.0 - Using Saxon with a VBA macro

I have to process XML files with WordML, because in the end I want to have a Microsoft Word document from my XML file. But because of several problems, I do consider moving to XSLT 2.0. It would help ...
Ella's user avatar
  • 25
-1 votes
1 answer
114 views

SAXON 10 datetime is always processed as string despite having a date time variable

Recently I have migrated to Saxon 10 (XSLT 3.1) from Saxon 9 (XSLT 2.0). I have a variable $datetime Variable, that is of the type DateTime and whenever I have used the variable in XPATH expression ...
Siddhant K.'s user avatar
0 votes
1 answer
87 views

How to write a Saxon ExtensionFunctionDefinition returning a Node

Using Saxon HE 12, I managed to create a Saxon ExtensionFunctionDefinition returning a SequenceType.SINGLE_STRING and using it in a XSLT transformation ; but I have a hard time making one returning a ...
Alice Oualouest's user avatar
0 votes
1 answer
156 views

XML to HTML Conversion using XSL result-document tag in XSL not giving required result

We have replaced redirect:write(From XSLT -1.0 with Xalan) with result-document (XSLT-2.0 Saxon processor). Earlier using redirect:write were used to get 3 output HTMLs, from one HTML we can navigate ...
ashish sharma's user avatar
0 votes
1 answer
45 views

how to query the result of fn:analyze-string()?

In XQuery (in BaseX which uses Saxon 10.something as well as in XSLT with Saxon 9.9.1.7 within Oxygen), I tried to iterate the matches of fn:analyze-string() by fn:analyze-string($term, $pattern)/...
meistermuh's user avatar
0 votes
1 answer
78 views

Eliminating SecurityException with saxon jar in Gradle 8

I have a Gradle 8 Java program that is throwing this exception: java.lang.SecurityException: class "net.sf.saxon.value.UntypedAtomicValue"'s signer information does not match signer ...
Ellen Spertus's user avatar
0 votes
1 answer
66 views

Saxon java methods cause a long blocked state in a multi-threaded application at high-load

I am trying to embed Saxon HE into our web java application. Each request to an endpoint causes an XSLT transformation. I tried sending 100 concurrent requests at the same time to test Saxon. Using ...
gsv's user avatar
  • 1
0 votes
1 answer
39 views

unescape userdefined entities from xml

There have some userdefined entities in the input xml like &key; and &hyphen;. We have defined these entites as DOCTYPE in the below xsl:- <!DOCTYPE xsl:stylesheet [ <!ENTITY key "&...
Rahul's user avatar
  • 21
0 votes
1 answer
33 views

converting entities only at some specific places in xml

Following code unescapes the entities from xml:- <xsl:stylesheet version='3.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> <xsl:output method="xml" omit-xml-declaration=&...
Rahul's user avatar
  • 21
0 votes
2 answers
46 views

entity translation to customized entity

There are some user defined entites in the xml data. In order to unescape those entities, we are using below code:- <xsl:stylesheet version='3.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' &...
Rahul's user avatar
  • 21
0 votes
2 answers
91 views

Saxon: SetParameter to xpath expression

In my stylesheet i have a global datetime param with a default value of the current dateTime: <xsl:param name="utcNow" select="current-dateTime()" as="xs:dateTime" /&...
Phil's user avatar
  • 41
0 votes
1 answer
32 views

character attribute must be a single XML character error while unescaping some entities

There are some user defined entites in the xml data. In order to unescape those entities, we are using entity reference in the DOCTYPE mentioned in the below code:- <!DOCTYPE xsl:stylesheet [ <!...
Rahul's user avatar
  • 21
0 votes
1 answer
67 views

Is an extension from the ExtensionFunctionDefinition class a modification under the terms of the MPL 2.0 license?

I would like to use SaxonHE (this open source solution is distributed under the MPL 2.0 licence) as the library in the commercial proprietary software. At the same time, I need functionality that ...
gsv's user avatar
  • 1
1 vote
1 answer
48 views

XPath only append text if there is a match

In Java 17 I'm using XPath to extract data from XML by joining all the <bar>s under <foo>. I'm using Saxon 12, but I'm doing it through the JAXP API. I create an XPathExpression and then ...
Garret Wilson's user avatar
0 votes
1 answer
36 views

Unescape some entities during xsl transformation

We have done an xsl transformation to convert hexcode values into entities. Now after transformation, there are some entites which are converting into their corresponding values like &amp; gets ...
Rahul's user avatar
  • 21
1 vote
2 answers
71 views

XML tags missing or skipped during xsl transformation

We are performing an xsl transformation to convert hexcode entity to mdash. We also have converted all &amp; in xml to output as &. This transformation happens as expected, but along with that ...
Rahul's user avatar
  • 21
1 vote
1 answer
36 views

xs:integer($s) compilation results in "Cannot convert zero-length string to an integer", but $s would contain "4004"

Using Saxon SAXON-HE 9.7.0.15J, and executing this script: let $i := $input//*:i let $code := substring($i,4,4) let $n := xs:integer($code) return $n where $input contains an XML like this: <req&...
Vladimir Dyuzhev's user avatar

1
2 3 4 5
37