Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XPath Class Reference

#include <XPath.hpp>

Collaboration diagram for XPath:

Collaboration graph
[legend]
List of all members.

Public Types

Public Methods

Static Public Methods

Static Public Attributes

Protected Methods

Friends


Member Typedef Documentation

typedef XPathExecutionContext::CurrentNodePushAndPop XPath::CurrentNodePushAndPop
 

typedef XPathFunctionTable XPath::FunctionTableType
 

typedef XPathExecutionContext::GetAndReleaseCachedString XPath::GetCachedString
 

typedef XERCES_CPP_NAMESPACE_QUALIFIER Locator XPath::LocatorType
 

typedef void(FormatterListener::* XPath::MemberFunctionPtr)(const XMLCh *const, const unsigned int)
 

typedef XPathExpression::OpCodeMapPositionType XPath::OpCodeMapPositionType
 

typedef XPathExpression::OpCodeMapValueType XPath::OpCodeMapValueType
 

typedef XPathExecutionContext::PrefixResolverSetAndRestore XPath::PrefixResolverSetAndRestore
 

typedef XalanVector< TargetData > XPath::TargetDataVectorType<TargetData>
 

typedef XPathExpression::TokenQueuePositionType XPath::TokenQueuePositionType
 


Member Enumeration Documentation

enum XPath::eMatchScore
 

Enumeration values:
eMatchScoreNone  
eMatchScoreNodeTest  
eMatchScoreNSWild  
eMatchScoreQName  
eMatchScoreOther  


Constructor & Destructor Documentation

XPath::XPath ( MemoryManagerType & theManager,
const LocatorType * theLocator = 0 ) [explicit]
 

Construct an XPath.

Parameters:
theLocator   The applicable LocatorType, if any.

XPath::~XPath ( )
 


Member Function Documentation

bool XPath::And ( XalanNode * context,
OpCodeMapPositionType opPos,
XPathExecutionContext & executionContext ) const [protected]
 

OR two expressions and return the boolean result.

Parameters:
context   The current source tree context node.
opPos   The current position in the Op Map.
executionContext   current execution context
Returns:
true if the two arguments are both true.

bool XPath::Or ( XalanNode * context,
OpCodeMapPositionType opPos,
XPathExecutionContext & executionContext ) const [protected]
 

OR two expressions and return the boolean result.

Parameters:
context   The current source tree context node.
opPos   The current position in the Op Map.
executionContext   current execution context
Returns:
true if the one of the two arguments are true.

void XPath::Union ( XalanNode * context,
OpCodeMapPositionType opPos,
XPathExecutionContext & executionContext,
MutableNodeRefList & result ) const [protected]
 

Computes the union of its operands which must be node-sets.

Parameters:
context   The current source tree context node.
opPos   The current position in the Op Map.
executionContext   current execution context
Returns:
the result of the union of node-set operands.

void XPath::Union ( XalanNode * context,
OpCodeMapPositionType opPos,
XPathExecutionContext & executionContext,
FormatterListener & formatterListener,
MemberFunctionPtr function ) const [protected]
 

Computes the union of its operands which must be node-sets.

Parameters:
context   The current source tree context node.
opPos   The current position in the Op Map.
executionContext   current execution context
formatterListener   the FormatterListener instance to receive the result
function   A pointer to the member function of FormatterListener to call

void XPath::Union ( XalanNode * context,
OpCodeMapPositionType opPos,
XPathExecutionContext & executionContext,
XalanDOMString & result ) const [protected]
 

Computes the union of its operands which must be node-sets.

Parameters:
context   The current source tree context node.
opPos   The current position in the Op Map.
executionContext   current execution context
Returns:
the result of the union of node-set operands.

void XPath::Union ( XalanNode * context,
OpCodeMapPositionType opPos,
XPathExecutionContext & executionContext,
double & result ) const [protected]
 

Computes the union of its operands which must be node-sets.

Parameters:
context   The current source tree context node.
opPos   The current position in the Op Map.
executionContext   current execution context
Returns:
the result of the union of node-set operands.

void XPath::Union ( XalanNode * context,
OpCodeMapPositionType opPos,
XPathExecutionContext & executionContext,
bool & result ) const [protected]
 

Computes the union of its operands which must be node-sets.

Parameters:
context   The current source tree context node.
opPos   The current position in the Op Map.
executionContext   current execution context
Returns:
the result of the union of node-set operands.

const XObjectPtr XPath::Union ( XalanNode * context,
OpCodeMapPositionType opPos,
XPathExecutionContext & executionContext ) const [protected]
 

