lxml 5.2.0__cp310-cp310-win32.whl → 5.2.2__cp310-cp310-win32.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 (89) hide show
  1. lxml/ElementInclude.py +244 -244
  2. lxml/__init__.py +22 -22
  3. lxml/_elementpath.cp310-win32.pyd +0 -0
  4. lxml/_elementpath.py +341 -341
  5. lxml/apihelpers.pxi +1793 -1793
  6. lxml/builder.cp310-win32.pyd +0 -0
  7. lxml/builder.py +232 -232
  8. lxml/classlookup.pxi +580 -580
  9. lxml/cleanup.pxi +215 -215
  10. lxml/cssselect.py +101 -101
  11. lxml/debug.pxi +90 -90
  12. lxml/docloader.pxi +178 -178
  13. lxml/doctestcompare.py +488 -488
  14. lxml/dtd.pxi +478 -478
  15. lxml/etree.cp310-win32.pyd +0 -0
  16. lxml/etree.h +6 -6
  17. lxml/etree.pyx +3732 -3711
  18. lxml/extensions.pxi +833 -833
  19. lxml/html/ElementSoup.py +10 -10
  20. lxml/html/__init__.py +1923 -1923
  21. lxml/html/_diffcommand.py +86 -86
  22. lxml/html/_html5builder.py +100 -100
  23. lxml/html/_setmixin.py +56 -56
  24. lxml/html/builder.py +133 -133
  25. lxml/html/clean.py +21 -21
  26. lxml/html/defs.py +135 -135
  27. lxml/html/diff.cp310-win32.pyd +0 -0
  28. lxml/html/diff.py +878 -878
  29. lxml/html/formfill.py +299 -299
  30. lxml/html/html5parser.py +260 -260
  31. lxml/html/soupparser.py +314 -314
  32. lxml/html/usedoctest.py +13 -13
  33. lxml/includes/c14n.pxd +25 -25
  34. lxml/includes/config.pxd +3 -3
  35. lxml/includes/dtdvalid.pxd +18 -18
  36. lxml/includes/etree_defs.h +379 -379
  37. lxml/includes/etreepublic.pxd +237 -237
  38. lxml/includes/htmlparser.pxd +56 -56
  39. lxml/includes/lxml-version.h +1 -1
  40. lxml/includes/relaxng.pxd +64 -64
  41. lxml/includes/schematron.pxd +34 -34
  42. lxml/includes/tree.pxd +494 -494
  43. lxml/includes/uri.pxd +5 -5
  44. lxml/includes/xinclude.pxd +22 -22
  45. lxml/includes/xmlerror.pxd +852 -852
  46. lxml/includes/xmlparser.pxd +265 -265
  47. lxml/includes/xmlschema.pxd +35 -35
  48. lxml/includes/xpath.pxd +136 -136
  49. lxml/includes/xslt.pxd +190 -190
  50. lxml/isoschematron/__init__.py +348 -348
  51. lxml/isoschematron/resources/rng/iso-schematron.rng +709 -709
  52. lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl +75 -75
  53. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl +312 -312
  54. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl +1159 -1159
  55. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl +54 -54
  56. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl +1796 -1796
  57. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl +588 -588
  58. lxml/iterparse.pxi +438 -438
  59. lxml/lxml.etree.h +6 -6
  60. lxml/nsclasses.pxi +281 -281
  61. lxml/objectify.cp310-win32.pyd +0 -0
  62. lxml/objectify.pyx +2145 -2145
  63. lxml/objectpath.pxi +332 -332
  64. lxml/parser.pxi +1994 -1994
  65. lxml/parsertarget.pxi +180 -180
  66. lxml/proxy.pxi +619 -619
  67. lxml/public-api.pxi +178 -178
  68. lxml/pyclasslookup.py +3 -3
  69. lxml/readonlytree.pxi +565 -565
  70. lxml/relaxng.pxi +165 -165
  71. lxml/sax.cp310-win32.pyd +0 -0
  72. lxml/sax.py +275 -275
  73. lxml/saxparser.pxi +875 -875
  74. lxml/schematron.pxi +168 -168
  75. lxml/serializer.pxi +1871 -1871
  76. lxml/usedoctest.py +13 -13
  77. lxml/xinclude.pxi +67 -67
  78. lxml/xmlerror.pxi +1654 -1654
  79. lxml/xmlid.pxi +179 -179
  80. lxml/xmlschema.pxi +215 -215
  81. lxml/xpath.pxi +487 -487
  82. lxml/xslt.pxi +950 -950
  83. lxml/xsltext.pxi +242 -242
  84. {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/LICENSE.txt +29 -29
  85. {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/LICENSES.txt +29 -29
  86. {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/METADATA +9 -17
  87. {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/RECORD +89 -89
  88. {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/WHEEL +0 -0
  89. {lxml-5.2.0.dist-info → lxml-5.2.2.dist-info}/top_level.txt +0 -0
@@ -1,265 +1,265 @@
1
- from libc.string cimport const_char
2
-
3
- from lxml.includes.tree cimport (
4
- xmlDoc, xmlNode, xmlEntity, xmlDict, xmlDtd, xmlChar, const_xmlChar)
5
- from lxml.includes.tree cimport xmlInputReadCallback, xmlInputCloseCallback
6
- from lxml.includes.xmlerror cimport xmlError, xmlStructuredErrorFunc, xmlErrorLevel
7
-
8
-
9
- cdef extern from "libxml/parser.h" nogil:
10
- ctypedef void (*startElementNsSAX2Func)(void* ctx,
11
- const_xmlChar* localname,
12
- const_xmlChar* prefix,
13
- const_xmlChar* URI,
14
- int nb_namespaces,
15
- const_xmlChar** namespaces,
16
- int nb_attributes,
17
- int nb_defaulted,
18
- const_xmlChar** attributes) noexcept
19
-
20
- ctypedef void (*endElementNsSAX2Func)(void* ctx,
21
- const_xmlChar* localname,
22
- const_xmlChar* prefix,
23
- const_xmlChar* URI) noexcept
24
-
25
- ctypedef void (*startElementSAXFunc)(void* ctx, const_xmlChar* name, const_xmlChar** atts) noexcept
26
-
27
- ctypedef void (*endElementSAXFunc)(void* ctx, const_xmlChar* name) noexcept
28
-
29
- ctypedef void (*charactersSAXFunc)(void* ctx, const_xmlChar* ch, int len) noexcept
30
-
31
- ctypedef void (*cdataBlockSAXFunc)(void* ctx, const_xmlChar* value, int len) noexcept
32
-
33
- ctypedef void (*commentSAXFunc)(void* ctx, const_xmlChar* value) noexcept
34
-
35
- ctypedef void (*processingInstructionSAXFunc)(void* ctx,
36
- const_xmlChar* target,
37
- const_xmlChar* data) noexcept
38
-
39
- ctypedef void (*internalSubsetSAXFunc)(void* ctx,
40
- const_xmlChar* name,
41
- const_xmlChar* externalID,
42
- const_xmlChar* systemID) noexcept
43
-
44
- ctypedef void (*endDocumentSAXFunc)(void* ctx) noexcept
45
-
46
- ctypedef void (*startDocumentSAXFunc)(void* ctx) noexcept
47
-
48
- ctypedef void (*referenceSAXFunc)(void * ctx, const_xmlChar* name) noexcept
49
-
50
- ctypedef xmlEntity* (*getEntitySAXFunc)(void* ctx, const_xmlChar* name) noexcept
51
-
52
- cdef int XML_SAX2_MAGIC
53
-
54
- cdef extern from "libxml/tree.h" nogil:
55
- ctypedef struct xmlParserInput:
56
- int line
57
- int col
58
- int length
59
- const_xmlChar* base
60
- const_xmlChar* cur
61
- const_xmlChar* end
62
- const_char *filename
63
-
64
- ctypedef struct xmlParserInputBuffer:
65
- void* context
66
- xmlInputReadCallback readcallback
67
- xmlInputCloseCallback closecallback
68
-
69
- ctypedef struct xmlSAXHandlerV1:
70
- # same as xmlSAXHandler, but without namespaces
71
- pass
72
-
73
- ctypedef struct xmlSAXHandler:
74
- internalSubsetSAXFunc internalSubset
75
- startElementNsSAX2Func startElementNs
76
- endElementNsSAX2Func endElementNs
77
- startElementSAXFunc startElement
78
- endElementSAXFunc endElement
79
- charactersSAXFunc characters
80
- cdataBlockSAXFunc cdataBlock
81
- referenceSAXFunc reference
82
- getEntitySAXFunc getEntity
83
- commentSAXFunc comment
84
- processingInstructionSAXFunc processingInstruction
85
- startDocumentSAXFunc startDocument
86
- endDocumentSAXFunc endDocument
87
- int initialized
88
- xmlStructuredErrorFunc serror
89
- void* _private
90
-
91
-
92
- cdef extern from "libxml/SAX2.h" nogil:
93
- cdef void xmlSAX2StartDocument(void* ctxt)
94
-
95
-
96
- cdef extern from "libxml/xmlIO.h" nogil:
97
- cdef xmlParserInputBuffer* xmlAllocParserInputBuffer(int enc)
98
-
99
-
100
- cdef extern from "libxml/parser.h" nogil:
101
-
102
- cdef xmlDict* xmlDictCreate()
103
- cdef xmlDict* xmlDictCreateSub(xmlDict* subdict)
104
- cdef void xmlDictFree(xmlDict* sub)
105
- cdef int xmlDictReference(xmlDict* dict)
106
-
107
- cdef int XML_COMPLETE_ATTRS # SAX option for adding DTD default attributes
108
- cdef int XML_SKIP_IDS # SAX option for not building an XML ID dict
109
-
110
- ctypedef enum xmlParserInputState:
111
- XML_PARSER_EOF = -1 # nothing is to be parsed
112
- XML_PARSER_START = 0 # nothing has been parsed
113
- XML_PARSER_MISC = 1 # Misc* before int subset
114
- XML_PARSER_PI = 2 # Within a processing instruction
115
- XML_PARSER_DTD = 3 # within some DTD content
116
- XML_PARSER_PROLOG = 4 # Misc* after internal subset
117
- XML_PARSER_COMMENT = 5 # within a comment
118
- XML_PARSER_START_TAG = 6 # within a start tag
119
- XML_PARSER_CONTENT = 7 # within the content
120
- XML_PARSER_CDATA_SECTION = 8 # within a CDATA section
121
- XML_PARSER_END_TAG = 9 # within a closing tag
122
- XML_PARSER_ENTITY_DECL = 10 # within an entity declaration
123
- XML_PARSER_ENTITY_VALUE = 11 # within an entity value in a decl
124
- XML_PARSER_ATTRIBUTE_VALUE = 12 # within an attribute value
125
- XML_PARSER_SYSTEM_LITERAL = 13 # within a SYSTEM value
126
- XML_PARSER_EPILOG = 14 # the Misc* after the last end tag
127
- XML_PARSER_IGNORE = 15 # within an IGNORED section
128
- XML_PARSER_PUBLIC_LITERAL = 16 # within a PUBLIC value
129
-
130
-
131
- ctypedef struct xmlParserCtxt:
132
- xmlDoc* myDoc
133
- xmlDict* dict
134
- int dictNames
135
- void* _private
136
- bint wellFormed
137
- bint recovery
138
- int options
139
- bint disableSAX
140
- int errNo
141
- xmlParserInputState instate
142
- bint replaceEntities
143
- int loadsubset # != 0 if enabled, int value == why
144
- bint validate
145
- xmlError lastError
146
- xmlNode* node
147
- xmlSAXHandler* sax
148
- void* userData
149
- int* spaceTab
150
- int spaceMax
151
- int nsNr
152
- bint html
153
- bint progressive
154
- int inSubset
155
- int charset
156
- xmlParserInput* input
157
- int inputNr
158
- xmlParserInput* inputTab[]
159
-
160
- ctypedef enum xmlParserOption:
161
- XML_PARSE_RECOVER = 1 # recover on errors
162
- XML_PARSE_NOENT = 2 # substitute entities
163
- XML_PARSE_DTDLOAD = 4 # load the external subset
164
- XML_PARSE_DTDATTR = 8 # default DTD attributes
165
- XML_PARSE_DTDVALID = 16 # validate with the DTD
166
- XML_PARSE_NOERROR = 32 # suppress error reports
167
- XML_PARSE_NOWARNING = 64 # suppress warning reports
168
- XML_PARSE_PEDANTIC = 128 # pedantic error reporting
169
- XML_PARSE_NOBLANKS = 256 # remove blank nodes
170
- XML_PARSE_SAX1 = 512 # use the SAX1 interface internally
171
- XML_PARSE_XINCLUDE = 1024 # Implement XInclude substitution
172
- XML_PARSE_NONET = 2048 # Forbid network access
173
- XML_PARSE_NODICT = 4096 # Do not reuse the context dictionary
174
- XML_PARSE_NSCLEAN = 8192 # remove redundant namespaces declarations
175
- XML_PARSE_NOCDATA = 16384 # merge CDATA as text nodes
176
- XML_PARSE_NOXINCNODE = 32768 # do not generate XINCLUDE START/END nodes
177
- # libxml2 2.6.21+ only:
178
- XML_PARSE_COMPACT = 65536 # compact small text nodes
179
- # libxml2 2.7.0+ only:
180
- XML_PARSE_OLD10 = 131072 # parse using XML-1.0 before update 5
181
- XML_PARSE_NOBASEFIX = 262144 # do not fixup XINCLUDE xml:base uris
182
- XML_PARSE_HUGE = 524288 # relax any hardcoded limit from the parser
183
- # libxml2 2.7.3+ only:
184
- XML_PARSE_OLDSAX = 1048576 # parse using SAX2 interface before 2.7.0
185
- # libxml2 2.8.0+ only:
186
- XML_PARSE_IGNORE_ENC = 2097152 # ignore internal document encoding hint
187
- # libxml2 2.9.0+ only:
188
- XML_PARSE_BIG_LINES = 4194304 # Store big lines numbers in text PSVI field
189
-
190
- cdef void xmlInitParser()
191
- cdef void xmlCleanupParser()
192
-
193
- cdef int xmlLineNumbersDefault(int onoff)
194
- cdef xmlParserCtxt* xmlNewParserCtxt()
195
- cdef xmlParserInput* xmlNewIOInputStream(xmlParserCtxt* ctxt,
196
- xmlParserInputBuffer* input,
197
- int enc)
198
- cdef int xmlCtxtUseOptions(xmlParserCtxt* ctxt, int options)
199
- cdef void xmlFreeParserCtxt(xmlParserCtxt* ctxt)
200
- cdef void xmlCtxtReset(xmlParserCtxt* ctxt)
201
- cdef void xmlClearParserCtxt(xmlParserCtxt* ctxt)
202
- cdef int xmlParseChunk(xmlParserCtxt* ctxt,
203
- char* chunk, int size, int terminate)
204
- cdef xmlDoc* xmlCtxtReadDoc(xmlParserCtxt* ctxt,
205
- char* cur, char* URL, char* encoding,
206
- int options)
207
- cdef xmlDoc* xmlCtxtReadFile(xmlParserCtxt* ctxt,
208
- char* filename, char* encoding,
209
- int options)
210
- cdef xmlDoc* xmlCtxtReadIO(xmlParserCtxt* ctxt,
211
- xmlInputReadCallback ioread,
212
- xmlInputCloseCallback ioclose,
213
- void* ioctx,
214
- char* URL, char* encoding,
215
- int options)
216
- cdef xmlDoc* xmlCtxtReadMemory(xmlParserCtxt* ctxt,
217
- char* buffer, int size,
218
- char* filename, const_char* encoding,
219
- int options)
220
-
221
- cdef void xmlErrParser(xmlParserCtxt* ctxt, xmlNode* node,
222
- int domain, int code, xmlErrorLevel level,
223
- const xmlChar *str1, const xmlChar *str2, const xmlChar *str3,
224
- int int1, const char *msg, ...)
225
-
226
-
227
- # iterparse:
228
-
229
- cdef xmlParserCtxt* xmlCreatePushParserCtxt(xmlSAXHandler* sax,
230
- void* user_data,
231
- char* chunk,
232
- int size,
233
- char* filename)
234
-
235
- cdef int xmlCtxtResetPush(xmlParserCtxt* ctxt,
236
- char* chunk,
237
- int size,
238
- char* filename,
239
- char* encoding)
240
-
241
- # entity loaders:
242
-
243
- ctypedef xmlParserInput* (*xmlExternalEntityLoader)(
244
- const_char * URL, const_char * ID, xmlParserCtxt* context) noexcept
245
- cdef xmlExternalEntityLoader xmlGetExternalEntityLoader()
246
- cdef void xmlSetExternalEntityLoader(xmlExternalEntityLoader f)
247
-
248
- cdef xmlEntity* xmlSAX2GetEntity(void* ctxt, const_xmlChar* name) noexcept
249
-
250
- # DTDs:
251
-
252
- cdef xmlDtd* xmlParseDTD(const_xmlChar* ExternalID, const_xmlChar* SystemID)
253
- cdef xmlDtd* xmlIOParseDTD(xmlSAXHandler* sax,
254
- xmlParserInputBuffer* input,
255
- int enc)
256
-
257
-
258
- cdef extern from "libxml/parserInternals.h" nogil:
259
- cdef xmlParserInput* xmlNewInputStream(xmlParserCtxt* ctxt)
260
- cdef xmlParserInput* xmlNewStringInputStream(xmlParserCtxt* ctxt,
261
- char* buffer)
262
- cdef xmlParserInput* xmlNewInputFromFile(xmlParserCtxt* ctxt,
263
- char* filename)
264
- cdef void xmlFreeInputStream(xmlParserInput* input)
265
- cdef int xmlSwitchEncoding(xmlParserCtxt* ctxt, int enc)
1
+ from libc.string cimport const_char
2
+
3
+ from lxml.includes.tree cimport (
4
+ xmlDoc, xmlNode, xmlEntity, xmlDict, xmlDtd, xmlChar, const_xmlChar)
5
+ from lxml.includes.tree cimport xmlInputReadCallback, xmlInputCloseCallback
6
+ from lxml.includes.xmlerror cimport xmlError, xmlStructuredErrorFunc, xmlErrorLevel
7
+
8
+
9
+ cdef extern from "libxml/parser.h" nogil:
10
+ ctypedef void (*startElementNsSAX2Func)(void* ctx,
11
+ const_xmlChar* localname,
12
+ const_xmlChar* prefix,
13
+ const_xmlChar* URI,
14
+ int nb_namespaces,
15
+ const_xmlChar** namespaces,
16
+ int nb_attributes,
17
+ int nb_defaulted,
18
+ const_xmlChar** attributes) noexcept
19
+
20
+ ctypedef void (*endElementNsSAX2Func)(void* ctx,
21
+ const_xmlChar* localname,
22
+ const_xmlChar* prefix,
23
+ const_xmlChar* URI) noexcept
24
+
25
+ ctypedef void (*startElementSAXFunc)(void* ctx, const_xmlChar* name, const_xmlChar** atts) noexcept
26
+
27
+ ctypedef void (*endElementSAXFunc)(void* ctx, const_xmlChar* name) noexcept
28
+
29
+ ctypedef void (*charactersSAXFunc)(void* ctx, const_xmlChar* ch, int len) noexcept
30
+
31
+ ctypedef void (*cdataBlockSAXFunc)(void* ctx, const_xmlChar* value, int len) noexcept
32
+
33
+ ctypedef void (*commentSAXFunc)(void* ctx, const_xmlChar* value) noexcept
34
+
35
+ ctypedef void (*processingInstructionSAXFunc)(void* ctx,
36
+ const_xmlChar* target,
37
+ const_xmlChar* data) noexcept
38
+
39
+ ctypedef void (*internalSubsetSAXFunc)(void* ctx,
40
+ const_xmlChar* name,
41
+ const_xmlChar* externalID,
42
+ const_xmlChar* systemID) noexcept
43
+
44
+ ctypedef void (*endDocumentSAXFunc)(void* ctx) noexcept
45
+
46
+ ctypedef void (*startDocumentSAXFunc)(void* ctx) noexcept
47
+
48
+ ctypedef void (*referenceSAXFunc)(void * ctx, const_xmlChar* name) noexcept
49
+
50
+ ctypedef xmlEntity* (*getEntitySAXFunc)(void* ctx, const_xmlChar* name) noexcept
51
+
52
+ cdef int XML_SAX2_MAGIC
53
+
54
+ cdef extern from "libxml/tree.h" nogil:
55
+ ctypedef struct xmlParserInput:
56
+ int line
57
+ int col
58
+ int length
59
+ const_xmlChar* base
60
+ const_xmlChar* cur
61
+ const_xmlChar* end
62
+ const_char *filename
63
+
64
+ ctypedef struct xmlParserInputBuffer:
65
+ void* context
66
+ xmlInputReadCallback readcallback
67
+ xmlInputCloseCallback closecallback
68
+
69
+ ctypedef struct xmlSAXHandlerV1:
70
+ # same as xmlSAXHandler, but without namespaces
71
+ pass
72
+
73
+ ctypedef struct xmlSAXHandler:
74
+ internalSubsetSAXFunc internalSubset
75
+ startElementNsSAX2Func startElementNs
76
+ endElementNsSAX2Func endElementNs
77
+ startElementSAXFunc startElement
78
+ endElementSAXFunc endElement
79
+ charactersSAXFunc characters
80
+ cdataBlockSAXFunc cdataBlock
81
+ referenceSAXFunc reference
82
+ getEntitySAXFunc getEntity
83
+ commentSAXFunc comment
84
+ processingInstructionSAXFunc processingInstruction
85
+ startDocumentSAXFunc startDocument
86
+ endDocumentSAXFunc endDocument
87
+ int initialized
88
+ xmlStructuredErrorFunc serror
89
+ void* _private
90
+
91
+
92
+ cdef extern from "libxml/SAX2.h" nogil:
93
+ cdef void xmlSAX2StartDocument(void* ctxt)
94
+
95
+
96
+ cdef extern from "libxml/xmlIO.h" nogil:
97
+ cdef xmlParserInputBuffer* xmlAllocParserInputBuffer(int enc)
98
+
99
+
100
+ cdef extern from "libxml/parser.h" nogil:
101
+
102
+ cdef xmlDict* xmlDictCreate()
103
+ cdef xmlDict* xmlDictCreateSub(xmlDict* subdict)
104
+ cdef void xmlDictFree(xmlDict* sub)
105
+ cdef int xmlDictReference(xmlDict* dict)
106
+
107
+ cdef int XML_COMPLETE_ATTRS # SAX option for adding DTD default attributes
108
+ cdef int XML_SKIP_IDS # SAX option for not building an XML ID dict
109
+
110
+ ctypedef enum xmlParserInputState:
111
+ XML_PARSER_EOF = -1 # nothing is to be parsed
112
+ XML_PARSER_START = 0 # nothing has been parsed
113
+ XML_PARSER_MISC = 1 # Misc* before int subset
114
+ XML_PARSER_PI = 2 # Within a processing instruction
115
+ XML_PARSER_DTD = 3 # within some DTD content
116
+ XML_PARSER_PROLOG = 4 # Misc* after internal subset
117
+ XML_PARSER_COMMENT = 5 # within a comment
118
+ XML_PARSER_START_TAG = 6 # within a start tag
119
+ XML_PARSER_CONTENT = 7 # within the content
120
+ XML_PARSER_CDATA_SECTION = 8 # within a CDATA section
121
+ XML_PARSER_END_TAG = 9 # within a closing tag
122
+ XML_PARSER_ENTITY_DECL = 10 # within an entity declaration
123
+ XML_PARSER_ENTITY_VALUE = 11 # within an entity value in a decl
124
+ XML_PARSER_ATTRIBUTE_VALUE = 12 # within an attribute value
125
+ XML_PARSER_SYSTEM_LITERAL = 13 # within a SYSTEM value
126
+ XML_PARSER_EPILOG = 14 # the Misc* after the last end tag
127
+ XML_PARSER_IGNORE = 15 # within an IGNORED section
128
+ XML_PARSER_PUBLIC_LITERAL = 16 # within a PUBLIC value
129
+
130
+
131
+ ctypedef struct xmlParserCtxt:
132
+ xmlDoc* myDoc
133
+ xmlDict* dict
134
+ int dictNames
135
+ void* _private
136
+ bint wellFormed
137
+ bint recovery
138
+ int options
139
+ bint disableSAX
140
+ int errNo
141
+ xmlParserInputState instate
142
+ bint replaceEntities
143
+ int loadsubset # != 0 if enabled, int value == why
144
+ bint validate
145
+ xmlError lastError
146
+ xmlNode* node
147
+ xmlSAXHandler* sax
148
+ void* userData
149
+ int* spaceTab
150
+ int spaceMax
151
+ int nsNr
152
+ bint html
153
+ bint progressive
154
+ int inSubset
155
+ int charset
156
+ xmlParserInput* input
157
+ int inputNr
158
+ xmlParserInput* inputTab[]
159
+
160
+ ctypedef enum xmlParserOption:
161
+ XML_PARSE_RECOVER = 1 # recover on errors
162
+ XML_PARSE_NOENT = 2 # substitute entities
163
+ XML_PARSE_DTDLOAD = 4 # load the external subset
164
+ XML_PARSE_DTDATTR = 8 # default DTD attributes
165
+ XML_PARSE_DTDVALID = 16 # validate with the DTD
166
+ XML_PARSE_NOERROR = 32 # suppress error reports
167
+ XML_PARSE_NOWARNING = 64 # suppress warning reports
168
+ XML_PARSE_PEDANTIC = 128 # pedantic error reporting
169
+ XML_PARSE_NOBLANKS = 256 # remove blank nodes
170
+ XML_PARSE_SAX1 = 512 # use the SAX1 interface internally
171
+ XML_PARSE_XINCLUDE = 1024 # Implement XInclude substitution
172
+ XML_PARSE_NONET = 2048 # Forbid network access
173
+ XML_PARSE_NODICT = 4096 # Do not reuse the context dictionary
174
+ XML_PARSE_NSCLEAN = 8192 # remove redundant namespaces declarations
175
+ XML_PARSE_NOCDATA = 16384 # merge CDATA as text nodes
176
+ XML_PARSE_NOXINCNODE = 32768 # do not generate XINCLUDE START/END nodes
177
+ # libxml2 2.6.21+ only:
178
+ XML_PARSE_COMPACT = 65536 # compact small text nodes
179
+ # libxml2 2.7.0+ only:
180
+ XML_PARSE_OLD10 = 131072 # parse using XML-1.0 before update 5
181
+ XML_PARSE_NOBASEFIX = 262144 # do not fixup XINCLUDE xml:base uris
182
+ XML_PARSE_HUGE = 524288 # relax any hardcoded limit from the parser
183
+ # libxml2 2.7.3+ only:
184
+ XML_PARSE_OLDSAX = 1048576 # parse using SAX2 interface before 2.7.0
185
+ # libxml2 2.8.0+ only:
186
+ XML_PARSE_IGNORE_ENC = 2097152 # ignore internal document encoding hint
187
+ # libxml2 2.9.0+ only:
188
+ XML_PARSE_BIG_LINES = 4194304 # Store big lines numbers in text PSVI field
189
+
190
+ cdef void xmlInitParser()
191
+ cdef void xmlCleanupParser()
192
+
193
+ cdef int xmlLineNumbersDefault(int onoff)
194
+ cdef xmlParserCtxt* xmlNewParserCtxt()
195
+ cdef xmlParserInput* xmlNewIOInputStream(xmlParserCtxt* ctxt,
196
+ xmlParserInputBuffer* input,
197
+ int enc)
198
+ cdef int xmlCtxtUseOptions(xmlParserCtxt* ctxt, int options)
199
+ cdef void xmlFreeParserCtxt(xmlParserCtxt* ctxt)
200
+ cdef void xmlCtxtReset(xmlParserCtxt* ctxt)
201
+ cdef void xmlClearParserCtxt(xmlParserCtxt* ctxt)
202
+ cdef int xmlParseChunk(xmlParserCtxt* ctxt,
203
+ char* chunk, int size, int terminate)
204
+ cdef xmlDoc* xmlCtxtReadDoc(xmlParserCtxt* ctxt,
205
+ char* cur, char* URL, char* encoding,
206
+ int options)
207
+ cdef xmlDoc* xmlCtxtReadFile(xmlParserCtxt* ctxt,
208
+ char* filename, char* encoding,
209
+ int options)
210
+ cdef xmlDoc* xmlCtxtReadIO(xmlParserCtxt* ctxt,
211
+ xmlInputReadCallback ioread,
212
+ xmlInputCloseCallback ioclose,
213
+ void* ioctx,
214
+ char* URL, char* encoding,
215
+ int options)
216
+ cdef xmlDoc* xmlCtxtReadMemory(xmlParserCtxt* ctxt,
217
+ char* buffer, int size,
218
+ char* filename, const_char* encoding,
219
+ int options)
220
+
221
+ cdef void xmlErrParser(xmlParserCtxt* ctxt, xmlNode* node,
222
+ int domain, int code, xmlErrorLevel level,
223
+ const xmlChar *str1, const xmlChar *str2, const xmlChar *str3,
224
+ int int1, const char *msg, ...)
225
+
226
+
227
+ # iterparse:
228
+
229
+ cdef xmlParserCtxt* xmlCreatePushParserCtxt(xmlSAXHandler* sax,
230
+ void* user_data,
231
+ char* chunk,
232
+ int size,
233
+ char* filename)
234
+
235
+ cdef int xmlCtxtResetPush(xmlParserCtxt* ctxt,
236
+ char* chunk,
237
+ int size,
238
+ char* filename,
239
+ char* encoding)
240
+
241
+ # entity loaders:
242
+
243
+ ctypedef xmlParserInput* (*xmlExternalEntityLoader)(
244
+ const_char * URL, const_char * ID, xmlParserCtxt* context) noexcept
245
+ cdef xmlExternalEntityLoader xmlGetExternalEntityLoader()
246
+ cdef void xmlSetExternalEntityLoader(xmlExternalEntityLoader f)
247
+
248
+ cdef xmlEntity* xmlSAX2GetEntity(void* ctxt, const_xmlChar* name) noexcept
249
+
250
+ # DTDs:
251
+
252
+ cdef xmlDtd* xmlParseDTD(const_xmlChar* ExternalID, const_xmlChar* SystemID)
253
+ cdef xmlDtd* xmlIOParseDTD(xmlSAXHandler* sax,
254
+ xmlParserInputBuffer* input,
255
+ int enc)
256
+
257
+
258
+ cdef extern from "libxml/parserInternals.h" nogil:
259
+ cdef xmlParserInput* xmlNewInputStream(xmlParserCtxt* ctxt)
260
+ cdef xmlParserInput* xmlNewStringInputStream(xmlParserCtxt* ctxt,
261
+ char* buffer)
262
+ cdef xmlParserInput* xmlNewInputFromFile(xmlParserCtxt* ctxt,
263
+ char* filename)
264
+ cdef void xmlFreeInputStream(xmlParserInput* input)
265
+ cdef int xmlSwitchEncoding(xmlParserCtxt* ctxt, int enc)
@@ -1,35 +1,35 @@
1
- from lxml.includes.tree cimport xmlDoc
2
- from lxml.includes.xmlparser cimport xmlSAXHandler
3
- from lxml.includes.xmlerror cimport xmlStructuredErrorFunc
4
-
5
- cdef extern from "libxml/xmlschemas.h" nogil:
6
- ctypedef struct xmlSchema
7
- ctypedef struct xmlSchemaParserCtxt
8
-
9
- ctypedef struct xmlSchemaSAXPlugStruct
10
- ctypedef struct xmlSchemaValidCtxt
11
-
12
- ctypedef enum xmlSchemaValidOption:
13
- XML_SCHEMA_VAL_VC_I_CREATE = 1
14
-
15
- cdef xmlSchemaValidCtxt* xmlSchemaNewValidCtxt(xmlSchema* schema) nogil
16
- cdef void xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxt* ctxt,
17
- xmlStructuredErrorFunc serror, void *ctx)
18
- cdef void xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxt* ctxt,
19
- xmlStructuredErrorFunc serror, void *ctx)
20
-
21
- cdef int xmlSchemaValidateDoc(xmlSchemaValidCtxt* ctxt, xmlDoc* doc) nogil
22
- cdef xmlSchema* xmlSchemaParse(xmlSchemaParserCtxt* ctxt) nogil
23
- cdef xmlSchemaParserCtxt* xmlSchemaNewParserCtxt(char* URL) nogil
24
- cdef xmlSchemaParserCtxt* xmlSchemaNewDocParserCtxt(xmlDoc* doc) nogil
25
- cdef void xmlSchemaFree(xmlSchema* schema) nogil
26
- cdef void xmlSchemaFreeParserCtxt(xmlSchemaParserCtxt* ctxt) nogil
27
- cdef void xmlSchemaFreeValidCtxt(xmlSchemaValidCtxt* ctxt) nogil
28
- cdef int xmlSchemaSetValidOptions(xmlSchemaValidCtxt* ctxt,
29
- int options) nogil
30
-
31
- cdef xmlSchemaSAXPlugStruct* xmlSchemaSAXPlug(xmlSchemaValidCtxt* ctxt,
32
- xmlSAXHandler** sax,
33
- void** data) nogil
34
- cdef int xmlSchemaSAXUnplug(xmlSchemaSAXPlugStruct* sax_plug)
35
- cdef int xmlSchemaIsValid(xmlSchemaValidCtxt* ctxt)
1
+ from lxml.includes.tree cimport xmlDoc
2
+ from lxml.includes.xmlparser cimport xmlSAXHandler
3
+ from lxml.includes.xmlerror cimport xmlStructuredErrorFunc
4
+
5
+ cdef extern from "libxml/xmlschemas.h" nogil:
6
+ ctypedef struct xmlSchema
7
+ ctypedef struct xmlSchemaParserCtxt
8
+
9
+ ctypedef struct xmlSchemaSAXPlugStruct
10
+ ctypedef struct xmlSchemaValidCtxt
11
+
12
+ ctypedef enum xmlSchemaValidOption:
13
+ XML_SCHEMA_VAL_VC_I_CREATE = 1
14
+
15
+ cdef xmlSchemaValidCtxt* xmlSchemaNewValidCtxt(xmlSchema* schema) nogil
16
+ cdef void xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxt* ctxt,
17
+ xmlStructuredErrorFunc serror, void *ctx)
18
+ cdef void xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxt* ctxt,
19
+ xmlStructuredErrorFunc serror, void *ctx)
20
+
21
+ cdef int xmlSchemaValidateDoc(xmlSchemaValidCtxt* ctxt, xmlDoc* doc) nogil
22
+ cdef xmlSchema* xmlSchemaParse(xmlSchemaParserCtxt* ctxt) nogil
23
+ cdef xmlSchemaParserCtxt* xmlSchemaNewParserCtxt(char* URL) nogil
24
+ cdef xmlSchemaParserCtxt* xmlSchemaNewDocParserCtxt(xmlDoc* doc) nogil
25
+ cdef void xmlSchemaFree(xmlSchema* schema) nogil
26
+ cdef void xmlSchemaFreeParserCtxt(xmlSchemaParserCtxt* ctxt) nogil
27
+ cdef void xmlSchemaFreeValidCtxt(xmlSchemaValidCtxt* ctxt) nogil
28
+ cdef int xmlSchemaSetValidOptions(xmlSchemaValidCtxt* ctxt,
29
+ int options) nogil
30
+
31
+ cdef xmlSchemaSAXPlugStruct* xmlSchemaSAXPlug(xmlSchemaValidCtxt* ctxt,
32
+ xmlSAXHandler** sax,
33
+ void** data) nogil
34
+ cdef int xmlSchemaSAXUnplug(xmlSchemaSAXPlugStruct* sax_plug)
35
+ cdef int xmlSchemaIsValid(xmlSchemaValidCtxt* ctxt)