• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 615
  • Last Modified:

XSLT Stylesheet parameter string to nodeset

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
jschneider
Asked:
jschneider
1 Solution
 
ramazanyichCommented:
how do you call nodeset ? which XSLT transformer are you using ?
0
 
dualsoulCommented:
i think you need to assign node set to parameter, try to use addParameter("innerXml",Node);
0
 
MogalManicCommented:
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
 
dualsoulCommented:
heh...exactly as i've said ;)
0
 
jschneiderAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now