[cvs] Expresso commit by mtraum: Set the path of the inputSource so that

JCorporate Ltd jcorp at jcorp2.servlets.net
Mon Oct 11 08:28:05 PDT 2004


Log Message:
-----------
Set the path of the inputSource so that relative SYSTEM entities can be found

Modified Files:
--------------
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/report:
        XMLPrinter.java

Revision Data
-------------
Index: XMLPrinter.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/report/XMLPrinter.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/ext/report/XMLPrinter.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/ext/report/XMLPrinter.java -u -r1.3 -r1.4
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/report/XMLPrinter.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/report/XMLPrinter.java
@@ -611,6 +611,11 @@
                 DocumentBuilder db = dbf.newDocumentBuilder();
                 db.setErrorHandler(printer);
                 
+                // Set the path so that relative SYSTEM entities can be found
+                if (inputfile.getParentFile() != null) {
+                    inputSource.setSystemId(inputfile.getParentFile().toURL().toString());
+                }
+                
                 doc = db.parse(inputSource);
             } catch (Exception e) {
                 log.error("Error Parsing XML Document.", e);


More information about the cvs mailing list