diff options
Diffstat (limited to 'src/org/apache/fop/apps/Driver.java')
-rw-r--r-- | src/org/apache/fop/apps/Driver.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/org/apache/fop/apps/Driver.java b/src/org/apache/fop/apps/Driver.java index 8d4992fd4..e67443bcf 100644 --- a/src/org/apache/fop/apps/Driver.java +++ b/src/org/apache/fop/apps/Driver.java @@ -175,15 +175,13 @@ public class Driver { private FOUserAgent userAgent = null; public static final String getParserClassName() { - String parserClassName = null; - try { - parserClassName = System.getProperty("org.xml.sax.parser"); - } catch (SecurityException se) {} - - if (parserClassName == null) { - parserClassName = "org.apache.xerces.parsers.SAXParser"; + try { + return javax.xml.parsers.SAXParserFactory.newInstance().newSAXParser().getXMLReader().getClass().getName(); + } catch (javax.xml.parsers.ParserConfigurationException e) { + return null; + } catch (org.xml.sax.SAXException e) { + return null; } - return parserClassName; } /** |