From d035088e1b5763b4c5026193d132fd4cb6e0dfbb Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 12 Mar 2003 11:00:21 +0000 Subject: [PATCH] Make parser namespace-aware so the run() method works with XSL-FO files as input. 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/fop/apps/Driver.java b/src/java/org/apache/fop/apps/Driver.java index 2bcaeb775..ce278228d 100644 --- a/src/java/org/apache/fop/apps/Driver.java +++ b/src/java/org/apache/fop/apps/Driver.java @@ -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) { -- 2.39.5