Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 19416 invoked from network); 23 May 2002 22:27:47 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 23 May 2002 22:27:47 -0000 Received: (qmail 13703 invoked by uid 97); 23 May 2002 22:27:44 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 13687 invoked by uid 97); 23 May 2002 22:27:43 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 13669 invoked by uid 98); 23 May 2002 22:27:43 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <98D21B073202584C9125C860580DC4EDEC0389@lgchexch006.ad.lgc.com> From: Dominique Devienne To: "'Ant Users List'" Subject: RE: changing the main initialization procedure Date: Thu, 23 May 2002 17:27:40 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Yes, by all means, send it to me personally or through ant-user at your convenience ;-) And thanks for offering! I am very much interested by your approach. I know I need a templating system for the builds of the projects I'm trying to integrate / homogenize, but just don't know how to go about it or which tool to use yet. So far I've identified several possible routes: completely ad-hoc (to the point of writing actual Jaxp code to manipulate all these xml files!), 'traditional' xslt like myrmidon, maybe Maven or AntHill too, or your approach. From the little I know about each approach, yours sounds the more interesting to me at this point (and one I could actually wrap my head around too). Thanks, --DD -----Original Message----- From: Wannheden, Knut [mailto:knut.wannheden@paranor.ch] Sent: Thursday, May 23, 2002 10:40 AM To: 'Ant Users List' Subject: RE: changing the main initialization procedure Well it's maybe abusing the true purpose of XSLT, but it's what I'm doing anyways. I use my buildfile template as the input for the stylesheet, use the document() function to load the customization buildfile and do the merging with XSLT templates. Of course the merging has to be done by hand, i.e. checking if the customization buildfile overrides any targets/properties in the template buildfile. So in the end the stylesheet just copies parts from either buildfile and doesn't contain the template itself. I can send it to you if you wish, but it's not ready yet... I guess if I'd write my own Ant ProjectHelper the process could be a little bit easier, as the ProjectHelper could merge the buildfiles itself by using the methods provided by Project. But I still have to look into that code first. The XSLT approach was more straight forward for me, as I already had something similar. -- knut > -----Original Message----- > From: Dominique Devienne [mailto:DDevienne@lgc.com] > Sent: Donnerstag, 23. Mai 2002 17:29 > To: 'Ant Users List' > Subject: RE: changing the main initialization procedure > > > A little off-topic, but could you point me to some info on > how you can merge > two xml files to produce a third using an xslt stylesheet? > > In either Myrmidon's templating system using xslt, or 'Java > and XSLT' book, > the xslt stylesheet *contains* the xml template as well. If I remember > correctly, you pointed out a while ago that it didn't > separate the the ANT > build template and the stylesheet, which I agree with. It > also requires to > know xslt to update the template, which is bad. > > Please forgive my ignorance of XSLT related matter ;-) --DD > > -----Original Message----- > From: Wannheden, Knut [mailto:knut.wannheden@paranor.ch] > Sent: Thursday, May 23, 2002 3:04 AM > To: 'Ant Users List' > Subject: RE: changing the main initialization procedure > > > > > Peter Donald (have to use full name because this list is > > soooo full ;) , any > > hint on how to include a basic templating mechanism with > current Ant? > > I recall you favor templating, and I'm sure you can help us > > (I'm interested > > too) and give us some advice. > > > > Just to briefly describe how I've implemented my templates: I have a > template buildfile (regular Ant buildfile) with some common > (or default) > targets, paths, properties, etc. Then for every "real" > project I merge > (with XSLT) this template with another customization (also an > Ant buildfile) > which overrides definitions in the template. This works like a simple > inheritance mechanism. So I could have a template like: > > > > > > > > > > > > > > and a customization for a project (notice the additional > in target > compile): > > > > > > > > > > > > > > > > which would be merged into: > > > > > > > > > > > > > > > > > > > I found this to work quite nicely. I added the > target because I > wanted as few changes as possible in the template to cause > manual changes to > be made to the customization. > > -- > knut > > -- > To unsubscribe, e-mail: > > For additional commands, e-mail: > > -- To unsubscribe, e-mail: For additional commands, e-mail: