SPR-5518: Documented ability to use text rather than symbols for SPEL operators (lt, le, gt, ge, eq, ne, div, mod, not). Can help in XML specification of expressions.

This commit is contained in:
Andy Clement 2009-10-01 19:39:20 +00:00
parent 10e26e6dc7
commit 076fc89a50
1 changed files with 6 additions and 0 deletions

View File

@ -577,6 +577,12 @@ boolean falseValue =
parser.parseExpression("'5.0067' matches '^-?\\d+(\\.\\d{2})?$'").getValue(Boolean.class); parser.parseExpression("'5.0067' matches '^-?\\d+(\\.\\d{2})?$'").getValue(Boolean.class);
</programlisting> </programlisting>
<para>Each symbolic operator can also be specified as a purely alphabetic equivalent. This avoids
problems where the symbols used have special meaning for the document type in which
the expression is embedded (eg. an XML document). The textual equivalents are shown
here: lt ('&lt;'), gt ('&gt;'), le ('&lt;='), ge ('&gt;='),
eq ('=='), ne ('!='), div ('/'), mod ('%'), not ('!').
These are case insensitive.</para>
</section> </section>
<section> <section>