diff options
author | Keiron Liddle <keiron@apache.org> | 2002-04-22 13:23:20 +0000 |
---|---|---|
committer | Keiron Liddle <keiron@apache.org> | 2002-04-22 13:23:20 +0000 |
commit | 90a3909d450c1a4a7a2a8c244fc94097c325f1ea (patch) | |
tree | 9f5a7cea4bf138ec840142e0cc38cdac952b3279 | |
parent | 4bacd6f54620684d992cf7f9d6093dd089558814 (diff) | |
download | xmlgraphics-fop-90a3909d450c1a4a7a2a8c244fc94097c325f1ea.tar.gz xmlgraphics-fop-90a3909d450c1a4a7a2a8c244fc94097c325f1ea.zip |
synced with branch
makes FOP running with any JAXP1.1 compliant parser
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194739 13f79535-47bb-0310-9956-ffa450edef68
-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; } /** |