VirtualBox

source: vbox/trunk/src/libs/libxml2-2.13.2/include/private/parser.h@ 109193

Last change on this file since 109193 was 105420, checked in by vboxsync, 10 months ago

libxml2-2.12.6: Applied and adjusted our libxml2 changes to 2.12.6. bugref:10730

File size: 4.2 KB
Line 
1#ifndef XML_PARSER_H_PRIVATE__
2#define XML_PARSER_H_PRIVATE__
3
4#include <libxml/parser.h>
5#include <libxml/xmlversion.h>
6
7/**
8 * XML_VCTXT_DTD_VALIDATED:
9 *
10 * Set after xmlValidateDtdFinal was called.
11 */
12#define XML_VCTXT_DTD_VALIDATED (1u << 0)
13/**
14 * XML_VCTXT_USE_PCTXT:
15 *
16 * Set if the validation context is part of a parser context.
17 */
18#define XML_VCTXT_USE_PCTXT (1u << 1)
19
20#define XML_INPUT_HAS_ENCODING (1u << 0)
21#define XML_INPUT_AUTO_ENCODING (7u << 1)
22#define XML_INPUT_AUTO_UTF8 (1u << 1)
23#define XML_INPUT_AUTO_UTF16LE (2u << 1)
24#define XML_INPUT_AUTO_UTF16BE (3u << 1)
25#define XML_INPUT_AUTO_OTHER (4u << 1)
26#define XML_INPUT_USES_ENC_DECL (1u << 4)
27#define XML_INPUT_ENCODING_ERROR (1u << 5)
28#define XML_INPUT_PROGRESSIVE (1u << 6)
29
30#define PARSER_STOPPED(ctxt) ((ctxt)->disableSAX > 1)
31
32#define PARSER_PROGRESSIVE(ctxt) \
33 ((ctxt)->input->flags & XML_INPUT_PROGRESSIVE)
34
35#define PARSER_IN_PE(ctxt) \
36 (((ctxt)->input->entity != NULL) && \
37 (((ctxt)->input->entity->etype == XML_INTERNAL_PARAMETER_ENTITY) || \
38 ((ctxt)->input->entity->etype == XML_EXTERNAL_PARAMETER_ENTITY)))
39
40#define PARSER_EXTERNAL(ctxt) \
41 (((ctxt)->inSubset == 2) || \
42 (((ctxt)->input->entity != NULL) && \
43 ((ctxt)->input->entity->etype == XML_EXTERNAL_PARAMETER_ENTITY)))
44
45XML_HIDDEN void
46xmlCtxtVErr(xmlParserCtxtPtr ctxt, xmlNodePtr node, xmlErrorDomain domain,
47 xmlParserErrors code, xmlErrorLevel level,
48 const xmlChar *str1, const xmlChar *str2, const xmlChar *str3,
49 int int1, const char *msg, va_list ap);
50XML_HIDDEN void
51xmlCtxtErr(xmlParserCtxtPtr ctxt, xmlNodePtr node, xmlErrorDomain domain,
52 xmlParserErrors code, xmlErrorLevel level,
53 const xmlChar *str1, const xmlChar *str2, const xmlChar *str3,
54 int int1, const char *msg, ...);
55XML_HIDDEN void
56xmlFatalErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *info);
57XML_HIDDEN void LIBXML_ATTR_FORMAT(3,0)
58xmlWarningMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
59 const char *msg, const xmlChar *str1, const xmlChar *str2);
60XML_HIDDEN void
61xmlCtxtErrIO(xmlParserCtxtPtr ctxt, int code, const char *uri);
62
63XML_HIDDEN void
64xmlHaltParser(xmlParserCtxtPtr ctxt);
65XML_HIDDEN int
66xmlParserGrow(xmlParserCtxtPtr ctxt);
67XML_HIDDEN void
68xmlParserShrink(xmlParserCtxtPtr ctxt);
69
70XML_HIDDEN void
71xmlDetectEncoding(xmlParserCtxtPtr ctxt);
72XML_HIDDEN void
73xmlSetDeclaredEncoding(xmlParserCtxtPtr ctxt, xmlChar *encoding);
74XML_HIDDEN const xmlChar *
75xmlGetActualEncoding(xmlParserCtxtPtr ctxt);
76
77XML_HIDDEN xmlParserNsData *
78xmlParserNsCreate(void);
79XML_HIDDEN void
80xmlParserNsFree(xmlParserNsData *nsdb);
81/*
82 * These functions allow SAX handlers to attach extra data to namespaces
83 * efficiently and should be made public.
84 */
85XML_HIDDEN int
86xmlParserNsUpdateSax(xmlParserCtxtPtr ctxt, const xmlChar *prefix,
87 void *saxData);
88XML_HIDDEN void *
89xmlParserNsLookupSax(xmlParserCtxtPtr ctxt, const xmlChar *prefix);
90
91#define XML_INPUT_BUF_STATIC (1u << 1)
92#define XML_INPUT_BUF_ZERO_TERMINATED (1u << 2)
93
94XML_HIDDEN xmlParserInputPtr
95xmlNewInputURL(xmlParserCtxtPtr ctxt, const char *url, const char *publicId,
96 const char *encoding, int flags);
97XML_HIDDEN xmlParserInputPtr
98xmlNewInputMemory(xmlParserCtxtPtr ctxt, const char *url,
99 const void *mem, size_t size,
100 const char *encoding, int flags);
101XML_HIDDEN xmlParserInputPtr
102xmlNewInputString(xmlParserCtxtPtr ctxt, const char *url, const char *str,
103 const char *encoding, int flags);
104XML_HIDDEN xmlParserInputPtr
105xmlNewInputFd(xmlParserCtxtPtr ctxt, const char *filename, int fd,
106 const char *encoding, int flags);
107XML_HIDDEN xmlParserInputPtr
108xmlNewInputIO(xmlParserCtxtPtr ctxt, const char *url,
109 xmlInputReadCallback ioRead,
110 xmlInputCloseCallback ioClose,
111 void *ioCtxt,
112 const char *encoding, int flags);
113XML_HIDDEN xmlParserInputPtr
114xmlNewInputPush(xmlParserCtxtPtr ctxt, const char *url,
115 const char *chunk, int size, const char *encoding);
116
117XML_HIDDEN xmlChar *
118xmlExpandEntitiesInAttValue(xmlParserCtxtPtr ctxt, const xmlChar *str,
119 int normalize);
120
121#endif /* XML_PARSER_H_PRIVATE__ */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette