|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.saxonica.validate.AbstractWatch com.saxonica.stream.watch.EventPushingWatch com.saxonica.stream.watch.ApplyTemplatesWatch
public class ApplyTemplatesWatch
This watch implements xsl:apply-templates in streaming mode. It watches for the nodes selected by the xsl:apply-templates instruction; when such a node is encountered, it locates the relevant (inverted) template, and activates it. The watch is capable of handling a select expression that selects non-peer nodes (that is, one selected node that is a descendant of another). A top-level selected node is processed directly to the output receiver; a nested node is processed to create a temporary result tree, which is then appended to the output sequence when the processing of the outer selected node is complete.
Constructor Summary | |
---|---|
ApplyTemplatesWatch(Expression expression,
SequenceReceiver result,
Stack<XPathContext> contextStack)
|
Method Summary | |
---|---|
void |
close()
The close() method is called immediately before the Watch is destroyed, that is, when the element whose declaration scopes the constraint implemented by this Watch goes out of scope. |
void |
computeActualParams(WithParam[] params)
|
void |
computeTunnelParams(WithParam[] params)
|
void |
endSelectedParentNode(int locationId)
Signal that the endElement event has occurred for the element whose startElement event caused the Watch to be activated. |
protected XPathContext |
getLocalContext()
|
Mode |
getMode()
|
protected Rule |
getRule(FleetingNode node)
Get the template rule matching a specific node |
void |
notifySelectedLeafNode(FleetingNode node,
int locationId)
Signal that a node (other than an element) that matches the selection has been found. |
void |
open()
Open the watch. |
void |
setActualParams(ParameterSet params)
|
void |
setMode(Mode mode)
|
void |
setTunnelParams(ParameterSet params)
|
void |
setWatchManager(WatchManager watchManager)
|
Receiver |
startSelectedParentNode(FleetingNode node,
int locationId)
Signal that an element has been found that matches the selection that this Watch is looking for. |
Methods inherited from class com.saxonica.stream.watch.EventPushingWatch |
---|
getContext, getContextStack, getExpression, getResult, setParentExpressionFeed, setResult |
Methods inherited from class com.saxonica.validate.AbstractWatch |
---|
getAnchorNode, getNamespaceResolver, getPipelineConfiguration, getSelection, setAnchorNode, setNamespaceResolver, setPipelineConfiguration, setSelection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ApplyTemplatesWatch(Expression expression, SequenceReceiver result, Stack<XPathContext> contextStack)
Method Detail |
---|
public void open() throws XPathException
AbstractWatch
open
in interface Watch
open
in class EventPushingWatch
XPathException
public void computeActualParams(WithParam[] params) throws XPathException
XPathException
public void computeTunnelParams(WithParam[] params) throws XPathException
XPathException
public void setActualParams(ParameterSet params) throws XPathException
XPathException
public void setTunnelParams(ParameterSet params) throws XPathException
XPathException
protected XPathContext getLocalContext()
public void setMode(Mode mode)
public Mode getMode()
public void setWatchManager(WatchManager watchManager)
public Receiver startSelectedParentNode(FleetingNode node, int locationId) throws XPathException
node
- the element or document node whose start event has been matchedlocationId
- the location associated with the element or document node (may be
the location of the instruction that created it)
ValidationException
- May be raised if the constraint implemented by this
Watch is violated @param locationId
XPathException
protected Rule getRule(FleetingNode node) throws XPathException
XPathException
public void notifySelectedLeafNode(FleetingNode node, int locationId) throws XPathException
notifySelectedLeafNode
in interface Watch
notifySelectedLeafNode
in class AbstractWatch
node
- the node that was matched.locationId
-
XPathException
public void endSelectedParentNode(int locationId) throws XPathException
locationId
- the location of the element
ValidationException
- May be raised if the constraint implemented by this
Watch is violated @param locationId
XPathException
- May be raised if a constraint implemented by this
Watch is violatedpublic void close() throws XPathException
AbstractWatch
close
in interface Watch
close
in class EventPushingWatch
XPathException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |