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

Re: error using XNodeSet to pass global stylesheet par

Subject: Re: error using XNodeSet to pass global stylesheet parameters (in Xal an)
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Fri, 26 Jan 2001 16:27:00 +0000
Re:  error using XNodeSet to pass global stylesheet par
Hi Vasu,

> in my xslt sheet i have a global parameter defined as follows
>
> <xsl:param name="listofnames"/>
>
> and in some template i try this
>
> <xsl:variable name="names" select="$listofnames/Name"/>
>
> I get this error. "XPATH: Can not convert #RTREEFRAG to a NodeList!"

It looks as though when you pass in a node list to the stylesheet, it
interprets it as a result tree fragment (as if you'd defined the value
of the parameter in the content of the xsl:param).  To then index into
it, you need to convert that result tree fragment into a node set.
You can do this with xalan:nodeset - have a look at the documentation
at http://xml.apache.org/xalan-j/extensionslib.html#nodeset for more
details - something like:

<xsl:variable name="names" select="xalan:nodeset($listofnames)/Name" />

I hope that helps,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.