SaxonC 12.7.0
Saxon Processor library for C/C++, PHP and Python
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | Friends | List of all members
SaxonProcessor Class Reference

The SaxonProcessor class acts as a factory for generating XQuery, XPath, Schema and XSLT compilers. More...

#include <SaxonProcessor.h>

Public Member Functions

 SaxonProcessor ()
 Default constructor.
 
 SaxonProcessor (const char *configFile)
 Constructor based upon a Saxon configuration file.
 
 SaxonProcessor (bool l)
 Constructor.
 
SaxonProcessoroperator= (const SaxonProcessor &other)
 The copy assignment= operator.
 
 SaxonProcessor (const SaxonProcessor &other)
 SaxonProcessor copy constructor.
 
 ~SaxonProcessor ()
 Destructor method: at the end of the program call the release() method to clear the JVM.
 
const char * getErrorMessage ()
 Deprecated.
 
DocumentBuildernewDocumentBuilder ()
 Create a DocumentBuilder.
 
Xslt30ProcessornewXslt30Processor ()
 Create an Xslt30Processor.
 
XQueryProcessornewXQueryProcessor ()
 Create an XQueryProcessor.
 
XPathProcessornewXPathProcessor ()
 Create an XPathProcessor.
 
SchemaValidatornewSchemaValidator ()
 Create a SchemaValidator.
 
void setExtensionLibrary (const char *libraryName)
 
XdmAtomicValuemakeStringValue (std::string str, const char *encoding=nullptr)
 Factory method to create an xs:string atomic value as a new XdmAtomicValue.
 
XdmAtomicValuemakeStringValue (const char *str, const char *encoding=nullptr)
 Factory method to create an xs:string atomic value as a new XdmAtomicValue.
 
XdmAtomicValuemakeIntegerValue (int i)
 Factory method to create an xs:integer atomic value as a new XdmAtomicValue.
 
XdmAtomicValuemakeDoubleValue (double d)
 Factory method to create an xs:double atomic value as a new XdmAtomicValue.
 
XdmAtomicValuemakeFloatValue (float f)
 Factory method to create an xs:float atomic value as a new XdmAtomicValue.
 
XdmAtomicValuemakeLongValue (long l)
 Factory method to create an xs:long atomic value as a new XdmAtomicValue.
 
XdmAtomicValuemakeBooleanValue (bool b)
 Factory method to create an xs:boolean atomic value as a new XdmAtomicValue.
 
XdmAtomicValuemakeQNameValue (const char *str)
 Create an xs:QName atomic value, from the string representation in clark notation.
 
XdmAtomicValuemakeAtomicValue (const char *type, const char *value)
 Create an XDM atomic value from its lexical representation and the name of the required built-in atomic type.
 
XdmArraymakeArray (char **input, int length)
 Make an XdmArray whose members are xs:string values.
 
XdmArraymakeArray (short *input, int length)
 Make an XdmArray whose members are xs:short values.
 
XdmArraymakeArray (int *input, int length)
 Make an XdmArray whose members are xs:integer values.
 
XdmArraymakeArray (long long *input, int length)
 Make an XdmArray whose members are xs:long values.
 
XdmArraymakeArray (bool *input, int length)
 Make an XdmArray whose members are xs:boolean values.
 
XdmArraymakeArray (XdmValue **values, int length)
 Make an XdmArray by supplying an array of XdmValue pointers.
 
XdmMapmakeMap (std::map< XdmAtomicValue *, XdmValue * > dataMap)
 Make an XdmMap by supplying a map from the standard template library, with keys in XDM form.
 
XdmMapmakeMap3 (XdmAtomicValue **keys, XdmValue **values, int len)
 Make an XdmMap from arrays of keys and values in XDM form.
 
const char * clarkNameToEQName (const char *name)
 Convert a string representing a QName value in clark notation to a string representing the QName in EQName notation.
 
const char * EQNameToClarkName (const char *name)
 Convert a string representing a QName value in EQName notation to a string representing the QName in clark notation.
 
const char * getStringValue (XdmItem *item)
 Get the string representation of an XdmItem.
 
