[izpack-devel] Some more Xinclude thoughts

Matthew Fudge matfud at yahoo.com
Sat Dec 15 17:26:29 CET 2007


It sounds like you have similar problems to myself.

Yep, I've been down the magic comments route. Some times it's the most suitable approach 
and we still use them for some stuff. However since I am currently involved in creating a new 
build/install system for a number of older products I thought it might be nice to use tools (like IzPack) 
that would enable me to do away with magic comments (although I think we'll still be left with some).

Actually the maigc comments weren't too bad when we where using ant (although we didn't use 
them for installers (have you ever seen the xml file that InstallAnywhere creates?)) but under maven 
they are turning out to be a bit of a pain in the arse.

The xinclude code allows you to specify fallbacks if the specified href can not be found. This fallback can 
actually be an empty element in which case the entire xinclude just disappears (and does not fail). This may
address some of your issues wrt including varying numbers of modules (if you can structure it correctly).


cheers

matfud

----- Original Message ----
From: Tino Schwarze <berlios.de at tisc.de>
To: izpack-devel at lists.berlios.de
Sent: Saturday, 15 December, 2007 3:25:47 PM
Subject: Re: [izpack-devel] Some more Xinclude thoughts

Hi Matthew,

On Sat, Dec 15, 2007 at 08:03:28AM -0700, Matthew Fudge wrote:

> Perhaps you could clarify somthing for me. I was looking at the code
> for CompilerConfig#addResources
>
 (http://svn.berlios.de/svnroot/repos/izpack/izpack-src/trunk/src/lib/com/izforge/izpack/compiler/CompilerConfig.java)
> In that file it appears that the "parse" attribute (on a "res"
> element) causes variable substitution to occur at compile time (sorry
> I don't have an IDE to help me track through the code at the moment
 to
> see if this is really the case).

I don't have an IzPack/IDE setup there, currently, so I'm just trying
 to
remember stuff. I mixed this up with the <parsable> tag where parsing
happens at installation time. 

Yes, the above code parses at compile time. I would opt for introducing
an "parsexml" attribute which is independent of the parse attribute.
This way the user has freedom of choice: No parsing, just XML parsing
(=including), just variable parsing or both.

Hm, this xinclude stuff may be useful for me as well - we're currently
using a wrapper script to substitute some magic comments by XML
 snippets.
On the other hand, we'd still need to substitute the magic comments by
appropiate <xinclude> tags since the number of modules may vary...

Bye+Thanks for the work,

Tino.

-- 
www.craniosacralzentrum.de
www.lebensraum11.de
www.spiritualdesign-chemnitz.de

Tino Schwarze * Parkstraße 17h * 09120 Chemnitz
_______________________________________________
izpack-devel mailing list
izpack-devel at lists.berlios.de
https://lists.berlios.de/mailman/listinfo/izpack-devel





      ___________________________________________________________
Support the World Aids Awareness campaign this month with Yahoo! For Good http://uk.promotions.yahoo.com/forgood/


More information about the izpack-devel mailing list