error on context.getVariable [message #64137] |
Fri, 10 July 2009 04:10  |
Eclipse User |
|
|
|
The following construct in a JET transformation template gives an error:
...
<c:setVariable var="x0" select="$c/@name" />
<%
String x1 = (String) context.getVariable("x0");
String x2 = x1 + "_1.xml";
out.write(x2);
%>
The error message is:
Error executing tag handler: java.lang.ClassCastException:
org.eclipse.jet.internal.xpath.NodeSetImpl cannot be cast to
java.lang.String
What could be the cause of this error, and how could I solve it ?
Some background:
The JET template 'work.jet' gets as input an profile that specifies the
names of a set of (other) XML files that it loads inside a loop, and deals
with their content.
In 'main.jet' I have included a dump statement for the profile.
However I want to dump each of the XML files that are specified in the
profile.
For that reason I want (inside 'work.jet') to construct specific names for
these dump files.
Any help is very much appreciated.
Kind regards,
Aart Matsinger
|
|
|
|
Re: error on context.getVariable [message #64211 is a reply to message #64182] |
Fri, 10 July 2009 10:03  |
Eclipse User |
|
|
|
Paul,
Thanks for your help: I tried all alternatives and they are working fine,
except for the one that requires a version a version 1.
I found that I have for JET version 0.9.3 and for JET Core version 1.1.1,
so I assume that seems consistent with your statement.
I am struggling with the basics, so I am learning a lot in this way.
kind regards,
Aart
|
|
|
Powered by
FUDForum. Page generated in 0.04014 seconds