Jose Alberto Fernandez wrote:
>
> > From: Geir Magnusson Jr. [mailto:[EMAIL PROTECTED]]
> >
> >
> > Leon Messerschmidt [mailto:[EMAIL PROTECTED]]
> >
> > > For what it is worth - I like this approach best. It gives
> > > you the power to
> > > escape everything that you would like to do, but in the
> > > exceptional cases
> > > you are still able to switch the escaping of in a template.
> >
> > Since you now have to sprinkle Velocimacros around every
> > single use of the
> > technique you want to use :
> >
> > #macro(ident, $value)$xml.turnOff(true)$value$xml.turnOff(false)#end
> >
> > Why not just do the escaping in the Velocimacro itself? Or use a
> > context-based tool directly?
> >
>
> Did I mentioned the 95%-5% rule before. I think the whole point of the
> argument requesting a listener is that it is useful in cases where you need
> to performe replacements more times than not.
I don't remember the 95/5 rule. And I don't think anyone has made the
case that you would have more times than not :)
> Using escaping in the velocimacro is fine, when you need few things escaped,
> but it becomes very error prone when you, or actually a non XML expert,
> needs to call escape on almost everything.
Ya.
> Just to make clear we are all in the same page, in my example, you only need
> to use #ident($blah) in those rare cases in which you do not want escaping.
>
> True, you still need to call something sometimes, but we are back in balance
> in the sense of only requiring action for the exception and not the rule.
If that's really the case, I agree.
--
Geir Magnusson Jr. [EMAIL PROTECTED]
Developing for the web? See http://jakarta.apache.org/velocity/