nokogiri 1.13.0-aarch64-linux

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of nokogiri might be problematic. Click here for more details.

Files changed (198) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +5 -0
  3. data/LICENSE-DEPENDENCIES.md +1903 -0
  4. data/LICENSE.md +9 -0
  5. data/README.md +280 -0
  6. data/bin/nokogiri +131 -0
  7. data/dependencies.yml +73 -0
  8. data/ext/nokogiri/depend +38 -0
  9. data/ext/nokogiri/extconf.rb +1000 -0
  10. data/ext/nokogiri/gumbo.c +584 -0
  11. data/ext/nokogiri/html4_document.c +166 -0
  12. data/ext/nokogiri/html4_element_description.c +294 -0
  13. data/ext/nokogiri/html4_entity_lookup.c +37 -0
  14. data/ext/nokogiri/html4_sax_parser_context.c +120 -0
  15. data/ext/nokogiri/html4_sax_push_parser.c +95 -0
  16. data/ext/nokogiri/include/libexslt/exslt.h +102 -0
  17. data/ext/nokogiri/include/libexslt/exsltconfig.h +70 -0
  18. data/ext/nokogiri/include/libexslt/exsltexports.h +140 -0
  19. data/ext/nokogiri/include/libxml2/libxml/DOCBparser.h +96 -0
  20. data/ext/nokogiri/include/libxml2/libxml/HTMLparser.h +306 -0
  21. data/ext/nokogiri/include/libxml2/libxml/HTMLtree.h +147 -0
  22. data/ext/nokogiri/include/libxml2/libxml/SAX.h +173 -0
  23. data/ext/nokogiri/include/libxml2/libxml/SAX2.h +178 -0
  24. data/ext/nokogiri/include/libxml2/libxml/c14n.h +128 -0
  25. data/ext/nokogiri/include/libxml2/libxml/catalog.h +182 -0
  26. data/ext/nokogiri/include/libxml2/libxml/chvalid.h +230 -0
  27. data/ext/nokogiri/include/libxml2/libxml/debugXML.h +217 -0
  28. data/ext/nokogiri/include/libxml2/libxml/dict.h +79 -0
  29. data/ext/nokogiri/include/libxml2/libxml/encoding.h +245 -0
  30. data/ext/nokogiri/include/libxml2/libxml/entities.h +151 -0
  31. data/ext/nokogiri/include/libxml2/libxml/globals.h +508 -0
  32. data/ext/nokogiri/include/libxml2/libxml/hash.h +236 -0
  33. data/ext/nokogiri/include/libxml2/libxml/list.h +137 -0
  34. data/ext/nokogiri/include/libxml2/libxml/nanoftp.h +163 -0
  35. data/ext/nokogiri/include/libxml2/libxml/nanohttp.h +81 -0
  36. data/ext/nokogiri/include/libxml2/libxml/parser.h +1243 -0
  37. data/ext/nokogiri/include/libxml2/libxml/parserInternals.h +644 -0
  38. data/ext/nokogiri/include/libxml2/libxml/pattern.h +100 -0
  39. data/ext/nokogiri/include/libxml2/libxml/relaxng.h +217 -0
  40. data/ext/nokogiri/include/libxml2/libxml/schemasInternals.h +958 -0
  41. data/ext/nokogiri/include/libxml2/libxml/schematron.h +142 -0
  42. data/ext/nokogiri/include/libxml2/libxml/threads.h +89 -0
  43. data/ext/nokogiri/include/libxml2/libxml/tree.h +1311 -0
  44. data/ext/nokogiri/include/libxml2/libxml/uri.h +94 -0
  45. data/ext/nokogiri/include/libxml2/libxml/valid.h +458 -0
  46. data/ext/nokogiri/include/libxml2/libxml/xinclude.h +129 -0
  47. data/ext/nokogiri/include/libxml2/libxml/xlink.h +189 -0
  48. data/ext/nokogiri/include/libxml2/libxml/xmlIO.h +368 -0
  49. data/ext/nokogiri/include/libxml2/libxml/xmlautomata.h +146 -0
  50. data/ext/nokogiri/include/libxml2/libxml/xmlerror.h +946 -0
  51. data/ext/nokogiri/include/libxml2/libxml/xmlexports.h +77 -0
  52. data/ext/nokogiri/include/libxml2/libxml/xmlmemory.h +224 -0
  53. data/ext/nokogiri/include/libxml2/libxml/xmlmodule.h +57 -0
  54. data/ext/nokogiri/include/libxml2/libxml/xmlreader.h +428 -0
  55. data/ext/nokogiri/include/libxml2/libxml/xmlregexp.h +222 -0
  56. data/ext/nokogiri/include/libxml2/libxml/xmlsave.h +88 -0
  57. data/ext/nokogiri/include/libxml2/libxml/xmlschemas.h +246 -0
  58. data/ext/nokogiri/include/libxml2/libxml/xmlschemastypes.h +151 -0
  59. data/ext/nokogiri/include/libxml2/libxml/xmlstring.h +140 -0
  60. data/ext/nokogiri/include/libxml2/libxml/xmlunicode.h +202 -0
  61. data/ext/nokogiri/include/libxml2/libxml/xmlversion.h +485 -0
  62. data/ext/nokogiri/include/libxml2/libxml/xmlwriter.h +488 -0
  63. data/ext/nokogiri/include/libxml2/libxml/xpath.h +564 -0
  64. data/ext/nokogiri/include/libxml2/libxml/xpathInternals.h +632 -0
  65. data/ext/nokogiri/include/libxml2/libxml/xpointer.h +114 -0
  66. data/ext/nokogiri/include/libxslt/attributes.h +38 -0
  67. data/ext/nokogiri/include/libxslt/documents.h +93 -0
  68. data/ext/nokogiri/include/libxslt/extensions.h +262 -0
  69. data/ext/nokogiri/include/libxslt/extra.h +72 -0
  70. data/ext/nokogiri/include/libxslt/functions.h +78 -0
  71. data/ext/nokogiri/include/libxslt/imports.h +75 -0
  72. data/ext/nokogiri/include/libxslt/keys.h +53 -0
  73. data/ext/nokogiri/include/libxslt/namespaces.h +68 -0
  74. data/ext/nokogiri/include/libxslt/numbersInternals.h +73 -0
  75. data/ext/nokogiri/include/libxslt/pattern.h +84 -0
  76. data/ext/nokogiri/include/libxslt/preproc.h +43 -0
  77. data/ext/nokogiri/include/libxslt/security.h +104 -0
  78. data/ext/nokogiri/include/libxslt/templates.h +77 -0
  79. data/ext/nokogiri/include/libxslt/transform.h +207 -0
  80. data/ext/nokogiri/include/libxslt/variables.h +118 -0
  81. data/ext/nokogiri/include/libxslt/xslt.h +110 -0
  82. data/ext/nokogiri/include/libxslt/xsltInternals.h +1978 -0
  83. data/ext/nokogiri/include/libxslt/xsltconfig.h +180 -0
  84. data/ext/nokogiri/include/libxslt/xsltexports.h +142 -0
  85. data/ext/nokogiri/include/libxslt/xsltlocale.h +76 -0
  86. data/ext/nokogiri/include/libxslt/xsltutils.h +313 -0
  87. data/ext/nokogiri/libxml2_backwards_compat.c +121 -0
  88. data/ext/nokogiri/nokogiri.c +278 -0
  89. data/ext/nokogiri/nokogiri.h +223 -0
  90. data/ext/nokogiri/test_global_handlers.c +40 -0
  91. data/ext/nokogiri/xml_attr.c +103 -0
  92. data/ext/nokogiri/xml_attribute_decl.c +70 -0
  93. data/ext/nokogiri/xml_cdata.c +57 -0
  94. data/ext/nokogiri/xml_comment.c +62 -0
  95. data/ext/nokogiri/xml_document.c +680 -0
  96. data/ext/nokogiri/xml_document_fragment.c +44 -0
  97. data/ext/nokogiri/xml_dtd.c +208 -0
  98. data/ext/nokogiri/xml_element_content.c +128 -0
  99. data/ext/nokogiri/xml_element_decl.c +69 -0
  100. data/ext/nokogiri/xml_encoding_handler.c +104 -0
  101. data/ext/nokogiri/xml_entity_decl.c +112 -0
  102. data/ext/nokogiri/xml_entity_reference.c +50 -0
  103. data/ext/nokogiri/xml_namespace.c +120 -0
  104. data/ext/nokogiri/xml_node.c +2144 -0
  105. data/ext/nokogiri/xml_node_set.c +498 -0
  106. data/ext/nokogiri/xml_processing_instruction.c +54 -0
  107. data/ext/nokogiri/xml_reader.c +719 -0
  108. data/ext/nokogiri/xml_relax_ng.c +185 -0
  109. data/ext/nokogiri/xml_sax_parser.c +310 -0
  110. data/ext/nokogiri/xml_sax_parser_context.c +281 -0
  111. data/ext/nokogiri/xml_sax_push_parser.c +168 -0
  112. data/ext/nokogiri/xml_schema.c +284 -0
  113. data/ext/nokogiri/xml_syntax_error.c +85 -0
  114. data/ext/nokogiri/xml_text.c +48 -0
  115. data/ext/nokogiri/xml_xpath_context.c +406 -0
  116. data/ext/nokogiri/xslt_stylesheet.c +264 -0
  117. data/gumbo-parser/CHANGES.md +63 -0
  118. data/gumbo-parser/Makefile +101 -0
  119. data/gumbo-parser/THANKS +27 -0
  120. data/lib/nokogiri/2.6/nokogiri.so +0 -0
  121. data/lib/nokogiri/2.7/nokogiri.so +0 -0
  122. data/lib/nokogiri/3.0/nokogiri.so +0 -0
  123. data/lib/nokogiri/3.1/nokogiri.so +0 -0
  124. data/lib/nokogiri/class_resolver.rb +67 -0
  125. data/lib/nokogiri/css/node.rb +54 -0
  126. data/lib/nokogiri/css/parser.rb +759 -0
  127. data/lib/nokogiri/css/parser.y +280 -0
  128. data/lib/nokogiri/css/parser_extras.rb +94 -0
  129. data/lib/nokogiri/css/syntax_error.rb +9 -0
  130. data/lib/nokogiri/css/tokenizer.rb +155 -0
  131. data/lib/nokogiri/css/tokenizer.rex +56 -0
  132. data/lib/nokogiri/css/xpath_visitor.rb +359 -0
  133. data/lib/nokogiri/css.rb +60 -0
  134. data/lib/nokogiri/decorators/slop.rb +44 -0
  135. data/lib/nokogiri/extension.rb +31 -0
  136. data/lib/nokogiri/gumbo.rb +15 -0
  137. data/lib/nokogiri/html.rb +48 -0
  138. data/lib/nokogiri/html4/builder.rb +37 -0
  139. data/lib/nokogiri/html4/document.rb +331 -0
  140. data/lib/nokogiri/html4/document_fragment.rb +54 -0
  141. data/lib/nokogiri/html4/element_description.rb +25 -0
  142. data/lib/nokogiri/html4/element_description_defaults.rb +578 -0
  143. data/lib/nokogiri/html4/entity_lookup.rb +15 -0
  144. data/lib/nokogiri/html4/sax/parser.rb +61 -0
  145. data/lib/nokogiri/html4/sax/parser_context.rb +20 -0
  146. data/lib/nokogiri/html4/sax/push_parser.rb +37 -0
  147. data/lib/nokogiri/html4.rb +46 -0
  148. data/lib/nokogiri/html5/document.rb +88 -0
  149. data/lib/nokogiri/html5/document_fragment.rb +83 -0
  150. data/lib/nokogiri/html5/node.rb +96 -0
  151. data/lib/nokogiri/html5.rb +477 -0
  152. data/lib/nokogiri/jruby/dependencies.rb +21 -0
  153. data/lib/nokogiri/syntax_error.rb +6 -0
  154. data/lib/nokogiri/version/constant.rb +6 -0
  155. data/lib/nokogiri/version/info.rb +221 -0
  156. data/lib/nokogiri/version.rb +4 -0
  157. data/lib/nokogiri/xml/attr.rb +17 -0
  158. data/lib/nokogiri/xml/attribute_decl.rb +20 -0
  159. data/lib/nokogiri/xml/builder.rb +485 -0
  160. data/lib/nokogiri/xml/cdata.rb +13 -0
  161. data/lib/nokogiri/xml/character_data.rb +9 -0
  162. data/lib/nokogiri/xml/document.rb +418 -0
  163. data/lib/nokogiri/xml/document_fragment.rb +162 -0
  164. data/lib/nokogiri/xml/dtd.rb +34 -0
  165. data/lib/nokogiri/xml/element_content.rb +38 -0
  166. data/lib/nokogiri/xml/element_decl.rb +15 -0
  167. data/lib/nokogiri/xml/entity_decl.rb +21 -0
  168. data/lib/nokogiri/xml/entity_reference.rb +20 -0
  169. data/lib/nokogiri/xml/namespace.rb +16 -0
  170. data/lib/nokogiri/xml/node/save_options.rb +65 -0
  171. data/lib/nokogiri/xml/node.rb +1402 -0
  172. data/lib/nokogiri/xml/node_set.rb +364 -0
  173. data/lib/nokogiri/xml/notation.rb +19 -0
  174. data/lib/nokogiri/xml/parse_options.rb +133 -0
  175. data/lib/nokogiri/xml/pp/character_data.rb +21 -0
  176. data/lib/nokogiri/xml/pp/node.rb +55 -0
  177. data/lib/nokogiri/xml/pp.rb +4 -0
  178. data/lib/nokogiri/xml/processing_instruction.rb +10 -0
  179. data/lib/nokogiri/xml/reader.rb +107 -0
  180. data/lib/nokogiri/xml/relax_ng.rb +38 -0
  181. data/lib/nokogiri/xml/sax/document.rb +167 -0
  182. data/lib/nokogiri/xml/sax/parser.rb +125 -0
  183. data/lib/nokogiri/xml/sax/parser_context.rb +21 -0
  184. data/lib/nokogiri/xml/sax/push_parser.rb +61 -0
  185. data/lib/nokogiri/xml/sax.rb +6 -0
  186. data/lib/nokogiri/xml/schema.rb +73 -0
  187. data/lib/nokogiri/xml/searchable.rb +259 -0
  188. data/lib/nokogiri/xml/syntax_error.rb +71 -0
  189. data/lib/nokogiri/xml/text.rb +11 -0
  190. data/lib/nokogiri/xml/xpath/syntax_error.rb +13 -0
  191. data/lib/nokogiri/xml/xpath.rb +21 -0
  192. data/lib/nokogiri/xml/xpath_context.rb +16 -0
  193. data/lib/nokogiri/xml.rb +75 -0
  194. data/lib/nokogiri/xslt/stylesheet.rb +27 -0
  195. data/lib/nokogiri/xslt.rb +58 -0
  196. data/lib/nokogiri.rb +128 -0
  197. data/lib/xsd/xmlparser/nokogiri.rb +104 -0
  198. metadata +539 -0
