The <xinclude> directive does not work when trying include relative resources where the compile is not run from the same directory as the installation file. The verify, using the sample, create locales.xml file in the same directory as the install.xml. The content of this file should look like:
and then change the <locales> component in install.xml to look like:
Running the compiler on this produces this output:
The problem is that the "systemID" passed to the XMLElement constructor is "file:.". I tracked this down and found two problems. In CompilerConfig.java at line 1738, the code reads
this uses the StdXMLReader that takes an input stream. Inside that constructor, the systemID is set to "file:.". A second problem is that at the end of that constructor is a line that reads:
which pushes on the stream stack a input stream that will immediately see EOF because "charsRead" is a StringBuffer created right in this constructor and is empty.
I attempted to fix this problem by adding the line:
at line 1739 in CompilerConfig.java, but that did not work because of the initial stream that is pushed on as mentioned above. As soon as one character was read from the reader, it would hit EOF, pop off the stream which would restore the "file:." systemID, undoing the the setting that I just did with the above line.
So the fix is to add the line that I added and to remove the start of the new stream in the StdXMLReader constructor.