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