12 #ifndef __XML_PARSER_INTERNALS_H__
13 #define __XML_PARSER_INTERNALS_H__
15 #include <libxml/xmlversion.h>
16 #include <libxml/parser.h>
17 #include <libxml/HTMLparser.h>
18 #include <libxml/chvalid.h>
31 XMLPUBVAR
unsigned int xmlParserMaxDepth;
40 #define XML_MAX_TEXT_LENGTH 10000000
48 #define XML_MAX_NAMELEN 100
56 #define INPUT_CHUNK 250
72 #define IS_BYTE_CHAR(c) xmlIsChar_ch(c)
84 #define IS_CHAR(c) xmlIsCharQ(c)
92 #define IS_CHAR_CH(c) xmlIsChar_ch(c)
102 #define IS_BLANK(c) xmlIsBlankQ(c)
110 #define IS_BLANK_CH(c) xmlIsBlank_ch(c)
120 #define IS_BASECHAR(c) xmlIsBaseCharQ(c)
130 #define IS_DIGIT(c) xmlIsDigitQ(c)
138 #define IS_DIGIT_CH(c) xmlIsDigit_ch(c)
148 #define IS_COMBINING(c) xmlIsCombiningQ(c)
156 #define IS_COMBINING_CH(c) 0
169 #define IS_EXTENDER(c) xmlIsExtenderQ(c)
177 #define IS_EXTENDER_CH(c) xmlIsExtender_ch(c)
188 #define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
199 #define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
208 #define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
217 #define IS_ASCII_LETTER(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
218 ((0x61 <= (c)) && ((c) <= 0x7a)))
227 #define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39))
238 #define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c)
246 #define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
254 #define SKIP_EOL(p) \
255 if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; } \
256 if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; }
264 #define MOVETO_ENDTAG(p) \
265 while ((*p) && (*(p) != '>')) (p)++
273 #define MOVETO_STARTTAG(p) \
274 while ((*p) && (*(p) != '<')) (p)++
279 XMLPUBVAR
const xmlChar xmlStringText[];
280 XMLPUBVAR
const xmlChar xmlStringTextNoenc[];
281 XMLPUBVAR
const xmlChar xmlStringComment[];
286 XMLPUBFUN
int XMLCALL xmlIsLetter (
int c);
292 xmlCreateFileParserCtxt (
const char *filename);
294 xmlCreateURLParserCtxt (
const char *filename,
297 xmlCreateMemoryParserCtxt(
const char *buffer,
300 xmlCreateEntityParserCtxt(
const xmlChar *URL,
302 const xmlChar *base);
303 XMLPUBFUN
int XMLCALL
305 xmlCharEncoding enc);
306 XMLPUBFUN
int XMLCALL
308 xmlCharEncodingHandlerPtr handler);
309 XMLPUBFUN
int XMLCALL
311 xmlParserInputPtr input,
312 xmlCharEncodingHandlerPtr handler);
316 XMLPUBFUN
void XMLCALL
318 xmlParserErrors xmlerr,
320 const xmlChar * str1,
321 const xmlChar * str2);
327 XMLPUBFUN xmlParserInputPtr XMLCALL
329 const xmlChar *buffer);
330 XMLPUBFUN xmlParserInputPtr XMLCALL
332 xmlEntityPtr entity);
333 XMLPUBFUN
int XMLCALL
335 xmlParserInputPtr input);
336 XMLPUBFUN xmlChar XMLCALL
338 XMLPUBFUN
void XMLCALL
339 xmlFreeInputStream (xmlParserInputPtr input);
340 XMLPUBFUN xmlParserInputPtr XMLCALL
342 const char *filename);
343 XMLPUBFUN xmlParserInputPtr XMLCALL
349 XMLPUBFUN xmlChar * XMLCALL
357 XMLPUBFUN
const xmlChar * XMLCALL
359 XMLPUBFUN xmlChar * XMLCALL
361 XMLPUBFUN xmlChar * XMLCALL
364 XMLPUBFUN xmlChar * XMLCALL
366 XMLPUBFUN xmlChar * XMLCALL
368 XMLPUBFUN xmlChar * XMLCALL
370 XMLPUBFUN
void XMLCALL
373 XMLPUBFUN xmlChar * XMLCALL
377 XMLPUBFUN
void XMLCALL
379 XMLPUBFUN
const xmlChar * XMLCALL
381 XMLPUBFUN
void XMLCALL
383 XMLPUBFUN
void XMLCALL
385 XMLPUBFUN
void XMLCALL
387 XMLPUBFUN
int XMLCALL
390 XMLPUBFUN xmlEnumerationPtr XMLCALL
392 XMLPUBFUN xmlEnumerationPtr XMLCALL
394 XMLPUBFUN
int XMLCALL
396 xmlEnumerationPtr *tree);
397 XMLPUBFUN
int XMLCALL
399 xmlEnumerationPtr *tree);
400 XMLPUBFUN
void XMLCALL
402 XMLPUBFUN xmlElementContentPtr XMLCALL
403 xmlParseElementMixedContentDecl
406 XMLPUBFUN xmlElementContentPtr XMLCALL
407 xmlParseElementChildrenContentDecl
410 XMLPUBFUN
int XMLCALL
413 xmlElementContentPtr *result);
414 XMLPUBFUN
int XMLCALL
416 XMLPUBFUN
void XMLCALL
418 XMLPUBFUN
int XMLCALL
420 XMLPUBFUN xmlEntityPtr XMLCALL
422 XMLPUBFUN
void XMLCALL
424 XMLPUBFUN
void XMLCALL
426 XMLPUBFUN
void XMLCALL
428 #ifdef LIBXML_SAX1_ENABLED
429 XMLPUBFUN
const xmlChar * XMLCALL
432 XMLPUBFUN
const xmlChar * XMLCALL
434 XMLPUBFUN
void XMLCALL
437 XMLPUBFUN
void XMLCALL
439 XMLPUBFUN
void XMLCALL
441 XMLPUBFUN
void XMLCALL
443 XMLPUBFUN xmlChar * XMLCALL
445 XMLPUBFUN xmlChar * XMLCALL
447 XMLPUBFUN xmlChar * XMLCALL
449 XMLPUBFUN
const xmlChar * XMLCALL
451 XMLPUBFUN
int XMLCALL
453 XMLPUBFUN
void XMLCALL
455 XMLPUBFUN
void XMLCALL
457 XMLPUBFUN
void XMLCALL
459 XMLPUBFUN
void XMLCALL
461 const xmlChar *ExternalID,
462 const xmlChar *SystemID);
468 #define XML_SUBSTITUTE_NONE 0
474 #define XML_SUBSTITUTE_REF 1
480 #define XML_SUBSTITUTE_PEREF 2
486 #define XML_SUBSTITUTE_BOTH 3
488 XMLPUBFUN xmlChar * XMLCALL
495 XMLPUBFUN xmlChar * XMLCALL
511 xmlParserInputPtr value);
515 const xmlChar *value);
525 XMLPUBFUN
int XMLCALL xmlCheckLanguageID (
const xmlChar *lang);
532 XMLPUBFUN
int XMLCALL xmlCopyCharMultiByte (xmlChar *out,
534 XMLPUBFUN
int XMLCALL xmlCopyChar (
int len,
538 XMLPUBFUN
void XMLCALL xmlParserInputShrink (xmlParserInputPtr in);
540 #ifdef LIBXML_HTML_ENABLED
544 XMLPUBFUN
void XMLCALL htmlInitAutoClose (
void);
545 XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreateFileParserCtxt(
const char *filename,
546 const char *encoding);
553 #ifdef LIBXML_LEGACY_ENABLED
563 typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
564 xmlNodePtr firstNode,
565 xmlNodePtr lastNode);
567 XMLPUBFUN
void XMLCALL xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
569 XMLPUBFUN xmlChar * XMLCALL
571 XMLPUBFUN
void XMLCALL
573 XMLPUBFUN xmlChar * XMLCALL
575 XMLPUBFUN xmlChar * XMLCALL
577 XMLPUBFUN xmlChar * XMLCALL
580 XMLPUBFUN xmlChar * XMLCALL
586 XMLPUBFUN xmlChar * XMLCALL
593 XMLPUBFUN
void XMLCALL
595 xmlEntityPtr entity);
603 XMLPUBFUN
void XMLCALL