10#ifndef SAXON_XSLT_EXEC_H
11#define SAXON_XSLT_EXEC_H
13#include "saxonc_export.h"
14#include "saxonc/SaxonProcessor.h"
30class SAXONC_EXPORT XsltExecutable {
32 friend class Xslt30Processor;
45 void setcwd(
const char *cwd);
88 XsltExecutable *
clone();
186 void setProperty(
const char *name,
const char *value);
270 void deleteXdmValueArray(
XdmValue **arr,
int len);
281 void setSaveXslMessage(
bool show,
const char *filename =
nullptr);
297 void setCaptureResultDocuments(
bool flag,
bool rawResults =
false);
313 void exportStylesheet(
const char *filename);
323 void transformFileToFile(
const char *sourcefile,
const char *outputfile);
333 const char *transformFileToString(
const char *sourcefile);
343 XdmValue *transformFileToValue(
const char *sourcefile);
356 void applyTemplatesReturningFile(
const char *outfile);
369 const char *applyTemplatesReturningString();
381 XdmValue *applyTemplatesReturningValue();
397 void callTemplateReturningFile(
const char *templateName,
const char *outfile);
415 const char *callTemplateReturningString(
const char *templateName =
nullptr);
433 XdmValue *callTemplateReturningValue(
const char *templateName =
nullptr);
449 void callFunctionReturningFile(
const char *functionName,
XdmValue **arguments,
450 int argument_length,
const char *outfile);
468 const char *callFunctionReturningString(
const char *functionName,
470 int argument_length);
488 XdmValue *callFunctionReturningValue(
const char *functionName,
490 int argument_length);
503 const char *transformToString(
XdmNode *source =
nullptr);
525 void transformToFile(
XdmNode *source =
nullptr);
541 void clearXslMessages();
549 bool exceptionOccurred();
564 const char *getErrorMessage();
570 void exceptionClear();
590 std::string resources);
605 int64_t procRef, executableRef, selectionRef, saxonMessageListenerRef,
607 bool selectionStringFlag;
611 std::string resources_dir;
612 bool jitCompilation, rawResultsFlag, exceptionFound;
613 std::map<std::string, XdmValue *>
616 std::map<std::string, std::string>
619 std::map<std::string, XdmValue *> resultDocumentMap;
SAXONC_EXPORT void setParameter(sxnc_parameter **parameters, int *parLen, int *parCap, const char *name, sxnc_value *value)
Set a parameter.
Definition SaxonCGlue.c:160
SAXONC_EXPORT int64_t getParameter(sxnc_parameter *parameters, int parLen, const char *name)
Get a parameter from the list.
Definition SaxonCGlue.c:136
SAXONC_EXPORT void setProperty(sxnc_property **properties, int *propLen, int *propCap, const char *name, const char *value)
Set a property.
Definition SaxonCGlue.c:186
SAXONC_EXPORT char * getProperty(sxnc_property *properties, int propLen, const char *name)
Get a property from the list.
Definition SaxonCGlue.c:148
SaxonApiException.
Definition SaxonApiException.h:24
The SaxonProcessor class acts as a factory for generating XQuery, XPath, Schema and XSLT compilers.
Definition SaxonProcessor.h:117
The class XdmFunctionItem represents a function item.
Definition XdmFunctionItem.h:26
The class XdmItem represents an item in a sequence, as defined by the XDM data model.
Definition XdmItem.h:31
This class represents a node in the XDM data model.
Definition XdmNode.h:57
An XdmValue represents a value in the XDM data model.
Definition XdmValue.h:33
An Xslt30Processor represents a factory to compile, load and execute stylesheets.
Definition Xslt30Processor.h:29
An XsltExecutable represents the compiled form of a stylesheet.
Definition XsltExecutable.h:30
void setInitialMatchSelectionAsFile(const char *filename)
Set the initial match selection for the transformation to be a specified file.
Definition XsltExecutable.cpp:137
void clearParameters(bool deleteValues=false)
Clear stylesheet parameter values set.
Definition XsltExecutable.cpp:358
const char * getcwd()
Get the current working directory (cwd).
Definition XsltExecutable.cpp:408
void clearProperties()
Clear configuration property values set.
Definition XsltExecutable.cpp:377
void setInitialMatchSelection(XdmValue *selection)
Set the initial match selection for the transformation to be a specified XDM value.
Definition XsltExecutable.cpp:128
bool removeParameter(const char *name)
Remove a parameter (name, value) pair set for a stylesheet parameter.
Definition XsltExecutable.cpp:313
void setGlobalContextFromFile(const char *filename)
Supply the context item to be used when evaluating global variables and parameters.
Definition XsltExecutable.cpp:118
SaxonProcessor * getSaxonProcessor()
Get the SaxonProcessor which created this XsltExecutable.
Definition XsltExecutable.h:575
XsltExecutable * clone()
Create a clone of this XsltExecutable object.
Definition XsltExecutable.cpp:327
void setResultAsRawValue(bool option)
Specify how transformation results are returned.
Definition XsltExecutable.cpp:317
std::map< std::string, XdmValue * > & getResultDocuments()
Obtain the secondary result documents resulting from the execution of the stylesheet,...
Definition XsltExecutable.cpp:261
void setcwd(const char *cwd)
Set the current working directory (cwd).
Definition XsltExecutable.cpp:402
void setBaseOutputURI(const char *baseURI)
Set the base output URI.
Definition XsltExecutable.cpp:177
std::map< std::string, std::string > & getProperties()
Get all configuration properties specified on the processor as a std::map.
Definition XsltExecutable.cpp:392
void setOutputFile(const char *outfile)
Set the output file where the transformation result is sent.
Definition XsltExecutable.cpp:173
void setInitialMode(const char *modeName)
Set the initial mode for the transformation.
Definition XsltExecutable.cpp:183
char ** createCharArray(int len)
Utility method for working with SaxonC on Python - internal use only.
Definition XsltExecutable.h:262
std::map< std::string, XdmValue * > & getParameters()
Get all parameters as a std::map.
Definition XsltExecutable.cpp:387
void setGlobalContextItem(XdmItem *value)
Supply the context item to be used when evaluating global variables and parameters.
Definition XsltExecutable.cpp:108
void setInitialTemplateParameters(std::map< std::string, XdmValue * > parameters, bool tunnel)
Set parameters to be passed to the initial template.
Definition XsltExecutable.cpp:218
bool removeProperty(const char *name)
Remove a configuration property (name, value) pair specific to the processor in use.
Definition XsltExecutable.cpp:345