SaxonC 12.8.0
Saxon Processor library for C/C++, PHP and Python
Loading...
Searching...
No Matches
XdmItem.h
1
2// Copyright (c) 2022 - 2025 Saxonica Limited.
3// This Source Code Form is subject to the terms of the Mozilla Public License,
4// v. 2.0. If a copy of the MPL was not distributed with this file, You can
5// obtain one at http://mozilla.org/MPL/2.0/. This Source Code Form is
6// "Incompatible With Secondary Licenses", as defined by the Mozilla Public
7// License, v. 2.0.
9
10#ifndef SAXON_XDMITEM_h
11#define SAXON_XDMITEM_h
12
13#include "saxonc_export.h"
14#include "saxonc/XdmValue.h"
15
16class SaxonProcessor;
17
31class SAXONC_EXPORT XdmItem : public XdmValue {
32
33public:
38 XdmItem();
39
44 explicit XdmItem(int64_t objRef);
45
50 XdmItem(const XdmItem &item);
51
55 virtual ~XdmItem();
56
61 virtual void incrementRefCount();
62
67 virtual void decrementRefCount();
68
75 virtual bool isAtomic();
76
83 virtual bool isNode();
84
91 virtual bool isFunction();
92
98 virtual bool isMap();
99
105 virtual bool isArray();
106
111 virtual int64_t getUnderlyingValue();
112
128 virtual const char *getStringValue(const char *encoding = nullptr);
129
137 const char *toString(const char *encoding = nullptr);
138
143 virtual XdmItem *getHead();
144
155 XdmItem *itemAt(int n);
156
161 int size();
162
167 virtual XDM_TYPE getType();
168
169protected:
170
171 const char *stringValue;
173 const char *itemToString;
176private:
177 bool operator==(const XdmItem& other) const
178 {return false;}
179
180};
181
182#endif
SAXONC_EXPORT const char * getStringValue(sxnc_environment *environi, sxnc_value value)
Get the string value of the item.
Definition SaxonCXPath.c:223
The SaxonProcessor class acts as a factory for generating XQuery, XPath, Schema and XSLT compilers.
Definition SaxonProcessor.h:117
The class XdmItem represents an item in a sequence, as defined by the XDM data model.
Definition XdmItem.h:31
const char * stringValue
Definition XdmItem.h:171
const char * itemToString
Definition XdmItem.h:173
An XdmValue represents a value in the XDM data model.
Definition XdmValue.h:33
virtual int64_t getUnderlyingValue()
Get the underlying Java XdmValue object - internal use only.
Definition XdmValue.cpp:323
virtual XDM_TYPE getType()
Get the type of this XDM value.
Definition XdmValue.cpp:372
virtual XdmItem * itemAt(int n)
Get the n'th item in the sequence, counting from zero.
Definition XdmValue.cpp:363
virtual void incrementRefCount()
Increment reference count of this XdmValue - internal use only This method is used for internal memor...
Definition XdmValue.cpp:285
virtual void decrementRefCount()
Decrement reference count of this XdmValue - internal use only This method is used for internal memor...
Definition XdmValue.cpp:303
virtual XdmItem * getHead()
Get the first item in the sequence represented by this XdmValue.
Definition XdmValue.cpp:313
virtual const char * toString(const char *encoding=nullptr)
Create a string representation of the sequence.
Definition XdmValue.cpp:42
virtual int size()
Get the number of items in the sequence.
Definition XdmValue.cpp:73