[xslt] Incomplete error message "Error Invalid type"
- From: "Thomas Mauch" <thomas mauch calanda-technology com>
- To: <xslt gnome org>
- Subject: [xslt] Incomplete error message "Error Invalid type"
- Date: Mon, 10 Jun 2002 10:58:50 +0200
Title: Message
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.
Thomas
--------------------------
<?xml
version="1.0"?>
<xsl:output
method="xml" indent="yes"/>
<xsl:template
match="/">
<xsl:variable
name="record">
<Record>
<Value>10</Value>
</Record>
</xsl:variable>
<!--
Error message ok -->
<!-- <xsl:value-of select="$record/Value"/>
-->
<!-- Bad error
message -->
<xsl:for-each
select="$record/Value">
<xsl:value-of
select="."/>
</xsl:for-each>
</xsl:template>
</xsl:transform>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]