You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Henri Chen <he...@infoshock.com> on 2002/07/26 11:14:23 UTC

[PATCH digester] included xmlrule files in jar

if  xmlrule files are packed into a jar and one xml file includes another file by the <include> tag, the included file would not be found by the parser. (FileNotFoundException).

Just change the code in method org.apache.commons.digester.xmlrules.DigesterRuleParser.includeXMLRules()
at line #344:

FROM

fileName = fileURL.getFile();

TO

fileName = fileURL.toExternalForm();

The getFile() would get rid of the protocol part of the URL so it will not preserve the "jar:file:..." and no way for the Sax Parser to find the XML file.

Henri Chen