Re: [xslt] stylesheet.errors



On Mon, Apr 28, 2003 at 06:13:14PM +0200, Stéphane Bidoul wrote:
> Well, I tested first with a stylesheet containing some
> <xsl:unknown/> element and parseStylesheetDoc returned
> a stylesheet object that was not None. I later found out that 
> the errors where actually warnings and that libxslt 
> considered the stylesheet as correct.

  yup,

> In the meantime, I looked at xsltproc.c and found out
> that it checked the errors field in addition to checking
> that xsltParseStylesheetDoc did not return null 
> (around line 770), so I supposed I needed access to
> that field to detect compilation errors.

  Well, no, that should not be necessary

> Now if you tell me that it will always be None in case
> of errors, that's what I need.
> 
> Btw, to get the error messages, I assume I need to use the
> global error handler, since there is no "compilation
> context", right?

  Well there is a compilation context but it's not exposed at the
API level, and there is no way to attach a specific error handler ...

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]