Re: [xslt] Return of xsltApplyStylesheet



On Fri, Dec 07, 2001 at 10:24:38AM +0100, Eric van der Vlist wrote:
> I am confused about the return value of xsltApplyStylesheet when there 
> is an error.
> 
> I have tried to generate a stylesheet run time error by using the 
> document() function on a non existing document and by using an undefined 
> extension namespace. In both cases, a non NULL value has been returned 
> by xsltApplyStylesheet.

  Does xsltproc show errors messages on those examples ?

> Are such failures considered as warning and, if yes, how can I trap them?

  To trap error, use xsltSetGenericErrorFunc() to define your own
callback function. 
  I agree it's not a good API, an I should provide something tied to the
given transformation (and using xsltApplyStylesheetUser() should allow the
user to select its own set of call back from a provided
xsltTransformContextPtr).

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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