Re: [xslt] How I can detect processing errors ?



On ср, 2004-03-03 at 23:17 +0800, William M. Brack wrote:

>    res = xsltApplyStylesheet(cur, doc, params);
>    if (!res) errx(-1, "fail to do xsltApplyStylesheet()");
> 
> with the sequence
> 
> xsltTransformContextPtr ctxt;
>  ......
>    ctxt = xsltNewTransformContext(cur, doc);
>    res = xsltApplyStylesheetUser(cur, doc, params, NULL,
>                      stderr, ctxt);
>    if ((ctxt->state == XSLT_STATE_ERROR) ||
>        (ctxt->state == XSLT_STATE_STOPPED))
>            errx(-1, "fail to do xsltApplyStylesheet()");
> 
> and you should get what you are asking for.

Thank you, it helps.

Anyway is it supposed to work so ( I am about xsltApplyStylesheet() )
Function, result of which is unpredictable, is useless ?!?

> Good luck,
> Bill

-- 
Vladimir B. Grebenschikov
SWsoft Inc.



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