Solved

XSLT Stylesheet parameter string to nodeset

Posted on 2004-09-07
5
605 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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn how to dynamically set the form action using jQuery.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

749 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