Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


Macros | Typedefs | Functions
XPathCAPI.h File Reference

Go to the source code of this file.

Macros

#define XALAN_XPATHCAPI_EXPORT
 
#define XALAN_XPATHCAPI_EXPORT_FUNCTION(T)   T
 
#define XALAN_XPATH_API_SUCCESS   0
 This is a simple C interface for the class XPathEvaluator. More...
 
#define XALAN_XPATH_API_ERROR_ALREADY_INITIALIZED   1
 
#define XALAN_XPATH_API_ERROR_ALREADY_TERMINATED   2
 
#define XALAN_XPATH_API_ERROR_INITIALIZATION_FAILED   3
 
#define XALAN_XPATH_API_ERROR_TERMINATION_FAILED   4
 
#define XALAN_XPATH_API_ERROR_NOT_INITIALIZED   5
 
#define XALAN_XPATH_API_ERROR_CANNOT_REINITIALIZE   6
 
#define XALAN_XPATH_API_ERROR_INVALID_PARAMETER   7
 
#define XALAN_XPATH_API_ERROR_INVALID_EXPRESSION   8
 
#define XALAN_XPATH_API_ERROR_BAD_XML   9
 
#define XALAN_XPATH_API_ERROR_UNSUPPORTED_ENCODING   10
 
#define XALAN_XPATH_API_ERROR_TRANSCODING   11
 
#define XALAN_XPATH_API_ERROR_INVALID_XPATH   12
 
#define XALAN_XPATH_API_ERROR_UNKNOWN   13
 

Typedefs

typedef void * XalanXPathEvaluatorHandle
 Handle used to store the address of XalanTransformer instance. More...
 
typedef void * XalanXPathHandle
 Handle used to store the address of compiled XPath instance. More...
 

Functions

int XalanXPathAPIInitialize ()
 Initialize Xerces and the XPath API. More...
 
int XalanXPathAPITerminate ()
 Terminate Xerces and the XPath API. More...
 
int XalanCreateXPathEvaluator (XalanXPathEvaluatorHandle *theHandle)
 Create a XalanXPathEvaluator instance. More...
 
int XalanDestroyXPathEvaluator (XalanXPathEvaluatorHandle theXalanHandle)
 Destroy a XalanXPathEvaluator instance. More...
 
int XalanCreateXPath (XalanXPathEvaluatorHandle theXalanHandle, const char *theXPathExpression, const char *theXPathExpressionEncoding, XalanXPathHandle *theXPathHandle)
 Creates a compiled XPath instance. More...
 
int XalanDestroyXPath (XalanXPathEvaluatorHandle theXalanHandle, XalanXPathHandle theXPathHandle)
 Destroys a compiled XPath instance. More...
 
int XalanEvaluateXPathAsBoolean (XalanXPathEvaluatorHandle theXalanHandle, XalanXPathHandle theXPathHandle, const char *theXML, int *theResult)
 Evaluates a compiled XPath instance. More...
 
int XalanEvaluateXPathExpressionAsBoolean (XalanXPathEvaluatorHandle theXalanHandle, const char *theXPathExpression, const char *theXPathExpressionEncoding, const char *theXML, int *theResult)
 Evaluates an XPath expression. More...
 

Macro Definition Documentation

◆ XALAN_XPATH_API_ERROR_ALREADY_INITIALIZED

#define XALAN_XPATH_API_ERROR_ALREADY_INITIALIZED   1

Definition at line 58 of file XPathCAPI.h.

◆ XALAN_XPATH_API_ERROR_ALREADY_TERMINATED

#define XALAN_XPATH_API_ERROR_ALREADY_TERMINATED   2

Definition at line 59 of file XPathCAPI.h.

◆ XALAN_XPATH_API_ERROR_BAD_XML

#define XALAN_XPATH_API_ERROR_BAD_XML   9

Definition at line 66 of file XPathCAPI.h.

◆ XALAN_XPATH_API_ERROR_CANNOT_REINITIALIZE

#define XALAN_XPATH_API_ERROR_CANNOT_REINITIALIZE   6

Definition at line 63 of file XPathCAPI.h.

◆ XALAN_XPATH_API_ERROR_INITIALIZATION_FAILED

#define XALAN_XPATH_API_ERROR_INITIALIZATION_FAILED   3

Definition at line 60 of file XPathCAPI.h.

◆ XALAN_XPATH_API_ERROR_INVALID_EXPRESSION

#define XALAN_XPATH_API_ERROR_INVALID_EXPRESSION   8

Definition at line 65 of file XPathCAPI.h.

◆ XALAN_XPATH_API_ERROR_INVALID_PARAMETER

#define XALAN_XPATH_API_ERROR_INVALID_PARAMETER   7

Definition at line 64 of file XPathCAPI.h.

◆ XALAN_XPATH_API_ERROR_INVALID_XPATH

#define XALAN_XPATH_API_ERROR_INVALID_XPATH   12

Definition at line 69 of file XPathCAPI.h.

◆ XALAN_XPATH_API_ERROR_NOT_INITIALIZED

#define XALAN_XPATH_API_ERROR_NOT_INITIALIZED   5

Definition at line 62 of file XPathCAPI.h.

◆ XALAN_XPATH_API_ERROR_TERMINATION_FAILED

#define XALAN_XPATH_API_ERROR_TERMINATION_FAILED   4

