• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include <libxml/SAX2.h>
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 /**
26  * xmlParserMaxDepth:
27  *
28  * DEPRECATED: has no effect
29  *
30  * arbitrary depth limit for the XML documents that we allow to
31  * process. This is not a limitation of the parser but a safety
32  * boundary feature, use XML_PARSE_HUGE option to override it.
33  */
34 XML_DEPRECATED
35 XMLPUBVAR const unsigned int xmlParserMaxDepth;
36 
37 /**
38  * XML_MAX_TEXT_LENGTH:
39  *
40  * Maximum size allowed for a single text node when building a tree.
41  * This is not a limitation of the parser but a safety boundary feature,
42  * use XML_PARSE_HUGE option to override it.
43  * Introduced in 2.9.0
44  */
45 #define XML_MAX_TEXT_LENGTH 10000000
46 
47 /**
48  * XML_MAX_HUGE_LENGTH:
49  *
50  * Maximum size allowed when XML_PARSE_HUGE is set.
51  */
52 #define XML_MAX_HUGE_LENGTH 1000000000
53 
54 /**
55  * XML_MAX_NAME_LENGTH:
56  *
57  * Maximum size allowed for a markup identifier.
58  * This is not a limitation of the parser but a safety boundary feature,
59  * use XML_PARSE_HUGE option to override it.
60  * Note that with the use of parsing dictionaries overriding the limit
61  * may result in more runtime memory usage in face of "unfriendly' content
62  * Introduced in 2.9.0
63  */
64 #define XML_MAX_NAME_LENGTH 50000
65 
66 /**
67  * XML_MAX_DICTIONARY_LIMIT:
68  *
69  * Maximum size allowed by the parser for a dictionary by default
70  * This is not a limitation of the parser but a safety boundary feature,
71  * use XML_PARSE_HUGE option to override it.
72  * Introduced in 2.9.0
73  */
74 #define XML_MAX_DICTIONARY_LIMIT 10000000
75 
76 /**
77  * XML_MAX_LOOKUP_LIMIT:
78  *
79  * Maximum size allowed by the parser for ahead lookup
80  * This is an upper boundary enforced by the parser to avoid bad
81  * behaviour on "unfriendly' content
82  * Introduced in 2.9.0
83  */
84 #define XML_MAX_LOOKUP_LIMIT 10000000
85 
86 /**
87  * XML_MAX_NAMELEN:
88  *
89  * Identifiers can be longer, but this will be more costly
90  * at runtime.
91  */
92 #define XML_MAX_NAMELEN 100
93 
94 /**
95  * INPUT_CHUNK:
96  *
97  * The parser tries to always have that amount of input ready.
98  * One of the point is providing context when reporting errors.
99  */
100 #define INPUT_CHUNK	250
101 
102 /************************************************************************
103  *									*
104  * UNICODE version of the macros.					*
105  *									*
106  ************************************************************************/
107 /**
108  * IS_BYTE_CHAR:
109  * @c:  an byte value (int)
110  *
111  * Macro to check the following production in the XML spec:
112  *
113  * [2] Char ::= #x9 | #xA | #xD | [#x20...]
114  * any byte character in the accepted range
115  */
116 #define IS_BYTE_CHAR(c)	 xmlIsChar_ch(c)
117 
118 /**
119  * IS_CHAR:
120  * @c:  an UNICODE value (int)
121  *
122  * Macro to check the following production in the XML spec:
123  *
124  * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
125  *                  | [#x10000-#x10FFFF]
126  * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
127  */
128 #define IS_CHAR(c)   xmlIsCharQ(c)
129 
130 /**
131  * IS_CHAR_CH:
132  * @c: an xmlChar (usually an unsigned char)
133  *
134  * Behaves like IS_CHAR on single-byte value
135  */
136 #define IS_CHAR_CH(c)  xmlIsChar_ch(c)
137 
138 /**
139  * IS_BLANK:
140  * @c:  an UNICODE value (int)
141  *
142  * Macro to check the following production in the XML spec:
143  *
144  * [3] S ::= (#x20 | #x9 | #xD | #xA)+
145  */
146 #define IS_BLANK(c)  xmlIsBlankQ(c)
147 
148 /**
149  * IS_BLANK_CH:
150  * @c:  an xmlChar value (normally unsigned char)
151  *
152  * Behaviour same as IS_BLANK
153  */
154 #define IS_BLANK_CH(c)  xmlIsBlank_ch(c)
155 
156 /**
157  * IS_BASECHAR:
158  * @c:  an UNICODE value (int)
159  *
160  * Macro to check the following production in the XML spec:
161  *
162  * [85] BaseChar ::= ... long list see REC ...
163  */
164 #define IS_BASECHAR(c) xmlIsBaseCharQ(c)
165 
166 /**
167  * IS_DIGIT:
168  * @c:  an UNICODE value (int)
169  *
170  * Macro to check the following production in the XML spec:
171  *
172  * [88] Digit ::= ... long list see REC ...
173  */
174 #define IS_DIGIT(c) xmlIsDigitQ(c)
175 
176 /**
177  * IS_DIGIT_CH:
178  * @c:  an xmlChar value (usually an unsigned char)
179  *
180  * Behaves like IS_DIGIT but with a single byte argument
181  */
182 #define IS_DIGIT_CH(c)  xmlIsDigit_ch(c)
183 
184 /**
185  * IS_COMBINING:
186  * @c:  an UNICODE value (int)
187  *
188  * Macro to check the following production in the XML spec:
189  *
190  * [87] CombiningChar ::= ... long list see REC ...
191  */
192 #define IS_COMBINING(c) xmlIsCombiningQ(c)
193 
194 /**
195  * IS_COMBINING_CH:
196  * @c:  an xmlChar (usually an unsigned char)
197  *
198  * Always false (all combining chars > 0xff)
199  */
200 #define IS_COMBINING_CH(c) 0
201 
202 /**
203  * IS_EXTENDER:
204  * @c:  an UNICODE value (int)
205  *
206  * Macro to check the following production in the XML spec:
207  *
208  *
209  * [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 |
210  *                   #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] |
211  *                   [#x309D-#x309E] | [#x30FC-#x30FE]
212  */
213 #define IS_EXTENDER(c) xmlIsExtenderQ(c)
214 
215 /**
216  * IS_EXTENDER_CH:
217  * @c:  an xmlChar value (usually an unsigned char)
218  *
219  * Behaves like IS_EXTENDER but with a single-byte argument
220  */
221 #define IS_EXTENDER_CH(c)  xmlIsExtender_ch(c)
222 
223 /**
224  * IS_IDEOGRAPHIC:
225  * @c:  an UNICODE value (int)
226  *
227  * Macro to check the following production in the XML spec:
228  *
229  *
230  * [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
231  */
232 #define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
233 
234 /**
235  * IS_LETTER:
236  * @c:  an UNICODE value (int)
237  *
238  * Macro to check the following production in the XML spec:
239  *
240  *
241  * [84] Letter ::= BaseChar | Ideographic
242  */
243 #define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
244 
245 /**
246  * IS_LETTER_CH:
247  * @c:  an xmlChar value (normally unsigned char)
248  *
249  * Macro behaves like IS_LETTER, but only check base chars
250  *
251  */
252 #define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
253 
254 /**
255  * IS_ASCII_LETTER:
256  * @c: an xmlChar value
257  *
258  * Macro to check [a-zA-Z]
259  *
260  */
261 #define IS_ASCII_LETTER(c)	(((0x41 <= (c)) && ((c) <= 0x5a)) || \
262 				 ((0x61 <= (c)) && ((c) <= 0x7a)))
263 
264 /**
265  * IS_ASCII_DIGIT:
266  * @c: an xmlChar value
267  *
268  * Macro to check [0-9]
269  *
270  */
271 #define IS_ASCII_DIGIT(c)	((0x30 <= (c)) && ((c) <= 0x39))
272 
273 /**
274  * IS_PUBIDCHAR:
275  * @c:  an UNICODE value (int)
276  *
277  * Macro to check the following production in the XML spec:
278  *
279  *
280  * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
281  */
282 #define IS_PUBIDCHAR(c)	xmlIsPubidCharQ(c)
283 
284 /**
285  * IS_PUBIDCHAR_CH:
286  * @c:  an xmlChar value (normally unsigned char)
287  *
288  * Same as IS_PUBIDCHAR but for single-byte value
289  */
290 #define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
291 
292 /**
293  * Global variables used for predefined strings.
294  */
295 XMLPUBVAR const xmlChar xmlStringText[];
296 XMLPUBVAR const xmlChar xmlStringTextNoenc[];
297 XMLPUBVAR const xmlChar xmlStringComment[];
298 
299 /*
300  * Function to finish the work of the macros where needed.
301  */
302 XMLPUBFUN int                   xmlIsLetter     (int c);
303 
304 /**
305  * Parser context.
306  */
307 XMLPUBFUN xmlParserCtxtPtr
308 			xmlCreateFileParserCtxt	(const char *filename);
309 XMLPUBFUN xmlParserCtxtPtr
310 			xmlCreateURLParserCtxt	(const char *filename,
311 						 int options);
312 XMLPUBFUN xmlParserCtxtPtr
313 			xmlCreateMemoryParserCtxt(const char *buffer,
314 						 int size);
315 XMLPUBFUN xmlParserCtxtPtr
316 			xmlCreateEntityParserCtxt(const xmlChar *URL,
317 						 const xmlChar *ID,
318 						 const xmlChar *base);
319 XMLPUBFUN void
320 			xmlCtxtErrMemory	(xmlParserCtxtPtr ctxt);
321 XMLPUBFUN int
322 			xmlSwitchEncoding	(xmlParserCtxtPtr ctxt,
323 						 xmlCharEncoding enc);
324 XMLPUBFUN int
325 			xmlSwitchEncodingName	(xmlParserCtxtPtr ctxt,
326 						 const char *encoding);
327 XMLPUBFUN int
328 			xmlSwitchToEncoding	(xmlParserCtxtPtr ctxt,
329 					 xmlCharEncodingHandlerPtr handler);
330 XML_DEPRECATED
331 XMLPUBFUN int
332 			xmlSwitchInputEncoding	(xmlParserCtxtPtr ctxt,
333 						 xmlParserInputPtr input,
334 					 xmlCharEncodingHandlerPtr handler);
335 
336 /**
337  * Input Streams.
338  */
339 XMLPUBFUN xmlParserInputPtr
340 			xmlNewStringInputStream	(xmlParserCtxtPtr ctxt,
341 						 const xmlChar *buffer);
342 XML_DEPRECATED
343 XMLPUBFUN xmlParserInputPtr
344 			xmlNewEntityInputStream	(xmlParserCtxtPtr ctxt,
345 						 xmlEntityPtr entity);
346 XMLPUBFUN int
347 			xmlPushInput		(xmlParserCtxtPtr ctxt,
348 						 xmlParserInputPtr input);
349 XMLPUBFUN xmlChar
350 			xmlPopInput		(xmlParserCtxtPtr ctxt);
351 XMLPUBFUN void
352 			xmlFreeInputStream	(xmlParserInputPtr input);
353 XMLPUBFUN xmlParserInputPtr
354 			xmlNewInputFromFile	(xmlParserCtxtPtr ctxt,
355 						 const char *filename);
356 XMLPUBFUN xmlParserInputPtr
357 			xmlNewInputStream	(xmlParserCtxtPtr ctxt);
358 
359 /**
360  * New input API
361  */
362 
363 #define XML_INPUT_BUF_STATIC		(1u << 1)
364 #define XML_INPUT_BUF_ZERO_TERMINATED	(1u << 2)
365 #define XML_INPUT_UNZIP                 (1u << 3)
366 #define XML_INPUT_NETWORK               (1u << 4)
367 
368 XMLPUBFUN int
369 xmlInputCreateUrl(const char *url, int flags, xmlParserInputPtr *out);
370 XMLPUBFUN xmlParserInputPtr
371 xmlInputCreateMemory(const char *url, const void *mem, size_t size,
372                      int flags);
373 XMLPUBFUN xmlParserInputPtr
374 xmlInputCreateString(const char *url, const char *str, int flags);
375 XMLPUBFUN xmlParserInputPtr
376 xmlInputCreateFd(const char *url, int fd, int flags);
377 XMLPUBFUN xmlParserInputPtr
378 xmlInputCreateIO(const char *url, xmlInputReadCallback ioRead,
379                  xmlInputCloseCallback ioClose, void *ioCtxt, int flags);
380 XMLPUBFUN int
381 xmlInputSetEncoding(xmlParserInputPtr input, const char *encoding);
382 
383 /**
384  * Namespaces.
385  */
386 XMLPUBFUN xmlChar *
387 			xmlSplitQName		(xmlParserCtxtPtr ctxt,
388 						 const xmlChar *name,
389 						 xmlChar **prefix);
390 
391 /**
392  * Generic production rules.
393  */
394 XML_DEPRECATED
395 XMLPUBFUN const xmlChar *
396 			xmlParseName		(xmlParserCtxtPtr ctxt);
397 XML_DEPRECATED
398 XMLPUBFUN xmlChar *
399 			xmlParseNmtoken		(xmlParserCtxtPtr ctxt);
400 XML_DEPRECATED
401 XMLPUBFUN xmlChar *
402 			xmlParseEntityValue	(xmlParserCtxtPtr ctxt,
403 						 xmlChar **orig);
404 XML_DEPRECATED
405 XMLPUBFUN xmlChar *
406 			xmlParseAttValue	(xmlParserCtxtPtr ctxt);
407 XML_DEPRECATED
408 XMLPUBFUN xmlChar *
409 			xmlParseSystemLiteral	(xmlParserCtxtPtr ctxt);
410 XML_DEPRECATED
411 XMLPUBFUN xmlChar *
412 			xmlParsePubidLiteral	(xmlParserCtxtPtr ctxt);
413 XML_DEPRECATED
414 XMLPUBFUN void
415 			xmlParseCharData	(xmlParserCtxtPtr ctxt,
416 						 int cdata);
417 XML_DEPRECATED
418 XMLPUBFUN xmlChar *
419 			xmlParseExternalID	(xmlParserCtxtPtr ctxt,
420 						 xmlChar **publicID,
421 						 int strict);
422 XML_DEPRECATED
423 XMLPUBFUN void
424 			xmlParseComment		(xmlParserCtxtPtr ctxt);
425 XML_DEPRECATED
426 XMLPUBFUN const xmlChar *
427 			xmlParsePITarget	(xmlParserCtxtPtr ctxt);
428 XML_DEPRECATED
429 XMLPUBFUN void
430 			xmlParsePI		(xmlParserCtxtPtr ctxt);
431 XML_DEPRECATED
432 XMLPUBFUN void
433 			xmlParseNotationDecl	(xmlParserCtxtPtr ctxt);
434 XML_DEPRECATED
435 XMLPUBFUN void
436 			xmlParseEntityDecl	(xmlParserCtxtPtr ctxt);
437 XML_DEPRECATED
438 XMLPUBFUN int
439 			xmlParseDefaultDecl	(xmlParserCtxtPtr ctxt,
440 						 xmlChar **value);
441 XML_DEPRECATED
442 XMLPUBFUN xmlEnumerationPtr
443 			xmlParseNotationType	(xmlParserCtxtPtr ctxt);
444 XML_DEPRECATED
445 XMLPUBFUN xmlEnumerationPtr
446 			xmlParseEnumerationType	(xmlParserCtxtPtr ctxt);
447 XML_DEPRECATED
448 XMLPUBFUN int
449 			xmlParseEnumeratedType	(xmlParserCtxtPtr ctxt,
450 						 xmlEnumerationPtr *tree);
451 XML_DEPRECATED
452 XMLPUBFUN int
453 			xmlParseAttributeType	(xmlParserCtxtPtr ctxt,
454 						 xmlEnumerationPtr *tree);
455 XML_DEPRECATED
456 XMLPUBFUN void
457 			xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
458 XML_DEPRECATED
459 XMLPUBFUN xmlElementContentPtr
460 			xmlParseElementMixedContentDecl
461 						(xmlParserCtxtPtr ctxt,
462 						 int inputchk);
463 XML_DEPRECATED
464 XMLPUBFUN xmlElementContentPtr
465 			xmlParseElementChildrenContentDecl
466 						(xmlParserCtxtPtr ctxt,
467 						 int inputchk);
468 XML_DEPRECATED
469 XMLPUBFUN int
470 			xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
471 						 const xmlChar *name,
472 						 xmlElementContentPtr *result);
473 XML_DEPRECATED
474 XMLPUBFUN int
475 			xmlParseElementDecl	(xmlParserCtxtPtr ctxt);
476 XML_DEPRECATED
477 XMLPUBFUN void
478 			xmlParseMarkupDecl	(xmlParserCtxtPtr ctxt);
479 XML_DEPRECATED
480 XMLPUBFUN int
481 			xmlParseCharRef		(xmlParserCtxtPtr ctxt);
482 XML_DEPRECATED
483 XMLPUBFUN xmlEntityPtr
484 			xmlParseEntityRef	(xmlParserCtxtPtr ctxt);
485 XML_DEPRECATED
486 XMLPUBFUN void
487 			xmlParseReference	(xmlParserCtxtPtr ctxt);
488 XML_DEPRECATED
489 XMLPUBFUN void
490 			xmlParsePEReference	(xmlParserCtxtPtr ctxt);
491 XML_DEPRECATED
492 XMLPUBFUN void
493 			xmlParseDocTypeDecl	(xmlParserCtxtPtr ctxt);
494 #ifdef LIBXML_SAX1_ENABLED
495 XML_DEPRECATED
496 XMLPUBFUN const xmlChar *
497 			xmlParseAttribute	(xmlParserCtxtPtr ctxt,
498 						 xmlChar **value);
499 XML_DEPRECATED
500 XMLPUBFUN const xmlChar *
501 			xmlParseStartTag	(xmlParserCtxtPtr ctxt);
502 XML_DEPRECATED
503 XMLPUBFUN void
504 			xmlParseEndTag		(xmlParserCtxtPtr ctxt);
505 #endif /* LIBXML_SAX1_ENABLED */
506 XML_DEPRECATED
507 XMLPUBFUN void
508 			xmlParseCDSect		(xmlParserCtxtPtr ctxt);
509 XMLPUBFUN void
510 			xmlParseContent		(xmlParserCtxtPtr ctxt);
511 XML_DEPRECATED
512 XMLPUBFUN void
513 			xmlParseElement		(xmlParserCtxtPtr ctxt);
514 XML_DEPRECATED
515 XMLPUBFUN xmlChar *
516 			xmlParseVersionNum	(xmlParserCtxtPtr ctxt);
517 XML_DEPRECATED
518 XMLPUBFUN xmlChar *
519 			xmlParseVersionInfo	(xmlParserCtxtPtr ctxt);
520 XML_DEPRECATED
521 XMLPUBFUN xmlChar *
522 			xmlParseEncName		(xmlParserCtxtPtr ctxt);
523 XML_DEPRECATED
524 XMLPUBFUN const xmlChar *
525 			xmlParseEncodingDecl	(xmlParserCtxtPtr ctxt);
526 XML_DEPRECATED
527 XMLPUBFUN int
528 			xmlParseSDDecl		(xmlParserCtxtPtr ctxt);
529 XML_DEPRECATED
530 XMLPUBFUN void
531 			xmlParseXMLDecl		(xmlParserCtxtPtr ctxt);
532 XML_DEPRECATED
533 XMLPUBFUN void
534 			xmlParseTextDecl	(xmlParserCtxtPtr ctxt);
535 XML_DEPRECATED
536 XMLPUBFUN void
537 			xmlParseMisc		(xmlParserCtxtPtr ctxt);
538 XMLPUBFUN void
539 			xmlParseExternalSubset	(xmlParserCtxtPtr ctxt,
540 						 const xmlChar *ExternalID,
541 						 const xmlChar *SystemID);
542 /**
543  * XML_SUBSTITUTE_NONE:
544  *
545  * If no entities need to be substituted.
546  */
547 #define XML_SUBSTITUTE_NONE	0
548 /**
549  * XML_SUBSTITUTE_REF:
550  *
551  * Whether general entities need to be substituted.
552  */
553 #define XML_SUBSTITUTE_REF	1
554 /**
555  * XML_SUBSTITUTE_PEREF:
556  *
557  * Whether parameter entities need to be substituted.
558  */
559 #define XML_SUBSTITUTE_PEREF	2
560 /**
561  * XML_SUBSTITUTE_BOTH:
562  *
563  * Both general and parameter entities need to be substituted.
564  */
565 #define XML_SUBSTITUTE_BOTH	3
566 
567 XML_DEPRECATED
568 XMLPUBFUN xmlChar *
569 		xmlStringDecodeEntities		(xmlParserCtxtPtr ctxt,
570 						 const xmlChar *str,
571 						 int what,
572 						 xmlChar end,
573 						 xmlChar  end2,
574 						 xmlChar end3);
575 XML_DEPRECATED
576 XMLPUBFUN xmlChar *
577 		xmlStringLenDecodeEntities	(xmlParserCtxtPtr ctxt,
578 						 const xmlChar *str,
579 						 int len,
580 						 int what,
581 						 xmlChar end,
582 						 xmlChar  end2,
583 						 xmlChar end3);
584 
585 /*
586  * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
587  */
588 XML_DEPRECATED
589 XMLPUBFUN int			nodePush		(xmlParserCtxtPtr ctxt,
590 						 xmlNodePtr value);
591 XML_DEPRECATED
592 XMLPUBFUN xmlNodePtr		nodePop			(xmlParserCtxtPtr ctxt);
593 XMLPUBFUN int			inputPush		(xmlParserCtxtPtr ctxt,
594 						 xmlParserInputPtr value);
595 XMLPUBFUN xmlParserInputPtr	inputPop		(xmlParserCtxtPtr ctxt);
596 XML_DEPRECATED
597 XMLPUBFUN const xmlChar *	namePop			(xmlParserCtxtPtr ctxt);
598 XML_DEPRECATED
599 XMLPUBFUN int			namePush		(xmlParserCtxtPtr ctxt,
600 						 const xmlChar *value);
601 
602 /*
603  * other commodities shared between parser.c and parserInternals.
604  */
605 XML_DEPRECATED
606 XMLPUBFUN int			xmlSkipBlankChars	(xmlParserCtxtPtr ctxt);
607 XML_DEPRECATED
608 XMLPUBFUN int			xmlStringCurrentChar	(xmlParserCtxtPtr ctxt,
609 						 const xmlChar *cur,
610 						 int *len);
611 XML_DEPRECATED
612 XMLPUBFUN void			xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
613 XML_DEPRECATED
614 XMLPUBFUN int			xmlCheckLanguageID	(const xmlChar *lang);
615 
616 /*
617  * Really core function shared with HTML parser.
618  */
619 XML_DEPRECATED
620 XMLPUBFUN int			xmlCurrentChar		(xmlParserCtxtPtr ctxt,
621 						 int *len);
622 XMLPUBFUN int		xmlCopyCharMultiByte	(xmlChar *out,
623 						 int val);
624 XMLPUBFUN int			xmlCopyChar		(int len,
625 						 xmlChar *out,
626 						 int val);
627 XML_DEPRECATED
628 XMLPUBFUN void			xmlNextChar		(xmlParserCtxtPtr ctxt);
629 XML_DEPRECATED
630 XMLPUBFUN void			xmlParserInputShrink	(xmlParserInputPtr in);
631 
632 /*
633  * Specific function to keep track of entities references
634  * and used by the XSLT debugger.
635  */
636 #ifdef LIBXML_LEGACY_ENABLED
637 /**
638  * xmlEntityReferenceFunc:
639  * @ent: the entity
640  * @firstNode:  the fist node in the chunk
641  * @lastNode:  the last nod in the chunk
642  *
643  * Callback function used when one needs to be able to track back the
644  * provenance of a chunk of nodes inherited from an entity replacement.
645  */
646 typedef	void	(*xmlEntityReferenceFunc)	(xmlEntityPtr ent,
647 						 xmlNodePtr firstNode,
648 						 xmlNodePtr lastNode);
649 
650 XML_DEPRECATED
651 XMLPUBFUN void		xmlSetEntityReferenceFunc	(xmlEntityReferenceFunc func);
652 
653 XML_DEPRECATED
654 XMLPUBFUN xmlChar *
655 			xmlParseQuotedString	(xmlParserCtxtPtr ctxt);
656 XML_DEPRECATED
657 XMLPUBFUN void
658                         xmlParseNamespace       (xmlParserCtxtPtr ctxt);
659 XML_DEPRECATED
660 XMLPUBFUN xmlChar *
661 			xmlNamespaceParseNSDef	(xmlParserCtxtPtr ctxt);
662 XML_DEPRECATED
663 XMLPUBFUN xmlChar *
664 			xmlScanName		(xmlParserCtxtPtr ctxt);
665 XML_DEPRECATED
666 XMLPUBFUN xmlChar *
667 			xmlNamespaceParseNCName	(xmlParserCtxtPtr ctxt);
668 XML_DEPRECATED
669 XMLPUBFUN void	xmlParserHandleReference(xmlParserCtxtPtr ctxt);
670 XML_DEPRECATED
671 XMLPUBFUN xmlChar *
672 			xmlNamespaceParseQName	(xmlParserCtxtPtr ctxt,
673 						 xmlChar **prefix);
674 /**
675  * Entities
676  */
677 XML_DEPRECATED
678 XMLPUBFUN xmlChar *
679 		xmlDecodeEntities		(xmlParserCtxtPtr ctxt,
680 						 int len,
681 						 int what,
682 						 xmlChar end,
683 						 xmlChar  end2,
684 						 xmlChar end3);
685 XML_DEPRECATED
686 XMLPUBFUN void
687 			xmlHandleEntity		(xmlParserCtxtPtr ctxt,
688 						 xmlEntityPtr entity);
689 
690 #endif /* LIBXML_LEGACY_ENABLED */
691 
692 #ifdef __cplusplus
693 }
694 #endif
695 #endif /* __XML_PARSER_INTERNALS_H__ */
696