1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/libxml2/libxml2_parserinternals.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,622 @@
1.4 +/*
1.5 + * Summary: internals routines exported by the parser.
1.6 + * Description: this module exports a number of internal parsing routines
1.7 + * they are not really all intended for applications but
1.8 + * can prove useful doing low level processing.
1.9 + *
1.10 + * Copy: See Copyright for the status of this software.
1.11 + *
1.12 + * Author: Daniel Veillard
1.13 + * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
1.14 + */
1.15 +
1.16 +/** @file
1.17 +@publishedAll
1.18 +@released
1.19 +*/
1.20 +
1.21 +#ifndef XML_PARSER_INTERNALS_H
1.22 +#define XML_PARSER_INTERNALS_H
1.23 +
1.24 +#include <stdapis/libxml2/libxml2_parser.h>
1.25 +#include <stdapis/libxml2/libxml2_chvalid.h>
1.26 +
1.27 +
1.28 +#ifdef __cplusplus
1.29 +extern "C" {
1.30 +#endif
1.31 +
1.32 +#define SAX_COMPAT_MODE BAD_CAST "SAX compatibility mode document"
1.33 +
1.34 +
1.35 +
1.36 + /**
1.37 + * XML_MAX_NAMELEN:
1.38 + *
1.39 + * Identifiers can be longer, but this will be more costly
1.40 + * at runtime.
1.41 + */
1.42 +#define XML_MAX_NAMELEN 100
1.43 +
1.44 +/**
1.45 + * INPUT_CHUNK:
1.46 + *
1.47 + * The parser tries to always have that amount of input ready.
1.48 + * One of the point is providing context when reporting errors.
1.49 + */
1.50 +#define INPUT_CHUNK 250
1.51 +
1.52 +/**
1.53 + * MIN_STACK_THRESHOLD:
1.54 + *
1.55 + * The safty buffer that defines number of bytes from stack overflow.
1.56 + */
1.57 +#define MIN_STACK_THRESHOLD 600
1.58 +
1.59 +/**
1.60 + * MAX_STACK_THRESHOLD:
1.61 + *
1.62 + * The safty buffer that defines number of bytes from stack overflow.
1.63 + * This value is used for SAX parsing - buffer is bigger to account
1.64 + * for stack that might be allocated during user callbacks
1.65 + */
1.66 +#define MAX_STACK_THRESHOLD 1000
1.67 +
1.68 +/************************************************************************
1.69 + * *
1.70 + * UNICODE version of the macros. *
1.71 + * *
1.72 + ************************************************************************/
1.73 +/**
1.74 + * IS_BYTE_CHAR:
1.75 + * @param c an byte value (int)
1.76 + *
1.77 + * Macro to check the following production in the XML spec:
1.78 + *
1.79 + * [2] Char ::= #x9 | #xA | #xD | [#x20...]
1.80 + * any byte character in the accepted range
1.81 + */
1.82 +#define IS_BYTE_CHAR(c) xmlIsChar_ch(c)
1.83 +
1.84 +/**
1.85 + * IS_CHAR:
1.86 + * @param c an UNICODE value (int)
1.87 + *
1.88 + * Macro to check the following production in the XML spec:
1.89 + *
1.90 + * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
1.91 + * | [#x10000-#x10FFFF]
1.92 + * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
1.93 + */
1.94 +#define IS_CHAR(c) xmlIsCharQ(c)
1.95 +
1.96 +/**
1.97 + * IS_CHAR_CH:
1.98 + * @param c an xmlChar (usually an unsigned char)
1.99 + *
1.100 + * Behaves like IS_CHAR on single-byte value
1.101 + */
1.102 +#define IS_CHAR_CH(c) xmlIsChar_ch(c)
1.103 +
1.104 +/**
1.105 + * IS_BLANK:
1.106 + * @param c an UNICODE value (int)
1.107 + *
1.108 + * Macro to check the following production in the XML spec:
1.109 + *
1.110 + * [3] S ::= (#x20 | #x9 | #xD | #xA)+
1.111 + */
1.112 +#define IS_BLANK(c) xmlIsBlankQ(c)
1.113 +
1.114 +/**
1.115 + * IS_BLANK_CH:
1.116 + * @param c an xmlChar value (normally unsigned char)
1.117 + *
1.118 + * Behaviour same as IS_BLANK
1.119 + *
1.120 + * OOM: never
1.121 + */
1.122 +#define IS_BLANK_CH(c) xmlIsBlank_ch(c)
1.123 +
1.124 +/**
1.125 + * IS_BASECHAR:
1.126 + * @param c an UNICODE value (int)
1.127 + *
1.128 + * Macro to check the following production in the XML spec:
1.129 + *
1.130 + * [85] BaseChar ::= ... long list see REC ...
1.131 + */
1.132 +#define IS_BASECHAR(c) xmlIsBaseCharQ(c)
1.133 +
1.134 +/**
1.135 + * IS_DIGIT:
1.136 + * @param c an UNICODE value (int)
1.137 + *
1.138 + * Macro to check the following production in the XML spec:
1.139 + *
1.140 + * [88] Digit ::= ... long list see REC ...
1.141 + */
1.142 +#define IS_DIGIT(c) xmlIsDigitQ(c)
1.143 +
1.144 +/**
1.145 + * IS_DIGIT_CH:
1.146 + * @param c an xmlChar value (usually an unsigned char)
1.147 + *
1.148 + * Behaves like IS_DIGIT but with a single byte argument
1.149 + */
1.150 +#define IS_DIGIT_CH(c) xmlIsDigit_ch(c)
1.151 +
1.152 +/**
1.153 + * IS_COMBINING:
1.154 + * @param c an UNICODE value (int)
1.155 + *
1.156 + * Macro to check the following production in the XML spec:
1.157 + *
1.158 + * [87] CombiningChar ::= ... long list see REC ...
1.159 + */
1.160 +#define IS_COMBINING(c) xmlIsCombiningQ(c)
1.161 +
1.162 +/**
1.163 + * IS_COMBINING_CH:
1.164 + * @param c an xmlChar (usually an unsigned char)
1.165 + *
1.166 + * Always false (all combining chars > 0xff)
1.167 + */
1.168 +#define IS_COMBINING_CH(c) 0
1.169 +
1.170 +/**
1.171 + * IS_EXTENDER:
1.172 + * @param c an UNICODE value (int)
1.173 + *
1.174 + * Macro to check the following production in the XML spec:
1.175 + *
1.176 + *
1.177 + * [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 |
1.178 + * #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] |
1.179 + * [#x309D-#x309E] | [#x30FC-#x30FE]
1.180 + */
1.181 +#define IS_EXTENDER(c) xmlIsExtenderQ(c)
1.182 +
1.183 +/**
1.184 + * IS_EXTENDER_CH:
1.185 + * @param c an xmlChar value (usually an unsigned char)
1.186 + *
1.187 + * Behaves like IS_EXTENDER but with a single-byte argument
1.188 + */
1.189 +#define IS_EXTENDER_CH(c) xmlIsExtender_ch(c)
1.190 +
1.191 +/**
1.192 + * IS_IDEOGRAPHIC:
1.193 + * @param c an UNICODE value (int)
1.194 + *
1.195 + * Macro to check the following production in the XML spec:
1.196 + *
1.197 + *
1.198 + * [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
1.199 + */
1.200 +#define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
1.201 +
1.202 +/**
1.203 + * IS_LETTER:
1.204 + * @param c an UNICODE value (int)
1.205 + *
1.206 + * Macro to check the following production in the XML spec:
1.207 + *
1.208 + *
1.209 + * [84] Letter ::= BaseChar | Ideographic
1.210 + */
1.211 +#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
1.212 +
1.213 +/**
1.214 + * IS_LETTER_CH:
1.215 + * @param c an xmlChar value (normally unsigned char)
1.216 + *
1.217 + * Macro behaves like IS_LETTER, but only check base chars
1.218 + *
1.219 + */
1.220 +#define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
1.221 +/**
1.222 + * IS_PUBIDCHAR:
1.223 + * @param c an UNICODE value (int)
1.224 + *
1.225 + * Macro to check the following production in the XML spec:
1.226 + *
1.227 + *
1.228 + * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
1.229 + */
1.230 +#define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c)
1.231 +
1.232 +/**
1.233 + * IS_PUBIDCHAR_CH:
1.234 + * @param c an xmlChar value (normally unsigned char)
1.235 + *
1.236 + * Same as IS_PUBIDCHAR but for single-byte value
1.237 + */
1.238 +#define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
1.239 +
1.240 +/**
1.241 + * SKIP_EOL:
1.242 + * @param p and UTF8 string pointer
1.243 + *
1.244 + * Skips the end of line chars.
1.245 + */
1.246 +#define SKIP_EOL(p) \
1.247 + if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; } \
1.248 + if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; }
1.249 +
1.250 +/**
1.251 + * MOVETO_ENDTAG:
1.252 + * @param p and UTF8 string pointer
1.253 + *
1.254 + * Skips to the next '>' char.
1.255 + */
1.256 +#define MOVETO_ENDTAG(p) \
1.257 + while ((*p) && (*(p) != '>')) (p)++
1.258 +
1.259 +/**
1.260 + * MOVETO_STARTTAG:
1.261 + * @param p and UTF8 string pointer
1.262 + *
1.263 + * Skips to the next '<' char.
1.264 + */
1.265 +#define MOVETO_STARTTAG(p) \
1.266 + while ((*p) && (*(p) != '<')) (p)++
1.267 +
1.268 +/**
1.269 + * Global constants used for predefined strings.
1.270 + */
1.271 +#ifndef UNDEF_IMPORT_C_IN_DATA_ParserInternal
1.272 +XMLPUBVAR const xmlChar xmlStringText[];
1.273 +XMLPUBVAR const xmlChar xmlStringTextNoenc[];
1.274 +XMLPUBVAR const xmlChar xmlStringComment[];
1.275 +#endif
1.276 +/*
1.277 + * Function to finish the work of the macros where needed.
1.278 + */
1.279 +XMLPUBFUN int XMLCALL xmlIsLetter (int c);
1.280 +
1.281 +/**
1.282 + * Parser context.
1.283 + */
1.284 +XMLPUBFUN xmlParserCtxtPtr XMLCALL
1.285 + xmlCreateFileParserCtxt (const char *filename);
1.286 +XMLPUBFUN xmlParserCtxtPtr XMLCALL
1.287 + xmlCreateURLParserCtxt (const char *filename,
1.288 + int options);
1.289 +XMLPUBFUN xmlParserCtxtPtr XMLCALL
1.290 + xmlCreateMemoryParserCtxt(const char *buffer,
1.291 + int size);
1.292 +XMLPUBFUN xmlParserCtxtPtr XMLCALL
1.293 + xmlCreateEntityParserCtxt(const xmlChar *URL,
1.294 + const xmlChar *ID,
1.295 + const xmlChar *base);
1.296 +XMLPUBFUN int XMLCALL
1.297 + xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
1.298 + xmlCharEncoding enc);
1.299 +XMLPUBFUN int XMLCALL
1.300 + xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
1.301 + xmlCharEncodingHandlerPtr handler);
1.302 +XMLPUBFUN int XMLCALL
1.303 + xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
1.304 + xmlParserInputPtr input,
1.305 + xmlCharEncodingHandlerPtr handler);
1.306 +
1.307 +/**
1.308 + * Entities
1.309 + */
1.310 +XMLPUBFUN void XMLCALL
1.311 + xmlHandleEntity (xmlParserCtxtPtr ctxt,
1.312 + xmlEntityPtr entity);
1.313 +
1.314 +/**
1.315 + * Input Streams.
1.316 + */
1.317 +XMLPUBFUN xmlParserInputPtr XMLCALL
1.318 + xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
1.319 + const xmlChar *buffer);
1.320 +XMLPUBFUN xmlParserInputPtr XMLCALL
1.321 + xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
1.322 + xmlEntityPtr entity);
1.323 +XMLPUBFUN void XMLCALL
1.324 + xmlPushInput (xmlParserCtxtPtr ctxt,
1.325 + xmlParserInputPtr input);
1.326 +XMLPUBFUN xmlChar XMLCALL
1.327 + xmlPopInput (xmlParserCtxtPtr ctxt);
1.328 +XMLPUBFUN void XMLCALL
1.329 + xmlFreeInputStream (xmlParserInputPtr input);
1.330 +XMLPUBFUN xmlParserInputPtr XMLCALL
1.331 + xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
1.332 + const char *filename);
1.333 +XMLPUBFUN xmlParserInputPtr XMLCALL
1.334 + xmlNewInputStream (xmlParserCtxtPtr ctxt);
1.335 +
1.336 +/**
1.337 + * Namespaces.
1.338 + */
1.339 +XMLPUBFUN xmlChar * XMLCALL
1.340 + xmlSplitQName (xmlParserCtxtPtr ctxt,
1.341 + const xmlChar *name,
1.342 + xmlChar **prefix);
1.343 +XMLPUBFUN xmlChar * XMLCALL
1.344 + xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
1.345 +XMLPUBFUN xmlChar * XMLCALL
1.346 + xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
1.347 + xmlChar **prefix);
1.348 +XMLPUBFUN xmlChar * XMLCALL
1.349 + xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
1.350 +XMLPUBFUN xmlChar * XMLCALL
1.351 + xmlParseQuotedString (xmlParserCtxtPtr ctxt);
1.352 +XMLPUBFUN void XMLCALL
1.353 + xmlParseNamespace (xmlParserCtxtPtr ctxt);
1.354 +
1.355 +/**
1.356 + * Generic production rules.
1.357 + */
1.358 +XMLPUBFUN xmlChar * XMLCALL
1.359 + xmlScanName (xmlParserCtxtPtr ctxt);
1.360 +XMLPUBFUN const xmlChar * XMLCALL
1.361 + xmlParseName (xmlParserCtxtPtr ctxt);
1.362 +XMLPUBFUN xmlChar * XMLCALL
1.363 + xmlParseNmtoken (xmlParserCtxtPtr ctxt);
1.364 +XMLPUBFUN xmlChar * XMLCALL
1.365 + xmlParseEntityValue (xmlParserCtxtPtr ctxt,
1.366 + xmlChar **orig);
1.367 +XMLPUBFUN xmlChar * XMLCALL
1.368 + xmlParseAttValue (xmlParserCtxtPtr ctxt);
1.369 +XMLPUBFUN xmlChar * XMLCALL
1.370 + xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
1.371 +XMLPUBFUN xmlChar * XMLCALL
1.372 + xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
1.373 +XMLPUBFUN void XMLCALL
1.374 + xmlParseCharData (xmlParserCtxtPtr ctxt,
1.375 + int cdata);
1.376 +XMLPUBFUN xmlChar * XMLCALL
1.377 + xmlParseExternalID (xmlParserCtxtPtr ctxt,
1.378 + xmlChar **publicID,
1.379 + int strict);
1.380 +XMLPUBFUN void XMLCALL
1.381 + xmlParseComment (xmlParserCtxtPtr ctxt);
1.382 +XMLPUBFUN const xmlChar * XMLCALL
1.383 + xmlParsePITarget (xmlParserCtxtPtr ctxt);
1.384 +XMLPUBFUN void XMLCALL
1.385 + xmlParsePI (xmlParserCtxtPtr ctxt);
1.386 +XMLPUBFUN void XMLCALL
1.387 + xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
1.388 +XMLPUBFUN void XMLCALL
1.389 + xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
1.390 +XMLPUBFUN int XMLCALL
1.391 + xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
1.392 + xmlChar **value);
1.393 +XMLPUBFUN xmlEnumerationPtr XMLCALL
1.394 + xmlParseNotationType (xmlParserCtxtPtr ctxt);
1.395 +XMLPUBFUN xmlEnumerationPtr XMLCALL
1.396 + xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
1.397 +XMLPUBFUN int XMLCALL
1.398 + xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
1.399 + xmlEnumerationPtr *tree);
1.400 +XMLPUBFUN int XMLCALL
1.401 + xmlParseAttributeType (xmlParserCtxtPtr ctxt,
1.402 + xmlEnumerationPtr *tree);
1.403 +XMLPUBFUN void XMLCALL
1.404 + xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
1.405 +XMLPUBFUN xmlElementContentPtr XMLCALL
1.406 + xmlParseElementMixedContentDecl
1.407 + (xmlParserCtxtPtr ctxt,
1.408 + int inputchk);
1.409 +XMLPUBFUN xmlElementContentPtr XMLCALL
1.410 + xmlParseElementChildrenContentDecl
1.411 + (xmlParserCtxtPtr ctxt,
1.412 + int inputchk);
1.413 +XMLPUBFUN int XMLCALL
1.414 + xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
1.415 + const xmlChar *name,
1.416 + xmlElementContentPtr *result);
1.417 +XMLPUBFUN int XMLCALL
1.418 + xmlParseElementDecl (xmlParserCtxtPtr ctxt);
1.419 +XMLPUBFUN void XMLCALL
1.420 + xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
1.421 +XMLPUBFUN int XMLCALL
1.422 + xmlParseCharRef (xmlParserCtxtPtr ctxt);
1.423 +XMLPUBFUN xmlEntityPtr XMLCALL
1.424 + xmlParseEntityRef (xmlParserCtxtPtr ctxt);
1.425 +XMLPUBFUN void XMLCALL
1.426 + xmlParseReference (xmlParserCtxtPtr ctxt);
1.427 +XMLPUBFUN void XMLCALL
1.428 + xmlParsePEReference (xmlParserCtxtPtr ctxt);
1.429 +XMLPUBFUN void XMLCALL
1.430 + xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
1.431 +XMLPUBFUN const xmlChar * XMLCALL
1.432 + xmlParseAttribute (xmlParserCtxtPtr ctxt,
1.433 + xmlChar **value);
1.434 +XMLPUBFUN const xmlChar * XMLCALL
1.435 + xmlParseStartTag (xmlParserCtxtPtr ctxt);
1.436 +XMLPUBFUN void XMLCALL
1.437 + xmlParseEndTag (xmlParserCtxtPtr ctxt);
1.438 +XMLPUBFUN void XMLCALL
1.439 + xmlParseCDSect (xmlParserCtxtPtr ctxt);
1.440 +XMLPUBFUN void XMLCALL
1.441 + xmlParseContent (xmlParserCtxtPtr ctxt);
1.442 +XMLPUBFUN void XMLCALL
1.443 + xmlParseElement (xmlParserCtxtPtr ctxt);
1.444 +XMLPUBFUN xmlChar * XMLCALL
1.445 + xmlParseVersionNum (xmlParserCtxtPtr ctxt);
1.446 +XMLPUBFUN xmlChar * XMLCALL
1.447 + xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
1.448 +XMLPUBFUN xmlChar * XMLCALL
1.449 + xmlParseEncName (xmlParserCtxtPtr ctxt);
1.450 +XMLPUBFUN const xmlChar * XMLCALL
1.451 + xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
1.452 +XMLPUBFUN int XMLCALL
1.453 + xmlParseSDDecl (xmlParserCtxtPtr ctxt);
1.454 +XMLPUBFUN void XMLCALL
1.455 + xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
1.456 +XMLPUBFUN void XMLCALL
1.457 + xmlParseTextDecl (xmlParserCtxtPtr ctxt);
1.458 +XMLPUBFUN void XMLCALL
1.459 + xmlParseMisc (xmlParserCtxtPtr ctxt);
1.460 +XMLPUBFUN void XMLCALL
1.461 + xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
1.462 + const xmlChar *ExternalID,
1.463 + const xmlChar *SystemID);
1.464 +/**
1.465 + * XML_SUBSTITUTE_NONE:
1.466 + *
1.467 + * If no entities need to be substituted.
1.468 + */
1.469 +#define XML_SUBSTITUTE_NONE 0
1.470 +/**
1.471 + * XML_SUBSTITUTE_REF:
1.472 + *
1.473 + * Whether general entities need to be substituted.
1.474 + */
1.475 +#define XML_SUBSTITUTE_REF 1
1.476 +/**
1.477 + * XML_SUBSTITUTE_PEREF:
1.478 + *
1.479 + * Whether parameter entities need to be substituted.
1.480 + */
1.481 +#define XML_SUBSTITUTE_PEREF 2
1.482 +/**
1.483 + * XML_SUBSTITUTE_BOTH:
1.484 + *
1.485 + * Both general and parameter entities need to be substituted.
1.486 + */
1.487 +#define XML_SUBSTITUTE_BOTH 3
1.488 +
1.489 +XMLPUBFUN xmlChar * XMLCALL
1.490 + xmlDecodeEntities (xmlParserCtxtPtr ctxt,
1.491 + int len,
1.492 + int what,
1.493 + xmlChar end,
1.494 + xmlChar end2,
1.495 + xmlChar end3);
1.496 +XMLPUBFUN xmlChar * XMLCALL
1.497 + xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
1.498 + const xmlChar *str,
1.499 + int what,
1.500 + xmlChar end,
1.501 + xmlChar end2,
1.502 + xmlChar end3);
1.503 +XMLPUBFUN xmlChar * XMLCALL
1.504 + xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
1.505 + const xmlChar *str,
1.506 + int len,
1.507 + int what,
1.508 + xmlChar end,
1.509 + xmlChar end2,
1.510 + xmlChar end3);
1.511 +
1.512 +/*
1.513 + * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
1.514 + */
1.515 +XMLPUBFUN int XMLCALL nodePush (xmlParserCtxtPtr ctxt,
1.516 + xmlNodePtr value);
1.517 +XMLPUBFUN xmlNodePtr XMLCALL nodePop (xmlParserCtxtPtr ctxt);
1.518 +XMLPUBFUN int XMLCALL inputPush (xmlParserCtxtPtr ctxt,
1.519 + xmlParserInputPtr value);
1.520 +XMLPUBFUN xmlParserInputPtr XMLCALL inputPop (xmlParserCtxtPtr ctxt);
1.521 +XMLPUBFUN const xmlChar * XMLCALL namePop (xmlParserCtxtPtr ctxt);
1.522 +XMLPUBFUN int XMLCALL namePush (xmlParserCtxtPtr ctxt,
1.523 + const xmlChar *value);
1.524 +
1.525 +/*
1.526 + * other commodities shared between parser.c and parserInternals.
1.527 + */
1.528 +XMLPUBFUN int XMLCALL xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
1.529 +XMLPUBFUN int XMLCALL xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
1.530 + const xmlChar *cur,
1.531 + int *len);
1.532 +XMLPUBFUN void XMLCALL xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
1.533 +XMLPUBFUN void XMLCALL xmlParserHandleReference(xmlParserCtxtPtr ctxt);
1.534 +XMLPUBFUN int XMLCALL xmlCheckLanguageID (const xmlChar *lang);
1.535 +
1.536 +/*
1.537 + * Really core function shared with HTML parser.
1.538 + */
1.539 +XMLPUBFUN int XMLCALL xmlCurrentChar (xmlParserCtxtPtr ctxt,
1.540 + int *len);
1.541 +XMLPUBFUN int XMLCALL xmlCopyCharMultiByte (xmlChar *out,
1.542 + int val);
1.543 +XMLPUBFUN int XMLCALL xmlCopyChar (int len,
1.544 + xmlChar *out,
1.545 + int val);
1.546 +XMLPUBFUN void XMLCALL xmlNextChar (xmlParserCtxtPtr ctxt);
1.547 +XMLPUBFUN void XMLCALL xmlParserInputShrink (xmlParserInputPtr in);
1.548 +
1.549 +#ifdef LIBXML_HTML_ENABLED
1.550 +/*
1.551 + * Actually comes from the HTML parser but launched from the init stuff.
1.552 + */
1.553 +XMLPUBFUN void XMLCALL htmlInitAutoClose (void);
1.554 +//XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreateFileParserCtxt(const char *filename,
1.555 +// const char *encoding);
1.556 +
1.557 +#endif
1.558 +
1.559 +/*
1.560 + * Specific function to keep track of entities references
1.561 + * and used by the XSLT debugger.
1.562 + */
1.563 +/**
1.564 + * xmlEntityReferenceFunc:
1.565 + * @param ent the entity
1.566 + * @param firstNode the fist node in the chunk
1.567 + * @param lastNode the last nod in the chunk
1.568 + *
1.569 + * Callback function used when one needs to be able to track back the
1.570 + * provenance of a chunk of nodes inherited from an entity replacement.
1.571 + */
1.572 +typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
1.573 + xmlNodePtr firstNode,
1.574 + xmlNodePtr lastNode);
1.575 +
1.576 +XMLPUBFUN void XMLCALL xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
1.577 +
1.578 +
1.579 +/*
1.580 + * Macros for identifying data nodes. Data nodes are kept as text nodes
1.581 + * but some of the fields are reused to save memory.
1.582 + * ns <-> CID
1.583 + * content <-> binary content, or RChunk, or RFile reference
1.584 + * properties <-> size of binary data
1.585 + * nsDef <-> offset of binary data in RChunk
1.586 + * psvi <-> container type
1.587 + *
1.588 + * Added in S60 3.2 release.
1.589 + */
1.590 +#define IS_DATA_NODE(node) \
1.591 + node->type == XML_TEXT_NODE && node->ns
1.592 +
1.593 +#define IS_BINARY_NODE(node) \
1.594 + node->type == XML_TEXT_NODE && (int)node->psvi == 30
1.595 +
1.596 +#define IS_RCHUNK_NODE(node) \
1.597 + node->type == XML_TEXT_NODE && (int)node->psvi == 31
1.598 +
1.599 +#define IS_RFILE_NODE(node) \
1.600 + node->type == XML_TEXT_NODE && (int)node->psvi == 32
1.601 +
1.602 +#define IS_EXTERNAL_NODE(node) \
1.603 + node->type == XML_TEXT_NODE && ((int)node->psvi == 31 || (int)node->psvi == 32)
1.604 +
1.605 +/** given text node, check if it represents data node **/
1.606 +#define TEXT_IS_DATA(node) \
1.607 + node->ns
1.608 +
1.609 +/** given text node, check if it represents binary node **/
1.610 +#define TEXT_IS_BINARY(node) \
1.611 + (int)node->psvi == 30
1.612 +
1.613 +/** given text node, check if it represents external node **/
1.614 +#define TEXT_IS_EXTERNAL(node) \
1.615 + ((int)node->psvi == 31 || (int)node->psvi == 32)
1.616 +
1.617 +/** fetches data node cid **/
1.618 +#define DATA_NODE_CID(node) \
1.619 + (xmlChar *)node->ns
1.620 +
1.621 +#ifdef __cplusplus
1.622 +}
1.623 +#endif
1.624 +#endif /* XML_PARSER_INTERNALS_H */
1.625 +