[izpack-devel] xinclude - can't use include from within userInputSpec.xml (in installation time)

Matthew Fudge mfudge at volantis.com
Mon Feb 4 04:49:51 CET 2008


Hi Piotr,

Try using the "parsexml" attribute on the "res" element. This should cause the xml in your UserInputSpec.xml to have its 
xincludes parsed at compile time.


There are a few problems with the XInclude code. Some of the changes for it seem to have been overwritten. It relies on the SystemID of the parser being set correctly (to allow relative includes) but this is not done correctly anymore. I will fix this at some point when I have time.



cheers

Matt
----- Original Message -----
From: "Piotr Skowronek" <piotr at skowro.net>
To: izpack-devel at lists.berlios.de
Sent: 03 February 2008 22:38:13 o'clock (GMT) Europe/London
Subject: [izpack-devel] xinclude - can't use include from within userInputSpec.xml (in installation time)

Hi All,

There is a problem with using xinclude feature when used
in userInputSpec.xml. The problem appears in installation-time,
when XIncludeXMLBuilder is unable to find fragments. They would
have to be placed outside of install.jar, to be accessible
in installation-time.

However, xinclude feature works fine for install.xml as fragments
are included/resolved during compilation time. UserInputSpec.xml
is not parsed in compile-time, but simply embedded into resources.

I have worked out a quick solution for it. It can be found
in the attachment. Tell me what do you think about it.
The solution is to modify XIncludeXMLBuilder, to be able
to check resources whether they contain referenced fragment.
Fragments have to be put in resources, and referenced using
/res/ prefix, as I didn't want to hard code this prefix into
XIncludeXMLBuilder.

One more time, tell me what do you think about this patch.

Regards,
Piotr Skowronek


More information about the izpack-devel mailing list