lxml 6.0.0__cp310-cp310-win_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. lxml/ElementInclude.py +244 -0
  2. lxml/__init__.py +22 -0
  3. lxml/_elementpath.cp310-win_arm64.pyd +0 -0
  4. lxml/_elementpath.py +343 -0
  5. lxml/apihelpers.pxi +1801 -0
  6. lxml/builder.cp310-win_arm64.pyd +0 -0
  7. lxml/builder.py +243 -0
  8. lxml/classlookup.pxi +580 -0
  9. lxml/cleanup.pxi +215 -0
  10. lxml/cssselect.py +101 -0
  11. lxml/debug.pxi +36 -0
  12. lxml/docloader.pxi +178 -0
  13. lxml/doctestcompare.py +488 -0
  14. lxml/dtd.pxi +479 -0
  15. lxml/etree.cp310-win_arm64.pyd +0 -0
  16. lxml/etree.h +244 -0
  17. lxml/etree.pyx +3853 -0
  18. lxml/etree_api.h +204 -0
  19. lxml/extensions.pxi +830 -0
  20. lxml/html/ElementSoup.py +10 -0
  21. lxml/html/__init__.py +1927 -0
  22. lxml/html/_diffcommand.py +86 -0
  23. lxml/html/_difflib.cp310-win_arm64.pyd +0 -0
  24. lxml/html/_difflib.py +2106 -0
  25. lxml/html/_html5builder.py +100 -0
  26. lxml/html/_setmixin.py +56 -0
  27. lxml/html/builder.py +173 -0
  28. lxml/html/clean.py +21 -0
  29. lxml/html/defs.py +135 -0
  30. lxml/html/diff.cp310-win_arm64.pyd +0 -0
  31. lxml/html/diff.py +972 -0
  32. lxml/html/formfill.py +299 -0
  33. lxml/html/html5parser.py +260 -0
  34. lxml/html/soupparser.py +314 -0
  35. lxml/html/usedoctest.py +13 -0
  36. lxml/includes/__init__.pxd +0 -0
  37. lxml/includes/__init__.py +0 -0
  38. lxml/includes/c14n.pxd +25 -0
  39. lxml/includes/config.pxd +3 -0
  40. lxml/includes/dtdvalid.pxd +18 -0
  41. lxml/includes/etree_defs.h +379 -0
  42. lxml/includes/etreepublic.pxd +237 -0
  43. lxml/includes/extlibs/__init__.py +0 -0
  44. lxml/includes/extlibs/zconf.h +543 -0
  45. lxml/includes/extlibs/zlib.h +1938 -0
  46. lxml/includes/htmlparser.pxd +56 -0
  47. lxml/includes/libexslt/__init__.py +0 -0
  48. lxml/includes/libexslt/exslt.h +108 -0
  49. lxml/includes/libexslt/exsltconfig.h +70 -0
  50. lxml/includes/libexslt/exsltexports.h +63 -0
  51. lxml/includes/libexslt/libexslt.h +29 -0
  52. lxml/includes/libxml/HTMLparser.h +320 -0
  53. lxml/includes/libxml/HTMLtree.h +147 -0
  54. lxml/includes/libxml/SAX.h +204 -0
  55. lxml/includes/libxml/SAX2.h +173 -0
  56. lxml/includes/libxml/__init__.py +0 -0
  57. lxml/includes/libxml/c14n.h +128 -0
  58. lxml/includes/libxml/catalog.h +182 -0
  59. lxml/includes/libxml/chvalid.h +230 -0
  60. lxml/includes/libxml/debugXML.h +217 -0
  61. lxml/includes/libxml/dict.h +81 -0
  62. lxml/includes/libxml/encoding.h +233 -0
  63. lxml/includes/libxml/entities.h +151 -0
  64. lxml/includes/libxml/globals.h +529 -0
  65. lxml/includes/libxml/hash.h +236 -0
  66. lxml/includes/libxml/list.h +137 -0
  67. lxml/includes/libxml/nanoftp.h +186 -0
  68. lxml/includes/libxml/nanohttp.h +81 -0
  69. lxml/includes/libxml/parser.h +1265 -0
  70. lxml/includes/libxml/parserInternals.h +662 -0
  71. lxml/includes/libxml/pattern.h +100 -0
  72. lxml/includes/libxml/relaxng.h +218 -0
  73. lxml/includes/libxml/schemasInternals.h +958 -0
  74. lxml/includes/libxml/schematron.h +142 -0
  75. lxml/includes/libxml/threads.h +94 -0
  76. lxml/includes/libxml/tree.h +1314 -0
  77. lxml/includes/libxml/uri.h +94 -0
  78. lxml/includes/libxml/valid.h +448 -0
  79. lxml/includes/libxml/xinclude.h +129 -0
  80. lxml/includes/libxml/xlink.h +189 -0
  81. lxml/includes/libxml/xmlIO.h +369 -0
  82. lxml/includes/libxml/xmlautomata.h +146 -0
  83. lxml/includes/libxml/xmlerror.h +919 -0
  84. lxml/includes/libxml/xmlexports.h +50 -0
  85. lxml/includes/libxml/xmlmemory.h +228 -0
  86. lxml/includes/libxml/xmlmodule.h +57 -0
  87. lxml/includes/libxml/xmlreader.h +428 -0
  88. lxml/includes/libxml/xmlregexp.h +222 -0
  89. lxml/includes/libxml/xmlsave.h +88 -0
  90. lxml/includes/libxml/xmlschemas.h +246 -0
  91. lxml/includes/libxml/xmlschemastypes.h +152 -0
  92. lxml/includes/libxml/xmlstring.h +140 -0
  93. lxml/includes/libxml/xmlunicode.h +202 -0
  94. lxml/includes/libxml/xmlversion.h +526 -0
  95. lxml/includes/libxml/xmlwriter.h +488 -0
  96. lxml/includes/libxml/xpath.h +575 -0
  97. lxml/includes/libxml/xpathInternals.h +632 -0
  98. lxml/includes/libxml/xpointer.h +137 -0
  99. lxml/includes/libxslt/__init__.py +0 -0
  100. lxml/includes/libxslt/attributes.h +39 -0
  101. lxml/includes/libxslt/documents.h +93 -0
  102. lxml/includes/libxslt/extensions.h +262 -0
  103. lxml/includes/libxslt/extra.h +72 -0
  104. lxml/includes/libxslt/functions.h +78 -0
  105. lxml/includes/libxslt/imports.h +75 -0
  106. lxml/includes/libxslt/keys.h +53 -0
  107. lxml/includes/libxslt/libxslt.h +36 -0
  108. lxml/includes/libxslt/namespaces.h +68 -0
  109. lxml/includes/libxslt/numbersInternals.h +73 -0
  110. lxml/includes/libxslt/preproc.h +43 -0
  111. lxml/includes/libxslt/security.h +104 -0
  112. lxml/includes/libxslt/templates.h +77 -0
  113. lxml/includes/libxslt/transform.h +207 -0
  114. lxml/includes/libxslt/trio.h +216 -0
  115. lxml/includes/libxslt/triodef.h +220 -0
  116. lxml/includes/libxslt/variables.h +118 -0
  117. lxml/includes/libxslt/win32config.h +51 -0
  118. lxml/includes/libxslt/xslt.h +110 -0
  119. lxml/includes/libxslt/xsltInternals.h +1992 -0
  120. lxml/includes/libxslt/xsltconfig.h +179 -0
  121. lxml/includes/libxslt/xsltexports.h +64 -0
  122. lxml/includes/libxslt/xsltlocale.h +44 -0
  123. lxml/includes/libxslt/xsltutils.h +343 -0
  124. lxml/includes/lxml-version.h +3 -0
  125. lxml/includes/relaxng.pxd +64 -0
  126. lxml/includes/schematron.pxd +34 -0
  127. lxml/includes/tree.pxd +492 -0
  128. lxml/includes/uri.pxd +5 -0
  129. lxml/includes/xinclude.pxd +22 -0
  130. lxml/includes/xmlerror.pxd +852 -0
  131. lxml/includes/xmlparser.pxd +303 -0
  132. lxml/includes/xmlschema.pxd +35 -0
  133. lxml/includes/xpath.pxd +136 -0
  134. lxml/includes/xslt.pxd +190 -0
  135. lxml/isoschematron/__init__.py +348 -0
  136. lxml/isoschematron/resources/rng/iso-schematron.rng +709 -0
  137. lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl +75 -0
  138. lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl +77 -0
  139. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl +313 -0
  140. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl +1160 -0
  141. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl +55 -0
  142. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl +1796 -0
  143. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl +588 -0
  144. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt +84 -0
  145. lxml/iterparse.pxi +438 -0
  146. lxml/lxml.etree.h +244 -0
  147. lxml/lxml.etree_api.h +204 -0
  148. lxml/nsclasses.pxi +281 -0
  149. lxml/objectify.cp310-win_arm64.pyd +0 -0
  150. lxml/objectify.pyx +2149 -0
  151. lxml/objectpath.pxi +332 -0
  152. lxml/parser.pxi +2059 -0
  153. lxml/parsertarget.pxi +180 -0
  154. lxml/proxy.pxi +619 -0
  155. lxml/public-api.pxi +178 -0
  156. lxml/pyclasslookup.py +3 -0
  157. lxml/readonlytree.pxi +565 -0
  158. lxml/relaxng.pxi +165 -0
  159. lxml/sax.cp310-win_arm64.pyd +0 -0
  160. lxml/sax.py +286 -0
  161. lxml/saxparser.pxi +875 -0
  162. lxml/schematron.pxi +173 -0
  163. lxml/serializer.pxi +1849 -0
  164. lxml/usedoctest.py +13 -0
  165. lxml/xinclude.pxi +67 -0
  166. lxml/xmlerror.pxi +1654 -0
  167. lxml/xmlid.pxi +179 -0
  168. lxml/xmlschema.pxi +215 -0
  169. lxml/xpath.pxi +487 -0
  170. lxml/xslt.pxi +957 -0
  171. lxml/xsltext.pxi +242 -0
  172. lxml-6.0.0.dist-info/METADATA +163 -0
  173. lxml-6.0.0.dist-info/RECORD +177 -0
  174. lxml-6.0.0.dist-info/WHEEL +5 -0
  175. lxml-6.0.0.dist-info/licenses/LICENSE.txt +31 -0
  176. lxml-6.0.0.dist-info/licenses/LICENSES.txt +29 -0
  177. lxml-6.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,428 @@
