Package net.sf.saxon.event
Class BuilderMonitor
java.lang.Object
net.sf.saxon.event.SequenceReceiver
net.sf.saxon.event.ProxyReceiver
net.sf.saxon.event.BuilderMonitor
- Direct Known Subclasses:
LinkedBuilderMonitor,TinyBuilderMonitor
A BuilderMonitor can be inserted into a pipeline immediately in front of a Builder. During tree construction,
the method markNextNode() can be called to request that the next node to be created is treated specially by
remembering the current position on the tree; on completion of the tree construction, the method getMarkedNode()
can be called to return the NodeInfo that was created immediately after calling markNextNode().
-
Field Summary
Fields inherited from class net.sf.saxon.event.ProxyReceiver
nextReceiverFields inherited from class net.sf.saxon.event.SequenceReceiver
pipelineConfiguration, previousAtomic, systemIdFields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract NodeInfoOn completion of tree building, get the node that was marked using markNextNode().abstract voidmarkAttributeNode(NodeInfo origin) Indicate that the most recently written attribute whose name matches that of the supplied node is to act as the marked nodeabstract voidmarkNamespaceNode(NodeInfo origin) Indicate that the most recently written attribute whose name matches that of the supplied node is to act as the marked nodeabstract voidmarkNextNode(int nodeKind) Indicate that the next node to be created will be of a given type, and request the monitor to remember the identity of this node.Methods inherited from class net.sf.saxon.event.ProxyReceiver
append, attribute, characters, close, comment, endDocument, endElement, getNamePool, getNextReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocument, startElement, usesTypeAnnotationsMethods inherited from class net.sf.saxon.event.SequenceReceiver
append, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getPipelineConfiguration, getSystemId, handlesAppend
-
Constructor Details
-
BuilderMonitor
-
-
Method Details
-
markNextNode
public abstract void markNextNode(int nodeKind) Indicate that the next node to be created will be of a given type, and request the monitor to remember the identity of this node.- Parameters:
nodeKind- the kind of node that will be created next. This will always be an element, text, comment, or processing-instruction node
-
markAttributeNode
Indicate that the most recently written attribute whose name matches that of the supplied node is to act as the marked node- Parameters:
origin- the attribute in the input corresponding to the marked node in the output
-
markNamespaceNode
Indicate that the most recently written attribute whose name matches that of the supplied node is to act as the marked node- Parameters:
origin- the attribute in the input corresponding to the marked node in the output
-
getMarkedNode
On completion of tree building, get the node that was marked using markNextNode().- Returns:
- the marked node, or null if none was marked
-