XdmNodeparseXmlFromString (const char *source, const char *encoding=nullptr, SchemaValidator *validator=nullptr)
 Parse a lexical representation of a source XML document and return it as an XdmNode.
 
XdmNodeparseXmlFromFile (const char *source, SchemaValidator *validator=nullptr)
 Parse a source document file and return it as an XdmNode.
 
XdmNodeparseXmlFromUri (const char *source, SchemaValidator *validator=nullptr)
 Parse a source document available by URI and return it as an XdmNode.
 
XdmValueparseJsonFromString (const char *source, const char *encoding=NULL)
 Parse a lexical representation of a source JSON document and return it as an XdmValue.
 
XdmValueparseJsonFromFile (const char *source)
 Parse a source JSON file and return it as an XdmValue.
 
int getNodeKind (int64_t obj)
 Get the kind of node - internal use only.
 
bool isSchemaAwareProcessor ()
 Test whether this processor is schema-aware.
 
bool exceptionOccurred ()
 Deprecated.
 
void exceptionClear ()
 Deprecated.
 
XdmValue ** createXdmValueArray (int len)
 Utility method for working with SaxonC on Python - internal use only.
 
void deleteXdmValueArray (XdmValue **arr, int len)
 Utility method for Python API - internal use only.
 
XdmAtomicValue ** createXdmAtomicValueArray (int len)
 Utility method for working with SaxonC on Python - internal use only.
 
void deleteXdmAtomicValueArray (XdmAtomicValue **arr, int len)
 Utility method for Python API - internal use only.
 
void setcwd (const char *cwd)
 Set the current working directory.
 
const char * getcwd ()
 Get the current working directory.
 
const char * getResourcesDirectory ()
 Get the saxon resources directory.
 
void setResourcesDirectory (const char *dir)
 Set the saxon resources directory.
 
void setCatalog (const char *catalogFile)
 Deprecated.
 
void setCatalogFiles (const char **catalogFiles, int length)
 Set catalog files to be used in Saxon.
 
void setConfigurationProperty (const char *name, const char *value)
 Set a configuration property specific to the processor in use.
 
void clearConfigurationProperties ()
 Clear configuration properties specific to the processor in use.
 
bool isLicensed ()
 Test whether a license key has been found and accepted.
 
const char * getSaxonEdition ()
 Get the short name of the licensed Saxon product edition, for example "EE".
 
const char * version ()
 Get the Saxon version.
 
void createHeapDump (bool live)
 Internal method for diagnostics.
 

Static Public Member Functions

static void * makeInternalArray (void **inputs, int length)
 
static XdmMapmakeMap2 (std::map< std::string, XdmValue * > dataMap)
 Make an XdmMap by supplying a map from the standard template library, with keys in primitive form.
 
static SaxonApiExceptioncheckForExceptionCPP ()
 Deprecated.
 
static const char * encodeString (const char *stringValue, const char *toCharSetName)
 
static void release ()
 Clean up and destroy Java VM to release memory used; method to be called at the end of the program.
 
static void attachCurrentThread ()
 Attaches a current thread to the Java VM.
 
static void detachCurrentThread ()
 Detach JVM from the current thread.
 
static void deleteString (const char *data)
 Utility method required for the python and PHP extensions to delete a string created in the C++ code-base.
 

Public Attributes

std::string cwd
 

Static Public Attributes

static int jvmCreatedCPP = 0
 
static sxnc_environmentsxn_environ = 0
 

Protected Attributes

std::string cwdV
 
std::string versionStr
 
std::map< std::string, XdmValue * > parameters
 
bool licensei
 
int64_t procRef
 
SaxonApiExceptionexception
 

Friends

class DocumentBuilder
 
class Xslt30Processor
 
class XsltExecutable
 
class XQueryProcessor
 
class SchemaValidator
 
class XPathProcessor
 
class XdmValue
 
class XdmItem
 
class XdmAtomicValue
 
class XdmFunctionItem
 
class XdmNode
 
class XdmMap
 
class XdmArray
 

