parserInternals.inc 16 KB

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