Solved

XSLT Stylesheet parameter string to nodeset

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
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 create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

912 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

17 Experts available now in Live!

Get 1:1 Help Now