Re: [xslt] python xslt messages



On Wed, Apr 17, 2002 at 03:41:51PM -0400, Sam Brauer wrote:
> On Fri, 12 Apr 2002, Daniel Veillard wrote:
> I experimented with this, but its behavior seems a little weird (to me 
> anyway).  I'm including a short example script that uses 
> libxml2.registerErrorHandler.  If I run it in a case where either the 
> stylesheet or document file is missing (which is the case tested by 
> error.py that comes with the package), then it works great.
> It also works great if both files exist but one is not well-formed.
> 
> 
> But consider these cases:
> 
> Case 1. The stylesheet is well-formed, but contains an invalid xsl tag, 
> such as <xsl:foo/>
> 
> stderr:
> compilation error: file test.xsl element foo
> xsltStylePreCompute: unknown xsl:foo
> compilation error: file test.xsl element foo
> xsltParseStylesheetTop: ignoring unknown foo element
> 
> error handler:
> None   (error handler wasn't called)
> 
> 
> Case 2. The stylesheet is well-formed, but refers to an undeclared 
> variable.
> 
> stderr:
> runtime error: file test.xsl element for-each
> unregistered variable foo
> 
> error handler:
> xmlXPathCompiledEval: evaluation failed
> 
> 
> 
> In both of these cases, messages are going to stderr that I would like to 
> be able to collect with a callback.  Does the API currently provide some 
> way to do this?

  I can't analyze this at the moment, could you please log it in bugzilla
so I don't forget about it ?

  thanks,

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]