diff options
author | Jeremias Maerki <jeremias@apache.org> | 2008-03-04 16:13:17 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2008-03-04 16:13:17 +0000 |
commit | 2000a8302a33bfd45beeab08f3e9e2ed77397d35 (patch) | |
tree | c235e5dca0ce54d90eaf5d532017a60f5be4d910 /src/java | |
parent | 2bae7b340fb55b0b3d6154849b57bd815a51c4dc (diff) | |
download | xmlgraphics-fop-2000a8302a33bfd45beeab08f3e9e2ed77397d35.tar.gz xmlgraphics-fop-2000a8302a33bfd45beeab08f3e9e2ed77397d35.zip |
Bugfix: Without the system ID (base URI), the XSLT processor cannot resolve document(<uri>, .) function calls correctly.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@633525 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/fop/cli/InputHandler.java | 9 |
1 files changed, 6 insertions, 3 deletions
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); |