You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Jose de Castro <jo...@voxeo.com> on 2007/09/19 18:41:17 UTC
Cannot get engine to render $.
I cannot get the Velocity engine to render '$.' (a dollar sign followed
by a dot). The dollar sign is being omitted from the output. I have
tried escaping the dollar sign by writing it as '\$.' with no luck. Any
help will be greatly appreciated.
Here is some test output:
$.
\$.
renders
.
.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org
Re: Cannot get engine to render $.
Posted by Nathan Bubna <nb...@gmail.com>.
On 9/21/07, Jose de Castro <jo...@voxeo.com> wrote:
>
> It sure did. Clever hack. I'd still like to see some resolution to the root
> cause though. I'll open that ticket and possibly even take a crack at fixing
> it this weekend.
Sounds great!
> Thanks again,
> Jose de Castro
>
>
> Nathan Bubna wrote:
> Yeah, that'd be great. thanks! Did the $#**#. trick work?
>
> On 9/21/07, Jose de Castro <jo...@voxeo.com> wrote:
>
>
> So should I file a bug report for this?
>
> Thanks,
> Jose
>
>
> Nathan Bubna wrote:
> This seems to be some sort of strange parser bug you've run into. The
> escaping your trying doesn't work because it is reference escaping and
> reference escaping is for escaping references, which $. is not.
>
> You might also try
> $#**#
>
> to avoid a context lookup. Though, i haven't tried it, and who knows
> what the parser will think of it.
>
> On 9/19/07, Jose de Castro <jo...@voxeo.com> wrote:
>
>
> Thanks Nathan. That's what I'm doing now but there has to be a better way.
> I'd like to avoid a VelocityContext lookup if possible.
>
> Does anyone know why I'm experiencing this behavior? Why s the escape
> character not working in this particular use case?
>
> Nathan Bubna wrote:
> #set( $D = '$' )${D}.
>
> On 9/19/07, Jose de Castro <jo...@voxeo.com> wrote:
>
>
> I cannot get the Velocity engine to render '$.' (a dollar sign followed
> by a dot). The dollar sign is being omitted from the output. I have
> tried escaping the dollar sign by writing it as '\$.' with no luck. Any
> help will be greatly appreciated.
>
> Here is some test output:
>
> $.
> \$.
>
> renders
>
> .
> .
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@velocity.apache.org For additional
> commands, e-mail: user-help@velocity.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@velocity.apache.org For additional
> commands, e-mail: user-help@velocity.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@velocity.apache.org For additional
> commands, e-mail: user-help@velocity.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org
Re: Cannot get engine to render $.
Posted by Nathan Bubna <nb...@gmail.com>.
Yeah, that'd be great. thanks! Did the $#**#. trick work?
On 9/21/07, Jose de Castro <jo...@voxeo.com> wrote:
>
> So should I file a bug report for this?
>
> Thanks,
> Jose
>
>
> Nathan Bubna wrote:
> This seems to be some sort of strange parser bug you've run into. The
> escaping your trying doesn't work because it is reference escaping and
> reference escaping is for escaping references, which $. is not.
>
> You might also try
> $#**#
>
> to avoid a context lookup. Though, i haven't tried it, and who knows
> what the parser will think of it.
>
> On 9/19/07, Jose de Castro <jo...@voxeo.com> wrote:
>
>
> Thanks Nathan. That's what I'm doing now but there has to be a better way.
> I'd like to avoid a VelocityContext lookup if possible.
>
> Does anyone know why I'm experiencing this behavior? Why s the escape
> character not working in this particular use case?
>
> Nathan Bubna wrote:
> #set( $D = '$' )${D}.
>
> On 9/19/07, Jose de Castro <jo...@voxeo.com> wrote:
>
>
> I cannot get the Velocity engine to render '$.' (a dollar sign followed
> by a dot). The dollar sign is being omitted from the output. I have
> tried escaping the dollar sign by writing it as '\$.' with no luck. Any
> help will be greatly appreciated.
>
> Here is some test output:
>
> $.
> \$.
>
> renders
>
> .
> .
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@velocity.apache.org For additional
> commands, e-mail: user-help@velocity.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@velocity.apache.org For additional
> commands, e-mail: user-help@velocity.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org
Re: Cannot get engine to render $.
Posted by Nathan Bubna <nb...@gmail.com>.
This seems to be some sort of strange parser bug you've run into. The
escaping your trying doesn't work because it is reference escaping and
reference escaping is for escaping references, which $. is not.
You might also try
$#**#
to avoid a context lookup. Though, i haven't tried it, and who knows
what the parser will think of it.
On 9/19/07, Jose de Castro <jo...@voxeo.com> wrote:
>
> Thanks Nathan. That's what I'm doing now but there has to be a better way.
> I'd like to avoid a VelocityContext lookup if possible.
>
> Does anyone know why I'm experiencing this behavior? Why s the escape
> character not working in this particular use case?
>
> Nathan Bubna wrote:
> #set( $D = '$' )${D}.
>
> On 9/19/07, Jose de Castro <jo...@voxeo.com> wrote:
>
>
> I cannot get the Velocity engine to render '$.' (a dollar sign followed
> by a dot). The dollar sign is being omitted from the output. I have
> tried escaping the dollar sign by writing it as '\$.' with no luck. Any
> help will be greatly appreciated.
>
> Here is some test output:
>
> $.
> \$.
>
> renders
>
> .
> .
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@velocity.apache.org For additional
> commands, e-mail: user-help@velocity.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org
Re: Cannot get engine to render $.
Posted by Nathan Bubna <nb...@gmail.com>.
#set( $D = '$' )${D}.
On 9/19/07, Jose de Castro <jo...@voxeo.com> wrote:
> I cannot get the Velocity engine to render '$.' (a dollar sign followed
> by a dot). The dollar sign is being omitted from the output. I have
> tried escaping the dollar sign by writing it as '\$.' with no luck. Any
> help will be greatly appreciated.
>
> Here is some test output:
>
> $.
> \$.
>
> renders
>
> .
> .
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org