Detailed Description

The SaxonProcessor class acts as a factory for generating XQuery, XPath, Schema and XSLT compilers.

The SaxonProcessor class not only generates XQuery, XPath, Schema and XSLT Processors, but is also used to create XDM values from primitive types.

Constructor & Destructor Documentation

◆ SaxonProcessor() [1/4]

SaxonProcessor::SaxonProcessor ( )

Default constructor.

Creates a Saxon processor.

Exceptions
SaxonApiException

◆ SaxonProcessor() [2/4]

SaxonProcessor::SaxonProcessor ( const char * configFile)

Constructor based upon a Saxon configuration file.

Creates a Saxon processor.

Exceptions
SaxonApiException

◆ SaxonProcessor() [3/4]

SaxonProcessor::SaxonProcessor ( bool l)

Constructor.

Creates a Saxon processor.

Parameters
l- flag that a license is to be used. Default is false.
Exceptions
SaxonApiException

◆ SaxonProcessor() [4/4]

SaxonProcessor::SaxonProcessor ( const SaxonProcessor & other)

SaxonProcessor copy constructor.

Parameters
other- SaxonProcessor

Member Function Documentation

◆ checkForExceptionCPP()

SaxonApiException * SaxonProcessor::checkForExceptionCPP ( )
static

Deprecated.

Checks for pending exceptions and creates a SaxonApiException object.

Deprecated
From 12.1 this method is no longer used, since exceptions are now thrown.

◆ clarkNameToEQName()

const char * SaxonProcessor::clarkNameToEQName ( const char * name)

Convert a string representing a QName value in clark notation to a string representing the QName in EQName notation.

Returns the expanded name, as a string using the notation defined by the EQName production in XPath 3.0. If the name is in a namespace, the resulting string takes the form Q{uri}local. Otherwise, the value is the local part of the name.

Parameters
name- the QName in Clark notation: {uri}local if the name is in a namespace, or simply local if not.
Returns
The expanded name, as a string in EQName notation. The caller is responsible for memory deallocation using operator delete.

◆ deleteString()

static void SaxonProcessor::deleteString ( const char * data)
inlinestatic

Utility method required for the python and PHP extensions to delete a string created in the C++ code-base.

Parameters
data- the string data to be deleted using the operator delete

◆ deleteXdmAtomicValueArray()

void SaxonProcessor::deleteXdmAtomicValueArray ( XdmAtomicValue ** arr,
int len )

Utility method for Python API - internal use only.

This method deletes a XdmAtomicValue pointer array.

Parameters
arr- XdmAtomicValue pointer array
len- length of the array

◆ deleteXdmValueArray()

void SaxonProcessor::deleteXdmValueArray ( XdmValue ** arr,
int len )

Utility method for Python API - internal use only.

This method deletes a XdmValue pointer array.

Parameters
arr- XdmValue pointer array
len- length of the array

◆ EQNameToClarkName()

const char * SaxonProcessor::EQNameToClarkName ( const char * name)

Convert a string representing a QName value in EQName notation to a string representing the QName in clark notation.

Parameters
name- the QName in EQName notation: Q{uri}local if the name is in a namespace. For a name in no namespace, either of the forms Q{}local or simply local are accepted.
Returns
The QName in clark notation. The caller is responsible for deallocation of memory using operator delete.

◆ exceptionClear()

void SaxonProcessor::exceptionClear ( )

Deprecated.

Clears any exception that is currently being thrown. If no exception is currently being thrown, this routine has no effect.

Deprecated
From 12.1 this method is no longer used, since exceptions are now thrown.

◆ exceptionOccurred()

bool SaxonProcessor::exceptionOccurred ( )

Deprecated.

Checks for thrown exceptions.

Deprecated
From 12.1 this method is no longer used, since exceptions are now thrown.
Returns
True when there is a pending exception; false otherwise

◆ getcwd()

const char * SaxonProcessor::getcwd ( )

Get the current working directory.

Returns
Current working directory

◆ getErrorMessage()

const char * SaxonProcessor::getErrorMessage ( )

Deprecated.

