[izpack-devel] Some more Xinclude thoughts

Matthew Fudge mfudge at volantis.com
Sat Dec 15 16:03:28 CET 2007


Hi Tino,

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).

As to having a seperate attribute that causes an xml file to be fully parsed (by nanoXml) at compile 
time; I mostly agree that it should be a seperate attribute (or perhaps change the "parse" attribute 
so it has the options "yes", "no" and "xml"). However I am a bit confused wrt the content of the previous paragraph.

If "parse='yes'" causes compile time variable substitution then perhaps a type="parsexml" would be more suitable.
If "parse='yes'" causes install time variable substitution then a new attribute or modification of the 'parse' attribute 
would be more appicable.

Cheers


matfud



----- Original Message -----
From: "Tino Schwarze" <berlios.de at tisc.de>
To: izpack-devel at lists.berlios.de
Sent: 15 December 2007 09:12:32 o'clock (GMT) Europe/London
Subject: Re: [izpack-devel] Some more Xinclude thoughts

Hi Matthew,

On Fri, Dec 14, 2007 at 01:00:06PM -0700, Matthew Fudge wrote:

> The Xnclude patch I submitted seems to be working pretty well for me.
> However I have come across a few other small issues on which I would
> like some assistance.
> 
> a) All relative resources/ref-packs/anything else that are defined
> seem to be relative to the current directory (the directory you are in
> when you invoke the compiler). This is causing a few problems for me
> as I currently have to work within a maven build framework. In this
> set up the current directory is not the location of the install.xml
> file. This causes xincludes/resource references/ref-packs etc. to
> search for thier content in a different directory to the directory
> containing the install.xml. I think that relative
> references/xincludes/etc should be relative to the file they exist in.
> I would like to make a change to make this happen. Comments please

+1 this makes more sense.

> b) I would also like to make a small modification to the parsing of
> resources. If the parse type is "parsexml" (rather then just "xml") I
> would like to use the nanoXML parser to actually parse the data and
> then serialize it back through the the VariableSubstitutor. This would
> enable xml resources to have xincludes in the resouce processed at
> compile time (using the parsexml type) or at install time (using the
> xml type).

+1 sounds like a useful feature. Maybe, it's more sensible to introduce
an extra tag for the preparsing - the parse type attribute currently
specifies what to do at install time, so it is not obvious that some
special value will change this. Having a new attribute would also allow
to process this at compile and install time...

Bye,

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



More information about the izpack-devel mailing list