|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.saxonica.stream.StreamingPatternMaker
public class StreamingPatternMaker
Factory class to make a streaming pattern from an expression. This is a variant of the class
PatternMaker
which handles the special rules for the streaming case.
Constructor Summary | |
---|---|
StreamingPatternMaker()
|
Method Summary | |
---|---|
static Pattern |
fromExpression(Expression expression,
Configuration config)
Static factory method to make a pattern by converting an expression. |
static Pattern |
makeStreamingPattern(Expression expression,
Configuration config,
List<String> reasonForFailure)
Convert an expression that is capable of being evaluated as a filter on an XML event stream into a Pattern object which is able to act as the filter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamingPatternMaker()
Method Detail |
---|
public static Pattern fromExpression(Expression expression, Configuration config) throws XPathException
This is a variant of the method PatternMaker.fromExpression(net.sf.saxon.expr.Expression,net.sf.saxon.Configuration,boolean)
,
and differs in that it creates a pattern suitable for streaming evaluation.
Note that this method does NOT check all the rules for XSLT patterns; it deliberately allows a (slightly) wider class of expressions to be converted than XSLT allows.
The expression root() at the start of the expression has a special meaning: it refers to the root of the subtree in which the pattern must match, which can be supplied at run-time during pattern matching. This is used for patterns that represent streamable path expressions.
expression
- the expression to be convertedconfig
- the Saxon configuration
XPathException
- if the expression cannot be convertedpublic static Pattern makeStreamingPattern(Expression expression, Configuration config, List<String> reasonForFailure)
expression
- the expression to be convertedconfig
- the Saxon configurtaionreasonForFailure
- a list which will be populated with messages giving reasons why the
expression cannot be converted
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |