| Modifier and Type | Field and Description |
|---|---|
| private static final boolean | DEBUG
Hides com. |
| private int | m_currentDocumentNode
Most recently started Document, or null if the DTM is empty. |
| pack-priv int | m_emptyCharsCount
Tail-pruning mark: initial number of characters in use |
| pack-priv int | m_emptyDataCount
Tail-pruning mark: initial number of data items in use |
| pack-priv int | m_emptyDataQNCount
Tail-pruning mark: default initial number of dataOrQName slots in use |
| pack-priv int | m_emptyNodeCount
Tail-pruning mark: initial number of nodes in use |
| pack-priv int | m_emptyNSDeclSetCount
Tail-pruning mark: initial number of namespace declaration sets |
| pack-priv int | m_emptyNSDeclSetElemsCount
Tail-pruning mark: initial number of namespace declaration elements |
| pack-priv IntStack | mark_char_size
Tail-pruning mark: Number of size-of-data fields in use |
| pack-priv IntStack | mark_data_size
Tail-pruning mark: Number of data items in use |
| pack-priv IntStack | mark_doq_size
Tail-pruning mark: Number of dataOrQName slots in use |
| pack-priv IntStack | mark_nsdeclelem_size
Tail-pruning mark: Number of naespace declaration elements in use %REVIEW% I don't think number of NS sets is ever different from number of NS elements. |
| pack-priv IntStack | mark_nsdeclset_size
Tail-pruning mark: Number of namespace declaration sets in use %REVIEW% I don't think number of NS sets is ever different from number of NS elements. |
| pack-priv IntStack | mark_size
Tail-pruning mark: Number of nodes in use |
| Access | Constructor and Description |
|---|---|
| public | SAX2RTFDTM(DTMManager mgr, Source source, int dtmIdentity, DTMWSFilter whiteSpaceFilter, XMLStringFactory xstringfactory, boolean doIndexing)
|
| Modifier and Type | Method and Description |
|---|---|
| protected int | Returns: int Node identifier of the root of this DTM treethe id of the starting node. nodeIdentifier)Given a node identifier, find the owning document node. |
| public void | endDocument()
Overrides com. Implements org. Receive notification of the end of the document. |
| public int | Returns: int Node handle of Document node, or null if this DTM does not contain an "active" document.Overrides com. Implements com. Given a DTM, find the owning document node. |
| public int | Returns: int Node handle of owning documentthe id of the node. nodeHandle)Overrides com. Implements com. Given a node handle, find the owning document node, using DTM semantics (Document owns itself) rather than DOM semantics (Document has no owner). |
| public boolean | |
| public boolean | Returns: true if and only if the pop completely emptied the RTF. That response is used when determining how to unspool RTF-started-while-RTF-open situations."Tail-pruning" support for RTFs. |
| public void | |
| public void | startDocument()
Overrides com. Implements org. Receive notification of the beginning of a new RTF document. |
| DEBUG | back to summary |
|---|---|
| private static final boolean DEBUG Hides com. Set true to monitor SAX events and similar diagnostic info. | |
| m_currentDocumentNode | back to summary |
|---|---|
| private int m_currentDocumentNode Most recently started Document, or null if the DTM is empty. | |
| m_emptyCharsCount | back to summary |
|---|---|
| pack-priv int m_emptyCharsCount Tail-pruning mark: initial number of characters in use | |
| m_emptyDataCount | back to summary |
|---|---|
| pack-priv int m_emptyDataCount Tail-pruning mark: initial number of data items in use | |
| m_emptyDataQNCount | back to summary |
|---|---|
| pack-priv int m_emptyDataQNCount Tail-pruning mark: default initial number of dataOrQName slots in use | |
| m_emptyNodeCount | back to summary |
|---|---|
| pack-priv int m_emptyNodeCount Tail-pruning mark: initial number of nodes in use | |
| m_emptyNSDeclSetCount | back to summary |
|---|---|
| pack-priv int m_emptyNSDeclSetCount Tail-pruning mark: initial number of namespace declaration sets | |
| m_emptyNSDeclSetElemsCount | back to summary |
|---|---|
| pack-priv int m_emptyNSDeclSetElemsCount Tail-pruning mark: initial number of namespace declaration elements | |
| mark_char_size | back to summary |
|---|---|
| pack-priv IntStack mark_char_size Tail-pruning mark: Number of size-of-data fields in use | |
| mark_data_size | back to summary |
|---|---|
| pack-priv IntStack mark_data_size Tail-pruning mark: Number of data items in use | |
| mark_doq_size | back to summary |
|---|---|
| pack-priv IntStack mark_doq_size Tail-pruning mark: Number of dataOrQName slots in use | |
| mark_nsdeclelem_size | back to summary |
|---|---|
| pack-priv IntStack mark_nsdeclelem_size Tail-pruning mark: Number of naespace declaration elements in use %REVIEW% I don't think number of NS sets is ever different from number of NS elements. We can probabably reduce these to a single stack and save some storage. | |
| mark_nsdeclset_size | back to summary |
|---|---|
| pack-priv IntStack mark_nsdeclset_size Tail-pruning mark: Number of namespace declaration sets in use %REVIEW% I don't think number of NS sets is ever different from number of NS elements. We can probabably reduce these to a single stack and save some storage. | |
| mark_size | back to summary |
|---|---|
| pack-priv IntStack mark_size Tail-pruning mark: Number of nodes in use | |
| SAX2RTFDTM | back to summary |
|---|---|
| public SAX2RTFDTM(DTMManager mgr, Source source, int dtmIdentity, DTMWSFilter whiteSpaceFilter, XMLStringFactory xstringfactory, boolean doIndexing) | |
| _documentRoot | back to summary |
|---|---|
| protected int _documentRoot(int nodeIdentifier) Given a node identifier, find the owning document node. Unlike the DOM, this considers the owningDocument of a Document to be itself. Note that in shared DTMs this may not be zero.
| |
| endDocument | back to summary |
|---|---|
| public void endDocument() throws SAXException Overrides com. Implements org. Receive notification of the end of the document. %REVIEW% Y'know, this isn't all that much of a deoptimization. We might want to consider folding the start/endDocument changes back into the main SAX2DTM so we don't have to expose so many fields (even as Protected).
| |
| getDocument | back to summary |
|---|---|
| public int getDocument() Overrides com. Implements com. Given a DTM, find the owning document node. In the case of SAX2RTFDTM, which may contain multiple documents, this returns the most recently started document, or null if the DTM is empty or no document is currently under construction. %REVIEW% Should we continue to report the most recent after construction has ended? I think not, given that it may have been tail-pruned.
| |
| getDocumentRoot | back to summary |
|---|---|
| public int getDocumentRoot(int nodeHandle) Overrides com. Implements com. Given a node handle, find the owning document node, using DTM semantics (Document owns itself) rather than DOM semantics (Document has no owner). (I'm counting on the fact that getOwnerDocument() is implemented on top of this call, in the superclass, to avoid having to rewrite that one. Be careful if that code changes!)
| |
| isTreeIncomplete | back to summary |
|---|---|
public boolean isTreeIncomplete()
| |
| popRewindMark | back to summary |
|---|---|
| public boolean popRewindMark() "Tail-pruning" support for RTFs. This function pops the information previously saved by pushRewindMark (which see) and uses it to discard all nodes added to the DTM after that time. We expect that this will allow us to reuse storage more effectively. This is _not_ intended to be called while a document is still being constructed -- only between endDocument and the next startDocument %REVIEW% WARNING: This is the first use of some of the truncation methods. If Xalan blows up after this is called, that's a likely place to check. %REVIEW% Our original design for DTMs permitted them to share string pools. If there any risk that this might be happening, we can _not_ rewind and recover the string storage. One solution might to assert that DTMs used for RTFs Must Not take advantage of that feature, but this seems excessively fragile. Another, much less attractive, would be to just let them leak... Nah.
| |
| pushRewindMark | back to summary |
|---|---|
| public void pushRewindMark() "Tail-pruning" support for RTFs. This function pushes information about the current size of the DTM's data structures onto a stack, for use by popRewindMark() (which see). %REVIEW% I have no idea how to rewind m_elemIndexes. However, RTFs will not be indexed, so I can simply panic if that case arises. Hey, it works... | |
| startDocument | back to summary |
|---|---|
| public void startDocument() throws SAXException Overrides com. Implements org. Receive notification of the beginning of a new RTF document. %REVIEW% Y'know, this isn't all that much of a deoptimization. We might want to consider folding the start/endDocument changes back into the main SAX2DTM so we don't have to expose so many fields (even as Protected) and carry the additional code.
| |