|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.apache.xpath.compiler.XPathParser
Tokenizes and parses XPath expressions. This should really be named XPathParserImpl, and may be renamed in the future.
This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.
Constructor Summary | |
XPathParser(javax.xml.transform.ErrorListener errorListener,
javax.xml.transform.SourceLocator sourceLocator)
The parser constructor. |
Method Summary | |
protected void |
AbbreviatedNodeTestStep()
AbbreviatedNodeTestStep ::= '@'? NodeTest Predicate |
protected int |
AdditiveExpr(int addPos)
This has to handle construction of the operations so that they are evaluated in pre-fix order. |
protected void |
AndExpr()
AndExpr ::= EqualityExpr | AndExpr 'and' EqualityExpr |
protected void |
Argument()
Argument ::= Expr |
protected int |
AxisName()
Basis ::= AxisName '::' NodeTest | AbbreviatedBasis |
protected void |
Basis()
Basis ::= AxisName '::' NodeTest | AbbreviatedBasis |
protected void |
BooleanExpr()
StringExpr ::= Expr |
protected java.lang.String |
dumpRemainingTokenQueue()
Dump the remaining token queue. |
protected int |
EqualityExpr(int addPos)
|
protected void |
Expr()
Expr ::= OrExpr |
protected void |
FilterExpr()
FilterExpr ::= PrimaryExpr | FilterExpr Predicate |
protected void |
FunctionCall()
FunctionCall ::= FunctionName '(' ( Argument ( ',' Argument)*)? ')' |
javax.xml.transform.ErrorListener |
getErrorListener()
Return the current error listener. |
protected void |
IdKeyPattern()
IdKeyPattern ::= 'id' '(' Literal ')' | 'key' '(' Literal ',' Literal ')' (Also handle doc()) |
void |
initMatchPattern(Compiler compiler,
java.lang.String expression,
PrefixResolver namespaceContext)
Given an string, init an XPath object for pattern matches, in order that a parse doesn't have to be done each time the expression is evaluated. |
void |
initXPath(Compiler compiler,
java.lang.String expression,
PrefixResolver namespaceContext)
Given an string, init an XPath object for selections, in order that a parse doesn't have to be done each time the expression is evaluated. |
protected void |
Literal()
The value of the Literal is the sequence of characters inside the " or ' characters>. |
protected void |
LocationPath()
LocationPath ::= RelativeLocationPath | AbsoluteLocationPath |
protected void |
LocationPathPattern()
LocationPathPattern ::= '/' RelativePathPattern? | IdKeyPattern (('/' | '//') RelativePathPattern)? | '//'? RelativePathPattern |
protected int |
MultiplicativeExpr(int addPos)
This has to handle construction of the operations so that they are evaluated in pre-fix order. |
protected void |
NCName()
NCName ::= (Letter | '_') (NCNameChar) NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender |
protected void |
NodeTest(int axesType)
NodeTest ::= WildcardName | NodeType '(' ')' | 'processing-instruction' '(' Literal ')' |
protected void |
Number()
Number ::= [0-9]+('.'[0-9]+)? | '.'[0-9]+ |
protected void |
NumberExpr()
NumberExpr ::= Expr |
protected void |
OrExpr()
OrExpr ::= AndExpr | OrExpr 'or' AndExpr |
protected void |
PathExpr()
PathExpr ::= LocationPath | FilterExpr | FilterExpr '/' RelativeLocationPath | FilterExpr '//' RelativeLocationPath |
protected void |
Pattern()
Pattern ::= LocationPathPattern | Pattern '|' LocationPathPattern |
protected void |
Predicate()
Predicate ::= '[' PredicateExpr ']' |
protected void |
PredicateExpr()
PredicateExpr ::= Expr |
protected void |
PrimaryExpr()
PrimaryExpr ::= VariableReference | '(' Expr ')' | Literal | Number | FunctionCall |
protected void |
QName()
QName ::= (Prefix ':')? LocalPart Prefix ::= NCName LocalPart ::= NCName |
protected int |
RelationalExpr(int addPos)
. |
protected void |
RelativeLocationPath()
RelativeLocationPath ::= Step | RelativeLocationPath '/' Step | AbbreviatedRelativeLocationPath |
protected void |
RelativePathPattern()
RelativePathPattern ::= StepPattern | RelativePathPattern '/' StepPattern | RelativePathPattern '//' StepPattern |
void |
setErrorHandler(javax.xml.transform.ErrorListener handler)
Allow an application to register an error event handler, where syntax errors will be sent. |
protected void |
Step()
Step ::= Basis Predicate | AbbreviatedStep |
protected void |
StepPattern()
StepPattern ::= AbbreviatedNodeTestStep |
protected void |
StringExpr()
StringExpr ::= Expr |
protected void |
UnaryExpr()
UnaryExpr ::= UnionExpr | '-' UnaryExpr |
protected void |
UnionExpr()
The context of the right hand side expressions is the context of the left hand side expression. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public XPathParser(javax.xml.transform.ErrorListener errorListener, javax.xml.transform.SourceLocator sourceLocator)
Method Detail |
public void initXPath(Compiler compiler, java.lang.String expression, PrefixResolver namespaceContext) throws javax.xml.transform.TransformerException
compiler
- The compiler object.expression
- A string conforming to the XPath grammar.namespaceContext
- An object that is able to resolve prefixes in
the XPath to namespaces.public void initMatchPattern(Compiler compiler, java.lang.String expression, PrefixResolver namespaceContext) throws javax.xml.transform.TransformerException
compiler
- The XPath object to be initialized.expression
- A String representing the XPath.namespaceContext
- An object that is able to resolve prefixes in
the XPath to namespaces.public void setErrorHandler(javax.xml.transform.ErrorListener handler)
handler
- Reference to error listener where syntax errors will be
sent.public javax.xml.transform.ErrorListener getErrorListener()
protected java.lang.String dumpRemainingTokenQueue()
protected void Expr() throws javax.xml.transform.TransformerException
protected void OrExpr() throws javax.xml.transform.TransformerException
protected void AndExpr() throws javax.xml.transform.TransformerException
protected int EqualityExpr(int addPos) throws javax.xml.transform.TransformerException
addPos
- Position where expression is to be added, or -1 for append.protected int RelationalExpr(int addPos) throws javax.xml.transform.TransformerException
addPos
- Position where expression is to be added, or -1 for append.protected int AdditiveExpr(int addPos) throws javax.xml.transform.TransformerException
addPos
- Position where expression is to be added, or -1 for append.protected int MultiplicativeExpr(int addPos) throws javax.xml.transform.TransformerException
addPos
- Position where expression is to be added, or -1 for append.protected void UnaryExpr() throws javax.xml.transform.TransformerException
protected void StringExpr() throws javax.xml.transform.TransformerException
protected void BooleanExpr() throws javax.xml.transform.TransformerException
protected void NumberExpr() throws javax.xml.transform.TransformerException
protected void UnionExpr() throws javax.xml.transform.TransformerException
protected void PathExpr() throws javax.xml.transform.TransformerException
protected void FilterExpr() throws javax.xml.transform.TransformerException
protected void PrimaryExpr() throws javax.xml.transform.TransformerException
protected void Argument() throws javax.xml.transform.TransformerException
protected void FunctionCall() throws javax.xml.transform.TransformerException
protected void LocationPath() throws javax.xml.transform.TransformerException
protected void RelativeLocationPath() throws javax.xml.transform.TransformerException
protected void Step() throws javax.xml.transform.TransformerException
protected void Basis() throws javax.xml.transform.TransformerException
protected int AxisName() throws javax.xml.transform.TransformerException
Keywords
.protected void NodeTest(int axesType) throws javax.xml.transform.TransformerException
axesType
- FROM_XXX axes type, found in Keywords
.protected void Predicate() throws javax.xml.transform.TransformerException
protected void PredicateExpr() throws javax.xml.transform.TransformerException
protected void QName() throws javax.xml.transform.TransformerException
protected void NCName()
protected void Literal() throws javax.xml.transform.TransformerException
protected void Number() throws javax.xml.transform.TransformerException
protected void Pattern() throws javax.xml.transform.TransformerException
protected void LocationPathPattern() throws javax.xml.transform.TransformerException
protected void IdKeyPattern() throws javax.xml.transform.TransformerException
protected void RelativePathPattern() throws javax.xml.transform.TransformerException
protected void StepPattern() throws javax.xml.transform.TransformerException
protected void AbbreviatedNodeTestStep() throws javax.xml.transform.TransformerException
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs61 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |