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.
An IDE is no substitute for an Intelligent Developer.
Joined: Aug 20, 2010
Thank you Tim.
I will go with your suggestion. I will handle the ( ' ) at the bean level.