Performance is the biggest consideration in the design of SAX2DTM2. To make the code most efficient, the incremental support is dropped in SAX2DTM2, which means that you should not use it in incremental situation. To reduce the overhead of pulling data from the DTM model, a few core interfaces in SAX2DTM2 have direct access to the internal arrays of the SuballocatedIntVectors.
The design of SAX2DTM2 may limit its extensibilty. If you have a reason to extend the SAX2DTM model, please extend from SAX2DTM instead of this class.
%MK% The code in this class is critical to the XSLTC_DTM performance. Be very careful when making changes here!
| Modifier and Type | Class and Description |
|---|---|
| public class | SAX2DTM2.
Iterator that returns the ancestors of a given node in document order. |
| public class | SAX2DTM2.
Iterator that returns attribute nodes (of what nodes?) |
| public class | SAX2DTM2.
Iterator that returns all immediate children of a given node |
| public class | SAX2DTM2.
Iterator that returns the descendants of a given node. |
| public class | SAX2DTM2.
Iterator that returns following nodes of for a given node. |
| public class | SAX2DTM2.
Iterator that returns all siblings of a given node. |
| public class | SAX2DTM2.
Iterator that returns the parent of a given node. |
| public class | SAX2DTM2.
Iterator that returns preceding nodes of a given node. |
| public class | SAX2DTM2.
Iterator that returns preceding siblings of a given node |
| public class | SAX2DTM2.
Typed iterator that returns the ancestors of a given node. |
| public class | SAX2DTM2.
Iterator that returns attribute nodes of a given type |
| public class | SAX2DTM2.
Iterator that returns children of a given type for a given node. |
| public class | SAX2DTM2.
Typed iterator that returns the descendants of a given node. |
| public class | SAX2DTM2.
Iterator that returns following nodes of a given type for a given node. |
| public class | SAX2DTM2.
Iterator that returns all following siblings of a given node. |
| public class | SAX2DTM2.
Iterator that returns preceding nodes of agiven type for a given node. |
| public class | SAX2DTM2.
Iterator that returns preceding siblings of a given type for a given node |
| public class | SAX2DTM2.
Iterator that returns the namespace nodes as defined by the XPath data model for a given node, filtered by extended type ID. |
| public class | SAX2DTM2.
Iterator that returns a given node only if it is of a given type. |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final XMLString | |
| protected int | |
| protected boolean | |
| private int[][] | |
| private int[] | m_exptype_map0
End of nested iterators |
| protected ExtendedType[] | |
| private int[][] | |
| private int[] | |
| protected int | |
| private int | |
| private int[][] | |
| private int[] | |
| private int[][] | |
| private int[] | |
| protected int | |
| private int | |
| protected List | |
| protected static final int | TEXT_LENGTH_BITS
%OPT% If the offset and length of a Text node are within certain limits, we store a bitwise encoded value into an int, using 10 bits (max. |
| protected static final int | |
| protected static final int | |
| protected static final int |
| Access | Constructor and Description |
|---|---|
| public | SAX2DTM2(DTMManager mgr, Source source, int dtmIdentity, DTMWSFilter whiteSpaceFilter, XMLStringFactory xstringfactory, boolean doIndexing)
Construct a SAX2DTM2 object using the default block size. |
| public | SAX2DTM2(DTMManager mgr, Source source, int dtmIdentity, DTMWSFilter whiteSpaceFilter, XMLStringFactory xstringfactory, boolean doIndexing, int blocksize, boolean usePrevsib, boolean buildIdIndex, boolean newNameTable)
Construct a SAX2DTM2 object using the given block size. |
| Modifier and Type | Method and Description |
|---|---|
| public final int | _exptype(int identity)
Overrides com. Override DTMDefaultBase._exptype() by dropping the incremental code. |
| public final int | _exptype2(int
A node identity, which must not be equal to
identity)DTM.NULLThe optimized version of DTMDefaultBase._exptype(). |
| public final int | |
| public final int | _firstch2(int
A node identity, which must not be equal to
identity)DTM.NULLThe optimized version of DTMDefaultBase._firstch(). |
| public final int | _nextsib2(int
A node identity, which must not be equal to
identity)DTM.NULLThe optimized version of DTMDefaultBase._nextsib(). |
| public final int | _parent2(int
A node identity, which must not be equal to
identity)DTM.NULLThe optimized version of DTMDefaultBase._parent(). |
| public final int | _type2(int
A node identity, which must not be equal to
identity)DTM.NULLThe optimized version of DTMDefaultBase._type(). |
| protected final int | Returns: The index identity of the node that was added.raw type ID, one of DTM.XXX_NODE. type, int The expended type ID. expandedTypeID, int The current parent index. parentIndex, int The previous sibling index. previousSibling, int index into m_data table, or string handle. dataOrPrefix, boolean true if the node can have a first child, false
if it is atomic. canHaveFirstChild)Overrides com. Construct the node map from the node. |
| protected final void | charactersFlush()
Overrides com. Check whether accumulated text should be stripped; if not, append the appropriate flavor of text/cdata node. |
| public void | comment(char[]
An array holding the characters in the comment. ch, int The starting position in the array. start, int The number of characters to use from the array. length)Overrides com. Implements org. Report an XML comment anywhere in the document. |
| protected final void | copyAttribute(int
The node identity nodeID, int The expanded type of the Element node exptype, SerializationHandler The SerializationHandler handler)Copy an Attribute node to a SerializationHandler |
| protected final void | copyAttributes(final int
The Element node identity nodeID, SerializationHandler The SerializationHandler handler)Copy attribute nodes from an element . |
| protected final String | Returns: The qualified name of the Element node.The node identity nodeID, int The expanded type of the Element node exptype, SerializationHandler The SerializationHandler handler)Copy an Element node to a SerializationHandler. |
| protected final void | copyNS(final int
The Element node identity nodeID, SerializationHandler The SerializationHandler handler, boolean true if all namespaces in scope should be copied,
false if only the namespace declarations should be copied. inScope)Copy namespace nodes. |
| protected final void | copyTextNode(final int nodeID, SerializationHandler handler)
Copy the String value of a Text node to a SerializationHandler |
| public final void | dispatchCharactersEvents(int
The node ID. nodeHandle, ContentHandler A non-null reference to a ContentHandler. ch, boolean true if the content should be normalized according to
the rules for the XPath
normalize-space
function. normalize)Overrides com. Implements com. The optimized version of SAX2DTM.dispatchCharactersEvents(int, ContentHandler, boolean). |
| public void | endDocument()
Overrides com. Implements org. Receive notification of the end of the document. |
| public void | endElement(String
The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed. uri, String The local name (without prefix), or the
empty string if Namespace processing is not being
performed. localName, String The qualified XML 1.0 name (with prefix), or the
empty string if qualified names are not available. qName)Overrides com. Implements org. Receive notification of the end of an element. |
| public final int | |
| public final int | Returns: Handle of first attribute, or DTM.NULL to indicate none exists.int Handle of the node. nodeHandle)Overrides com. Implements com. The optimized version of DTMDefaultBase.getFirstAttribute(). |
| protected int | Returns: Identity of first attribute, or DTM.NULL to indicate none exists.int identity of the node. identity)Overrides com. The optimized version of DTMDefaultBase.getFirstAttributeIdentity(int). |
| public int | Returns: The prefix if there is one, or null.The namespace URI, which may be null. uri)Overrides com. Get a prefix either from the uri mapping, or just make one up! |
| public String | Returns: String Local name of this node.the id of the node. nodeHandle)Overrides com. Implements com. Override SAX2DTM.getLocalName() in SAX2DTM2. |
| protected int | Returns: int DTM node-identity of the resolved attr, or DTM.NULL to indicate none exists.int identity of the attribute node. This
must be an attribute node. identity)Overrides com. The optimized version of DTMDefaultBase.getNextAttributeIdentity(int). |
| protected final int | Returns: The namespace node immediately following the base node.Return the next namespace node following the given base node. |
| public String | Returns: String Name of this node, which may be an empty string. %REVIEW% Document when empty string is possible... %REVIEW-COMMENT% It should never be empty, should it?the id of the node. nodeHandle)Overrides com. Implements com. The optimized version of SAX2DTM.getNodeName(). |
| public final String | Returns: String Name of this node, which may be an empty string.the id of the node. nodeHandle)Overrides com. Implements com. The optimized version of SAX2DTM.getNodeNameX(). |
| public String | Returns: String Value of this node, or null if not meaningful for this node type.The node id. nodeHandle)Overrides com. Implements com. Given a node handle, return its node value. |
| public XMLString | Returns: A string object that represents the string-value of the given node.The node ID. nodeHandle)Overrides com. Implements com. Override SAX2DTM.getStringValue(int) This method is only used by Xalan-J Interpretive. |
| public String | |
| public final String | Returns: A string object that represents the string-value of the given node.The node ID. nodeHandle)The optimized version of SAX2DTM.getStringValue(int). |
| protected final int | Returns: Handle of attribute of the required type, or DTM.NULL to indicate none exists.int Handle of the node. nodeHandle, int int expanded type ID of the required attribute. attType)Overrides com. The optimized version of DTMDefaultBase.getTypedAttribute(int, int). |
| public void | processingInstruction(String
The processing instruction target. target, String The processing instruction data, or null if
none is supplied. data)Overrides com. Implements org. Override the processingInstruction() interface in SAX2DTM2. |
| public void | startDocument()
Overrides com. Implements org. Receive notification of the beginning of the document. |
| public void | startElement(String
The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed. uri, String The local name (without prefix), or the
empty string if Namespace processing is not being
performed. localName, String The qualified name (with prefix), or the
empty string if qualified names are not available. qName, Attributes The specified or defaulted attributes. attributes)Overrides com. Implements org. Override SAX2DTM.startElement() Receive notification of the start of an element. |