public class PatternMaker extends Object
Constructor and Description |
---|
PatternMaker() |
Modifier and Type | Method and Description |
---|---|
static Pattern |
fromExpression(Expression expression,
Configuration config,
boolean is30)
Static factory method to make a pattern by converting an expression.
|
static byte |
getAxisForPathStep(Expression step) |
public static Pattern fromExpression(Expression expression, Configuration config, boolean is30) throws XPathException
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 converted, which must already have been simplified and
type-checkedconfig
- the Saxon configurationis30
- set to true if XSLT 3.0 syntax is to be acceptedXPathException
- if the expression cannot be convertedpublic static byte getAxisForPathStep(Expression step) throws XPathException
XPathException
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.