Computes the union of its operands which must be node-sets.

Parameters:
context   The current source tree context node.
opPos   The current position in the Op Map.
executionContext   current execution context
Returns:
the union of node-set operands.

XPath * XPath::create ( MemoryManagerType & theManager,
const LocatorType * theLocator = 0 ) [static]
 

void XPath::destroyTable ( ) [static]
 

void XPath::div ( XalanNode * context,
OpCodeMapPositionType opPos,
XPathExecutionContext & executionContext,
FormatterListener & formatterListener,
MemberFunctionPtr function ) const [protected]
 

Divide a number.

Parameters:
context   The current source tree context node.
opPos   The current position in the Op Map.
executionContext   current execution context
formatterListener   the FormatterListener instance to receive the result
function   A pointer to the member function of FormatterListener to call

double XPath::div ( XalanNode * context,
OpCodeMapPositionType opPos,
XPathExecutionContext & executionContext ) const [protected]
 

Divide a number.

Parameters:
context   The current source tree context node.
opPos   The current position in the Op Map.
executionContext   current execution context
Returns:
arg1 / arg2.

void XPath::doGetMatchScore ( XalanNode * context,
XPathExecutionContext & executionContext,
eMatchScore & score ) const [protected]
 

Helper function to get match score.

Parameters:
context   The current source tree context node.
executionContext   The current execution context
score   The match score

bool XPath::equals ( XalanNode * context,
OpCodeMapPositionType opPos,
XPathExecutionContext & executionContext ) const [protected]
 

Tell if two expressions are functionally equal.

Parameters:
context   The current source tree context node.
opPos   The current position in the Op Map.
executionContext   current execution context
Returns:
true if the two arguments are equal.

XObjectPtr XPath::execute ( const PrefixResolver & prefixResolver,
XPathExecutionContext & executionContext,
MutableNodeRefList & result ) const
 

Execute the XPath from the provided context.

Normally, the expression will be evaluated and the result placed in the parameter result. However, some cases (such as the evalution of a variable) could result in the copying of a node-set, which is extremely expensive. In that case, the return value will contain the result of the evaluation. If the call to XObject::null() on the return value is true, that indicates the value was executed directly into the parameter. Otherwise, the parameter will be empty, and the result will be in the XObject instance returned.

The current node must already be set execution context, and must not be 0.

Parameters:
executionContext   current execution context
prefixResolver   prefix resolver to use
result   A node list for the result. This may or may not contain the actual result.
Returns:
the node-set result, if the result was not returned in the parameter

void XPath::execute ( const PrefixResolver & prefixResolver,
XPathExecutionContext & executionContext,
FormatterListener & formatterListener,
MemberFunctionPtr function ) const
 

Execute the XPath from the provided context.

Parameters:
prefixResolver   prefix resolver to use
executionContext   current execution context
formatterListener   the FormatterListener instance to receive the result
function   A pointer to the member function of FormatterListener to call

void XPath::execute ( const PrefixResolver & prefixResolver,
XPathExecutionContext & executionContext,
XalanDOMString & result ) const
 

Execute the XPath from the provided context.

The result is appended to the supplied string.

The current node must already be set execution context, and must not be 0.

Parameters:
executionContext   current execution context
prefixResolver   prefix resolver to use
result   the string result

void XPath::execute ( const PrefixResolver & prefixResolver,
XPathExecutionContext & executionContext,
double & result ) const
 

Execute the XPath from the provided context.

The current node must already be set execution context, and must not be 0.

Parameters:
executionContext   current execution context
prefixResolver   prefix resolver to use
result   the numeric result

void XPath::execute ( const PrefixResolver & prefixResolver,
XPathExecutionContext & executionContext,
bool & result ) const
 

Execute the XPath from the provided context.

The current node must already be set execution context, and must not be 0.

Parameters:
executionContext   current execution context
prefixResolver   prefix resolver to use
result   the boolean result

const XObjectPtr XPath::execute ( const PrefixResolver & prefixResolver,
XPathExecutionContext & executionContext ) const
 

Execute the XPath from the provided context.

The current node must already be set execution context, and must not be 0.

Parameters:
executionContext   current execution context
prefixResolver   prefix resolver to use
Returns:
smart-pointer to result XObject

const XObjectPtr XPath::execute ( XPathExecutionContext & executionContext,
MutableNodeRefList & result ) const
 

Execute the XPath from the provided context.