Definition at line 61 of file XPathCAPI.h.

◆ XALAN_XPATH_API_ERROR_TRANSCODING

#define XALAN_XPATH_API_ERROR_TRANSCODING   11

Definition at line 68 of file XPathCAPI.h.

◆ XALAN_XPATH_API_ERROR_UNKNOWN

#define XALAN_XPATH_API_ERROR_UNKNOWN   13

Definition at line 70 of file XPathCAPI.h.

◆ XALAN_XPATH_API_ERROR_UNSUPPORTED_ENCODING

#define XALAN_XPATH_API_ERROR_UNSUPPORTED_ENCODING   10

Definition at line 67 of file XPathCAPI.h.

◆ XALAN_XPATH_API_SUCCESS

#define XALAN_XPATH_API_SUCCESS   0

This is a simple C interface for the class XPathEvaluator.

It's the user's responsibility to call XalanXPathAPIInitialize() before making any other API calls, and to call XalanXPathAPITerminate() when finished with the API.

Definition at line 57 of file XPathCAPI.h.

◆ XALAN_XPATHCAPI_EXPORT

#define XALAN_XPATHCAPI_EXPORT

Definition at line 39 of file XPathCAPI.h.

◆ XALAN_XPATHCAPI_EXPORT_FUNCTION

#define XALAN_XPATHCAPI_EXPORT_FUNCTION (   T)    T

Definition at line 40 of file XPathCAPI.h.

Typedef Documentation

◆ XalanXPathEvaluatorHandle

Handle used to store the address of XalanTransformer instance.

Definition at line 76 of file XPathCAPI.h.

◆ XalanXPathHandle

typedef void* XalanXPathHandle

Handle used to store the address of compiled XPath instance.

Definition at line 81 of file XPathCAPI.h.

Function Documentation

◆ XalanCreateXPath()

int XalanCreateXPath ( XalanXPathEvaluatorHandle  theXalanHandle,
const char *  theXPathExpression,
const char *  theXPathExpressionEncoding,
XalanXPathHandle theXPathHandle 
)

Creates a compiled XPath instance.

Parameters
theXalanHandleThe handle of XalanXPathEvaluatorHandle instance.
theXPathExpressionThe expression to compile
theXPathExpressionEncodingThe encoding of the expression. If NULL or an empty string, the local code page is assumed.
theXPathHandleA pointer to the handle for the new instance
Returns
0 for success, or a non-zero error code upon failure

◆ XalanCreateXPathEvaluator()

int XalanCreateXPathEvaluator ( XalanXPathEvaluatorHandle theHandle)

Create a XalanXPathEvaluator instance.

Parameters
theXalanHandleA pointer to the handle for the new instance.
Returns
0 for success, or a non-zero error code upon failure

◆ XalanDestroyXPath()

int XalanDestroyXPath ( XalanXPathEvaluatorHandle  theXalanHandle,
XalanXPathHandle  theXPathHandle 
)

Destroys a compiled XPath instance.

Parameters
theXalanHandleThe handle of XalanXPathEvaluatorHandle instance.
theXPathHandleThe handle of XPath instance
Returns
0 for success, or a non-zero error code upon failure

◆ XalanDestroyXPathEvaluator()

int XalanDestroyXPathEvaluator ( XalanXPathEvaluatorHandle  theXalanHandle)

Destroy a XalanXPathEvaluator instance.

Parameters
theXalanHandleThe handle of the instance to destroy.
Returns
0 for success, or a non-zero error code upon failure

◆ XalanEvaluateXPathAsBoolean()

int XalanEvaluateXPathAsBoolean ( XalanXPathEvaluatorHandle  theXalanHandle,
XalanXPathHandle  theXPathHandle,
const char *  theXML,
int *  theResult 
)

Evaluates a compiled XPath instance.

Parameters
theXalanHandleThe handle of XalanXPathEvaluatorHandle instance.
theXPathHandleThe pointer to handle for instance
theXMLThe XML document to use for evaluating the XPath expression
theResultA pointer to an int to receive the result.
Returns
0 for success, or a non-zero error code upon failure

◆ XalanEvaluateXPathExpressionAsBoolean()

int XalanEvaluateXPathExpressionAsBoolean ( XalanXPathEvaluatorHandle  theXalanHandle,
const char *  theXPathExpression,
const char *  theXPathExpressionEncoding,
const char *  theXML,
int *  theResult 
)

Evaluates an XPath expression.

Parameters
theXalanHandleThe handle of XalanXPathEvaluatorHandle instance.
theXPathExpressionThe expression to evaluate
theXPathExpressionEncodingThe encoding of the expression. If NULL or an empty string, the local code page is assumed.
theXMLThe XML document to use for evaluating the XPath expression
theResultA pointer to an int to receive the result.
Returns
0 for success, or a non-zero error code upon failure

◆ XalanXPathAPIInitialize()

int XalanXPathAPIInitialize ( )

Initialize Xerces and the XPath API.

Should be called only once per process before making any other API calls.

Returns
0 for success, or a non-zero error code upon failure

◆ XalanXPathAPITerminate()

int XalanXPathAPITerminate ( )

Terminate Xerces and the XPath API.

Should be called only once per process after deleting all instances of XalanXPathEvaluator. Once a process has called this function, it cannot use the API for the remaining lifetime of the process.

Returns
0 for success, or a non-zero error code upon failure

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.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.

Apache Logo