lxml 6.0.0__cp313-cp313-musllinux_1_2_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-313-arm-linux-musleabihf.so +0 -0
  4. lxml/_elementpath.py +343 -0
  5. lxml/apihelpers.pxi +1801 -0
  6. lxml/builder.cpython-313-arm-linux-musleabihf.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-313-arm-linux-musleabihf.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-313-arm-linux-musleabihf.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-313-arm-linux-musleabihf.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-313-arm-linux-musleabihf.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-313-arm-linux-musleabihf.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,56 @@
1
+ from libc.string cimport const_char
2
+
3
+ from lxml.includes.tree cimport xmlDoc
4
+ from lxml.includes.tree cimport xmlInputReadCallback, xmlInputCloseCallback
5
+ from lxml.includes.xmlparser cimport xmlParserCtxt, xmlSAXHandler, xmlSAXHandlerV1
6
+
7
+ cdef extern from "libxml/HTMLparser.h" nogil:
8
+ ctypedef enum htmlParserOption:
9
+ HTML_PARSE_NOERROR # suppress error reports
10
+ HTML_PARSE_NOWARNING # suppress warning reports
11
+ HTML_PARSE_PEDANTIC # pedantic error reporting
12
+ HTML_PARSE_NOBLANKS # remove blank nodes
13
+ HTML_PARSE_NONET # Forbid network access
14
+ # libxml2 2.6.21+ only:
15
+ HTML_PARSE_RECOVER # Relaxed parsing
16
+ HTML_PARSE_COMPACT # compact small text nodes
17
+ # libxml2 2.7.7+ only:
18
+ HTML_PARSE_NOIMPLIED # Do not add implied html/body... elements
19
+ # libxml2 2.7.8+ only:
20
+ HTML_PARSE_NODEFDTD # do not default a doctype if not found
21
+ # libxml2 2.8.0+ only:
22
+ XML_PARSE_IGNORE_ENC # ignore internal document encoding hint
23
+
24
+ xmlSAXHandlerV1 htmlDefaultSAXHandler
25
+
26
+ cdef xmlParserCtxt* htmlCreateMemoryParserCtxt(
27
+ char* buffer, int size)
28
+ cdef xmlParserCtxt* htmlCreateFileParserCtxt(
29
+ char* filename, char* encoding)
30
+ cdef xmlParserCtxt* htmlCreatePushParserCtxt(xmlSAXHandler* sax,
31
+ void* user_data,
32
+ char* chunk, int size,
33
+ char* filename, int enc)
34
+ cdef void htmlFreeParserCtxt(xmlParserCtxt* ctxt)
35
+ cdef void htmlCtxtReset(xmlParserCtxt* ctxt)
36
+ cdef int htmlCtxtUseOptions(xmlParserCtxt* ctxt, int options)
37
+ cdef int htmlParseDocument(xmlParserCtxt* ctxt)
38
+ cdef int htmlParseChunk(xmlParserCtxt* ctxt,
39
+ char* chunk, int size, int terminate)
40
+
41
+ cdef xmlDoc* htmlCtxtReadFile(xmlParserCtxt* ctxt,
42
+ char* filename, const_char* encoding,
43
+ int options)
44
+ cdef xmlDoc* htmlCtxtReadDoc(xmlParserCtxt* ctxt,
45
+ char* buffer, char* URL, const_char* encoding,
46
+ int options)
47
+ cdef xmlDoc* htmlCtxtReadIO(xmlParserCtxt* ctxt,
48
+ xmlInputReadCallback ioread,
49
+ xmlInputCloseCallback ioclose,
50
+ void* ioctx,
51
+ char* URL, const_char* encoding,
52
+ int options)
53
+ cdef xmlDoc* htmlCtxtReadMemory(xmlParserCtxt* ctxt,
54
+ char* buffer, int size,
55
+ char* filename, const_char* encoding,
56
+ int options)
File without changes
@@ -0,0 +1,108 @@
1
+ /*
2
+ * Summary: main header file
3
+ *
4
+ * Copy: See Copyright for the status of this software.
5
+ */
6
+
7
+
8
+ #ifndef __EXSLT_H__
9
+ #define __EXSLT_H__
10
+
11
+ #include <libxml/tree.h>
12
+ #include <libxml/xpath.h>
13
+ #include "exsltexports.h"
14
+ #include <libexslt/exsltconfig.h>
15
+
16
+ #ifdef __cplusplus
17
+ extern "C" {
18
+ #endif
19
+
20
+ EXSLTPUBVAR const char *exsltLibraryVersion;
21
+ EXSLTPUBVAR const int exsltLibexsltVersion;
22
+ EXSLTPUBVAR const int exsltLibxsltVersion;
23
+ EXSLTPUBVAR const int exsltLibxmlVersion;
24
+
25
+ /**
26
+ * EXSLT_COMMON_NAMESPACE:
27
+ *
28
+ * Namespace for EXSLT common functions
29
+ */
30
+ #define EXSLT_COMMON_NAMESPACE ((const xmlChar *) "http://exslt.org/common")
31
+ /**
32
+ * EXSLT_CRYPTO_NAMESPACE:
33
+ *
34
+ * Namespace for EXSLT crypto functions
35
+ */
36
+ #define EXSLT_CRYPTO_NAMESPACE ((const xmlChar *) "http://exslt.org/crypto")
37
+ /**
38
+ * EXSLT_MATH_NAMESPACE:
39
+ *
40
+ * Namespace for EXSLT math functions
41
+ */
42
+ #define EXSLT_MATH_NAMESPACE ((const xmlChar *) "http://exslt.org/math")
43
+ /**
44
+ * EXSLT_SETS_NAMESPACE:
45
+ *
46
+ * Namespace for EXSLT set functions
47
+ */
48
+ #define EXSLT_SETS_NAMESPACE ((const xmlChar *) "http://exslt.org/sets")
49
+ /**
50
+ * EXSLT_FUNCTIONS_NAMESPACE:
51
+ *
52
+ * Namespace for EXSLT functions extension functions
53
+ */
54
+ #define EXSLT_FUNCTIONS_NAMESPACE ((const xmlChar *) "http://exslt.org/functions")
55
+ /**
56
+ * EXSLT_STRINGS_NAMESPACE:
57
+ *
58
+ * Namespace for EXSLT strings functions
59
+ */
60
+ #define EXSLT_STRINGS_NAMESPACE ((const xmlChar *) "http://exslt.org/strings")
61
+ /**
62
+ * EXSLT_DATE_NAMESPACE:
63
+ *
64
+ * Namespace for EXSLT date functions
65
+ */
66
+ #define EXSLT_DATE_NAMESPACE ((const xmlChar *) "http://exslt.org/dates-and-times")
67
+ /**
68
+ * EXSLT_DYNAMIC_NAMESPACE:
69
+ *
70
+ * Namespace for EXSLT dynamic functions
71
+ */
72
+ #define EXSLT_DYNAMIC_NAMESPACE ((const xmlChar *) "http://exslt.org/dynamic")
73
+
74
+ /**
75
+ * SAXON_NAMESPACE:
76
+ *
77
+ * Namespace for SAXON extensions functions
78
+ */
79
+ #define SAXON_NAMESPACE ((const xmlChar *) "http://icl.com/saxon")
80
+
81
+ EXSLTPUBFUN void EXSLTCALL exsltCommonRegister (void);
82
+ #ifdef EXSLT_CRYPTO_ENABLED
83
+ EXSLTPUBFUN void EXSLTCALL exsltCryptoRegister (void);
84
+ #endif
85
+ EXSLTPUBFUN void EXSLTCALL exsltMathRegister (void);
86
+ EXSLTPUBFUN void EXSLTCALL exsltSetsRegister (void);
87
+ EXSLTPUBFUN void EXSLTCALL exsltFuncRegister (void);
88
+ EXSLTPUBFUN void EXSLTCALL exsltStrRegister (void);
89
+ EXSLTPUBFUN void EXSLTCALL exsltDateRegister (void);
90
+ EXSLTPUBFUN void EXSLTCALL exsltSaxonRegister (void);
91
+ EXSLTPUBFUN void EXSLTCALL exsltDynRegister(void);
92
+
93
+ EXSLTPUBFUN void EXSLTCALL exsltRegisterAll (void);
94
+
95
+ EXSLTPUBFUN int EXSLTCALL exsltDateXpathCtxtRegister (xmlXPathContextPtr ctxt,
96
+ const xmlChar *prefix);
97
+ EXSLTPUBFUN int EXSLTCALL exsltMathXpathCtxtRegister (xmlXPathContextPtr ctxt,
98
+ const xmlChar *prefix);
99
+ EXSLTPUBFUN int EXSLTCALL exsltSetsXpathCtxtRegister (xmlXPathContextPtr ctxt,
100
+ const xmlChar *prefix);
101
+ EXSLTPUBFUN int EXSLTCALL exsltStrXpathCtxtRegister (xmlXPathContextPtr ctxt,
102
+ const xmlChar *prefix);
103
+
104
+ #ifdef __cplusplus
105
+ }
106
+ #endif
107
+ #endif /* __EXSLT_H__ */
108
+
@@ -0,0 +1,70 @@
1
+ /*
2
+ * exsltconfig.h: compile-time version information for the EXSLT library
3
+ *
4
+ * See Copyright for the status of this software.
5
+ *
6
+ * daniel@veillard.com
7
+ */
8
+
9
+ #ifndef __XML_EXSLTCONFIG_H__
10
+ #define __XML_EXSLTCONFIG_H__
11
+
12
+ #ifdef __cplusplus
13
+ extern "C" {
14
+ #endif
15
+
16
+ /**
17
+ * LIBEXSLT_DOTTED_VERSION:
18
+ *
19
+ * the version string like "1.2.3"
20
+ */
21
+ #define LIBEXSLT_DOTTED_VERSION "0.8.24"
22
+
23
+ /**
24
+ * LIBEXSLT_VERSION:
25
+ *
26
+ * the version number: 1.2.3 value is 10203
27
+ */
28
+ #define LIBEXSLT_VERSION 824
29
+
30
+ /**
31
+ * LIBEXSLT_VERSION_STRING:
32
+ *
33
+ * the version number string, 1.2.3 value is "10203"
34
+ */
35
+ #define LIBEXSLT_VERSION_STRING "824"
36
+
37
+ /**
38
+ * LIBEXSLT_VERSION_EXTRA:
39
+ *
40
+ * extra version information, used to show a Git commit description
41
+ */
42
+ #define LIBEXSLT_VERSION_EXTRA ""
43
+
44
+ /**
45
+ * WITH_CRYPTO:
46
+ *
47
+ * Whether crypto support is configured into exslt
48
+ */
49
+ #if 0
50
+ #define EXSLT_CRYPTO_ENABLED
51
+ #endif
52
+
53
+ /**
54
+ * ATTRIBUTE_UNUSED:
55
+ *
56
+ * This macro is used to flag unused function parameters to GCC
57
+ */
58
+ #ifdef __GNUC__
59
+ #ifndef ATTRIBUTE_UNUSED
60
+ #define ATTRIBUTE_UNUSED __attribute__((unused))
61
+ #endif
62
+ #else
63
+ #define ATTRIBUTE_UNUSED
64
+ #endif
65
+
66
+ #ifdef __cplusplus
67
+ }
68
+ #endif
69
+
70
+ #endif /* __XML_EXSLTCONFIG_H__ */
@@ -0,0 +1,63 @@
1
+ /*
2
+ * Summary: macros for marking symbols as exportable/importable.
3
+ *
4
+ * Copy: See Copyright for the status of this software.
5
+ */
6
+
7
+ #ifndef __EXSLT_EXPORTS_H__
8
+ #define __EXSLT_EXPORTS_H__
9
+
10
+ #if defined(_WIN32) || defined(__CYGWIN__)
11
+ /** DOC_DISABLE */
12
+
13
+ #ifdef LIBEXSLT_STATIC
14
+ #define EXSLTPUBLIC
15
+ #elif defined(IN_LIBEXSLT)
16
+ #define EXSLTPUBLIC __declspec(dllexport)
17
+ #else
18
+ #define EXSLTPUBLIC __declspec(dllimport)
19
+ #endif
20
+
21
+ #define EXSLTCALL __cdecl
22
+
23
+ /** DOC_ENABLE */
24
+ #else /* not Windows */
25
+
26
+ /**
27
+ * EXSLTPUBLIC:
28
+ *
29
+ * Macro which declares a public symbol
30
+ */
31
+ #define EXSLTPUBLIC
32
+
33
+ /**
34
+ * EXSLTCALL:
35
+ *
36
+ * Macro which declares the calling convention for exported functions
37
+ */
38
+ #define EXSLTCALL
39
+
40
+ #endif /* platform switch */
41
+
42
+ /*
43
+ * EXSLTPUBFUN:
44
+ *
45
+ * Macro which declares an exportable function
46
+ */
47
+ #define EXSLTPUBFUN EXSLTPUBLIC
48
+
49
+ /**
50
+ * EXSLTPUBVAR:
51
+ *
52
+ * Macro which declares an exportable variable
53
+ */
54
+ #define EXSLTPUBVAR EXSLTPUBLIC extern
55
+
56
+ /* Compatibility */
57
+ #if !defined(LIBEXSLT_PUBLIC)
58
+ #define LIBEXSLT_PUBLIC EXSLTPUBVAR
59
+ #endif
60
+
61
+ #endif /* __EXSLT_EXPORTS_H__ */
62
+
63
+
@@ -0,0 +1,339 @@
1
+ /*
2
+ * Summary: interface for an HTML 4.0 non-verifying parser
3
+ * Description: this module implements an HTML 4.0 non-verifying parser
4
+ * with API compatible with the XML parser ones. It should
5
+ * be able to parse "real world" HTML, even if severely
6
+ * broken from a specification point of view.
7
+ *
8
+ * Copy: See Copyright for the status of this software.
9
+ *
10
+ * Author: Daniel Veillard
11
+ */
12
+
13
+ #ifndef __HTML_PARSER_H__
14
+ #define __HTML_PARSER_H__
15
+ #include <libxml/xmlversion.h>
16
+ #include <libxml/parser.h>
17
+
18
+ #ifdef LIBXML_HTML_ENABLED
19
+
20
+ #ifdef __cplusplus
21
+ extern "C" {
22
+ #endif
23
+
24
+ /*
25
+ * Backward compatibility
26
+ */
27
+ #define UTF8ToHtml htmlUTF8ToHtml
28
+
29
+ /*
30
+ * Most of the back-end structures from XML and HTML are shared.
31
+ */
32
+ typedef xmlParserCtxt htmlParserCtxt;
33
+ typedef xmlParserCtxtPtr htmlParserCtxtPtr;
34
+ typedef xmlParserNodeInfo htmlParserNodeInfo;
35
+ typedef xmlSAXHandler htmlSAXHandler;
36
+ typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;
37
+ typedef xmlParserInput htmlParserInput;
38
+ typedef xmlParserInputPtr htmlParserInputPtr;
39
+ typedef xmlDocPtr htmlDocPtr;
40
+ typedef xmlNodePtr htmlNodePtr;
41
+
42
+ /*
43
+ * Internal description of an HTML element, representing HTML 4.01
44
+ * and XHTML 1.0 (which share the same structure).
45
+ */
46
+ typedef struct _htmlElemDesc htmlElemDesc;
47
+ typedef htmlElemDesc *htmlElemDescPtr;
48
+ struct _htmlElemDesc {
49
+ const char *name; /* The tag name */
50
+ char startTag; /* unused */
51
+ char endTag; /* Whether the end tag can be implied */
52
+ char saveEndTag; /* Whether the end tag should be saved */
53
+ char empty; /* Is this an empty element ? */
54
+ char depr; /* unused */
55
+ char dtd; /* unused */
56
+ char isinline; /* is this a block 0 or inline 1 element */
57
+ const char *desc; /* the description */
58
+
59
+ const char** subelts XML_DEPRECATED_MEMBER;
60
+ const char* defaultsubelt XML_DEPRECATED_MEMBER;
61
+ const char** attrs_opt XML_DEPRECATED_MEMBER;
62
+ const char** attrs_depr XML_DEPRECATED_MEMBER;
63
+ const char** attrs_req XML_DEPRECATED_MEMBER;
64
+
65
+ int dataMode;
66
+ };
67
+
68
+ /*
69
+ * Internal description of an HTML entity.
70
+ */
71
+ typedef struct _htmlEntityDesc htmlEntityDesc;
72
+ typedef htmlEntityDesc *htmlEntityDescPtr;
73
+ struct _htmlEntityDesc {
74
+ unsigned int value; /* the UNICODE value for the character */
75
+ const char *name; /* The entity name */
76
+ const char *desc; /* the description */
77
+ };
78
+
79
+ #ifdef LIBXML_SAX1_ENABLED
80
+
81
+ XML_DEPRECATED
82
+ XMLPUBVAR const xmlSAXHandlerV1 htmlDefaultSAXHandler;
83
+
84
+ #endif /* LIBXML_SAX1_ENABLED */
85
+
86
+ /*
87
+ * There is only few public functions.
88
+ */
89
+ XML_DEPRECATED
90
+ XMLPUBFUN void
91
+ htmlInitAutoClose (void);
92
+ XMLPUBFUN const htmlElemDesc *
93
+ htmlTagLookup (const xmlChar *tag);
94
+ XMLPUBFUN const htmlEntityDesc *
95
+ htmlEntityLookup(const xmlChar *name);
96
+ XMLPUBFUN const htmlEntityDesc *
97
+ htmlEntityValueLookup(unsigned int value);
98
+
99
+ XML_DEPRECATED
100
+ XMLPUBFUN int
101
+ htmlIsAutoClosed(htmlDocPtr doc,
102
+ htmlNodePtr elem);
103
+ XML_DEPRECATED
104
+ XMLPUBFUN int
105
+ htmlAutoCloseTag(htmlDocPtr doc,
106
+ const xmlChar *name,
107
+ htmlNodePtr elem);
108
+ XML_DEPRECATED
109
+ XMLPUBFUN const htmlEntityDesc *
110
+ htmlParseEntityRef(htmlParserCtxtPtr ctxt,
111
+ const xmlChar **str);
112
+ XML_DEPRECATED
113
+ XMLPUBFUN int
114
+ htmlParseCharRef(htmlParserCtxtPtr ctxt);
115
+ XML_DEPRECATED
116
+ XMLPUBFUN void
117
+ htmlParseElement(htmlParserCtxtPtr ctxt);
118
+
119
+ XMLPUBFUN htmlParserCtxtPtr
120
+ htmlNewParserCtxt(void);
121
+ XMLPUBFUN htmlParserCtxtPtr
122
+ htmlNewSAXParserCtxt(const htmlSAXHandler *sax,
123
+ void *userData);
124
+
125
+ XMLPUBFUN htmlParserCtxtPtr
126
+ htmlCreateMemoryParserCtxt(const char *buffer,
127
+ int size);
128
+
129
+ XMLPUBFUN int
130
+ htmlParseDocument(htmlParserCtxtPtr ctxt);
131
+ XML_DEPRECATED
132
+ XMLPUBFUN htmlDocPtr
133
+ htmlSAXParseDoc (const xmlChar *cur,
134
+ const char *encoding,
135
+ htmlSAXHandlerPtr sax,
136
+ void *userData);
137
+ XMLPUBFUN htmlDocPtr
138
+ htmlParseDoc (const xmlChar *cur,
139
+ const char *encoding);
140
+ XMLPUBFUN htmlParserCtxtPtr
141
+ htmlCreateFileParserCtxt(const char *filename,
142
+ const char *encoding);
143
+ XML_DEPRECATED
144
+ XMLPUBFUN htmlDocPtr
145
+ htmlSAXParseFile(const char *filename,
146
+ const char *encoding,
147
+ htmlSAXHandlerPtr sax,
148
+ void *userData);
149
+ XMLPUBFUN htmlDocPtr
150
+ htmlParseFile (const char *filename,
151
+ const char *encoding);
152
+ XMLPUBFUN int
153
+ htmlUTF8ToHtml (unsigned char *out,
154
+ int *outlen,
155
+ const unsigned char *in,
156
+ int *inlen);
157
+ XMLPUBFUN int
158
+ htmlEncodeEntities(unsigned char *out,
159
+ int *outlen,
160
+ const unsigned char *in,
161
+ int *inlen, int quoteChar);
162
+ XMLPUBFUN int
163
+ htmlIsScriptAttribute(const xmlChar *name);
164
+ XML_DEPRECATED
165
+ XMLPUBFUN int
166
+ htmlHandleOmittedElem(int val);
167
+
168
+ #ifdef LIBXML_PUSH_ENABLED
169
+ /**
170
+ * Interfaces for the Push mode.
171
+ */
172
+ XMLPUBFUN htmlParserCtxtPtr
173
+ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
174
+ void *user_data,
175
+ const char *chunk,
176
+ int size,
177
+ const char *filename,
178
+ xmlCharEncoding enc);
179
+ XMLPUBFUN int
180
+ htmlParseChunk (htmlParserCtxtPtr ctxt,
181
+ const char *chunk,
182
+ int size,
183
+ int terminate);
184
+ #endif /* LIBXML_PUSH_ENABLED */
185
+
186
+ XMLPUBFUN void
187
+ htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
188
+
189
+ /*
190
+ * New set of simpler/more flexible APIs
191
+ */
192
+ /**
193
+ * xmlParserOption:
194
+ *
195
+ * This is the set of XML parser options that can be passed down
196
+ * to the xmlReadDoc() and similar calls.
197
+ */
198
+ typedef enum {
199
+ HTML_PARSE_RECOVER = 1<<0, /* No effect */
200
+ HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */
201
+ HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */
202
+ HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */
203
+ HTML_PARSE_PEDANTIC = 1<<7, /* No effect */
204
+ HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
205
+ HTML_PARSE_NONET = 1<<11,/* No effect */
206
+ HTML_PARSE_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */
207
+ HTML_PARSE_COMPACT = 1<<16,/* compact small text nodes */
208
+ HTML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */
209
+ HTML_PARSE_IGNORE_ENC=1<<21,/* ignore internal document encoding hint */
210
+ HTML_PARSE_BIG_LINES= 1<<22,/* Store big lines numbers in text PSVI field */
211
+ HTML_PARSE_HTML5 = 1<<26 /* HTML5 support */
212
+ } htmlParserOption;
213
+
214
+ XMLPUBFUN void
215
+ htmlCtxtReset (htmlParserCtxtPtr ctxt);
216
+ XMLPUBFUN int
217
+ htmlCtxtSetOptions (htmlParserCtxtPtr ctxt,
218
+ int options);
219
+ XMLPUBFUN int
220
+ htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
221
+ int options);
222
+ XMLPUBFUN htmlDocPtr
223
+ htmlReadDoc (const xmlChar *cur,
224
+ const char *URL,
225
+ const char *encoding,
226
+ int options);
227
+ XMLPUBFUN htmlDocPtr
228
+ htmlReadFile (const char *URL,
229
+ const char *encoding,
230
+ int options);
231
+ XMLPUBFUN htmlDocPtr
232
+ htmlReadMemory (const char *buffer,
233
+ int size,
234
+ const char *URL,
235
+ const char *encoding,
236
+ int options);
237
+ XMLPUBFUN htmlDocPtr
238
+ htmlReadFd (int fd,
239
+ const char *URL,
240
+ const char *encoding,
241
+ int options);
242
+ XMLPUBFUN htmlDocPtr
243
+ htmlReadIO (xmlInputReadCallback ioread,
244
+ xmlInputCloseCallback ioclose,
245
+ void *ioctx,
246
+ const char *URL,
247
+ const char *encoding,
248
+ int options);
249
+ XMLPUBFUN htmlDocPtr
250
+ htmlCtxtParseDocument (htmlParserCtxtPtr ctxt,
251
+ xmlParserInputPtr input);
252
+ XMLPUBFUN htmlDocPtr
253
+ htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
254
+ const xmlChar *cur,
255
+ const char *URL,
256
+ const char *encoding,
257
+ int options);
258
+ XMLPUBFUN htmlDocPtr
259
+ htmlCtxtReadFile (xmlParserCtxtPtr ctxt,
260
+ const char *filename,
261
+ const char *encoding,
262
+ int options);
263
+ XMLPUBFUN htmlDocPtr
264
+ htmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
265
+ const char *buffer,
266
+ int size,
267
+ const char *URL,
268
+ const char *encoding,
269
+ int options);
270
+ XMLPUBFUN htmlDocPtr
271
+ htmlCtxtReadFd (xmlParserCtxtPtr ctxt,
272
+ int fd,
273
+ const char *URL,
274
+ const char *encoding,
275
+ int options);
276
+ XMLPUBFUN htmlDocPtr
277
+ htmlCtxtReadIO (xmlParserCtxtPtr ctxt,
278
+ xmlInputReadCallback ioread,
279
+ xmlInputCloseCallback ioclose,
280
+ void *ioctx,
281
+ const char *URL,
282
+ const char *encoding,
283
+ int options);
284
+
285
+ /* deprecated content model
286
+ */
287
+ typedef enum {
288
+ HTML_NA = 0 , /* something we don't check at all */
289
+ HTML_INVALID = 0x1 ,
290
+ HTML_DEPRECATED = 0x2 ,
291
+ HTML_VALID = 0x4 ,
292
+ HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */
293
+ } htmlStatus ;
294
+
295
+ /* Using htmlElemDesc rather than name here, to emphasise the fact
296
+ that otherwise there's a lookup overhead
297
+ */
298
+ XML_DEPRECATED
299
+ XMLPUBFUN htmlStatus htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
300
+ XML_DEPRECATED
301
+ XMLPUBFUN int htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
302
+ XML_DEPRECATED
303
+ XMLPUBFUN htmlStatus htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
304
+ XML_DEPRECATED
305
+ XMLPUBFUN htmlStatus htmlNodeStatus(htmlNodePtr, int) ;
306
+ /**
307
+ * htmlDefaultSubelement:
308
+ * @elt: HTML element
309
+ *
310
+ * Returns the default subelement for this element
311
+ */
312
+ #define htmlDefaultSubelement(elt) elt->defaultsubelt
313
+ /**
314
+ * htmlElementAllowedHereDesc:
315
+ * @parent: HTML parent element
316
+ * @elt: HTML element
317
+ *
318
+ * Checks whether an HTML element description may be a
319
+ * direct child of the specified element.
320
+ *
321
+ * Returns 1 if allowed; 0 otherwise.
322
+ */
323
+ #define htmlElementAllowedHereDesc(parent,elt) \
324
+ htmlElementAllowedHere((parent), (elt)->name)
325
+ /**
326
+ * htmlRequiredAttrs:
327
+ * @elt: HTML element
328
+ *
329
+ * Returns the attributes required for the specified element.
330
+ */
331
+ #define htmlRequiredAttrs(elt) (elt)->attrs_req
332
+
333
+
334
+ #ifdef __cplusplus
335
+ }
336
+ #endif
337
+
338
+ #endif /* LIBXML_HTML_ENABLED */
339
+ #endif /* __HTML_PARSER_H__ */