/src/libxml2/include/libxml/parserInternals.h
Line | Count | Source (jump to first uncovered line) |
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 | 263M | #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 | 231M | #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 | 1.57M | #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 | 229M | #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 | 591M | #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 | 645M | #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 | 20.5M | #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 | 632M | #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 | 0 | #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 | 0 | #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 | 393M | #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 | 64.6M | #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 | 21.7M | #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 | 8.90M | #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 | 8.89M | #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 | 22.2M | #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 | 73.6M | #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 | 0 | #define IS_ASCII_LETTER(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \ |
251 | 0 | ((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 | 0 | #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 | 5.27M | #define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c) |
280 | | |
281 | | /** |
282 | | * Global variables used for predefined strings. |
283 | | */ |
284 | | XMLPUBVAR const xmlChar xmlStringText[]; |
285 | | XMLPUBVAR const xmlChar xmlStringTextNoenc[]; |
286 | | XMLPUBVAR const xmlChar xmlStringComment[]; |
287 | | |
288 | | /* |
289 | | * Function to finish the work of the macros where needed. |
290 | | */ |
291 | | XMLPUBFUN int xmlIsLetter (int c); |
292 | | |
293 | | /** |
294 | | * Parser context. |
295 | | */ |
296 | | XMLPUBFUN xmlParserCtxtPtr |
297 | | xmlCreateFileParserCtxt (const char *filename); |
298 | | XMLPUBFUN xmlParserCtxtPtr |
299 | | xmlCreateURLParserCtxt (const char *filename, |
300 | | int options); |
301 | | XMLPUBFUN xmlParserCtxtPtr |
302 | | xmlCreateMemoryParserCtxt(const char *buffer, |
303 | | int size); |
304 | | XMLPUBFUN xmlParserCtxtPtr |
305 | | xmlCreateEntityParserCtxt(const xmlChar *URL, |
306 | | const xmlChar *ID, |
307 | | const xmlChar *base); |
308 | | XMLPUBFUN int |
309 | | xmlSwitchEncoding (xmlParserCtxtPtr ctxt, |
310 | | xmlCharEncoding enc); |
311 | | XMLPUBFUN int |
312 | | xmlSwitchToEncoding (xmlParserCtxtPtr ctxt, |
313 | | xmlCharEncodingHandlerPtr handler); |
314 | | XML_DEPRECATED |
315 | | XMLPUBFUN int |
316 | | xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt, |
317 | | xmlParserInputPtr input, |
318 | | xmlCharEncodingHandlerPtr handler); |
319 | | |
320 | | /** |
321 | | * Input Streams. |
322 | | */ |
323 | | XMLPUBFUN xmlParserInputPtr |
324 | | xmlNewStringInputStream (xmlParserCtxtPtr ctxt, |
325 | | const xmlChar *buffer); |
326 | | XMLPUBFUN xmlParserInputPtr |
327 | | xmlNewEntityInputStream (xmlParserCtxtPtr ctxt, |
328 | | xmlEntityPtr entity); |
329 | | XMLPUBFUN int |
330 | | xmlPushInput (xmlParserCtxtPtr ctxt, |
331 | | xmlParserInputPtr input); |
332 | | XMLPUBFUN xmlChar |
333 | | xmlPopInput (xmlParserCtxtPtr ctxt); |
334 | | XMLPUBFUN void |
335 | | xmlFreeInputStream (xmlParserInputPtr input); |
336 | | XMLPUBFUN xmlParserInputPtr |
337 | | xmlNewInputFromFile (xmlParserCtxtPtr ctxt, |
338 | | const char *filename); |
339 | | XMLPUBFUN xmlParserInputPtr |
340 | | xmlNewInputStream (xmlParserCtxtPtr ctxt); |
341 | | |
342 | | /** |
343 | | * Namespaces. |
344 | | */ |
345 | | XMLPUBFUN xmlChar * |
346 | | xmlSplitQName (xmlParserCtxtPtr ctxt, |
347 | | const xmlChar *name, |
348 | | xmlChar **prefix); |
349 | | |
350 | | /** |
351 | | * Generic production rules. |
352 | | */ |
353 | | XML_DEPRECATED |
354 | | XMLPUBFUN const xmlChar * |
355 | | xmlParseName (xmlParserCtxtPtr ctxt); |
356 | | XML_DEPRECATED |
357 | | XMLPUBFUN xmlChar * |
358 | | xmlParseNmtoken (xmlParserCtxtPtr ctxt); |
359 | | XML_DEPRECATED |
360 | | XMLPUBFUN xmlChar * |
361 | | xmlParseEntityValue (xmlParserCtxtPtr ctxt, |
362 | | xmlChar **orig); |
363 | | XML_DEPRECATED |
364 | | XMLPUBFUN xmlChar * |
365 | | xmlParseAttValue (xmlParserCtxtPtr ctxt); |
366 | | XML_DEPRECATED |
367 | | XMLPUBFUN xmlChar * |
368 | | xmlParseSystemLiteral (xmlParserCtxtPtr ctxt); |
369 | | XML_DEPRECATED |
370 | | XMLPUBFUN xmlChar * |
371 | | xmlParsePubidLiteral (xmlParserCtxtPtr ctxt); |
372 | | XML_DEPRECATED |
373 | | XMLPUBFUN void |
374 | | xmlParseCharData (xmlParserCtxtPtr ctxt, |
375 | | int cdata); |
376 | | XML_DEPRECATED |
377 | | XMLPUBFUN xmlChar * |
378 | | xmlParseExternalID (xmlParserCtxtPtr ctxt, |
379 | | xmlChar **publicID, |
380 | | int strict); |
381 | | XML_DEPRECATED |
382 | | XMLPUBFUN void |
383 | | xmlParseComment (xmlParserCtxtPtr ctxt); |
384 | | XML_DEPRECATED |
385 | | XMLPUBFUN const xmlChar * |
386 | | xmlParsePITarget (xmlParserCtxtPtr ctxt); |
387 | | XML_DEPRECATED |
388 | | XMLPUBFUN void |
389 | | xmlParsePI (xmlParserCtxtPtr ctxt); |
390 | | XML_DEPRECATED |
391 | | XMLPUBFUN void |
392 | | xmlParseNotationDecl (xmlParserCtxtPtr ctxt); |
393 | | XML_DEPRECATED |
394 | | XMLPUBFUN void |
395 | | xmlParseEntityDecl (xmlParserCtxtPtr ctxt); |
396 | | XML_DEPRECATED |
397 | | XMLPUBFUN int |
398 | | xmlParseDefaultDecl (xmlParserCtxtPtr ctxt, |
399 | | xmlChar **value); |
400 | | XML_DEPRECATED |
401 | | XMLPUBFUN xmlEnumerationPtr |
402 | | xmlParseNotationType (xmlParserCtxtPtr ctxt); |
403 | | XML_DEPRECATED |
404 | | XMLPUBFUN xmlEnumerationPtr |
405 | | xmlParseEnumerationType (xmlParserCtxtPtr ctxt); |
406 | | XML_DEPRECATED |
407 | | XMLPUBFUN int |
408 | | xmlParseEnumeratedType (xmlParserCtxtPtr ctxt, |
409 | | xmlEnumerationPtr *tree); |
410 | | XML_DEPRECATED |
411 | | XMLPUBFUN int |
412 | | xmlParseAttributeType (xmlParserCtxtPtr ctxt, |
413 | | xmlEnumerationPtr *tree); |
414 | | XML_DEPRECATED |
415 | | XMLPUBFUN void |
416 | | xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt); |
417 | | XML_DEPRECATED |
418 | | XMLPUBFUN xmlElementContentPtr |
419 | | xmlParseElementMixedContentDecl |
420 | | (xmlParserCtxtPtr ctxt, |
421 | | int inputchk); |
422 | | XML_DEPRECATED |
423 | | XMLPUBFUN xmlElementContentPtr |
424 | | xmlParseElementChildrenContentDecl |
425 | | (xmlParserCtxtPtr ctxt, |
426 | | int inputchk); |
427 | | XML_DEPRECATED |
428 | | XMLPUBFUN int |
429 | | xmlParseElementContentDecl(xmlParserCtxtPtr ctxt, |
430 | | const xmlChar *name, |
431 | | xmlElementContentPtr *result); |
432 | | XML_DEPRECATED |
433 | | XMLPUBFUN int |
434 | | xmlParseElementDecl (xmlParserCtxtPtr ctxt); |
435 | | XML_DEPRECATED |
436 | | XMLPUBFUN void |
437 | | xmlParseMarkupDecl (xmlParserCtxtPtr ctxt); |
438 | | XML_DEPRECATED |
439 | | XMLPUBFUN int |
440 | | xmlParseCharRef (xmlParserCtxtPtr ctxt); |
441 | | XML_DEPRECATED |
442 | | XMLPUBFUN xmlEntityPtr |
443 | | xmlParseEntityRef (xmlParserCtxtPtr ctxt); |
444 | | XML_DEPRECATED |
445 | | XMLPUBFUN void |
446 | | xmlParseReference (xmlParserCtxtPtr ctxt); |
447 | | XML_DEPRECATED |
448 | | XMLPUBFUN void |
449 | | xmlParsePEReference (xmlParserCtxtPtr ctxt); |
450 | | XML_DEPRECATED |
451 | | XMLPUBFUN void |
452 | | xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt); |
453 | | #ifdef LIBXML_SAX1_ENABLED |
454 | | XML_DEPRECATED |
455 | | XMLPUBFUN const xmlChar * |
456 | | xmlParseAttribute (xmlParserCtxtPtr ctxt, |
457 | | xmlChar **value); |
458 | | XML_DEPRECATED |
459 | | XMLPUBFUN const xmlChar * |
460 | | xmlParseStartTag (xmlParserCtxtPtr ctxt); |
461 | | XML_DEPRECATED |
462 | | XMLPUBFUN void |
463 | | xmlParseEndTag (xmlParserCtxtPtr ctxt); |
464 | | #endif /* LIBXML_SAX1_ENABLED */ |
465 | | XML_DEPRECATED |
466 | | XMLPUBFUN void |
467 | | xmlParseCDSect (xmlParserCtxtPtr ctxt); |
468 | | XMLPUBFUN void |
469 | | xmlParseContent (xmlParserCtxtPtr ctxt); |
470 | | XML_DEPRECATED |
471 | | XMLPUBFUN void |
472 | | xmlParseElement (xmlParserCtxtPtr ctxt); |
473 | | XML_DEPRECATED |
474 | | XMLPUBFUN xmlChar * |
475 | | xmlParseVersionNum (xmlParserCtxtPtr ctxt); |
476 | | XML_DEPRECATED |
477 | | XMLPUBFUN xmlChar * |
478 | | xmlParseVersionInfo (xmlParserCtxtPtr ctxt); |
479 | | XML_DEPRECATED |
480 | | XMLPUBFUN xmlChar * |
481 | | xmlParseEncName (xmlParserCtxtPtr ctxt); |
482 | | XML_DEPRECATED |
483 | | XMLPUBFUN const xmlChar * |
484 | | xmlParseEncodingDecl (xmlParserCtxtPtr ctxt); |
485 | | XML_DEPRECATED |
486 | | XMLPUBFUN int |
487 | | xmlParseSDDecl (xmlParserCtxtPtr ctxt); |
488 | | XML_DEPRECATED |
489 | | XMLPUBFUN void |
490 | | xmlParseXMLDecl (xmlParserCtxtPtr ctxt); |
491 | | XML_DEPRECATED |
492 | | XMLPUBFUN void |
493 | | xmlParseTextDecl (xmlParserCtxtPtr ctxt); |
494 | | XML_DEPRECATED |
495 | | XMLPUBFUN void |
496 | | xmlParseMisc (xmlParserCtxtPtr ctxt); |
497 | | XMLPUBFUN void |
498 | | xmlParseExternalSubset (xmlParserCtxtPtr ctxt, |
499 | | const xmlChar *ExternalID, |
500 | | const xmlChar *SystemID); |
501 | | /** |
502 | | * XML_SUBSTITUTE_NONE: |
503 | | * |
504 | | * If no entities need to be substituted. |
505 | | */ |
506 | | #define XML_SUBSTITUTE_NONE 0 |
507 | | /** |
508 | | * XML_SUBSTITUTE_REF: |
509 | | * |
510 | | * Whether general entities need to be substituted. |
511 | | */ |
512 | 398M | #define XML_SUBSTITUTE_REF 1 |
513 | | /** |
514 | | * XML_SUBSTITUTE_PEREF: |
515 | | * |
516 | | * Whether parameter entities need to be substituted. |
517 | | */ |
518 | 5.73M | #define XML_SUBSTITUTE_PEREF 2 |
519 | | /** |
520 | | * XML_SUBSTITUTE_BOTH: |
521 | | * |
522 | | * Both general and parameter entities need to be substituted. |
523 | | */ |
524 | | #define XML_SUBSTITUTE_BOTH 3 |
525 | | |
526 | | XML_DEPRECATED |
527 | | XMLPUBFUN xmlChar * |
528 | | xmlStringDecodeEntities (xmlParserCtxtPtr ctxt, |
529 | | const xmlChar *str, |
530 | | int what, |
531 | | xmlChar end, |
532 | | xmlChar end2, |
533 | | xmlChar end3); |
534 | | XML_DEPRECATED |
535 | | XMLPUBFUN xmlChar * |
536 | | xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt, |
537 | | const xmlChar *str, |
538 | | int len, |
539 | | int what, |
540 | | xmlChar end, |
541 | | xmlChar end2, |
542 | | xmlChar end3); |
543 | | |
544 | | /* |
545 | | * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP. |
546 | | */ |
547 | | XMLPUBFUN int nodePush (xmlParserCtxtPtr ctxt, |
548 | | xmlNodePtr value); |
549 | | XMLPUBFUN xmlNodePtr nodePop (xmlParserCtxtPtr ctxt); |
550 | | XMLPUBFUN int inputPush (xmlParserCtxtPtr ctxt, |
551 | | xmlParserInputPtr value); |
552 | | XMLPUBFUN xmlParserInputPtr inputPop (xmlParserCtxtPtr ctxt); |
553 | | XMLPUBFUN const xmlChar * namePop (xmlParserCtxtPtr ctxt); |
554 | | XMLPUBFUN int namePush (xmlParserCtxtPtr ctxt, |
555 | | const xmlChar *value); |
556 | | |
557 | | /* |
558 | | * other commodities shared between parser.c and parserInternals. |
559 | | */ |
560 | | XMLPUBFUN int xmlSkipBlankChars (xmlParserCtxtPtr ctxt); |
561 | | XMLPUBFUN int xmlStringCurrentChar (xmlParserCtxtPtr ctxt, |
562 | | const xmlChar *cur, |
563 | | int *len); |
564 | | XMLPUBFUN void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt); |
565 | | XMLPUBFUN int xmlCheckLanguageID (const xmlChar *lang); |
566 | | |
567 | | /* |
568 | | * Really core function shared with HTML parser. |
569 | | */ |
570 | | XMLPUBFUN int xmlCurrentChar (xmlParserCtxtPtr ctxt, |
571 | | int *len); |
572 | | XMLPUBFUN int xmlCopyCharMultiByte (xmlChar *out, |
573 | | int val); |
574 | | XMLPUBFUN int xmlCopyChar (int len, |
575 | | xmlChar *out, |
576 | | int val); |
577 | | XMLPUBFUN void xmlNextChar (xmlParserCtxtPtr ctxt); |
578 | | XMLPUBFUN void xmlParserInputShrink (xmlParserInputPtr in); |
579 | | |
580 | | /* |
581 | | * Specific function to keep track of entities references |
582 | | * and used by the XSLT debugger. |
583 | | */ |
584 | | #ifdef LIBXML_LEGACY_ENABLED |
585 | | /** |
586 | | * xmlEntityReferenceFunc: |
587 | | * @ent: the entity |
588 | | * @firstNode: the fist node in the chunk |
589 | | * @lastNode: the last nod in the chunk |
590 | | * |
591 | | * Callback function used when one needs to be able to track back the |
592 | | * provenance of a chunk of nodes inherited from an entity replacement. |
593 | | */ |
594 | | typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent, |
595 | | xmlNodePtr firstNode, |
596 | | xmlNodePtr lastNode); |
597 | | |
598 | | XML_DEPRECATED |
599 | | XMLPUBFUN void xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func); |
600 | | |
601 | | XML_DEPRECATED |
602 | | XMLPUBFUN xmlChar * |
603 | | xmlParseQuotedString (xmlParserCtxtPtr ctxt); |
604 | | XML_DEPRECATED |
605 | | XMLPUBFUN void |
606 | | xmlParseNamespace (xmlParserCtxtPtr ctxt); |
607 | | XML_DEPRECATED |
608 | | XMLPUBFUN xmlChar * |
609 | | xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt); |
610 | | XML_DEPRECATED |
611 | | XMLPUBFUN xmlChar * |
612 | | xmlScanName (xmlParserCtxtPtr ctxt); |
613 | | XML_DEPRECATED |
614 | | XMLPUBFUN xmlChar * |
615 | | xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt); |
616 | | XML_DEPRECATED |
617 | | XMLPUBFUN void xmlParserHandleReference(xmlParserCtxtPtr ctxt); |
618 | | XML_DEPRECATED |
619 | | XMLPUBFUN xmlChar * |
620 | | xmlNamespaceParseQName (xmlParserCtxtPtr ctxt, |
621 | | xmlChar **prefix); |
622 | | /** |
623 | | * Entities |
624 | | */ |
625 | | XML_DEPRECATED |
626 | | XMLPUBFUN xmlChar * |
627 | | xmlDecodeEntities (xmlParserCtxtPtr ctxt, |
628 | | int len, |
629 | | int what, |
630 | | xmlChar end, |
631 | | xmlChar end2, |
632 | | xmlChar end3); |
633 | | XML_DEPRECATED |
634 | | XMLPUBFUN void |
635 | | xmlHandleEntity (xmlParserCtxtPtr ctxt, |
636 | | xmlEntityPtr entity); |
637 | | |
638 | | #endif /* LIBXML_LEGACY_ENABLED */ |
639 | | |
640 | | #ifdef __cplusplus |
641 | | } |
642 | | #endif |
643 | | #endif /* __XML_PARSER_INTERNALS_H__ */ |