Class Index | File Index

Classes


Class xrx.xpath.Expr


Defined in: expr.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
xrx.xpath.Expr(dataType)
Abstract constructor for an XPath expression.
Field Summary
Field Attributes Field Name and Description
 
Evaluates the expression.
 
Method Summary
Method Attributes Method Name and Description
 
asBool(ctx)
Evaluate and interpret the result as a boolean value.
 
asNumber(ctx)
Evaluate and interpret the result as a number.
 
asString(ctx)
Evaluate and interpret the result as a string.
 
Returns whether the expression needs context node to be evaluated.
 
Returns whether the expression needs context position to be evaluated.
 
Returns the data type of the expression.
 
Returns the quick attribute information, if exists.
<static>  
xrx.xpath.Expr.indent(obj)
Indentation method for pretty printing.
 
Sets whether the expression needs context node to be evaluated.
 
Sets whether the expression needs context position to be evaluated.
 
setQuickAttr(attrInfo)
Sets up the quick attribute info.
Class Detail
xrx.xpath.Expr(dataType)
Abstract constructor for an XPath expression.
Parameters:
{!xrx.xpath.DataType} dataType
The data type that the expression will be evaluated into.
Field Detail
{!(string|boolean|number|xrx.xpath.NodeSet)} evaluate
Evaluates the expression.

toString
Method Detail
{boolean} asBool(ctx)
Evaluate and interpret the result as a boolean value.
Parameters:
{!xrx.xpath.Context} ctx
The context to evaluate the expression in.
Returns:
{boolean} The evaluated boolean value.

{number} asNumber(ctx)
Evaluate and interpret the result as a number.
Parameters:
{!xrx.xpath.Context} ctx
The context to evaluate the expression in.
Returns:
{number} The evaluated number value.

{string} asString(ctx)
Evaluate and interpret the result as a string.
Parameters:
{!xrx.xpath.Context} ctx
The context to evaluate the expression in.
Returns:
{string} The evaluated string.

{boolean} doesNeedContextNode()
Returns whether the expression needs context node to be evaluated.
Returns:
{boolean} Whether context node is needed.

{boolean} doesNeedContextPosition()
Returns whether the expression needs context position to be evaluated.
Returns:
{boolean} Whether context position is needed.

{!xrx.xpath.DataType} getDataType()
Returns the data type of the expression.
Returns:
{!xrx.xpath.DataType} The data type that the expression will be evaluated into.

{?{name: string|valueExpr: xrx.xpath.Expr}} getQuickAttr()
Returns the quick attribute information, if exists.
Returns:
{?{name: string|valueExpr: xrx.xpath.Expr}} The attribute information.

<static> {string} xrx.xpath.Expr.indent(obj)
Indentation method for pretty printing.
Parameters:
{*} obj
The object to return a string representation for.
Returns:
{string} The string prepended with newline and two spaces.

setNeedContextNode(flag)
Sets whether the expression needs context node to be evaluated.
Parameters:
{boolean} flag
Whether context node is needed.

setNeedContextPosition(flag)
Sets whether the expression needs context position to be evaluated.
Parameters:
{boolean} flag
Whether context position is needed.

setQuickAttr(attrInfo)
Sets up the quick attribute info.
Parameters:
{?{name: string|valueExpr: xrx.xpath.Expr}} attrInfo
The attribute information.

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Oct 17 2013 17:08:43 GMT+0200 (MESZ)