--- old/src/com/sun/org/apache/xalan/internal/xsltc/dom/XSLTCDTMManager.java 2013-06-03 18:25:39.000000000 +0200 +++ new/src/com/sun/org/apache/xalan/internal/xsltc/dom/XSLTCDTMManager.java 2013-06-03 18:25:39.000000000 +0200 @@ -30,7 +30,6 @@ import javax.xml.transform.stream.StreamSource; import javax.xml.transform.stax.StAXSource; - import com.sun.org.apache.xml.internal.dtm.DTM; import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase; import com.sun.org.apache.xml.internal.dtm.DTMException; @@ -42,7 +41,6 @@ import com.sun.org.apache.xalan.internal.xsltc.trax.DOM2SAX; import com.sun.org.apache.xalan.internal.xsltc.trax.StAXEvent2SAX; import com.sun.org.apache.xalan.internal.xsltc.trax.StAXStream2SAX; -import com.sun.org.apache.xalan.internal.utils.ObjectFactory; import org.xml.sax.InputSource; import org.xml.sax.SAXNotRecognizedException; @@ -55,13 +53,6 @@ public class XSLTCDTMManager extends DTMManagerDefault { - /** The default class name to use as the manager. */ - private static final String DEFAULT_CLASS_NAME = - "com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager"; - - private static final String DEFAULT_PROP_NAME = - "com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager"; - /** Set this to true if you want a dump of the DTM after creation */ private static final boolean DUMPTREE = false; @@ -88,42 +79,13 @@ } /** - * Look up the class that provides the XSLTC DTM Manager service. - * The following lookup procedure is used to find the service provider. - *
com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager
property, is
- * checked.xalan.propeties
file is checked for a property
- * of the same name.META-INF/services/com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager
- * file is checked.
- * com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager
.
+ * Creates a new instance of the XSLTC DTM Manager service.
+ * Creates a new instance of the default class
+ * com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager
.
*/
- public static Class getDTMManagerClass() {
- return getDTMManagerClass(true);
- }
-
- public static Class getDTMManagerClass(boolean useServicesMechanism) {
- Class mgrClass = null;
- if (useServicesMechanism) {
- mgrClass = ObjectFactory.lookUpFactoryClass(DEFAULT_PROP_NAME,
- null,
- DEFAULT_CLASS_NAME);
- } else {
- try {
- mgrClass = ObjectFactory.findProviderClass(DEFAULT_CLASS_NAME, true);
- } catch (Exception e) {
- //will not happen
- }
- }
- // If no class found, default to this one. (This should never happen -
- // the ObjectFactory has already been told that the current class is
- // the default).
- return (mgrClass != null) ? mgrClass : XSLTCDTMManager.class;
- }
+ public static XSLTCDTMManager createNewDTMManagerInstance() {
+ return newInstance();
+ }
/**
* Get an instance of a DTM, loaded with the content from the
@@ -146,6 +108,7 @@
*
* @return a non-null DTM reference.
*/
+ @Override
public DTM getDTM(Source source, boolean unique,
DTMWSFilter whiteSpaceFilter, boolean incremental,
boolean doIndexing)