nokogiri 1.16.7-aarch64-linux → 1.18.3

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 (208) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +11 -21
  3. data/LICENSE-DEPENDENCIES.md +6 -6
  4. data/README.md +8 -5
  5. data/dependencies.yml +6 -6
  6. data/ext/nokogiri/extconf.rb +188 -142
  7. data/ext/nokogiri/gumbo.c +69 -53
  8. data/ext/nokogiri/html4_document.c +10 -4
  9. data/ext/nokogiri/html4_element_description.c +18 -18
  10. data/ext/nokogiri/html4_sax_parser.c +40 -0
  11. data/ext/nokogiri/html4_sax_parser_context.c +48 -58
  12. data/ext/nokogiri/html4_sax_push_parser.c +25 -24
  13. data/ext/nokogiri/libxml2_polyfill.c +114 -0
  14. data/ext/nokogiri/nokogiri.c +9 -2
  15. data/ext/nokogiri/nokogiri.h +18 -33
  16. data/ext/nokogiri/xml_attr.c +1 -1
  17. data/ext/nokogiri/xml_cdata.c +2 -10
  18. data/ext/nokogiri/xml_comment.c +3 -8
  19. data/ext/nokogiri/xml_document.c +163 -156
  20. data/ext/nokogiri/xml_document_fragment.c +10 -25
  21. data/ext/nokogiri/xml_dtd.c +1 -1
  22. data/ext/nokogiri/xml_element_content.c +9 -9
  23. data/ext/nokogiri/xml_encoding_handler.c +4 -4
  24. data/ext/nokogiri/xml_namespace.c +6 -6
  25. data/ext/nokogiri/xml_node.c +141 -104
  26. data/ext/nokogiri/xml_node_set.c +46 -44
  27. data/ext/nokogiri/xml_reader.c +54 -58
  28. data/ext/nokogiri/xml_relax_ng.c +35 -56
  29. data/ext/nokogiri/xml_sax_parser.c +156 -88
  30. data/ext/nokogiri/xml_sax_parser_context.c +219 -131
  31. data/ext/nokogiri/xml_sax_push_parser.c +68 -49
  32. data/ext/nokogiri/xml_schema.c +50 -85
  33. data/ext/nokogiri/xml_syntax_error.c +19 -11
  34. data/ext/nokogiri/xml_text.c +2 -4
  35. data/ext/nokogiri/xml_xpath_context.c +103 -100
  36. data/ext/nokogiri/xslt_stylesheet.c +8 -8
  37. data/gumbo-parser/src/Makefile +34 -0
  38. data/gumbo-parser/src/README.md +41 -0
  39. data/gumbo-parser/src/ascii.c +75 -0
  40. data/gumbo-parser/src/ascii.h +115 -0
  41. data/gumbo-parser/src/attribute.c +42 -0
  42. data/gumbo-parser/src/attribute.h +17 -0
  43. data/gumbo-parser/src/char_ref.c +22225 -0
  44. data/gumbo-parser/src/char_ref.h +29 -0
  45. data/gumbo-parser/src/char_ref.rl +2154 -0
  46. data/gumbo-parser/src/error.c +658 -0
  47. data/gumbo-parser/src/error.h +152 -0
  48. data/gumbo-parser/src/foreign_attrs.c +103 -0
  49. data/gumbo-parser/src/foreign_attrs.gperf +27 -0
  50. data/gumbo-parser/src/insertion_mode.h +33 -0
  51. data/gumbo-parser/src/macros.h +91 -0
  52. data/gumbo-parser/src/nokogiri_gumbo.h +953 -0
  53. data/gumbo-parser/src/parser.c +4932 -0
  54. data/gumbo-parser/src/parser.h +41 -0
  55. data/gumbo-parser/src/replacement.h +33 -0
  56. data/gumbo-parser/src/string_buffer.c +103 -0
  57. data/gumbo-parser/src/string_buffer.h +68 -0
  58. data/gumbo-parser/src/string_piece.c +48 -0
  59. data/gumbo-parser/src/svg_attrs.c +174 -0
  60. data/gumbo-parser/src/svg_attrs.gperf +77 -0
  61. data/gumbo-parser/src/svg_tags.c +137 -0
  62. data/gumbo-parser/src/svg_tags.gperf +55 -0
  63. data/gumbo-parser/src/tag.c +223 -0
  64. data/gumbo-parser/src/tag_lookup.c +382 -0
  65. data/gumbo-parser/src/tag_lookup.gperf +170 -0
  66. data/gumbo-parser/src/tag_lookup.h +13 -0
  67. data/gumbo-parser/src/token_buffer.c +79 -0
  68. data/gumbo-parser/src/token_buffer.h +71 -0
  69. data/gumbo-parser/src/token_type.h +17 -0
  70. data/gumbo-parser/src/tokenizer.c +3464 -0
  71. data/gumbo-parser/src/tokenizer.h +112 -0
  72. data/gumbo-parser/src/tokenizer_states.h +339 -0
  73. data/gumbo-parser/src/utf8.c +245 -0
  74. data/gumbo-parser/src/utf8.h +164 -0
  75. data/gumbo-parser/src/util.c +66 -0
  76. data/gumbo-parser/src/util.h +34 -0
  77. data/gumbo-parser/src/vector.c +111 -0
  78. data/gumbo-parser/src/vector.h +45 -0
  79. data/lib/nokogiri/class_resolver.rb +1 -1
  80. data/lib/nokogiri/css/node.rb +6 -2
  81. data/lib/nokogiri/css/parser.rb +6 -4
  82. data/lib/nokogiri/css/parser.y +2 -2
  83. data/lib/nokogiri/css/parser_extras.rb +6 -66
  84. data/lib/nokogiri/css/selector_cache.rb +38 -0
  85. data/lib/nokogiri/css/tokenizer.rb +4 -4
  86. data/lib/nokogiri/css/tokenizer.rex +9 -8
  87. data/lib/nokogiri/css/xpath_visitor.rb +43 -6
  88. data/lib/nokogiri/css.rb +86 -20
  89. data/lib/nokogiri/decorators/slop.rb +3 -5
  90. data/lib/nokogiri/encoding_handler.rb +2 -2
  91. data/lib/nokogiri/html4/document.rb +44 -23
  92. data/lib/nokogiri/html4/document_fragment.rb +124 -12
  93. data/lib/nokogiri/html4/encoding_reader.rb +1 -1
  94. data/lib/nokogiri/html4/sax/parser.rb +23 -38
  95. data/lib/nokogiri/html4/sax/parser_context.rb +4 -9
  96. data/lib/nokogiri/html4.rb +9 -14
  97. data/lib/nokogiri/html5/builder.rb +40 -0
  98. data/lib/nokogiri/html5/document.rb +61 -30
  99. data/lib/nokogiri/html5/document_fragment.rb +130 -20
  100. data/lib/nokogiri/html5/node.rb +4 -4
  101. data/lib/nokogiri/html5.rb +114 -72
  102. data/lib/nokogiri/version/constant.rb +1 -1
  103. data/lib/nokogiri/xml/builder.rb +8 -1
  104. data/lib/nokogiri/xml/document.rb +70 -26
  105. data/lib/nokogiri/xml/document_fragment.rb +84 -13
  106. data/lib/nokogiri/xml/node.rb +82 -11
  107. data/lib/nokogiri/xml/node_set.rb +9 -7
  108. data/lib/nokogiri/xml/parse_options.rb +1 -1
  109. data/lib/nokogiri/xml/pp/node.rb +6 -1
  110. data/lib/nokogiri/xml/reader.rb +46 -13
  111. data/lib/nokogiri/xml/relax_ng.rb +57 -20
  112. data/lib/nokogiri/xml/sax/document.rb +174 -83
  113. data/lib/nokogiri/xml/sax/parser.rb +115 -41
  114. data/lib/nokogiri/xml/sax/parser_context.rb +116 -8
  115. data/lib/nokogiri/xml/sax/push_parser.rb +3 -0
  116. data/lib/nokogiri/xml/sax.rb +48 -0
  117. data/lib/nokogiri/xml/schema.rb +112 -45
  118. data/lib/nokogiri/xml/searchable.rb +38 -42
  119. data/lib/nokogiri/xml/syntax_error.rb +22 -0
  120. data/lib/nokogiri/xml/xpath_context.rb +14 -3
  121. data/lib/nokogiri/xml.rb +13 -24
  122. data/lib/nokogiri/xslt.rb +3 -9
  123. data/lib/xsd/xmlparser/nokogiri.rb +3 -4
  124. data/patches/libxml2/0001-Remove-script-macro-support.patch +40 -0
  125. data/patches/libxml2/0002-Update-entities-to-remove-handling-of-ssi.patch +44 -0
  126. data/patches/libxml2/0009-allow-wildcard-namespaces.patch +77 -0
  127. data/patches/libxml2/0010-update-config.guess-and-config.sub-for-libxml2.patch +224 -0
  128. data/patches/libxml2/0011-rip-out-libxml2-s-libc_single_threaded-support.patch +30 -0
  129. data/patches/libxml2/0019-xpath-Use-separate-static-hash-table-for-standard-fu.patch +244 -0
  130. data/patches/libxslt/0001-update-config.guess-and-config.sub-for-libxslt.patch +224 -0
  131. data/ports/archives/libxml2-2.13.6.tar.xz +0 -0
  132. data/ports/archives/libxslt-1.1.42.tar.xz +0 -0
  133. metadata +78 -89
  134. data/ext/nokogiri/include/libexslt/exslt.h +0 -108
  135. data/ext/nokogiri/include/libexslt/exsltconfig.h +0 -70
  136. data/ext/nokogiri/include/libexslt/exsltexports.h +0 -63
  137. data/ext/nokogiri/include/libxml2/libxml/HTMLparser.h +0 -343
  138. data/ext/nokogiri/include/libxml2/libxml/HTMLtree.h +0 -147
  139. data/ext/nokogiri/include/libxml2/libxml/SAX.h +0 -202
  140. data/ext/nokogiri/include/libxml2/libxml/SAX2.h +0 -171
  141. data/ext/nokogiri/include/libxml2/libxml/c14n.h +0 -126
  142. data/ext/nokogiri/include/libxml2/libxml/catalog.h +0 -182
  143. data/ext/nokogiri/include/libxml2/libxml/chvalid.h +0 -230
  144. data/ext/nokogiri/include/libxml2/libxml/debugXML.h +0 -217
  145. data/ext/nokogiri/include/libxml2/libxml/dict.h +0 -82
  146. data/ext/nokogiri/include/libxml2/libxml/encoding.h +0 -235
  147. data/ext/nokogiri/include/libxml2/libxml/entities.h +0 -155
  148. data/ext/nokogiri/include/libxml2/libxml/globals.h +0 -41
  149. data/ext/nokogiri/include/libxml2/libxml/hash.h +0 -232
  150. data/ext/nokogiri/include/libxml2/libxml/list.h +0 -137
  151. data/ext/nokogiri/include/libxml2/libxml/nanoftp.h +0 -186
  152. data/ext/nokogiri/include/libxml2/libxml/nanohttp.h +0 -81
  153. data/ext/nokogiri/include/libxml2/libxml/parser.h +0 -1384
  154. data/ext/nokogiri/include/libxml2/libxml/parserInternals.h +0 -663
  155. data/ext/nokogiri/include/libxml2/libxml/pattern.h +0 -100
  156. data/ext/nokogiri/include/libxml2/libxml/relaxng.h +0 -219
  157. data/ext/nokogiri/include/libxml2/libxml/schemasInternals.h +0 -959
  158. data/ext/nokogiri/include/libxml2/libxml/schematron.h +0 -143
  159. data/ext/nokogiri/include/libxml2/libxml/threads.h +0 -87
  160. data/ext/nokogiri/include/libxml2/libxml/tree.h +0 -1362
  161. data/ext/nokogiri/include/libxml2/libxml/uri.h +0 -95
  162. data/ext/nokogiri/include/libxml2/libxml/valid.h +0 -450
  163. data/ext/nokogiri/include/libxml2/libxml/xinclude.h +0 -129
  164. data/ext/nokogiri/include/libxml2/libxml/xlink.h +0 -189
  165. data/ext/nokogiri/include/libxml2/libxml/xmlIO.h +0 -421
  166. data/ext/nokogiri/include/libxml2/libxml/xmlautomata.h +0 -146
  167. data/ext/nokogiri/include/libxml2/libxml/xmlerror.h +0 -948
  168. data/ext/nokogiri/include/libxml2/libxml/xmlexports.h +0 -50
  169. data/ext/nokogiri/include/libxml2/libxml/xmlmemory.h +0 -225
  170. data/ext/nokogiri/include/libxml2/libxml/xmlmodule.h +0 -57
  171. data/ext/nokogiri/include/libxml2/libxml/xmlreader.h +0 -434
  172. data/ext/nokogiri/include/libxml2/libxml/xmlregexp.h +0 -215
  173. data/ext/nokogiri/include/libxml2/libxml/xmlsave.h +0 -97
  174. data/ext/nokogiri/include/libxml2/libxml/xmlschemas.h +0 -249
  175. data/ext/nokogiri/include/libxml2/libxml/xmlschemastypes.h +0 -152
  176. data/ext/nokogiri/include/libxml2/libxml/xmlstring.h +0 -140
  177. data/ext/nokogiri/include/libxml2/libxml/xmlunicode.h +0 -202
  178. data/ext/nokogiri/include/libxml2/libxml/xmlversion.h +0 -511
  179. data/ext/nokogiri/include/libxml2/libxml/xmlwriter.h +0 -488
  180. data/ext/nokogiri/include/libxml2/libxml/xpath.h +0 -575
  181. data/ext/nokogiri/include/libxml2/libxml/xpathInternals.h +0 -633
  182. data/ext/nokogiri/include/libxml2/libxml/xpointer.h +0 -138
  183. data/ext/nokogiri/include/libxslt/attributes.h +0 -39
  184. data/ext/nokogiri/include/libxslt/documents.h +0 -93
  185. data/ext/nokogiri/include/libxslt/extensions.h +0 -262
  186. data/ext/nokogiri/include/libxslt/extra.h +0 -72
  187. data/ext/nokogiri/include/libxslt/functions.h +0 -78
  188. data/ext/nokogiri/include/libxslt/imports.h +0 -75
  189. data/ext/nokogiri/include/libxslt/keys.h +0 -53
  190. data/ext/nokogiri/include/libxslt/namespaces.h +0 -68
  191. data/ext/nokogiri/include/libxslt/numbersInternals.h +0 -73
  192. data/ext/nokogiri/include/libxslt/pattern.h +0 -84
  193. data/ext/nokogiri/include/libxslt/preproc.h +0 -43
  194. data/ext/nokogiri/include/libxslt/security.h +0 -104
  195. data/ext/nokogiri/include/libxslt/templates.h +0 -77
  196. data/ext/nokogiri/include/libxslt/transform.h +0 -207
  197. data/ext/nokogiri/include/libxslt/variables.h +0 -118
  198. data/ext/nokogiri/include/libxslt/xslt.h +0 -110
  199. data/ext/nokogiri/include/libxslt/xsltInternals.h +0 -1992
  200. data/ext/nokogiri/include/libxslt/xsltconfig.h +0 -179
  201. data/ext/nokogiri/include/libxslt/xsltexports.h +0 -64
  202. data/ext/nokogiri/include/libxslt/xsltlocale.h +0 -44
  203. data/ext/nokogiri/include/libxslt/xsltutils.h +0 -343
  204. data/ext/nokogiri/libxml2_backwards_compat.c +0 -121
  205. data/lib/nokogiri/3.0/nokogiri.so +0 -0
  206. data/lib/nokogiri/3.1/nokogiri.so +0 -0
  207. data/lib/nokogiri/3.2/nokogiri.so +0 -0
  208. data/lib/nokogiri/3.3/nokogiri.so +0 -0
@@ -1,63 +0,0 @@
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
-
@@ -1,343 +0,0 @@
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
- * Most of the back-end structures from XML and HTML are shared.
26
- */
27
- typedef xmlParserCtxt htmlParserCtxt;
28
- typedef xmlParserCtxtPtr htmlParserCtxtPtr;
29
- typedef xmlParserNodeInfo htmlParserNodeInfo;
30
- typedef xmlSAXHandler htmlSAXHandler;
31
- typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;
32
- typedef xmlParserInput htmlParserInput;
33
- typedef xmlParserInputPtr htmlParserInputPtr;
34
- typedef xmlDocPtr htmlDocPtr;
35
- typedef xmlNodePtr htmlNodePtr;
36
-
37
- /*
38
- * Internal description of an HTML element, representing HTML 4.01
39
- * and XHTML 1.0 (which share the same structure).
40
- */
41
- typedef struct _htmlElemDesc htmlElemDesc;
42
- typedef htmlElemDesc *htmlElemDescPtr;
43
- struct _htmlElemDesc {
44
- const char *name; /* The tag name */
45
- char startTag; /* Whether the start tag can be implied */
46
- char endTag; /* Whether the end tag can be implied */
47
- char saveEndTag; /* Whether the end tag should be saved */
48
- char empty; /* Is this an empty element ? */
49
- char depr; /* Is this a deprecated element ? */
50
- char dtd; /* 1: only in Loose DTD, 2: only Frameset one */
51
- char isinline; /* is this a block 0 or inline 1 element */
52
- const char *desc; /* the description */
53
-
54
- /* NRK Jan.2003
55
- * New fields encapsulating HTML structure
56
- *
57
- * Bugs:
58
- * This is a very limited representation. It fails to tell us when
59
- * an element *requires* subelements (we only have whether they're
60
- * allowed or not), and it doesn't tell us where CDATA and PCDATA
61
- * are allowed. Some element relationships are not fully represented:
62
- * these are flagged with the word MODIFIER
63
- */
64
- const char** subelts; /* allowed sub-elements of this element */
65
- const char* defaultsubelt; /* subelement for suggested auto-repair
66
- if necessary or NULL */
67
- const char** attrs_opt; /* Optional Attributes */
68
- const char** attrs_depr; /* Additional deprecated attributes */
69
- const char** attrs_req; /* Required attributes */
70
- };
71
-
72
- /*
73
- * Internal description of an HTML entity.
74
- */
75
- typedef struct _htmlEntityDesc htmlEntityDesc;
76
- typedef htmlEntityDesc *htmlEntityDescPtr;
77
- struct _htmlEntityDesc {
78
- unsigned int value; /* the UNICODE value for the character */
79
- const char *name; /* The entity name */
80
- const char *desc; /* the description */
81
- };
82
-
83
- /** DOC_DISABLE */
84
- #ifdef LIBXML_SAX1_ENABLED
85
- #define XML_GLOBALS_HTML \
86
- XML_OP(htmlDefaultSAXHandler, xmlSAXHandlerV1, XML_DEPRECATED)
87
- #else
88
- #define XML_GLOBALS_HTML
89
- #endif
90
-
91
- #define XML_OP XML_DECLARE_GLOBAL
92
- XML_GLOBALS_HTML
93
- #undef XML_OP
94
-
95
- #if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
96
- #define htmlDefaultSAXHandler XML_GLOBAL_MACRO(htmlDefaultSAXHandler)
97
- #endif
98
- /** DOC_ENABLE */
99
-
100
- /*
101
- * There is only few public functions.
102
- */
103
- XML_DEPRECATED
104
- XMLPUBFUN void
105
- htmlInitAutoClose (void);
106
- XMLPUBFUN const htmlElemDesc *
107
- htmlTagLookup (const xmlChar *tag);
108
- XMLPUBFUN const htmlEntityDesc *
109
- htmlEntityLookup(const xmlChar *name);
110
- XMLPUBFUN const htmlEntityDesc *
111
- htmlEntityValueLookup(unsigned int value);
112
-
113
- XMLPUBFUN int
114
- htmlIsAutoClosed(htmlDocPtr doc,
115
- htmlNodePtr elem);
116
- XMLPUBFUN int
117
- htmlAutoCloseTag(htmlDocPtr doc,
118
- const xmlChar *name,
119
- htmlNodePtr elem);
120
- XML_DEPRECATED
121
- XMLPUBFUN const htmlEntityDesc *
122
- htmlParseEntityRef(htmlParserCtxtPtr ctxt,
123
- const xmlChar **str);
124
- XML_DEPRECATED
125
- XMLPUBFUN int
126
- htmlParseCharRef(htmlParserCtxtPtr ctxt);
127
- XML_DEPRECATED
128
- XMLPUBFUN void
129
- htmlParseElement(htmlParserCtxtPtr ctxt);
130
-
131
- XMLPUBFUN htmlParserCtxtPtr
132
- htmlNewParserCtxt(void);
133
- XMLPUBFUN htmlParserCtxtPtr
134
- htmlNewSAXParserCtxt(const htmlSAXHandler *sax,
135
- void *userData);
136
-
137
- XMLPUBFUN htmlParserCtxtPtr
138
- htmlCreateMemoryParserCtxt(const char *buffer,
139
- int size);
140
-
141
- XMLPUBFUN int
142
- htmlParseDocument(htmlParserCtxtPtr ctxt);
143
- XML_DEPRECATED
144
- XMLPUBFUN htmlDocPtr
145
- htmlSAXParseDoc (const xmlChar *cur,
146
- const char *encoding,
147
- htmlSAXHandlerPtr sax,
148
- void *userData);
149
- XMLPUBFUN htmlDocPtr
150
- htmlParseDoc (const xmlChar *cur,
151
- const char *encoding);
152
- XMLPUBFUN htmlParserCtxtPtr
153
- htmlCreateFileParserCtxt(const char *filename,
154
- const char *encoding);
155
- XML_DEPRECATED
156
- XMLPUBFUN htmlDocPtr
157
- htmlSAXParseFile(const char *filename,
158
- const char *encoding,
159
- htmlSAXHandlerPtr sax,
160
- void *userData);
161
- XMLPUBFUN htmlDocPtr
162
- htmlParseFile (const char *filename,
163
- const char *encoding);
164
- XMLPUBFUN int
165
- UTF8ToHtml (unsigned char *out,
166
- int *outlen,
167
- const unsigned char *in,
168
- int *inlen);
169
- XMLPUBFUN int
170
- htmlEncodeEntities(unsigned char *out,
171
- int *outlen,
172
- const unsigned char *in,
173
- int *inlen, int quoteChar);
174
- XMLPUBFUN int
175
- htmlIsScriptAttribute(const xmlChar *name);
176
- XMLPUBFUN int
177
- htmlHandleOmittedElem(int val);
178
-
179
- #ifdef LIBXML_PUSH_ENABLED
180
- /**
181
- * Interfaces for the Push mode.
182
- */
183
- XMLPUBFUN htmlParserCtxtPtr
184
- htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
185
- void *user_data,
186
- const char *chunk,
187
- int size,
188
- const char *filename,
189
- xmlCharEncoding enc);
190
- XMLPUBFUN int
191
- htmlParseChunk (htmlParserCtxtPtr ctxt,
192
- const char *chunk,
193
- int size,
194
- int terminate);
195
- #endif /* LIBXML_PUSH_ENABLED */
196
-
197
- XMLPUBFUN void
198
- htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
199
-
200
- /*
201
- * New set of simpler/more flexible APIs
202
- */
203
- /**
204
- * xmlParserOption:
205
- *
206
- * This is the set of XML parser options that can be passed down
207
- * to the xmlReadDoc() and similar calls.
208
- */
209
- typedef enum {
210
- HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */
211
- HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */
212
- HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */
213
- HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */
214
- HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
215
- HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
216
- HTML_PARSE_NONET = 1<<11,/* Forbid network access */
217
- HTML_PARSE_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */
218
- HTML_PARSE_COMPACT = 1<<16,/* compact small text nodes */
219
- HTML_PARSE_IGNORE_ENC=1<<21 /* ignore internal document encoding hint */
220
- } htmlParserOption;
221
-
222
- XMLPUBFUN void
223
- htmlCtxtReset (htmlParserCtxtPtr ctxt);
224
- XMLPUBFUN int
225
- htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
226
- int options);
227
- XMLPUBFUN htmlDocPtr
228
- htmlReadDoc (const xmlChar *cur,
229
- const char *URL,
230
- const char *encoding,
231
- int options);
232
- XMLPUBFUN htmlDocPtr
233
- htmlReadFile (const char *URL,
234
- const char *encoding,
235
- int options);
236
- XMLPUBFUN htmlDocPtr
237
- htmlReadMemory (const char *buffer,
238
- int size,
239
- const char *URL,
240
- const char *encoding,
241
- int options);
242
- XMLPUBFUN htmlDocPtr
243
- htmlReadFd (int fd,
244
- const char *URL,
245
- const char *encoding,
246
- int options);
247
- XMLPUBFUN htmlDocPtr
248
- htmlReadIO (xmlInputReadCallback ioread,
249
- xmlInputCloseCallback ioclose,
250
- void *ioctx,
251
- const char *URL,
252
- const char *encoding,
253
- int options);
254
- XMLPUBFUN htmlDocPtr
255
- htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
256
- const xmlChar *cur,
257
- const char *URL,
258
- const char *encoding,
259
- int options);
260
- XMLPUBFUN htmlDocPtr
261
- htmlCtxtReadFile (xmlParserCtxtPtr ctxt,
262
- const char *filename,
263
- const char *encoding,
264
- int options);
265
- XMLPUBFUN htmlDocPtr
266
- htmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
267
- const char *buffer,
268
- int size,
269
- const char *URL,
270
- const char *encoding,
271
- int options);
272
- XMLPUBFUN htmlDocPtr
273
- htmlCtxtReadFd (xmlParserCtxtPtr ctxt,
274
- int fd,
275
- const char *URL,
276
- const char *encoding,
277
- int options);
278
- XMLPUBFUN htmlDocPtr
279
- htmlCtxtReadIO (xmlParserCtxtPtr ctxt,
280
- xmlInputReadCallback ioread,
281
- xmlInputCloseCallback ioclose,
282
- void *ioctx,
283
- const char *URL,
284
- const char *encoding,
285
- int options);
286
-
287
- /* NRK/Jan2003: further knowledge of HTML structure
288
- */
289
- typedef enum {
290
- HTML_NA = 0 , /* something we don't check at all */
291
- HTML_INVALID = 0x1 ,
292
- HTML_DEPRECATED = 0x2 ,
293
- HTML_VALID = 0x4 ,
294
- HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */
295
- } htmlStatus ;
296
-
297
- /* Using htmlElemDesc rather than name here, to emphasise the fact
298
- that otherwise there's a lookup overhead
299
- */
300
- XMLPUBFUN htmlStatus htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
301
- XMLPUBFUN int htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
302
- XMLPUBFUN htmlStatus htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
303
- XMLPUBFUN htmlStatus htmlNodeStatus(const htmlNodePtr, int) ;
304
- /**
305
- * htmlDefaultSubelement:
306
- * @elt: HTML element
307
- *
308
- * Returns the default subelement for this element
309
- */
310
- #define htmlDefaultSubelement(elt) elt->defaultsubelt
311
- /**
312
- * htmlElementAllowedHereDesc:
313
- * @parent: HTML parent element
314
- * @elt: HTML element
315
- *
316
- * Checks whether an HTML element description may be a
317
- * direct child of the specified element.
318
- *
319
- * Returns 1 if allowed; 0 otherwise.
320
- */
321
- #define htmlElementAllowedHereDesc(parent,elt) \
322
- htmlElementAllowedHere((parent), (elt)->name)
323
- /**
324
- * htmlRequiredAttrs:
325
- * @elt: HTML element
326
- *
327
- * Returns the attributes required for the specified element.
328
- */
329
- #define htmlRequiredAttrs(elt) (elt)->attrs_req
330
-
331
-
332
- #ifdef __cplusplus
333
- }
334
- #endif
335
-
336
- #else /* LIBXML_HTML_ENABLED */
337
-
338
- /** DOC_DISABLE */
339
- #define XML_GLOBALS_HTML
340
- /** DOC_ENABLE */
341
-
342
- #endif /* LIBXML_HTML_ENABLED */
343
- #endif /* __HTML_PARSER_H__ */
@@ -1,147 +0,0 @@
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
-