|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.expr.parser.ExpressionParser
net.sf.saxon.pattern.PatternParser
public class PatternParser
Parser for XSLT patterns. This is created by overriding selected parts of the standard ExpressionParser.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.sf.saxon.expr.parser.ExpressionParser |
|---|
ExpressionParser.TemporaryContainer |
| Field Summary |
|---|
| Fields inherited from class net.sf.saxon.expr.parser.ExpressionParser |
|---|
allowXPath30Syntax, defaultContainer, env, language, languageVersion, nameChecker, rangeVariables, scanOnly, SEQUENCE_TYPE, t, XPATH, XQUERY, XSLT_PATTERN |
| Constructor Summary | |
|---|---|
PatternParser()
|
|
| Method Summary | |
|---|---|
protected void |
customizeTokenizer(Tokenizer t)
Callback to tailor the tokenizer |
Expression |
makeTracer(int startOffset,
Expression exp,
int construct,
StructuredQName qName)
If tracing, wrap an expression in a trace instruction |
protected Expression |
parseBasicStep(boolean firstInPattern)
Parse a basic step expression (without the predicates) |
Expression |
parseExpression()
Override the parsing of top-level expressions |
Expression |
parseFunctionArgument()
Parse an argument to a function call. |
protected Expression |
parseFunctionCall()
Parse a function call appearing within a pattern. |
Pattern |
parsePattern(String pattern,
StaticContext env)
Parse a string representing an XSLT pattern |
protected Expression |
parsePredicate()
Parse an expression appearing within a predicate. |
protected Expression |
parseTypePattern()
Parse a type pattern of the form "~ ItemType" (introduced in XSLT 3.0) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PatternParser()
| Method Detail |
|---|
public Pattern parsePattern(String pattern,
StaticContext env)
throws XPathException
pattern - the pattern expressed as a Stringenv - the static context for the pattern
XPathException - if the pattern contains a syntax errorprotected void customizeTokenizer(Tokenizer t)
customizeTokenizer in class ExpressionParsert - the Tokenizer to be customized
public Expression parseExpression()
throws XPathException
parseExpression in class ExpressionParserXPathException
protected Expression parseBasicStep(boolean firstInPattern)
throws XPathException
parseBasicStep in class ExpressionParserfirstInPattern - true only if we are parsing the first step in a
RelativePathPattern in the XSLT Pattern syntax
XPathException - if any error is encountered
protected Expression parseTypePattern()
throws XPathException
parseTypePattern in class ExpressionParserXPathException - if any error is found, for example if XSLT 3.0 is not enabled
protected Expression parsePredicate()
throws XPathException
parsePredicate in class ExpressionParserXPathException
protected Expression parseFunctionCall()
throws XPathException
parseFunctionCall in class ExpressionParserXPathException
public Expression parseFunctionArgument()
throws XPathException
ExpressionParser
parseFunctionArgument in class ExpressionParserXPathException - if the argument expression does not parse correctly
public Expression makeTracer(int startOffset,
Expression exp,
int construct,
StructuredQName qName)
ExpressionParser
makeTracer in class ExpressionParserstartOffset - the position of the expression in the soruceexp - the expression to be wrappedconstruct - integer constant identifying the kind of constructqName - the name of the construct (if applicable)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||