Fields Summary |
---|
private static final String | defaultPropNameThe default property name to load the manager. |
private static String | defaultClassNameThe default class name to use as the manager. |
protected XMLStringFactory | m_xsfFactory for creating XMLString objects.
%TBD% Make this set by the caller. |
public static boolean | m_incremental |
private static boolean | debugTemp debug code - this will be removed after we test everything |
public static final int | IDENT_DTM_NODE_BITSThis value, set at compile time, controls how many bits of the
DTM node identifier numbers are used to identify a node within a
document, and thus sets the maximum number of nodes per
document. The remaining bits are used to identify the DTM
document which contains this node.
If you change IDENT_DTM_NODE_BITS, be sure to rebuild _ALL_ the
files which use it... including the IDKey testcases.
(FuncGenerateKey currently uses the node identifier directly and
thus is affected when this changes. The IDKEY results will still be
_correct_ (presuming no other breakage), but simple equality
comparison against the previous "golden" files will probably
complain.) |
public static final int | IDENT_NODE_DEFAULTWhen this bitmask is ANDed with a DTM node handle number, the result
is the low bits of the node's index number within that DTM. To obtain
the high bits, add the DTM ID portion's offset as assigned in the DTM
Manager. |
public static final int | IDENT_DTM_DEFAULTWhen this bitmask is ANDed with a DTM node handle number, the result
is the DTM's document identity number. |
public static final int | IDENT_MAX_DTMSThis is the maximum number of DTMs available. The highest DTM is
one less than this. |
Methods Summary |
---|
public abstract com.sun.org.apache.xml.internal.dtm.DTMIterator | createDTMIterator(java.lang.Object xpathCompiler, int pos)Create a new DTMIterator based on an XPath
UnionExpr.
|
public abstract com.sun.org.apache.xml.internal.dtm.DTMIterator | createDTMIterator(java.lang.String xpathString, com.sun.org.apache.xml.internal.utils.PrefixResolver presolver)Create a new DTMIterator based on an XPath
UnionExpr.
|
public abstract com.sun.org.apache.xml.internal.dtm.DTMIterator | createDTMIterator(int whatToShow, com.sun.org.apache.xml.internal.dtm.DTMFilter filter, boolean entityReferenceExpansion)Create a new DTMIterator based only on a whatToShow
and a DTMFilter. The traversal semantics are defined as the
descendant access.
Note that DTMIterators may not be an exact match to DOM
NodeIterators. They are initialized and used in much the same way
as a NodeIterator, but their response to document mutation is not
currently defined.
|
public abstract com.sun.org.apache.xml.internal.dtm.DTMIterator | createDTMIterator(int node)Create a new DTMIterator that holds exactly one node.
|
public abstract com.sun.org.apache.xml.internal.dtm.DTM | createDocumentFragment()Creates a DTM representing an empty DocumentFragment object.
|
public abstract com.sun.org.apache.xml.internal.dtm.DTM | getDTM(javax.xml.transform.Source source, boolean unique, com.sun.org.apache.xml.internal.dtm.DTMWSFilter whiteSpaceFilter, boolean incremental, boolean doIndexing)Get an instance of a DTM, loaded with the content from the
specified source. If the unique flag is true, a new instance will
always be returned. Otherwise it is up to the DTMManager to return a
new instance or an instance that it already created and may be being used
by someone else.
(More parameters may eventually need to be added for error handling
and entity resolution, and to better control selection of implementations.)
|
public abstract com.sun.org.apache.xml.internal.dtm.DTM | getDTM(int nodeHandle)Get the instance of DTM that "owns" a node handle.
|
public abstract int | getDTMHandleFromNode(org.w3c.dom.Node node)Given a W3C DOM node, try and return a DTM handle.
Note: calling this may be non-optimal.
|
public abstract int | getDTMIdentity(com.sun.org.apache.xml.internal.dtm.DTM dtm)%TBD% Doc
NEEDSDOC @param dtm
NEEDSDOC ($objectName$) @return
|
public int | getDTMIdentityMask()%TBD% Doc
NEEDSDOC ($objectName$) @return
return IDENT_DTM_DEFAULT;
|
public static synchronized boolean | getIncremental()Set a flag indicating whether an incremental transform is desired
return m_incremental;
|
public int | getNodeIdentityMask()%TBD% Doc
NEEDSDOC ($objectName$) @return
return IDENT_NODE_DEFAULT;
|
public com.sun.org.apache.xml.internal.utils.XMLStringFactory | getXMLStringFactory()Get the XMLStringFactory used for the DTMs.
return m_xsf;
|
public static com.sun.org.apache.xml.internal.dtm.DTMManager | newInstance(com.sun.org.apache.xml.internal.utils.XMLStringFactory xsf)Obtain a new instance of a DTMManager .
This static method creates a new factory instance
This method uses the following ordered lookup procedure to determine
the DTMManager implementation class to
load:
-
Use the
com.sun.org.apache.xml.internal.dtm.DTMManager system
property.
-
Use the JAVA_HOME(the parent directory where jdk is
installed)/lib/xalan.properties for a property file that contains the
name of the implementation class keyed on the same value as the
system property defined above.
-
Use the Services API (as detailed in the JAR specification), if
available, to determine the classname. The Services API will look
for a classname in the file
META-INF/services/com.sun.org.apache.xml.internal.dtm.DTMManager
in jars available to the runtime.
-
Use the default
DTMManager classname, which is
com.sun.org.apache.xml.internal.dtm.ref.DTMManagerDefault .
Once an application has obtained a reference to a
DTMManager it can use the factory to configure
and obtain parser instances.
DTMManager factoryImpl = null;
try
{
factoryImpl = (DTMManager) ObjectFactory
.createObject(defaultPropName, defaultClassName);
}
catch (ObjectFactory.ConfigurationError e)
{
throw new DTMConfigurationException(XMLMessages.createXMLMessage(
XMLErrorResources.ER_NO_DEFAULT_IMPL, null), e.getException());
//"No default implementation found");
}
if (factoryImpl == null)
{
throw new DTMConfigurationException(XMLMessages.createXMLMessage(
XMLErrorResources.ER_NO_DEFAULT_IMPL, null));
//"No default implementation found");
}
factoryImpl.setXMLStringFactory(xsf);
return factoryImpl;
|
public abstract boolean | release(com.sun.org.apache.xml.internal.dtm.DTM dtm, boolean shouldHardDelete)Release a DTM either to a lru pool, or completely remove reference.
DTMs without system IDs are always hard deleted.
State: experimental.
|
public static synchronized void | setIncremental(boolean incremental)Set a flag indicating whether an incremental transform is desired
m_incremental = incremental;
|
public void | setXMLStringFactory(com.sun.org.apache.xml.internal.utils.XMLStringFactory xsf)Set the XMLStringFactory used for the DTMs.
m_xsf = xsf;
|