You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by stefcl <st...@gmail.com> on 2009/12/14 10:33:17 UTC

Small error in v3 manual : conditional "&&" is not allowed

Hello,

Just to report that the following example in the manual :

<if test=”author != null && author.name != null”>

doesn't work because character "&" has a special meaning in XML.

Correct form should be something like 
<if test="author != null &amp;&amp; author.name != null">

which is less readable :-(. would be great if we had operators like "AND" or
"_AND_" instead which are more XML friendly.

Kind regards 
-- 
View this message in context: http://old.nabble.com/Small-error-in-v3-manual-%3A-conditional-%22--%22-is-not-allowed-tp26775069p26775069.html
Sent from the iBATIS - Dev mailing list archive at Nabble.com.


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


Re: Small error in v3 manual : conditional "&&" is not allowed

Posted by Clinton Begin <cl...@gmail.com>.
Good news... you can use "and".  OGNL seems to support 'and' and 'or'.  I'll
update the manual to avoid the crap syntax.  :-)


Cheers,
Clinton

On Mon, Dec 14, 2009 at 3:27 AM, stefcl <st...@gmail.com> wrote:

>
> Please note that my corrected form doesn't show correctly on Nabble because
> HTML entities are not properly escaped. Actually "&&" is "& amp ; & amp ;"
> without spaces
> --
> View this message in context:
> http://old.nabble.com/Small-error-in-v3-manual-%3A-conditional-%22--%22-is-not-allowed-tp26775069p26775691.html
> Sent from the iBATIS - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: dev-help@ibatis.apache.org
>
>

Re: Small error in v3 manual : conditional "&&" is not allowed

Posted by stefcl <st...@gmail.com>.
Please note that my corrected form doesn't show correctly on Nabble because
HTML entities are not properly escaped. Actually "&&" is "& amp ; & amp ;"
without spaces
-- 
View this message in context: http://old.nabble.com/Small-error-in-v3-manual-%3A-conditional-%22--%22-is-not-allowed-tp26775069p26775691.html
Sent from the iBATIS - Dev mailing list archive at Nabble.com.


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