Get any error message thrown by the processor.

Returns
String value of the error message. JNI exceptions thrown by this processor are handled internally and can be retrieved by this method.
Deprecated
From 12.1 this method is no longer used, since exceptions are now thrown.

◆ getNodeKind()

int SaxonProcessor::getNodeKind ( int64_t obj)

Get the kind of node - internal use only.

Parameters
obj- the Java object representation of the XdmNode
Returns
The kind of node, for example ELEMENT or ATTRIBUTE as an integer

◆ getResourcesDirectory()

const char * SaxonProcessor::getResourcesDirectory ( )

Get the saxon resources directory.

Returns
String value of the resources directory. The caller is responsible for deallocation of memory using delete.

◆ getSaxonEdition()

const char * SaxonProcessor::getSaxonEdition ( )

Get the short name of the licensed Saxon product edition, for example "EE".

This represents the kind of configuration that has been created, rather than the software that has been installed; which depends on the license key supplied, as well as the software edition installed. For example it is possible to instantiate an "HE" configuration even when using the "PE" or "EE" software.

Returns
The Saxon edition code: "ee", "pe", or "he". Memory deallocation is handled internally.

◆ getStringValue()

const char * SaxonProcessor::getStringValue ( XdmItem * item)

Get the string representation of an XdmItem.

Parameters
item- the XdmItem
Returns
String value as char pointer array. The caller is responsible for deallocation of memory using operator delete.

◆ isLicensed()

bool SaxonProcessor::isLicensed ( )

Test whether a license key has been found and accepted.

Returns
True if this processor is licensed, false otherwise

◆ isSchemaAwareProcessor()

bool SaxonProcessor::isSchemaAwareProcessor ( )

Test whether this processor is schema-aware.

Returns
True if this processor is licensed for schema processing, false otherwise

◆ makeArray() [1/6]

XdmArray * SaxonProcessor::makeArray ( bool * input,
int length )

Make an XdmArray whose members are xs:boolean values.

Parameters
input- the input array of boolean values
length- the number of items in the array
Returns
Pointer to an XdmArray whose members are xs:boolean values corresponding one-to-one with the input. The caller is responsible for deallocation of memory using delete.

◆ makeArray() [2/6]

XdmArray * SaxonProcessor::makeArray ( char ** input,
int length )

Make an XdmArray whose members are xs:string values.

Parameters
input- the input array of strings
length- the number of items in the array
Returns
Pointer to an XdmArray whose members are xs:string values corresponding one-to-one with the input. The caller is responsible for deallocation of memory using delete.

◆ makeArray() [3/6]

XdmArray * SaxonProcessor::makeArray ( int * input,
int length )

Make an XdmArray whose members are xs:integer values.

Parameters
input- the input array of int values
length- the number of items in the array
Returns
Pointer to an XdmArray whose members are xs:integer values corresponding one-to-one with the input. The caller is responsible for deallocation of memory using delete.

◆ makeArray() [4/6]

XdmArray * SaxonProcessor::makeArray ( long long * input,
int length )

Make an XdmArray whose members are xs:long values.

Parameters
input- the input array of long values
length- the number of items in the array
Returns
Pointer to an XdmArray whose members are xs:boolean values corresponding one-to-one with the input. The caller is responsible for deallocation of memory using delete.

◆ makeArray() [5/6]

XdmArray * SaxonProcessor::makeArray ( short * input,
int length )

Make an XdmArray whose members are xs:short values.

Parameters
input- the input array of short values
length- the number of items in the array
Returns
Pointer to an XdmArray whose members are xs:short values corresponding one-to-one with the input. The caller is responsible for deallocation of memory using delete.

◆ makeArray() [6/6]

XdmArray * SaxonProcessor::makeArray ( XdmValue ** values,
int length )

Make an XdmArray by supplying an array of XdmValue pointers.

Parameters
values- the input array of XdmValue pointers
length- the number of items in the array
Returns
Pointer to an XdmArray whose members are XdmValue values corresponding one-to-one with the input. The caller is responsible for deallocation of memory using delete.

