Solved

XSLT Stylesheet parameter string to nodeset

Posted on 2004-09-07
5
600 Views
Last Modified: 2013-11-18
If I setup a XSLT Stylesheet parameter and pass a well-formed XML string, then try and perform a nodeset function, it seems that the nodeset function does not work. All I get is a string back - not a nodeset. Whereas, if I assign a variable in the XSLT and type in a well formed XML string, the nodeset function does work. Any ideas?
0
Comment
Question by:jschneider
5 Comments
 
LVL 19

Expert Comment

by:ramazanyich
ID: 12003823
how do you call nodeset ? which XSLT transformer are you using ?
0
 
LVL 15

Expert Comment

by:dualsoul
ID: 12003908
i think you need to assign node set to parameter, try to use addParameter("innerXml",Node);
0
 
LVL 21

Accepted Solution

by:
MogalManic earned 500 total points
ID: 12004848
The XSLT parameter functionality does not convert types.  If the data is passed in as a String, there is no way to convert them into nodesets.  Some XSLT parsers allow you to pass parameters as NodeSets, but you need to parse the XML into a nodeset before passing to the XSLT parser.

If your XSLT processor does not support nodesets, or you do not want to tie yourself to a specific parser, pass the URL to the XML file as the parameter and use the document() function to open the file.
0
 
LVL 15

Expert Comment

by:dualsoul
ID: 12004999
heh...exactly as i've said ;)
0
 

Author Comment

by:jschneider
ID: 12008092
I accepted MogoManic's answer though it make it harder for me to develop my solution. Now I've got to post another question based on this answer.  Thanks!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now