Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 602743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:51:18+00:00 2026-05-13T16:51:18+00:00

I plan to use XML/XSLT in my iPhone application. What version of XSLT is

  • 0

I plan to use XML/XSLT in my iPhone application.

What version of XSLT is currently supported on the iPhone? Can I use XSLT 2.0 or just 1.0 ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:51:18+00:00Added an answer on May 13, 2026 at 4:51 pm

    Using libxslt on the iPhone OS is actually quite easy:

    1. Download the source-code of libxslt and extract it.
    2. Add the “libxslt” dir to Header search paths in your build settings. Also, add the path to the libxml-headers there (usually /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/libxml2).
    3. Add libxml2.2.dylib and libxslt.dylib to the linked frameworks (Xcode “Groups & Files” panel: right click on “Frameworks” –> “Add” –> “Existing Frameworks…”).
    4. Create a simple XML file and its XSL tranformation.

    And finally you can use a code similar to the sample above to get the tranformation result into an NSString (e.g. to display in in a UIWebView):

    #import <libxml/xmlmemory.h>
    #import <libxml/debugXML.h>
    #import <libxml/HTMLtree.h>
    #import <libxml/xmlIO.h>
    #import <libxml/xinclude.h>
    #import <libxml/catalog.h>
    #import <libxslt/xslt.h>
    #import <libxslt/xsltInternals.h>
    #import <libxslt/transform.h>
    #import <libxslt/xsltutils.h>
    
    ...
    
    NSString* filePath = [[NSBundle mainBundle] pathForResource: @"article" ofType: @"xml"];
    NSString* styleSheetPath = [[NSBundle mainBundle] pathForResource: @"article_transform" ofType:@"xml"];
    
    xmlDocPtr doc, res;
    
    // tells the libxml2 parser to substitute entities as it parses your file
    xmlSubstituteEntitiesDefault(1);
    // This tells libxml to load external entity subsets
    xmlLoadExtDtdDefaultValue = 1;
    
    sty = xsltParseStylesheetFile((const xmlChar *)[styleSheetPath cStringUsingEncoding: NSUTF8StringEncoding]);
    doc = xmlParseFile([filePath cStringUsingEncoding: NSUTF8StringEncoding]);
    res = xsltApplyStylesheet(sty, doc, NULL);
    
    char* xmlResultBuffer = nil;
    int length = 0;
    
    xsltSaveResultToString(&xmlResultBuffer, &length, res, sty);
    
    NSString* result = [NSString stringWithCString: xmlResultBuffer encoding: NSUTF8StringEncoding];
    
    NSLog(@"Result: %@", result);
    
    free(xmlResultBuffer);
    
    xsltFreeStylesheet(sty);
    xmlFreeDoc(res);
    xmlFreeDoc(doc);
    
    xsltCleanupGlobals();
    xmlCleanupParser();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using mod_perl for my web application. Currently, I plan to use a
I am currently in the process of rewriting an application whereby teachers can plan
I use winforms to develop a desktop application, and right now I plan to
I plan to use dom4j DOM Document as a static cache in an application
I plan to develop an Iphone application which will communicate with my SOAP web
I am trying to use hashing for a test case in tomcat-users.xml. (I plan
we plan to use TIBCO EMS queues and TIBCO BW listeners on those queues
If I do a query (I plan to use SDS.P) against the global catalog,
Need an async I/O Processing Plan to use async I/O through aio* calls on
I am developing a web app for which I plan to use InnoDB. However

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.