SaxonC 13.0.0
Saxon Processor library for C/C++, PHP and Python
Loading...
Searching...
No Matches
SaxonCXPath.h
Go to the documentation of this file.
1#ifndef SAXONCXPATH_H
2#define SAXONCXPATH_H
3
5// Copyright (c) 2022 - 2023 Saxonica Limited.
6// This Source Code Form is subject to the terms of the Mozilla Public License,
7// v. 2.0. If a copy of the MPL was not distributed with this file, You can
8// obtain one at http://mozilla.org/MPL/2.0/. This Source Code Form is
9// "Incompatible With Secondary Licenses", as defined by the Mozilla Public
10// License, v. 2.0.
12
14
15//===============================================================================================//
16
17EXTERN_SAXONC
18
25
31
32SAXONC_EXPORT int64_t booleanValue(sxnc_environment *environi, bool val);
33
39
40SAXONC_EXPORT int64_t integerValue(sxnc_environment *environi, int i);
41
47
48SAXONC_EXPORT int64_t doubleValue(sxnc_environment *environi, double d);
49
55
56SAXONC_EXPORT int64_t floatValue(sxnc_environment *environi, float f);
57
63
64SAXONC_EXPORT int64_t longValue(sxnc_environment *environi, long l);
65
71
72SAXONC_EXPORT int64_t getJavaStringValue(sxnc_environment *environi, const char *str);
73
81
82SAXONC_EXPORT int64_t xdmValueAsObj(sxnc_environment *environi, const char *type,
83 const char *str);
84
92
93SAXONC_EXPORT sxnc_value *xdmValue(sxnc_environment *environi, const char *type,
94 const char *str);
95
109SAXONC_EXPORT int c_createXPathProcessor(sxnc_environment *environi,
110 sxnc_processor *processor, sxnc_xpath *xpath);
111
132
133SAXONC_EXPORT sxnc_value *evaluate(sxnc_environment *environi, sxnc_xpath *proc, char *cwd,
134 char *xpathStr, char *encoding, sxnc_parameter *parameters,
135 sxnc_property *properties, int parLen, int propLen);
136
158SAXONC_EXPORT sxnc_value *evaluateSingle(sxnc_environment *environi, sxnc_xpath *proc,
159 char *cwd, char *xpathStr, char *encoding,
160 sxnc_parameter *parameters,
161 sxnc_property *properties, int parLen, int propLen);
162
183
184SAXONC_EXPORT bool effectiveBooleanValue(sxnc_environment *environi, sxnc_xpath *proc,
185 char *cwd, char *xpathStr, char *encoding,
186 sxnc_parameter *parameters,
187 sxnc_property *properties, int parLen, int propLen);
188
196
197SAXONC_EXPORT bool isAtomicValue(sxnc_environment *environi, sxnc_value value);
198
206
207SAXONC_EXPORT int size(sxnc_environment *environi, sxnc_value val);
208
209// /**
210// * Get the n'th item in the value, counting from zero.
211// *
212// * @param n - the item that is required, counting the first item in the
213// sequence
214// * as item zero
215// * @return the n'th item in the sequence making up the value, counting from
216// zero
217// */
218// sxnc_value *itemAt(sxnc_environment *environi, sxnc_value, int i);
219
220// /**
221// * Convert the Get the n'th item in the value, counting from zero.
222// *
223// * @param n the item that is required, counting the first item in the sequence
224// * as item zero
225// * @return the n'th item in the sequence making up the value, counting from
226// zero
227// */
228// int64_t getvalue(sxnc_environment *environi, sxnc_value);
229
238
239SAXONC_EXPORT const char *getStringValue(sxnc_environment *environi, sxnc_value value);
240
249
250SAXONC_EXPORT int getIntegerValue(sxnc_environment *environi, sxnc_value value,
251 int failure_value);
252
259SAXONC_EXPORT bool getBooleanValue(sxnc_environment *environi, sxnc_value value);
260
269SAXONC_EXPORT long getLongValue(sxnc_environment *environi, sxnc_value value,
270 long failureVal);
271
280SAXONC_EXPORT float getFloatValue(sxnc_environment *environi, sxnc_value value,
281 float failureVal);
282
291SAXONC_EXPORT double getDoubleValue(sxnc_environment *environi, sxnc_value value,
292 double failureVal);
293
294EXTERN_SAXONC_END
295
296#endif
SaxonCProcessor.h provides the C API for XSLT and XQuery processing. This file contains a set of func...
SAXONC_EXPORT int64_t xdmValueAsObj(sxnc_environment *environi, const char *type, const char *str)
A Constructor for internal use.
Definition SaxonCXPath.c:3
SAXONC_EXPORT bool isAtomicValue(sxnc_environment *environi, sxnc_value value)
Determine whether the item is an atomic value or a node.
SAXONC_EXPORT int getIntegerValue(sxnc_environment *environi, sxnc_value value, int failure_value)
Get the integer value of the item.
Definition SaxonCXPath.c:332
SAXONC_EXPORT bool getBooleanValue(sxnc_environment *environi, sxnc_value value)
Get the boolean value of the item.
Definition SaxonCXPath.c:345
SAXONC_EXPORT int64_t doubleValue(sxnc_environment *environi, double d)
Create a boxed Double value.
SAXONC_EXPORT int64_t booleanValue(sxnc_environment *environi, bool val)
Create a boxed Boolean value.
SAXONC_EXPORT int64_t longValue(sxnc_environment *environi, long l)
Create a boxed Long value.
SAXONC_EXPORT int64_t floatValue(sxnc_environment *environi, float f)
Create a boxed Float value.
SAXONC_EXPORT float getFloatValue(sxnc_environment *environi, sxnc_value value, float failureVal)
Get the float value of the item.
Definition SaxonCXPath.c:366
SAXONC_EXPORT int64_t getJavaStringValue(sxnc_environment *environi, const char *str)
Create a boxed String value.
SAXONC_EXPORT long getLongValue(sxnc_environment *environi, sxnc_value value, long failureVal)
Get the long value of the item.
Definition SaxonCXPath.c:355
SAXONC_EXPORT int c_createXPathProcessor(sxnc_environment *environi, sxnc_processor *processor, sxnc_xpath *xpath)
Initialise the Saxon Processor and XPath processor.
Definition SaxonCXPath.c:61
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:130
SAXONC_EXPORT int size(sxnc_environment *environi, sxnc_value val)
Get the number of items in the sequence.
Definition SaxonCXPath.c:245
SAXONC_EXPORT const char * getStringValue(sxnc_environment *environi, sxnc_value value)
Get the string value of the item.
Definition SaxonCXPath.c:240
SAXONC_EXPORT double getDoubleValue(sxnc_environment *environi, sxnc_value value, double failureVal)
Get the double value of the item.
Definition SaxonCXPath.c:377
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:186
SAXONC_EXPORT int64_t integerValue(sxnc_environment *environi, int i)
Create a boxed Integer value.
SAXONC_EXPORT sxnc_value * xdmValue(sxnc_environment *environi, const char *type, const char *str)
A Constructor.
Definition SaxonCXPath.c:31
sxnc_environment.
Definition SaxonCGlue.h:85
sxnc_parameter.
Definition SaxonCGlue.h:97
!
Definition SaxonCGlue.h:127
sxnc_property.
Definition SaxonCGlue.h:111
!
Definition SaxonCGlue.h:120
sxnc_xpath.
Definition SaxonCProcessor.h:39