I just had an app rejected for linking to libxslt
using this technique.
I'd really like to use XSLT in my app, so it looks like my only shot is to compile it myself. I don't want to use a UIWebView
because I want to store the resulting HTML, not just display it.
Has anyone done this -- compiled libxslt
for the iPhone?
After some Googling, I've got an old Xcode solution from here and git-cloned the latest libxslt
from gnome.org. Neither approach has worked out so far (autoconf bails out, and the Xcode project is missing a bunch of files).
Any advice would be appreciated.
Thanks!
Update 7/21
I found a workaround by giving UIWebView
some XML linked to an XSL stylesheet. After the data loads,
I can grab the transformed HTML like this (source):
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
html = [webView stringByEvaluatingJavaScriptFromString:
@"document.documentElement.outerHTML;"];
}
That said, if anyone has any hints on using libxslt
directly, I'd love to hear them. Dropping into javascript seems so...unsavory.
You're not allowed to add dylibs, but you can link to a .a file. Can you get the configure for libxslt to output a .a file instead?
精彩评论