SaxonCProcessor.h
provides the C API for XSLT and XQuery processing. This file contains a set of functions to compile and execute stylesheets and queries.
More...
Go to the source code of this file.
|
EXTERN_SAXONC const char * | version (sxnc_environment *environi, sxnc_processor *proc) |
|
const char * | getProductVariantAndVersion (sxnc_environment *environi, sxnc_processor *proc) |
|
void | initSaxonc (sxnc_environment **environi, sxnc_processor **proc, sxnc_parameter **param, sxnc_property **prop, int cap, int propCap) |
|
void | freeSaxonc (sxnc_environment **environi, sxnc_processor **proc, sxnc_parameter **param, sxnc_property **prop) |
|
void | xsltSaveResultToFile (sxnc_environment *environi, sxnc_processor *proc, char *cwd, char *source, char *stylesheet, char *outputfile, sxnc_parameter *parameters, sxnc_property *properties, int parLen, int propLen) |
|
const char * | xsltApplyStylesheet (sxnc_environment *environi, sxnc_processor *proc, char *cwd, char *source, char *stylesheet, sxnc_parameter *parameters, sxnc_property *properties, int parLen, int propLen) |
|
void | executeQueryToFile (sxnc_environment *environi, sxnc_processor *proc, char *cwd, char *outputfile, sxnc_parameter *parameters, sxnc_property *properties, int parLen, int propLen) |
|
const char * | executeQueryToString (sxnc_environment *environi, sxnc_processor *proc, char *cwd, sxnc_parameter *parameters, sxnc_property *properties, int parLen, int propLen) |
|
const char * | c_getErrorMessage (sxnc_environment *environi) |
|
SaxonCProcessor.h
provides the C API for XSLT and XQuery processing. This file contains a set of functions to compile and execute stylesheets and queries.
◆ c_getErrorMessage()
Get a pointer to the current error message as a string
- Parameters
-
environi | - GraalVM environment |
◆ executeQueryToFile()
Execute a query with the result saved to file.
- Parameters
-
environi | - GraalVM environment |
proc | - Pointer to the Saxon Processor used for creating the XQuery executable |
cwd | - Current working directory - used for base URI for input and output files |
outputfile | - The file name of where the result will be stored |
parameters | - Array of parameters for the query, as mappings (string, value) |
properties | - Array of properties for the query, as mappings (string, string). Available XQuery Processor properties: serialization properties names start with '!' (e.g. '!method' -> 'xml'), 'o': output file name, 's': source file name, 'q': query file name, 'qs': string form of the query, 'base': base URI of the query, 'dtd': set DTD validation 'on' or 'off' |
parLen | - The length of the parameters array |
propLen | - The length of the properties array |
◆ executeQueryToString()
Execute a query with the result returned as a string value (char pointer array).
- Parameters
-
environi | - GraalVM environment |
proc | - Pointer to the Saxon Processor used for creating the XQuery executable |
cwd | - Current working directory - used for base URI for input and output files |
parameters | - Array of parameters for the query, as mappings (string, value) |
properties | - Array of properties for the query, as mappings (string, string). Available XQuery Processor properties: serialization properties names start with '!' (e.g. '!method' -> 'xml'), 'o': output file name, 's': source file name, 'q': query file name, 'qs': string form of the query, 'base': base URI of the query, 'dtd': set DTD validation 'on' or 'off' |
parLen | - The length of the parameters array |
propLen | - The length of the properties array |
◆ freeSaxonc()
Free associated memory on the heap created by the SaxonC Processors, properties and parameters.
- Parameters
-
◆ getProductVariantAndVersion()
Get the Saxon version and edition
◆ initSaxonc()
Initialise the SaxonC Processor, along with the parameters and the properties pointers. This utility function is used to allocate memory on the heap, therefore is required to be called before execution of stylesheets or queries.
- Parameters
-
environi | - GraalVM environment held as the struct sxnc_environment. This function calls malloc on the pointer. |
proc | - Pointer to the Saxon Processor which is represented as the struct sxnc_processor and is used for creating the XSLT and XQuery processors. This function calls malloc on the pointer. |
param | - Pointers to the sxnc_parameter structs used for parameters. This function calls calloc on the pointers. |
prop | - Pointers to the sxnc_property structs used for properties. This function calls calloc on the pointers. |
cap | - The length of the parameters array |
propCap | - The length of the properties array |
◆ version()
◆ xsltApplyStylesheet()
Transform an XSLT stylesheet with the result returned as a string value (char pointer array). The compile and execution is done in the same call of this method.
- Parameters
-
environi | - GraalVM environment |
proc | - Pointer to the Saxon Processor used for creating the XSLT executable |
cwd | - Current working directory - used for base URI for input and output files |
source | - The file name of the source document |
stylesheet | - The file name of the stylesheet document |
parameters | - Array of parameters for the transform, as mappings (string, value) |
properties | - Array of properties for the transform, as mappings (string, string). Available XSLT Processor properties: serialization properties names start with '!' (e.g. '!method' -> 'xml'), 'o': output file name, 'it': initial template, 'im': initial mode, 's': source file name, 'm': switch on message listener for xsl:message instructions |
parLen | - The length of the parameters array |
propLen | - The length of the properties array |
- Returns
- char pointer array - The result of the transformation
◆ xsltSaveResultToFile()
Transform an XSLT stylesheet with the result saved to file. The compile and execution is done in the same call of this method.
- Parameters
-
environi | - GraalVM environment |
proc | - Pointer to the Saxon Processor used for creating the XSLT executable |
cwd | - Current working directory - used for base URI for input and output files |
source | - The file name of the source document |
stylesheet | - The file name of the stylesheet document |
outputfile | - The file name of where the result will be stored |
parameters | - Array of parameters for the transform, as mappings (string, value) |
properties | - Array of properties for the transform, as mappings (string, string). Available XSLT Processor properties: serialization properties names start with '!' (e.g. '!method' -> 'xml'), 'o': output file name, 'it': initial template, 'im': initial mode, 's': source file name, 'm': switch on message listener for xsl:message instructions |
parLen | - The length of the parameters array |
propLen | - The length of the properties array |