Questions tagged [xslt-3.0]

Use this tag for questions specific to XSL Transformations version 3.0 and no other version.


News: Since June 8th, 2017, XSLT 3.0 is a W3C Recommendation, implemented by Saxon since the release 9.8 the same week and subsequently by the releases Saxon 9.9 and Saxon 10.8 on the Java and .NET framework platform as well as by the now stable Saxon 11.5 release now available as Saxon Java 11.5 for Java, SaxonC 11.5 for C++/C, Python, PHP and as SaxonCS 11.5 for the .NET Core 6 or 7 platform and finally since 2023 in the latest Saxon 12.0 releases for Java (HE, PE, EE), C/C++, PHP, Python (SaxonC 12.0 HE, PE, EE as well as PyPi packages saxonche, saxoncpe, saxonche). XSLT 3.0 is also largely (except streaming) implemented by the current release of Altova (XMLSpy, Raptor version since 2017 release 3 or any later release).


XSLT 3.0 introduces the following new features via elements, attributes, and expressions:

References

XSLT 3 processors

  • Saxon 9.8, 9.9, 10, 11, 12 by Saxonica, exists in the free, open-source HE edition and the commercial PE and EE editions, for 9.8 all editions are available for Java or .NET framework or C/C++, the current stable releases 10.8 and 11.5 are available for Java and .NET framework; Saxon 11.5 also for as SaxonC 11.5 for C/C++/PHP/Python. The 9.9 release Java has been cross-compiled as Saxon-C 1.2 for C/C++ with bindings to be used as a PHP extension and as a Python 3 module. The latest stable Saxon releases 10 and 11 available for Java and C/C++/Python/PHP as well as via SaxonCS for .NET 5/6/7 make xsl:evaluate and functions expressions and higher-order functions available in all editions. The newest release in 2022 was Saxon 11, the first for .NET Core 5 or .NET 6, using an XSLT 3.0 based transpiler approach to convert the Java code base into C# code to be compiled and built for .NET Core 5. Unfortunately SaxonCS 11 is currently only available as the EE edition. The C/C++/Python/PHP SaxonC 11.5 and the latest Java Saxon 11.5 release have been published in February 2023. The newest release is 12.0 available since January 2023 for Java, .NET 6/7 as SaxonCS, SaxonC for C/C++/PHP/Python as well as on PyPi.org for Python 3.
  • Altova Raptor, Altova XMLSpy (the XSLT 3.0 implementation in Altova products supports the W3C recommendations of XSLT 3.0 and XPath 3.1, except streaming in XSLT 3)
  • Saxon-JS 2 is available for Node.js (npm install saxon-js, npm install xslt3) and the browser
  • Saxon HE 11 Java has also been successfully cross-compiled with the latest IKVM to .NET 6 to be usable from .NET 6 or 7 code

Online Editors

XSLT 3.0 support in editors and IDEs

Tuturials


Online Training

"What's New in XSLT 3.0: Part 1" -- A Pluralsight video-course (5.5h), by Dimitre Novatchev

"The Evolution of XPath: What’s New in XPath 3.0" -- A Pluralsight video-course (4.5h), by Dimitre Novatchev


731 questions
2
votes
3 answers

How to separate similar data elements with a symbol(;) in XSLT

My source code is below. I am having similar data elements with different values. Below example I am having 3 phone numbers and I wants to have all in single line with a separator (;) I used concatenate function but no use
2
votes
2 answers

XSL XPATH if statement in tokenize()

I have an XML document containing lists of people structured like this: John de Foo snake charmer
jbrehr
  • 775
  • 6
  • 19
2
votes
1 answer

Saxon Prematurely Evalutes xsl:attribute-set

This relates to schema-aware validation of inputs into an XSLT transformation using latest Saxon EE 9.8. My XSLT file contains the following. A namespace and associated schema defined as such:
Phil
  • 592
  • 6
  • 15
2
votes
2 answers

Sorting words according to letters of an old Semitic language

I use XSLT 3.0, Saxon-PE 9.7. I need to sort orth according to the Ugaritic language, close to Hebrew but with additional characters. I have tried: But the proposed order is…
Vanessa
  • 121
  • 12
2
votes
2 answers

How to get the version number from a given XSLT file .

Say I have an XSLT file like below: `
swifty
  • 165
  • 1
  • 1
  • 17
2
votes
1 answer

XSLT 3.0 iterate over JSON array wrapped in XML

I am processing various XML files with XSLT. In one XML I found a wrapped JSON list:
binarek
  • 23
  • 1
  • 4
2
votes
2 answers

add an element to a node, if it doesnot exist

Using xslt-3, i try to insert the element PROPERTY, if it does not already exist to each RECORD node:
user8674587
2
votes
2 answers

xslt result-document overwrite or skip file with duplicate uri

Is there a way to make xsl:result-document overwrite or skip files when output files have duplicate URI ? I think I don't have to provide an example. I have database with duplicate entries in it. I know I can put an id and then remove id from names…
RyosanCiffer
  • 115
  • 2
  • 12
2
votes
1 answer

JSON to XML transformation in XSLT 3.0

I am trying to convert JSON data to XML in XSLT 3.0 using json-to-xml function,but the produced xml is not as expected for example Input JSON: { "glossary": { "title": "example glossary", "GlossDiv": { "title": "S", …
2
votes
1 answer

How to walk through unknown content of the result of parse-xml-fragment using templates using XSLT 3?

Good evening, I have a problem with passing the result of "parse-xml-fragment" to templates using XSL-T 3.0. I am using Saxon-PE 9.7.0.15 (Java version bundled in the latest oXygen 19). I would like to be able to apply (already) defined templates…
Stepan RYBAR
  • 67
  • 1
  • 5
2
votes
1 answer

Parsing plain text in CDATA to html with XSLT 2.0/3.0 using multiple steps. Part way there

I have a working process using XSLT 2.0/3.0 using Saxon-HE latest version that supports XSLT 3.0 that takes the text of a CDATA section in an XML file does markup into HTML. The text has no HTML tags but minimal plain text markup that relies on new…
Sawtooth67
  • 83
  • 7
2
votes
2 answers

Is there XSLT 2.0 or 3.0 support in BizTalk Server 2016 mapping?

In the past, BizTalk (and the .NET framework in general) has not supported any XSLT version besides 1.0. Our company is about to upgrade to BizTalk Server 2016, and I was wondering whether it's possible (and natively supported) to use XSLT 2.0 or…
2
votes
1 answer

XSLT expand-text="yes" causes extra whitespace in the output

Setting expand-text="yes" in an XSLT stylesheet appears to cause extra whitespace to be emitted in the output XML. For example, this stylesheet:
joshp123
  • 67
  • 4
2
votes
2 answers

XPath 3.0 Serialize without Namespaces in Scope

While answering this question, it occurred to me that I know how to use the XSLT 3.0 (XPath 3.0) serialize() function, but that I do not know how to avoid serialization of namespaces that are in scope. Here is a minimal example: XML Input
Mathias Müller
  • 22,203
  • 13
  • 58
  • 75
2
votes
1 answer

Possible Circular Package Dependency - XSLT 3.0

I'm trying xsl:package for the first time but getting an error on the command line- xml (not really used)- package.xsl-
Vinit
  • 1,815
  • 17
  • 38