src/com/sun/org/apache/xalan/internal/xsltc/dom/XSLTCDTMManager.java

Print this page

        

*** 28,38 **** import javax.xml.transform.dom.DOMSource; import javax.xml.transform.sax.SAXSource; 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; import com.sun.org.apache.xml.internal.dtm.DTMWSFilter; import com.sun.org.apache.xml.internal.dtm.ref.DTMManagerDefault; --- 28,37 ----
*** 40,50 **** import com.sun.org.apache.xml.internal.res.XMLMessages; import com.sun.org.apache.xml.internal.utils.SystemIDResolver; 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; import org.xml.sax.SAXNotSupportedException; import org.xml.sax.XMLReader; --- 39,48 ----
*** 53,69 **** * The default implementation for the DTMManager. */ 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; /** Set this to true if you want basic diagnostics */ private static final boolean DEBUG = false; --- 51,60 ----
*** 86,130 **** { return new XSLTCDTMManager(); } /** ! * Look up the class that provides the XSLTC DTM Manager service. ! * The following lookup procedure is used to find the service provider. ! * <ol> ! * <li>The value of the ! * <code>com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager</code> property, is ! * checked.</li> ! * <li>The <code>xalan.propeties</code> file is checked for a property ! * of the same name.</li> ! * <li>The ! * <code>META-INF/services/com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager</code> ! * file is checked. ! * </ol> ! * The default is <code>com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager</code>. */ ! 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; } /** * Get an instance of a DTM, loaded with the content from the * specified source. If the unique flag is true, a new instance will --- 77,92 ---- { return new XSLTCDTMManager(); } /** ! * Creates a new instance of the XSLTC DTM Manager service. ! * Creates a new instance of the default class ! * <code>com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager</code>. */ ! public static XSLTCDTMManager createNewDTMManagerInstance() { ! return newInstance(); } /** * Get an instance of a DTM, loaded with the content from the * specified source. If the unique flag is true, a new instance will
*** 144,153 **** --- 106,116 ---- * @param doIndexing true if the caller considers it worth it to use * indexing schemes. * * @return a non-null DTM reference. */ + @Override public DTM getDTM(Source source, boolean unique, DTMWSFilter whiteSpaceFilter, boolean incremental, boolean doIndexing) { return getDTM(source, unique, whiteSpaceFilter, incremental,