Xalan-C++ API Documentation
Xalan-C++ API Documentation
The Xalan C++ XSLT Processor Version 1.4
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Compound Members File Members
XPath Class Reference
#include <XPath.hpp>
Collaboration diagram for XPath:
List of all members.
Public Types
Public Methods
- explicit XPath (const Locator* theLocator = 0)
- Construct an XPath. More...
- virtual ~XPath ()
- void shrink ()
- Shrink internal tables.
- const XObjectPtr execute ( XalanNode* context, const PrefixResolver& prefixResolver, XPathExecutionContext& executionContext) const
- Execute the XPath from the provided context. More...
- const XObjectPtr execute ( XalanNode* context, const PrefixResolver& prefixResolver, const NodeRefListBase& contextNodeList, XPathExecutionContext& executionContext) const
- Execute the XPath from the provided context. More...
- const XObjectPtr execute (XPathExecutionContext& executionContext) const
- Execute the XPath from the provided context. More...
- const XObjectPtr executeMore ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Execute the XPath from the provided context. More...
- const XObjectPtr locationPath ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Execute a location path. More...
- XPathExpression& getExpression ()
- Retrieve a reference to the current expression. More...
- const XPathExpression& getExpression () const
- Retrieve a reference to the current expression. More...
- eMatchScore getMatchScore ( XalanNode* node, XPathExecutionContext& executionContext) const
- Get the match score for the specified node. More...
- eMatchScore getMatchScore ( XalanNode* node, const PrefixResolver& resolver, XPathExecutionContext& executionContext) const
- Get the match score for the specified node. More...
- const XObjectPtr predicate ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Evaluate a predicate. More...
- void getTargetData (TargetDataVectorType& targetData) const
- Add the data for the target of match pattern to a vector. More...
- bool getInStylesheet () const
- void setInStylesheet (bool fValue)
- const Locator* getLocator () const
- void setLocator (const Locator* theLocator)
Static Public Methods
Static Public Attributes
Protected Methods
- XLocator* createXLocatorHandler () const
- createXLocatorHandler.
- const XObjectPtr matchPattern ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Computes the union of its operands which must be node-sets. More...
- void doGetMatchScore ( XalanNode* context, XPathExecutionContext& executionContext, eMatchScore& score) const
- Helper function to get match score. More...
- const XObjectPtr Or ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- OR two expressions and return the boolean result. More...
- const XObjectPtr And ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- OR two expressions and return the boolean result. More...
- const XObjectPtr notequals ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Tell if two expressions are functionally not equal. More...
- const XObjectPtr equals ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Tell if two expressions are functionally equal. More...
- const XObjectPtr lte ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Tell if one argument is less than or equal to the other argument. More...
- const XObjectPtr lt ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Tell if one argument is less than the other argument. More...
- const XObjectPtr gte ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Tell if one argument is greater than or equal to the other argument. More...
- const XObjectPtr gt ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Tell if one argument is greater than the other argument. More...
- const XObjectPtr plus ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Give the sum of two arguments. More...
- const XObjectPtr minus ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Give the difference of two arguments. More...
- const XObjectPtr mult ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Multiply two arguments. More...
- const XObjectPtr div ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Divide a number. More...
- const XObjectPtr mod ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Return the remainder from a truncating division. More...
- const XObjectPtr neg ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Return the negation of a number. More...
- const XObjectPtr string ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Cast an expression to a string. More...
- const XObjectPtr boolean ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Cast an expression to a boolean. More...
- const XObjectPtr Union ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Computes the union of its operands which must be node-sets. More...
- const XObjectPtr literal ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Get a literal value. More...
- const XObjectPtr variable ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Get the value of a variable. More...
- const XObjectPtr group ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Execute an expression as a group. More...
- const XObjectPtr numberlit ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Get a literal value. More...
- const XObjectPtr arg ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Execute a function argument. More...
- const XObjectPtr locationPathPattern ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Execute a location path. More...
- const XObjectPtr runExtFunction ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Setup for and run an extension function.
- const XObjectPtr extfunction ( XalanNode* context, int , const XalanDOMString& theNamespace, const XalanDOMString& functionName, const Function::XObjectArgVectorType& argVec, XPathExecutionContext& executionContext) const
- Handle an extension function.
- const XObjectPtr runFunction ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- Setup for and run a function.
- const XObjectPtr function ( XalanNode* context, int funcID, const Function::XObjectArgVectorType& argVec, XPathExecutionContext& executionContext) const
- Handle a built-in function.
- double getNumericOperand ( XalanNode* context, int opPos, XPathExecutionContext& executionContext) const
- void step ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, MutableNodeRefList& queryResults) const
- XalanNode* stepPattern ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, eMatchScore& scoreHolder) const
- Execute a step in a location path. More...
- int findNodeSet ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, int stepType, MutableNodeRefList& subQueryResults) const
- int findRoot ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, int stepType, MutableNodeRefList& subQueryResults) const
- int findParent ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, int stepType, MutableNodeRefList& subQueryResults) const
- int findSelf ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, int stepType, MutableNodeRefList& subQueryResults) const
- int findAncestors ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, int stepType, MutableNodeRefList& subQueryResults) const
- int findAncestorsOrSelf ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, int stepType, MutableNodeRefList& subQueryResults) const
- int findAttributes ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, int stepType, MutableNodeRefList& subQueryResults) const
- int findChildren ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, int stepType, MutableNodeRefList& subQueryResults) const
- int findDescendants ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, int stepType, MutableNodeRefList& subQueryResults) const
- int findFollowing ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, int stepType, MutableNodeRefList& subQueryResults) const
- int findFollowingSiblings ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, int stepType, MutableNodeRefList& subQueryResults) const
- int findPreceeding ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, int stepType, MutableNodeRefList& subQueryResults) const
- int findPreceedingSiblings ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, int stepType, MutableNodeRefList& subQueryResults) const
- int findNamespace ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, int stepType, MutableNodeRefList& subQueryResults) const
- int findNodesOnUnknownAxis ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, int stepType, MutableNodeRefList& subQueryResults) const
- eMatchScore nodeTest ( XPathExecutionContext& executionContext, XalanNode* context, XalanNode::NodeType nodeType, int opPos, int argLen, int stepType) const
- void predicates ( XPathExecutionContext& executionContext, XalanNode* context, int opPos, MutableNodeRefList& subQueryResults, int& endPredicatesPos) const
- eMatchScore handleFoundIndex ( XPathExecutionContext& executionContext, XalanNode* localContext, int startOpPos) const
- eMatchScore handleFoundIndexPositional ( XPathExecutionContext& executionContext, XalanNode* localContext, int startOpPos) const
Protected Attributes
Static Protected Attributes
Detailed Description
Member Typedef Documentation
typedef std::vector<TargetData> XPath::TargetDataVectorType |
|
Member Enumeration Documentation
Constructor & Destructor Documentation
explicit XPath::XPath (
|
const Locator * theLocator = 0) |
|
Construct an XPath.
-
Parameters:
-
theLocator
|
The applicable Locator, if any.
|
virtual XPath::~XPath () [virtual] |
|
Member Function Documentation
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.
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.
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.
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.
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] |
|
void XPath::destroyTable () [static] |
|
Divide a number.
-
Parameters:
-
context
|
The current source tree context node.
|
opPos
|
The current position in the m_opMap array.
|
-
Returns:
-
arg1 / arg2.
Helper function to get match score.
-
Parameters:
-
context
|
The current source tree context node.
|
executionContext
|
The current execution context
|
score
|
The match score
|
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.
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
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
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
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
Handle an extension function.
Handle a built-in function.
Retrieve a reference to the current expression.
-
Returns:
-
current expression
Retrieve a reference to the current expression.
-
Returns:
-
current expression
Retrieve the table of installed functions.
-
Returns:
-
function table
bool XPath::getInStylesheet () const |
|
template<class OutputIteratorType>
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 |
|
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
Get the match score for the specified node.
-
Parameters:
-
node
|
The node for the score
|
executionContext
|
current execution context
|
-
Returns:
-
union of node-set operands
double XPath::getMatchScoreValue (
|
eMatchScore score) [static] |
|
Add the data for the target of match pattern to a vector.
-
Parameters:
-
targetData
|
The vector for the data
|
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.
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.
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.
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:
-
-
Returns:
-
true if the function has been installed
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.
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
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.
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.
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.
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.
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.
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.
Multiply two arguments.
-
Parameters:
-
context
|
The current source tree context node.
|
opPos
|
The current position in the m_opMap array.
|
-
Returns:
-
arg1 * arg2.
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.
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.
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.
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.
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
Setup for and run an extension function.
Setup for and run a function.
void XPath::setInStylesheet (
|
bool fValue) |
|
void XPath::setLocator (
|
const Locator * theLocator) |
|
Execute a step in a location path.
-
Parameters:
-
xpath
|
The xpath that is executing
|
context
|
The current source tree context node
|
opPos
|
The current position in the xpath operation map array
|
scoreHolder
|
a reference to an eMatchScore to receive
the result.
|
-
Returns:
-
the last matched context node
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.
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
Holds information about the current expression.
bool XPath::m_inStylesheet [protected] |
|
If true, the XPath can allocated XObjects in more efficient ways, since its lifetime is guaranteed to be at least that of the transform.
const Locator * XPath::m_locator [protected] |
|
This is the table of installed functions.
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++ XSLT Processor Version 1.4
Copyright © 2000, 2001, 2002 The Apache Software Foundation. All Rights Reserved.
|
|