pocxxeci 0.30.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of pocxxeci might be problematic. Click here for more details.
- package/LICENSE +19 -0
- package/Makefile +18 -0
- package/README.md +52 -0
- package/binding.gyp +81 -0
- package/index.d.ts +273 -0
- package/index.js +45 -0
- package/lib/bindings.js +1 -0
- package/lib/document.js +122 -0
- package/lib/element.js +82 -0
- package/lib/sax_parser.js +38 -0
- package/package.json +70 -0
- package/src/html_document.cc +7 -0
- package/src/html_document.h +18 -0
- package/src/libxmljs.cc +252 -0
- package/src/libxmljs.h +53 -0
- package/src/xml_attribute.cc +173 -0
- package/src/xml_attribute.h +40 -0
- package/src/xml_comment.cc +117 -0
- package/src/xml_comment.h +30 -0
- package/src/xml_document.cc +810 -0
- package/src/xml_document.h +67 -0
- package/src/xml_element.cc +565 -0
- package/src/xml_element.h +61 -0
- package/src/xml_namespace.cc +158 -0
- package/src/xml_namespace.h +39 -0
- package/src/xml_node.cc +761 -0
- package/src/xml_node.h +73 -0
- package/src/xml_pi.cc +161 -0
- package/src/xml_pi.h +34 -0
- package/src/xml_sax_parser.cc +424 -0
- package/src/xml_sax_parser.h +73 -0
- package/src/xml_syntax_error.cc +66 -0
- package/src/xml_syntax_error.h +25 -0
- package/src/xml_text.cc +320 -0
- package/src/xml_text.h +48 -0
- package/src/xml_textwriter.cc +315 -0
- package/src/xml_textwriter.h +62 -0
- package/src/xml_xpath_context.cc +70 -0
- package/src/xml_xpath_context.h +23 -0
- package/vendor/libxml/Copyright +23 -0
- package/vendor/libxml/DOCBparser.c +305 -0
- package/vendor/libxml/HTMLparser.c +7287 -0
- package/vendor/libxml/HTMLtree.c +1200 -0
- package/vendor/libxml/Makefile +2983 -0
- package/vendor/libxml/SAX.c +180 -0
- package/vendor/libxml/SAX2.c +3036 -0
- package/vendor/libxml/buf.c +1351 -0
- package/vendor/libxml/buf.h +72 -0
- package/vendor/libxml/c14n.c +2234 -0
- package/vendor/libxml/catalog.c +3828 -0
- package/vendor/libxml/chvalid.c +336 -0
- package/vendor/libxml/config.h +294 -0
- package/vendor/libxml/config.h.gch +0 -0
- package/vendor/libxml/debugXML.c +3423 -0
- package/vendor/libxml/dict.c +1298 -0
- package/vendor/libxml/elfgcchack.h +17818 -0
- package/vendor/libxml/enc.h +32 -0
- package/vendor/libxml/encoding.c +3975 -0
- package/vendor/libxml/entities.c +1163 -0
- package/vendor/libxml/error.c +998 -0
- package/vendor/libxml/globals.c +1126 -0
- package/vendor/libxml/hash.c +1146 -0
- package/vendor/libxml/include/libxml/DOCBparser.h +96 -0
- package/vendor/libxml/include/libxml/HTMLparser.h +306 -0
- package/vendor/libxml/include/libxml/HTMLtree.h +147 -0
- package/vendor/libxml/include/libxml/Makefile +725 -0
- package/vendor/libxml/include/libxml/Makefile.am +54 -0
- package/vendor/libxml/include/libxml/Makefile.in +725 -0
- package/vendor/libxml/include/libxml/SAX.h +173 -0
- package/vendor/libxml/include/libxml/SAX2.h +178 -0
- package/vendor/libxml/include/libxml/c14n.h +128 -0
- package/vendor/libxml/include/libxml/catalog.h +182 -0
- package/vendor/libxml/include/libxml/chvalid.h +230 -0
- package/vendor/libxml/include/libxml/debugXML.h +217 -0
- package/vendor/libxml/include/libxml/dict.h +79 -0
- package/vendor/libxml/include/libxml/encoding.h +245 -0
- package/vendor/libxml/include/libxml/entities.h +151 -0
- package/vendor/libxml/include/libxml/globals.h +508 -0
- package/vendor/libxml/include/libxml/hash.h +236 -0
- package/vendor/libxml/include/libxml/list.h +137 -0
- package/vendor/libxml/include/libxml/nanoftp.h +163 -0
- package/vendor/libxml/include/libxml/nanohttp.h +81 -0
- package/vendor/libxml/include/libxml/parser.h +1243 -0
- package/vendor/libxml/include/libxml/parserInternals.h +644 -0
- package/vendor/libxml/include/libxml/pattern.h +100 -0
- package/vendor/libxml/include/libxml/relaxng.h +217 -0
- package/vendor/libxml/include/libxml/schemasInternals.h +958 -0
- package/vendor/libxml/include/libxml/schematron.h +142 -0
- package/vendor/libxml/include/libxml/threads.h +89 -0
- package/vendor/libxml/include/libxml/tree.h +1311 -0
- package/vendor/libxml/include/libxml/uri.h +94 -0
- package/vendor/libxml/include/libxml/valid.h +458 -0
- package/vendor/libxml/include/libxml/xinclude.h +129 -0
- package/vendor/libxml/include/libxml/xlink.h +189 -0
- package/vendor/libxml/include/libxml/xmlIO.h +368 -0
- package/vendor/libxml/include/libxml/xmlautomata.h +146 -0
- package/vendor/libxml/include/libxml/xmlerror.h +945 -0
- package/vendor/libxml/include/libxml/xmlexports.h +77 -0
- package/vendor/libxml/include/libxml/xmlmemory.h +224 -0
- package/vendor/libxml/include/libxml/xmlmodule.h +57 -0
- package/vendor/libxml/include/libxml/xmlreader.h +428 -0
- package/vendor/libxml/include/libxml/xmlregexp.h +222 -0
- package/vendor/libxml/include/libxml/xmlsave.h +88 -0
- package/vendor/libxml/include/libxml/xmlschemas.h +246 -0
- package/vendor/libxml/include/libxml/xmlschemastypes.h +151 -0
- package/vendor/libxml/include/libxml/xmlstring.h +140 -0
- package/vendor/libxml/include/libxml/xmlunicode.h +202 -0
- package/vendor/libxml/include/libxml/xmlversion.h +484 -0
- package/vendor/libxml/include/libxml/xmlwin32version.h +239 -0
- package/vendor/libxml/include/libxml/xmlwriter.h +488 -0
- package/vendor/libxml/include/libxml/xpath.h +564 -0
- package/vendor/libxml/include/libxml/xpathInternals.h +632 -0
- package/vendor/libxml/include/libxml/xpointer.h +114 -0
- package/vendor/libxml/include/win32config.h +122 -0
- package/vendor/libxml/include/wsockcompat.h +54 -0
- package/vendor/libxml/legacy.c +1343 -0
- package/vendor/libxml/libxml.h +134 -0
- package/vendor/libxml/list.c +779 -0
- package/vendor/libxml/nanoftp.c +2118 -0
- package/vendor/libxml/nanohttp.c +1899 -0
- package/vendor/libxml/parser.c +15553 -0
- package/vendor/libxml/parserInternals.c +2164 -0
- package/vendor/libxml/pattern.c +2621 -0
- package/vendor/libxml/relaxng.c +11101 -0
- package/vendor/libxml/rngparser.c +1595 -0
- package/vendor/libxml/runsuite.c +1157 -0
- package/vendor/libxml/save.h +36 -0
- package/vendor/libxml/schematron.c +1787 -0
- package/vendor/libxml/threads.c +1049 -0
- package/vendor/libxml/timsort.h +601 -0
- package/vendor/libxml/tree.c +10183 -0
- package/vendor/libxml/trio.c +6895 -0
- package/vendor/libxml/trio.h +230 -0
- package/vendor/libxml/triodef.h +228 -0
- package/vendor/libxml/trionan.c +914 -0
- package/vendor/libxml/trionan.h +84 -0
- package/vendor/libxml/triop.h +150 -0
- package/vendor/libxml/triostr.c +2112 -0
- package/vendor/libxml/triostr.h +144 -0
- package/vendor/libxml/uri.c +2561 -0
- package/vendor/libxml/valid.c +7138 -0
- package/vendor/libxml/xinclude.c +2657 -0
- package/vendor/libxml/xlink.c +183 -0
- package/vendor/libxml/xmlIO.c +4135 -0
- package/vendor/libxml/xmlcatalog.c +624 -0
- package/vendor/libxml/xmllint.c +3796 -0
- package/vendor/libxml/xmlmemory.c +1163 -0
- package/vendor/libxml/xmlmodule.c +468 -0
- package/vendor/libxml/xmlreader.c +6033 -0
- package/vendor/libxml/xmlregexp.c +8271 -0
- package/vendor/libxml/xmlsave.c +2735 -0
- package/vendor/libxml/xmlschemas.c +29173 -0
- package/vendor/libxml/xmlschemastypes.c +6276 -0
- package/vendor/libxml/xmlstring.c +1050 -0
- package/vendor/libxml/xmlunicode.c +3179 -0
- package/vendor/libxml/xmlwriter.c +4738 -0
- package/vendor/libxml/xpath.c +14734 -0
- package/vendor/libxml/xpointer.c +2969 -0
- package/vendor/libxml/xzlib.c +815 -0
- package/vendor/libxml/xzlib.h +19 -0
@@ -0,0 +1,230 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: Unicode character range checking
|
3
|
+
* Description: this module exports interfaces for the character
|
4
|
+
* range validation APIs
|
5
|
+
*
|
6
|
+
* This file is automatically generated from the cvs source
|
7
|
+
* definition files using the genChRanges.py Python script
|
8
|
+
*
|
9
|
+
* Generation date: Mon Mar 27 11:09:48 2006
|
10
|
+
* Sources: chvalid.def
|
11
|
+
* Author: William Brack <wbrack@mmm.com.hk>
|
12
|
+
*/
|
13
|
+
|
14
|
+
#ifndef __XML_CHVALID_H__
|
15
|
+
#define __XML_CHVALID_H__
|
16
|
+
|
17
|
+
#include <libxml/xmlversion.h>
|
18
|
+
#include <libxml/xmlstring.h>
|
19
|
+
|
20
|
+
#ifdef __cplusplus
|
21
|
+
extern "C" {
|
22
|
+
#endif
|
23
|
+
|
24
|
+
/*
|
25
|
+
* Define our typedefs and structures
|
26
|
+
*
|
27
|
+
*/
|
28
|
+
typedef struct _xmlChSRange xmlChSRange;
|
29
|
+
typedef xmlChSRange *xmlChSRangePtr;
|
30
|
+
struct _xmlChSRange {
|
31
|
+
unsigned short low;
|
32
|
+
unsigned short high;
|
33
|
+
};
|
34
|
+
|
35
|
+
typedef struct _xmlChLRange xmlChLRange;
|
36
|
+
typedef xmlChLRange *xmlChLRangePtr;
|
37
|
+
struct _xmlChLRange {
|
38
|
+
unsigned int low;
|
39
|
+
unsigned int high;
|
40
|
+
};
|
41
|
+
|
42
|
+
typedef struct _xmlChRangeGroup xmlChRangeGroup;
|
43
|
+
typedef xmlChRangeGroup *xmlChRangeGroupPtr;
|
44
|
+
struct _xmlChRangeGroup {
|
45
|
+
int nbShortRange;
|
46
|
+
int nbLongRange;
|
47
|
+
const xmlChSRange *shortRange; /* points to an array of ranges */
|
48
|
+
const xmlChLRange *longRange;
|
49
|
+
};
|
50
|
+
|
51
|
+
/**
|
52
|
+
* Range checking routine
|
53
|
+
*/
|
54
|
+
XMLPUBFUN int XMLCALL
|
55
|
+
xmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
|
56
|
+
|
57
|
+
|
58
|
+
/**
|
59
|
+
* xmlIsBaseChar_ch:
|
60
|
+
* @c: char to validate
|
61
|
+
*
|
62
|
+
* Automatically generated by genChRanges.py
|
63
|
+
*/
|
64
|
+
#define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
|
65
|
+
((0x61 <= (c)) && ((c) <= 0x7a)) || \
|
66
|
+
((0xc0 <= (c)) && ((c) <= 0xd6)) || \
|
67
|
+
((0xd8 <= (c)) && ((c) <= 0xf6)) || \
|
68
|
+
(0xf8 <= (c)))
|
69
|
+
|
70
|
+
/**
|
71
|
+
* xmlIsBaseCharQ:
|
72
|
+
* @c: char to validate
|
73
|
+
*
|
74
|
+
* Automatically generated by genChRanges.py
|
75
|
+
*/
|
76
|
+
#define xmlIsBaseCharQ(c) (((c) < 0x100) ? \
|
77
|
+
xmlIsBaseChar_ch((c)) : \
|
78
|
+
xmlCharInRange((c), &xmlIsBaseCharGroup))
|
79
|
+
|
80
|
+
XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup;
|
81
|
+
|
82
|
+
/**
|
83
|
+
* xmlIsBlank_ch:
|
84
|
+
* @c: char to validate
|
85
|
+
*
|
86
|
+
* Automatically generated by genChRanges.py
|
87
|
+
*/
|
88
|
+
#define xmlIsBlank_ch(c) (((c) == 0x20) || \
|
89
|
+
((0x9 <= (c)) && ((c) <= 0xa)) || \
|
90
|
+
((c) == 0xd))
|
91
|
+
|
92
|
+
/**
|
93
|
+
* xmlIsBlankQ:
|
94
|
+
* @c: char to validate
|
95
|
+
*
|
96
|
+
* Automatically generated by genChRanges.py
|
97
|
+
*/
|
98
|
+
#define xmlIsBlankQ(c) (((c) < 0x100) ? \
|
99
|
+
xmlIsBlank_ch((c)) : 0)
|
100
|
+
|
101
|
+
|
102
|
+
/**
|
103
|
+
* xmlIsChar_ch:
|
104
|
+
* @c: char to validate
|
105
|
+
*
|
106
|
+
* Automatically generated by genChRanges.py
|
107
|
+
*/
|
108
|
+
#define xmlIsChar_ch(c) (((0x9 <= (c)) && ((c) <= 0xa)) || \
|
109
|
+
((c) == 0xd) || \
|
110
|
+
(0x20 <= (c)))
|
111
|
+
|
112
|
+
/**
|
113
|
+
* xmlIsCharQ:
|
114
|
+
* @c: char to validate
|
115
|
+
*
|
116
|
+
* Automatically generated by genChRanges.py
|
117
|
+
*/
|
118
|
+
#define xmlIsCharQ(c) (((c) < 0x100) ? \
|
119
|
+
xmlIsChar_ch((c)) :\
|
120
|
+
(((0x100 <= (c)) && ((c) <= 0xd7ff)) || \
|
121
|
+
((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
|
122
|
+
((0x10000 <= (c)) && ((c) <= 0x10ffff))))
|
123
|
+
|
124
|
+
XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup;
|
125
|
+
|
126
|
+
/**
|
127
|
+
* xmlIsCombiningQ:
|
128
|
+
* @c: char to validate
|
129
|
+
*
|
130
|
+
* Automatically generated by genChRanges.py
|
131
|
+
*/
|
132
|
+
#define xmlIsCombiningQ(c) (((c) < 0x100) ? \
|
133
|
+
0 : \
|
134
|
+
xmlCharInRange((c), &xmlIsCombiningGroup))
|
135
|
+
|
136
|
+
XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup;
|
137
|
+
|
138
|
+
/**
|
139
|
+
* xmlIsDigit_ch:
|
140
|
+
* @c: char to validate
|
141
|
+
*
|
142
|
+
* Automatically generated by genChRanges.py
|
143
|
+
*/
|
144
|
+
#define xmlIsDigit_ch(c) (((0x30 <= (c)) && ((c) <= 0x39)))
|
145
|
+
|
146
|
+
/**
|
147
|
+
* xmlIsDigitQ:
|
148
|
+
* @c: char to validate
|
149
|
+
*
|
150
|
+
* Automatically generated by genChRanges.py
|
151
|
+
*/
|
152
|
+
#define xmlIsDigitQ(c) (((c) < 0x100) ? \
|
153
|
+
xmlIsDigit_ch((c)) : \
|
154
|
+
xmlCharInRange((c), &xmlIsDigitGroup))
|
155
|
+
|
156
|
+
XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup;
|
157
|
+
|
158
|
+
/**
|
159
|
+
* xmlIsExtender_ch:
|
160
|
+
* @c: char to validate
|
161
|
+
*
|
162
|
+
* Automatically generated by genChRanges.py
|
163
|
+
*/
|
164
|
+
#define xmlIsExtender_ch(c) (((c) == 0xb7))
|
165
|
+
|
166
|
+
/**
|
167
|
+
* xmlIsExtenderQ:
|
168
|
+
* @c: char to validate
|
169
|
+
*
|
170
|
+
* Automatically generated by genChRanges.py
|
171
|
+
*/
|
172
|
+
#define xmlIsExtenderQ(c) (((c) < 0x100) ? \
|
173
|
+
xmlIsExtender_ch((c)) : \
|
174
|
+
xmlCharInRange((c), &xmlIsExtenderGroup))
|
175
|
+
|
176
|
+
XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup;
|
177
|
+
|
178
|
+
/**
|
179
|
+
* xmlIsIdeographicQ:
|
180
|
+
* @c: char to validate
|
181
|
+
*
|
182
|
+
* Automatically generated by genChRanges.py
|
183
|
+
*/
|
184
|
+
#define xmlIsIdeographicQ(c) (((c) < 0x100) ? \
|
185
|
+
0 :\
|
186
|
+
(((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \
|
187
|
+
((c) == 0x3007) || \
|
188
|
+
((0x3021 <= (c)) && ((c) <= 0x3029))))
|
189
|
+
|
190
|
+
XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup;
|
191
|
+
XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
|
192
|
+
|
193
|
+
/**
|
194
|
+
* xmlIsPubidChar_ch:
|
195
|
+
* @c: char to validate
|
196
|
+
*
|
197
|
+
* Automatically generated by genChRanges.py
|
198
|
+
*/
|
199
|
+
#define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)])
|
200
|
+
|
201
|
+
/**
|
202
|
+
* xmlIsPubidCharQ:
|
203
|
+
* @c: char to validate
|
204
|
+
*
|
205
|
+
* Automatically generated by genChRanges.py
|
206
|
+
*/
|
207
|
+
#define xmlIsPubidCharQ(c) (((c) < 0x100) ? \
|
208
|
+
xmlIsPubidChar_ch((c)) : 0)
|
209
|
+
|
210
|
+
XMLPUBFUN int XMLCALL
|
211
|
+
xmlIsBaseChar(unsigned int ch);
|
212
|
+
XMLPUBFUN int XMLCALL
|
213
|
+
xmlIsBlank(unsigned int ch);
|
214
|
+
XMLPUBFUN int XMLCALL
|
215
|
+
xmlIsChar(unsigned int ch);
|
216
|
+
XMLPUBFUN int XMLCALL
|
217
|
+
xmlIsCombining(unsigned int ch);
|
218
|
+
XMLPUBFUN int XMLCALL
|
219
|
+
xmlIsDigit(unsigned int ch);
|
220
|
+
XMLPUBFUN int XMLCALL
|
221
|
+
xmlIsExtender(unsigned int ch);
|
222
|
+
XMLPUBFUN int XMLCALL
|
223
|
+
xmlIsIdeographic(unsigned int ch);
|
224
|
+
XMLPUBFUN int XMLCALL
|
225
|
+
xmlIsPubidChar(unsigned int ch);
|
226
|
+
|
227
|
+
#ifdef __cplusplus
|
228
|
+
}
|
229
|
+
#endif
|
230
|
+
#endif /* __XML_CHVALID_H__ */
|
@@ -0,0 +1,217 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: Tree debugging APIs
|
3
|
+
* Description: Interfaces to a set of routines used for debugging the tree
|
4
|
+
* produced by the XML parser.
|
5
|
+
*
|
6
|
+
* Copy: See Copyright for the status of this software.
|
7
|
+
*
|
8
|
+
* Author: Daniel Veillard
|
9
|
+
*/
|
10
|
+
|
11
|
+
#ifndef __DEBUG_XML__
|
12
|
+
#define __DEBUG_XML__
|
13
|
+
#include <stdio.h>
|
14
|
+
#include <libxml/xmlversion.h>
|
15
|
+
#include <libxml/tree.h>
|
16
|
+
|
17
|
+
#ifdef LIBXML_DEBUG_ENABLED
|
18
|
+
|
19
|
+
#include <libxml/xpath.h>
|
20
|
+
|
21
|
+
#ifdef __cplusplus
|
22
|
+
extern "C" {
|
23
|
+
#endif
|
24
|
+
|
25
|
+
/*
|
26
|
+
* The standard Dump routines.
|
27
|
+
*/
|
28
|
+
XMLPUBFUN void XMLCALL
|
29
|
+
xmlDebugDumpString (FILE *output,
|
30
|
+
const xmlChar *str);
|
31
|
+
XMLPUBFUN void XMLCALL
|
32
|
+
xmlDebugDumpAttr (FILE *output,
|
33
|
+
xmlAttrPtr attr,
|
34
|
+
int depth);
|
35
|
+
XMLPUBFUN void XMLCALL
|
36
|
+
xmlDebugDumpAttrList (FILE *output,
|
37
|
+
xmlAttrPtr attr,
|
38
|
+
int depth);
|
39
|
+
XMLPUBFUN void XMLCALL
|
40
|
+
xmlDebugDumpOneNode (FILE *output,
|
41
|
+
xmlNodePtr node,
|
42
|
+
int depth);
|
43
|
+
XMLPUBFUN void XMLCALL
|
44
|
+
xmlDebugDumpNode (FILE *output,
|
45
|
+
xmlNodePtr node,
|
46
|
+
int depth);
|
47
|
+
XMLPUBFUN void XMLCALL
|
48
|
+
xmlDebugDumpNodeList (FILE *output,
|
49
|
+
xmlNodePtr node,
|
50
|
+
int depth);
|
51
|
+
XMLPUBFUN void XMLCALL
|
52
|
+
xmlDebugDumpDocumentHead(FILE *output,
|
53
|
+
xmlDocPtr doc);
|
54
|
+
XMLPUBFUN void XMLCALL
|
55
|
+
xmlDebugDumpDocument (FILE *output,
|
56
|
+
xmlDocPtr doc);
|
57
|
+
XMLPUBFUN void XMLCALL
|
58
|
+
xmlDebugDumpDTD (FILE *output,
|
59
|
+
xmlDtdPtr dtd);
|
60
|
+
XMLPUBFUN void XMLCALL
|
61
|
+
xmlDebugDumpEntities (FILE *output,
|
62
|
+
xmlDocPtr doc);
|
63
|
+
|
64
|
+
/****************************************************************
|
65
|
+
* *
|
66
|
+
* Checking routines *
|
67
|
+
* *
|
68
|
+
****************************************************************/
|
69
|
+
|
70
|
+
XMLPUBFUN int XMLCALL
|
71
|
+
xmlDebugCheckDocument (FILE * output,
|
72
|
+
xmlDocPtr doc);
|
73
|
+
|
74
|
+
/****************************************************************
|
75
|
+
* *
|
76
|
+
* XML shell helpers *
|
77
|
+
* *
|
78
|
+
****************************************************************/
|
79
|
+
|
80
|
+
XMLPUBFUN void XMLCALL
|
81
|
+
xmlLsOneNode (FILE *output, xmlNodePtr node);
|
82
|
+
XMLPUBFUN int XMLCALL
|
83
|
+
xmlLsCountNode (xmlNodePtr node);
|
84
|
+
|
85
|
+
XMLPUBFUN const char * XMLCALL
|
86
|
+
xmlBoolToText (int boolval);
|
87
|
+
|
88
|
+
/****************************************************************
|
89
|
+
* *
|
90
|
+
* The XML shell related structures and functions *
|
91
|
+
* *
|
92
|
+
****************************************************************/
|
93
|
+
|
94
|
+
#ifdef LIBXML_XPATH_ENABLED
|
95
|
+
/**
|
96
|
+
* xmlShellReadlineFunc:
|
97
|
+
* @prompt: a string prompt
|
98
|
+
*
|
99
|
+
* This is a generic signature for the XML shell input function.
|
100
|
+
*
|
101
|
+
* Returns a string which will be freed by the Shell.
|
102
|
+
*/
|
103
|
+
typedef char * (* xmlShellReadlineFunc)(char *prompt);
|
104
|
+
|
105
|
+
/**
|
106
|
+
* xmlShellCtxt:
|
107
|
+
*
|
108
|
+
* A debugging shell context.
|
109
|
+
* TODO: add the defined function tables.
|
110
|
+
*/
|
111
|
+
typedef struct _xmlShellCtxt xmlShellCtxt;
|
112
|
+
typedef xmlShellCtxt *xmlShellCtxtPtr;
|
113
|
+
struct _xmlShellCtxt {
|
114
|
+
char *filename;
|
115
|
+
xmlDocPtr doc;
|
116
|
+
xmlNodePtr node;
|
117
|
+
xmlXPathContextPtr pctxt;
|
118
|
+
int loaded;
|
119
|
+
FILE *output;
|
120
|
+
xmlShellReadlineFunc input;
|
121
|
+
};
|
122
|
+
|
123
|
+
/**
|
124
|
+
* xmlShellCmd:
|
125
|
+
* @ctxt: a shell context
|
126
|
+
* @arg: a string argument
|
127
|
+
* @node: a first node
|
128
|
+
* @node2: a second node
|
129
|
+
*
|
130
|
+
* This is a generic signature for the XML shell functions.
|
131
|
+
*
|
132
|
+
* Returns an int, negative returns indicating errors.
|
133
|
+
*/
|
134
|
+
typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
|
135
|
+
char *arg,
|
136
|
+
xmlNodePtr node,
|
137
|
+
xmlNodePtr node2);
|
138
|
+
|
139
|
+
XMLPUBFUN void XMLCALL
|
140
|
+
xmlShellPrintXPathError (int errorType,
|
141
|
+
const char *arg);
|
142
|
+
XMLPUBFUN void XMLCALL
|
143
|
+
xmlShellPrintXPathResult(xmlXPathObjectPtr list);
|
144
|
+
XMLPUBFUN int XMLCALL
|
145
|
+
xmlShellList (xmlShellCtxtPtr ctxt,
|
146
|
+
char *arg,
|
147
|
+
xmlNodePtr node,
|
148
|
+
xmlNodePtr node2);
|
149
|
+
XMLPUBFUN int XMLCALL
|
150
|
+
xmlShellBase (xmlShellCtxtPtr ctxt,
|
151
|
+
char *arg,
|
152
|
+
xmlNodePtr node,
|
153
|
+
xmlNodePtr node2);
|
154
|
+
XMLPUBFUN int XMLCALL
|
155
|
+
xmlShellDir (xmlShellCtxtPtr ctxt,
|
156
|
+
char *arg,
|
157
|
+
xmlNodePtr node,
|
158
|
+
xmlNodePtr node2);
|
159
|
+
XMLPUBFUN int XMLCALL
|
160
|
+
xmlShellLoad (xmlShellCtxtPtr ctxt,
|
161
|
+
char *filename,
|
162
|
+
xmlNodePtr node,
|
163
|
+
xmlNodePtr node2);
|
164
|
+
#ifdef LIBXML_OUTPUT_ENABLED
|
165
|
+
XMLPUBFUN void XMLCALL
|
166
|
+
xmlShellPrintNode (xmlNodePtr node);
|
167
|
+
XMLPUBFUN int XMLCALL
|
168
|
+
xmlShellCat (xmlShellCtxtPtr ctxt,
|
169
|
+
char *arg,
|
170
|
+
xmlNodePtr node,
|
171
|
+
xmlNodePtr node2);
|
172
|
+
XMLPUBFUN int XMLCALL
|
173
|
+
xmlShellWrite (xmlShellCtxtPtr ctxt,
|
174
|
+
char *filename,
|
175
|
+
xmlNodePtr node,
|
176
|
+
xmlNodePtr node2);
|
177
|
+
XMLPUBFUN int XMLCALL
|
178
|
+
xmlShellSave (xmlShellCtxtPtr ctxt,
|
179
|
+
char *filename,
|
180
|
+
xmlNodePtr node,
|
181
|
+
xmlNodePtr node2);
|
182
|
+
#endif /* LIBXML_OUTPUT_ENABLED */
|
183
|
+
#ifdef LIBXML_VALID_ENABLED
|
184
|
+
XMLPUBFUN int XMLCALL
|
185
|
+
xmlShellValidate (xmlShellCtxtPtr ctxt,
|
186
|
+
char *dtd,
|
187
|
+
xmlNodePtr node,
|
188
|
+
xmlNodePtr node2);
|
189
|
+
#endif /* LIBXML_VALID_ENABLED */
|
190
|
+
XMLPUBFUN int XMLCALL
|
191
|
+
xmlShellDu (xmlShellCtxtPtr ctxt,
|
192
|
+
char *arg,
|
193
|
+
xmlNodePtr tree,
|
194
|
+
xmlNodePtr node2);
|
195
|
+
XMLPUBFUN int XMLCALL
|
196
|
+
xmlShellPwd (xmlShellCtxtPtr ctxt,
|
197
|
+
char *buffer,
|
198
|
+
xmlNodePtr node,
|
199
|
+
xmlNodePtr node2);
|
200
|
+
|
201
|
+
/*
|
202
|
+
* The Shell interface.
|
203
|
+
*/
|
204
|
+
XMLPUBFUN void XMLCALL
|
205
|
+
xmlShell (xmlDocPtr doc,
|
206
|
+
char *filename,
|
207
|
+
xmlShellReadlineFunc input,
|
208
|
+
FILE *output);
|
209
|
+
|
210
|
+
#endif /* LIBXML_XPATH_ENABLED */
|
211
|
+
|
212
|
+
#ifdef __cplusplus
|
213
|
+
}
|
214
|
+
#endif
|
215
|
+
|
216
|
+
#endif /* LIBXML_DEBUG_ENABLED */
|
217
|
+
#endif /* __DEBUG_XML__ */
|
@@ -0,0 +1,79 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: string dictionary
|
3
|
+
* Description: dictionary of reusable strings, just used to avoid allocation
|
4
|
+
* and freeing operations.
|
5
|
+
*
|
6
|
+
* Copy: See Copyright for the status of this software.
|
7
|
+
*
|
8
|
+
* Author: Daniel Veillard
|
9
|
+
*/
|
10
|
+
|
11
|
+
#ifndef __XML_DICT_H__
|
12
|
+
#define __XML_DICT_H__
|
13
|
+
|
14
|
+
#include <stddef.h>
|
15
|
+
#include <libxml/xmlversion.h>
|
16
|
+
|
17
|
+
#ifdef __cplusplus
|
18
|
+
extern "C" {
|
19
|
+
#endif
|
20
|
+
|
21
|
+
/*
|
22
|
+
* The dictionary.
|
23
|
+
*/
|
24
|
+
typedef struct _xmlDict xmlDict;
|
25
|
+
typedef xmlDict *xmlDictPtr;
|
26
|
+
|
27
|
+
/*
|
28
|
+
* Initializer
|
29
|
+
*/
|
30
|
+
XMLPUBFUN int XMLCALL xmlInitializeDict(void);
|
31
|
+
|
32
|
+
/*
|
33
|
+
* Constructor and destructor.
|
34
|
+
*/
|
35
|
+
XMLPUBFUN xmlDictPtr XMLCALL
|
36
|
+
xmlDictCreate (void);
|
37
|
+
XMLPUBFUN size_t XMLCALL
|
38
|
+
xmlDictSetLimit (xmlDictPtr dict,
|
39
|
+
size_t limit);
|
40
|
+
XMLPUBFUN size_t XMLCALL
|
41
|
+
xmlDictGetUsage (xmlDictPtr dict);
|
42
|
+
XMLPUBFUN xmlDictPtr XMLCALL
|
43
|
+
xmlDictCreateSub(xmlDictPtr sub);
|
44
|
+
XMLPUBFUN int XMLCALL
|
45
|
+
xmlDictReference(xmlDictPtr dict);
|
46
|
+
XMLPUBFUN void XMLCALL
|
47
|
+
xmlDictFree (xmlDictPtr dict);
|
48
|
+
|
49
|
+
/*
|
50
|
+
* Lookup of entry in the dictionary.
|
51
|
+
*/
|
52
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
53
|
+
xmlDictLookup (xmlDictPtr dict,
|
54
|
+
const xmlChar *name,
|
55
|
+
int len);
|
56
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
57
|
+
xmlDictExists (xmlDictPtr dict,
|
58
|
+
const xmlChar *name,
|
59
|
+
int len);
|
60
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
61
|
+
xmlDictQLookup (xmlDictPtr dict,
|
62
|
+
const xmlChar *prefix,
|
63
|
+
const xmlChar *name);
|
64
|
+
XMLPUBFUN int XMLCALL
|
65
|
+
xmlDictOwns (xmlDictPtr dict,
|
66
|
+
const xmlChar *str);
|
67
|
+
XMLPUBFUN int XMLCALL
|
68
|
+
xmlDictSize (xmlDictPtr dict);
|
69
|
+
|
70
|
+
/*
|
71
|
+
* Cleanup function
|
72
|
+
*/
|
73
|
+
XMLPUBFUN void XMLCALL
|
74
|
+
xmlDictCleanup (void);
|
75
|
+
|
76
|
+
#ifdef __cplusplus
|
77
|
+
}
|
78
|
+
#endif
|
79
|
+
#endif /* ! __XML_DICT_H__ */
|