XSLT 2.0 transformation with Swift or WKWebView

I am re-writing with Xcode and Swift two applications (DDB Access, SmartHanzi) initially written with Xamarin and C#. Both apps are with separate macOS and iOS versions (storyboard).

In the original version, XSLT 2.0 transformations were applied with C#. With Swift and WKWebView, after carefully reviewing the documentation, I just found:

  • XSLT 1.0 transformation for macOS (Swift).
  • Nothing at all for iOS.

Some years ago, there seemed to be a possibility with an external C library, but it was also mentioned that at a moment it was no more accepted by the App Store.

Did I miss something in the documentation and how can I apply these XSLT 2.0 transformations (preferrably from an XML string but temporary files would be acceptable)?

Some years ago, there seemed to be a possibility with an external C library, but it was also mentioned that at a moment it was no more accepted by the App Store.

Can you say more about that? The open-source libxslt is XSLT 1.0 only. I'm curious to know what XSLT 2 library you're referring to.

The current version (Xamarin) uses a C# XSLT transform. It works correctly and I had no reason to care about the XSLT version. I don't know if the underlying library is 1.0 or 2.0.

  • Mac:

As far as I understand, Swift/macOS has an XSLT transform limited to 1.0. For an XSL 2.0 stylesheet, I get the message:

xsl:version: only 1.1 version features are supported

(So it's 1.1, not 1.0)

I don't know if the stylesheet is marked 2.0 because it does need 2.0 or with no specific reason. My plan is to make a try with what is available and check if the result is at least acceptable.

  • iPhone, iPad:

It seems that the Swift/macOS 1.0 or 1.1 stylesheet is not available for iOS/iPadOS.

At the moment, I have no solution at all for iPhone/iPad.

XSLT 2.0 transformation with Swift or WKWebView
 
 
Q