views:

53

answers:

1

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.

+2  A: 

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?

Lou Franco
Well, that's kind of the problem... I can't even get ./configure to work on the source I downloaded.
Ford