|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.saxonica.validate.AbstractWatch
com.saxonica.stream.watch.ComposingWatch
com.saxonica.stream.watch.SimpleContentWatch
public class SimpleContentWatch
This class is used when a streaming template requests evaluation of a simple content constructor in streaming mode (that is, when it constructs a text, attribute, comment, or PI node based on the contents of the streamed document). The result of this Watch is a single string, constructed using the rules of "Constructing Simple Content" in the XSLT specification.
The AdjacentTextNodeMergerFeed is used when the node is constructed as a result of a computation on the streamed data,
for example xsl:value-of select="distinct-values(.//@price)". By contrast, a SimpleContentWatch
is used when the streamed nodes are selected directly, for example xsl:value-of select=".//@price".
Both a Feed and a Watch are needed because a simple content constructor operates on a sequence of nodes without simply atomizing the sequence.
| Constructor Summary | |
|---|---|
SimpleContentWatch(Feed 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 |
endSelectedParentNode(int locationId)
Signal that the endElement event has occurred for the element whose startElement event caused the Watch to be activated. |
void |
notifySelectedLeafNode(FleetingNode node,
int locationId)
Signal that a node (other than an element) that matches the selection has been found. |
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.ComposingWatch |
|---|
getContext, getContextStack, getResult, open |
| 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 |
| Methods inherited from interface com.saxonica.stream.watch.Watch |
|---|
getAnchorNode, getNamespaceResolver, getPipelineConfiguration, getSelection, open, setAnchorNode, setNamespaceResolver, setPipelineConfiguration, setSelection |
| Constructor Detail |
|---|
public SimpleContentWatch(Feed result,
Stack<XPathContext> contextStack)
| Method Detail |
|---|
public Receiver startSelectedParentNode(FleetingNode node,
int locationId)
throws XPathException
startSelectedParentNode in interface Watchnode - locationId - @throws net.sf.saxon.type.ValidationException
May be raised if the constraint implemented by this
Watch is violated
ValidationException - May be raised if the constraint implemented by this
Watch is violated
XPathException
public void endSelectedParentNode(int locationId)
throws XPathException
endSelectedParentNode in interface WatchlocationId - 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 violated
public void notifySelectedLeafNode(FleetingNode node,
int locationId)
throws XPathException
notifySelectedLeafNode in interface WatchnotifySelectedLeafNode in class AbstractWatchnode - the node that was matched.locationId -
XPathException
public final void close()
throws XPathException
close in interface Watchclose in class ComposingWatchXPathException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||