Vadim Gritsenko (JIRA) pisze:
Vadim Gritsenko commented on COCOON-2110:
-----------------------------------------
Don't we have a history of using #{foo} for jxpath and ${foo} for jexl? Doing
it differently
would just result in more confusion. I'd rather have it more uniform throughout.
Actually, such syntax is supported[1] in our code for almost two years now. I believe that it was
Sylvain who proposed[2] prefixes for languages, first time. Then it was Reinhard who followed up[3]
Sylvain's idea:
A.) Rewrite/refactor JXTemplate
- break it up in smaller, easier understandable/maintainable pieces
- deprecate #{} syntax and make expression languages plugable as
Sylvain suggested
- investigate the performance problems (I guess there are only
problems if macros are used)
- add the missing things from above
To sum up, new syntax has been introduced during refactoring of Template block and since community
already voted to switch to refactored code it also voted for new syntax.
Speaking about myself I prefer much more language prefixes and I think we should go for it. The
question that we need to answer is if we want to support #{} syntax in sitemap? Since it was never
there I don't think it makes sense to do so.
I would prefer to just create migration guide that would clarify current situation of expressions
evaluation and would advice to use new syntax everywhere. Also, switching to new syntax is really
trivial, it involves find & replace operation based on simple regexp. Is it a really big deal if
it's well described?
[1] http://article.gmane.org/gmane.text.xml.cocoon.cvs/17868
[2] http://article.gmane.org/gmane.text.xml.cocoon.devel/42659
[3] http://article.gmane.org/gmane.text.xml.cocoon.devel/42857
--
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/