@@ -0,0 +1,644 @@
1
+ /*
2
+ * Summary: internals routines and limits exported by the parser.
3
+ * Description: this module exports a number of internal parsing routines
4
+ * they are not really all intended for applications but
5
+ * can prove useful doing low level processing.
6
+ *
7
+ * Copy: See Copyright for the status of this software.
8
+ *
9
+ * Author: Daniel Veillard
10
+ */
11
+
12
+ #ifndef __XML_PARSER_INTERNALS_H__
13
+ #define __XML_PARSER_INTERNALS_H__
14
+
15
+ #include <libxml/xmlversion.h>
16
+ #include <libxml/parser.h>
17
+ #include <libxml/HTMLparser.h>
18
+ #include <libxml/chvalid.h>
19
+
20
+ #ifdef __cplusplus
21
+ extern "C" {
22
+ #endif
23
+
24
+ /**
25
+ * xmlParserMaxDepth:
26
+ *
27
+ * arbitrary depth limit for the XML documents that we allow to
28
+ * process. This is not a limitation of the parser but a safety
29
+ * boundary feature, use XML_PARSE_HUGE option to override it.
30
+ */
31
+ XMLPUBVAR unsigned int xmlParserMaxDepth;
32
+
33
+ /**
34
+ * XML_MAX_TEXT_LENGTH:
35
+ *
36
+ * Maximum size allowed for a single text node when building a tree.
37
+ * This is not a limitation of the parser but a safety boundary feature,
38
+ * use XML_PARSE_HUGE option to override it.
39
+ * Introduced in 2.9.0
40
+ */
41
+ #define XML_MAX_TEXT_LENGTH 10000000
42
+
43
+ /**
44
+ * XML_MAX_NAME_LENGTH:
45
+ *
46
+ * Maximum size allowed for a markup identifier.
47
+ * This is not a limitation of the parser but a safety boundary feature,
48
+ * use XML_PARSE_HUGE option to override it.
49
+ * Note that with the use of parsing dictionaries overriding the limit
50
+ * may result in more runtime memory usage in face of "unfriendly' content
51
+ * Introduced in 2.9.0
52
+ */
53
+ #define XML_MAX_NAME_LENGTH 50000
54
+
55
+ /**
56
+ * XML_MAX_DICTIONARY_LIMIT:
57
+ *
58
+ * Maximum size allowed by the parser for a dictionary by default
59
+ * This is not a limitation of the parser but a safety boundary feature,
60
+ * use XML_PARSE_HUGE option to override it.
61
+ * Introduced in 2.9.0
62
+ */
63
+ #define XML_MAX_DICTIONARY_LIMIT 10000000
64
+
65
+ /**
66
+ * XML_MAX_LOOKUP_LIMIT:
67
+ *
68
+ * Maximum size allowed by the parser for ahead lookup
69
+ * This is an upper boundary enforced by the parser to avoid bad
70
+ * behaviour on "unfriendly' content
71
+ * Introduced in 2.9.0
72
+ */
73
+ #define XML_MAX_LOOKUP_LIMIT 10000000
74
+
75
+ /**
76
+ * XML_MAX_NAMELEN:
77
+ *
78
+ * Identifiers can be longer, but this will be more costly
79
+ * at runtime.
80
+ */
81
+ #define XML_MAX_NAMELEN 100
82
+
83
+ /**
84
+ * INPUT_CHUNK:
85
+ *
86
+ * The parser tries to always have that amount of input ready.
87
+ * One of the point is providing context when reporting errors.
88
+ */
89
+ #define INPUT_CHUNK 250
90
+
91
+ /************************************************************************
92
+ * *
93
+ * UNICODE version of the macros. *
94
+ * *
95
+ ************************************************************************/
96
+ /**
97
+ * IS_BYTE_CHAR:
98
+ * @c: an byte value (int)
99
+ *
100
+ * Macro to check the following production in the XML spec:
101
+ *
102
+ * [2] Char ::= #x9 | #xA | #xD | [#x20...]
103
+ * any byte character in the accepted range
104
+ */
105
+ #define IS_BYTE_CHAR(c) xmlIsChar_ch(c)
106
+
107
+ /**
108
+ * IS_CHAR:
109
+ * @c: an UNICODE value (int)
110
+ *
111
+ * Macro to check the following production in the XML spec:
112
+ *
113
+ * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
114
+ * | [#x10000-#x10FFFF]
115
+ * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
116
+ */
117
+ #define IS_CHAR(c) xmlIsCharQ(c)
118
+
119
+ /**
120
+ * IS_CHAR_CH:
121
+ * @c: an xmlChar (usually an unsigned char)
122
+ *
123
+ * Behaves like IS_CHAR on single-byte value
124
+ */
125
+ #define IS_CHAR_CH(c) xmlIsChar_ch(c)
126
+
127
+ /**
128
+ * IS_BLANK:
129
+ * @c: an UNICODE value (int)
130
+ *
131
+ * Macro to check the following production in the XML spec:
132
+ *
133
+ * [3] S ::= (#x20 | #x9 | #xD | #xA)+
134
+ */
135
+ #define IS_BLANK(c) xmlIsBlankQ(c)
136
+
137
+ /**
138
+ * IS_BLANK_CH:
139
+ * @c: an xmlChar value (normally unsigned char)
140
+ *
141
+ * Behaviour same as IS_BLANK
142
+ */
143
+ #define IS_BLANK_CH(c) xmlIsBlank_ch(c)
144
+
145
+ /**
146
+ * IS_BASECHAR:
147
+ * @c: an UNICODE value (int)
148
+ *
149
+ * Macro to check the following production in the XML spec:
150
+ *
151
+ * [85] BaseChar ::= ... long list see REC ...
152
+ */
153
+ #define IS_BASECHAR(c) xmlIsBaseCharQ(c)
154
+
155
+ /**
156
+ * IS_DIGIT:
157
+ * @c: an UNICODE value (int)
158
+ *
159
+ * Macro to check the following production in the XML spec:
160
+ *
161
+ * [88] Digit ::= ... long list see REC ...
162
+ */
163
+ #define IS_DIGIT(c) xmlIsDigitQ(c)
164
+
165
+ /**
166
+ * IS_DIGIT_CH:
167
+ * @c: an xmlChar value (usually an unsigned char)
168
+ *
169
+ * Behaves like IS_DIGIT but with a single byte argument
170
+ */
171
+ #define IS_DIGIT_CH(c) xmlIsDigit_ch(c)
172
+
173
+ /**
174
+ * IS_COMBINING:
175
+ * @c: an UNICODE value (int)
176
+ *
177
+ * Macro to check the following production in the XML spec:
178
+ *
179
+ * [87] CombiningChar ::= ... long list see REC ...
180
+ */
181
+ #define IS_COMBINING(c) xmlIsCombiningQ(c)
182
+
183
+ /**
184
+ * IS_COMBINING_CH:
185
+ * @c: an xmlChar (usually an unsigned char)
186
+ *
187
+ * Always false (all combining chars > 0xff)
188
+ */
189
+ #define IS_COMBINING_CH(c) 0
190
+
191
+ /**
192
+ * IS_EXTENDER:
193
+ * @c: an UNICODE value (int)
194
+ *
195
+ * Macro to check the following production in the XML spec:
196
+ *
197
+ *
198
+ * [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 |
199
+ * #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] |
200
+ * [#x309D-#x309E] | [#x30FC-#x30FE]
201
+ */
202
+ #define IS_EXTENDER(c) xmlIsExtenderQ(c)
203
+
204
+ /**
205
+ * IS_EXTENDER_CH:
206
+ * @c: an xmlChar value (usually an unsigned char)
207
+ *
208
+ * Behaves like IS_EXTENDER but with a single-byte argument
209
+ */
210
+ #define IS_EXTENDER_CH(c) xmlIsExtender_ch(c)
211
+
212
+ /**
213
+ * IS_IDEOGRAPHIC:
214
+ * @c: an UNICODE value (int)
215
+ *
216
+ * Macro to check the following production in the XML spec:
217
+ *
218
+ *
219
+ * [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
220
+ */
221
+ #define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
222
+
223
+ /**
224
+ * IS_LETTER:
225
+ * @c: an UNICODE value (int)
226
+ *
227
+ * Macro to check the following production in the XML spec:
228
+ *
229
+ *
230
+ * [84] Letter ::= BaseChar | Ideographic
231
+ */
232
+ #define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
233
+
234
+ /**
235
+ * IS_LETTER_CH:
236
+ * @c: an xmlChar value (normally unsigned char)
237
+ *
238
+ * Macro behaves like IS_LETTER, but only check base chars
239
+ *
240
+ */
241
+ #define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
242
+
243
+ /**
244
+ * IS_ASCII_LETTER:
245
+ * @c: an xmlChar value
246
+ *
247
+ * Macro to check [a-zA-Z]
248
+ *
249
+ */
250
+ #define IS_ASCII_LETTER(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
251
+ ((0x61 <= (c)) && ((c) <= 0x7a)))
252
+
253
+ /**
254
+ * IS_ASCII_DIGIT:
255
+ * @c: an xmlChar value
256
+ *
257
+ * Macro to check [0-9]
258
+ *
259
+ */
260
+ #define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39))
261
+
262
+ /**
263
+ * IS_PUBIDCHAR:
264
+ * @c: an UNICODE value (int)
265
+ *
266
+ * Macro to check the following production in the XML spec:
267
+ *
268
+ *
269
+ * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
270
+ */
271
+ #define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c)
272
+
273
+ /**
274
+ * IS_PUBIDCHAR_CH:
275
+ * @c: an xmlChar value (normally unsigned char)
276
+ *
277
+ * Same as IS_PUBIDCHAR but for single-byte value
278
+ */
279
+ #define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
280
+
281
+ /**
282
+ * SKIP_EOL:
283
+ * @p: and UTF8 string pointer
284
+ *
285
+ * Skips the end of line chars.
286
+ */
287
+ #define SKIP_EOL(p) \
288
+ if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; } \
289
+ if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; }
290
+
291
+ /**
292
+ * MOVETO_ENDTAG:
293
+ * @p: and UTF8 string pointer
294
+ *
295
+ * Skips to the next '>' char.
296
+ */
297
+ #define MOVETO_ENDTAG(p) \
298
+ while ((*p) && (*(p) != '>')) (p)++
299
+
300
+ /**
301
+ * MOVETO_STARTTAG:
302
+ * @p: and UTF8 string pointer
303
+ *
304
+ * Skips to the next '<' char.
305
+ */
306
+ #define MOVETO_STARTTAG(p) \
307
+ while ((*p) && (*(p) != '<')) (p)++
308
+
309
+ /**
310
+ * Global variables used for predefined strings.
311
+ */
312
+ XMLPUBVAR const xmlChar xmlStringText[];
313
+ XMLPUBVAR const xmlChar xmlStringTextNoenc[];
314
+ XMLPUBVAR const xmlChar xmlStringComment[];
315
+
316
+ /*
317
+ * Function to finish the work of the macros where needed.
318
+ */
319
+ XMLPUBFUN int XMLCALL xmlIsLetter (int c);
320
+
321
+ /**
322
+ * Parser context.
323
+ */
324
+ XMLPUBFUN xmlParserCtxtPtr XMLCALL
325
+ xmlCreateFileParserCtxt (const char *filename);
326
+ XMLPUBFUN xmlParserCtxtPtr XMLCALL
327
+ xmlCreateURLParserCtxt (const char *filename,
328
+ int options);
329
+ XMLPUBFUN xmlParserCtxtPtr XMLCALL
330
+ xmlCreateMemoryParserCtxt(const char *buffer,
331
+ int size);
332
+ XMLPUBFUN xmlParserCtxtPtr XMLCALL
333
+ xmlCreateEntityParserCtxt(const xmlChar *URL,
334
+ const xmlChar *ID,
335
+ const xmlChar *base);
336
+ XMLPUBFUN int XMLCALL
337
+ xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
338
+ xmlCharEncoding enc);
339
+ XMLPUBFUN int XMLCALL
340
+ xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
341
+ xmlCharEncodingHandlerPtr handler);
342
+ XMLPUBFUN int XMLCALL
343
+ xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
344
+ xmlParserInputPtr input,
345
+ xmlCharEncodingHandlerPtr handler);
346
+
347
+ #ifdef IN_LIBXML
348
+ /* internal error reporting */
349
+ XMLPUBFUN void XMLCALL
350
+ __xmlErrEncoding (xmlParserCtxtPtr ctxt,
351
+ xmlParserErrors xmlerr,
352
+ const char *msg,
353
+ const xmlChar * str1,
354
+ const xmlChar * str2) LIBXML_ATTR_FORMAT(3,0);
355
+ #endif
356
+
357
+ /**
358
+ * Input Streams.
359
+ */
360
+ XMLPUBFUN xmlParserInputPtr XMLCALL
361
+ xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
362
+ const xmlChar *buffer);
363
+ XMLPUBFUN xmlParserInputPtr XMLCALL
364
+ xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
365
+ xmlEntityPtr entity);
366
+ XMLPUBFUN int XMLCALL
367
+ xmlPushInput (xmlParserCtxtPtr ctxt,
368
+ xmlParserInputPtr input);
369
+ XMLPUBFUN xmlChar XMLCALL
370
+ xmlPopInput (xmlParserCtxtPtr ctxt);
371
+ XMLPUBFUN void XMLCALL
372
+ xmlFreeInputStream (xmlParserInputPtr input);
373
+ XMLPUBFUN xmlParserInputPtr XMLCALL
374
+ xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
375
+ const char *filename);
376
+ XMLPUBFUN xmlParserInputPtr XMLCALL
377
+ xmlNewInputStream (xmlParserCtxtPtr ctxt);
378
+
379
+ /**
380
+ * Namespaces.
381
+ */
382
+ XMLPUBFUN xmlChar * XMLCALL
383
+ xmlSplitQName (xmlParserCtxtPtr ctxt,
384
+ const xmlChar *name,
385
+ xmlChar **prefix);
386
+
387
+ /**
388
+ * Generic production rules.
389
+ */
390
+ XMLPUBFUN const xmlChar * XMLCALL
391
+ xmlParseName (xmlParserCtxtPtr ctxt);
392
+ XMLPUBFUN xmlChar * XMLCALL
393
+ xmlParseNmtoken (xmlParserCtxtPtr ctxt);
394
+ XMLPUBFUN xmlChar * XMLCALL
395
+ xmlParseEntityValue (xmlParserCtxtPtr ctxt,
396
+ xmlChar **orig);
397
+ XMLPUBFUN xmlChar * XMLCALL
398
+ xmlParseAttValue (xmlParserCtxtPtr ctxt);
399
+ XMLPUBFUN xmlChar * XMLCALL
400
+ xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
401
+ XMLPUBFUN xmlChar * XMLCALL
402
+ xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
403
+ XMLPUBFUN void XMLCALL
404
+ xmlParseCharData (xmlParserCtxtPtr ctxt,
405
+ int cdata);
406
+ XMLPUBFUN xmlChar * XMLCALL
407
+ xmlParseExternalID (xmlParserCtxtPtr ctxt,
408
+ xmlChar **publicID,
409
+ int strict);
410
+ XMLPUBFUN void XMLCALL
411
+ xmlParseComment (xmlParserCtxtPtr ctxt);
412
+ XMLPUBFUN const xmlChar * XMLCALL
413
+ xmlParsePITarget (xmlParserCtxtPtr ctxt);
414
+ XMLPUBFUN void XMLCALL
415
+ xmlParsePI (xmlParserCtxtPtr ctxt);
416
+ XMLPUBFUN void XMLCALL
417
+ xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
418
+ XMLPUBFUN void XMLCALL
419
+ xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
420
+ XMLPUBFUN int XMLCALL
421
+ xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
422
+ xmlChar **value);
423
+ XMLPUBFUN xmlEnumerationPtr XMLCALL
424
+ xmlParseNotationType (xmlParserCtxtPtr ctxt);
425
+ XMLPUBFUN xmlEnumerationPtr XMLCALL
426
+ xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
427
+ XMLPUBFUN int XMLCALL
428
+ xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
429
+ xmlEnumerationPtr *tree);
430
+ XMLPUBFUN int XMLCALL
431
+ xmlParseAttributeType (xmlParserCtxtPtr ctxt,
432
+ xmlEnumerationPtr *tree);
433
+ XMLPUBFUN void XMLCALL
434
+ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
435
+ XMLPUBFUN xmlElementContentPtr XMLCALL
436
+ xmlParseElementMixedContentDecl
437
+ (xmlParserCtxtPtr ctxt,
438
+ int inputchk);
439
+ XMLPUBFUN xmlElementContentPtr XMLCALL
440
+ xmlParseElementChildrenContentDecl
441
+ (xmlParserCtxtPtr ctxt,
442
+ int inputchk);
443
+ XMLPUBFUN int XMLCALL
444
+ xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
445
+ const xmlChar *name,
446
+ xmlElementContentPtr *result);
447
+ XMLPUBFUN int XMLCALL
448
+ xmlParseElementDecl (xmlParserCtxtPtr ctxt);
449
+ XMLPUBFUN void XMLCALL
450
+ xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
451
+ XMLPUBFUN int XMLCALL
452
+ xmlParseCharRef (xmlParserCtxtPtr ctxt);
453
+ XMLPUBFUN xmlEntityPtr XMLCALL
454
+ xmlParseEntityRef (xmlParserCtxtPtr ctxt);
455
+ XMLPUBFUN void XMLCALL
456
+ xmlParseReference (xmlParserCtxtPtr ctxt);
457
+ XMLPUBFUN void XMLCALL
458
+ xmlParsePEReference (xmlParserCtxtPtr ctxt);
459
+ XMLPUBFUN void XMLCALL
460
+ xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
461
+ #ifdef LIBXML_SAX1_ENABLED
462
+ XMLPUBFUN const xmlChar * XMLCALL
463
+ xmlParseAttribute (xmlParserCtxtPtr ctxt,
464
+ xmlChar **value);
465
+ XMLPUBFUN const xmlChar * XMLCALL
466
+ xmlParseStartTag (xmlParserCtxtPtr ctxt);
467
+ XMLPUBFUN void XMLCALL
468
+ xmlParseEndTag (xmlParserCtxtPtr ctxt);
469
+ #endif /* LIBXML_SAX1_ENABLED */
470
+ XMLPUBFUN void XMLCALL
471
+ xmlParseCDSect (xmlParserCtxtPtr ctxt);
472
+ XMLPUBFUN void XMLCALL
473
+ xmlParseContent (xmlParserCtxtPtr ctxt);
474
+ XMLPUBFUN void XMLCALL
475
+ xmlParseElement (xmlParserCtxtPtr ctxt);
476
+ XMLPUBFUN xmlChar * XMLCALL
477
+ xmlParseVersionNum (xmlParserCtxtPtr ctxt);
478
+ XMLPUBFUN xmlChar * XMLCALL
479
+ xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
480
+ XMLPUBFUN xmlChar * XMLCALL
481
+ xmlParseEncName (xmlParserCtxtPtr ctxt);
482
+ XMLPUBFUN const xmlChar * XMLCALL
483
+ xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
484
+ XMLPUBFUN int XMLCALL
485
+ xmlParseSDDecl (xmlParserCtxtPtr ctxt);
486
+ XMLPUBFUN void XMLCALL
487
+ xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
488
+ XMLPUBFUN void XMLCALL
489
+ xmlParseTextDecl (xmlParserCtxtPtr ctxt);
490
+ XMLPUBFUN void XMLCALL
491
+ xmlParseMisc (xmlParserCtxtPtr ctxt);
492
+ XMLPUBFUN void XMLCALL
493
+ xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
494
+ const xmlChar *ExternalID,
495
+ const xmlChar *SystemID);
496
+ /**
497
+ * XML_SUBSTITUTE_NONE:
498
+ *
499
+ * If no entities need to be substituted.
500
+ */
501
+ #define XML_SUBSTITUTE_NONE 0
502
+ /**
503
+ * XML_SUBSTITUTE_REF:
504
+ *
505
+ * Whether general entities need to be substituted.
506
+ */
507
+ #define XML_SUBSTITUTE_REF 1
508
+ /**
509
+ * XML_SUBSTITUTE_PEREF:
510
+ *
511
+ * Whether parameter entities need to be substituted.
512
+ */
513
+ #define XML_SUBSTITUTE_PEREF 2
514
+ /**
515
+ * XML_SUBSTITUTE_BOTH:
516
+ *
517
+ * Both general and parameter entities need to be substituted.
518
+ */
519
+ #define XML_SUBSTITUTE_BOTH 3
520
+
521
+ XMLPUBFUN xmlChar * XMLCALL
522
+ xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
523
+ const xmlChar *str,
524
+ int what,
525
+ xmlChar end,
526
+ xmlChar end2,
527
+ xmlChar end3);
528
+ XMLPUBFUN xmlChar * XMLCALL
529
+ xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
530
+ const xmlChar *str,
531
+ int len,
532
+ int what,
533
+ xmlChar end,
534
+ xmlChar end2,
535
+ xmlChar end3);
536
+
537
+ /*
538
+ * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
539
+ */
540
+ XMLPUBFUN int XMLCALL nodePush (xmlParserCtxtPtr ctxt,
541
+ xmlNodePtr value);
542
+ XMLPUBFUN xmlNodePtr XMLCALL nodePop (xmlParserCtxtPtr ctxt);
543
+ XMLPUBFUN int XMLCALL inputPush (xmlParserCtxtPtr ctxt,
544
+ xmlParserInputPtr value);
545
+ XMLPUBFUN xmlParserInputPtr XMLCALL inputPop (xmlParserCtxtPtr ctxt);
546
+ XMLPUBFUN const xmlChar * XMLCALL namePop (xmlParserCtxtPtr ctxt);
547
+ XMLPUBFUN int XMLCALL namePush (xmlParserCtxtPtr ctxt,
548
+ const xmlChar *value);
549
+
550
+ /*
551
+ * other commodities shared between parser.c and parserInternals.
552
+ */
553
+ XMLPUBFUN int XMLCALL xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
554
+ XMLPUBFUN int XMLCALL xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
555
+ const xmlChar *cur,
556
+ int *len);
557
+ XMLPUBFUN void XMLCALL xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
558
+ XMLPUBFUN int XMLCALL xmlCheckLanguageID (const xmlChar *lang);
559
+
560
+ /*
561
+ * Really core function shared with HTML parser.
562
+ */
563
+ XMLPUBFUN int XMLCALL xmlCurrentChar (xmlParserCtxtPtr ctxt,
564
+ int *len);
565
+ XMLPUBFUN int XMLCALL xmlCopyCharMultiByte (xmlChar *out,
566
+ int val);
567
+ XMLPUBFUN int XMLCALL xmlCopyChar (int len,
568
+ xmlChar *out,
569
+ int val);
570
+ XMLPUBFUN void XMLCALL xmlNextChar (xmlParserCtxtPtr ctxt);
571
+ XMLPUBFUN void XMLCALL xmlParserInputShrink (xmlParserInputPtr in);
572
+
573
+ #ifdef LIBXML_HTML_ENABLED
574
+ /*
575
+ * Actually comes from the HTML parser but launched from the init stuff.
576
+ */
577
+ XMLPUBFUN void XMLCALL htmlInitAutoClose (void);
578
+ XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreateFileParserCtxt(const char *filename,
579
+ const char *encoding);
580
+ #endif
581
+
582
+ /*
583
+ * Specific function to keep track of entities references
584
+ * and used by the XSLT debugger.
585
+ */
586
+ #ifdef LIBXML_LEGACY_ENABLED
587
+ /**
588
+ * xmlEntityReferenceFunc:
589
+ * @ent: the entity
590
+ * @firstNode: the fist node in the chunk
591
+ * @lastNode: the last nod in the chunk
592
+ *
593
+ * Callback function used when one needs to be able to track back the
594
+ * provenance of a chunk of nodes inherited from an entity replacement.
595
+ */
596
+ typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
597
+ xmlNodePtr firstNode,
598
+ xmlNodePtr lastNode);
599
+
600
+ XMLPUBFUN void XMLCALL xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
601
+
602
+ XMLPUBFUN xmlChar * XMLCALL
603
+ xmlParseQuotedString (xmlParserCtxtPtr ctxt);
604
+ XMLPUBFUN void XMLCALL
605
+ xmlParseNamespace (xmlParserCtxtPtr ctxt);
606
+ XMLPUBFUN xmlChar * XMLCALL
607
+ xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
608
+ XMLPUBFUN xmlChar * XMLCALL
609
+ xmlScanName (xmlParserCtxtPtr ctxt);
610
+ XMLPUBFUN xmlChar * XMLCALL
611
+ xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
612
+ XMLPUBFUN void XMLCALL xmlParserHandleReference(xmlParserCtxtPtr ctxt);
613
+ XMLPUBFUN xmlChar * XMLCALL
614
+ xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
615
+ xmlChar **prefix);
616
+ /**
617
+ * Entities
618
+ */
619
+ XMLPUBFUN xmlChar * XMLCALL
620
+ xmlDecodeEntities (xmlParserCtxtPtr ctxt,
621
+ int len,
622
+ int what,
623
+ xmlChar end,
624
+ xmlChar end2,
625
+ xmlChar end3);
626
+ XMLPUBFUN void XMLCALL
627
+ xmlHandleEntity (xmlParserCtxtPtr ctxt,
628
+ xmlEntityPtr entity);
629
+
630
+ #endif /* LIBXML_LEGACY_ENABLED */
631
+
632
+ #ifdef IN_LIBXML
633
+ /*
634
+ * internal only
635
+ */
636
+ XMLPUBFUN void XMLCALL
637
+ xmlErrMemory (xmlParserCtxtPtr ctxt,
638
+ const char *extra);
639
+ #endif
640
+
641
+ #ifdef __cplusplus
642
+ }
643
+ #endif
644
+ #endif /* __XML_PARSER_INTERNALS_H__ */