Issue Details (XML | Word | Printable)

Key: IZPACK-13
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Julien Ponge
Reporter: Brett Bergquist
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IzPack

It appears that the "parsexml" resource attribute support does not read the resource that is to be parsed

Created: 23/Feb/08 12:21 PM   Updated: 29/Feb/08 02:29 PM   Resolved: 24/Feb/08 02:11 PM
Return to search
Component/s: Compiler
Affects Version/s: 3.11.0
Fix Version/s: 4.0.0

Time Tracking:
Not Specified

File Attachments: 1. Text File IZPACK-13.patch (0.8 kB)

Environment: Windows Vista Home Premium


 Description  « Hide

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



Julien Ponge added a comment - 24/Feb/08 08:23 AM

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


Julien Ponge made changes - 24/Feb/08 08:23 AM
Field Original Value New Value
Assignee Julien Ponge [ jponge ]
Fix Version/s 4.0.0 [ 14071 ]
Brett Bergquist added a comment - 24/Feb/08 10:20 AM

Here is the patch for this problem.


Brett Bergquist made changes - 24/Feb/08 10:20 AM
Attachment IZPACK-13.patch [ 32772 ]
Julien Ponge added a comment - 24/Feb/08 02:11 PM

Just merged your patch, thanks a lot!


Julien Ponge made changes - 24/Feb/08 02:11 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Julien Ponge added a comment - 29/Feb/08 02:29 PM

Closing resolved issues (they should not stay "resolved" but get closed)


Julien Ponge made changes - 29/Feb/08 02:29 PM
Status Resolved [ 5 ] Closed [ 6 ]