On 6/22/01 4:53 PM, "robert burrell donkin" <[EMAIL PROTECTED]> wrote:

> you might recall that some time ago i posted about extending texen
> aiming to generate source code from xml-schema
> i've had this code working for quite a while now but i've been holding
> off submitting until velocity 1.1 was released
> 
> (for those not familiar with texen)
> (briefly) texen is an ant tasks that allows source code (amongst other
> things) to be generated by velocity
> the standard way that texen is used at the moment is by subclasses
> extending texen to put different objects into the generation context
> 
> i'd like to propose a second (complementary) way to extend texen - by
> creating nested elements within the task that put additional objects
> into the generation context. this approach allows flexible 'tweaking' of
> generation scripts (without having to write additional code) and also
> enables better decoupling (of classes used in the generation from the
> core velocity classes).

I'd like to see the proposal, you can currently place string
values, integers, booleans, and file contents into the context
using a properties file. There is also a simple mechanism for
placing object instances in the context with a properties file.
Currently this is only for a couple simple tools (controlled by
the texen.properties file that is hidden within texen), but
could be used for any object if that was decided as desirable.

I'm not sure what else you need.

I definitely kept in mind the ideal of not having to write/change
any code to add values to the context. Adding object instances to
the context with a properties file isn't currently a public feature
but could be made to be in a few minutes.
 
> 
> if you're interested,  there are three ways that i can package the
> classes (that extend texen in the proposed way)
> 1. by subclassing TexenTask (this means minimal disruption but also
> means that other subclasses cannot use this functionality without being
> rewritten)
> 2. by changing TexenTask itself
> 3. by creating an abstract superclass (available for other ant tasks
> using velocity to inherit from - for example, anakia)

What exactly are you trying to do? I don't really see why any of
these things would be required given what you can place into the
context via properties files. But as I'm not familiar with the task
you're using texen for I probably don't fully understand. I'd like
to try and keep texen as simple as possible.
 
> - robert

-- 

jvz.

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons


Reply via email to