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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

stefcl
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

stefcl
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Clinton Begin
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 <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]


Loading...