lxml 6.0.0__cp310-cp310-manylinux_2_31_armv7l.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 (174) hide show
  1. lxml/ElementInclude.py +244 -0
  2. lxml/__init__.py +22 -0
  3. lxml/_elementpath.cpython-310-arm-linux-gnueabihf.so +0 -0
  4. lxml/_elementpath.py +343 -0
  5. lxml/apihelpers.pxi +1801 -0
  6. lxml/builder.cpython-310-arm-linux-gnueabihf.so +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.cpython-310-arm-linux-gnueabihf.so +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.cpython-310-arm-linux-gnueabihf.so +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.cpython-310-arm-linux-gnueabihf.so +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/libcharset.h +45 -0
  45. lxml/includes/extlibs/localcharset.h +137 -0
  46. lxml/includes/extlibs/zconf.h +543 -0
  47. lxml/includes/extlibs/zlib.h +1938 -0
  48. lxml/includes/htmlparser.pxd +56 -0
  49. lxml/includes/libexslt/__init__.py +0 -0
  50. lxml/includes/libexslt/exslt.h +108 -0
  51. lxml/includes/libexslt/exsltconfig.h +70 -0
  52. lxml/includes/libexslt/exsltexports.h +63 -0
  53. lxml/includes/libxml/HTMLparser.h +339 -0
  54. lxml/includes/libxml/HTMLtree.h +148 -0
  55. lxml/includes/libxml/SAX.h +18 -0
  56. lxml/includes/libxml/SAX2.h +170 -0
  57. lxml/includes/libxml/__init__.py +0 -0
  58. lxml/includes/libxml/c14n.h +115 -0
  59. lxml/includes/libxml/catalog.h +183 -0
  60. lxml/includes/libxml/chvalid.h +230 -0
  61. lxml/includes/libxml/debugXML.h +79 -0
  62. lxml/includes/libxml/dict.h +82 -0
  63. lxml/includes/libxml/encoding.h +307 -0
  64. lxml/includes/libxml/entities.h +147 -0
  65. lxml/includes/libxml/globals.h +25 -0
  66. lxml/includes/libxml/hash.h +251 -0
  67. lxml/includes/libxml/list.h +137 -0
  68. lxml/includes/libxml/nanoftp.h +16 -0
  69. lxml/includes/libxml/nanohttp.h +98 -0
  70. lxml/includes/libxml/parser.h +1633 -0
  71. lxml/includes/libxml/parserInternals.h +591 -0
  72. lxml/includes/libxml/relaxng.h +224 -0
  73. lxml/includes/libxml/schemasInternals.h +959 -0
  74. lxml/includes/libxml/schematron.h +143 -0
  75. lxml/includes/libxml/threads.h +81 -0
  76. lxml/includes/libxml/tree.h +1326 -0
  77. lxml/includes/libxml/uri.h +106 -0
  78. lxml/includes/libxml/valid.h +485 -0
  79. lxml/includes/libxml/xinclude.h +141 -0
  80. lxml/includes/libxml/xlink.h +193 -0
  81. lxml/includes/libxml/xmlIO.h +419 -0
  82. lxml/includes/libxml/xmlautomata.h +163 -0
  83. lxml/includes/libxml/xmlerror.h +962 -0
  84. lxml/includes/libxml/xmlexports.h +96 -0
  85. lxml/includes/libxml/xmlmemory.h +188 -0
  86. lxml/includes/libxml/xmlmodule.h +61 -0
  87. lxml/includes/libxml/xmlreader.h +444 -0
  88. lxml/includes/libxml/xmlregexp.h +116 -0
  89. lxml/includes/libxml/xmlsave.h +111 -0
  90. lxml/includes/libxml/xmlschemas.h +254 -0
  91. lxml/includes/libxml/xmlschemastypes.h +152 -0
  92. lxml/includes/libxml/xmlstring.h +140 -0
  93. lxml/includes/libxml/xmlunicode.h +15 -0
  94. lxml/includes/libxml/xmlversion.h +332 -0
  95. lxml/includes/libxml/xmlwriter.h +489 -0
  96. lxml/includes/libxml/xpath.h +569 -0
  97. lxml/includes/libxml/xpathInternals.h +639 -0
  98. lxml/includes/libxml/xpointer.h +48 -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/namespaces.h +68 -0
  108. lxml/includes/libxslt/numbersInternals.h +73 -0
  109. lxml/includes/libxslt/pattern.h +84 -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/variables.h +118 -0
  115. lxml/includes/libxslt/xslt.h +110 -0
  116. lxml/includes/libxslt/xsltInternals.h +1995 -0
  117. lxml/includes/libxslt/xsltconfig.h +146 -0
  118. lxml/includes/libxslt/xsltexports.h +64 -0
  119. lxml/includes/libxslt/xsltlocale.h +44 -0
  120. lxml/includes/libxslt/xsltutils.h +343 -0
  121. lxml/includes/lxml-version.h +3 -0
  122. lxml/includes/relaxng.pxd +64 -0
  123. lxml/includes/schematron.pxd +34 -0
  124. lxml/includes/tree.pxd +492 -0
  125. lxml/includes/uri.pxd +5 -0
  126. lxml/includes/xinclude.pxd +22 -0
  127. lxml/includes/xmlerror.pxd +852 -0
  128. lxml/includes/xmlparser.pxd +303 -0
  129. lxml/includes/xmlschema.pxd +35 -0
  130. lxml/includes/xpath.pxd +136 -0
  131. lxml/includes/xslt.pxd +190 -0
  132. lxml/isoschematron/__init__.py +348 -0
  133. lxml/isoschematron/resources/rng/iso-schematron.rng +709 -0
  134. lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl +75 -0
  135. lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl +77 -0
  136. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl +313 -0
  137. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl +1160 -0
  138. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl +55 -0
  139. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl +1796 -0
  140. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl +588 -0
  141. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt +84 -0
  142. lxml/iterparse.pxi +438 -0
  143. lxml/lxml.etree.h +244 -0
  144. lxml/lxml.etree_api.h +204 -0
  145. lxml/nsclasses.pxi +281 -0
  146. lxml/objectify.cpython-310-arm-linux-gnueabihf.so +0 -0
  147. lxml/objectify.pyx +2149 -0
  148. lxml/objectpath.pxi +332 -0
  149. lxml/parser.pxi +2059 -0
  150. lxml/parsertarget.pxi +180 -0
  151. lxml/proxy.pxi +619 -0
  152. lxml/public-api.pxi +178 -0
  153. lxml/pyclasslookup.py +3 -0
  154. lxml/readonlytree.pxi +565 -0
  155. lxml/relaxng.pxi +165 -0
  156. lxml/sax.cpython-310-arm-linux-gnueabihf.so +0 -0
  157. lxml/sax.py +286 -0
  158. lxml/saxparser.pxi +875 -0
  159. lxml/schematron.pxi +173 -0
  160. lxml/serializer.pxi +1849 -0
  161. lxml/usedoctest.py +13 -0
  162. lxml/xinclude.pxi +67 -0
  163. lxml/xmlerror.pxi +1654 -0
  164. lxml/xmlid.pxi +179 -0
  165. lxml/xmlschema.pxi +215 -0
  166. lxml/xpath.pxi +487 -0
  167. lxml/xslt.pxi +957 -0
  168. lxml/xsltext.pxi +242 -0
  169. lxml-6.0.0.dist-info/METADATA +163 -0
  170. lxml-6.0.0.dist-info/RECORD +174 -0
  171. lxml-6.0.0.dist-info/WHEEL +5 -0
  172. lxml-6.0.0.dist-info/licenses/LICENSE.txt +31 -0
  173. lxml-6.0.0.dist-info/licenses/LICENSES.txt +29 -0
  174. lxml-6.0.0.dist-info/top_level.txt +1 -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
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
211
+ xmlIsBaseChar(unsigned int ch);
212
+ XMLPUBFUN int
213
+ xmlIsBlank(unsigned int ch);
214
+ XMLPUBFUN int
215
+ xmlIsChar(unsigned int ch);
216
+ XMLPUBFUN int
217
+ xmlIsCombining(unsigned int ch);
218
+ XMLPUBFUN int
219
+ xmlIsDigit(unsigned int ch);
220
+ XMLPUBFUN int
221
+ xmlIsExtender(unsigned int ch);
222
+ XMLPUBFUN int
223
+ xmlIsIdeographic(unsigned int ch);
224
+ XMLPUBFUN int
225
+ xmlIsPubidChar(unsigned int ch);
226
+
227
+ #ifdef __cplusplus
228
+ }
229
+ #endif
230
+ #endif /* __XML_CHVALID_H__ */
@@ -0,0 +1,79 @@
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
29
+ xmlDebugDumpString (FILE *output,
30
+ const xmlChar *str);
31
+ XMLPUBFUN void
32
+ xmlDebugDumpAttr (FILE *output,
33
+ xmlAttrPtr attr,
34
+ int depth);
35
+ XMLPUBFUN void
36
+ xmlDebugDumpAttrList (FILE *output,
37
+ xmlAttrPtr attr,
38
+ int depth);
39
+ XMLPUBFUN void
40
+ xmlDebugDumpOneNode (FILE *output,
41
+ xmlNodePtr node,
42
+ int depth);
43
+ XMLPUBFUN void
44
+ xmlDebugDumpNode (FILE *output,
45
+ xmlNodePtr node,
46
+ int depth);
47
+ XMLPUBFUN void
48
+ xmlDebugDumpNodeList (FILE *output,
49
+ xmlNodePtr node,
50
+ int depth);
51
+ XMLPUBFUN void
52
+ xmlDebugDumpDocumentHead(FILE *output,
53
+ xmlDocPtr doc);
54
+ XMLPUBFUN void
55
+ xmlDebugDumpDocument (FILE *output,
56
+ xmlDocPtr doc);
57
+ XMLPUBFUN void
58
+ xmlDebugDumpDTD (FILE *output,
59
+ xmlDtdPtr dtd);
60
+ XMLPUBFUN void
61
+ xmlDebugDumpEntities (FILE *output,
62
+ xmlDocPtr doc);
63
+
64
+ /****************************************************************
65
+ * *
66
+ * Checking routines *
67
+ * *
68
+ ****************************************************************/
69
+
70
+ XMLPUBFUN int
71
+ xmlDebugCheckDocument (FILE * output,
72
+ xmlDocPtr doc);
73
+
74
+ #ifdef __cplusplus
75
+ }
76
+ #endif
77
+
78
+ #endif /* LIBXML_DEBUG_ENABLED */
79
+ #endif /* __DEBUG_XML__ */
@@ -0,0 +1,82 @@
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
+ #include <libxml/xmlstring.h>
17
+
18
+ #ifdef __cplusplus
19
+ extern "C" {
20
+ #endif
21
+
22
+ /*
23
+ * The dictionary.
24
+ */
25
+ typedef struct _xmlDict xmlDict;
26
+ typedef xmlDict *xmlDictPtr;
27
+
28
+ /*
29
+ * Initializer
30
+ */
31
+ XML_DEPRECATED
32
+ XMLPUBFUN int xmlInitializeDict(void);
33
+
34
+ /*
35
+ * Constructor and destructor.
36
+ */
37
+ XMLPUBFUN xmlDictPtr
38
+ xmlDictCreate (void);
39
+ XMLPUBFUN size_t
40
+ xmlDictSetLimit (xmlDictPtr dict,
41
+ size_t limit);
42
+ XMLPUBFUN size_t
43
+ xmlDictGetUsage (xmlDictPtr dict);
44
+ XMLPUBFUN xmlDictPtr
45
+ xmlDictCreateSub(xmlDictPtr sub);
46
+ XMLPUBFUN int
47
+ xmlDictReference(xmlDictPtr dict);
48
+ XMLPUBFUN void
49
+ xmlDictFree (xmlDictPtr dict);
50
+
51
+ /*
52
+ * Lookup of entry in the dictionary.
53
+ */
54
+ XMLPUBFUN const xmlChar *
55
+ xmlDictLookup (xmlDictPtr dict,
56
+ const xmlChar *name,
57
+ int len);
58
+ XMLPUBFUN const xmlChar *
59
+ xmlDictExists (xmlDictPtr dict,
60
+ const xmlChar *name,
61
+ int len);
62
+ XMLPUBFUN const xmlChar *
63
+ xmlDictQLookup (xmlDictPtr dict,
64
+ const xmlChar *prefix,
65
+ const xmlChar *name);
66
+ XMLPUBFUN int
67
+ xmlDictOwns (xmlDictPtr dict,
68
+ const xmlChar *str);
69
+ XMLPUBFUN int
70
+ xmlDictSize (xmlDictPtr dict);
71
+
72
+ /*
73
+ * Cleanup function
74
+ */
75
+ XML_DEPRECATED
76
+ XMLPUBFUN void
77
+ xmlDictCleanup (void);
78
+
79
+ #ifdef __cplusplus
80
+ }
81
+ #endif
82
+ #endif /* ! __XML_DICT_H__ */
@@ -0,0 +1,307 @@
1
+ /*
2
+ * Summary: interface for the encoding conversion functions
3
+ * Description: interface for the encoding conversion functions needed for
4
+ * XML basic encoding and iconv() support.
5
+ *
6
+ * Related specs are
7
+ * rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies
8
+ * [ISO-10646] UTF-8 and UTF-16 in Annexes
9
+ * [ISO-8859-1] ISO Latin-1 characters codes.
10
+ * [UNICODE] The Unicode Consortium, "The Unicode Standard --
11
+ * Worldwide Character Encoding -- Version 1.0", Addison-
12
+ * Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is
13
+ * described in Unicode Technical Report #4.
14
+ * [US-ASCII] Coded Character Set--7-bit American Standard Code for
15
+ * Information Interchange, ANSI X3.4-1986.
16
+ *
17
+ * Copy: See Copyright for the status of this software.
18
+ *
19
+ * Author: Daniel Veillard
20
+ */
21
+
22
+ #ifndef __XML_CHAR_ENCODING_H__
23
+ #define __XML_CHAR_ENCODING_H__
24
+
25
+ #include <libxml/xmlversion.h>
26
+ #include <libxml/xmlerror.h>
27
+
28
+ #ifdef __cplusplus
29
+ extern "C" {
30
+ #endif
31
+
32
+ /*
33
+ * Backward compatibility
34
+ */
35
+ #define UTF8Toisolat1 xmlUTF8ToIsolat1
36
+ #define isolat1ToUTF8 xmlIsolat1ToUTF8
37
+
38
+ typedef enum {
39
+ XML_ENC_ERR_SUCCESS = 0,
40
+ XML_ENC_ERR_INTERNAL = -1,
41
+ XML_ENC_ERR_INPUT = -2,
42
+ XML_ENC_ERR_SPACE = -3,
43
+ XML_ENC_ERR_MEMORY = -4
44
+ } xmlCharEncError;
45
+
46
+ /*
47
+ * xmlCharEncoding:
48
+ *
49
+ * Predefined values for some standard encodings.
50
+ */
51
+ typedef enum {
52
+ XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
53
+ XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
54
+ XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
55
+ XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
56
+ XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
57
+ XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
58
+ XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
59
+ XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
60
+ XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
61
+ XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
62
+ XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
63
+ XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
64
+ XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
65
+ XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
66
+ XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
67
+ XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
68
+ XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
69
+ XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
70
+ XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
71
+ XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
72
+ XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
73
+ XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
74
+ XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
75
+ XML_CHAR_ENCODING_ASCII= 22,/* pure ASCII */
76
+ /* Available since 2.14.0 */
77
+ XML_CHAR_ENCODING_UTF16= 23,/* UTF-16 native */
78
+ XML_CHAR_ENCODING_HTML= 24,/* HTML (output only) */
79
+ XML_CHAR_ENCODING_8859_10= 25,/* ISO-8859-10 */
80
+ XML_CHAR_ENCODING_8859_11= 26,/* ISO-8859-11 */
81
+ XML_CHAR_ENCODING_8859_13= 27,/* ISO-8859-13 */
82
+ XML_CHAR_ENCODING_8859_14= 28,/* ISO-8859-14 */
83
+ XML_CHAR_ENCODING_8859_15= 29,/* ISO-8859-15 */
84
+ XML_CHAR_ENCODING_8859_16= 30 /* ISO-8859-16 */
85
+ } xmlCharEncoding;
86
+
87
+ typedef enum {
88
+ XML_ENC_INPUT = (1 << 0),
89
+ XML_ENC_OUTPUT = (1 << 1)
90
+ } xmlCharEncFlags;
91
+
92
+ /**
93
+ * xmlCharEncodingInputFunc:
94
+ * @out: a pointer to an array of bytes to store the UTF-8 result
95
+ * @outlen: the length of @out
96
+ * @in: a pointer to an array of chars in the original encoding
97
+ * @inlen: the length of @in
98
+ *
99
+ * Convert characters to UTF-8.
100
+ *
101
+ * On success, the value of @inlen after return is the number of
102
+ * bytes consumed and @outlen is the number of bytes produced.
103
+ *
104
+ * Returns the number of bytes written or an XML_ENC_ERR code.
105
+ */
106
+ typedef int (*xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
107
+ const unsigned char *in, int *inlen);
108
+
109
+
110
+ /**
111
+ * xmlCharEncodingOutputFunc:
112
+ * @out: a pointer to an array of bytes to store the result
113
+ * @outlen: the length of @out
114
+ * @in: a pointer to an array of UTF-8 chars
115
+ * @inlen: the length of @in
116
+ *
117
+ * Convert characters from UTF-8.
118
+ *
119
+ * On success, the value of @inlen after return is the number of
120
+ * bytes consumed and @outlen is the number of bytes produced.
121
+ *
122
+ * Returns the number of bytes written or an XML_ENC_ERR code.
123
+ */
124
+ typedef int (*xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
125
+ const unsigned char *in, int *inlen);
126
+
127
+
128
+ /**
129
+ * xmlCharEncConvFunc:
130
+ * @vctxt: conversion context
131
+ * @out: a pointer to an array of bytes to store the result
132
+ * @outlen: the length of @out
133
+ * @in: a pointer to an array of input bytes
134
+ * @inlen: the length of @in
135
+ * @flush: end of input
136
+ *
137
+ * Convert between character encodings.
138
+ *
139
+ * The value of @inlen after return is the number of bytes consumed
140
+ * and @outlen is the number of bytes produced.
141
+ *
142
+ * If the converter can consume partial multi-byte sequences, the
143
+ * @flush flag can be used to detect truncated sequences at EOF.
144
+ * Otherwise, the flag can be ignored.
145
+ *
146
+ * Returns an XML_ENC_ERR code.
147
+ */
148
+ typedef xmlCharEncError
149
+ (*xmlCharEncConvFunc)(void *vctxt, unsigned char *out, int *outlen,
150
+ const unsigned char *in, int *inlen, int flush);
151
+
152
+ /**
153
+ * xmlCharEncConvCtxtDtor:
154
+ * @vctxt: conversion context
155
+ *
156
+ * Free a conversion context.
157
+ */
158
+ typedef void
159
+ (*xmlCharEncConvCtxtDtor)(void *vctxt);
160
+
161
+ /*
162
+ * Block defining the handlers for non UTF-8 encodings.
163
+ *
164
+ * This structure will be made private.
165
+ */
166
+ typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
167
+ typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
168
+ struct _xmlCharEncodingHandler {
169
+ char *name XML_DEPRECATED_MEMBER;
170
+ union {
171
+ xmlCharEncConvFunc func;
172
+ xmlCharEncodingInputFunc legacyFunc;
173
+ } input XML_DEPRECATED_MEMBER;
174
+ union {
175
+ xmlCharEncConvFunc func;
176
+ xmlCharEncodingOutputFunc legacyFunc;
177
+ } output XML_DEPRECATED_MEMBER;
178
+ void *inputCtxt XML_DEPRECATED_MEMBER;
179
+ void *outputCtxt XML_DEPRECATED_MEMBER;
180
+ xmlCharEncConvCtxtDtor ctxtDtor XML_DEPRECATED_MEMBER;
181
+ int flags XML_DEPRECATED_MEMBER;
182
+ };
183
+
184
+ /**
185
+ * xmlCharEncConvImpl:
186
+ * @vctxt: user data
187
+ * @name: encoding name
188
+ * @flags: bit mask of flags
189
+ * @out: pointer to resulting handler
190
+ *
191
+ * If this function returns XML_ERR_OK, it must fill the @out
192
+ * pointer with an encoding handler. The handler can be obtained
193
+ * from xmlCharEncNewCustomHandler.
194
+ *
195
+ * @flags can contain XML_ENC_INPUT, XML_ENC_OUTPUT or both.
196
+ *
197
+ * Returns an xmlParserErrors code.
198
+ */
199
+ typedef xmlParserErrors
200
+ (*xmlCharEncConvImpl)(void *vctxt, const char *name, xmlCharEncFlags flags,
201
+ xmlCharEncodingHandler **out);
202
+
203
+ /*
204
+ * Interfaces for encoding handlers.
205
+ */
206
+ XML_DEPRECATED
207
+ XMLPUBFUN void
208
+ xmlInitCharEncodingHandlers (void);
209
+ XML_DEPRECATED
210
+ XMLPUBFUN void
211
+ xmlCleanupCharEncodingHandlers (void);
212
+ XMLPUBFUN void
213
+ xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
214
+ XMLPUBFUN xmlParserErrors
215
+ xmlLookupCharEncodingHandler (xmlCharEncoding enc,
216
+ xmlCharEncodingHandlerPtr *out);
217
+ XMLPUBFUN xmlParserErrors
218
+ xmlOpenCharEncodingHandler (const char *name,
219
+ int output,
220
+ xmlCharEncodingHandlerPtr *out);
221
+ XMLPUBFUN xmlParserErrors
222
+ xmlCreateCharEncodingHandler (const char *name,
223
+ xmlCharEncFlags flags,
224
+ xmlCharEncConvImpl impl,
225
+ void *implCtxt,
226
+ xmlCharEncodingHandlerPtr *out);
227
+ XMLPUBFUN xmlCharEncodingHandlerPtr
228
+ xmlGetCharEncodingHandler (xmlCharEncoding enc);
229
+ XMLPUBFUN xmlCharEncodingHandlerPtr
230
+ xmlFindCharEncodingHandler (const char *name);
231
+ XMLPUBFUN xmlCharEncodingHandlerPtr
232
+ xmlNewCharEncodingHandler (const char *name,
233
+ xmlCharEncodingInputFunc input,
234
+ xmlCharEncodingOutputFunc output);
235
+ XMLPUBFUN xmlParserErrors
236
+ xmlCharEncNewCustomHandler (const char *name,
237
+ xmlCharEncConvFunc input,
238
+ xmlCharEncConvFunc output,
239
+ xmlCharEncConvCtxtDtor ctxtDtor,
240
+ void *inputCtxt,
241
+ void *outputCtxt,
242
+ xmlCharEncodingHandler **out);
243
+
244
+ /*
245
+ * Interfaces for encoding names and aliases.
246
+ */
247
+ XMLPUBFUN int
248
+ xmlAddEncodingAlias (const char *name,
249
+ const char *alias);
250
+ XMLPUBFUN int
251
+ xmlDelEncodingAlias (const char *alias);
252
+ XMLPUBFUN const char *
253
+ xmlGetEncodingAlias (const char *alias);
254
+ XMLPUBFUN void
255
+ xmlCleanupEncodingAliases (void);
256
+ XMLPUBFUN xmlCharEncoding
257
+ xmlParseCharEncoding (const char *name);
258
+ XMLPUBFUN const char *
259
+ xmlGetCharEncodingName (xmlCharEncoding enc);
260
+
261
+ /*
262
+ * Interfaces directly used by the parsers.
263
+ */
264
+ XMLPUBFUN xmlCharEncoding
265
+ xmlDetectCharEncoding (const unsigned char *in,
266
+ int len);
267
+
268
+ /** DOC_DISABLE */
269
+ struct _xmlBuffer;
270
+ /** DOC_ENABLE */
271
+ XMLPUBFUN int
272
+ xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
273
+ struct _xmlBuffer *out,
274
+ struct _xmlBuffer *in);
275
+
276
+ XMLPUBFUN int
277
+ xmlCharEncInFunc (xmlCharEncodingHandler *handler,
278
+ struct _xmlBuffer *out,
279
+ struct _xmlBuffer *in);
280
+ XML_DEPRECATED
281
+ XMLPUBFUN int
282
+ xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
283
+ struct _xmlBuffer *out,
284
+ struct _xmlBuffer *in);
285
+ XMLPUBFUN int
286
+ xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
287
+
288
+ /*
289
+ * Export a few useful functions
290
+ */
291
+ #ifdef LIBXML_OUTPUT_ENABLED
292
+ XMLPUBFUN int
293
+ xmlUTF8ToIsolat1 (unsigned char *out,
294
+ int *outlen,
295
+ const unsigned char *in,
296
+ int *inlen);
297
+ #endif /* LIBXML_OUTPUT_ENABLED */
298
+ XMLPUBFUN int
299
+ xmlIsolat1ToUTF8 (unsigned char *out,
300
+ int *outlen,
301
+ const unsigned char *in,
302
+ int *inlen);
303
+ #ifdef __cplusplus
304
+ }
305
+ #endif
306
+
307
+ #endif /* __XML_CHAR_ENCODING_H__ */