◆ makeAtomicValue()

XdmAtomicValue * SaxonProcessor::makeAtomicValue ( const char * type,
const char * value )

Create an XDM atomic value from its lexical representation and the name of the required built-in atomic type.

Parameters
type- the local name of a type in the XML Schema namespace.
value- the atomic value given in a string form. In the case of a QName the value supplied must be in clark notation: {uri}local
Returns
Pointer to a new XdmAtomicValue. The caller is responsible for deallocation of memory using delete.

◆ makeBooleanValue()

XdmAtomicValue * SaxonProcessor::makeBooleanValue ( bool b)

Factory method to create an xs:boolean atomic value as a new XdmAtomicValue.

Parameters
b- the xs:boolean value as a boolean, true or false
Returns
Pointer to a new XdmAtomicValue. The caller is responsible for deallocation of memory using delete.

◆ makeDoubleValue()

XdmAtomicValue * SaxonProcessor::makeDoubleValue ( double d)

Factory method to create an xs:double atomic value as a new XdmAtomicValue.

Parameters
d- the xs:double value as a double
Returns
Pointer to a new XdmAtomicValue. The caller is responsible for deallocation of memory using delete.

◆ makeFloatValue()

XdmAtomicValue * SaxonProcessor::makeFloatValue ( float f)

Factory method to create an xs:float atomic value as a new XdmAtomicValue.

Parameters
f- the xs:float value as a float
Returns
Pointer to a new XdmAtomicValue. The caller is responsible for deallocation of memory using delete.

◆ makeIntegerValue()

XdmAtomicValue * SaxonProcessor::makeIntegerValue ( int i)

Factory method to create an xs:integer atomic value as a new XdmAtomicValue.

Internally represented by either a Java Int64Value or a BigIntegerValue depending on the value supplied.

Parameters
i- the xs:integer value as an int
Returns
Pointer to a new XdmAtomicValue. The caller is responsible for deallocation of memory using delete.

◆ makeLongValue()

XdmAtomicValue * SaxonProcessor::makeLongValue ( long l)

Factory method to create an xs:long atomic value as a new XdmAtomicValue.

Internally represented by either a Java Int64Value or a BigIntegerValue depending on the value supplied.

Parameters
l- the xs:integer value as a long
Returns
Pointer to a new XdmAtomicValue. The caller is responsible for deallocation of memory using delete.

◆ makeMap()

XdmMap * SaxonProcessor::makeMap ( std::map< XdmAtomicValue *, XdmValue * > dataMap)

Make an XdmMap by supplying a map from the standard template library, with keys in XDM form.

Parameters
dataMap- the input map as an std::map, which consists of keys as XdmAtomicValue and values as XdmValue.
Returns
Pointer to an XdmMap whose members are key, value pairs given as (XdmAtomicValue, XdmValue). The caller is responsible for deallocation of memory using delete.

◆ makeMap2()

XdmMap * SaxonProcessor::makeMap2 ( std::map< std::string, XdmValue * > dataMap)
static

Make an XdmMap by supplying a map from the standard template library, with keys in primitive form.

Parameters
dataMap- the input map as an std::map, which consists of keys as std::string and values as XdmValue. Keys are converted to XdmAtomicValue objects
Returns
Pointer to an XdmMap whose members are key, value pairs given as (XdmAtomicValue, XdmValue). The caller is responsible for deallocation of memory using delete.

◆ makeMap3()

XdmMap * SaxonProcessor::makeMap3 ( XdmAtomicValue ** keys,
XdmValue ** values,
int len )

Make an XdmMap from arrays of keys and values in XDM form.

Parameters
keys- the keys are given as a pointer array of XdmAtomicValue
values- the values are given as a pointer array of XdmValue
len- the number of items in the arrays
Returns
Pointer to an XdmMap whose members are key, value pairs given as (XdmAtomicValue, XdmValue). The caller is responsible for deallocation of memory using delete.

◆ makeQNameValue()

XdmAtomicValue * SaxonProcessor::makeQNameValue ( const char * str)

