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,147 @@
1
+ /*
2
+ * Summary: specific APIs to process HTML tree, especially serialization
3
+ * Description: this module implements a few function needed to process
4
+ * tree in an HTML specific way.
5
+ *
6
+ * Copy: See Copyright for the status of this software.
7
+ *
8
+ * Author: Daniel Veillard
9
+ */
10
+
11
+ #ifndef __HTML_TREE_H__
12
+ #define __HTML_TREE_H__
13
+
14
+ #include <stdio.h>
15
+ #include <libxml/xmlversion.h>
16
+ #include <libxml/tree.h>
17
+ #include <libxml/HTMLparser.h>
18
+
19
+ #ifdef LIBXML_HTML_ENABLED
20
+
21
+ #ifdef __cplusplus
22
+ extern "C" {
23
+ #endif
24
+
25
+
26
+ /**
27
+ * HTML_TEXT_NODE:
28
+ *
29
+ * Macro. A text node in a HTML document is really implemented
30
+ * the same way as a text node in an XML document.
31
+ */
32
+ #define HTML_TEXT_NODE XML_TEXT_NODE
33
+ /**
34
+ * HTML_ENTITY_REF_NODE:
35
+ *
36
+ * Macro. An entity reference in a HTML document is really implemented
37
+ * the same way as an entity reference in an XML document.
38
+ */
39
+ #define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
40
+ /**
41
+ * HTML_COMMENT_NODE:
42
+ *
43
+ * Macro. A comment in a HTML document is really implemented
44
+ * the same way as a comment in an XML document.
45
+ */
46
+ #define HTML_COMMENT_NODE XML_COMMENT_NODE
47
+ /**
48
+ * HTML_PRESERVE_NODE:
49
+ *
50
+ * Macro. A preserved node in a HTML document is really implemented
51
+ * the same way as a CDATA section in an XML document.
52
+ */
53
+ #define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
54
+ /**
55
+ * HTML_PI_NODE:
56
+ *
57
+ * Macro. A processing instruction in a HTML document is really implemented
58
+ * the same way as a processing instruction in an XML document.
59
+ */
60
+ #define HTML_PI_NODE XML_PI_NODE
61
+
62
+ XMLPUBFUN htmlDocPtr
63
+ htmlNewDoc (const xmlChar *URI,
64
+ const xmlChar *ExternalID);
65
+ XMLPUBFUN htmlDocPtr
66
+ htmlNewDocNoDtD (const xmlChar *URI,
67
+ const xmlChar *ExternalID);
68
+ XMLPUBFUN const xmlChar *
69
+ htmlGetMetaEncoding (htmlDocPtr doc);
70
+ XMLPUBFUN int
71
+ htmlSetMetaEncoding (htmlDocPtr doc,
72
+ const xmlChar *encoding);
73
+ #ifdef LIBXML_OUTPUT_ENABLED
74
+ XMLPUBFUN void
75
+ htmlDocDumpMemory (xmlDocPtr cur,
76
+ xmlChar **mem,
77
+ int *size);
78
+ XMLPUBFUN void
79
+ htmlDocDumpMemoryFormat (xmlDocPtr cur,
80
+ xmlChar **mem,
81
+ int *size,
82
+ int format);
83
+ XMLPUBFUN int
84
+ htmlDocDump (FILE *f,
85
+ xmlDocPtr cur);
86
+ XMLPUBFUN int
87
+ htmlSaveFile (const char *filename,
88
+ xmlDocPtr cur);
89
+ XMLPUBFUN int
90
+ htmlNodeDump (xmlBufferPtr buf,
91
+ xmlDocPtr doc,
92
+ xmlNodePtr cur);
93
+ XMLPUBFUN void
94
+ htmlNodeDumpFile (FILE *out,
95
+ xmlDocPtr doc,
96
+ xmlNodePtr cur);
97
+ XMLPUBFUN int
98
+ htmlNodeDumpFileFormat (FILE *out,
99
+ xmlDocPtr doc,
100
+ xmlNodePtr cur,
101
+ const char *encoding,
102
+ int format);
103
+ XMLPUBFUN int
104
+ htmlSaveFileEnc (const char *filename,
105
+ xmlDocPtr cur,
106
+ const char *encoding);
107
+ XMLPUBFUN int
108
+ htmlSaveFileFormat (const char *filename,
109
+ xmlDocPtr cur,
110
+ const char *encoding,
111
+ int format);
112
+
113
+ XMLPUBFUN void
114
+ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
115
+ xmlDocPtr doc,
116
+ xmlNodePtr cur,
117
+ const char *encoding,
118
+ int format);
119
+ XMLPUBFUN void
120
+ htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
121
+ xmlDocPtr cur,
122
+ const char *encoding);
123
+ XMLPUBFUN void
124
+ htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
125
+ xmlDocPtr cur,
126
+ const char *encoding,
127
+ int format);
128
+ XMLPUBFUN void
129
+ htmlNodeDumpOutput (xmlOutputBufferPtr buf,
130
+ xmlDocPtr doc,
131
+ xmlNodePtr cur,
132
+ const char *encoding);
133
+
134
+ #endif /* LIBXML_OUTPUT_ENABLED */
135
+
136
+ XMLPUBFUN int
137
+ htmlIsBooleanAttr (const xmlChar *name);
138
+
139
+
140
+ #ifdef __cplusplus
141
+ }
142
+ #endif
143
+
144
+ #endif /* LIBXML_HTML_ENABLED */
145
+
146
+ #endif /* __HTML_TREE_H__ */
147
+
@@ -0,0 +1,204 @@
1
+ /*
2
+ * Summary: Old SAX version 1 handler, deprecated
3
+ * Description: DEPRECATED set of SAX version 1 interfaces used to
4
+ * build the DOM tree.
5
+ *
6
+ * Copy: See Copyright for the status of this software.
7
+ *
8
+ * Author: Daniel Veillard
9
+ */
10
+
11
+
12
+ #ifndef __XML_SAX_H__
13
+ #define __XML_SAX_H__
14
+
15
+ #include <stdio.h>
16
+ #include <stdlib.h>
17
+ #include <libxml/xmlversion.h>
18
+ #include <libxml/parser.h>
19
+
20
+ #ifdef LIBXML_LEGACY_ENABLED
21
+
22
+ #ifdef __cplusplus
23
+ extern "C" {
24
+ #endif
25
+ XML_DEPRECATED
26
+ XMLPUBFUN const xmlChar *
27
+ getPublicId (void *ctx);
28
+ XML_DEPRECATED
29
+ XMLPUBFUN const xmlChar *
30
+ getSystemId (void *ctx);
31
+ XML_DEPRECATED
32
+ XMLPUBFUN void
33
+ setDocumentLocator (void *ctx,
34
+ xmlSAXLocatorPtr loc);
35
+
36
+ XML_DEPRECATED
37
+ XMLPUBFUN int
38
+ getLineNumber (void *ctx);
39
+ XML_DEPRECATED
40
+ XMLPUBFUN int
41
+ getColumnNumber (void *ctx);
42
+
43
+ XML_DEPRECATED
44
+ XMLPUBFUN int
45
+ isStandalone (void *ctx);
46
+ XML_DEPRECATED
47
+ XMLPUBFUN int
48
+ hasInternalSubset (void *ctx);
49
+ XML_DEPRECATED
50
+ XMLPUBFUN int
51
+ hasExternalSubset (void *ctx);
52
+
53
+ XML_DEPRECATED
54
+ XMLPUBFUN void
55
+ internalSubset (void *ctx,
56
+ const xmlChar *name,
57
+ const xmlChar *ExternalID,
58
+ const xmlChar *SystemID);
59
+ XML_DEPRECATED
60
+ XMLPUBFUN void
61
+ externalSubset (void *ctx,
62
+ const xmlChar *name,
63
+ const xmlChar *ExternalID,
64
+ const xmlChar *SystemID);
65
+ XML_DEPRECATED
66
+ XMLPUBFUN xmlEntityPtr
67
+ getEntity (void *ctx,
68
+ const xmlChar *name);
69
+ XML_DEPRECATED
70
+ XMLPUBFUN xmlEntityPtr
71
+ getParameterEntity (void *ctx,
72
+ const xmlChar *name);
73
+ XML_DEPRECATED
74
+ XMLPUBFUN xmlParserInputPtr
75
+ resolveEntity (void *ctx,
76
+ const xmlChar *publicId,
77
+ const xmlChar *systemId);
78
+
79
+ XML_DEPRECATED
80
+ XMLPUBFUN void
81
+ entityDecl (void *ctx,
82
+ const xmlChar *name,
83
+ int type,
84
+ const xmlChar *publicId,
85
+ const xmlChar *systemId,
86
+ xmlChar *content);
87
+ XML_DEPRECATED
88
+ XMLPUBFUN void
89
+ attributeDecl (void *ctx,
90
+ const xmlChar *elem,
91
+ const xmlChar *fullname,
92
+ int type,
93
+ int def,
94
+ const xmlChar *defaultValue,
95
+ xmlEnumerationPtr tree);
96
+ XML_DEPRECATED
97
+ XMLPUBFUN void
98
+ elementDecl (void *ctx,
99
+ const xmlChar *name,
100
+ int type,
101
+ xmlElementContentPtr content);
102
+ XML_DEPRECATED
103
+ XMLPUBFUN void
104
+ notationDecl (void *ctx,
105
+ const xmlChar *name,
106
+ const xmlChar *publicId,
107
+ const xmlChar *systemId);
108
+ XML_DEPRECATED
109
+ XMLPUBFUN void
110
+ unparsedEntityDecl (void *ctx,
111
+ const xmlChar *name,
112
+ const xmlChar *publicId,
113
+ const xmlChar *systemId,
114
+ const xmlChar *notationName);
115
+
116
+ XML_DEPRECATED
117
+ XMLPUBFUN void
118
+ startDocument (void *ctx);
119
+ XML_DEPRECATED
120
+ XMLPUBFUN void
121
+ endDocument (void *ctx);
122
+ XML_DEPRECATED
123
+ XMLPUBFUN void
124
+ attribute (void *ctx,
125
+ const xmlChar *fullname,
126
+ const xmlChar *value);
127
+ XML_DEPRECATED
128
+ XMLPUBFUN void
129
+ startElement (void *ctx,
130
+ const xmlChar *fullname,
131
+ const xmlChar **atts);
132
+ XML_DEPRECATED
133
+ XMLPUBFUN void
134
+ endElement (void *ctx,
135
+ const xmlChar *name);
136
+ XML_DEPRECATED
137
+ XMLPUBFUN void
138
+ reference (void *ctx,
139
+ const xmlChar *name);
140
+ XML_DEPRECATED
141
+ XMLPUBFUN void
142
+ characters (void *ctx,
143
+ const xmlChar *ch,
144
+ int len);
145
+ XML_DEPRECATED
146
+ XMLPUBFUN void
147
+ ignorableWhitespace (void *ctx,
148
+ const xmlChar *ch,
149
+ int len);
150
+ XML_DEPRECATED
151
+ XMLPUBFUN void
152
+ processingInstruction (void *ctx,
153
+ const xmlChar *target,
154
+ const xmlChar *data);
155
+ XML_DEPRECATED
156
+ XMLPUBFUN void
157
+ globalNamespace (void *ctx,
158
+ const xmlChar *href,
159
+ const xmlChar *prefix);
160
+ XML_DEPRECATED
161
+ XMLPUBFUN void
162
+ setNamespace (void *ctx,
163
+ const xmlChar *name);
164
+ XML_DEPRECATED
165
+ XMLPUBFUN xmlNsPtr
166
+ getNamespace (void *ctx);
167
+ XML_DEPRECATED
168
+ XMLPUBFUN int
169
+ checkNamespace (void *ctx,
170
+ xmlChar *nameSpace);
171
+ XML_DEPRECATED
172
+ XMLPUBFUN void
173
+ namespaceDecl (void *ctx,
174
+ const xmlChar *href,
175
+ const xmlChar *prefix);
176
+ XML_DEPRECATED
177
+ XMLPUBFUN void
178
+ comment (void *ctx,
179
+ const xmlChar *value);
180
+ XML_DEPRECATED
181
+ XMLPUBFUN void
182
+ cdataBlock (void *ctx,
183
+ const xmlChar *value,
184
+ int len);
185
+
186
+ #ifdef LIBXML_SAX1_ENABLED
187
+ XML_DEPRECATED
188
+ XMLPUBFUN void
189
+ initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
190
+ int warning);
191
+ #ifdef LIBXML_HTML_ENABLED
192
+ XML_DEPRECATED
193
+ XMLPUBFUN void
194
+ inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
195
+ #endif
196
+ #endif /* LIBXML_SAX1_ENABLED */
197
+
198
+ #ifdef __cplusplus
199
+ }
200
+ #endif
201
+
202
+ #endif /* LIBXML_LEGACY_ENABLED */
203
+
204
+ #endif /* __XML_SAX_H__ */
@@ -0,0 +1,173 @@
1
+ /*
2
+ * Summary: SAX2 parser interface used to build the DOM tree
3
+ * Description: those are the default SAX2 interfaces used by
4
+ * the library when building DOM tree.
5
+ *
6
+ * Copy: See Copyright for the status of this software.
7
+ *
8
+ * Author: Daniel Veillard
9
+ */
10
+
11
+
12
+ #ifndef __XML_SAX2_H__
13
+ #define __XML_SAX2_H__
14
+
15
+ #include <stdio.h>
16
+ #include <stdlib.h>
17
+ #include <libxml/xmlversion.h>
18
+ #include <libxml/parser.h>
19
+
20
+ #ifdef __cplusplus
21
+ extern "C" {
22
+ #endif
23
+ XMLPUBFUN const xmlChar *
24
+ xmlSAX2GetPublicId (void *ctx);
25
+ XMLPUBFUN const xmlChar *
26
+ xmlSAX2GetSystemId (void *ctx);
27
+ XMLPUBFUN void
28
+ xmlSAX2SetDocumentLocator (void *ctx,
29
+ xmlSAXLocatorPtr loc);
30
+
31
+ XMLPUBFUN int
32
+ xmlSAX2GetLineNumber (void *ctx);
33
+ XMLPUBFUN int
34
+ xmlSAX2GetColumnNumber (void *ctx);
35
+
36
+ XMLPUBFUN int
37
+ xmlSAX2IsStandalone (void *ctx);
38
+ XMLPUBFUN int
39
+ xmlSAX2HasInternalSubset (void *ctx);
40
+ XMLPUBFUN int
41
+ xmlSAX2HasExternalSubset (void *ctx);
42
+
43
+ XMLPUBFUN void
44
+ xmlSAX2InternalSubset (void *ctx,
45
+ const xmlChar *name,
46
+ const xmlChar *ExternalID,
47
+ const xmlChar *SystemID);
48
+ XMLPUBFUN void
49
+ xmlSAX2ExternalSubset (void *ctx,
50
+ const xmlChar *name,
51
+ const xmlChar *ExternalID,
52
+ const xmlChar *SystemID);
53
+ XMLPUBFUN xmlEntityPtr
54
+ xmlSAX2GetEntity (void *ctx,
55
+ const xmlChar *name);
56
+ XMLPUBFUN xmlEntityPtr
57
+ xmlSAX2GetParameterEntity (void *ctx,
58
+ const xmlChar *name);
59
+ XMLPUBFUN xmlParserInputPtr
60
+ xmlSAX2ResolveEntity (void *ctx,
61
+ const xmlChar *publicId,
62
+ const xmlChar *systemId);
63
+
64
+ XMLPUBFUN void
65
+ xmlSAX2EntityDecl (void *ctx,
66
+ const xmlChar *name,
67
+ int type,
68
+ const xmlChar *publicId,
69
+ const xmlChar *systemId,
70
+ xmlChar *content);
71
+ XMLPUBFUN void
72
+ xmlSAX2AttributeDecl (void *ctx,
73
+ const xmlChar *elem,
74
+ const xmlChar *fullname,
75
+ int type,
76
+ int def,
77
+ const xmlChar *defaultValue,
78
+ xmlEnumerationPtr tree);
79
+ XMLPUBFUN void
80
+ xmlSAX2ElementDecl (void *ctx,
81
+ const xmlChar *name,
82
+ int type,
83
+ xmlElementContentPtr content);
84
+ XMLPUBFUN void
85
+ xmlSAX2NotationDecl (void *ctx,
86
+ const xmlChar *name,
87
+ const xmlChar *publicId,
88
+ const xmlChar *systemId);
89
+ XMLPUBFUN void
90
+ xmlSAX2UnparsedEntityDecl (void *ctx,
91
+ const xmlChar *name,
92
+ const xmlChar *publicId,
93
+ const xmlChar *systemId,
94
+ const xmlChar *notationName);
95
+
96
+ XMLPUBFUN void
97
+ xmlSAX2StartDocument (void *ctx);
98
+ XMLPUBFUN void
99
+ xmlSAX2EndDocument (void *ctx);
100
+ #if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
101
+ defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
102
+ XMLPUBFUN void
103
+ xmlSAX2StartElement (void *ctx,
104
+ const xmlChar *fullname,
105
+ const xmlChar **atts);
106
+ XMLPUBFUN void
107
+ xmlSAX2EndElement (void *ctx,
108
+ const xmlChar *name);
109
+ #endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */
110
+ XMLPUBFUN void
111
+ xmlSAX2StartElementNs (void *ctx,
112
+ const xmlChar *localname,
113
+ const xmlChar *prefix,
114
+ const xmlChar *URI,
115
+ int nb_namespaces,
116
+ const xmlChar **namespaces,
117
+ int nb_attributes,
118
+ int nb_defaulted,
119
+ const xmlChar **attributes);
120
+ XMLPUBFUN void
121
+ xmlSAX2EndElementNs (void *ctx,
122
+ const xmlChar *localname,
123
+ const xmlChar *prefix,
124
+ const xmlChar *URI);
125
+ XMLPUBFUN void
126
+ xmlSAX2Reference (void *ctx,
127
+ const xmlChar *name);
128
+ XMLPUBFUN void
129
+ xmlSAX2Characters (void *ctx,
130
+ const xmlChar *ch,
131
+ int len);
132
+ XMLPUBFUN void
133
+ xmlSAX2IgnorableWhitespace (void *ctx,
134
+ const xmlChar *ch,
135
+ int len);
136
+ XMLPUBFUN void
137
+ xmlSAX2ProcessingInstruction (void *ctx,
138
+ const xmlChar *target,
139
+ const xmlChar *data);
140
+ XMLPUBFUN void
141
+ xmlSAX2Comment (void *ctx,
142
+ const xmlChar *value);
143
+ XMLPUBFUN void
144
+ xmlSAX2CDataBlock (void *ctx,
145
+ const xmlChar *value,
146
+ int len);
147
+
148
+ #ifdef LIBXML_SAX1_ENABLED
149
+ XML_DEPRECATED
150
+ XMLPUBFUN int
151
+ xmlSAXDefaultVersion (int version);
152
+ #endif /* LIBXML_SAX1_ENABLED */
153
+
154
+ XMLPUBFUN int
155
+ xmlSAXVersion (xmlSAXHandler *hdlr,
156
+ int version);
157
+ XMLPUBFUN void
158
+ xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
159
+ int warning);
160
+ #ifdef LIBXML_HTML_ENABLED
161
+ XMLPUBFUN void
162
+ xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
163
+ XML_DEPRECATED
164
+ XMLPUBFUN void
165
+ htmlDefaultSAXHandlerInit (void);
166
+ #endif
167
+ XML_DEPRECATED
168
+ XMLPUBFUN void
169
+ xmlDefaultSAXHandlerInit (void);
170
+ #ifdef __cplusplus
171
+ }
172
+ #endif
173
+ #endif /* __XML_SAX2_H__ */
File without changes
@@ -0,0 +1,128 @@
1
+ /*
2
+ * Summary: Provide Canonical XML and Exclusive XML Canonicalization
3
+ * Description: the c14n modules provides a
4
+ *
5
+ * "Canonical XML" implementation
6
+ * http://www.w3.org/TR/xml-c14n
7
+ *
8
+ * and an
9
+ *
10
+ * "Exclusive XML Canonicalization" implementation
11
+ * http://www.w3.org/TR/xml-exc-c14n
12
+
13
+ * Copy: See Copyright for the status of this software.
14
+ *
15
+ * Author: Aleksey Sanin <aleksey@aleksey.com>
16
+ */
17
+ #ifndef __XML_C14N_H__
18
+ #define __XML_C14N_H__
19
+
20
+ #include <libxml/xmlversion.h>
21
+
22
+ #ifdef LIBXML_C14N_ENABLED
23
+ #ifdef LIBXML_OUTPUT_ENABLED
24
+
25
+ #include <libxml/tree.h>
26
+ #include <libxml/xpath.h>
27
+
28
+ #ifdef __cplusplus
29
+ extern "C" {
30
+ #endif /* __cplusplus */
31
+
32
+ /*
33
+ * XML Canonicalization
34
+ * http://www.w3.org/TR/xml-c14n
35
+ *
36
+ * Exclusive XML Canonicalization
37
+ * http://www.w3.org/TR/xml-exc-c14n
38
+ *
39
+ * Canonical form of an XML document could be created if and only if
40
+ * a) default attributes (if any) are added to all nodes
41
+ * b) all character and parsed entity references are resolved
42
+ * In order to achieve this in libxml2 the document MUST be loaded with
43
+ * following global settings:
44
+ *
45
+ * xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
46
+ * xmlSubstituteEntitiesDefault(1);
47
+ *
48
+ * or corresponding parser context setting:
49
+ * xmlParserCtxtPtr ctxt;
50
+ *
51
+ * ...
52
+ * ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
53
+ * ctxt->replaceEntities = 1;
54
+ * ...
55
+ */
56
+
57
+ /*
58
+ * xmlC14NMode:
59
+ *
60
+ * Predefined values for C14N modes
61
+ *
62
+ */
63
+ typedef enum {
64
+ XML_C14N_1_0 = 0, /* Original C14N 1.0 spec */
65
+ XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */
66
+ XML_C14N_1_1 = 2 /* C14N 1.1 spec */
67
+ } xmlC14NMode;
68
+
69
+ XMLPUBFUN int
70
+ xmlC14NDocSaveTo (xmlDocPtr doc,
71
+ xmlNodeSetPtr nodes,
72
+ int mode, /* a xmlC14NMode */
73
+ xmlChar **inclusive_ns_prefixes,
74
+ int with_comments,
75
+ xmlOutputBufferPtr buf);
76
+
77
+ XMLPUBFUN int
78
+ xmlC14NDocDumpMemory (xmlDocPtr doc,
79
+ xmlNodeSetPtr nodes,
80
+ int mode, /* a xmlC14NMode */
81
+ xmlChar **inclusive_ns_prefixes,
82
+ int with_comments,
83
+ xmlChar **doc_txt_ptr);
84
+
85
+ XMLPUBFUN int
86
+ xmlC14NDocSave (xmlDocPtr doc,
87
+ xmlNodeSetPtr nodes,
88
+ int mode, /* a xmlC14NMode */
89
+ xmlChar **inclusive_ns_prefixes,
90
+ int with_comments,
91
+ const char* filename,
92
+ int compression);
93
+
94
+
95
+ /**
96
+ * This is the core C14N function
97
+ */
98
+ /**
99
+ * xmlC14NIsVisibleCallback:
100
+ * @user_data: user data
101
+ * @node: the current node
102
+ * @parent: the parent node
103
+ *
104
+ * Signature for a C14N callback on visible nodes
105
+ *
106
+ * Returns 1 if the node should be included
107
+ */
108
+ typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
109
+ xmlNodePtr node,
110
+ xmlNodePtr parent);
111
+
112
+ XMLPUBFUN int
113
+ xmlC14NExecute (xmlDocPtr doc,
114
+ xmlC14NIsVisibleCallback is_visible_callback,
115
+ void* user_data,
116
+ int mode, /* a xmlC14NMode */
117
+ xmlChar **inclusive_ns_prefixes,
118
+ int with_comments,
119
+ xmlOutputBufferPtr buf);
120
+
121
+ #ifdef __cplusplus
122
+ }
123
+ #endif /* __cplusplus */
124
+
125
+ #endif /* LIBXML_OUTPUT_ENABLED */
126
+ #endif /* LIBXML_C14N_ENABLED */
127
+ #endif /* __XML_C14N_H__ */
128
+