]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Make parser namespace-aware so the run() method works with XSL-FO files as input.
authorJeremias Maerki <jeremias@apache.org>
Wed, 12 Mar 2003 11:00:21 +0000 (11:00 +0000)
committerJeremias Maerki <jeremias@apache.org>
Wed, 12 Mar 2003 11:00:21 +0000 (11:00 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196076 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/apps/Driver.java

index 2bcaeb775e3106c685bd5329daa4a4ab1eda92dd..ce278228d5a5a4087cf2e8657794a82bd91bfbbd 100644 (file)
@@ -73,6 +73,7 @@ import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.XMLReader;
 import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
 
 // Java
 import java.io.BufferedReader;
@@ -648,8 +649,9 @@ public class Driver implements LogEnabled {
         if (reader == null) {
             if (!(source instanceof DocumentInputSource)) {
                 try {
-                    reader = javax.xml.parsers.SAXParserFactory.newInstance()
-                        .newSAXParser().getXMLReader();
+                    SAXParserFactory spf = javax.xml.parsers.SAXParserFactory.newInstance();
+                    spf.setNamespaceAware(true);
+                    reader = spf.newSAXParser().getXMLReader();
                 } catch (SAXException e) {
                     throw new FOPException(e);
                 } catch (ParserConfigurationException e) {