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, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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="[EMAIL PROTECTED] = '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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to