On 10/28/01 11:12 AM, "Christian Trutz" <[EMAIL PROTECTED]> wrote:
> Hi Jason, > > I write this patch very quickly because I need it (Design Pattern: "make it > simple" :-)) > OK you have right, your idea is much better ... > > I use Texen for code generation from a XML file and I think Texen is much > better than e.g. XSLT for this job ... I will take you idea and write a more > general API via contextProperties ... Sorry I am new to Texen/Velocity, that > is XMLEasyBean? XMLEasyBean is a little thing I threw together that seems to allow easy access to XML data from Velocity templates. Take a look at it to see if it solves your problem. It's not part of Velocity right now (just an example in the whiteboard section) but if it solves problems for you, use it. If it can be used to extend Texen in a general way, that's good too. > > Chris > >> I'm not sure I quite understand, I would rather not tie Texen to JDOM. >> >> A feature like this might be useful, but I would probably add a special >> handler to the contextProperties processing to look for XML files as text >> files are i.e. when something like >> >> foo.file.contents = bar.txt >> >> Is seen in the in a properties file specified with the contextProperties >> attribute than the text in bar.txt is made available in the template as >> $foo. >> >> Maybe you could do something like: >> >> foo.xml.file.contents = bar.xml >> >> to make $foo available as an object representation of the XML file. You >> could even use Geir's XMLEasyBean. I don't know if that uses JDOM, maybe > you >> could use reflection to see if the resources you need are available. > > -- Geir Magnusson Jr. [EMAIL PROTECTED] System and Software Consulting "Whoever would overthrow the liberty of a nation must begin by subduing the freeness of speech." - Benjamin Franklin
