mclaughj
mclaughj

Reputation: 12865

Alternative to NSXMLDocument on the iPhone for XSLT purposes

I know it's been asked before (like here), but is there way to natively use XSLT on the iPhone? If not, and I need to use libxslt, is there any documentation/tutorial of how to use it on the iPhone?

EDIT: I've decided to use libxslt. What files are necessary to include? I haven't found any tutorials of examples of use on the iPhone, and I'm unsure of how to approach it. Any help would be appreciated.

Thanks in advance.

Upvotes: 1

Views: 3360

Answers (2)

Robert H. Bourdeau
Robert H. Bourdeau

Reputation: 131

Cannot use libXSLT on iPhone. Not as of today. App will be rejected. libXSLT is built into the iOS andd COULD be called - but this is a private API of the iPhone and will cause rejection. If you compile the libxslt library yourself and statically link it to your app, you will still get rejected. Many people have reported this bug in the app review process but nothing has yet changed.

Upvotes: 4

Nicholas Riley
Nicholas Riley

Reputation: 44311

It depends how you want to use XSLT; not sure what you mean by "natively". If you're just embedding a browser, MobileSafari will interpret XSLT for you.

If you're just converting one XML document into another for processing, libxslt is not a bad choice. There's no difference using libxslt on the iPhone from any other platform. Given Apple doesn't include headers for it, it is likely they don't want you using the bundled copy. You are better off compiling a copy into your application instead, against the provided libxml2 library.

If you want a more specific answer you may wish to pose a more specific question. :-)

Upvotes: 3

Related Questions