Leon Messerschmidt wrote:
>
> > Sorry for not responding earlier, but I can't say I'm all that
> > keep on adding methods to the context or template to transform
> > your input.
> >
> > If I understand correctly you might be pull a string from a database,
> > and that string needs to have the XML entities escape before being
> > placed in your template? So:
> >
> > <text>[some text that may contain XML entities]</text>
>
> This is exactly what I'm talking about. If you have an idea please tell me
> it 'cause I'm at a bit of a dead-end here. I'm using a hacked version of
> Velocity at the moment - not very elegant :-(
>
You may have read some of the discussion between Jose and I, but since
you are actually doing it, maybe you can answer some of the stuff we
were talking about :
1) Is your listener sensitive to where you are in the template? I.e.
how do you know if you should escape the insert?
2) Why isn't post processing of the stream, or a smarter writer a
possible solution? It might mean you would have to remove the
pre-escaped entities in the constant parts of the templates, but that
would seem to me to make the template even more flexible, as you could
post process with different escape rules (although I am sure you don't
care about that... you just want to get the XML done...)
geir
--
Geir Magnusson Jr. [EMAIL PROTECTED]
Developing for the web? See http://jakarta.apache.org/velocity/