You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Paul Curren (JIRA)" <de...@velocity.apache.org> on 2008/07/14 07:09:32 UTC

[jira] Created: (VELOCITY-604) Allow definition of macro's within parsed files

Allow definition of macro's within parsed files
-----------------------------------------------

                 Key: VELOCITY-604
                 URL: https://issues.apache.org/jira/browse/VELOCITY-604
             Project: Velocity
          Issue Type: Improvement
          Components: Engine
    Affects Versions: 1.5, 1.4
            Reporter: Paul Curren


Your documentation at http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#velocimacro_miscellany has the following snippet -
{panel}
h1. Velocimacro Trivia
Currently, Velocimacros must be defined before they are first used in a template. This means that your #macro() declarations should come before using the Velocimacros.

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.
{panel}

Is this likely to change in any forthcoming versions?

The use case is theme development for Confluence.  It would be nice to be able to share some common macro definitions between a number of templates within a theme (i.e. not inlining). And using the _velocimacro.library_ property isn't really an option because themes are dynamically loaded or unloaded.

-- 
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


[jira] Updated: (VELOCITY-604) Document: Allow definition of macro's within parsed files

Posted by "Will Glass-Husain (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Will Glass-Husain updated VELOCITY-604:
---------------------------------------

      Component/s:     (was: Engine)
                   Documentation
         Priority: Minor  (was: Major)
    Fix Version/s: 1.6
          Summary: Document: Allow definition of macro's within parsed files  (was: Allow definition of macro's within parsed files)

> Document: Allow definition of macro's within parsed files
> ---------------------------------------------------------
>
>                 Key: VELOCITY-604
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-604
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 1.4, 1.5
>            Reporter: Paul Curren
>            Priority: Minor
>             Fix For: 1.6
>
>
> Your documentation at http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#velocimacro_miscellany has the following snippet -
> "
> Velocimacro Trivia
> -------------------------
> Currently, Velocimacros must be defined before they are first used in a template. This means that your #macro() declarations should come before using the Velocimacros.
> 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.
> Is this likely to change in any forthcoming versions?
> The use case is theme development for Confluence.  It would be nice to be able to share some common macro definitions between a number of templates within a theme (i.e. not inlining). And using the velocimacro.library property isn't really an option because themes are dynamically loaded or unloaded.

-- 
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


[jira] Commented: (VELOCITY-604) Document: Allow definition of macro's within parsed files

Posted by "Paul Curren (JIRA)" <de...@velocity.apache.org>.
    [ https://issues.apache.org/jira/browse/VELOCITY-604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613252#action_12613252 ] 

Paul Curren commented on VELOCITY-604:
--------------------------------------

Great, thanks for that.

> Document: Allow definition of macro's within parsed files
> ---------------------------------------------------------
>
>                 Key: VELOCITY-604
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-604
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 1.4, 1.5
>            Reporter: Paul Curren
>            Priority: Minor
>             Fix For: 1.6
>
>
> Your documentation at http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#velocimacro_miscellany has the following snippet -
> "
> Velocimacro Trivia
> -------------------------
> Currently, Velocimacros must be defined before they are first used in a template. This means that your #macro() declarations should come before using the Velocimacros.
> 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.
> Is this likely to change in any forthcoming versions?
> The use case is theme development for Confluence.  It would be nice to be able to share some common macro definitions between a number of templates within a theme (i.e. not inlining). And using the velocimacro.library property isn't really an option because themes are dynamically loaded or unloaded.

-- 
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


[jira] Commented: (VELOCITY-604) Allow definition of macro's within parsed files

Posted by "Will Glass-Husain (JIRA)" <de...@velocity.apache.org>.
    [ https://issues.apache.org/jira/browse/VELOCITY-604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613244#action_12613244 ] 

Will Glass-Husain commented on VELOCITY-604:
--------------------------------------------

Thanks, Paul. This is fixed in the forthcoming version 1.6.  You can download from svn head and try it out.

I'm changing this issue to note we need to fix the docs.

> Allow definition of macro's within parsed files
> -----------------------------------------------
>
>                 Key: VELOCITY-604
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-604
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.4, 1.5
>            Reporter: Paul Curren
>
> Your documentation at http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#velocimacro_miscellany has the following snippet -
> "
> Velocimacro Trivia
> -------------------------
> Currently, Velocimacros must be defined before they are first used in a template. This means that your #macro() declarations should come before using the Velocimacros.
> 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.
> Is this likely to change in any forthcoming versions?
> The use case is theme development for Confluence.  It would be nice to be able to share some common macro definitions between a number of templates within a theme (i.e. not inlining). And using the velocimacro.library property isn't really an option because themes are dynamically loaded or unloaded.

-- 
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


[jira] Resolved: (VELOCITY-604) Document: Allow definition of macro's within parsed files

Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Bubna resolved VELOCITY-604.
-----------------------------------

    Resolution: Fixed

Ok, that section of docs has been updated.

> Document: Allow definition of macro's within parsed files
> ---------------------------------------------------------
>
>                 Key: VELOCITY-604
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-604
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 1.4, 1.5
>            Reporter: Paul Curren
>            Priority: Minor
>             Fix For: 1.6
>
>
> Your documentation at http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#velocimacro_miscellany has the following snippet -
> "
> Velocimacro Trivia
> -------------------------
> Currently, Velocimacros must be defined before they are first used in a template. This means that your #macro() declarations should come before using the Velocimacros.
> 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.
> Is this likely to change in any forthcoming versions?
> The use case is theme development for Confluence.  It would be nice to be able to share some common macro definitions between a number of templates within a theme (i.e. not inlining). And using the velocimacro.library property isn't really an option because themes are dynamically loaded or unloaded.

-- 
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


[jira] Updated: (VELOCITY-604) Allow definition of macro's within parsed files

Posted by "Paul Curren (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Curren updated VELOCITY-604:
---------------------------------

    Description: 
Your documentation at http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#velocimacro_miscellany has the following snippet -

"
Velocimacro Trivia
-------------------------
Currently, Velocimacros must be defined before they are first used in a template. This means that your #macro() declarations should come before using the Velocimacros.

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.

Is this likely to change in any forthcoming versions?

The use case is theme development for Confluence.  It would be nice to be able to share some common macro definitions between a number of templates within a theme (i.e. not inlining). And using the velocimacro.library property isn't really an option because themes are dynamically loaded or unloaded.

  was:
Your documentation at http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#velocimacro_miscellany has the following snippet -
{panel}
h1. Velocimacro Trivia
Currently, Velocimacros must be defined before they are first used in a template. This means that your #macro() declarations should come before using the Velocimacros.

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.
{panel}

Is this likely to change in any forthcoming versions?

The use case is theme development for Confluence.  It would be nice to be able to share some common macro definitions between a number of templates within a theme (i.e. not inlining). And using the _velocimacro.library_ property isn't really an option because themes are dynamically loaded or unloaded.


> Allow definition of macro's within parsed files
> -----------------------------------------------
>
>                 Key: VELOCITY-604
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-604
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.4, 1.5
>            Reporter: Paul Curren
>
> Your documentation at http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#velocimacro_miscellany has the following snippet -
> "
> Velocimacro Trivia
> -------------------------
> Currently, Velocimacros must be defined before they are first used in a template. This means that your #macro() declarations should come before using the Velocimacros.
> 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.
> Is this likely to change in any forthcoming versions?
> The use case is theme development for Confluence.  It would be nice to be able to share some common macro definitions between a number of templates within a theme (i.e. not inlining). And using the velocimacro.library property isn't really an option because themes are dynamically loaded or unloaded.

-- 
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