You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Supun Kamburugamuva (JIRA)" <de...@velocity.apache.org> on 2007/08/20 09:01:36 UTC

[jira] Updated: (VELOCITY-362) can't load macros in file loaded with #parse

     [ https://issues.apache.org/jira/browse/VELOCITY-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Supun Kamburugamuva updated VELOCITY-362:
-----------------------------------------

    Attachment: patch.zip

I have attached a zip file with a patch. This patch solves both VELOCITY-529 and VELOCITY-362. I have added two new folders with test files to the code. But it seems like I cannot create a patch with these new folders. So I have created a zip file with these new folders and here is the structure of the zip content. 

-final. patch: a patch with the added folders. 
If this works we only need the above patch file.

If the above patch cannot be applied we can use the following patch. After the patch is applied we need to copy the two folders in the zip file in to "test" files folder 

-final_without_folders.patch: a patch without the added folders
-macrolibs and parsemacros: these the two folders required. 

Another issue is that I got a SVN warning about inconsistent line endings in JavaCC generated files. So I did include only the parser.jjt with the changes. To use the patch, parser should be recompiled using JavaCC.


> can't load macros in file loaded with #parse
> --------------------------------------------
>
>                 Key: VELOCITY-362
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-362
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.4
>         Environment: Operating System: All
> Platform: All
>            Reporter: whxbb
>            Priority: Minor
>             Fix For: 1.6
>
>         Attachments: patch.zip
>
>
> I think this is a big bug. I've used velocity in my projects, erveything is ok
> but this. i want to know it's this problem will be resolved in next version? if
> it's not, i have to abandon velocity.
> the bug is :
> from doc:
>  This is important to remember if you try to #parse() a template containing
> inline #macro() directives. Because the #parse() happens at runtime, and the
> parser decides if a VM-looking element in the template is a VM at parsetime,
> #parse()-ing a set of VM declarations won't work as expected. To get around
> this, simply use the velocimacro.library  facility to have Velocity load your
> VMs at startup.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org