4Suite
™
API Documentation
►
Module
Ft
.
Xml
.
XPath
.ParsedExpr
The implementation of parsed XPath expression tokens.
Copyright 2005 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/
Classes:
FunctionCall
,
FunctionCall1
,
FunctionCall2
,
FunctionCall3
,
FunctionCallN
,
ParsedAdditiveExpr
,
ParsedAndExpr
,
ParsedEqualityExpr
,
ParsedFilterExpr
,
ParsedLiteralExpr
,
ParsedMultiplicativeExpr
,
ParsedNLiteralExpr
,
ParsedOrExpr
,
ParsedPathExpr
,
ParsedRelationalExpr
,
ParsedUnaryExpr
,
ParsedUnionExpr
,
ParsedVariableReferenceExpr
Functions:
ParsedFunctionCallExpr
Fields:
EMPTY_NAMESPACE
Classes
class
FunctionCall
An object representing a function call expression (XPath 1.0 grammar production 16: FunctionCall)
Methods
__getinitargs__
(
self
)
__getstate__
(
self
)
__init__
(
self
,
name
,
key
,
args
)
__repr__
(
self
)
__str__
(
self
)
error
(
self
,
*args
)
evaluate
(
self
,
context
)
Returns the result of calling the function
getArgumentError
(
self
)
pprint
(
self
,
indent
=''
)
class
FunctionCall1
(
FunctionCall
)
Methods
__init__
(
self
,
name
,
key
,
args
)
# a function call with 1 argument
evaluate
(
self
,
context
)
Methods inherited from class
FunctionCall
__getinitargs__
,
__getstate__
,
__repr__
,
__str__
,
error
,
getArgumentError
,
pprint
class
FunctionCall2
(
FunctionCall
)
Methods
__init__
(
self
,
name
,
key
,
args
)
# a function call with 2 arguments
evaluate
(
self
,
context
)
Methods inherited from class
FunctionCall
__getinitargs__
,
__getstate__
,
__repr__
,
__str__
,
error
,
getArgumentError
,
pprint
class
FunctionCall3
(
FunctionCall
)
Methods
__init__
(
self
,
name
,
key
,
args
)
# a function call with 3 arguments
evaluate
(
self
,
context
)
Methods inherited from class
FunctionCall
__getinitargs__
,
__getstate__
,
__repr__
,
__str__
,
error
,
getArgumentError
,
pprint
class
FunctionCallN
(
FunctionCall
)
Methods
__init__
(
self
,
name
,
key
,
args
)
# a function call with more than 3 arguments
evaluate
(
self
,
context
)
Methods inherited from class
FunctionCall
__getinitargs__
,
__getstate__
,
__repr__
,
__str__
,
error
,
getArgumentError
,
pprint
class
ParsedAdditiveExpr
An object representing an additive expression (XPath 1.0 grammar production 25: AdditiveExpr)
Methods
__init__
(
self
,
sign
,
left
,
right
)
__repr__
(
self
)
__str__
(
self
)
evaluate
(
self
,
context
)
Returns a number
pprint
(
self
,
indent
=''
)
class
ParsedAndExpr
An object representing an and expression (XPath 1.0 grammar production 22: AndExpr)
Methods
__init__
(
self
,
left
,
right
)
__repr__
(
self
)
__str__
(
self
)
evaluate
(
self
,
context
)
Returns a boolean
pprint
(
self
,
indent
=''
)
class
ParsedEqualityExpr
An object representing an equality expression (XPath 1.0 grammar production 23: EqualityExpr)
Methods
__getstate__
(
self
)
__init__
(
self
,
op
,
left
,
right
)
__repr__
(
self
)
__setstate__
(
self
,
state
)
__str__
(
self
)
evaluate
(
self
,
context
)
Returns a boolean
pprint
(
self
,
indent
=''
)
class
ParsedFilterExpr
An object representing a filter expression (XPath 1.0 grammar production 20: FilterExpr)
Methods
__init__
(
self
,
filter_
,
predicates
)
__repr__
(
self
)
__str__
(
self
)
evaluate
(
self
,
context
)
Returns a node-set
pprint
(
self
,
indent
=''
)
shiftContext
(
self
,
context
,
index
,
set
,
len
,
func
)
class
ParsedLiteralExpr
An object representing a string literal expression (XPath 1.0 grammar production 29: Literal)
Methods
__init__
(
self
,
literal
)
__repr__
(
self
)
__str__
(
self
)
evaluate
(
self
,
context
)
pprint
(
self
,
indent
=''
)
class
ParsedMultiplicativeExpr
An object representing an multiplicative expression (XPath 1.0 grammar production 26: MultiplicativeExpr)
Methods
__init__
(
self
,
opcode
,
left
,
right
)
__repr__
(
self
)
__str__
(
self
)
evaluate
(
self
,
context
)
Returns a number
pprint
(
self
,
indent
=''
)
class
ParsedNLiteralExpr
(
ParsedLiteralExpr
)
An object representing a numeric literal expression (XPath 1.0 grammar production 30: Number)
Methods
__init__
(
self
,
nliteral
)
__repr__
(
self
)
__str__
(
self
)
pprint
(
self
,
indent
=''
)
Methods inherited from class
ParsedLiteralExpr
evaluate
class
ParsedOrExpr
An object representing an or expression (XPath 1.0 grammar production 21: OrExpr)
Methods
__init__
(
self
,
left
,
right
)
__repr__
(
self
)
__str__
(
self
)
evaluate
(
self
,
context
)
Returns a boolean
pprint
(
self
,
indent
=''
)
class
ParsedPathExpr
An object representing a path expression (XPath 1.0 grammar production 19: PathExpr)
Methods
__init__
(
self
,
descendant
,
left
,
right
)
__repr__
(
self
)
__str__
(
self
)
evaluate
(
self
,
context
)
Returns a node-set
pprint
(
self
,
indent
=''
)
class
ParsedRelationalExpr
An object representing a relational expression (XPath 1.0 grammar production 24: RelationalExpr)
Methods
__getstate__
(
self
)
__init__
(
self
,
opcode
,
left
,
right
)
__repr__
(
self
)
__setstate__
(
self
,
state
)
__str__
(
self
)
evaluate
(
self
,
context
)
Returns a boolean
pprint
(
self
,
indent
=''
)
class
ParsedUnaryExpr
An object representing a unary expression (XPath 1.0 grammar production 27: UnaryExpr)
Methods
__init__
(
self
,
exp
)
__repr__
(
self
)
__str__
(
self
)
evaluate
(
self
,
context
)
Returns a number
pprint
(
self
,
indent
=''
)
class
ParsedUnionExpr
An object representing a union expression (XPath 1.0 grammar production 18: UnionExpr)
Methods
__init__
(
self
,
left
,
right
)
__repr__
(
self
)
__str__
(
self
)
evaluate
(
self
,
context
)
Returns a node-set
pprint
(
self
,
indent
=''
)
class
ParsedVariableReferenceExpr
An object representing a variable reference expression (XPath 1.0 grammar production 36: VariableReference)
Methods
__init__
(
self
,
name
)
__repr__
(
self
)
__str__
(
self
)
evaluate
(
self
,
context
)
Returns a string
pprint
(
self
,
indent
=''
)
Functions
ParsedFunctionCallExpr
(
name
,
args
)
Returns an object representing a function call expression (XPath 1.0 grammar production 16: FunctionCall)
Fields
EMPTY_NAMESPACE
= None