RE: [xslt] Incomplete error message "Error Invalid type"
- From: "Thomas Mauch" <thomas mauch calanda-technology com>
- To: <xslt gnome org>
- Subject: RE: [xslt] Incomplete error message "Error Invalid type"
- Date: Tue, 11 Jun 2002 08:24:54 +0200
I think this would definitively be worth the pain. My main reason for
switching from Cerces to libxslt was that libxslt was not only fast and
robust, but produced error messages which are really helpful for
debugging - which is unfortunately an issue for XSLT templates... So I
would really appreciate that.
Thomas
-----Original Message-----
From: Daniel Veillard [mailto:veillard@redhat.com]
Sent: Montag, 10. Juni 2002 14:55
To: xslt@gnome.org
Subject: Re: [xslt] Incomplete error message "Error Invalid type"
On Mon, Jun 10, 2002 at 10:58:50AM +0200, Thomas Mauch wrote:
> Hello,
> when I tried to work with a result tree without using the node-set
> function, I noticed that in some circustances an incomplete error
> message is created which does not indicate where the error happened,
> but just the message text "Error Invalid type". Please have a look the
> attached code snipped. When the now commented value-of call is
> executed, a "good" error message is created:
>
> Error Invalid type
> runtime error: file node-set-error.xslt line 16 element value-of
> xsltValueOf: text copy failed
>
> On the other hand, if the value-of is executed within the for-each
> loop as it is shown in the code, an incomplete error message just
> saying
>
> Error Invalid type
>
> is created. This makes debugging quite hard.
Hum, the difference comes from the layer of evaluation. In the first
case the error shows up in the XPath engine (part of libxml2) which has
no or very little contectual informations while in the second case the
errors is caught at the XSLT level which has all the context like the
stylesheets, original docs, and pointers to the instruction locations
toprovide a complete debug informations. The solution would be to either
provide the XPath engine with more compete informations or redirect the
XPath errors back to the XSLT engine for proper display. Either need
some interface extensions at least :-\
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/ _______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/ xslt@gnome.org
http://mail.gnome.org/mailman/listinfo/xslt
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]