net.sf.saxon.instruct
public class AnalyzeString extends Instruction
Constructor Summary | |
---|---|
AnalyzeString(Expression select, Expression regex, Expression flags, Expression matching, Expression nonMatching, RegularExpression pattern)
Construct an AnalyzeString instruction
|
Method Summary | |
---|---|
void | checkPermittedContents(SchemaType parentType, StaticContext env, boolean whole)
Check that any elements and attributes constructed or returned by this expression are acceptable
in the content model of a given complex type. |
int | computeDependencies()
Compute the dependencies of an expression, as the union of the
dependencies of its subexpressions. |
Expression | copy()
Copy an expression. |
void | explain(ExpressionPresenter out)
Diagnostic print of expression structure. |
int | getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
int | getInstructionNameCode() |
ItemType | getItemType(TypeHierarchy th)
Get the item type of the items returned by evaluating this instruction
|
Expression | getMatchingExpression()
Get the expression used to process matching substrings |
Expression | getNonMatchingExpression()
Get the expression used to process non-matching substrings |
boolean | hasLoopingSubexpression(Expression child)
Given an expression that is an immediate child of this expression, test whether
the evaluation of the parent expression causes the child expression to be
evaluated repeatedly |
SequenceIterator | iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence. |
Iterator<Expression> | iterateSameFocusSubExpressions()
Get the immediate sub-expressions of this expression that are evaluated with the
same focus (context item, position, and size) as the parent expression. |
Iterator<Expression> | iterateSubExpressions()
Get all the XPath expressions associated with this instruction
(in XSLT terms, the expression present on attributes of the instruction,
as distinct from the child instructions in a sequence construction) |
Expression | optimize(ExpressionVisitor visitor, ItemType contextItemType) |
TailCall | processLeavingTail(XPathContext context)
ProcessLeavingTail: called to do the real work of this instruction. |
protected void | promoteInst(PromotionOffer offer)
Handle promotion offers, that is, non-local tree rewrites.
|
boolean | replaceSubExpression(Expression original, Expression replacement)
Replace one subexpression by a replacement subexpression |
Expression | simplify(ExpressionVisitor visitor)
Simplify an expression. |
Expression | typeCheck(ExpressionVisitor visitor, ItemType contextItemType) |
Parameters: select the expression containing the input string regex the regular expression flags the flags parameter matching actions to be applied to a matching substring nonMatching actions to be applied to a non-matching substring pattern the compiled regular expression, if it was known statically
Returns: the depencies, as a bit-mask
Returns: the copy of the original expression
Parameters: th the type hierarchy cache
Returns: the static item type of the instruction
Returns: the expression used to process matching substrings
Returns: the expression used to process non-matching substrings
Parameters: child the immediate subexpression
Returns: true if the child expression is evaluated repeatedly
Parameters: context supplies the context for evaluation
Returns: a SequenceIterator that can be used to iterate over the result of the expression
Throws: net.sf.saxon.trans.XPathException if any dynamic error occurs evaluating the expression
Returns: an iterator containing those sub-expressions of this expression that are evaluated with the same focus as the parent expression
Parameters: context The dynamic context of the transformation, giving access to the current node, the current variables, etc.
Returns: null if the instruction has completed execution; or a TailCall indicating a function call or template call that is delegated to the caller, to be made after the stack has been unwound so as to save stack space.
Parameters: offer The type of rewrite being offered
Throws: XPathException
Parameters: original the original subexpression replacement the replacement subexpression
Returns: true if the original subexpression is found
Parameters: visitor an expression visitor
Returns: the simplified expression
Throws: XPathException if an error is discovered during expression rewriting