String to Nodelist

Here should go questions about transforming XML with XSLT and FOP.
Posts: 2

String to Nodelist

Thu Nov 03, 2005 4:55 am

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?
Posts: 2

Thu Nov 03, 2005 5:54 am

Basically, I want to evaluate a string as an XPath expression in XSL. How can I do that????
Site Admin
Posts: 2100

Thu Nov 03, 2005 12:02 pm


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,

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 2 guests