Page 1 of 1

String to Nodelist

Posted: Thu Nov 03, 2005 4:55 am
by prashuss
I've XML schema as shown below:

I've to display the 2 rows corresponding to Beneficiary. Each row will contain name, relationship & percent. I was able to display these rows but I couldn't assign the XPATH to them. I've a written a loop to display these rows & when I'm concatenating the XPATH with Beneficiary & then appending 1, 2 ....through for-loop, I'm getting an exception, since it bacame the string after concatenation. What I need is a value & not a string. Can anyone help?

Posted: Thu Nov 03, 2005 5:54 am
by prashuss
Basically, I want to evaluate a string as an XPath expression in XSL. How can I do that????

Posted: Thu Nov 03, 2005 12:02 pm
by george

If you want to use standard XSLT then the solution is to split the transformation in a couple of steps. For instance you can apply a stylesheet S1 on your XML data that will generate also a styelsheet, let's say S2. Then you apply S2 on the XML data and get your final output. In this way you can generate with S1 code that will be considered as XSLT code in the second step.
If you do not have problems with a certain XSLT processor dependency then you can use that processor evaluate extension if available, for instance Saxon has such an extension function: ... l#evaluate

Best Regards,