[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

[xslt] How to handle errors using libxslt?

Subject: [xslt] How to handle errors using libxslt?
From: Esther Parrilla Endrino <esther.parrilla@xxxxxxxxxxxxxxxx>
Date: Mon, 17 Nov 2003 09:52:25 +0100
xsltapplystylesheet
Hello all,

I am using the example posted in the libxslt web page to transform an input XML file into HTML, my code is very simple:

-snip-

    // parse XSL
    cur = xsltParseStylesheetFile((const xmlChar *)xslFile_name);

    // parse XML
    doc = xmlParseFile(xmlFile_name);

    // apply XSL
    res = xsltApplyStylesheet(cur, doc, params);

    // display in stdout
    //xsltSaveResultToFile(stdout, res, cur);

    // saves formatted file to disk
    xmlSaveFile(formattedFile_name, res);

    // deallocate
    xsltFreeStylesheet(cur);
    xmlFreeDoc(res);
    xmlFreeDoc(doc);
        xsltCleanupGlobals();
        xmlCleanupParser();


-snip-


If for example, the XML is validated against a schema that contains namespaces and into the XSL I delete the reference to that Namespace location, the file is transformed but erroneously and I get this error onto the console...
How can I catch the error in my code? How are managed erros in thei library?
THefucntions I call does not rerun an error code I can catch and manage!


Any help shall be appreciated

esther
--

~ Code matters more than comercials ~

--


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.