Details
Description
I tried to use the "parsexml" attribute of the resource tag as follows:
<res id="userInputSpec.xml" src="userinput.xml" parsexml="yes"/>
and in "userinput.xml", I have:
<userInput>
<xinclude href="glassfish/userinput.xml" parse="xml"/>
</userInput>
and in "glassfish/userinput.xml" I have:
<xfragment>
<panel order="0">
...
</xfragmen>
When I compile the project, the compiler give an error such as:
-> Fatal error :
install.xml:58: Invalid input: `?' (0xffff), SystemID='file:/C:/Users/brett/AppData/Local/Temp/izpp59850.tmp', Line=1
com.izforge.izpack.compiler.CompilerException: install.xml:58: Invalid input: `?' (0xffff), SystemID='file:/C:/Users/brett/AppData/Local/Temp/izpp59850.tmp', Line=1
at com.izforge.izpack.compiler.CompilerConfig.parseError(CompilerConfig.java:1915)
at com.izforge.izpack.compiler.CompilerConfig.addResources(CompilerConfig.java:1382)
If I check the referenced file "file:/C:/Users/brett/AppData/Local/Temp/izpp59850.tmp" it is completely empty. Looking at the source code of CompilerConfig.java, I don't see anything that is ever writing to the referenced file before it is parsed. At line 1333, I see the line:
IXMLReader reader = new StdXMLReader(null, url.toExternalForm());
This is trying to setup an XML reader on the temporary file. If I change this to:
IXMLReader reader = new StdXMLReader(null, originalUrl.toExternalForm());
then the code compiles fine and the included XML referenced by the "xinclude" is correctly included in "userInputSpec.xml".
Thanks for reporting. Can you please attach a patch to this issue?
I know that you have described a fix, but having a patch makes it easier for everyone to review