Re: [xslt] Incomplete error message "Error Invalid type"
- From: Daniel Veillard <veillard redhat com>
- To: xslt gnome org
- Subject: Re: [xslt] Incomplete error message "Error Invalid type"
- Date: Mon, 10 Jun 2002 08:54:52 -0400
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/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]