[xslt] using xsltDocumentPtr



Hi,
I tried using xsltNewTransformContext( ) and xsltLoadDocument( ).
On creating a new context, I loaded a new xml document into that context,
but it returns xsltDocumentPtr( ). How do I print that info in xsltDocumentPtr??
or is anything wrong in my understanding?? Please clarify me on this.

Here is, how I was trying to use those api's.

    cur = xsltParseStylesheetFile("my.xslt");
    doc = xmlParseFile(" input1.xml");
    ctxt = xsltNewTransformContext(cur, doc);
    res = xsltApplyStylesheetUser(cur, doc, params, NULL, stderr, ctxt);
    // res = xsltApplyStylesheet(cur, doc, params);

    xsltSaveResultToFile(stdout, res, cur);

    // Load another document
    xsltDocumentPtr xsltdoc = NULL;
    xsltdoc = xsltLoadDocument(ctxt, (const xmlChar *)"input2.xml");

    res = xsltApplyStylesheetUser(cur, doc, params, NULL, stderr, ctxt);
    printf("\n After Loading new document....\n");
    xsltSaveResultToFile(stdout, res, cur);

Thanks
Senthil


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]