com.saxonica.extra
Class AnalyzeStringFunction

java.lang.Object
  extended by net.sf.saxon.expr.Expression
      extended by net.sf.saxon.expr.FunctionCall
          extended by net.sf.saxon.functions.SystemFunction
              extended by net.sf.saxon.functions.CompileTimeFunction
                  extended by com.saxonica.extra.AnalyzeStringFunction
All Implemented Interfaces:
Serializable, SourceLocator, EvaluableItem, SequenceIterable, InstructionInfoProvider

public class AnalyzeStringFunction
extends CompileTimeFunction

This class implements the extension function saxon:analyze-string(). This is a higher order function that provides functionality similar to the XSLT 2.0 xsl:analyze-string instruction, but it works also in XQuery. The first argument is the string to be analyzed; the second is a string containing the regex. The third argument is a function to be invoked once for each matching substring; the fourth argument is a function to be invoked once for each non-matching substring. The fifth optional argument is the regular expression flags.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.saxon.expr.Expression
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD
 
Constructor Summary
AnalyzeStringFunction()
           
 
Method Summary
 Expression simplify(ExpressionVisitor visitor)
          Simplify the function call.
 
Methods inherited from class net.sf.saxon.functions.CompileTimeFunction
evaluateItem, iterate, preEvaluate
 
Methods inherited from class net.sf.saxon.functions.SystemFunction
addDocToPathMap, checkArguments, computeCardinality, computeSpecialProperties, copy, getDetails, getErrorCodeForTypeErrors, getItemType, makeSystemFunction, optimize, setDetails
 
Methods inherited from class net.sf.saxon.expr.FunctionCall
addExternalFunctionCallToPathMap, equals, explain, getArguments, getDisplayName, getFunctionName, getNumberOfArguments, hashCode, iterateSubExpressions, promote, replaceSubExpression, setArguments, setFunctionName, toString, typeCheck
 
Methods inherited from class net.sf.saxon.expr.Expression
addToPathMap, adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, display, doPromotion, effectiveBooleanValue, evaluateAsString, explain, findParentOf, getCardinality, getColumnNumber, getContainer, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getLineNumber, getLocationId, getLocationProvider, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, iterateEvents, markTailFunctionCalls, process, setContainer, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnalyzeStringFunction

public AnalyzeStringFunction()
Method Detail

simplify

public Expression simplify(ExpressionVisitor visitor)
                    throws XPathException
Description copied from class: FunctionCall
Simplify the function call. Default method is to simplify each of the supplied arguments and evaluate the function if all are now known.

Overrides:
simplify in class FunctionCall
Parameters:
visitor - an expression visitor
Returns:
the simplified expression
Throws:
XPathException - if an error is discovered during expression rewriting


Copyright (C) Michael H. Kay. All rights reserved.