Daniel Rall wrote:
> 
> Leon Messerschmidt <[EMAIL PROTECTED]> writes:
> 
> > Hi,
> >
> > After looking at the possibilities mentioned on this list and playing around
> > with the idea I'd like to like to propose an InsertionListener as a solution
> > to the XML entity replacement problem.
> >
> > The InsertionListener interface will look something like this:
> >
> > public interface InsertionListener
> > {
> >     public String beforeInsert (String value)
> > }
> >
> > When a value is being inserted by ASTReference the beforeInsert () method is
> > called with the value to be inserted.  The Listener Implementation is free
> > to manipulate the string in any way and it returns the final string.
> >
> > I will add a setInsertionListener() method to the Context Interface.  An
> > alternative could be to add a listener to the template, but I think the
> > context allows for more freedom.
> >
> > Are there any objections if I go ahead with this?
> 
> I would like there to be a runtime performance hit of no more than one
> operation if no listeners are registered.

I would prefer is there was *no* runtime performance hit 

:)

geir

-- 
Geir Magnusson Jr.                               [EMAIL PROTECTED]
Developing for the web?  See http://jakarta.apache.org/velocity/

Reply via email to