1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-15 23:24:06 +03:00
libxml2/include/libxml/parserInternals.h

664 lines
16 KiB
C
Raw Normal View History

2001-02-23 17:55:21 +00:00
/*
* Summary: internals routines and limits exported by the parser.
* Description: this module exports a number of internal parsing routines
* they are not really all intended for applications but
* can prove useful doing low level processing.
2001-02-23 17:55:21 +00:00
*
* Copy: See Copyright for the status of this software.
2001-02-23 17:55:21 +00:00
*
* Author: Daniel Veillard
2001-02-23 17:55:21 +00:00
*/
#ifndef __XML_PARSER_INTERNALS_H__
#define __XML_PARSER_INTERNALS_H__
2003-08-25 09:05:12 +00:00
#include <libxml/xmlversion.h>
2001-02-23 17:55:21 +00:00
#include <libxml/parser.h>
#include <libxml/HTMLparser.h>
#include <libxml/chvalid.h>
#include <libxml/SAX2.h>
2001-02-23 17:55:21 +00:00
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlParserMaxDepth:
*
* arbitrary depth limit for the XML documents that we allow to
* process. This is not a limitation of the parser but a safety
* boundary feature, use XML_PARSE_HUGE option to override it.
*/
XMLPUBVAR unsigned int xmlParserMaxDepth;
/**
* XML_MAX_TEXT_LENGTH:
*
* Maximum size allowed for a single text node when building a tree.
* This is not a limitation of the parser but a safety boundary feature,
* use XML_PARSE_HUGE option to override it.
* Introduced in 2.9.0
*/
#define XML_MAX_TEXT_LENGTH 10000000
/**
* XML_MAX_HUGE_LENGTH:
*
* Maximum size allowed when XML_PARSE_HUGE is set.
*/
#define XML_MAX_HUGE_LENGTH 1000000000
/**
* XML_MAX_NAME_LENGTH:
*
2019-09-30 17:04:54 +02:00
* Maximum size allowed for a markup identifier.
* This is not a limitation of the parser but a safety boundary feature,
* use XML_PARSE_HUGE option to override it.
* Note that with the use of parsing dictionaries overriding the limit
* may result in more runtime memory usage in face of "unfriendly' content
* Introduced in 2.9.0
*/
#define XML_MAX_NAME_LENGTH 50000
/**
* XML_MAX_DICTIONARY_LIMIT:
*
* Maximum size allowed by the parser for a dictionary by default
* This is not a limitation of the parser but a safety boundary feature,
* use XML_PARSE_HUGE option to override it.
* Introduced in 2.9.0
*/
#define XML_MAX_DICTIONARY_LIMIT 10000000
/**
* XML_MAX_LOOKUP_LIMIT:
*
* Maximum size allowed by the parser for ahead lookup
* This is an upper boundary enforced by the parser to avoid bad
* behaviour on "unfriendly' content
* Introduced in 2.9.0
*/
#define XML_MAX_LOOKUP_LIMIT 10000000
/**
* XML_MAX_NAMELEN:
*
* Identifiers can be longer, but this will be more costly
* at runtime.
*/
2001-02-23 17:55:21 +00:00
#define XML_MAX_NAMELEN 100
/**
* INPUT_CHUNK:
*
* The parser tries to always have that amount of input ready.
* One of the point is providing context when reporting errors.
2001-02-23 17:55:21 +00:00
*/
#define INPUT_CHUNK 250
/************************************************************************
* *
* UNICODE version of the macros. *
2001-02-23 17:55:21 +00:00
* *
************************************************************************/
/**
* IS_BYTE_CHAR:
* @c: an byte value (int)
*
* Macro to check the following production in the XML spec:
*
* [2] Char ::= #x9 | #xA | #xD | [#x20...]
* any byte character in the accepted range
*/
#define IS_BYTE_CHAR(c) xmlIsChar_ch(c)
/**
* IS_CHAR:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
2001-02-23 17:55:21 +00:00
* [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
* | [#x10000-#x10FFFF]
* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
*/
#define IS_CHAR(c) xmlIsCharQ(c)
2001-02-23 17:55:21 +00:00
/**
* IS_CHAR_CH:
* @c: an xmlChar (usually an unsigned char)
*
* Behaves like IS_CHAR on single-byte value
*/
#define IS_CHAR_CH(c) xmlIsChar_ch(c)
/**
* IS_BLANK:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
2001-02-23 17:55:21 +00:00
* [3] S ::= (#x20 | #x9 | #xD | #xA)+
*/
#define IS_BLANK(c) xmlIsBlankQ(c)
2001-02-23 17:55:21 +00:00
/**
* IS_BLANK_CH:
* @c: an xmlChar value (normally unsigned char)
*
* Behaviour same as IS_BLANK
*/
#define IS_BLANK_CH(c) xmlIsBlank_ch(c)
/**
* IS_BASECHAR:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
2001-02-23 17:55:21 +00:00
* [85] BaseChar ::= ... long list see REC ...
*/
#define IS_BASECHAR(c) xmlIsBaseCharQ(c)
2001-02-23 17:55:21 +00:00
/**
* IS_DIGIT:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
2001-02-23 17:55:21 +00:00
* [88] Digit ::= ... long list see REC ...
*/
#define IS_DIGIT(c) xmlIsDigitQ(c)
2001-02-23 17:55:21 +00:00
/**
* IS_DIGIT_CH:
* @c: an xmlChar value (usually an unsigned char)
*
* Behaves like IS_DIGIT but with a single byte argument
*/
#define IS_DIGIT_CH(c) xmlIsDigit_ch(c)
/**
* IS_COMBINING:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
2001-02-23 17:55:21 +00:00
* [87] CombiningChar ::= ... long list see REC ...
*/
#define IS_COMBINING(c) xmlIsCombiningQ(c)
2001-02-23 17:55:21 +00:00
/**
* IS_COMBINING_CH:
* @c: an xmlChar (usually an unsigned char)
*
* Always false (all combining chars > 0xff)
*/
#define IS_COMBINING_CH(c) 0
/**
* IS_EXTENDER:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
*
2001-02-23 17:55:21 +00:00
* [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 |
* #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] |
* [#x309D-#x309E] | [#x30FC-#x30FE]
*/
#define IS_EXTENDER(c) xmlIsExtenderQ(c)
2001-02-23 17:55:21 +00:00
/**
* IS_EXTENDER_CH:
* @c: an xmlChar value (usually an unsigned char)
*
* Behaves like IS_EXTENDER but with a single-byte argument
*/
#define IS_EXTENDER_CH(c) xmlIsExtender_ch(c)
/**
* IS_IDEOGRAPHIC:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
*
2001-02-23 17:55:21 +00:00
* [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
*/
#define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
2001-02-23 17:55:21 +00:00
/**
* IS_LETTER:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
*
* [84] Letter ::= BaseChar | Ideographic
2001-02-23 17:55:21 +00:00
*/
#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
/**
* IS_LETTER_CH:
* @c: an xmlChar value (normally unsigned char)
*
* Macro behaves like IS_LETTER, but only check base chars
*
*/
#define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
/**
2005-01-02 09:53:13 +00:00
* IS_ASCII_LETTER:
* @c: an xmlChar value
*
* Macro to check [a-zA-Z]
*
*/
#define IS_ASCII_LETTER(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
((0x61 <= (c)) && ((c) <= 0x7a)))
/**
2005-01-02 09:53:13 +00:00
* IS_ASCII_DIGIT:
* @c: an xmlChar value
*
* Macro to check [0-9]
*
*/
#define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39))
/**
* IS_PUBIDCHAR:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
*
2001-02-23 17:55:21 +00:00
* [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
*/
#define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c)
2001-02-23 17:55:21 +00:00
/**
* IS_PUBIDCHAR_CH:
* @c: an xmlChar value (normally unsigned char)
*
* Same as IS_PUBIDCHAR but for single-byte value
*/
#define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
/**
* Global variables used for predefined strings.
*/
2003-08-25 09:05:12 +00:00
XMLPUBVAR const xmlChar xmlStringText[];
XMLPUBVAR const xmlChar xmlStringTextNoenc[];
XMLPUBVAR const xmlChar xmlStringComment[];
2001-02-23 17:55:21 +00:00
/*
* Function to finish the work of the macros where needed.
2001-02-23 17:55:21 +00:00
*/
XMLPUBFUN int xmlIsLetter (int c);
2001-02-23 17:55:21 +00:00
/**
* Parser context.
2001-02-23 17:55:21 +00:00
*/
XMLPUBFUN xmlParserCtxtPtr
2003-08-25 09:05:12 +00:00
xmlCreateFileParserCtxt (const char *filename);
XMLPUBFUN xmlParserCtxtPtr
xmlCreateURLParserCtxt (const char *filename,
int options);
XMLPUBFUN xmlParserCtxtPtr
2003-08-25 10:34:41 +00:00
xmlCreateMemoryParserCtxt(const char *buffer,
2001-02-23 17:55:21 +00:00
int size);
XMLPUBFUN xmlParserCtxtPtr
2003-08-25 10:34:41 +00:00
xmlCreateEntityParserCtxt(const xmlChar *URL,
2001-02-23 17:55:21 +00:00
const xmlChar *ID,
const xmlChar *base);
XMLPUBFUN int
2003-08-25 10:34:41 +00:00
xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
xmlCharEncoding enc);
XMLPUBFUN int
2003-08-25 10:34:41 +00:00
xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
xmlCharEncodingHandlerPtr handler);
XML_DEPRECATED
XMLPUBFUN int
xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
xmlParserInputPtr input,
xmlCharEncodingHandlerPtr handler);
2001-02-23 17:55:21 +00:00
/**
* Input Streams.
2001-02-23 17:55:21 +00:00
*/
XMLPUBFUN xmlParserInputPtr
2003-08-25 10:34:41 +00:00
xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
const xmlChar *buffer);
XML_DEPRECATED
XMLPUBFUN xmlParserInputPtr
2003-08-25 10:34:41 +00:00
xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
xmlEntityPtr entity);
XMLPUBFUN int
2003-08-25 10:34:41 +00:00
xmlPushInput (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
xmlParserInputPtr input);
XMLPUBFUN xmlChar
2003-08-25 10:34:41 +00:00
xmlPopInput (xmlParserCtxtPtr ctxt);
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlFreeInputStream (xmlParserInputPtr input);
XMLPUBFUN xmlParserInputPtr
2003-08-25 10:34:41 +00:00
xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
const char *filename);
XMLPUBFUN xmlParserInputPtr
2003-08-25 10:34:41 +00:00
xmlNewInputStream (xmlParserCtxtPtr ctxt);
2001-02-23 17:55:21 +00:00
/**
* Namespaces.
*/
XMLPUBFUN xmlChar *
2003-08-25 10:34:41 +00:00
xmlSplitQName (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
const xmlChar *name,
xmlChar **prefix);
/**
* Generic production rules.
2001-02-23 17:55:21 +00:00
*/
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN const xmlChar *
2003-08-25 10:34:41 +00:00
xmlParseName (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN xmlChar *
2003-08-25 10:34:41 +00:00
xmlParseNmtoken (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN xmlChar *
2003-08-25 10:34:41 +00:00
xmlParseEntityValue (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
xmlChar **orig);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN xmlChar *
2003-08-25 10:34:41 +00:00
xmlParseAttValue (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN xmlChar *
2003-08-25 10:34:41 +00:00
xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN xmlChar *
2003-08-25 10:34:41 +00:00
xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParseCharData (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
int cdata);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN xmlChar *
2003-08-25 10:34:41 +00:00
xmlParseExternalID (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
xmlChar **publicID,
int strict);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParseComment (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN const xmlChar *
2003-08-25 10:34:41 +00:00
xmlParsePITarget (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParsePI (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN int
2003-08-25 10:34:41 +00:00
xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
xmlChar **value);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN xmlEnumerationPtr
2003-08-25 10:34:41 +00:00
xmlParseNotationType (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN xmlEnumerationPtr
2003-08-25 10:34:41 +00:00
xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN int
2003-08-25 10:34:41 +00:00
xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
xmlEnumerationPtr *tree);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN int
2003-08-25 10:34:41 +00:00
xmlParseAttributeType (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
xmlEnumerationPtr *tree);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN xmlElementContentPtr
2003-08-25 10:34:41 +00:00
xmlParseElementMixedContentDecl
(xmlParserCtxtPtr ctxt,
int inputchk);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN xmlElementContentPtr
2003-08-25 10:34:41 +00:00
xmlParseElementChildrenContentDecl
(xmlParserCtxtPtr ctxt,
int inputchk);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN int
2003-08-25 10:34:41 +00:00
xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
const xmlChar *name,
2001-02-23 17:55:21 +00:00
xmlElementContentPtr *result);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN int
2003-08-25 10:34:41 +00:00
xmlParseElementDecl (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN int
2003-08-25 10:34:41 +00:00
xmlParseCharRef (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN xmlEntityPtr
2003-08-25 10:34:41 +00:00
xmlParseEntityRef (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParseReference (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParsePEReference (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
2005-01-02 09:53:13 +00:00
#ifdef LIBXML_SAX1_ENABLED
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN const xmlChar *
2003-08-25 10:34:41 +00:00
xmlParseAttribute (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
xmlChar **value);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN const xmlChar *
2003-08-25 10:34:41 +00:00
xmlParseStartTag (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParseEndTag (xmlParserCtxtPtr ctxt);
2005-01-02 09:53:13 +00:00
#endif /* LIBXML_SAX1_ENABLED */
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParseCDSect (xmlParserCtxtPtr ctxt);
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParseContent (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParseElement (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN xmlChar *
2003-08-25 10:34:41 +00:00
xmlParseVersionNum (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN xmlChar *
2003-08-25 10:34:41 +00:00
xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN xmlChar *
2003-08-25 10:34:41 +00:00
xmlParseEncName (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN const xmlChar *
2003-08-25 10:34:41 +00:00
xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN int
2003-08-25 10:34:41 +00:00
xmlParseSDDecl (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParseTextDecl (xmlParserCtxtPtr ctxt);
2022-08-25 20:57:30 +02:00
XML_DEPRECATED
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParseMisc (xmlParserCtxtPtr ctxt);
XMLPUBFUN void
2003-08-25 10:34:41 +00:00
xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
const xmlChar *ExternalID,
const xmlChar *SystemID);
/**
* XML_SUBSTITUTE_NONE:
*
* If no entities need to be substituted.
2001-02-23 17:55:21 +00:00
*/
#define XML_SUBSTITUTE_NONE 0
/**
* XML_SUBSTITUTE_REF:
*
* Whether general entities need to be substituted.
*/
2001-02-23 17:55:21 +00:00
#define XML_SUBSTITUTE_REF 1
/**
* XML_SUBSTITUTE_PEREF:
*
* Whether parameter entities need to be substituted.
*/
2001-02-23 17:55:21 +00:00
#define XML_SUBSTITUTE_PEREF 2
/**
* XML_SUBSTITUTE_BOTH:
*
* Both general and parameter entities need to be substituted.
*/
#define XML_SUBSTITUTE_BOTH 3
2001-02-23 17:55:21 +00:00
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
const xmlChar *str,
int what,
xmlChar end,
xmlChar end2,
xmlChar end3);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
const xmlChar *str,
int len,
int what,
xmlChar end,
xmlChar end2,
xmlChar end3);
2001-02-23 17:55:21 +00:00
/*
* Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
2001-02-23 17:55:21 +00:00
*/
XML_DEPRECATED
XMLPUBFUN int nodePush (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
xmlNodePtr value);
XML_DEPRECATED
XMLPUBFUN xmlNodePtr nodePop (xmlParserCtxtPtr ctxt);
XMLPUBFUN int inputPush (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
xmlParserInputPtr value);
XMLPUBFUN xmlParserInputPtr inputPop (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN const xmlChar * namePop (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN int namePush (xmlParserCtxtPtr ctxt,
const xmlChar *value);
2001-02-23 17:55:21 +00:00
/*
* other commodities shared between parser.c and parserInternals.
2001-02-23 17:55:21 +00:00
*/
XML_DEPRECATED
XMLPUBFUN int xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN int xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
const xmlChar *cur,
int *len);
XML_DEPRECATED
XMLPUBFUN void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN int xmlCheckLanguageID (const xmlChar *lang);
2001-02-23 17:55:21 +00:00
/*
* Really core function shared with HTML parser.
2001-02-23 17:55:21 +00:00
*/
XML_DEPRECATED
XMLPUBFUN int xmlCurrentChar (xmlParserCtxtPtr ctxt,
2001-02-23 17:55:21 +00:00
int *len);
XMLPUBFUN int xmlCopyCharMultiByte (xmlChar *out,
int val);
XMLPUBFUN int xmlCopyChar (int len,
2001-02-23 17:55:21 +00:00
xmlChar *out,
int val);
XML_DEPRECATED
XMLPUBFUN void xmlNextChar (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void xmlParserInputShrink (xmlParserInputPtr in);
2001-02-23 17:55:21 +00:00
/*
* Specific function to keep track of entities references
* and used by the XSLT debugger.
*/
2005-01-02 09:53:13 +00:00
#ifdef LIBXML_LEGACY_ENABLED
/**
* xmlEntityReferenceFunc:
* @ent: the entity
* @firstNode: the fist node in the chunk
* @lastNode: the last nod in the chunk
*
* Callback function used when one needs to be able to track back the
* provenance of a chunk of nodes inherited from an entity replacement.
*/
typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
xmlNodePtr firstNode,
xmlNodePtr lastNode);
2022-02-20 19:56:41 +01:00
XML_DEPRECATED
XMLPUBFUN void xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
2022-02-20 19:56:41 +01:00
XML_DEPRECATED
XMLPUBFUN xmlChar *
2005-01-02 09:53:13 +00:00
xmlParseQuotedString (xmlParserCtxtPtr ctxt);
2022-02-20 19:56:41 +01:00
XML_DEPRECATED
XMLPUBFUN void
2005-01-02 09:53:13 +00:00
xmlParseNamespace (xmlParserCtxtPtr ctxt);
2022-02-20 19:56:41 +01:00
XML_DEPRECATED
XMLPUBFUN xmlChar *
2005-01-02 09:53:13 +00:00
xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
2022-02-20 19:56:41 +01:00
XML_DEPRECATED
XMLPUBFUN xmlChar *
2005-01-02 09:53:13 +00:00
xmlScanName (xmlParserCtxtPtr ctxt);
2022-02-20 19:56:41 +01:00
XML_DEPRECATED
XMLPUBFUN xmlChar *
2005-01-02 09:53:13 +00:00
xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
2022-02-20 19:56:41 +01:00
XML_DEPRECATED
XMLPUBFUN void xmlParserHandleReference(xmlParserCtxtPtr ctxt);
2022-02-20 19:56:41 +01:00
XML_DEPRECATED
XMLPUBFUN xmlChar *
2005-01-02 09:53:13 +00:00
xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
xmlChar **prefix);
/**
* Entities
*/
2022-02-20 19:56:41 +01:00
XML_DEPRECATED
XMLPUBFUN xmlChar *
2005-01-02 09:53:13 +00:00
xmlDecodeEntities (xmlParserCtxtPtr ctxt,
int len,
int what,
xmlChar end,
xmlChar end2,
xmlChar end3);
2022-02-20 19:56:41 +01:00
XML_DEPRECATED
XMLPUBFUN void
2005-01-02 09:53:13 +00:00
xmlHandleEntity (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity);
#endif /* LIBXML_LEGACY_ENABLED */
2001-02-23 17:55:21 +00:00
#ifdef __cplusplus
}
#endif
#endif /* __XML_PARSER_INTERNALS_H__ */