commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [JELLY] Using an attribute's value selected using xpath expression as variable
Date Sun, 27 Nov 2005 14:22:29 GMT
I want to output the result of the processing of a stylesheet to a file
based on the value of an attribute.
I retrieve the value of the attribute using an "<x:set..." from the XML
tag library and  I use it later.
Insteadof giving me the value of the attribute as a string, It returns an
object (DefaultAttribute).
If I try to get the value of that object using "${name.getValue()}", the
result is an empty string

How can I do it ?

The code sample is :
<x:forEach select="xsd:complexType">
	    <x:set select="@name" var="name"/>
            package test;
                <x:expr select="@name" />
		getName() result: <j:expr value="${name}"/>
		<j:expr value="${name.getValue()}"/>
<j:file name="${name}.java">

The name of the created file is something like :
[org.dom4j.tree.DefaultAttribute@143c8b3 [Attribute: name name value


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message