From 2000a8302a33bfd45beeab08f3e9e2ed77397d35 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Tue, 4 Mar 2008 16:13:17 +0000 Subject: Bugfix: Without the system ID (base URI), the XSLT processor cannot resolve document(, .) function calls correctly. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@633525 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/cli/InputHandler.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/java') diff --git a/src/java/org/apache/fop/cli/InputHandler.java b/src/java/org/apache/fop/cli/InputHandler.java index f565a7a93..7ad89bfab 100644 --- a/src/java/org/apache/fop/cli/InputHandler.java +++ b/src/java/org/apache/fop/cli/InputHandler.java @@ -39,16 +39,18 @@ import javax.xml.transform.sax.SAXSource; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; +import org.xml.sax.XMLReader; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.apache.fop.apps.FOPException; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.apps.Fop; import org.apache.fop.apps.FopFactory; import org.apache.fop.render.awt.viewer.Renderable; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; -import org.xml.sax.XMLReader; /** * Class for handling files input from command line @@ -150,6 +152,7 @@ public class InputHandler implements ErrorListener, Renderable { try { InputSource is = new InputSource(new FileInputStream( this.sourcefile)); + is.setSystemId(this.sourcefile.toURI().toASCIIString()); SAXParserFactory spf = SAXParserFactory.newInstance(); spf.setFeature("http://xml.org/sax/features/namespaces", true); spf.setFeature("http://apache.org/xml/features/xinclude", true); -- cgit v1.2.3