Howard M. Lewis Ship wrote:
Proper XML entities end with a semicolon, soI'm a bit loathe to do this because there are so many operators that would have to be replaced. The parser you use for the tapestry jwc files (I assume that's where this binding is defined) is a straight XML parser, is that right? I don't know anything about the internals of Tapestry so I'm guessing here.
<binding name="condition"
expression="components.foreach.index >= itemIndex &&
components.foreach.index <= itemIndex" />
This is ugly, but it works. BTW, this is just an equality check (or is it a
made up example?)
Drew (and OGNL):
I wouldn't mide seeing some "aliases" for the relational operators that are
XML friendly, i.e., something like:
components.foreach.index .GTEQ. itemindex .AND. components.foreach.index .LTEQ. itemindex
In WebOGNL is use XML for my templates but I have my own XML parser that allows me to put OGNL expressions into the XML without having to go through the pain of escaping operators:
<ognl:if condition="[components.foreach.index >= itemIndex]">
Some HTML here
</ognl:if>
Note the brackets that denote an OGNL expression. Perhaps you could do a similar thing in Tapestry with a pre-processor that would turn the bracketed form into the "escaped" form with XML entities. Just a thought but I think it would be far more readable than using text-based operators (like .AND. etc.).
- Drew
--
+---------------------------------+
< Drew Davidson | OGNL Technology >
+---------------------------------+
| Email: [EMAIL PROTECTED] /
| Web: http://www.ognl.org /
| Vox: (520) 531-1966 <
| Fax: (520) 531-1965 \
| Mobile: (520) 405-2967 \
+---------------------------------+
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer
