posted 13 years ago
Single and double quotes are 2 of the infamous 5 XML magic characters and therefore can be trouble.
Usually the type of syntax that's in your example works because XML can figure out what you mean from the context, but in cases where it doesn't work, you have to fall back on the entities. The entity for single-quote is "'". Note that final semicolon (;), because it's important.
In any event, trying to do even moderately complex logic in EL is a bugger both to code and debug. Plus, it's a violation of the MVC paradigm that says that the View should display and not attempt to calculate.
So I second Paul's recommendation. Instead of battling EL, you are better off moving the function into a JavaBean.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer