lxml 6.0.0__cp312-cp312-macosx_10_13_x86_64.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-312-darwin.so +0 -0
  4. lxml/_elementpath.py +343 -0
  5. lxml/apihelpers.pxi +1801 -0
  6. lxml/builder.cpython-312-darwin.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-312-darwin.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-312-darwin.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-312-darwin.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-312-darwin.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-312-darwin.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 +6 -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,148 @@
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
+ XML_DEPRECATED
137
+ XMLPUBFUN int
138
+ htmlIsBooleanAttr (const xmlChar *name);
139
+
140
+
141
+ #ifdef __cplusplus
142
+ }
143
+ #endif
144
+
145
+ #endif /* LIBXML_HTML_ENABLED */
146
+
147
+ #endif /* __HTML_TREE_H__ */
148
+
@@ -0,0 +1,18 @@
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
+ #ifndef __XML_SAX_H__
12
+ #define __XML_SAX_H__
13
+
14
+ #ifdef __GNUC__
15
+ #warning "libxml/SAX.h is deprecated"
16
+ #endif
17
+
18
+ #endif /* __XML_SAX_H__ */
@@ -0,0 +1,170 @@
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 <libxml/xmlversion.h>
16
+ #include <libxml/parser.h>
17
+
18
+ #ifdef __cplusplus
19
+ extern "C" {
20
+ #endif
21
+ XMLPUBFUN const xmlChar *
22
+ xmlSAX2GetPublicId (void *ctx);
23
+ XMLPUBFUN const xmlChar *
24
+ xmlSAX2GetSystemId (void *ctx);
25
+ XMLPUBFUN void
26
+ xmlSAX2SetDocumentLocator (void *ctx,
27
+ xmlSAXLocatorPtr loc);
28
+
29
+ XMLPUBFUN int
30
+ xmlSAX2GetLineNumber (void *ctx);
31
+ XMLPUBFUN int
32
+ xmlSAX2GetColumnNumber (void *ctx);
33
+
34
+ XMLPUBFUN int
35
+ xmlSAX2IsStandalone (void *ctx);
36
+ XMLPUBFUN int
37
+ xmlSAX2HasInternalSubset (void *ctx);
38
+ XMLPUBFUN int
39
+ xmlSAX2HasExternalSubset (void *ctx);
40
+
41
+ XMLPUBFUN void
42
+ xmlSAX2InternalSubset (void *ctx,
43
+ const xmlChar *name,
44
+ const xmlChar *ExternalID,
45
+ const xmlChar *SystemID);
46
+ XMLPUBFUN void
47
+ xmlSAX2ExternalSubset (void *ctx,
48
+ const xmlChar *name,
49
+ const xmlChar *ExternalID,
50
+ const xmlChar *SystemID);
51
+ XMLPUBFUN xmlEntityPtr
52
+ xmlSAX2GetEntity (void *ctx,
53
+ const xmlChar *name);
54
+ XMLPUBFUN xmlEntityPtr
55
+ xmlSAX2GetParameterEntity (void *ctx,
56
+ const xmlChar *name);
57
+ XMLPUBFUN xmlParserInputPtr
58
+ xmlSAX2ResolveEntity (void *ctx,
59
+ const xmlChar *publicId,
60
+ const xmlChar *systemId);
61
+
62
+ XMLPUBFUN void
63
+ xmlSAX2EntityDecl (void *ctx,
64
+ const xmlChar *name,
65
+ int type,
66
+ const xmlChar *publicId,
67
+ const xmlChar *systemId,
68
+ xmlChar *content);
69
+ XMLPUBFUN void
70
+ xmlSAX2AttributeDecl (void *ctx,
71
+ const xmlChar *elem,
72
+ const xmlChar *fullname,
73
+ int type,
74
+ int def,
75
+ const xmlChar *defaultValue,
76
+ xmlEnumerationPtr tree);
77
+ XMLPUBFUN void
78
+ xmlSAX2ElementDecl (void *ctx,
79
+ const xmlChar *name,
80
+ int type,
81
+ xmlElementContentPtr content);
82
+ XMLPUBFUN void
83
+ xmlSAX2NotationDecl (void *ctx,
84
+ const xmlChar *name,
85
+ const xmlChar *publicId,
86
+ const xmlChar *systemId);
87
+ XMLPUBFUN void
88
+ xmlSAX2UnparsedEntityDecl (void *ctx,
89
+ const xmlChar *name,
90
+ const xmlChar *publicId,
91
+ const xmlChar *systemId,
92
+ const xmlChar *notationName);
93
+
94
+ XMLPUBFUN void
95
+ xmlSAX2StartDocument (void *ctx);
96
+ XMLPUBFUN void
97
+ xmlSAX2EndDocument (void *ctx);
98
+ XML_DEPRECATED
99
+ XMLPUBFUN void
100
+ xmlSAX2StartElement (void *ctx,
101
+ const xmlChar *fullname,
102
+ const xmlChar **atts);
103
+ XML_DEPRECATED
104
+ XMLPUBFUN void
105
+ xmlSAX2EndElement (void *ctx,
106
+ const xmlChar *name);
107
+ XMLPUBFUN void
108
+ xmlSAX2StartElementNs (void *ctx,
109
+ const xmlChar *localname,
110
+ const xmlChar *prefix,
111
+ const xmlChar *URI,
112
+ int nb_namespaces,
113
+ const xmlChar **namespaces,
114
+ int nb_attributes,
115
+ int nb_defaulted,
116
+ const xmlChar **attributes);
117
+ XMLPUBFUN void
118
+ xmlSAX2EndElementNs (void *ctx,
119
+ const xmlChar *localname,
120
+ const xmlChar *prefix,
121
+ const xmlChar *URI);
122
+ XMLPUBFUN void
123
+ xmlSAX2Reference (void *ctx,
124
+ const xmlChar *name);
125
+ XMLPUBFUN void
126
+ xmlSAX2Characters (void *ctx,
127
+ const xmlChar *ch,
128
+ int len);
129
+ XMLPUBFUN void
130
+ xmlSAX2IgnorableWhitespace (void *ctx,
131
+ const xmlChar *ch,
132
+ int len);
133
+ XMLPUBFUN void
134
+ xmlSAX2ProcessingInstruction (void *ctx,
135
+ const xmlChar *target,
136
+ const xmlChar *data);
137
+ XMLPUBFUN void
138
+ xmlSAX2Comment (void *ctx,
139
+ const xmlChar *value);
140
+ XMLPUBFUN void
141
+ xmlSAX2CDataBlock (void *ctx,
142
+ const xmlChar *value,
143
+ int len);
144
+
145
+ #ifdef LIBXML_SAX1_ENABLED
146
+ XML_DEPRECATED
147
+ XMLPUBFUN int
148
+ xmlSAXDefaultVersion (int version);
149
+ #endif /* LIBXML_SAX1_ENABLED */
150
+
151
+ XMLPUBFUN int
152
+ xmlSAXVersion (xmlSAXHandler *hdlr,
153
+ int version);
154
+ XMLPUBFUN void
155
+ xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
156
+ int warning);
157
+ #ifdef LIBXML_HTML_ENABLED
158
+ XMLPUBFUN void
159
+ xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
160
+ XML_DEPRECATED
161
+ XMLPUBFUN void
162
+ htmlDefaultSAXHandlerInit (void);
163
+ #endif
164
+ XML_DEPRECATED
165
+ XMLPUBFUN void
166
+ xmlDefaultSAXHandlerInit (void);
167
+ #ifdef __cplusplus
168
+ }
169
+ #endif
170
+ #endif /* __XML_SAX2_H__ */
File without changes
@@ -0,0 +1,115 @@
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
+
24
+ #include <libxml/tree.h>
25
+ #include <libxml/xpath.h>
26
+
27
+ #ifdef __cplusplus
28
+ extern "C" {
29
+ #endif /* __cplusplus */
30
+
31
+ /*
32
+ * XML Canonicalization
33
+ * http://www.w3.org/TR/xml-c14n
34
+ *
35
+ * Exclusive XML Canonicalization
36
+ * http://www.w3.org/TR/xml-exc-c14n
37
+ *
38
+ * Canonical form of an XML document could be created if and only if
39
+ * a) default attributes (if any) are added to all nodes
40
+ * b) all character and parsed entity references are resolved
41
+ * In order to achieve this in libxml2 the document MUST be loaded with
42
+ * following options: XML_PARSE_DTDATTR | XML_PARSE_NOENT
43
+ */
44
+
45
+ /*
46
+ * xmlC14NMode:
47
+ *
48
+ * Predefined values for C14N modes
49
+ *
50
+ */
51
+ typedef enum {
52
+ XML_C14N_1_0 = 0, /* Original C14N 1.0 spec */
53
+ XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */
54
+ XML_C14N_1_1 = 2 /* C14N 1.1 spec */
55
+ } xmlC14NMode;
56
+
57
+ XMLPUBFUN int
58
+ xmlC14NDocSaveTo (xmlDocPtr doc,
59
+ xmlNodeSetPtr nodes,
60
+ int mode, /* a xmlC14NMode */
61
+ xmlChar **inclusive_ns_prefixes,
62
+ int with_comments,
63
+ xmlOutputBufferPtr buf);
64
+
65
+ XMLPUBFUN int
66
+ xmlC14NDocDumpMemory (xmlDocPtr doc,
67
+ xmlNodeSetPtr nodes,
68
+ int mode, /* a xmlC14NMode */
69
+ xmlChar **inclusive_ns_prefixes,
70
+ int with_comments,
71
+ xmlChar **doc_txt_ptr);
72
+
73
+ XMLPUBFUN int
74
+ xmlC14NDocSave (xmlDocPtr doc,
75
+ xmlNodeSetPtr nodes,
76
+ int mode, /* a xmlC14NMode */
77
+ xmlChar **inclusive_ns_prefixes,
78
+ int with_comments,
79
+ const char* filename,
80
+ int compression);
81
+
82
+
83
+ /**
84
+ * This is the core C14N function
85
+ */
86
+ /**
87
+ * xmlC14NIsVisibleCallback:
88
+ * @user_data: user data
89
+ * @node: the current node
90
+ * @parent: the parent node
91
+ *
92
+ * Signature for a C14N callback on visible nodes
93
+ *
94
+ * Returns 1 if the node should be included
95
+ */
96
+ typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
97
+ xmlNodePtr node,
98
+ xmlNodePtr parent);
99
+
100
+ XMLPUBFUN int
101
+ xmlC14NExecute (xmlDocPtr doc,
102
+ xmlC14NIsVisibleCallback is_visible_callback,
103
+ void* user_data,
104
+ int mode, /* a xmlC14NMode */
105
+ xmlChar **inclusive_ns_prefixes,
106
+ int with_comments,
107
+ xmlOutputBufferPtr buf);
108
+
109
+ #ifdef __cplusplus
110
+ }
111
+ #endif /* __cplusplus */
112
+
113
+ #endif /* LIBXML_C14N_ENABLED */
114
+ #endif /* __XML_C14N_H__ */
115
+
@@ -0,0 +1,183 @@
1
+ /**
2
+ * Summary: interfaces to the Catalog handling system
3
+ * Description: the catalog module implements the support for
4
+ * XML Catalogs and SGML catalogs
5
+ *
6
+ * SGML Open Technical Resolution TR9401:1997.
7
+ * http://www.jclark.com/sp/catalog.htm
8
+ *
9
+ * XML Catalogs Working Draft 06 August 2001
10
+ * http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
11
+ *
12
+ * Copy: See Copyright for the status of this software.
13
+ *
14
+ * Author: Daniel Veillard
15
+ */
16
+
17
+ #ifndef __XML_CATALOG_H__
18
+ #define __XML_CATALOG_H__
19
+
20
+ #include <stdio.h>
21
+
22
+ #include <libxml/xmlversion.h>
23
+ #include <libxml/xmlstring.h>
24
+ #include <libxml/tree.h>
25
+
26
+ #ifdef LIBXML_CATALOG_ENABLED
27
+
28
+ #ifdef __cplusplus
29
+ extern "C" {
30
+ #endif
31
+
32
+ /**
33
+ * XML_CATALOGS_NAMESPACE:
34
+ *
35
+ * The namespace for the XML Catalogs elements.
36
+ */
37
+ #define XML_CATALOGS_NAMESPACE \
38
+ (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
39
+ /**
40
+ * XML_CATALOG_PI:
41
+ *
42
+ * The specific XML Catalog Processing Instruction name.
43
+ */
44
+ #define XML_CATALOG_PI \
45
+ (const xmlChar *) "oasis-xml-catalog"
46
+
47
+ /*
48
+ * The API is voluntarily limited to general cataloging.
49
+ */
50
+ typedef enum {
51
+ XML_CATA_PREFER_NONE = 0,
52
+ XML_CATA_PREFER_PUBLIC = 1,
53
+ XML_CATA_PREFER_SYSTEM
54
+ } xmlCatalogPrefer;
55
+
56
+ typedef enum {
57
+ XML_CATA_ALLOW_NONE = 0,
58
+ XML_CATA_ALLOW_GLOBAL = 1,
59
+ XML_CATA_ALLOW_DOCUMENT = 2,
60
+ XML_CATA_ALLOW_ALL = 3
61
+ } xmlCatalogAllow;
62
+
63
+ typedef struct _xmlCatalog xmlCatalog;
64
+ typedef xmlCatalog *xmlCatalogPtr;
65
+
66
+ /*
67
+ * Operations on a given catalog.
68
+ */
69
+ XMLPUBFUN xmlCatalogPtr
70
+ xmlNewCatalog (int sgml);
71
+ XMLPUBFUN xmlCatalogPtr
72
+ xmlLoadACatalog (const char *filename);
73
+ XMLPUBFUN xmlCatalogPtr
74
+ xmlLoadSGMLSuperCatalog (const char *filename);
75
+ XMLPUBFUN int
76
+ xmlConvertSGMLCatalog (xmlCatalogPtr catal);
77
+ XMLPUBFUN int
78
+ xmlACatalogAdd (xmlCatalogPtr catal,
79
+ const xmlChar *type,
80
+ const xmlChar *orig,
81
+ const xmlChar *replace);
82
+ XMLPUBFUN int
83
+ xmlACatalogRemove (xmlCatalogPtr catal,
84
+ const xmlChar *value);
85
+ XMLPUBFUN xmlChar *
86
+ xmlACatalogResolve (xmlCatalogPtr catal,
87
+ const xmlChar *pubID,
88
+ const xmlChar *sysID);
89
+ XMLPUBFUN xmlChar *
90
+ xmlACatalogResolveSystem(xmlCatalogPtr catal,
91
+ const xmlChar *sysID);
92
+ XMLPUBFUN xmlChar *
93
+ xmlACatalogResolvePublic(xmlCatalogPtr catal,
94
+ const xmlChar *pubID);
95
+ XMLPUBFUN xmlChar *
96
+ xmlACatalogResolveURI (xmlCatalogPtr catal,
97
+ const xmlChar *URI);
98
+ #ifdef LIBXML_OUTPUT_ENABLED
99
+ XMLPUBFUN void
100
+ xmlACatalogDump (xmlCatalogPtr catal,
101
+ FILE *out);
102
+ #endif /* LIBXML_OUTPUT_ENABLED */
103
+ XMLPUBFUN void
104
+ xmlFreeCatalog (xmlCatalogPtr catal);
105
+ XMLPUBFUN int
106
+ xmlCatalogIsEmpty (xmlCatalogPtr catal);
107
+
108
+ /*
109
+ * Global operations.
110
+ */
111
+ XMLPUBFUN void
112
+ xmlInitializeCatalog (void);
113
+ XMLPUBFUN int
114
+ xmlLoadCatalog (const char *filename);
115
+ XMLPUBFUN void
116
+ xmlLoadCatalogs (const char *paths);
117
+ XMLPUBFUN void
118
+ xmlCatalogCleanup (void);
119
+ #ifdef LIBXML_OUTPUT_ENABLED
120
+ XMLPUBFUN void
121
+ xmlCatalogDump (FILE *out);
122
+ #endif /* LIBXML_OUTPUT_ENABLED */
123
+ XMLPUBFUN xmlChar *
124
+ xmlCatalogResolve (const xmlChar *pubID,
125
+ const xmlChar *sysID);
126
+ XMLPUBFUN xmlChar *
127
+ xmlCatalogResolveSystem (const xmlChar *sysID);
128
+ XMLPUBFUN xmlChar *
129
+ xmlCatalogResolvePublic (const xmlChar *pubID);
130
+ XMLPUBFUN xmlChar *
131
+ xmlCatalogResolveURI (const xmlChar *URI);
132
+ XMLPUBFUN int
133
+ xmlCatalogAdd (const xmlChar *type,
134
+ const xmlChar *orig,
135
+ const xmlChar *replace);
136
+ XMLPUBFUN int
137
+ xmlCatalogRemove (const xmlChar *value);
138
+ XMLPUBFUN xmlDocPtr
139
+ xmlParseCatalogFile (const char *filename);
140
+ XMLPUBFUN int
141
+ xmlCatalogConvert (void);
142
+
143
+ /*
144
+ * Strictly minimal interfaces for per-document catalogs used
145
+ * by the parser.
146
+ */
147
+ XMLPUBFUN void
148
+ xmlCatalogFreeLocal (void *catalogs);
149
+ XMLPUBFUN void *
150
+ xmlCatalogAddLocal (void *catalogs,
151
+ const xmlChar *URL);
152
+ XMLPUBFUN xmlChar *
153
+ xmlCatalogLocalResolve (void *catalogs,
154
+ const xmlChar *pubID,
155
+ const xmlChar *sysID);
156
+ XMLPUBFUN xmlChar *
157
+ xmlCatalogLocalResolveURI(void *catalogs,
158
+ const xmlChar *URI);
159
+ /*
160
+ * Preference settings.
161
+ */
162
+ XMLPUBFUN int
163
+ xmlCatalogSetDebug (int level);
164
+ XML_DEPRECATED
165
+ XMLPUBFUN xmlCatalogPrefer
166
+ xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
167
+ XMLPUBFUN void
168
+ xmlCatalogSetDefaults (xmlCatalogAllow allow);
169
+ XMLPUBFUN xmlCatalogAllow
170
+ xmlCatalogGetDefaults (void);
171
+
172
+
173
+ /* DEPRECATED interfaces */
174
+ XMLPUBFUN const xmlChar *
175
+ xmlCatalogGetSystem (const xmlChar *sysID);
176
+ XMLPUBFUN const xmlChar *
177
+ xmlCatalogGetPublic (const xmlChar *pubID);
178
+
179
+ #ifdef __cplusplus
180
+ }
181
+ #endif
182
+ #endif /* LIBXML_CATALOG_ENABLED */
183
+ #endif /* __XML_CATALOG_H__ */