jd.xml.xslt.parser
Class PatternParser
java.lang.Object
jd.xml.xpath.parser.ExpressionParser
jd.xml.xslt.parser.PatternParser
- All Implemented Interfaces:
- TokenConstants
- public class PatternParser
- extends ExpressionParser
- implements TokenConstants
A parser for XSLT patterns, XPath expressions and AttributeValueTemplates.
Fields inherited from interface jd.xml.xpath.parser.TokenConstants |
AT, AXISNAME, BRACKET_CLOSE, BRACKET_OPEN, COMMA, DOT, DOTDOT, END_OF_EXPRESSION, EQUALS, GREATER, GREATER_EQUALS, LESS, LESS_EQUALS, LITERAL, MAX, MINUS, MULTIPLY, NAME, NOT_EQUALS, NUMBER, PARENTHESIS_CLOSE, PARENTHESIS_OPEN, PLUS, SLASH, SLASHSLASH, UNDEFINED, UNION, VARIABLE_REFERENCE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PatternParser
public PatternParser()
- Cbeate a PatternParser with a own XsltParceContext.
PatternParser
public PatternParser(XsltParseContext context)
- Create a PatternParser which uses the given XsltParseContext.
getXsltParseContext
XsltParseContext getXsltParseContext()
setParseListener
public void setParseListener(ParseListener parseListener)
- Set a ParseListener.
parseExpression
public Expression parseExpression(String source)
throws XPathParseException
- Overrides:
parseExpression
in class ExpressionParser
- Throws:
XPathParseException
parsePattern
public Pattern parsePattern(String source)
throws XPathParseException
- Throws:
XPathParseException
createFunction
protected Expression createFunction(Scanner scanner,
String functionName,
Expression[] arguments)
throws XPathParseException
- Description copied from class:
ExpressionParser
- Create a function call expression for a function with the given name
and arguments. Since xpath can be enhanced by adding more functions to
the default function library this factory method gives derived parser
the ability to influence the creation of the function when needed.
The default implementation returns a simple FunctionCall object
- Overrides:
createFunction
in class ExpressionParser
- Throws:
XPathParseException
parseAttributeValue
public AttributeValue parseAttributeValue(String source)
throws XPathParseException
- Throws:
XPathParseException