Create an xs:QName atomic value, from the string representation in clark notation.

Parameters
str- the QName value given in a string form in clark notation: {uri}local
Returns
Pointer to a new XdmAtomicValue. The caller is responsible for deallocation of memory using delete.

◆ makeStringValue() [1/2]

XdmAtomicValue * SaxonProcessor::makeStringValue ( const char * str,
const char * encoding = nullptr )

Factory method to create an xs:string atomic value as a new XdmAtomicValue.

Parameters
str- the xs:string value as a char pointer array. nullptr is taken as equivalent to "".
encoding- the encoding of the string. If not specified then the platform default encoding is used.
Returns
Pointer to a new XdmAtomicValue. The caller is responsible for deallocation of memory using delete.

◆ makeStringValue() [2/2]

XdmAtomicValue * SaxonProcessor::makeStringValue ( std::string str,
const char * encoding = nullptr )

Factory method to create an xs:string atomic value as a new XdmAtomicValue.

Parameters
str- the xs:string value as a string. NULL is taken as equivalent to "".
encoding- the encoding of the string. If not specified then the platform default encoding is used.
Returns
Pointer to a new XdmAtomicValue. The caller is responsible for deallocation of memory using delete.

◆ newDocumentBuilder()

DocumentBuilder * SaxonProcessor::newDocumentBuilder ( )

Create a DocumentBuilder.

A DocumentBuilder is used to load source XML documents.

Returns
Pointer to a newly created DocumentBuilder. The caller is responsible for deallocation of memory using delete.

◆ newSchemaValidator()

SchemaValidator * SaxonProcessor::newSchemaValidator ( )

Create a SchemaValidator.

A SchemaValidator can be used to validate instance documents against the schema held by this SchemaValidator.

Returns
Pointer to a new SchemaValidator. The caller is responsible for deallocation of memory using delete.

◆ newXPathProcessor()

XPathProcessor * SaxonProcessor::newXPathProcessor ( )

Create an XPathProcessor.

An XPathProcessor is used to compile XPath expressions.

Returns
Pointer to a newly created XPathProcessor. The caller is responsible for deallocation of memory using delete.

◆ newXQueryProcessor()

XQueryProcessor * SaxonProcessor::newXQueryProcessor ( )

Create an XQueryProcessor.

An XQueryProcessor is used to compile XQuery queries.

Returns
Pointer to a newly created XQueryProcessor. The caller is responsible for deallocation of memory using delete.

◆ newXslt30Processor()

Xslt30Processor * SaxonProcessor::newXslt30Processor ( )

Create an Xslt30Processor.

An Xslt30Processor is used to compile XSLT 3.0 stylesheets.

Returns
Pointer to a newly created Xslt30Processor. The caller is responsible for deallocation of memory using delete.

◆ operator=()

SaxonProcessor & SaxonProcessor::operator= ( const SaxonProcessor & other)

The copy assignment= operator.

Creates a copy of the Saxon processor.

Parameters
other- SaxonProcessor object

◆ parseJsonFromFile()

XdmValue * SaxonProcessor::parseJsonFromFile ( const char * source)

Parse a source JSON file and return it as an XdmValue.

Parameters
source- the filename of the JSON document. This is a full path filename or a URI
Returns
Pointer to an XdmValue. The caller is responsible for deallocation of memory using delete.
Exceptions
SaxonApiExceptionif there is a failure in the parsing of the JSON file

◆ parseJsonFromString()

XdmValue * SaxonProcessor::parseJsonFromString ( const char * source,
const char * encoding = NULL )

Parse a lexical representation of a source JSON document and return it as an XdmValue.

Parameters
source- the JSON document as a lexical string
encoding- the encoding of the source argument. Argument can be omitted and NULL accepted to use the default platform encoding.
Returns
Pointer to an XdmValue. The caller is responsible for deallocation of memory using delete.
Exceptions
SaxonApiExceptionif there is a failure in the parsing of the JSON

◆ parseXmlFromFile()

XdmNode * SaxonProcessor::parseXmlFromFile ( const char * source,
SchemaValidator * validator = nullptr )

