I'm going insane here, maybe someone familiar with the parsing of
velocity templates can help out. I have a document which is all
'schmoo'-- it's not a velocity template... yet. I need to make sure
this document, when parsed by velocity, comes out exactly like it is--
so that all schmoo is schmoo. But I'm having a hell of a time doing this.
I figured that it would be a simple matter of escaping every backslash
in the document with another backslash, and then escaping every $ and #
with a backslash. But this doubles the backslashes and does random
stuff with the dollar signs (the directives, at least, all have their
wings clipped).
In particular I notice that \$foo is not guaranteed to come out as $foo
like I would expect. After all what good is an escape sequence if it
doesn't actually escape out of the parsing behavior! But I find that
depending on whether 'foo' happens to be set or not, \$foo will either
come out $foo or \$foo. This extra backslash is totally uncalled for--
I have no way to escape it, and I have no way of knowing whether it will
appear or not since I don't actually care to know what's in the document
I'm handling. I mean, maybe it was legitimately talking about the cost
of foo, or something.
For those curious, I'm actually converting a gigantic content repository
from an ancient templating language into Velocity. It involves taking a
document, escaping everything that Velocity might think is Velocity
because it's just schmoo, and then sprinkling Velocity directives and
variables all over the document (this IS Velocity). How do I tell
Velocity to piss off without having backslashes randomly appear all over
the place, and without actually having to know if the schmoo in question
has 'conflicts' with the context variables that are set?
Thank you for any thoughts,
jason pettiss
Catalis, Inc
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]