1
+ /*
2
+ * Summary: the XMLReader implementation
3
+ * Description: API of the XML streaming API based on C# interfaces.
4
+ *
5
+ * Copy: See Copyright for the status of this software.
6
+ *
7
+ * Author: Daniel Veillard
8
+ */
9
+
10
+ #ifndef __XML_XMLREADER_H__
11
+ #define __XML_XMLREADER_H__
12
+
13
+ #include <libxml/xmlversion.h>
14
+ #include <libxml/tree.h>
15
+ #include <libxml/xmlIO.h>
16
+ #ifdef LIBXML_SCHEMAS_ENABLED
17
+ #include <libxml/relaxng.h>
18
+ #include <libxml/xmlschemas.h>
19
+ #endif
20
+
21
+ #ifdef __cplusplus
22
+ extern "C" {
23
+ #endif
24
+
25
+ /**
26
+ * xmlParserSeverities:
27
+ *
28
+ * How severe an error callback is when the per-reader error callback API
29
+ * is used.
30
+ */
31
+ typedef enum {
32
+ XML_PARSER_SEVERITY_VALIDITY_WARNING = 1,
33
+ XML_PARSER_SEVERITY_VALIDITY_ERROR = 2,
34
+ XML_PARSER_SEVERITY_WARNING = 3,
35
+ XML_PARSER_SEVERITY_ERROR = 4
36
+ } xmlParserSeverities;
37
+
38
+ #ifdef LIBXML_READER_ENABLED
39
+
40
+ /**
41
+ * xmlTextReaderMode:
42
+ *
43
+ * Internal state values for the reader.
44
+ */
45
+ typedef enum {
46
+ XML_TEXTREADER_MODE_INITIAL = 0,
47
+ XML_TEXTREADER_MODE_INTERACTIVE = 1,
48
+ XML_TEXTREADER_MODE_ERROR = 2,
49
+ XML_TEXTREADER_MODE_EOF =3,
50
+ XML_TEXTREADER_MODE_CLOSED = 4,
51
+ XML_TEXTREADER_MODE_READING = 5
52
+ } xmlTextReaderMode;
53
+
54
+ /**
55
+ * xmlParserProperties:
56
+ *
57
+ * Some common options to use with xmlTextReaderSetParserProp, but it
58
+ * is better to use xmlParserOption and the xmlReaderNewxxx and
59
+ * xmlReaderForxxx APIs now.
60
+ */
61
+ typedef enum {
62
+ XML_PARSER_LOADDTD = 1,
63
+ XML_PARSER_DEFAULTATTRS = 2,
64
+ XML_PARSER_VALIDATE = 3,
65
+ XML_PARSER_SUBST_ENTITIES = 4
66
+ } xmlParserProperties;
67
+
68
+ /**
69
+ * xmlReaderTypes:
70
+ *
71
+ * Predefined constants for the different types of nodes.
72
+ */
73
+ typedef enum {
74
+ XML_READER_TYPE_NONE = 0,
75
+ XML_READER_TYPE_ELEMENT = 1,
76
+ XML_READER_TYPE_ATTRIBUTE = 2,
77
+ XML_READER_TYPE_TEXT = 3,
78
+ XML_READER_TYPE_CDATA = 4,
79
+ XML_READER_TYPE_ENTITY_REFERENCE = 5,
80
+ XML_READER_TYPE_ENTITY = 6,
81
+ XML_READER_TYPE_PROCESSING_INSTRUCTION = 7,
82
+ XML_READER_TYPE_COMMENT = 8,
83
+ XML_READER_TYPE_DOCUMENT = 9,
84
+ XML_READER_TYPE_DOCUMENT_TYPE = 10,
85
+ XML_READER_TYPE_DOCUMENT_FRAGMENT = 11,
86
+ XML_READER_TYPE_NOTATION = 12,
87
+ XML_READER_TYPE_WHITESPACE = 13,
88
+ XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14,
89
+ XML_READER_TYPE_END_ELEMENT = 15,
90
+ XML_READER_TYPE_END_ENTITY = 16,
91
+ XML_READER_TYPE_XML_DECLARATION = 17
92
+ } xmlReaderTypes;
93
+
94
+ /**
95
+ * xmlTextReader:
96
+ *
97
+ * Structure for an xmlReader context.
98
+ */
99
+ typedef struct _xmlTextReader xmlTextReader;
100
+
101
+ /**
102
+ * xmlTextReaderPtr:
103
+ *
104
+ * Pointer to an xmlReader context.
105
+ */
106
+ typedef xmlTextReader *xmlTextReaderPtr;
107
+
108
+ /*
109
+ * Constructors & Destructor
110
+ */
111
+ XMLPUBFUN xmlTextReaderPtr
112
+ xmlNewTextReader (xmlParserInputBufferPtr input,
113
+ const char *URI);
114
+ XMLPUBFUN xmlTextReaderPtr
115
+ xmlNewTextReaderFilename(const char *URI);
116
+
117
+ XMLPUBFUN void
118
+ xmlFreeTextReader (xmlTextReaderPtr reader);
119
+
120
+ XMLPUBFUN int
121
+ xmlTextReaderSetup(xmlTextReaderPtr reader,
122
+ xmlParserInputBufferPtr input, const char *URL,
123
+ const char *encoding, int options);
124
+
125
+ /*
126
+ * Iterators
127
+ */
128
+ XMLPUBFUN int
129
+ xmlTextReaderRead (xmlTextReaderPtr reader);
130
+
131
+ #ifdef LIBXML_WRITER_ENABLED
132
+ XMLPUBFUN xmlChar *
133
+ xmlTextReaderReadInnerXml(xmlTextReaderPtr reader);
134
+
135
+ XMLPUBFUN xmlChar *
136
+ xmlTextReaderReadOuterXml(xmlTextReaderPtr reader);
137
+ #endif
138
+
139
+ XMLPUBFUN xmlChar *
140
+ xmlTextReaderReadString (xmlTextReaderPtr reader);
141
+ XMLPUBFUN int
142
+ xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader);
143
+
144
+ /*
145
+ * Attributes of the node
146
+ */
147
+ XMLPUBFUN int
148
+ xmlTextReaderAttributeCount(xmlTextReaderPtr reader);
149
+ XMLPUBFUN int
150
+ xmlTextReaderDepth (xmlTextReaderPtr reader);
151
+ XMLPUBFUN int
152
+ xmlTextReaderHasAttributes(xmlTextReaderPtr reader);
153
+ XMLPUBFUN int
154
+ xmlTextReaderHasValue(xmlTextReaderPtr reader);
155
+ XMLPUBFUN int
156
+ xmlTextReaderIsDefault (xmlTextReaderPtr reader);
157
+ XMLPUBFUN int
158
+ xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader);
159
+ XMLPUBFUN int
160
+ xmlTextReaderNodeType (xmlTextReaderPtr reader);
161
+ XMLPUBFUN int
162
+ xmlTextReaderQuoteChar (xmlTextReaderPtr reader);
163
+ XMLPUBFUN int
164
+ xmlTextReaderReadState (xmlTextReaderPtr reader);
165
+ XMLPUBFUN int
166
+ xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader);
167
+
168
+ XMLPUBFUN const xmlChar *
169
+ xmlTextReaderConstBaseUri (xmlTextReaderPtr reader);
170
+ XMLPUBFUN const xmlChar *
171
+ xmlTextReaderConstLocalName (xmlTextReaderPtr reader);
172
+ XMLPUBFUN const xmlChar *
173
+ xmlTextReaderConstName (xmlTextReaderPtr reader);
174
+ XMLPUBFUN const xmlChar *
175
+ xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader);
176
+ XMLPUBFUN const xmlChar *
177
+ xmlTextReaderConstPrefix (xmlTextReaderPtr reader);
178
+ XMLPUBFUN const xmlChar *
179
+ xmlTextReaderConstXmlLang (xmlTextReaderPtr reader);
180
+ XMLPUBFUN const xmlChar *
181
+ xmlTextReaderConstString (xmlTextReaderPtr reader,
182
+ const xmlChar *str);
183
+ XMLPUBFUN const xmlChar *
184
+ xmlTextReaderConstValue (xmlTextReaderPtr reader);
185
+
186
+ /*
187
+ * use the Const version of the routine for
188
+ * better performance and simpler code
189
+ */
190
+ XMLPUBFUN xmlChar *
191
+ xmlTextReaderBaseUri (xmlTextReaderPtr reader);
192
+ XMLPUBFUN xmlChar *
193
+ xmlTextReaderLocalName (xmlTextReaderPtr reader);
194
+ XMLPUBFUN xmlChar *
195
+ xmlTextReaderName (xmlTextReaderPtr reader);
196
+ XMLPUBFUN xmlChar *
197
+ xmlTextReaderNamespaceUri(xmlTextReaderPtr reader);
198
+ XMLPUBFUN xmlChar *
199
+ xmlTextReaderPrefix (xmlTextReaderPtr reader);
200
+ XMLPUBFUN xmlChar *
201
+ xmlTextReaderXmlLang (xmlTextReaderPtr reader);
202
+ XMLPUBFUN xmlChar *
203
+ xmlTextReaderValue (xmlTextReaderPtr reader);
204
+
205
+ /*
206
+ * Methods of the XmlTextReader
207
+ */
208
+ XMLPUBFUN int
209
+ xmlTextReaderClose (xmlTextReaderPtr reader);
210
+ XMLPUBFUN xmlChar *
211
+ xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader,
212
+ int no);
213
+ XMLPUBFUN xmlChar *
214
+ xmlTextReaderGetAttribute (xmlTextReaderPtr reader,
215
+ const xmlChar *name);
216
+ XMLPUBFUN xmlChar *
217
+ xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader,
218
+ const xmlChar *localName,
219
+ const xmlChar *namespaceURI);
220
+ XMLPUBFUN xmlParserInputBufferPtr
221
+ xmlTextReaderGetRemainder (xmlTextReaderPtr reader);
222
+ XMLPUBFUN xmlChar *
223
+ xmlTextReaderLookupNamespace(xmlTextReaderPtr reader,
224
+ const xmlChar *prefix);
225
+ XMLPUBFUN int
226
+ xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader,
227
+ int no);
228
+ XMLPUBFUN int
229
+ xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader,
230
+ const xmlChar *name);
231
+ XMLPUBFUN int
232
+ xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,
233
+ const xmlChar *localName,
234
+ const xmlChar *namespaceURI);
235
+ XMLPUBFUN int
236
+ xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader);
237
+ XMLPUBFUN int
238
+ xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader);
239
+ XMLPUBFUN int
240
+ xmlTextReaderMoveToElement (xmlTextReaderPtr reader);
241
+ XMLPUBFUN int
242
+ xmlTextReaderNormalization (xmlTextReaderPtr reader);
243
+ XMLPUBFUN const xmlChar *
244
+ xmlTextReaderConstEncoding (xmlTextReaderPtr reader);
245
+
246
+ /*
247
+ * Extensions
248
+ */
249
+ XMLPUBFUN int
250
+ xmlTextReaderSetParserProp (xmlTextReaderPtr reader,
251
+ int prop,
252
+ int value);
253
+ XMLPUBFUN int
254
+ xmlTextReaderGetParserProp (xmlTextReaderPtr reader,
255
+ int prop);
256
+ XMLPUBFUN xmlNodePtr
257
+ xmlTextReaderCurrentNode (xmlTextReaderPtr reader);
258
+
259
+ XMLPUBFUN int
260
+ xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
261
+
262
+ XMLPUBFUN int
263
+ xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
264
+
265
+ XMLPUBFUN xmlNodePtr
266
+ xmlTextReaderPreserve (xmlTextReaderPtr reader);
267
+ #ifdef LIBXML_PATTERN_ENABLED
268
+ XMLPUBFUN int
269
+ xmlTextReaderPreservePattern(xmlTextReaderPtr reader,
270
+ const xmlChar *pattern,
271
+ const xmlChar **namespaces);
272
+ #endif /* LIBXML_PATTERN_ENABLED */
273
+ XMLPUBFUN xmlDocPtr
274
+ xmlTextReaderCurrentDoc (xmlTextReaderPtr reader);
275
+ XMLPUBFUN xmlNodePtr
276
+ xmlTextReaderExpand (xmlTextReaderPtr reader);
277
+ XMLPUBFUN int
278
+ xmlTextReaderNext (xmlTextReaderPtr reader);
279
+ XMLPUBFUN int
280
+ xmlTextReaderNextSibling (xmlTextReaderPtr reader);
281
+ XMLPUBFUN int
282
+ xmlTextReaderIsValid (xmlTextReaderPtr reader);
283
+ #ifdef LIBXML_SCHEMAS_ENABLED
284
+ XMLPUBFUN int
285
+ xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
286
+ const char *rng);
287
+ XMLPUBFUN int
288
+ xmlTextReaderRelaxNGValidateCtxt(xmlTextReaderPtr reader,
289
+ xmlRelaxNGValidCtxtPtr ctxt,
290
+ int options);
291
+
292
+ XMLPUBFUN int
293
+ xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
294
+ xmlRelaxNGPtr schema);
295
+ XMLPUBFUN int
296
+ xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
297
+ const char *xsd);
298
+ XMLPUBFUN int
299
+ xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
300
+ xmlSchemaValidCtxtPtr ctxt,
301
+ int options);
302
+ XMLPUBFUN int
303
+ xmlTextReaderSetSchema (xmlTextReaderPtr reader,
304
+ xmlSchemaPtr schema);
305
+ #endif
306
+ XMLPUBFUN const xmlChar *
307
+ xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
308
+ XMLPUBFUN int
309
+ xmlTextReaderStandalone (xmlTextReaderPtr reader);
310
+
311
+
312
+ /*
313
+ * Index lookup
314
+ */
315
+ XMLPUBFUN long
316
+ xmlTextReaderByteConsumed (xmlTextReaderPtr reader);
317
+
318
+ /*
319
+ * New more complete APIs for simpler creation and reuse of readers
320
+ */
321
+ XMLPUBFUN xmlTextReaderPtr
322
+ xmlReaderWalker (xmlDocPtr doc);
323
+ XMLPUBFUN xmlTextReaderPtr
324
+ xmlReaderForDoc (const xmlChar * cur,
325
+ const char *URL,
326
+ const char *encoding,
327
+ int options);
328
+ XMLPUBFUN xmlTextReaderPtr
329
+ xmlReaderForFile (const char *filename,
330
+ const char *encoding,
331
+ int options);
332
+ XMLPUBFUN xmlTextReaderPtr
333
+ xmlReaderForMemory (const char *buffer,
334
+ int size,
335
+ const char *URL,
336
+ const char *encoding,
337
+ int options);
338
+ XMLPUBFUN xmlTextReaderPtr
339
+ xmlReaderForFd (int fd,
340
+ const char *URL,
341
+ const char *encoding,
342
+ int options);
343
+ XMLPUBFUN xmlTextReaderPtr
344
+ xmlReaderForIO (xmlInputReadCallback ioread,
345
+ xmlInputCloseCallback ioclose,
346
+ void *ioctx,
347
+ const char *URL,
348
+ const char *encoding,
349
+ int options);
350
+
351
+ XMLPUBFUN int
352
+ xmlReaderNewWalker (xmlTextReaderPtr reader,
353
+ xmlDocPtr doc);
354
+ XMLPUBFUN int
355
+ xmlReaderNewDoc (xmlTextReaderPtr reader,
356
+ const xmlChar * cur,
357
+ const char *URL,
358
+ const char *encoding,
359
+ int options);
360
+ XMLPUBFUN int
361
+ xmlReaderNewFile (xmlTextReaderPtr reader,
362
+ const char *filename,
363
+ const char *encoding,
364
+ int options);
365
+ XMLPUBFUN int
366
+ xmlReaderNewMemory (xmlTextReaderPtr reader,
367
+ const char *buffer,
368
+ int size,
369
+ const char *URL,
370
+ const char *encoding,
371
+ int options);
372
+ XMLPUBFUN int
373
+ xmlReaderNewFd (xmlTextReaderPtr reader,
374
+ int fd,
375
+ const char *URL,
376
+ const char *encoding,
377
+ int options);
378
+ XMLPUBFUN int
379
+ xmlReaderNewIO (xmlTextReaderPtr reader,
380
+ xmlInputReadCallback ioread,
381
+ xmlInputCloseCallback ioclose,
382
+ void *ioctx,
383
+ const char *URL,
384
+ const char *encoding,
385
+ int options);
386
+ /*
387
+ * Error handling extensions
388
+ */
389
+ typedef void * xmlTextReaderLocatorPtr;
390
+
391
+ /**
392
+ * xmlTextReaderErrorFunc:
393
+ * @arg: the user argument
394
+ * @msg: the message
395
+ * @severity: the severity of the error
396
+ * @locator: a locator indicating where the error occurred
397
+ *
398
+ * Signature of an error callback from a reader parser
399
+ */
400
+ typedef void (*xmlTextReaderErrorFunc)(void *arg,
401
+ const char *msg,
402
+ xmlParserSeverities severity,
403
+ xmlTextReaderLocatorPtr locator);
404
+ XMLPUBFUN int
405
+ xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
406
+ XMLPUBFUN xmlChar *
407
+ xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
408
+ XMLPUBFUN void
409
+ xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
410
+ xmlTextReaderErrorFunc f,
411
+ void *arg);
412
+ XMLPUBFUN void
413
+ xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
414
+ xmlStructuredErrorFunc f,
415
+ void *arg);
416
+ XMLPUBFUN void
417
+ xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
418
+ xmlTextReaderErrorFunc *f,
419
+ void **arg);
420
+
421
+ #endif /* LIBXML_READER_ENABLED */
422
+
423
+ #ifdef __cplusplus
424
+ }
425
+ #endif
426
+
427
+ #endif /* __XML_XMLREADER_H__ */
428
+
@@ -0,0 +1,222 @@
1
+ /*
2
+ * Summary: regular expressions handling
3
+ * Description: basic API for libxml regular expressions handling used
4
+ * for XML Schemas and validation.
5
+ *
6
+ * Copy: See Copyright for the status of this software.
7
+ *
8
+ * Author: Daniel Veillard
9
+ */
10
+
11
+ #ifndef __XML_REGEXP_H__
12
+ #define __XML_REGEXP_H__
13
+
14
+ #include <libxml/xmlversion.h>
15
+
16
+ #ifdef LIBXML_REGEXP_ENABLED
17
+
18
+ #ifdef __cplusplus
19
+ extern "C" {
20
+ #endif
21
+
22
+ /**
23
+ * xmlRegexpPtr:
24
+ *
25
+ * A libxml regular expression, they can actually be far more complex
26
+ * thank the POSIX regex expressions.
27
+ */
28
+ typedef struct _xmlRegexp xmlRegexp;
29
+ typedef xmlRegexp *xmlRegexpPtr;
30
+
31
+ /**
32
+ * xmlRegExecCtxtPtr:
33
+ *
34
+ * A libxml progressive regular expression evaluation context
35
+ */
36
+ typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
37
+ typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
38
+
39
+ #ifdef __cplusplus
40
+ }
41
+ #endif
42
+ #include <libxml/tree.h>
43
+ #include <libxml/dict.h>
44
+ #ifdef __cplusplus
45
+ extern "C" {
46
+ #endif
47
+
48
+ /*
49
+ * The POSIX like API
50
+ */
51
+ XMLPUBFUN xmlRegexpPtr
52
+ xmlRegexpCompile (const xmlChar *regexp);
53
+ XMLPUBFUN void xmlRegFreeRegexp(xmlRegexpPtr regexp);
54
+ XMLPUBFUN int
55
+ xmlRegexpExec (xmlRegexpPtr comp,
56
+ const xmlChar *value);
57
+ XMLPUBFUN void
58
+ xmlRegexpPrint (FILE *output,
59
+ xmlRegexpPtr regexp);
60
+ XMLPUBFUN int
61
+ xmlRegexpIsDeterminist(xmlRegexpPtr comp);
62
+
63
+ /**
64
+ * xmlRegExecCallbacks:
65
+ * @exec: the regular expression context
66
+ * @token: the current token string
67
+ * @transdata: transition data
68
+ * @inputdata: input data
69
+ *
70
+ * Callback function when doing a transition in the automata
71
+ */
72
+ typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
73
+ const xmlChar *token,
74
+ void *transdata,
75
+ void *inputdata);
76
+
77
+ /*
78
+ * The progressive API
79
+ */
80
+ XMLPUBFUN xmlRegExecCtxtPtr
81
+ xmlRegNewExecCtxt (xmlRegexpPtr comp,
82
+ xmlRegExecCallbacks callback,
83
+ void *data);
84
+ XMLPUBFUN void
85
+ xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
86
+ XMLPUBFUN int
87
+ xmlRegExecPushString(xmlRegExecCtxtPtr exec,
88
+ const xmlChar *value,
89
+ void *data);
90
+ XMLPUBFUN int
91
+ xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
92
+ const xmlChar *value,
93
+ const xmlChar *value2,
94
+ void *data);
95
+
96
+ XMLPUBFUN int
97
+ xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
98
+ int *nbval,
99
+ int *nbneg,
100
+ xmlChar **values,
101
+ int *terminal);
102
+ XMLPUBFUN int
103
+ xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
104
+ const xmlChar **string,
105
+ int *nbval,
106
+ int *nbneg,
107
+ xmlChar **values,
108
+ int *terminal);
109
+ #ifdef LIBXML_EXPR_ENABLED
110
+ /*
111
+ * Formal regular expression handling
112
+ * Its goal is to do some formal work on content models
113
+ */
114
+
115
+ /* expressions are used within a context */
116
+ typedef struct _xmlExpCtxt xmlExpCtxt;
117
+ typedef xmlExpCtxt *xmlExpCtxtPtr;
118
+
119
+ XMLPUBFUN void
120
+ xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
121
+ XMLPUBFUN xmlExpCtxtPtr
122
+ xmlExpNewCtxt (int maxNodes,
123
+ xmlDictPtr dict);
124
+
125
+ XMLPUBFUN int
126
+ xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
127
+ XMLPUBFUN int
128
+ xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt);
129
+
130
+ /* Expressions are trees but the tree is opaque */
131
+ typedef struct _xmlExpNode xmlExpNode;
132
+ typedef xmlExpNode *xmlExpNodePtr;
133
+
134
+ typedef enum {
135
+ XML_EXP_EMPTY = 0,
136
+ XML_EXP_FORBID = 1,
137
+ XML_EXP_ATOM = 2,
138
+ XML_EXP_SEQ = 3,
139
+ XML_EXP_OR = 4,
140
+ XML_EXP_COUNT = 5
141
+ } xmlExpNodeType;
142
+
143
+ /*
144
+ * 2 core expressions shared by all for the empty language set
145
+ * and for the set with just the empty token
146
+ */
147
+ XMLPUBVAR xmlExpNodePtr forbiddenExp;
148
+ XMLPUBVAR xmlExpNodePtr emptyExp;
149
+
150
+ /*
151
+ * Expressions are reference counted internally
152
+ */
153
+ XMLPUBFUN void
154
+ xmlExpFree (xmlExpCtxtPtr ctxt,
155
+ xmlExpNodePtr expr);
156
+ XMLPUBFUN void
157
+ xmlExpRef (xmlExpNodePtr expr);
158
+
159
+ /*
160
+ * constructors can be either manual or from a string
161
+ */
162
+ XMLPUBFUN xmlExpNodePtr
163
+ xmlExpParse (xmlExpCtxtPtr ctxt,
164
+ const char *expr);
165
+ XMLPUBFUN xmlExpNodePtr
166
+ xmlExpNewAtom (xmlExpCtxtPtr ctxt,
167
+ const xmlChar *name,
168
+ int len);
169
+ XMLPUBFUN xmlExpNodePtr
170
+ xmlExpNewOr (xmlExpCtxtPtr ctxt,
171
+ xmlExpNodePtr left,
172
+ xmlExpNodePtr right);
173
+ XMLPUBFUN xmlExpNodePtr
174
+ xmlExpNewSeq (xmlExpCtxtPtr ctxt,
175
+ xmlExpNodePtr left,
176
+ xmlExpNodePtr right);
177
+ XMLPUBFUN xmlExpNodePtr
178
+ xmlExpNewRange (xmlExpCtxtPtr ctxt,
179
+ xmlExpNodePtr subset,
180
+ int min,
181
+ int max);
182
+ /*
183
+ * The really interesting APIs
184
+ */
185
+ XMLPUBFUN int
186
+ xmlExpIsNillable(xmlExpNodePtr expr);
187
+ XMLPUBFUN int
188
+ xmlExpMaxToken (xmlExpNodePtr expr);
189
+ XMLPUBFUN int
190
+ xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
191
+ xmlExpNodePtr expr,
192
+ const xmlChar**langList,
193
+ int len);
194
+ XMLPUBFUN int
195
+ xmlExpGetStart (xmlExpCtxtPtr ctxt,
196
+ xmlExpNodePtr expr,
197
+ const xmlChar**tokList,
198
+ int len);
199
+ XMLPUBFUN xmlExpNodePtr
200
+ xmlExpStringDerive(xmlExpCtxtPtr ctxt,
201
+ xmlExpNodePtr expr,
202
+ const xmlChar *str,
203
+ int len);
204
+ XMLPUBFUN xmlExpNodePtr
205
+ xmlExpExpDerive (xmlExpCtxtPtr ctxt,
206
+ xmlExpNodePtr expr,
207
+ xmlExpNodePtr sub);
208
+ XMLPUBFUN int
209
+ xmlExpSubsume (xmlExpCtxtPtr ctxt,
210
+ xmlExpNodePtr expr,
211
+ xmlExpNodePtr sub);
212
+ XMLPUBFUN void
213
+ xmlExpDump (xmlBufferPtr buf,
214
+ xmlExpNodePtr expr);
215
+ #endif /* LIBXML_EXPR_ENABLED */
216
+ #ifdef __cplusplus
217
+ }
218
+ #endif
219
+
220
+ #endif /* LIBXML_REGEXP_ENABLED */
221
+
222
+ #endif /*__XML_REGEXP_H__ */