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,94 @@
1
+ /**
2
+ * Summary: library of generic URI related routines
3
+ * Description: library of generic URI related routines
4
+ * Implements RFC 2396
5
+ *
6
+ * Copy: See Copyright for the status of this software.
7
+ *
8
+ * Author: Daniel Veillard
9
+ */
10
+
11
+ #ifndef __XML_URI_H__
12
+ #define __XML_URI_H__
13
+
14
+ #include <libxml/xmlversion.h>
15
+ #include <libxml/tree.h>
16
+
17
+ #ifdef __cplusplus
18
+ extern "C" {
19
+ #endif
20
+
21
+ /**
22
+ * xmlURI:
23
+ *
24
+ * A parsed URI reference. This is a struct containing the various fields
25
+ * as described in RFC 2396 but separated for further processing.
26
+ *
27
+ * Note: query is a deprecated field which is incorrectly unescaped.
28
+ * query_raw takes precedence over query if the former is set.
29
+ * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
30
+ */
31
+ typedef struct _xmlURI xmlURI;
32
+ typedef xmlURI *xmlURIPtr;
33
+ struct _xmlURI {
34
+ char *scheme; /* the URI scheme */
35
+ char *opaque; /* opaque part */
36
+ char *authority; /* the authority part */
37
+ char *server; /* the server part */
38
+ char *user; /* the user part */
39
+ int port; /* the port number */
40
+ char *path; /* the path string */
41
+ char *query; /* the query string (deprecated - use with caution) */
42
+ char *fragment; /* the fragment identifier */
43
+ int cleanup; /* parsing potentially unclean URI */
44
+ char *query_raw; /* the query string (as it appears in the URI) */
45
+ };
46
+
47
+ /*
48
+ * This function is in tree.h:
49
+ * xmlChar * xmlNodeGetBase (xmlDocPtr doc,
50
+ * xmlNodePtr cur);
51
+ */
52
+ XMLPUBFUN xmlURIPtr
53
+ xmlCreateURI (void);
54
+ XMLPUBFUN xmlChar *
55
+ xmlBuildURI (const xmlChar *URI,
56
+ const xmlChar *base);
57
+ XMLPUBFUN xmlChar *
58
+ xmlBuildRelativeURI (const xmlChar *URI,
59
+ const xmlChar *base);
60
+ XMLPUBFUN xmlURIPtr
61
+ xmlParseURI (const char *str);
62
+ XMLPUBFUN xmlURIPtr
63
+ xmlParseURIRaw (const char *str,
64
+ int raw);
65
+ XMLPUBFUN int
66
+ xmlParseURIReference (xmlURIPtr uri,
67
+ const char *str);
68
+ XMLPUBFUN xmlChar *
69
+ xmlSaveUri (xmlURIPtr uri);
70
+ XMLPUBFUN void
71
+ xmlPrintURI (FILE *stream,
72
+ xmlURIPtr uri);
73
+ XMLPUBFUN xmlChar *
74
+ xmlURIEscapeStr (const xmlChar *str,
75
+ const xmlChar *list);
76
+ XMLPUBFUN char *
77
+ xmlURIUnescapeString (const char *str,
78
+ int len,
79
+ char *target);
80
+ XMLPUBFUN int
81
+ xmlNormalizeURIPath (char *path);
82
+ XMLPUBFUN xmlChar *
83
+ xmlURIEscape (const xmlChar *str);
84
+ XMLPUBFUN void
85
+ xmlFreeURI (xmlURIPtr uri);
86
+ XMLPUBFUN xmlChar*
87
+ xmlCanonicPath (const xmlChar *path);
88
+ XMLPUBFUN xmlChar*
89
+ xmlPathToURI (const xmlChar *path);
90
+
91
+ #ifdef __cplusplus
92
+ }
93
+ #endif
94
+ #endif /* __XML_URI_H__ */
@@ -0,0 +1,448 @@
1
+ /*
2
+ * Summary: The DTD validation
3
+ * Description: API for the DTD handling and the validity checking
4
+ *
5
+ * Copy: See Copyright for the status of this software.
6
+ *
7
+ * Author: Daniel Veillard
8
+ */
9
+
10
+
11
+ #ifndef __XML_VALID_H__
12
+ #define __XML_VALID_H__
13
+
14
+ #include <libxml/xmlversion.h>
15
+ #include <libxml/xmlerror.h>
16
+ #include <libxml/tree.h>
17
+ #include <libxml/list.h>
18
+ #include <libxml/xmlautomata.h>
19
+ #include <libxml/xmlregexp.h>
20
+
21
+ #ifdef __cplusplus
22
+ extern "C" {
23
+ #endif
24
+
25
+ /*
26
+ * Validation state added for non-determinist content model.
27
+ */
28
+ typedef struct _xmlValidState xmlValidState;
29
+ typedef xmlValidState *xmlValidStatePtr;
30
+
31
+ /**
32
+ * xmlValidityErrorFunc:
33
+ * @ctx: usually an xmlValidCtxtPtr to a validity error context,
34
+ * but comes from ctxt->userData (which normally contains such
35
+ * a pointer); ctxt->userData can be changed by the user.
36
+ * @msg: the string to format *printf like vararg
37
+ * @...: remaining arguments to the format
38
+ *
39
+ * Callback called when a validity error is found. This is a message
40
+ * oriented function similar to an *printf function.
41
+ */
42
+ typedef void (*xmlValidityErrorFunc) (void *ctx,
43
+ const char *msg,
44
+ ...) LIBXML_ATTR_FORMAT(2,3);
45
+
46
+ /**
47
+ * xmlValidityWarningFunc:
48
+ * @ctx: usually an xmlValidCtxtPtr to a validity error context,
49
+ * but comes from ctxt->userData (which normally contains such
50
+ * a pointer); ctxt->userData can be changed by the user.
51
+ * @msg: the string to format *printf like vararg
52
+ * @...: remaining arguments to the format
53
+ *
54
+ * Callback called when a validity warning is found. This is a message
55
+ * oriented function similar to an *printf function.
56
+ */
57
+ typedef void (*xmlValidityWarningFunc) (void *ctx,
58
+ const char *msg,
59
+ ...) LIBXML_ATTR_FORMAT(2,3);
60
+
61
+ /*
62
+ * xmlValidCtxt:
63
+ * An xmlValidCtxt is used for error reporting when validating.
64
+ */
65
+ typedef struct _xmlValidCtxt xmlValidCtxt;
66
+ typedef xmlValidCtxt *xmlValidCtxtPtr;
67
+ struct _xmlValidCtxt {
68
+ void *userData; /* user specific data block */
69
+ xmlValidityErrorFunc error; /* the callback in case of errors */
70
+ xmlValidityWarningFunc warning; /* the callback in case of warning */
71
+
72
+ /* Node analysis stack used when validating within entities */
73
+ xmlNodePtr node; /* Current parsed Node */
74
+ int nodeNr; /* Depth of the parsing stack */
75
+ int nodeMax; /* Max depth of the parsing stack */
76
+ xmlNodePtr *nodeTab; /* array of nodes */
77
+
78
+ unsigned int flags; /* internal flags */
79
+ xmlDocPtr doc; /* the document */
80
+ int valid; /* temporary validity check result */
81
+
82
+ /* state state used for non-determinist content validation */
83
+ xmlValidState *vstate; /* current state */
84
+ int vstateNr; /* Depth of the validation stack */
85
+ int vstateMax; /* Max depth of the validation stack */
86
+ xmlValidState *vstateTab; /* array of validation states */
87
+
88
+ #ifdef LIBXML_REGEXP_ENABLED
89
+ xmlAutomataPtr am; /* the automata */
90
+ xmlAutomataStatePtr state; /* used to build the automata */
91
+ #else
92
+ void *am;
93
+ void *state;
94
+ #endif
95
+ };
96
+
97
+ /*
98
+ * ALL notation declarations are stored in a table.
99
+ * There is one table per DTD.
100
+ */
101
+
102
+ typedef struct _xmlHashTable xmlNotationTable;
103
+ typedef xmlNotationTable *xmlNotationTablePtr;
104
+
105
+ /*
106
+ * ALL element declarations are stored in a table.
107
+ * There is one table per DTD.
108
+ */
109
+
110
+ typedef struct _xmlHashTable xmlElementTable;
111
+ typedef xmlElementTable *xmlElementTablePtr;
112
+
113
+ /*
114
+ * ALL attribute declarations are stored in a table.
115
+ * There is one table per DTD.
116
+ */
117
+
118
+ typedef struct _xmlHashTable xmlAttributeTable;
119
+ typedef xmlAttributeTable *xmlAttributeTablePtr;
120
+
121
+ /*
122
+ * ALL IDs attributes are stored in a table.
123
+ * There is one table per document.
124
+ */
125
+
126
+ typedef struct _xmlHashTable xmlIDTable;
127
+ typedef xmlIDTable *xmlIDTablePtr;
128
+
129
+ /*
130
+ * ALL Refs attributes are stored in a table.
131
+ * There is one table per document.
132
+ */
133
+
134
+ typedef struct _xmlHashTable xmlRefTable;
135
+ typedef xmlRefTable *xmlRefTablePtr;
136
+
137
+ /* Notation */
138
+ XMLPUBFUN xmlNotationPtr
139
+ xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
140
+ xmlDtdPtr dtd,
141
+ const xmlChar *name,
142
+ const xmlChar *PublicID,
143
+ const xmlChar *SystemID);
144
+ #ifdef LIBXML_TREE_ENABLED
145
+ XMLPUBFUN xmlNotationTablePtr
146
+ xmlCopyNotationTable (xmlNotationTablePtr table);
147
+ #endif /* LIBXML_TREE_ENABLED */
148
+ XMLPUBFUN void
149
+ xmlFreeNotationTable (xmlNotationTablePtr table);
150
+ #ifdef LIBXML_OUTPUT_ENABLED
151
+ XMLPUBFUN void
152
+ xmlDumpNotationDecl (xmlBufferPtr buf,
153
+ xmlNotationPtr nota);
154
+ XMLPUBFUN void
155
+ xmlDumpNotationTable (xmlBufferPtr buf,
156
+ xmlNotationTablePtr table);
157
+ #endif /* LIBXML_OUTPUT_ENABLED */
158
+
159
+ /* Element Content */
160
+ /* the non Doc version are being deprecated */
161
+ XMLPUBFUN xmlElementContentPtr
162
+ xmlNewElementContent (const xmlChar *name,
163
+ xmlElementContentType type);
164
+ XMLPUBFUN xmlElementContentPtr
165
+ xmlCopyElementContent (xmlElementContentPtr content);
166
+ XMLPUBFUN void
167
+ xmlFreeElementContent (xmlElementContentPtr cur);
168
+ /* the new versions with doc argument */
169
+ XMLPUBFUN xmlElementContentPtr
170
+ xmlNewDocElementContent (xmlDocPtr doc,
171
+ const xmlChar *name,
172
+ xmlElementContentType type);
173
+ XMLPUBFUN xmlElementContentPtr
174
+ xmlCopyDocElementContent(xmlDocPtr doc,
175
+ xmlElementContentPtr content);
176
+ XMLPUBFUN void
177
+ xmlFreeDocElementContent(xmlDocPtr doc,
178
+ xmlElementContentPtr cur);
179
+ XMLPUBFUN void
180
+ xmlSnprintfElementContent(char *buf,
181
+ int size,
182
+ xmlElementContentPtr content,
183
+ int englob);
184
+ #ifdef LIBXML_OUTPUT_ENABLED
185
+ /* DEPRECATED */
186
+ XMLPUBFUN void
187
+ xmlSprintfElementContent(char *buf,
188
+ xmlElementContentPtr content,
189
+ int englob);
190
+ #endif /* LIBXML_OUTPUT_ENABLED */
191
+ /* DEPRECATED */
192
+
193
+ /* Element */
194
+ XMLPUBFUN xmlElementPtr
195
+ xmlAddElementDecl (xmlValidCtxtPtr ctxt,
196
+ xmlDtdPtr dtd,
197
+ const xmlChar *name,
198
+ xmlElementTypeVal type,
199
+ xmlElementContentPtr content);
200
+ #ifdef LIBXML_TREE_ENABLED
201
+ XMLPUBFUN xmlElementTablePtr
202
+ xmlCopyElementTable (xmlElementTablePtr table);
203
+ #endif /* LIBXML_TREE_ENABLED */
204
+ XMLPUBFUN void
205
+ xmlFreeElementTable (xmlElementTablePtr table);
206
+ #ifdef LIBXML_OUTPUT_ENABLED
207
+ XMLPUBFUN void
208
+ xmlDumpElementTable (xmlBufferPtr buf,
209
+ xmlElementTablePtr table);
210
+ XMLPUBFUN void
211
+ xmlDumpElementDecl (xmlBufferPtr buf,
212
+ xmlElementPtr elem);
213
+ #endif /* LIBXML_OUTPUT_ENABLED */
214
+
215
+ /* Enumeration */
216
+ XMLPUBFUN xmlEnumerationPtr
217
+ xmlCreateEnumeration (const xmlChar *name);
218
+ XMLPUBFUN void
219
+ xmlFreeEnumeration (xmlEnumerationPtr cur);
220
+ #ifdef LIBXML_TREE_ENABLED
221
+ XMLPUBFUN xmlEnumerationPtr
222
+ xmlCopyEnumeration (xmlEnumerationPtr cur);
223
+ #endif /* LIBXML_TREE_ENABLED */
224
+
225
+ /* Attribute */
226
+ XMLPUBFUN xmlAttributePtr
227
+ xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
228
+ xmlDtdPtr dtd,
229
+ const xmlChar *elem,
230
+ const xmlChar *name,
231
+ const xmlChar *ns,
232
+ xmlAttributeType type,
233
+ xmlAttributeDefault def,
234
+ const xmlChar *defaultValue,
235
+ xmlEnumerationPtr tree);
236
+ #ifdef LIBXML_TREE_ENABLED
237
+ XMLPUBFUN xmlAttributeTablePtr
238
+ xmlCopyAttributeTable (xmlAttributeTablePtr table);
239
+ #endif /* LIBXML_TREE_ENABLED */
240
+ XMLPUBFUN void
241
+ xmlFreeAttributeTable (xmlAttributeTablePtr table);
242
+ #ifdef LIBXML_OUTPUT_ENABLED
243
+ XMLPUBFUN void
244
+ xmlDumpAttributeTable (xmlBufferPtr buf,
245
+ xmlAttributeTablePtr table);
246
+ XMLPUBFUN void
247
+ xmlDumpAttributeDecl (xmlBufferPtr buf,
248
+ xmlAttributePtr attr);
249
+ #endif /* LIBXML_OUTPUT_ENABLED */
250
+
251
+ /* IDs */
252
+ XMLPUBFUN xmlIDPtr
253
+ xmlAddID (xmlValidCtxtPtr ctxt,
254
+ xmlDocPtr doc,
255
+ const xmlChar *value,
256
+ xmlAttrPtr attr);
257
+ XMLPUBFUN void
258
+ xmlFreeIDTable (xmlIDTablePtr table);
259
+ XMLPUBFUN xmlAttrPtr
260
+ xmlGetID (xmlDocPtr doc,
261
+ const xmlChar *ID);
262
+ XMLPUBFUN int
263
+ xmlIsID (xmlDocPtr doc,
264
+ xmlNodePtr elem,
265
+ xmlAttrPtr attr);
266
+ XMLPUBFUN int
267
+ xmlRemoveID (xmlDocPtr doc,
268
+ xmlAttrPtr attr);
269
+
270
+ /* IDREFs */
271
+ XML_DEPRECATED
272
+ XMLPUBFUN xmlRefPtr
273
+ xmlAddRef (xmlValidCtxtPtr ctxt,
274
+ xmlDocPtr doc,
275
+ const xmlChar *value,
276
+ xmlAttrPtr attr);
277
+ XML_DEPRECATED
278
+ XMLPUBFUN void
279
+ xmlFreeRefTable (xmlRefTablePtr table);
280
+ XML_DEPRECATED
281
+ XMLPUBFUN int
282
+ xmlIsRef (xmlDocPtr doc,
283
+ xmlNodePtr elem,
284
+ xmlAttrPtr attr);
285
+ XML_DEPRECATED
286
+ XMLPUBFUN int
287
+ xmlRemoveRef (xmlDocPtr doc,
288
+ xmlAttrPtr attr);
289
+ XML_DEPRECATED
290
+ XMLPUBFUN xmlListPtr
291
+ xmlGetRefs (xmlDocPtr doc,
292
+ const xmlChar *ID);
293
+
294
+ /**
295
+ * The public function calls related to validity checking.
296
+ */
297
+ #ifdef LIBXML_VALID_ENABLED
298
+ /* Allocate/Release Validation Contexts */
299
+ XMLPUBFUN xmlValidCtxtPtr
300
+ xmlNewValidCtxt(void);
301
+ XMLPUBFUN void
302
+ xmlFreeValidCtxt(xmlValidCtxtPtr);
303
+
304
+ XMLPUBFUN int
305
+ xmlValidateRoot (xmlValidCtxtPtr ctxt,
306
+ xmlDocPtr doc);
307
+ XMLPUBFUN int
308
+ xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
309
+ xmlDocPtr doc,
310
+ xmlElementPtr elem);
311
+ XMLPUBFUN xmlChar *
312
+ xmlValidNormalizeAttributeValue(xmlDocPtr doc,
313
+ xmlNodePtr elem,
314
+ const xmlChar *name,
315
+ const xmlChar *value);
316
+ XMLPUBFUN xmlChar *
317
+ xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
318
+ xmlDocPtr doc,
319
+ xmlNodePtr elem,
320
+ const xmlChar *name,
321
+ const xmlChar *value);
322
+ XMLPUBFUN int
323
+ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
324
+ xmlDocPtr doc,
325
+ xmlAttributePtr attr);
326
+ XMLPUBFUN int
327
+ xmlValidateAttributeValue(xmlAttributeType type,
328
+ const xmlChar *value);
329
+ XMLPUBFUN int
330
+ xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
331
+ xmlDocPtr doc,
332
+ xmlNotationPtr nota);
333
+ XMLPUBFUN int
334
+ xmlValidateDtd (xmlValidCtxtPtr ctxt,
335
+ xmlDocPtr doc,
336
+ xmlDtdPtr dtd);
337
+ XMLPUBFUN int
338
+ xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
339
+ xmlDocPtr doc);
340
+ XMLPUBFUN int
341
+ xmlValidateDocument (xmlValidCtxtPtr ctxt,
342
+ xmlDocPtr doc);
343
+ XMLPUBFUN int
344
+ xmlValidateElement (xmlValidCtxtPtr ctxt,
345
+ xmlDocPtr doc,
346
+ xmlNodePtr elem);
347
+ XMLPUBFUN int
348
+ xmlValidateOneElement (xmlValidCtxtPtr ctxt,
349
+ xmlDocPtr doc,
350
+ xmlNodePtr elem);
351
+ XMLPUBFUN int
352
+ xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
353
+ xmlDocPtr doc,
354
+ xmlNodePtr elem,
355
+ xmlAttrPtr attr,
356
+ const xmlChar *value);
357
+ XMLPUBFUN int
358
+ xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
359
+ xmlDocPtr doc,
360
+ xmlNodePtr elem,
361
+ const xmlChar *prefix,
362
+ xmlNsPtr ns,
363
+ const xmlChar *value);
364
+ XMLPUBFUN int
365
+ xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
366
+ xmlDocPtr doc);
367
+ #endif /* LIBXML_VALID_ENABLED */
368
+
369
+ #if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
370
+ XMLPUBFUN int
371
+ xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
372
+ xmlDocPtr doc,
373
+ const xmlChar *notationName);
374
+ #endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
375
+
376
+ XMLPUBFUN int
377
+ xmlIsMixedElement (xmlDocPtr doc,
378
+ const xmlChar *name);
379
+ XMLPUBFUN xmlAttributePtr
380
+ xmlGetDtdAttrDesc (xmlDtdPtr dtd,
381
+ const xmlChar *elem,
382
+ const xmlChar *name);
383
+ XMLPUBFUN xmlAttributePtr
384
+ xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
385
+ const xmlChar *elem,
386
+ const xmlChar *name,
387
+ const xmlChar *prefix);
388
+ XMLPUBFUN xmlNotationPtr
389
+ xmlGetDtdNotationDesc (xmlDtdPtr dtd,
390
+ const xmlChar *name);
391
+ XMLPUBFUN xmlElementPtr
392
+ xmlGetDtdQElementDesc (xmlDtdPtr dtd,
393
+ const xmlChar *name,
394
+ const xmlChar *prefix);
395
+ XMLPUBFUN xmlElementPtr
396
+ xmlGetDtdElementDesc (xmlDtdPtr dtd,
397
+ const xmlChar *name);
398
+
399
+ #ifdef LIBXML_VALID_ENABLED
400
+
401
+ XMLPUBFUN int
402
+ xmlValidGetPotentialChildren(xmlElementContent *ctree,
403
+ const xmlChar **names,
404
+ int *len,
405
+ int max);
406
+
407
+ XMLPUBFUN int
408
+ xmlValidGetValidElements(xmlNode *prev,
409
+ xmlNode *next,
410
+ const xmlChar **names,
411
+ int max);
412
+ XMLPUBFUN int
413
+ xmlValidateNameValue (const xmlChar *value);
414
+ XMLPUBFUN int
415
+ xmlValidateNamesValue (const xmlChar *value);
416
+ XMLPUBFUN int
417
+ xmlValidateNmtokenValue (const xmlChar *value);
418
+ XMLPUBFUN int
419
+ xmlValidateNmtokensValue(const xmlChar *value);
420
+
421
+ #ifdef LIBXML_REGEXP_ENABLED
422
+ /*
423
+ * Validation based on the regexp support
424
+ */
425
+ XMLPUBFUN int
426
+ xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
427
+ xmlElementPtr elem);
428
+
429
+ XMLPUBFUN int
430
+ xmlValidatePushElement (xmlValidCtxtPtr ctxt,
431
+ xmlDocPtr doc,
432
+ xmlNodePtr elem,
433
+ const xmlChar *qname);
434
+ XMLPUBFUN int
435
+ xmlValidatePushCData (xmlValidCtxtPtr ctxt,
436
+ const xmlChar *data,
437
+ int len);
438
+ XMLPUBFUN int
439
+ xmlValidatePopElement (xmlValidCtxtPtr ctxt,
440
+ xmlDocPtr doc,
441
+ xmlNodePtr elem,
442
+ const xmlChar *qname);
443
+ #endif /* LIBXML_REGEXP_ENABLED */
444
+ #endif /* LIBXML_VALID_ENABLED */
445
+ #ifdef __cplusplus
446
+ }
447
+ #endif
448
+ #endif /* __XML_VALID_H__ */
@@ -0,0 +1,129 @@
1
+ /*
2
+ * Summary: implementation of XInclude
3
+ * Description: API to handle XInclude processing,
4
+ * implements the
5
+ * World Wide Web Consortium Last Call Working Draft 10 November 2003
6
+ * http://www.w3.org/TR/2003/WD-xinclude-20031110
7
+ *
8
+ * Copy: See Copyright for the status of this software.
9
+ *
10
+ * Author: Daniel Veillard
11
+ */
12
+
13
+ #ifndef __XML_XINCLUDE_H__
14
+ #define __XML_XINCLUDE_H__
15
+
16
+ #include <libxml/xmlversion.h>
17
+ #include <libxml/tree.h>
18
+
19
+ #ifdef LIBXML_XINCLUDE_ENABLED
20
+
21
+ #ifdef __cplusplus
22
+ extern "C" {
23
+ #endif
24
+
25
+ /**
26
+ * XINCLUDE_NS:
27
+ *
28
+ * Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
29
+ */
30
+ #define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude"
31
+ /**
32
+ * XINCLUDE_OLD_NS:
33
+ *
34
+ * Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude
35
+ */
36
+ #define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude"
37
+ /**
38
+ * XINCLUDE_NODE:
39
+ *
40
+ * Macro defining "include"
41
+ */
42
+ #define XINCLUDE_NODE (const xmlChar *) "include"
43
+ /**
44
+ * XINCLUDE_FALLBACK:
45
+ *
46
+ * Macro defining "fallback"
47
+ */
48
+ #define XINCLUDE_FALLBACK (const xmlChar *) "fallback"
49
+ /**
50
+ * XINCLUDE_HREF:
51
+ *
52
+ * Macro defining "href"
53
+ */
54
+ #define XINCLUDE_HREF (const xmlChar *) "href"
55
+ /**
56
+ * XINCLUDE_PARSE:
57
+ *
58
+ * Macro defining "parse"
59
+ */
60
+ #define XINCLUDE_PARSE (const xmlChar *) "parse"
61
+ /**
62
+ * XINCLUDE_PARSE_XML:
63
+ *
64
+ * Macro defining "xml"
65
+ */
66
+ #define XINCLUDE_PARSE_XML (const xmlChar *) "xml"
67
+ /**
68
+ * XINCLUDE_PARSE_TEXT:
69
+ *
70
+ * Macro defining "text"
71
+ */
72
+ #define XINCLUDE_PARSE_TEXT (const xmlChar *) "text"
73
+ /**
74
+ * XINCLUDE_PARSE_ENCODING:
75
+ *
76
+ * Macro defining "encoding"
77
+ */
78
+ #define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding"
79
+ /**
80
+ * XINCLUDE_PARSE_XPOINTER:
81
+ *
82
+ * Macro defining "xpointer"
83
+ */
84
+ #define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer"
85
+
86
+ typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
87
+ typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
88
+
89
+ /*
90
+ * standalone processing
91
+ */
92
+ XMLPUBFUN int
93
+ xmlXIncludeProcess (xmlDocPtr doc);
94
+ XMLPUBFUN int
95
+ xmlXIncludeProcessFlags (xmlDocPtr doc,
96
+ int flags);
97
+ XMLPUBFUN int
98
+ xmlXIncludeProcessFlagsData(xmlDocPtr doc,
99
+ int flags,
100
+ void *data);
101
+ XMLPUBFUN int
102
+ xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
103
+ int flags,
104
+ void *data);
105
+ XMLPUBFUN int
106
+ xmlXIncludeProcessTree (xmlNodePtr tree);
107
+ XMLPUBFUN int
108
+ xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
109
+ int flags);
110
+ /*
111
+ * contextual processing
112
+ */
113
+ XMLPUBFUN xmlXIncludeCtxtPtr
114
+ xmlXIncludeNewContext (xmlDocPtr doc);
115
+ XMLPUBFUN int
116
+ xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
117
+ int flags);
118
+ XMLPUBFUN void
119
+ xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
120
+ XMLPUBFUN int
121
+ xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
122
+ xmlNodePtr tree);
123
+ #ifdef __cplusplus
124
+ }
125
+ #endif
126
+
127
+ #endif /* LIBXML_XINCLUDE_ENABLED */
128
+
129
+ #endif /* __XML_XINCLUDE_H__ */