WKWebView: no XSLT support

In our large iOS project that was started 2008 and that will be 10 years old this year we use much XSL transformations. This technology was the first choice at that time to deal with structured data and its representation on mobile devices. Nowadays similar uses cases can be covered by JSON and Java Script. Probably this is the reason, why WKWebView the newer component that Apple recommends to use instead of UIWebView contains no support for XSLT.

The only way to support XSLT in your app is to integrate some third party XSLT library. We decided for libxslt. That’s a C library based on libxml2. Instead of loading XML file in the WKWebView (this was possible with UIWebView) we start XSL transformation first and generate html file. Generated file is then loaded with WKWebView.