parserInternals.h 16 KB

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