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

error using XNodeSet to pass global stylesheet paramet

Subject: error using XNodeSet to pass global stylesheet parameters (in Xalan)
From: "Durgavarjhula, Vasu" <vasud@xxxxxxxxxxxxx>
Date: Wed, 24 Jan 2001 19:35:45 -0800
xnodeset element
I am trying to pass an XNodeSet as a global parameter to a stylesheet, but
when i try to use that parameter in the stylesheet it is
giving an error "XPATH: Can not convert #RTREEFRAG to a NodeList!"

This is what i did


Created a org.w3c.dom.Element and made an XNodeSet out of it.
Element NameList;
XNodeSet namenodelist = new XNodeSet(NameList);
The XML representation of NameList is below:
<NameList>
	<Name value="John"/>
	<Name value="Robert"/>
	<Name value="Mark"/>
</NameList>

then I set it using setStylesheetParam method of
org.apache.xalan.xslt.XSLTProcessor 
for eg setStylesheetParam("listofnames", namenodeset )

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"/>

Basically I am trying to access the Name nodes of the NameList parameter I
passed in, but it does not work.

I get this error. "XPATH: Can not convert #RTREEFRAG to a NodeList!"

Can someone figure out the problem in my methodology.

thanks

-Vasu

 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.