Normally, the expression will be evaluated and the result placed in the parameter result. However, some cases (such as the evalution of a variable) could result in the copying of a node-set, which is extremely expensive. In that case, the return value will contain the result of the evaluation. If the call to XObject::null() on the return value is true, that indicates the value was executed directly into the parameter. Otherwise, the parameter will be empty, and the result will be in the XObject instance returned.

The prefix resolver and current node must already be set execution context, and must not be 0.

Parameters:
executionContext   current execution context
result   A node list for the result. This may or may not contain the actual result.
Returns:
the node-set result, if the result was not returned in the parameter

void XPath::execute ( XPathExecutionContext & executionContext,
FormatterListener & formatterListener,
MemberFunctionPtr function ) const
 

Execute the XPath from the provided context.

The prefix resolver and current node must already be set execution context, and must not be 0.

Parameters:
executionContext   current execution context
formatterListener   the FormatterListener instance to receive the result
function   A pointer to the member function of FormatterListener to call

void XPath::execute ( XPathExecutionContext & executionContext,
XalanDOMString & result ) const
 

Execute the XPath from the provided context.

The result is appended to the supplied string.

The prefix resolver and current node must already be set execution context, and must not be 0.

Parameters:
executionContext   current execution context
result   the string result

void XPath::execute ( XPathExecutionContext & executionContext,
double & result ) const
 

Execute the XPath from the provided context.

The prefix resolver must already be set in the execution context.

Parameters:
executionContext   current execution context
result   the numeric result

void XPath::execute ( XPathExecutionContext & executionContext,
bool & result ) const
 

Execute the XPath from the provided context.

The prefix resolver and current node must already be set execution context, and must not be 0.

Parameters:
executionContext   current execution context
result   the boolean result

const XObjectPtr XPath::execute ( XPathExecutionContext & executionContext ) const
 

Execute the XPath from the provided context.

The prefix resolver and current node must already be set execution context, and must not be 0.

Parameters:
executionContext   current execution context
Returns:
smart-pointer to result XObject

const XObjectPtr XPath::execute ( XalanNode * context,
const PrefixResolver & prefixResolver,
const NodeRefListBase & contextNodeList,
XPathExecutionContext & executionContext,
MutableNodeRefList & result ) const
 

Execute the XPath from the provided context.

Normally, the expression will be evaluated and the result placed in the parameter result. However, some cases (such as the evalution of a variable) could result in the copying of a node-set, which is extremely expensive. In that case, the return value will contain the result of the evaluation. If the call to XObject::null() on the return value is true, that indicates the value was executed directly into the parameter. Otherwise, the parameter will be empty, and the result will be in the XObject instance returned.

Parameters:
context   current source tree context node, which must not be 0
prefixResolver   prefix resolver to use
contextNodeList   node list for current context
executionContext   current execution context
result   the result as a set of nodes
Returns:
the node-set result, if the result was not returned in the parameter

void XPath::execute ( XalanNode * context,
const PrefixResolver & prefixResolver,
const NodeRefListBase & contextNodeList,
XPathExecutionContext & executionContext,
FormatterListener & formatterListener,
MemberFunctionPtr function ) const
 

Execute the XPath from the provided context.

Parameters:
context   current source tree context node, which must not be 0
prefixResolver   prefix resolver to use
contextNodeList   node list for current context
executionContext   current execution context
formatterListener   the FormatterListener instance to receive the result
function   A pointer to the member function of FormatterListener to call

void XPath::execute ( XalanNode * context,
const PrefixResolver & prefixResolver,
const NodeRefListBase & contextNodeList,
XPathExecutionContext & executionContext,
XalanDOMString & result ) const
 

Execute the XPath from the provided context.

The result is appended to the supplied string.

Parameters:
context   current source tree context node, which must not be 0
prefixResolver   prefix resolver to use
contextNodeList   node list for current context
executionContext   current execution context
result   the string result

void XPath::execute ( XalanNode * context,
const PrefixResolver & prefixResolver,
const NodeRefListBase & contextNodeList,
XPathExecutionContext & executionContext,
double & result ) const
 

Execute the XPath from the provided context.

Parameters:
context   current source tree context node, which must not be 0
prefixResolver   prefix resolver to use
contextNodeList   node list for current context
executionContext   current execution context
result   the numeric result

void XPath::execute ( XalanNode * context,
const PrefixResolver & prefixResolver,
const NodeRefListBase & contextNodeList,
XPathExecutionContext & executionContext,
bool & result ) const
 

Execute the XPath from the provided context.

Parameters:
context   current source tree context node, which must not be 0
prefixResolver   prefix resolver to use
contextNodeList   node list for current context
executionContext   current execution context
result   the boolean result

const XObjectPtr XPath::execute (