Parse a source document file and return it as an XdmNode.

Parameters
source- the filename of the source document
validator- can be used to supply a SchemaValidator to validate the document. Default is null.
Returns
Pointer to an XdmNode. The caller is responsible for deallocation of memory using delete.
Exceptions
SaxonApiExceptionif there ia a failure in the parsing of the XML file

◆ parseXmlFromString()

XdmNode * SaxonProcessor::parseXmlFromString ( const char * source,
const char * encoding = nullptr,
SchemaValidator * validator = nullptr )

Parse a lexical representation of a source XML document and return it as an XdmNode.

Parameters
source- the source document as a lexical string
encoding- the encoding used to decode the source string. If not specified then platform default encoding is used.
validator- can be used to supply a SchemaValidator to validate the document. Default is null.
Returns
Pointer to an XdmNode. The caller is responsible for deallocation of memory using delete.
Exceptions
SaxonApiExceptionif there is a failure in the parsing of the XML document

◆ parseXmlFromUri()

XdmNode * SaxonProcessor::parseXmlFromUri ( const char * source,
SchemaValidator * validator = nullptr )

Parse a source document available by URI and return it as an XdmNode.

Parameters
source- the URI of the source document
validator- can be used to supply a SchemaValidator to validate the document. Default is null.
Returns
Pointer to an XdmNode. The caller is responsible for deallocation of memory using delete.
Exceptions
SaxonApiExceptionif there ia failure in the parsing of the XML file

◆ setCatalog()

void SaxonProcessor::setCatalog ( const char * catalogFile)

Deprecated.

Set a catalog file to be used in Saxon.

Parameters
catalogFile- file name to the catalog
Exceptions
SaxonApiExceptionif there is a failure to set the catalog file
Deprecated

◆ setCatalogFiles()

void SaxonProcessor::setCatalogFiles ( const char ** catalogFiles,
int length )

Set catalog files to be used in Saxon.

Parameters
catalogFiles- array of the catalog file names
length- number of catalog files in the array argument
Exceptions
SaxonApiExceptionif there is a failure to set the catalog files

◆ setConfigurationProperty()

void SaxonProcessor::setConfigurationProperty ( const char * name,
const char * value )

Set a configuration property specific to the processor in use.

Properties specified here are common across all the processors. Example 'l':enable line number has the value 'on' or 'off'

Parameters
name- the name of the property
value- the value for the property

◆ setcwd()

void SaxonProcessor::setcwd ( const char * cwd)

Set the current working directory.

Parameters
cwd- current working directory

◆ setResourcesDirectory()

void SaxonProcessor::setResourcesDirectory ( const char * dir)

Set the saxon resources directory.

Parameters
dir- resources directory

◆ version()

const char * SaxonProcessor::version ( )

Get the Saxon version.

Returns
The Saxon version. Memory deallocation is handled internally.

Member Data Documentation

◆ cwd

std::string SaxonProcessor::cwd

Current working directory

◆ cwdV

std::string SaxonProcessor::cwdV
protected

Current working directory

◆ exception

SaxonApiException* SaxonProcessor::exception
protected

SaxonApiException object to capture exceptions thrown from the underlying Java code via JNI

◆ jvmCreatedCPP

int SaxonProcessor::jvmCreatedCPP = 0
static

Flag to indicate JVM created - used in memory management

◆ licensei

bool SaxonProcessor::licensei
protected

If true, this indicates that the Processor created needs a license file (i.e. Saxon-EE), otherwise a Saxon-HE Processor is created

◆ parameters

std::map<std::string, XdmValue *> SaxonProcessor::parameters
protected

Map of parameters used for the transformation as (string, value) pairs

◆ procRef

int64_t SaxonProcessor::procRef
protected

ObjectHandle reference to the underlying processor

◆ sxn_environ

sxnc_environment * SaxonProcessor::sxn_environ = 0
static

Environment to capture the JNI, JVM and handler to the cross compiled SaxonC library.

◆ versionStr

std::string SaxonProcessor::versionStr
protected

The Saxon version string


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