[ http://issues.apache.org/jira/browse/VELOCITY-395?page=all ]

Will Glass-Husain updated VELOCITY-395:
---------------------------------------

    Bugzilla Id:   (was: 35738)
      Component: Documentation
                     (was: Source)
           type: Improvement  (was: Bug)
    Description: 
I think the semantics of the escaping operator \ (backslash) are not documented 
clearly. Especially I miss this ones:

Why generates
 \$foo ==> $foo
but
 \${foo} ==> \${foo}
this seems inconsistent to me. I expect
 \${foo} ==> ${foo}

I understand that
   ${foo:bar}
raises an error since there are no : (colons)
allowed in a variable-name.
But why raises
   \${foo:bar}
also an error? I would expect that \$ disables the function of $
as an operator, so that the following {..} will not be parsed as
a variable name.

There should be a simple way to generate something like
  ${foo:bar}
or even
  ${not a variable name at all &%$}
The workaround
   #set($D='$')
   ${D}{foo:bar}
is undocumented and REALLY ugly.

  was:
I think the semantics of the escaping operator \ (backslash) are not documented 
clearly. Especially I miss this ones:

Why generates
 \$foo ==> $foo
but
 \${foo} ==> \${foo}
this seems inconsistent to me. I expect
 \${foo} ==> ${foo}

I understand that
   ${foo:bar}
raises an error since there are no : (colons)
allowed in a variable-name.
But why raises
   \${foo:bar}
also an error? I would expect that \$ disables the function of $
as an operator, so that the following {..} will not be parsed as
a variable name.

There should be a simple way to generate something like
  ${foo:bar}
or even
  ${not a variable name at all &%$}
The workaround
   #set($D='$')
   ${D}{foo:bar}
is undocumented and REALLY ugly.

    Environment: 
Operating System: Windows 2000
Platform: PC

  was:
Operating System: Windows 2000
Platform: PC

      Assign To:     (was: Velocity-Dev List)
       Priority: Minor  (was: Major)

> Semantics of escaping unclear
> -----------------------------
>
>          Key: VELOCITY-395
>          URL: http://issues.apache.org/jira/browse/VELOCITY-395
>      Project: Velocity
>         Type: Improvement
>   Components: Documentation
>     Versions: 1.3.1
>  Environment: Operating System: Windows 2000
> Platform: PC
>     Reporter: Frank Fischer
>     Priority: Minor
>      Fix For: 1.6

>
> I think the semantics of the escaping operator \ (backslash) are not 
> documented 
> clearly. Especially I miss this ones:
> Why generates
>  \$foo ==> $foo
> but
>  \${foo} ==> \${foo}
> this seems inconsistent to me. I expect
>  \${foo} ==> ${foo}
> I understand that
>    ${foo:bar}
> raises an error since there are no : (colons)
> allowed in a variable-name.
> But why raises
>    \${foo:bar}
> also an error? I would expect that \$ disables the function of $
> as an operator, so that the following {..} will not be parsed as
> a variable name.
> There should be a simple way to generate something like
>   ${foo:bar}
> or even
>   ${not a variable name at all &%$}
> The workaround
>    #set($D='$')
>    ${D}{foo:bar}
> is undocumented and REALLY ugly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to