From 90a3909d450c1a4a7a2a8c244fc94097c325f1ea Mon Sep 17 00:00:00 2001 From: Keiron Liddle Date: Mon, 22 Apr 2002 13:23:20 +0000 Subject: [PATCH] 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 --- src/org/apache/fop/apps/Driver.java | 14 ++++++-------- 1 file 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; } /** -- 2.39.5