You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by po...@apache.org on 2006/05/13 14:19:39 UTC

svn commit: r406083 - /jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly

Author: polx
Date: Sat May 13 05:19:38 2006
New Revision: 406083

URL: http://svn.apache.org/viewcvs?rev=406083&view=rev
Log:
Fixed the evil error which had nothing to do with jaxen
but with jexl... the i variable was an integer which
jaxen cannot compare to an attribute value... fixed
by using i = i.toString().
paul

Modified:
    jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly

Modified: jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly?rev=406083&r1=406082&r2=406083&view=diff
==============================================================================
--- jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly (original)
+++ jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly Sat May 13 05:19:38 2006
@@ -129,7 +129,8 @@
                     
                     <test:assert xpath="a[@x = '1']"/>
                     
-                    <test:assert xpath="@id = $i"/>
+										<j:set var="i" value="${i.toString()}"/>
+										<test:assert xpath="@id = $i"/>
                     
                     <jsl:applyTemplates/>
                 </jsl:template>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: svn commit: r406083 - /jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly

Posted by Paul Libbrecht <pa...@activemath.org>.
It's a nice question, I don't think it really is and it may be we need a 
layer between Jaxen expressions in jelly and other objects in the context.
Jexl's new version now does more integer types (right?) which happened 
to break a jexl comparison which could not happen against an integer. 
Adding the toString() was the trick...
Maybe we should have jaxen convert more to strings now... or we just let 
people be surprised and add the toString() (as need be, 
integer.toString() is known to be locale dependent so it's a good thing 
for it not to be automatic).

paul

Dion Gillard wrote:
> Paul,
>
> if this really is a problem with Jexl, let me know what the issue is and
> we'll try to get it fixed.
>
> On 5/13/06, polx@apache.org <po...@apache.org> wrote:
>>
>> Author: polx
>> Date: Sat May 13 05:19:38 2006
>> New Revision: 406083
>>
>> URL: http://svn.apache.org/viewcvs?rev=406083&view=rev
>> Log:
>> Fixed the evil error which had nothing to do with jaxen
>> but with jexl... the i variable was an integer which
>> jaxen cannot compare to an attribute value... fixed
>> by using i = i.toString().
>> paul
>>
>> Modified:
>>
>>     
>> jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly 
>>
>>
>> Modified:
>> jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly 
>>
>> URL:
>> http://svn.apache.org/viewcvs/jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly?rev=406083&r1=406082&r2=406083&view=diff 
>>
>>
>> ============================================================================== 
>>
>> ---
>> jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly 
>>
>> (original)
>> +++
>> jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly 
>>
>> Sat May 13 05:19:38 2006
>> @@ -129,7 +129,8 @@
>>
>>                      <test:assert xpath="a[@x = '1']"/>
>>
>> -                    <test:assert xpath="@id = $i"/>
>> +
>> <j:set var="i" value="${i.toString()}"/>
>> +
>> <test:assert xpath="@id = $i"/>
>>
>>                      <jsl:applyTemplates/>
>>                  </jsl:template>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>
>>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: svn commit: r406083 - /jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly

Posted by Dion Gillard <di...@gmail.com>.
Paul,

if this really is a problem with Jexl, let me know what the issue is and
we'll try to get it fixed.

On 5/13/06, polx@apache.org <po...@apache.org> wrote:
>
> Author: polx
> Date: Sat May 13 05:19:38 2006
> New Revision: 406083
>
> URL: http://svn.apache.org/viewcvs?rev=406083&view=rev
> Log:
> Fixed the evil error which had nothing to do with jaxen
> but with jexl... the i variable was an integer which
> jaxen cannot compare to an attribute value... fixed
> by using i = i.toString().
> paul
>
> Modified:
>
>     jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly
>
> Modified:
> jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly
> URL:
> http://svn.apache.org/viewcvs/jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly?rev=406083&r1=406082&r2=406083&view=diff
>
> ==============================================================================
> ---
> jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly
> (original)
> +++
> jakarta/commons/proper/jelly/trunk/jelly-tags/jsl/src/test/org/apache/commons/jelly/jsl/suite.jelly
> Sat May 13 05:19:38 2006
> @@ -129,7 +129,8 @@
>
>                      <test:assert xpath="a[@x = '1']"/>
>
> -                    <test:assert xpath="@id = $i"/>
> +
> <j:set var="i" value="${i.toString()}"/>
> +
> <test:assert xpath="@id = $i"/>
>
>                      <jsl:applyTemplates/>
>                  </jsl:template>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>


-- 
http://www.multitask.com.au/people/dion/
Chuck Norris sleeps with a night light. Not because Chuck Norris is afraid
of the dark, but because the dark is afraid of Chuck Norris