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