?
Solved

XSLT Stylesheet parameter string to nodeset

Posted on 2004-09-07
5
Medium Priority
?
611 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 1500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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…
Suggested Courses

850 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