13#include "saxonc_export.h"
14#include "saxonc/SaxonProcessor.h"
25enum class SAXONC_EXPORT UnprefixedElementMatchingPolicy {
34 DEFAULT_NAMESPACE = 0,
58 DEFAULT_NAMESPACE_OR_NONE = 2
142 void setcwd(
const char *cwd);
164 const char *encoding =
nullptr);
194 void setProperty(
const char *name,
const char *value);
284 return static_cast<UnprefixedElementMatchingPolicy
>(n);
291 UnprefixedElementMatchingPolicy getUnprefixedElementMatchingPolicy();
389 void createException(
const char *message =
nullptr);
398 std::map<std::string, XdmValue *>
401 std::map<std::string, std::string>
406 UnprefixedElementMatchingPolicy unprefixedElementPolicy;
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
EXTERN_SAXONC SAXONC_EXPORT const char * version(sxnc_environment *environi, sxnc_processor *proc)
Get the Saxon version.
Definition SaxonCProcessor.c:6
SAXONC_EXPORT sxnc_value * evaluate(sxnc_environment *environi, sxnc_xpath *proc, char *cwd, char *xpathStr, char *encoding, sxnc_parameter *parameters, sxnc_property *properties, int parLen, int propLen)
Compile and evaluate an XPath expression, supplied as a character string, with properties and paramet...
Definition SaxonCXPath.c:82
SAXONC_EXPORT sxnc_value * evaluateSingle(sxnc_environment *environi, sxnc_xpath *proc, char *cwd, char *xpathStr, char *encoding, sxnc_parameter *parameters, sxnc_property *properties, int parLen, int propLen)
Compile and evaluate an XPath expression for which the result is expected to be a single XdmItem or N...
Definition SaxonCXPath.c:128
SAXONC_EXPORT bool effectiveBooleanValue(sxnc_environment *environi, sxnc_xpath *proc, char *cwd, char *xpathStr, char *encoding, sxnc_parameter *parameters, sxnc_property *properties, int parLen, int propLen)
Evaluate an XPath expression, returning the effective boolean value of the result.
Definition SaxonCXPath.c:176
SaxonApiException.
Definition SaxonApiException.h:24
The SaxonProcessor class acts as a factory for generating XQuery, XPath, Schema and XSLT compilers.
Definition SaxonProcessor.h:117
UnprefixedElementMatchingPolicy convertEnumPolicy(int n)
Convert an int into an UnprefixedElementMatchingPolicy.
Definition XPathProcessor.h:283
void setContextItem(XdmItem *item)
Set the context item for the expression.
Definition XPathProcessor.cpp:180
std::map< std::string, XdmValue * > & getParameters()
Get all parameters as a std::map.
Definition XPathProcessor.cpp:415
bool exceptionOccurred()
Deprecated.
Definition XPathProcessor.cpp:450
SaxonApiException * getException()
Deprecated.
Definition XPathProcessor.cpp:448
const char * getBaseURI()
Get the static base URI for XPath expressions compiled using this XPathProcessor.
Definition XPathProcessor.cpp:294
bool removeParameter(const char *name)
Remove a parameter (name, value) pair.
Definition XPathProcessor.cpp:352
void setContextFile(const char *filename)
Set the context item from file.
Definition XPathProcessor.cpp:195
void setBackwardsCompatible(bool option)
Say whether XPath 1.0 backwards compatibility mode is to be used.
const char * getErrorMessage()
Deprecated.
Definition XPathProcessor.cpp:441
void setBaseURI(const char *uriStr)
Set the static base URI for XPath expressions compiled using this XPathProcessor.
Definition XPathProcessor.cpp:281
SaxonProcessor * getSaxonProcessor()
Get the SaxonProcessor which created this XPathProcessor.
Definition XPathProcessor.h:386
void clearProperties()
Clear property values set.
Definition XPathProcessor.cpp:401
void setcwd(const char *cwd)
Set the current working directory.
Definition XPathProcessor.cpp:403
void exceptionClear()
Deprecated.
Definition XPathProcessor.cpp:425
void setLanguageVersion(const char *version)
Say whether an XPath 2.0, XPath 3.0, XPath 3.1 or XPath 4.0 processor is required.
const char * getcwd()
Get the current working directory set on this XPathProcessor.
Definition XPathProcessor.cpp:410
void declareVariable(const char *name)
Declare a variable as part of the static context for XPath expressions compiled using this XPathProce...
Definition XPathProcessor.cpp:239
const char * getErrorCode()
Deprecated.
Definition XPathProcessor.cpp:434
void setCaching(bool caching)
Say whether the compiler should maintain a cache of compiled expressions.
std::map< std::string, std::string > & getProperties()
Get all configuration properties specified on the processor as a std::map.
Definition XPathProcessor.cpp:420
void clearParameters(bool deleteValues=false)
Clear parameter values set.
Definition XPathProcessor.cpp:383
void setUnprefixedElementMatchingPolicy(UnprefixedElementMatchingPolicy policy)
Set the policy for matching unprefixed element names in XPath expressions.
Definition XPathProcessor.cpp:204
void declareNamespace(const char *prefix, const char *uri)
Declare a namespace binding as part of the static context for XPath expressions compiled using this X...
Definition XPathProcessor.cpp:226
XPathProcessor()
Default constructor.
Definition XPathProcessor.cpp:17
void importSchemaNamespace(const char *uri)
Import a schema namespace.
The class XdmItem represents an item in a sequence, as defined by the XDM data model.
Definition XdmItem.h:31
An XdmValue represents a value in the XDM data model.
Definition XdmValue.h:33