You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2005/03/03 16:05:38 UTC

JXTemplate boolean syntax

How do I use the "and" syntax in a JXTemplate 
boolean test?

If I have:
<jx:if test="${bar1 != null && (foo1 != null">
I get:
org.xml.sax.SAXParseException: The entity name must immediately follow
the '&' in the entity reference.

But if I use:
<jx:if test="${bar1 != null &amp;&amp; (foo1!= null">
or
<jx:if test="${bar1 != null and (foo1!= null">

I get:
org.apache.commons.jexl.parser.ParseException: Encountered ";". Was
expecting one of: ")" ... "||" ... "or" ... "&&" ... "and" ... "|" ...
"^" ... "&" ... "==" ... "eq" ... "!=" ... "ne" ... "<" ... "lt" ... ">"
... "gt" ... "<=" ... "le" ... ">=" ... "ge" ... "+" ... "-" ... "*" ...
"/" ... "div" ... "%" ... "mod" ... 

Thanks
Derek


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: JXTemplate boolean syntax

Posted by Ugo Cei <ug...@apache.org>.
Il giorno 03/mar/05, alle 16:05, Derek Hohls ha scritto:

> How do I use the "and" syntax in a JXTemplate
> boolean test?
>
<snip/>
> org.apache.commons.jexl.parser.ParseException: Encountered ";". Was
> expecting one of: ")" ... "||" ... "or" ... "&&" ... "and" ... "|" ...
> "^" ... "&" ... "==" ... "eq" ... "!=" ... "ne" ... "<" ... "lt" ... 
> ">"
> ... "gt" ... "<=" ... "le" ... ">=" ... "ge" ... "+" ... "-" ... "*" 
> ...
> "/" ... "div" ... "%" ... "mod" ...

I think the answer is right before your eyes: "Was expecting one of 
.... 'and' ....".

	Ugo

-- 
Ugo Cei - http://agylen.com/blojsom/blog/