Skip to content

Roadmap to XSLT support on par with Saxon-HE 9.9 #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jofas opened this issue Mar 31, 2025 · 8 comments
Open

Roadmap to XSLT support on par with Saxon-HE 9.9 #85

jofas opened this issue Mar 31, 2025 · 8 comments
Labels
question Further information is requested

Comments

@jofas
Copy link
Contributor

jofas commented Mar 31, 2025

First of all, thank you @faassen for all the effort poured into providing a modern XPath and XSLT engine. This is impressive work I'd like to help with. I have a concrete use-case where Xee could very possibly be the best solution—certainly in the long term. Namely I've recently started working on a .NET library that tries to implement the EU EN16931 standard and the German instantiation of it, XRechnung. Both the EU and the German KoSIT provide Schematrons compiled to XSLT that can be used to validate the business rules defined in the standards. Both verify the correctness of their XSLT documents using Saxon-HE 9.9. I can't use Saxon-HE myself1, which leaves me with implementing the rules myself in my library or getting a different XSLT engine. With Xee around, I'd much prefer the latter.

This project of mine has been my first real introduction to the world of XML and I'm still completely flabbergasted and dumbfounded by the mountain of specifications and tooling out there. I also have little knowledge of interpreters, beyond the theoretical basics taught at uni. So Xee as a project is out of my comfort zone. Which makes me even more eager to contribute. The problem is, I don't know where to start and need a bit of guidance on how to proceed.2

Here's a rough outline of what I think needs to be done in Xee to solve my use-case:

  1. Implement the missing features defined in conformance/xslt.md
  2. Provide a high-level API to XSLT akin to xee-xpath
  3. An interface for processing documents with XSLT in the xee CLI (optional—nice for verification purposes though)

Is that about right? I'd greatly appreciate some guidance on how to move this forward and turn this into a more tangible, finer grained set of tasks to work on, if so desired.

Thanks!

Footnotes

  1. It is true that Saxon-HE up to version 10 is available on .NET. But it doesn't support .NET Core and only work on the legacy .NET Framework, which I can't target—I don't have a Windows box—and don't want to target, and .NET Standard 2.0 is missing functionality around System.Reflection.Emit.

  2. And of course make sure that my requirements and my pursuit of implementing them fit into the long term plans for Xee.

@martin-honnen
Copy link

@jofas, while Saxonica's Saxon HE 10 or 9.9 .NET indeed target .NET framework with the help of some old IKVM version both Saxon 11 HE and Saxon 12 HE have been successfully cross-compiled to .NET Core (previously .NET 6, these days .NET 8) with the help of an up to date IKVM that works cross-platform (at least for the desktop platforms of .NET on e.g. Windows, Linux, Mac).

You can find sample packages at https://www.nuget.org/packages/SaxonHE12s9apiExtensions and a sample project showing the use at https://github.com/martin-honnen/SaxonHE12IKVMNet6SaxonCSSamplesAdapted.

I just mention it to inform you that there are options with .NET (Core)/.NET 8 to run current versions of Saxon (e.g. Saxon 12) with .NET now, of course, if you choose to prefer to wait for Xee to support XSLT 3, just do that.

In a mid term time frame, there is also the expectation that SaxonCS 13 (for .NET 8) will be released this year with both a free to use HE edition and the already existing commercial EE edition so then you should have a pure .NET library doing XSLT 3.0.

@faassen
Copy link
Collaborator

faassen commented Apr 1, 2025

So Xee as a project is out of my comfort zone. Which makes me even more eager to contribute.

That's the spirit! Just beyond where we are is where we learn stuff and it's most interesting!

@faassen
Copy link
Collaborator

faassen commented Apr 1, 2025

Concerning XSLT, I'm going to write down some notes about where I think the next steps are.

@faassen
Copy link
Collaborator

faassen commented Apr 1, 2025

I've sketched out a plan now with some clues about where in the code to be.

I'll note that I'm happy to answer questions or give a more personal tour to anyone who is interested.

@faassen faassen added the question Further information is requested label Apr 1, 2025
@jofas
Copy link
Contributor Author

jofas commented Apr 1, 2025

You can find sample packages at https://www.nuget.org/packages/SaxonHE12s9apiExtensions

@martin-honnen Neat! I was aware of your efforts to port Saxon-HE to .NET through https://www.nuget.org/packages/SaxonHE12NetXslt, which I forgot to mention above as a potential solution for my problem.1 SaxonHe12s9apiExtensions looks even nicer, since I can avoid spinning up a separate process and probably some headaches around bundling SaxonHE12NetXslt with my library. Thanks for sharing.

Footnotes

  1. The other alternative I still have to investigate is using something like SchXSLT to compile the Schematrons to XSLT 1.0 and use System.Xml.Xslt, but I'm not even sure if one could convert Schematron to XSLT 1.0, so I consider this to be a long shot.

@jofas
Copy link
Contributor Author

jofas commented Apr 1, 2025

I've sketched out a plan

Thanks a lot!

@faassen
Copy link
Collaborator

faassen commented Apr 4, 2025

The XSLT testrunner has now been merged. Virtually no tests pass and the testrunner needs a lot of improvements, but we can at least start to run some conformance tests.

@faassen
Copy link
Collaborator

faassen commented Apr 11, 2025

We now have 900+ tests passing! We also have a xee xslt command. We can probably quickly get thousands more once we get into the flow of things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants