You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Henning Schmiedehausen (JIRA)" <de...@velocity.apache.org> on 2007/01/24 18:11:49 UTC

[jira] Updated: (VELOCITY-442) Need a standard Velocity class for doing macro preprocessing for various files (XML, HTML, scripts, source files..)

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

Henning Schmiedehausen updated VELOCITY-442:
--------------------------------------------

    Component/s: Engine
       Priority: Minor  (was: Major)

same as VELOCITY-441.

> Need a standard Velocity class for doing macro preprocessing for various files (XML, HTML, scripts, source files..)
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: VELOCITY-442
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-442
>             Project: Velocity
>          Issue Type: Sub-task
>          Components: Engine
>    Affects Versions: 1.4
>         Environment: WindowsXP
>            Reporter: Colbert Philippe
>            Priority: Minor
>
> Need to have standard class to do macro preprocessing of various files, source code..etc.
> Hi!  I raised this issue before but I think I did not express myself correctly.  I was misunderstood.  So I am attempting a second time.  I am rephrasing my thoughts here.
> As you know, there are many files that use Velocity type, macro preprocessing.  To name a few: HTML, XML, programming language source-code...etc.   With the use of XML as configuration file, I find that having a standard macro preprocessor like Velocity would be most useful.
> When a user does preprocessing, he/she often has a library of macros (Velocity *.vm files).  These macros can be located in different file directories.  This is a very useful and powerful feature for the user.   It avoids time-wasting, repetitive typing.
> My suggestion is that Velocity provides a single and standard class for doing macro preprocessing.   The class will be callable from the command-line.  It should be easy to implement.   The class will take a list of directory locations where it can find macros that are being called.   Furthermore, it will have two parameters for source and destination directory locations.   The source directory is the location of source files.   The destination directory will be the destination of the result file.   The source and destination directories can be the same.   
> I suggest using the following convention:  The standard class will transform any file that end with given suffix(es).  For instance; every file that ends with suffix  *.velocity or  *.vm will be processed and transformed to a file with its suffix only.
> MyFile.html.velocity >>> MyFile.html
> MyFile.xml.vm >>> MyFile.xml
> MyFile.python.velocity >>> MyFile.python
> The important thing here is that the suffixes that are searched for should also be a parameter as to allow full freedom for the user.   In other words, the user can specify suffixes *.macro or *.textmacro instead of *.velocity or/and *.vm.
> This simple standard class will go a long way to make Velocity more standard and generally usable.  Velocity will not only be a powerful Java library, it will also be a powerful text processor.   Many programmers and users will be encouraged to use it because it is standard and for general purpose.   This standard class should be readily available in the Velocity jar file without any Java programming.
> As an extension to this standard Velocity class, you can have an ANT task that will do the exact same thing for those who like to use ANT.

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