SaxonC 12.7.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
13#include "saxonc_export.h"
15
16//===============================================================================================//
17
18EXTERN_SAXONC
19
33SAXONC_EXPORT int64_t booleanValue(sxnc_environment *environi, bool val);
34
41SAXONC_EXPORT int64_t integerValue(sxnc_environment *environi, int i);
42
49SAXONC_EXPORT int64_t doubleValue(sxnc_environment *environi, double d);
50
57SAXONC_EXPORT int64_t floatValue(sxnc_environment *environi, float f);
58
65SAXONC_EXPORT int64_t longValue(sxnc_environment *environi, long l);
66
73SAXONC_EXPORT int64_t getJavaStringValue(sxnc_environment *environi, const char *str);
74
83SAXONC_EXPORT int64_t xdmValueAsObj(sxnc_environment *environi, const char *type,
84 const char *str);
85
94SAXONC_EXPORT sxnc_value *xdmValue(sxnc_environment *environi, const char *type,
95 const char *str);
96
110SAXONC_EXPORT int c_createXPathProcessor(sxnc_environment *environi,
111 sxnc_processor *processor, sxnc_xpath *xpath);
112
134SAXONC_EXPORT sxnc_value *evaluate(sxnc_environment *environi, sxnc_xpath *proc, char *cwd,
135 char *xpathStr, char *encoding, sxnc_parameter *parameters,
136 sxnc_property *properties, int parLen, int propLen);
137
159SAXONC_EXPORT sxnc_value *evaluateSingle(sxnc_environment *environi, sxnc_xpath *proc,
160 char *cwd, char *xpathStr, char *encoding,
161 sxnc_parameter *parameters,
162 sxnc_property *properties, int parLen, int propLen);
163
185SAXONC_EXPORT bool effectiveBooleanValue(sxnc_environment *environi, sxnc_xpath *proc,
186 char *cwd, char *xpathStr, char *encoding,
187 sxnc_parameter *parameters,
188 sxnc_property *properties, int parLen, int propLen);
189
198SAXONC_EXPORT bool isAtomicValue(sxnc_environment *environi, sxnc_value value);
199
208SAXONC_EXPORT int size(sxnc_environment *environi, sxnc_value val);
209
210// /**
211// * Get the n'th item in the value, counting from zero.
212// *
213// * @param n - the item that is required, counting the first item in the
214// sequence
215// * as item zero
216// * @return the n'th item in the sequence making up the value, counting from
217// zero
218// */
219// sxnc_value *itemAt(sxnc_environment *environi, sxnc_value, int i);
220
221// /**
222// * Convert the Get the n'th item in the value, counting from zero.
223// *
224// * @param n the item that is required, counting the first item in the sequence
225// * as item zero
226// * @return the n'th item in the sequence making up the value, counting from
227// zero
228// */
229// int64_t getvalue(sxnc_environment *environi, sxnc_value);
230
240SAXONC_EXPORT const char *getStringValue(sxnc_environment *environi, sxnc_value value);
241
251SAXONC_EXPORT int getIntegerValue(sxnc_environment *environi, sxnc_value value,
252 int failure_value);
253
260SAXONC_EXPORT bool getBooleanValue(sxnc_environment *environi, sxnc_value value);
261
270SAXONC_EXPORT long getLongValue(sxnc_environment *environi, sxnc_value value,
271 long failureVal);
272
281SAXONC_EXPORT float getFloatValue(sxnc_environment *environi, sxnc_value value,
282 float failureVal);
283
292SAXONC_EXPORT double getDoubleValue(sxnc_environment *environi, sxnc_value value,
293 double failureVal);
294
295EXTERN_SAXONC_END
296
297#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:315
SAXONC_EXPORT bool getBooleanValue(sxnc_environment *environi, sxnc_value value)
Get the boolean value of the item.
Definition SaxonCXPath.c:321
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:332
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:326
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:128
SAXONC_EXPORT int size(sxnc_environment *environi, sxnc_value val)
Get the number of items in the sequence.
Definition SaxonCXPath.c:228
SAXONC_EXPORT const char * getStringValue(sxnc_environment *environi, sxnc_value value)
Get the string value of the item.
Definition SaxonCXPath.c:223
SAXONC_EXPORT double getDoubleValue(sxnc_environment *environi, sxnc_value value, double failureVal)
Get the double value of the item.
Definition SaxonCXPath.c:338
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
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:80
sxnc_parameter.
Definition SaxonCGlue.h:92
! sxnc_processor.
Definition SaxonCGlue.h:121
sxnc_property.
Definition SaxonCGlue.h:105
! sxnc_value.
Definition SaxonCGlue.h:114
sxnc_xpath.
Definition SaxonCProcessor.h:40