velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Kong <anthony.k...@ufjia.com>
Subject RE: Running velocity in command line
Date Mon, 31 Mar 2003 10:12:20 GMT
Hi, Christoph,

Thanks for the code and the information! It is really valuable. 

I really appreciate your suggestion about what can still be done. I will try
my best to give something back to this community. 

Thanks,

Anthony

-----Original Message-----
From: Christoph.Reck@dlr.de [mailto:Christoph.Reck@dlr.de]
Sent: Monday, March 31, 2003 5:01 PM
To: Velocity Users List
Subject: Re: Running velocity in command line


Hi,

we wrapped Anakia into a command line tool to be used
in a XSLT-like pattern. See Attachment.

In another occasion we used the DVSL command line tools
as is:

#!/bin/csh -f
set DVSL_HOME=~/local/programs/jakarta-velocity-dvsl
set DVSL_JARS=($DVSL_HOME/lib/*.jar)
setenv CLASSPATH `echo $DVSL_JARS |tr ' '
':'`:$DVSL_HOME/velocity-dvsl-0.45.jar
exec java org.apache.tools.dvsl.DVSL $*

and our application does (performance is poor):

dvsl -STYLE xmlConfig_cleanup.dvsl -IN $1 | \
   ~/bin/tidy -xml -quiet -wrap 200 -indent > `basename $1`.tidy.xml


What really is needed is an updated DVSL-based command
line tool, which shall be independent of the XML-parser
(currently DVSL uses xml4j, due to the builtin XPath
support).

What needs to be done is to combine the features of
commons JXPath and the tools loading feature of the
VelocityViewServlet in the vel-contrib area.

Since what is there has served most uses, this issue
has not itched someone badly enough before to provide
an enhanced tool.

I hope this completed your picture of what is there.
Maybe you could provide some patches in this direction?

Cheers,
Christoph

Anthony Kong wrote:
> Hi, 
> 
> Fist of all, thanks for the fast response. I think you have understood me
> perfectly :-) Actually a commandline wrapper is what  i am looking after. 
> 
> The link you provided is essentially the files in the examples directory.
> However, what I would like beyound this is the ability to initiate
> VelocityContext via xml files, much like what an AnaikaTask is doing now.
> Therefore, if based on the information provided form the link, how can I
> transfer a xml to a context? If I need this feature, is it better off if I
> try to work out a command line wrapper over an AnaikaTask?
> 
> At the end what I wanna achive is a sql store procedure generator using
some
> custom-made xml based information.
> 
> Since i am new to this project, I may not fully understand the
relationships
> between these components (vel, anakia, texen...), so any
comment/suggestion
> are really welcome.
> 
> Regards,
> 
> Anthony
> 
> -----Original Message-----
> From: Dave Newton [mailto:dave@solaraccess.com]
> Sent: Monday, March 31, 2003 4:08 PM
> To: Anthony Kong
> Subject: Re: Running velocity in command line
> 
> 
> Hi,
> 
> Why not just put a command-line wrapper around the Velocity stuff; see 
>
http://jakarta.apache.org/velocity/developer-guide.html#Using%20Velocity%20I
> n%20General%20Applications for the section that tells how to do this.
> 
> Unless I'm misunderstanding you, what you want to do is really, really
> easy.
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 
> 

-- 
:) Christoph Reck

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


Mime
View raw message