The error message I'm getting is:
"XSLT 1.0 Debugging Error: Expression did not evaluate
to a node-set"
I'm using XMLSpy to debug my XSLT, but I'm running my
XSL under Java's XSLT parser which I guess is the
Apache XSLT. I'm running java version 1.4.2_04. The
error I'm getting is from XMLSpy.
The definition of local is:
<xsl:variable name="local"
select="../member[(_at_)component=$localComponent]"/>
And the definition of localComponent is:
<xsl:variable localComponent select = '1' />
Here is the error I get from Java:
org.apache.xpath.XPathException: Can not convert
#STRING to a NodeList!
local and current() are both showing Node-Set in the
debugger. It's only after I assign then to parameters
using with-param that they become RTFs. Oddly enough
the guid and agent are shown as node-sets for
attributes, but the other don't. I don't know what
the problem is.
Thanks
Charlie
Date: Wed, 17 Nov 2004 04:47:26 -0000
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
From: "Michael Kay" <mike(_at_)saxonica(_dot_)com>
Subject: RE: [xsl] Problem passing node-set to params
(RTF)
Message-ID:
<S-UTL01-DCPOPPkLbg70001d508(_at_)dcpop(_dot_)smtp(_dot_)stsn(_dot_)com>
Nothing in the code you have shown us is creating a
result tree
fragment,
though it's possible that $local is an RTF, since you
haven't shown us
its
declaration.
After reading the FAQ it said
that assigning existing variables to parameters
turns
them into RTF. But, when I tried replacing them
with
expressions rather than $var it still ended up a
RTF.
I'm tempted to ask what the FAQ said before you read
it...
Seriously though, you must have misread it. RTFs are
created only by an
xsl:variable, xsl:param, or xsl:with-param element
that has child
instructions rather than a select attribute.
Also, what exactly was the error message? It's better
to quote it
literally,
especially if you don't fully understand it.
Michael Kay
http://www.saxonica.com/
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--