Post

Replies

Boosts

Views

Activity

Reply to XSLT 2.0 transformation with Swift or WKWebView
Thank you for these comments and for taking the time to look at my bundles. Just one of the XSLT style sheets, ddb.xsl in DDB Access, requests version 2, but it is a critical one. As I mentioned above, I don't know if there is a specific reason. I just couldn't ignore it. Clearly, the main point is that I had no solution at all for iOS. Using JavaScript was the first answer from Apple. I had not thought of this kind of solution. Later on, Apple had a second thought and suggested to use xslt rather than JavaScript. My reference to an external C library some years ago comes from a very old comment in Stackoverflow #462440 (cf. discussion in the bottom). I am neither an XSLT expert nor a system expert, and it seems that finding the appropriate answer was not immediate. I regard libxslt as "unsafe in the medium term" not for security reasons, but because as you mention XSLT is not frequently used in this environment. From an Apple perspective, it can easily be removed if needed. My lookup (detail) pages are based on WKWebView. I could actually get a first result with the most complex style sheet (ddb.xsl) in a few hours, with just a few lines of code. The most difficult point was to use correctly callAsyncJavaScript. It would be difficult to use evaluateJavaScript for transparency reasons, while callAsyncJavaScript takes care of the transparency. I shall try to progress on this basis. If it works correctly, I shall save a lot of time. Thanks again for your help.
Jul ’24
Reply to XSLT 2.0 transformation with Swift or WKWebView
If I try to summarize my understanding: In my case, it is worth trying the first solution with Webkit, which seems reasonably simple and safe. At this point, it is not clear for me if it is v1 or v2. libslt (version 1 only) can be used with a significant system work. Looking at the apparent lack of clear statement in the reference documentation, I can't regard it as safe in the medium term. If none of the above provides the expected result, I have to do my own development.
Jul ’24
Reply to XSLT 2.0 transformation with Swift or WKWebView
Hi endecotp, I realize that my post yesterday did not correctly answer your question. The "external library" I mentioned in the initial post is libxslt but I had not checked the details. The main point for me is to find a solution for both macOS and iOS. At the moment, it is not clear if 2.0 is strictly required or if 1.0/1.1 would be acceptable.
Jul ’24
Reply to XSLT 2.0 transformation with Swift or WKWebView
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.
Jul ’24