Xalan-C++ API Documentation

The Xalan C++ XSL Transformer Version 1.1

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


Member Typedef Documentation

typedef XPathFunctionTable XPath::FunctionTableType
 

typedef std::vector<XalanDOMString> XPath::TargetElementStringsVectorType
 


Member Enumeration Documentation

enum XPath::eMatchScore
 

Enumeration values:
eMatchScoreNone  
eMatchScoreNodeTest  
eMatchScoreNSWild  
eMatchScoreQName  
eMatchScoreOther  


Constructor & Destructor Documentation

XPath::XPath ( const Locator * theLocator = 0 ) [explicit]
 

Construct an XPath.

Parameters:
theLocator   The applicable Locator, if any.

virtual XPath::~XPath ( ) [virtual]
 


Member Function Documentation

const XObjectPtr XPath::And ( XalanNode * context,
int 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 m_opMap array.
Returns:
XBoolean set to true if the two arguments are both true.

const XObjectPtr XPath::Or ( XalanNode * context,
int 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 m_opMap array.
Returns:
XBoolean set to true if the one of the two arguments are true.

const XObjectPtr XPath::Union ( XalanNode * context,
int 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 m_opMap array.
Returns:
the union of node-set operands.

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

Execute a function argument.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
the result of the argument expression.

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

Cast an expression to a boolean.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
arg cast to a boolean.

XLocator * XPath::createXLocatorHandler ( ) const [protected]
 

createXLocatorHandler.

void XPath::destroyTable ( ) [static]
 

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

Divide a number.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
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

const XObjectPtr XPath::equals ( XalanNode * context,
int 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 m_opMap array.
Returns:
XBoolean set to true if the two arguments are equal.

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

Execute the XPath from the provided context.

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

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

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

Execute the XPath from the provided context.

Parameters:
context   current source tree context node
prefixResolver   prefix resolver to use
contextNodeList   node list for current context
executionContext   current execution context
Returns:
pointer to union of node-set operands

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

Execute the XPath from the provided context.

Parameters:
context   current source tree context node
prefixResolver   prefix resolver to use
executionContext   current execution context
Returns:
pointer to union of node-set operands

const XObjectPtr XPath::executeMore ( XalanNode * context,
int opPos,
XPathExecutionContext & executionContext ) const
 

Execute the XPath from the provided context.

Parameters:
context   current source tree context node
opPos   current position in the m_opMap array
executionContext   current execution context
Returns:
pointer to union of node-set operands

const XObjectPtr XPath::extfunction ( XalanNode * context,
int,
const XalanDOMString & theNamespace,
const XalanDOMString & functionName,
const Function::XObjectArgVectorType & argVec,
XPathExecutionContext & executionContext ) const [protected]
 

Handle an extension function.

const XObjectPtr XPath::function ( XalanNode * context,
int opPos,
int funcID,
const Function::XObjectArgVectorType & argVec,
XPathExecutionContext & executionContext ) const [protected]
 

Handle a built-in function.

const XPathExpression & XPath::getExpression ( ) const []
 

Retrieve a reference to the current expression.

Returns:
current expression

XPathExpression & XPath::getExpression ( ) []
 

Retrieve a reference to the current expression.

Returns:
current expression

const FunctionTableType & XPath::getFunctionTable ( ) [static]
 

Retrieve the table of installed functions.

Returns:
function table

bool XPath::getInStylesheet ( ) const []
 

template<classOutputIteratorType>
void XPath::getInstalledFunctionNames ( OutputIteratorType theIterator ) [static]
 

Add the names for the installed functions to a vector strings.

Parameters:
theIterator   vector added to

const Locator * XPath::getLocator ( ) const []
 

eMatchScore XPath::getMatchScore ( XalanNode * node,
const PrefixResolver & resolver,
XPathExecutionContext & executionContext ) const
 

Get the match score for the specified node.

Parameters:
node   The node for the score
resolver   The prefix resolver
executionContext   current execution context
Returns:
union of node-set operands

double XPath::getMatchScoreValue ( eMatchScore score ) [static]
 

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

void XPath::getTargetElementStrings ( TargetElementStringsVectorType & targetStrings ) const
 

Add the strings for the target element to a vector of strings.

Parameters:
targetStrings   vector of strings

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

Execute an expression as a group.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
arg.

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

Tell if one argument is greater than the other argument.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
XBoolean set to true if arg 1 is greater than arg 2.

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

Tell if one argument is greater than or equal to the other argument.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
XBoolean set to true if arg 1 is greater than or equal to arg 2.

void XPath::initialize ( ) [static]
 

Perform static initialization.

See class XPathInit.

void XPath::installFunction ( const XalanDOMString & funcName,
const Function & func ) [static]
 

Install a built-in function.

Parameters:
funcName   unqualified name of the function
func   instance of an XPath function object

bool XPath::isInstalledFunction ( const XalanDOMString & theFunctionName ) [static]
 

Whether the named function is installed in the function table.

Parameters:
name   of function
Returns:
true if the function has been installed

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

Get a literal value.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
an XObject object.

const XObjectPtr XPath::locationPath ( XalanNode * context,
int opPos,
XPathExecutionContext & executionContext ) const
 

Execute a location path.

Parameters:
context   current source tree context node
opPos   current position in the m_opMap array
executionContext   current execution context
Returns:
node-set

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

Execute a location path.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
score in an XNumber, one of MATCH_SCORE_NODETEST, MATCH_SCORE_NONE, MATCH_SCORE_OTHER, MATCH_SCORE_QNAME.

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

Tell if one argument is less than the other argument.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
XBoolean set to true if arg 1 is less than arg 2.

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

Tell if one argument is less than or equal to the other argument.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
XBoolean set to true if arg 1 is less than or equal to arg 2.

const XObjectPtr XPath::matchPattern ( XalanNode * context,
int 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 m_opMap array.
Returns:
the match score in the form of an XObject.

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

Give the difference of two arguments.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
difference of arg1 and arg2.

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

Return the remainder from a truncating division.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
arg1 mod arg2.

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

Multiply two arguments.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
arg1 * arg2.

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

Return the negation of a number.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
-arg.

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

Tell if two expressions are functionally not equal.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
XBoolean set to true if the two arguments are not equal.

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

Get a literal value.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
an XObject object.

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

Give the sum of two arguments.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
sum of arg1 and arg2.

const XObjectPtr XPath::predicate ( XalanNode * context,
int opPos,
XPathExecutionContext & executionContext ) const []
 

Evaluate a predicate.

Parameters:
context   current source tree context node
opPos   current position in the m_opMap array
executionContext   current execution context
Returns:
pointer to either a boolean or a number

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

Setup for and run an extension function.

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

Setup for and run a function.

void XPath::setInStylesheet ( bool fValue ) []
 

void XPath::setLocator ( const Locator * theLocator ) []
 

void XPath::shrink ( )
 

Shrink internal tables.

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

Cast an expression to a string.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
arg cast to a string.

void XPath::terminate ( ) [static]
 

Perform static shut down.

See class XPathInit.

bool XPath::uninstallFunction ( const XalanDOMString & funcName ) [static]
 

Remove a named function from the function table.

Parameters:
funcName   name of function
Returns:
true if the function was found and removed.

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

Get the value of a variable.

Parameters:
context   The current source tree context node.
opPos   The current position in the m_opMap array.
Returns:
an XObject object.


Member Data Documentation

const XalanDOMString & XPath::PSEUDONAME_ANY [static]
 

const XalanDOMString & XPath::PSEUDONAME_COMMENT [static]
 

const XalanDOMString & XPath::PSEUDONAME_NODE [static]
 

const XalanDOMString & XPath::PSEUDONAME_OTHER [static]
 

const XalanDOMString & XPath::PSEUDONAME_PI [static]
 

const XalanDOMString & XPath::PSEUDONAME_ROOT [static]
 

const XalanDOMString & XPath::PSEUDONAME_TEXT [static]
 


The documentation for this class was generated from the following file:

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSL Transformer Version 1.1
Copyright © 2000, 2001 The Apache Software Foundation. All Rights Reserved.