[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Problem passing node-set to params (RTF)

Subject: RE: Problem passing node-set to params (RTF)
From: Charlie Consumer <faceless1976@xxxxxxxxx>
Date: Wed, 17 Nov 2004 14:49:44 -0800 (PST)
xslt passing node
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[@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@xxxxxxxxxxxxxxxxxxxxxx>
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Subject: RE:  Problem passing node-set to params
(RTF)
Message-ID:
<S-UTL01-DCPOPPkLbg70001d508@xxxxxxxxxxxxxxxxxxx>

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 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.