@img/sharp-libvips-dev 1.2.2-rc.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/include/expat.h +37 -24
  2. package/include/expat_config.h +9 -9
  3. package/include/expat_external.h +62 -61
  4. package/include/libxml2/libxml/HTMLparser.h +159 -101
  5. package/include/libxml2/libxml/HTMLtree.h +49 -74
  6. package/include/libxml2/libxml/SAX.h +8 -5
  7. package/include/libxml2/libxml/SAX2.h +18 -15
  8. package/include/libxml2/libxml/c14n.h +30 -29
  9. package/include/libxml2/libxml/catalog.h +47 -22
  10. package/include/libxml2/libxml/chvalid.h +52 -64
  11. package/include/libxml2/libxml/debugXML.h +18 -15
  12. package/include/libxml2/libxml/dict.h +22 -19
  13. package/include/libxml2/libxml/encoding.h +144 -111
  14. package/include/libxml2/libxml/entities.h +95 -75
  15. package/include/libxml2/libxml/globals.h +7 -4
  16. package/include/libxml2/libxml/hash.h +61 -64
  17. package/include/libxml2/libxml/list.h +59 -51
  18. package/include/libxml2/libxml/nanoftp.h +7 -4
  19. package/include/libxml2/libxml/nanohttp.h +10 -7
  20. package/include/libxml2/libxml/parser.h +1091 -563
  21. package/include/libxml2/libxml/parserInternals.h +167 -214
  22. package/include/libxml2/libxml/pattern.h +29 -31
  23. package/include/libxml2/libxml/relaxng.h +59 -58
  24. package/include/libxml2/libxml/schemasInternals.h +114 -268
  25. package/include/libxml2/libxml/schematron.h +59 -51
  26. package/include/libxml2/libxml/threads.h +19 -20
  27. package/include/libxml2/libxml/tree.h +873 -623
  28. package/include/libxml2/libxml/uri.h +21 -22
  29. package/include/libxml2/libxml/valid.h +170 -199
  30. package/include/libxml2/libxml/xinclude.h +24 -43
  31. package/include/libxml2/libxml/xlink.h +55 -51
  32. package/include/libxml2/libxml/xmlIO.h +133 -151
  33. package/include/libxml2/libxml/xmlautomata.h +66 -65
  34. package/include/libxml2/libxml/xmlerror.h +197 -94
  35. package/include/libxml2/libxml/xmlexports.h +17 -19
  36. package/include/libxml2/libxml/xmlmemory.h +44 -29
  37. package/include/libxml2/libxml/xmlmodule.h +14 -15
  38. package/include/libxml2/libxml/xmlreader.h +137 -131
  39. package/include/libxml2/libxml/xmlregexp.h +28 -31
  40. package/include/libxml2/libxml/xmlsave.h +81 -36
  41. package/include/libxml2/libxml/xmlschemas.h +61 -67
  42. package/include/libxml2/libxml/xmlschemastypes.h +60 -54
  43. package/include/libxml2/libxml/xmlstring.h +8 -9
  44. package/include/libxml2/libxml/xmlunicode.h +6 -3
  45. package/include/libxml2/libxml/xmlversion.h +44 -121
  46. package/include/libxml2/libxml/xmlwriter.h +97 -97
  47. package/include/libxml2/libxml/xpath.h +235 -232
  48. package/include/libxml2/libxml/xpathInternals.h +247 -277
  49. package/include/libxml2/libxml/xpointer.h +21 -17
  50. package/package.json +1 -1
  51. package/versions.json +2 -2
@@ -1,18 +1,22 @@
1
- /*
2
- * Summary: the core parser module
3
- * Description: Interfaces, constants and types related to the XML parser
1
+ /**
2
+ * @file
3
+ *
4
+ * @brief Validating XML 1.0 parser
5
+ *
6
+ * Interfaces, constants and types related to the XML parser.
4
7
  *
5
- * Copy: See Copyright for the status of this software.
8
+ * @copyright See Copyright for the status of this software.
6
9
  *
7
- * Author: Daniel Veillard
10
+ * @author Daniel Veillard
8
11
  */
9
12
 
10
13
  #ifndef __XML_PARSER_H__
11
14
  #define __XML_PARSER_H__
12
15
 
13
- /** DOC_DISABLE */
14
16
  #include <libxml/xmlversion.h>
17
+ /** @cond ignore */
15
18
  #define XML_TREE_INTERNALS
19
+ /** @endcond */
16
20
  #include <libxml/tree.h>
17
21
  #undef XML_TREE_INTERNALS
18
22
  #include <libxml/dict.h>
@@ -27,82 +31,113 @@
27
31
  /* for compatibility */
28
32
  #include <libxml/SAX2.h>
29
33
  #include <libxml/threads.h>
30
- /** DOC_ENABLE */
31
34
 
32
35
  #ifdef __cplusplus
33
36
  extern "C" {
34
37
  #endif
35
38
 
36
39
  /**
37
- * XML_DEFAULT_VERSION:
38
- *
39
40
  * The default version of XML used: 1.0
40
41
  */
41
42
  #define XML_DEFAULT_VERSION "1.0"
42
43
 
44
+ /**
45
+ * Status after parsing a document
46
+ */
43
47
  typedef enum {
48
+ /** not well-formed */
44
49
  XML_STATUS_NOT_WELL_FORMED = (1 << 0),
50
+ /** not namespace-well-formed */
45
51
  XML_STATUS_NOT_NS_WELL_FORMED = (1 << 1),
52
+ /** DTD validation failed */
46
53
  XML_STATUS_DTD_VALIDATION_FAILED = (1 << 2),
54
+ /** catastrophic failure like OOM or I/O error */
47
55
  XML_STATUS_CATASTROPHIC_ERROR = (1 << 3)
48
56
  } xmlParserStatus;
49
57
 
58
+ /**
59
+ * Resource type for resource loaders
60
+ */
50
61
  typedef enum {
62
+ /** unknown */
51
63
  XML_RESOURCE_UNKNOWN = 0,
64
+ /** main document */
52
65
  XML_RESOURCE_MAIN_DOCUMENT,
66
+ /** external DTD */
53
67
  XML_RESOURCE_DTD,
68
+ /** external general entity */
54
69
  XML_RESOURCE_GENERAL_ENTITY,
70
+ /** external parameter entity */
55
71
  XML_RESOURCE_PARAMETER_ENTITY,
72
+ /** XIncluded document */
56
73
  XML_RESOURCE_XINCLUDE,
74
+ /** XIncluded text */
57
75
  XML_RESOURCE_XINCLUDE_TEXT
58
76
  } xmlResourceType;
59
77
 
78
+ /**
79
+ * Flags for parser input
80
+ */
60
81
  typedef enum {
82
+ /** The input buffer won't be changed during parsing. */
61
83
  XML_INPUT_BUF_STATIC = (1 << 1),
84
+ /** The input buffer is zero-terminated. (Note that the zero
85
+ byte shouldn't be included in buffer size.) */
62
86
  XML_INPUT_BUF_ZERO_TERMINATED = (1 << 2),
87
+ /** Uncompress gzipped file input */
63
88
  XML_INPUT_UNZIP = (1 << 3),
64
- XML_INPUT_NETWORK = (1 << 4)
89
+ /** Allow network access. Unused internally. */
90
+ XML_INPUT_NETWORK = (1 << 4),
91
+ /** Allow system catalog to resolve URIs. */
92
+ XML_INPUT_USE_SYS_CATALOG = (1 << 5)
65
93
  } xmlParserInputFlags;
66
94
 
67
- /**
68
- * xmlParserInput:
69
- *
70
- * An xmlParserInput is an input flow for the XML processor.
71
- * Each entity parsed is associated an xmlParserInput (except the
72
- * few predefined ones). This is the case both for internal entities
73
- * - in which case the flow is already completely in memory - or
74
- * external entities - in which case we use the buf structure for
75
- * progressive reading and I18N conversions to the internal UTF-8 format.
76
- */
95
+ /* Deprecated */
96
+ typedef void (* xmlParserInputDeallocate)(xmlChar *str);
77
97
 
78
98
  /**
79
- * xmlParserInputDeallocate:
80
- * @str: the string to deallocate
81
- *
82
- * Callback for freeing some parser input allocations.
99
+ * Parser input
83
100
  */
84
- typedef void (* xmlParserInputDeallocate)(xmlChar *str);
85
-
86
101
  struct _xmlParserInput {
87
102
  /* Input buffer */
88
- xmlParserInputBufferPtr buf;
89
- /* The file analyzed, if any */
103
+ xmlParserInputBuffer *buf XML_DEPRECATED_MEMBER;
104
+ /**
105
+ * @deprecated Use #xmlCtxtGetInputPosition
106
+ *
107
+ * The filename or URI, if any
108
+ */
90
109
  const char *filename;
91
110
  /* unused */
92
111
  const char *directory XML_DEPRECATED_MEMBER;
93
112
  /* Base of the array to parse */
94
113
  const xmlChar *base;
95
- /* Current char being parsed */
114
+ /**
115
+ * @deprecated Use #xmlCtxtGetInputWindow
116
+ *
117
+ * Current char being parsed
118
+ */
96
119
  const xmlChar *cur;
97
120
  /* end of the array to parse */
98
121
  const xmlChar *end;
99
122
  /* unused */
100
123
  int length XML_DEPRECATED_MEMBER;
101
- /* Current line */
124
+ /**
125
+ * @deprecated Use #xmlCtxtGetInputPosition
126
+ *
127
+ * Current line
128
+ */
102
129
  int line;
103
- /* Current column */
130
+ /**
131
+ * @deprecated Use #xmlCtxtGetInputPosition
132
+ *
133
+ * Current column
134
+ */
104
135
  int col;
105
- /* How many xmlChars already consumed */
136
+ /**
137
+ * @deprecated Use #xmlCtxtGetInputPosition
138
+ *
139
+ * How many xmlChars already consumed
140
+ */
106
141
  unsigned long consumed;
107
142
  /* function to deallocate the base */
108
143
  xmlParserInputDeallocate free XML_DEPRECATED_MEMBER;
@@ -112,21 +147,16 @@ struct _xmlParserInput {
112
147
  const xmlChar *version XML_DEPRECATED_MEMBER;
113
148
  /* Flags */
114
149
  int flags XML_DEPRECATED_MEMBER;
115
- /* an unique identifier for the entity */
150
+ /* an unique identifier for the entity, unused internally */
116
151
  int id XML_DEPRECATED_MEMBER;
117
152
  /* unused */
118
153
  unsigned long parentConsumed XML_DEPRECATED_MEMBER;
119
154
  /* entity, if any */
120
- xmlEntityPtr entity XML_DEPRECATED_MEMBER;
155
+ xmlEntity *entity XML_DEPRECATED_MEMBER;
121
156
  };
122
157
 
123
- /**
124
- * xmlParserNodeInfo:
125
- *
126
- * The parser can be asked to collect Node information, i.e. at what
127
- * place in the file they were detected.
128
- * NOTE: This is off by default and not very well tested.
129
- */
158
+ /** @cond ignore */
159
+
130
160
  typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
131
161
  typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
132
162
 
@@ -147,11 +177,8 @@ struct _xmlParserNodeInfoSeq {
147
177
  xmlParserNodeInfo* buffer;
148
178
  };
149
179
 
150
- /**
151
- * xmlParserInputState:
152
- *
153
- * The parser is now working also as a state based parser.
154
- * The recursive one use the state info for entities processing.
180
+ /*
181
+ * Internal type
155
182
  */
156
183
  typedef enum {
157
184
  XML_PARSER_EOF = -1, /* nothing is to be parsed */
@@ -175,19 +202,15 @@ typedef enum {
175
202
  XML_PARSER_XML_DECL /* before XML decl (but after BOM) */
176
203
  } xmlParserInputState;
177
204
 
178
- /** DOC_DISABLE */
179
205
  /*
180
206
  * Internal bits in the 'loadsubset' context member
181
207
  */
182
208
  #define XML_DETECT_IDS 2
183
209
  #define XML_COMPLETE_ATTRS 4
184
210
  #define XML_SKIP_IDS 8
185
- /** DOC_ENABLE */
186
211
 
187
- /**
188
- * xmlParserMode:
189
- *
190
- * A parser can operate in various modes
212
+ /*
213
+ * Internal type. Only XML_PARSE_READER is used.
191
214
  */
192
215
  typedef enum {
193
216
  XML_PARSE_UNKNOWN = 0,
@@ -202,93 +225,132 @@ typedef struct _xmlStartTag xmlStartTag;
202
225
  typedef struct _xmlParserNsData xmlParserNsData;
203
226
  typedef struct _xmlAttrHashBucket xmlAttrHashBucket;
204
227
 
228
+ /** @endcond */
229
+
205
230
  /**
206
- * xmlResourceLoader:
207
- * @ctxt: parser context
208
- * @url: URL to load
209
- * @publicId: publid ID from DTD (optional)
210
- * @type: resource type
211
- * @flags: flags
212
- * @out: result pointer
213
- *
214
231
  * Callback for custom resource loaders.
215
232
  *
216
- * @flags can contain XML_INPUT_UNZIP and XML_INPUT_NETWORK.
233
+ * `flags` can contain XML_INPUT_UNZIP and XML_INPUT_NETWORK.
217
234
  *
218
- * On success, @out should be set to a new parser input object and
235
+ * The URL is resolved using XML catalogs before being passed to
236
+ * the callback.
237
+ *
238
+ * On success, `out` should be set to a new parser input object and
219
239
  * XML_ERR_OK should be returned.
220
240
  *
221
- * Returns an xmlParserErrors code.
241
+ * @param ctxt parser context
242
+ * @param url URL or system ID to load
243
+ * @param publicId publid ID from DTD (optional)
244
+ * @param type resource type
245
+ * @param flags flags
246
+ * @param out result pointer
247
+ * @returns an xmlParserErrors code.
222
248
  */
223
249
  typedef xmlParserErrors
224
250
  (*xmlResourceLoader)(void *ctxt, const char *url, const char *publicId,
225
251
  xmlResourceType type, xmlParserInputFlags flags,
226
- xmlParserInputPtr *out);
252
+ xmlParserInput **out);
227
253
 
228
254
  /**
229
- * xmlParserCtxt:
230
- *
231
- * The parser context.
232
- * NOTE This doesn't completely define the parser state, the (current ?)
233
- * design of the parser uses recursive function calls since this allow
234
- * and easy mapping from the production rules of the specification
235
- * to the actual code. The drawback is that the actual function call
236
- * also reflect the parser state. However most of the parsing routines
237
- * takes as the only argument the parser context pointer, so migrating
238
- * to a state based parser for progressive parsing shouldn't be too hard.
255
+ * Parser context
239
256
  */
240
257
  struct _xmlParserCtxt {
241
- /* The SAX handler */
258
+ /**
259
+ * @deprecated Use xmlCtxtGetSaxHandler() and
260
+ * xmlCtxtSetSaxHandler().
261
+ *
262
+ * the SAX handler
263
+ */
242
264
  struct _xmlSAXHandler *sax;
243
- /* For SAX interface only, used by DOM build */
265
+ /**
266
+ * @deprecated Use #xmlCtxtGetUserData
267
+ *
268
+ * user data for SAX interface, defaults to the context itself
269
+ */
244
270
  void *userData;
245
- /* the document being built */
246
- xmlDocPtr myDoc;
247
- /* is the document well formed */
271
+ /**
272
+ * @deprecated Use xmlCtxtGetDocument()
273
+ *
274
+ * the document being built
275
+ */
276
+ xmlDoc *myDoc;
277
+ /**
278
+ * @deprecated Use xmlCtxtGetStatus()
279
+ *
280
+ * is the document well formed?
281
+ */
248
282
  int wellFormed;
249
- /* shall we replace entities ? */
283
+ /**
284
+ * @deprecated Use xmlParserOption XML_PARSE_NOENT
285
+ *
286
+ * shall we replace entities?
287
+ */
250
288
  int replaceEntities XML_DEPRECATED_MEMBER;
251
- /* the XML version string */
252
- const xmlChar *version;
253
- /* the declared encoding, if any */
254
- const xmlChar *encoding;
255
- /* standalone document */
289
+ /**
290
+ * @deprecated Use xmlCtxtGetVersion()
291
+ *
292
+ * the XML version string
293
+ */
294
+ xmlChar *version;
295
+ /**
296
+ * @deprecated Use xmlCtxtGetDeclaredEncoding()
297
+ *
298
+ * the declared encoding, if any
299
+ */
300
+ xmlChar *encoding;
301
+ /**
302
+ * @deprecated Use xmlCtxtGetStandalone()
303
+ *
304
+ * standalone document
305
+ */
256
306
  int standalone;
257
307
 
258
- /* an HTML(1) document
259
- * 3 is HTML after <head>
260
- * 10 is HTML after <body>
308
+ /**
309
+ * @deprecated Use xmlCtxtIsHtml()
310
+ *
311
+ * non-zero for HTML documents, actually an htmlInsertMode
261
312
  */
262
313
  int html;
263
314
 
264
315
  /* Input stream stack */
265
316
 
266
- /* Current input stream */
267
- xmlParserInputPtr input;
317
+ /**
318
+ * Current input stream
319
+ */
320
+ /* TODO: Add accessors, see issue #762 */
321
+ xmlParserInput *input;
268
322
  /* Number of current input streams */
269
323
  int inputNr;
270
324
  /* Max number of input streams */
271
325
  int inputMax XML_DEPRECATED_MEMBER;
272
326
  /* stack of inputs */
273
- xmlParserInputPtr *inputTab;
327
+ xmlParserInput **inputTab;
274
328
 
275
329
  /* Node analysis stack only used for DOM building */
276
330
 
277
- /* Current parsed Node */
278
- xmlNodePtr node;
331
+ /**
332
+ * @deprecated Use #xmlCtxtGetNode
333
+ *
334
+ * The current element.
335
+ */
336
+ xmlNode *node;
279
337
  /* Depth of the parsing stack */
280
338
  int nodeNr XML_DEPRECATED_MEMBER;
281
339
  /* Max depth of the parsing stack */
282
340
  int nodeMax XML_DEPRECATED_MEMBER;
283
341
  /* array of nodes */
284
- xmlNodePtr *nodeTab XML_DEPRECATED_MEMBER;
342
+ xmlNode **nodeTab XML_DEPRECATED_MEMBER;
285
343
 
286
344
  /* Whether node info should be kept */
287
345
  int record_info;
288
346
  /* info about each node parsed */
289
347
  xmlParserNodeInfoSeq node_seq XML_DEPRECATED_MEMBER;
290
348
 
291
- /* error code */
349
+ /**
350
+ * @deprecated Use xmlCtxtGetLastError()
351
+ *
352
+ * error code
353
+ */
292
354
  int errNo;
293
355
 
294
356
  /* reference and external subset */
@@ -298,11 +360,23 @@ struct _xmlParserCtxt {
298
360
  /* unused */
299
361
  int external XML_DEPRECATED_MEMBER;
300
362
 
301
- /* is the document valid */
363
+ /**
364
+ * @deprecated Use xmlCtxtGetStatus()
365
+ *
366
+ * is the document valid
367
+ */
302
368
  int valid;
303
- /* shall we try to validate ? */
369
+ /**
370
+ * @deprecated Use xmlParserOption XML_PARSE_DTDVALID
371
+ *
372
+ * shall we try to validate?
373
+ */
304
374
  int validate XML_DEPRECATED_MEMBER;
305
- /* The validity context */
375
+ /**
376
+ * @deprecated Use xmlCtxtGetValidCtxt()
377
+ *
378
+ * The validity context
379
+ */
306
380
  xmlValidCtxt vctxt;
307
381
 
308
382
  /* push parser state */
@@ -310,7 +384,12 @@ struct _xmlParserCtxt {
310
384
  /* unused */
311
385
  int token XML_DEPRECATED_MEMBER;
312
386
 
313
- /* unused internally, still used downstream */
387
+ /**
388
+ * @deprecated Don't use
389
+ *
390
+ * The main document URI, if available, with its last
391
+ * component stripped.
392
+ */
314
393
  char *directory;
315
394
 
316
395
  /* Node name stack */
@@ -328,17 +407,49 @@ struct _xmlParserCtxt {
328
407
  long nbChars XML_DEPRECATED_MEMBER;
329
408
  /* used by progressive parsing lookup */
330
409
  long checkIndex XML_DEPRECATED_MEMBER;
331
- /* ugly but ... */
410
+ /**
411
+ * @deprecated Use inverted xmlParserOption XML_PARSE_NOBLANKS
412
+ *
413
+ * ugly but ...
414
+ */
332
415
  int keepBlanks XML_DEPRECATED_MEMBER;
333
- /* SAX callbacks are disabled */
334
- int disableSAX;
335
- /* Parsing is in int 1/ext 2 subset */
416
+ /**
417
+ * @deprecated Use xmlCtxtIsStopped()
418
+ *
419
+ * SAX callbacks are disabled
420
+ */
421
+ int disableSAX XML_DEPRECATED_MEMBER;
422
+ /**
423
+ * @deprecated Use xmlCtxtIsInSubset
424
+ *
425
+ * Set if DTD content is parsed.
426
+ *
427
+ * - 0: not in DTD
428
+ * - 1: in internal DTD subset
429
+ * - 2: in external DTD subset
430
+ */
336
431
  int inSubset;
337
- /* name of subset */
432
+ /**
433
+ * @deprecated Use the `name` argument of the
434
+ * `internalSubset` SAX callback or #xmlCtxtGetDocTypeDecl
435
+ *
436
+ * Name of the internal subset (root element type).
437
+ */
338
438
  const xmlChar *intSubName;
339
- /* URI of external subset */
439
+ /**
440
+ * @deprecated Use the `systemId` argument of the
441
+ * `internalSubset` SAX callback or #xmlCtxtGetDocTypeDecl
442
+ *
443
+ * System identifier (URI) of external the subset.
444
+ */
340
445
  xmlChar *extSubURI;
341
- /* SYSTEM ID of external subset */
446
+ /**
447
+ * @deprecated Use the `publicId` argument of the
448
+ * `internalSubset` SAX callback or #xmlCtxtGetDocTypeDecl
449
+ *
450
+ * This member is MISNAMED. It contains the *public* identifier
451
+ * of the external subset.
452
+ */
342
453
  xmlChar *extSubSystem;
343
454
 
344
455
  /* xml:space values */
@@ -355,30 +466,61 @@ struct _xmlParserCtxt {
355
466
  /* to prevent entity substitution loops */
356
467
  int depth XML_DEPRECATED_MEMBER;
357
468
  /* unused */
358
- xmlParserInputPtr entity XML_DEPRECATED_MEMBER;
469
+ xmlParserInput *entity XML_DEPRECATED_MEMBER;
359
470
  /* unused */
360
471
  int charset XML_DEPRECATED_MEMBER;
361
- /* Those two fields are there to */
472
+ /* Those two fields are there to speed up large node parsing */
362
473
  int nodelen XML_DEPRECATED_MEMBER;
363
- /* Speed up large node parsing */
364
474
  int nodemem XML_DEPRECATED_MEMBER;
365
- /* signal pedantic warnings */
475
+ /**
476
+ * @deprecated Use xmlParserOption XML_PARSE_PEDANTIC
477
+ *
478
+ * signal pedantic warnings
479
+ */
366
480
  int pedantic XML_DEPRECATED_MEMBER;
367
- /* For user data, libxml won't touch it */
481
+ /**
482
+ * @deprecated Use xmlCtxtGetPrivate() and xmlCtxtSetPrivate()
483
+ *
484
+ * For user data, libxml won't touch it
485
+ */
368
486
  void *_private;
369
-
370
- /* should the external subset be loaded */
371
- int loadsubset;
372
- /* set line number in element content */
487
+ /**
488
+ * @deprecated Use xmlParserOption XML_PARSE_DTDLOAD,
489
+ * XML_PARSE_DTDATTR or XML_PARSE_SKIP_IDS.
490
+ *
491
+ * Control loading of the external subset and handling of IDs.
492
+ * Other options like `validate` can override this value.
493
+ *
494
+ * - 0: The default behavior is to process IDs and to ignore
495
+ * the external subset.
496
+ * - XML_DETECT_IDS: Load external subset. This flag is
497
+ * misnamed. ID handling is only controlled by XML_SKIP_IDS.
498
+ * - XML_COMPLETE_ATTRS: Load external subset and process
499
+ * default attributes.
500
+ * - XML_SKIP_IDS: Ignore IDs.
501
+ */
502
+ int loadsubset XML_DEPRECATED_MEMBER;
503
+ /* unused */
373
504
  int linenumbers XML_DEPRECATED_MEMBER;
374
- /* document's own catalog */
505
+ /**
506
+ * @deprecated Use xmlCtxtGetCatalogs() and xmlCtxtSetCatalogs()
507
+ *
508
+ * document's own catalog
509
+ */
375
510
  void *catalogs XML_DEPRECATED_MEMBER;
376
- /* run in recovery mode */
511
+ /**
512
+ * @deprecated Use xmlParserOption XML_PARSE_RECOVER
513
+ * run in recovery mode
514
+ */
377
515
  int recovery XML_DEPRECATED_MEMBER;
378
516
  /* unused */
379
517
  int progressive XML_DEPRECATED_MEMBER;
380
- /* dictionary for the parser */
381
- xmlDictPtr dict;
518
+ /**
519
+ * @deprecated Use xmlCtxtGetDict() and xmlCtxtSetDict()
520
+ *
521
+ * dictionary for the parser
522
+ */
523
+ xmlDict *dict;
382
524
  /* array for the attributes callbacks */
383
525
  const xmlChar **atts XML_DEPRECATED_MEMBER;
384
526
  /* the size of the array */
@@ -410,30 +552,46 @@ struct _xmlParserCtxt {
410
552
  /* array of data for push */
411
553
  xmlStartTag *pushTab XML_DEPRECATED_MEMBER;
412
554
  /* defaulted attributes if any */
413
- xmlHashTablePtr attsDefault XML_DEPRECATED_MEMBER;
555
+ xmlHashTable *attsDefault XML_DEPRECATED_MEMBER;
414
556
  /* non-CDATA attributes if any */
415
- xmlHashTablePtr attsSpecial XML_DEPRECATED_MEMBER;
416
- /* is the document XML Namespace okay */
557
+ xmlHashTable *attsSpecial XML_DEPRECATED_MEMBER;
558
+
559
+ /**
560
+ * @deprecated Use xmlCtxtGetStatus()
561
+ *
562
+ * is the document XML Namespace okay
563
+ */
417
564
  int nsWellFormed;
418
- /* Extra options */
565
+ /**
566
+ * @deprecated Use xmlCtxtGetOptions()
567
+ *
568
+ * Extra options
569
+ */
419
570
  int options;
420
571
 
572
+ /**
573
+ * @deprecated Use inverted xmlParserOption XML_PARSE_NODICT
574
+ *
575
+ * Use dictionary names for the tree
576
+ */
577
+ int dictNames XML_DEPRECATED_MEMBER;
578
+
421
579
  /*
422
580
  * Those fields are needed only for streaming parsing so far
423
581
  */
424
582
 
425
- /* Use dictionary names for the tree */
426
- int dictNames XML_DEPRECATED_MEMBER;
427
583
  /* number of freed element nodes */
428
584
  int freeElemsNr XML_DEPRECATED_MEMBER;
429
585
  /* List of freed element nodes */
430
- xmlNodePtr freeElems XML_DEPRECATED_MEMBER;
586
+ xmlNode *freeElems XML_DEPRECATED_MEMBER;
431
587
  /* number of freed attributes nodes */
432
588
  int freeAttrsNr XML_DEPRECATED_MEMBER;
433
589
  /* List of freed attributes nodes */
434
- xmlAttrPtr freeAttrs XML_DEPRECATED_MEMBER;
590
+ xmlAttr *freeAttrs XML_DEPRECATED_MEMBER;
435
591
 
436
- /*
592
+ /**
593
+ * @deprecated Use xmlCtxtGetLastError()
594
+ *
437
595
  * the complete error information for the last error.
438
596
  */
439
597
  xmlError lastError XML_DEPRECATED_MEMBER;
@@ -486,8 +644,6 @@ struct _xmlParserCtxt {
486
644
  };
487
645
 
488
646
  /**
489
- * xmlSAXLocator:
490
- *
491
647
  * A SAX Locator.
492
648
  */
493
649
  struct _xmlSAXLocator {
@@ -498,88 +654,70 @@ struct _xmlSAXLocator {
498
654
  };
499
655
 
500
656
  /**
501
- * xmlSAXHandler:
657
+ * SAX callback to resolve external entities.
502
658
  *
503
- * A SAX handler is bunch of callbacks called by the parser when processing
504
- * of the input generate data or structure information.
505
- */
506
-
507
- /**
508
- * resolveEntitySAXFunc:
509
- * @ctx: the user data (XML parser context)
510
- * @publicId: The public ID of the entity
511
- * @systemId: The system ID of the entity
512
- *
513
- * Callback:
514
- * The entity loader, to control the loading of external entities,
515
- * the application can either:
516
- * - override this resolveEntity() callback in the SAX block
517
- * - or better use the xmlSetExternalEntityLoader() function to
518
- * set up it's own entity resolution routine
659
+ * This is only used to load DTDs. The preferred way to install
660
+ * custom resolvers is #xmlCtxtSetResourceLoader.
519
661
  *
520
- * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
662
+ * @param ctx the user data (XML parser context)
663
+ * @param publicId The public identifier of the entity
664
+ * @param systemId The system identifier of the entity (URL)
665
+ * @returns the xmlParserInput if inlined or NULL for DOM behaviour.
521
666
  */
522
- typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
667
+ typedef xmlParserInput *(*resolveEntitySAXFunc) (void *ctx,
523
668
  const xmlChar *publicId,
524
669
  const xmlChar *systemId);
525
670
  /**
526
- * internalSubsetSAXFunc:
527
- * @ctx: the user data (XML parser context)
528
- * @name: the root element name
529
- * @ExternalID: the external ID
530
- * @SystemID: the SYSTEM ID (e.g. filename or URL)
671
+ * SAX callback for the internal subset.
531
672
  *
532
- * Callback on internal subset declaration.
673
+ * @param ctx the user data (XML parser context)
674
+ * @param name the root element name
675
+ * @param publicId the public identifier
676
+ * @param systemId the system identifier (e.g. filename or URL)
533
677
  */
534
678
  typedef void (*internalSubsetSAXFunc) (void *ctx,
535
679
  const xmlChar *name,
536
- const xmlChar *ExternalID,
537
- const xmlChar *SystemID);
680
+ const xmlChar *publicId,
681
+ const xmlChar *systemId);
538
682
  /**
539
- * externalSubsetSAXFunc:
540
- * @ctx: the user data (XML parser context)
541
- * @name: the root element name
542
- * @ExternalID: the external ID
543
- * @SystemID: the SYSTEM ID (e.g. filename or URL)
683
+ * SAX callback for the external subset.
544
684
  *
545
- * Callback on external subset declaration.
685
+ * @param ctx the user data (XML parser context)
686
+ * @param name the root element name
687
+ * @param publicId the public identifier
688
+ * @param systemId the system identifier (e.g. filename or URL)
546
689
  */
547
690
  typedef void (*externalSubsetSAXFunc) (void *ctx,
548
691
  const xmlChar *name,
549
- const xmlChar *ExternalID,
550
- const xmlChar *SystemID);
692
+ const xmlChar *publicId,
693
+ const xmlChar *systemId);
551
694
  /**
552
- * getEntitySAXFunc:
553
- * @ctx: the user data (XML parser context)
554
- * @name: The entity name
555
- *
556
- * Get an entity by name.
695
+ * SAX callback to look up a general entity by name.
557
696
  *
558
- * Returns the xmlEntityPtr if found.
697
+ * @param ctx the user data (XML parser context)
698
+ * @param name The entity name
699
+ * @returns the xmlEntity if found.
559
700
  */
560
- typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
701
+ typedef xmlEntity *(*getEntitySAXFunc) (void *ctx,
561
702
  const xmlChar *name);
562
703
  /**
563
- * getParameterEntitySAXFunc:
564
- * @ctx: the user data (XML parser context)
565
- * @name: The entity name
566
- *
567
- * Get a parameter entity by name.
704
+ * SAX callback to look up a parameter entity by name.
568
705
  *
569
- * Returns the xmlEntityPtr if found.
706
+ * @param ctx the user data (XML parser context)
707
+ * @param name The entity name
708
+ * @returns the xmlEntity if found.
570
709
  */
571
- typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
710
+ typedef xmlEntity *(*getParameterEntitySAXFunc) (void *ctx,
572
711
  const xmlChar *name);
573
712
  /**
574
- * entityDeclSAXFunc:
575
- * @ctx: the user data (XML parser context)
576
- * @name: the entity name
577
- * @type: the entity type
578
- * @publicId: The public ID of the entity
579
- * @systemId: The system ID of the entity
580
- * @content: the entity value (without processing).
713
+ * SAX callback for entity declarations.
581
714
  *
582
- * An entity definition has been parsed.
715
+ * @param ctx the user data (XML parser context)
716
+ * @param name the entity name
717
+ * @param type the entity type
718
+ * @param publicId The public ID of the entity
719
+ * @param systemId The system ID of the entity
720
+ * @param content the entity value (without processing).
583
721
  */
584
722
  typedef void (*entityDeclSAXFunc) (void *ctx,
585
723
  const xmlChar *name,
@@ -588,29 +726,27 @@ typedef void (*entityDeclSAXFunc) (void *ctx,
588
726
  const xmlChar *systemId,
589
727
  xmlChar *content);
590
728
  /**
591
- * notationDeclSAXFunc:
592
- * @ctx: the user data (XML parser context)
593
- * @name: The name of the notation
594
- * @publicId: The public ID of the entity
595
- * @systemId: The system ID of the entity
729
+ * SAX callback for notation declarations.
596
730
  *
597
- * What to do when a notation declaration has been parsed.
731
+ * @param ctx the user data (XML parser context)
732
+ * @param name The name of the notation
733
+ * @param publicId The public ID of the notation
734
+ * @param systemId The system ID of the notation
598
735
  */
599
736
  typedef void (*notationDeclSAXFunc)(void *ctx,
600
737
  const xmlChar *name,
601
738
  const xmlChar *publicId,
602
739
  const xmlChar *systemId);
603
740
  /**
604
- * attributeDeclSAXFunc:
605
- * @ctx: the user data (XML parser context)
606
- * @elem: the name of the element
607
- * @fullname: the attribute name
608
- * @type: the attribute type
609
- * @def: the type of default value
610
- * @defaultValue: the attribute default value
611
- * @tree: the tree of enumerated value set
741
+ * SAX callback for attribute declarations.
612
742
  *
613
- * An attribute definition has been parsed.
743
+ * @param ctx the user data (XML parser context)
744
+ * @param elem the name of the element
745
+ * @param fullname the attribute name
746
+ * @param type the attribute type
747
+ * @param def the type of default value
748
+ * @param defaultValue the attribute default value
749
+ * @param tree the tree of enumerated value set
614
750
  */
615
751
  typedef void (*attributeDeclSAXFunc)(void *ctx,
616
752
  const xmlChar *elem,
@@ -618,29 +754,27 @@ typedef void (*attributeDeclSAXFunc)(void *ctx,
618
754
  int type,
619
755
  int def,
620
756
  const xmlChar *defaultValue,
621
- xmlEnumerationPtr tree);
757
+ xmlEnumeration *tree);
622
758
  /**
623
- * elementDeclSAXFunc:
624
- * @ctx: the user data (XML parser context)
625
- * @name: the element name
626
- * @type: the element type
627
- * @content: the element value tree
759
+ * SAX callback for element declarations.
628
760
  *
629
- * An element definition has been parsed.
761
+ * @param ctx the user data (XML parser context)
762
+ * @param name the element name
763
+ * @param type the element type
764
+ * @param content the element value tree
630
765
  */
631
766
  typedef void (*elementDeclSAXFunc)(void *ctx,
632
767
  const xmlChar *name,
633
768
  int type,
634
- xmlElementContentPtr content);
769
+ xmlElementContent *content);
635
770
  /**
636
- * unparsedEntityDeclSAXFunc:
637
- * @ctx: the user data (XML parser context)
638
- * @name: The name of the entity
639
- * @publicId: The public ID of the entity
640
- * @systemId: The system ID of the entity
641
- * @notationName: the name of the notation
771
+ * SAX callback for unparsed entity declarations.
642
772
  *
643
- * What to do when an unparsed entity declaration is parsed.
773
+ * @param ctx the user data (XML parser context)
774
+ * @param name The name of the entity
775
+ * @param publicId The public ID of the entity
776
+ * @param systemId The system ID of the entity
777
+ * @param notationName the name of the notation
644
778
  */
645
779
  typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
646
780
  const xmlChar *name,
@@ -648,185 +782,163 @@ typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
648
782
  const xmlChar *systemId,
649
783
  const xmlChar *notationName);
650
784
  /**
651
- * setDocumentLocatorSAXFunc:
652
- * @ctx: the user data (XML parser context)
653
- * @loc: A SAX Locator
785
+ * This callback receives the "document locator" at startup,
786
+ * which is always the global xmlDefaultSAXLocator.
654
787
  *
655
- * Receive the document locator at startup, actually xmlDefaultSAXLocator.
656
- * Everything is available on the context, so this is useless in our case.
788
+ * Everything is available on the context, so this is useless in
789
+ * our case.
790
+ *
791
+ * @param ctx the user data (XML parser context)
792
+ * @param loc A SAX Locator
657
793
  */
658
794
  typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
659
- xmlSAXLocatorPtr loc);
795
+ xmlSAXLocator *loc);
660
796
  /**
661
- * startDocumentSAXFunc:
662
- * @ctx: the user data (XML parser context)
797
+ * SAX callback for start of document.
663
798
  *
664
- * Called when the document start being processed.
799
+ * @param ctx the user data (XML parser context)
665
800
  */
666
801
  typedef void (*startDocumentSAXFunc) (void *ctx);
667
802
  /**
668
- * endDocumentSAXFunc:
669
- * @ctx: the user data (XML parser context)
803
+ * SAX callback for end of document.
670
804
  *
671
- * Called when the document end has been detected.
805
+ * @param ctx the user data (XML parser context)
672
806
  */
673
807
  typedef void (*endDocumentSAXFunc) (void *ctx);
674
808
  /**
675
- * startElementSAXFunc:
676
- * @ctx: the user data (XML parser context)
677
- * @name: The element name, including namespace prefix
678
- * @atts: An array of name/value attributes pairs, NULL terminated
809
+ * SAX callback for start tags.
679
810
  *
680
- * Called when an opening tag has been processed.
811
+ * @param ctx the user data (XML parser context)
812
+ * @param name The element name, including namespace prefix
813
+ * @param atts An array of name/value attributes pairs, NULL terminated
681
814
  */
682
815
  typedef void (*startElementSAXFunc) (void *ctx,
683
816
  const xmlChar *name,
684
817
  const xmlChar **atts);
685
818
  /**
686
- * endElementSAXFunc:
687
- * @ctx: the user data (XML parser context)
688
- * @name: The element name
819
+ * SAX callback for end tags.
689
820
  *
690
- * Called when the end of an element has been detected.
821
+ * @param ctx the user data (XML parser context)
822
+ * @param name The element name
691
823
  */
692
824
  typedef void (*endElementSAXFunc) (void *ctx,
693
825
  const xmlChar *name);
694
826
  /**
695
- * attributeSAXFunc:
696
- * @ctx: the user data (XML parser context)
697
- * @name: The attribute name, including namespace prefix
698
- * @value: The attribute value
827
+ * Callback for attributes.
828
+ *
829
+ * @deprecated This typedef is unused.
699
830
  *
700
- * Handle an attribute that has been read by the parser.
701
- * The default handling is to convert the attribute into an
702
- * DOM subtree and past it in a new xmlAttr element added to
703
- * the element.
831
+ * @param ctx the user data (XML parser context)
832
+ * @param name The attribute name, including namespace prefix
833
+ * @param value The attribute value
704
834
  */
705
835
  typedef void (*attributeSAXFunc) (void *ctx,
706
836
  const xmlChar *name,
707
837
  const xmlChar *value);
708
838
  /**
709
- * referenceSAXFunc:
710
- * @ctx: the user data (XML parser context)
711
- * @name: The entity name
839
+ * SAX callback for entity references.
712
840
  *
713
- * Called when an entity reference is detected.
841
+ * @param ctx the user data (XML parser context)
842
+ * @param name The entity name
714
843
  */
715
844
  typedef void (*referenceSAXFunc) (void *ctx,
716
845
  const xmlChar *name);
717
846
  /**
718
- * charactersSAXFunc:
719
- * @ctx: the user data (XML parser context)
720
- * @ch: a xmlChar string
721
- * @len: the number of xmlChar
847
+ * SAX callback for character data.
722
848
  *
723
- * Receiving some chars from the parser.
849
+ * @param ctx the user data (XML parser context)
850
+ * @param ch a xmlChar string
851
+ * @param len the number of xmlChar
724
852
  */
725
853
  typedef void (*charactersSAXFunc) (void *ctx,
726
854
  const xmlChar *ch,
727
855
  int len);
728
856
  /**
729
- * ignorableWhitespaceSAXFunc:
730
- * @ctx: the user data (XML parser context)
731
- * @ch: a xmlChar string
732
- * @len: the number of xmlChar
857
+ * SAX callback for "ignorable" whitespace.
733
858
  *
734
- * Receiving some ignorable whitespaces from the parser.
735
- * UNUSED: by default the DOM building will use characters.
859
+ * @param ctx the user data (XML parser context)
860
+ * @param ch a xmlChar string
861
+ * @param len the number of xmlChar
736
862
  */
737
863
  typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
738
864
  const xmlChar *ch,
739
865
  int len);
740
866
  /**
741
- * processingInstructionSAXFunc:
742
- * @ctx: the user data (XML parser context)
743
- * @target: the target name
744
- * @data: the PI data's
867
+ * SAX callback for processing instructions.
745
868
  *
746
- * A processing instruction has been parsed.
869
+ * @param ctx the user data (XML parser context)
870
+ * @param target the target name
871
+ * @param data the PI data's
747
872
  */
748
873
  typedef void (*processingInstructionSAXFunc) (void *ctx,
749
874
  const xmlChar *target,
750
875
  const xmlChar *data);
751
876
  /**
752
- * commentSAXFunc:
753
- * @ctx: the user data (XML parser context)
754
- * @value: the comment content
877
+ * SAX callback for comments.
755
878
  *
756
- * A comment has been parsed.
879
+ * @param ctx the user data (XML parser context)
880
+ * @param value the comment content
757
881
  */
758
882
  typedef void (*commentSAXFunc) (void *ctx,
759
883
  const xmlChar *value);
760
884
  /**
761
- * cdataBlockSAXFunc:
762
- * @ctx: the user data (XML parser context)
763
- * @value: The pcdata content
764
- * @len: the block length
885
+ * SAX callback for CDATA sections.
765
886
  *
766
- * Called when a pcdata block has been parsed.
887
+ * @param ctx the user data (XML parser context)
888
+ * @param value The pcdata content
889
+ * @param len the block length
767
890
  */
768
891
  typedef void (*cdataBlockSAXFunc) (
769
892
  void *ctx,
770
893
  const xmlChar *value,
771
894
  int len);
772
895
  /**
773
- * warningSAXFunc:
774
- * @ctx: an XML parser context
775
- * @msg: the message to display/transmit
776
- * @...: extra parameters for the message display
896
+ * SAX callback for warning messages.
777
897
  *
778
- * Display and format a warning messages, callback.
898
+ * @param ctx an XML parser context
899
+ * @param msg the message to display/transmit
900
+ * @param ... extra parameters for the message display
779
901
  */
780
902
  typedef void (*warningSAXFunc) (void *ctx,
781
903
  const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
782
904
  /**
783
- * errorSAXFunc:
784
- * @ctx: an XML parser context
785
- * @msg: the message to display/transmit
786
- * @...: extra parameters for the message display
905
+ * SAX callback for error messages.
787
906
  *
788
- * Display and format an error messages, callback.
907
+ * @param ctx an XML parser context
908
+ * @param msg the message to display/transmit
909
+ * @param ... extra parameters for the message display
789
910
  */
790
911
  typedef void (*errorSAXFunc) (void *ctx,
791
912
  const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
792
913
  /**
793
- * fatalErrorSAXFunc:
794
- * @ctx: an XML parser context
795
- * @msg: the message to display/transmit
796
- * @...: extra parameters for the message display
914
+ * SAX callback for fatal error messages.
797
915
  *
798
- * Display and format fatal error messages, callback.
799
- * Note: so far fatalError() SAX callbacks are not used, error()
800
- * get all the callbacks for errors.
916
+ * @param ctx an XML parser context
917
+ * @param msg the message to display/transmit
918
+ * @param ... extra parameters for the message display
801
919
  */
802
920
  typedef void (*fatalErrorSAXFunc) (void *ctx,
803
921
  const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
804
922
  /**
805
- * isStandaloneSAXFunc:
806
- * @ctx: the user data (XML parser context)
923
+ * SAX callback to get standalone status.
807
924
  *
808
- * Is this document tagged standalone?
809
- *
810
- * Returns 1 if true
925
+ * @param ctx the user data (XML parser context)
926
+ * @returns 1 if true
811
927
  */
812
928
  typedef int (*isStandaloneSAXFunc) (void *ctx);
813
929
  /**
814
- * hasInternalSubsetSAXFunc:
815
- * @ctx: the user data (XML parser context)
816
- *
817
- * Does this document has an internal subset.
930
+ * SAX callback to get internal subset status.
818
931
  *
819
- * Returns 1 if true
932
+ * @param ctx the user data (XML parser context)
933
+ * @returns 1 if true
820
934
  */
821
935
  typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
822
936
 
823
937
  /**
824
- * hasExternalSubsetSAXFunc:
825
- * @ctx: the user data (XML parser context)
826
- *
827
- * Does this document has an external subset?
938
+ * SAX callback to get external subset status.
828
939
  *
829
- * Returns 1 if true
940
+ * @param ctx the user data (XML parser context)
941
+ * @returns 1 if true
830
942
  */
831
943
  typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
832
944
 
@@ -836,29 +948,27 @@ typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
836
948
  * *
837
949
  ************************************************************************/
838
950
  /**
839
- * XML_SAX2_MAGIC:
840
- *
841
- * Special constant found in SAX2 blocks initialized fields
951
+ * Special constant required for SAX2 handlers.
842
952
  */
843
953
  #define XML_SAX2_MAGIC 0xDEEDBEAF
844
954
 
845
955
  /**
846
- * startElementNsSAX2Func:
847
- * @ctx: the user data (XML parser context)
848
- * @localname: the local name of the element
849
- * @prefix: the element namespace prefix if available
850
- * @URI: the element namespace name if available
851
- * @nb_namespaces: number of namespace definitions on that node
852
- * @namespaces: pointer to the array of prefix/URI pairs namespace definitions
853
- * @nb_attributes: the number of attributes on that node
854
- * @nb_defaulted: the number of defaulted attributes. The defaulted
855
- * ones are at the end of the array
856
- * @attributes: pointer to the array of (localname/prefix/URI/value/end)
857
- * attribute values.
956
+ * SAX2 callback for start tags.
858
957
  *
859
- * SAX2 callback when an element start has been detected by the parser.
860
958
  * It provides the namespace information for the element, as well as
861
959
  * the new namespace declarations on the element.
960
+ *
961
+ * @param ctx the user data (XML parser context)
962
+ * @param localname the local name of the element
963
+ * @param prefix the element namespace prefix if available
964
+ * @param URI the element namespace name if available
965
+ * @param nb_namespaces number of namespace definitions on that node
966
+ * @param namespaces pointer to the array of prefix/URI pairs namespace definitions
967
+ * @param nb_attributes the number of attributes on that node
968
+ * @param nb_defaulted the number of defaulted attributes. The defaulted
969
+ * ones are at the end of the array
970
+ * @param attributes pointer to the array of (localname/prefix/URI/value/end)
971
+ * attribute values.
862
972
  */
863
973
 
864
974
  typedef void (*startElementNsSAX2Func) (void *ctx,
@@ -872,14 +982,14 @@ typedef void (*startElementNsSAX2Func) (void *ctx,
872
982
  const xmlChar **attributes);
873
983
 
874
984
  /**
875
- * endElementNsSAX2Func:
876
- * @ctx: the user data (XML parser context)
877
- * @localname: the local name of the element
878
- * @prefix: the element namespace prefix if available
879
- * @URI: the element namespace name if available
985
+ * SAX2 callback for end tags.
880
986
  *
881
- * SAX2 callback when an element end has been detected by the parser.
882
987
  * It provides the namespace information for the element.
988
+ *
989
+ * @param ctx the user data (XML parser context)
990
+ * @param localname the local name of the element
991
+ * @param prefix the element namespace prefix if available
992
+ * @param URI the element namespace name if available
883
993
  */
884
994
 
885
995
  typedef void (*endElementNsSAX2Func) (void *ctx,
@@ -887,28 +997,101 @@ typedef void (*endElementNsSAX2Func) (void *ctx,
887
997
  const xmlChar *prefix,
888
998
  const xmlChar *URI);
889
999
 
890
-
1000
+ /**
1001
+ * Callbacks for SAX parser
1002
+ *
1003
+ * For DTD-related handlers, it's recommended to either use the
1004
+ * original libxml2 handler or set them to NULL if DTDs can be
1005
+ * ignored.
1006
+ */
891
1007
  struct _xmlSAXHandler {
892
- /*
893
- * For DTD-related handlers, it's recommended to either use the
894
- * original libxml2 handler or set them to NULL if DTDs can be
895
- * ignored.
896
- */
897
- internalSubsetSAXFunc internalSubset; /* DTD */
898
- isStandaloneSAXFunc isStandalone; /* unused */
899
- hasInternalSubsetSAXFunc hasInternalSubset; /* DTD */
900
- hasExternalSubsetSAXFunc hasExternalSubset; /* DTD */
901
- resolveEntitySAXFunc resolveEntity; /* DTD */
902
- getEntitySAXFunc getEntity; /* DTD */
903
- entityDeclSAXFunc entityDecl; /* DTD */
904
- notationDeclSAXFunc notationDecl; /* DTD */
905
- attributeDeclSAXFunc attributeDecl; /* DTD */
906
- elementDeclSAXFunc elementDecl; /* DTD */
907
- unparsedEntityDeclSAXFunc unparsedEntityDecl; /* DTD */
908
- setDocumentLocatorSAXFunc setDocumentLocator; /* deprecated */
1008
+ /**
1009
+ * Called after the start of the document type declaration
1010
+ * was parsed.
1011
+ *
1012
+ * Should typically not be modified.
1013
+ */
1014
+ internalSubsetSAXFunc internalSubset;
1015
+ /**
1016
+ * Standalone status. Not invoked by the parser. Not supposed
1017
+ * to be changed by applications.
1018
+ */
1019
+ isStandaloneSAXFunc isStandalone;
1020
+ /**
1021
+ * Internal subset availability. Not invoked by the parser.
1022
+ * Not supposed to be changed by applications.
1023
+ */
1024
+ hasInternalSubsetSAXFunc hasInternalSubset;
1025
+ /**
1026
+ * External subset availability. Not invoked by the parser.
1027
+ * Not supposed to be changed by applications.
1028
+ */
1029
+ hasExternalSubsetSAXFunc hasExternalSubset;
1030
+ /**
1031
+ * Only called when loading external DTDs. Not called to load
1032
+ * external entities.
1033
+ *
1034
+ * Should typically not be modified.
1035
+ */
1036
+ resolveEntitySAXFunc resolveEntity;
1037
+ /**
1038
+ * Called when looking up general entities.
1039
+ *
1040
+ * Should typically not be modified.
1041
+ */
1042
+ getEntitySAXFunc getEntity;
1043
+ /**
1044
+ * Called after an entity declaration was parsed.
1045
+ *
1046
+ * Should typically not be modified.
1047
+ */
1048
+ entityDeclSAXFunc entityDecl;
1049
+ /**
1050
+ * Called after a notation declaration was parsed.
1051
+ *
1052
+ * Should typically not be modified.
1053
+ */
1054
+ notationDeclSAXFunc notationDecl;
1055
+ /**
1056
+ * Called after an attribute declaration was parsed.
1057
+ *
1058
+ * Should typically not be modified.
1059
+ */
1060
+ attributeDeclSAXFunc attributeDecl;
1061
+ /**
1062
+ * Called after an element declaration was parsed.
1063
+ *
1064
+ * Should typically not be modified.
1065
+ */
1066
+ elementDeclSAXFunc elementDecl;
1067
+ /**
1068
+ * Called after an unparsed entity declaration was parsed.
1069
+ *
1070
+ * Should typically not be modified.
1071
+ */
1072
+ unparsedEntityDeclSAXFunc unparsedEntityDecl;
1073
+ /**
1074
+ * This callback receives the "document locator" at startup,
1075
+ * which is always the global xmlDefaultSAXLocator.
1076
+ *
1077
+ * Everything is available on the context, so this is useless in
1078
+ * our case.
1079
+ */
1080
+ setDocumentLocatorSAXFunc setDocumentLocator;
1081
+ /**
1082
+ * Called after the XML declaration was parsed.
1083
+ *
1084
+ * Use xmlCtxtGetVersion(), xmlCtxtGetDeclaredEncoding() and
1085
+ * xmlCtxtGetStandalone() to get data from the XML declaration.
1086
+ */
909
1087
  startDocumentSAXFunc startDocument;
1088
+ /**
1089
+ * Called at the end of the document.
1090
+ */
910
1091
  endDocumentSAXFunc endDocument;
911
- /*
1092
+ /**
1093
+ * Legacy start tag handler
1094
+ *
912
1095
  * `startElement` and `endElement` are only used by the legacy SAX1
913
1096
  * interface and should not be used in new software. If you really
914
1097
  * have to enable SAX1, the preferred way is set the `initialized`
@@ -922,46 +1105,102 @@ struct _xmlSAXHandler {
922
1105
  * together with custom SAX callbacks.
923
1106
  */
924
1107
  startElementSAXFunc startElement;
1108
+ /**
1109
+ * See _xmlSAXHandler.startElement
1110
+ */
925
1111
  endElementSAXFunc endElement;
1112
+ /**
1113
+ * Called after an entity reference was parsed.
1114
+ */
926
1115
  referenceSAXFunc reference;
1116
+ /**
1117
+ * Called after a character data was parsed.
1118
+ */
927
1119
  charactersSAXFunc characters;
928
- /*
1120
+ /**
1121
+ * Called after "ignorable" whitespace was parsed.
1122
+ *
929
1123
  * `ignorableWhitespace` should always be set to the same value
930
1124
  * as `characters`. Otherwise, the parser will try to detect
931
1125
  * whitespace which is unreliable.
932
1126
  */
933
1127
  ignorableWhitespaceSAXFunc ignorableWhitespace;
1128
+ /**
1129
+ * Called after a processing instruction was parsed.
1130
+ */
934
1131
  processingInstructionSAXFunc processingInstruction;
1132
+ /**
1133
+ * Called after a comment was parsed.
1134
+ */
935
1135
  commentSAXFunc comment;
1136
+ /**
1137
+ * Callback for warning messages.
1138
+ */
936
1139
  warningSAXFunc warning;
1140
+ /**
1141
+ * Callback for error messages.
1142
+ */
937
1143
  errorSAXFunc error;
938
- fatalErrorSAXFunc fatalError; /* unused, `error` gets all the errors */
939
- getParameterEntitySAXFunc getParameterEntity; /* DTD */
1144
+ /**
1145
+ * Unused, all errors go to `error`.
1146
+ */
1147
+ fatalErrorSAXFunc fatalError;
1148
+ /**
1149
+ * Called when looking up parameter entities.
1150
+ *
1151
+ * Should typically not be modified.
1152
+ */
1153
+ getParameterEntitySAXFunc getParameterEntity;
1154
+ /**
1155
+ * Called after a CDATA section was parsed.
1156
+ */
940
1157
  cdataBlockSAXFunc cdataBlock;
941
- externalSubsetSAXFunc externalSubset; /* DTD */
942
- /*
943
- * `initialized` should always be set to XML_SAX2_MAGIC to enable the
944
- * modern SAX2 interface.
1158
+ /**
1159
+ * Called to parse the external subset.
1160
+ *
1161
+ * Should typically not be modified.
1162
+ */
1163
+ externalSubsetSAXFunc externalSubset;
1164
+ /**
1165
+ * Legacy magic value
1166
+ *
1167
+ * `initialized` should always be set to XML_SAX2_MAGIC to
1168
+ * enable the modern SAX2 interface.
945
1169
  */
946
1170
  unsigned int initialized;
947
- /*
948
- * The following members are only used by the SAX2 interface.
1171
+ /**
1172
+ * Application data
949
1173
  */
950
1174
  void *_private;
1175
+ /**
1176
+ * Called after a start tag was parsed.
1177
+ */
951
1178
  startElementNsSAX2Func startElementNs;
1179
+ /**
1180
+ * Called after an end tag was parsed.
1181
+ */
952
1182
  endElementNsSAX2Func endElementNs;
953
- /*
1183
+ /**
1184
+ * Structured error handler.
1185
+ *
954
1186
  * Takes precedence over `error` or `warning`, but modern code
955
- * should use xmlCtxtSetErrorHandler.
1187
+ * should use xmlCtxtSetErrorHandler().
956
1188
  */
957
1189
  xmlStructuredErrorFunc serror;
958
1190
  };
959
1191
 
960
- /*
961
- * SAX Version 1
1192
+ /**
1193
+ * SAX handler, version 1.
1194
+ *
1195
+ * @deprecated Use version 2 handlers.
962
1196
  */
963
1197
  typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1;
964
1198
  typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr;
1199
+ /**
1200
+ * SAX handler, version 1.
1201
+ *
1202
+ * @deprecated Use version 2 handlers.
1203
+ */
965
1204
  struct _xmlSAXHandlerV1 {
966
1205
  internalSubsetSAXFunc internalSubset;
967
1206
  isStandaloneSAXFunc isStandalone;
@@ -995,18 +1234,19 @@ struct _xmlSAXHandlerV1 {
995
1234
 
996
1235
 
997
1236
  /**
998
- * xmlExternalEntityLoader:
999
- * @URL: The System ID of the resource requested
1000
- * @ID: The Public ID of the resource requested
1001
- * @context: the XML parser context
1237
+ * Callback for external entity loader.
1002
1238
  *
1003
- * External entity loaders types.
1239
+ * The URL is not resolved using XML catalogs before being passed
1240
+ * to the callback.
1004
1241
  *
1005
- * Returns the entity input parser.
1242
+ * @param URL The URL or system ID of the resource requested
1243
+ * @param publicId The public ID of the resource requested (optional)
1244
+ * @param context the XML parser context
1245
+ * @returns the entity input parser or NULL on error.
1006
1246
  */
1007
- typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
1008
- const char *ID,
1009
- xmlParserCtxtPtr context);
1247
+ typedef xmlParserInput *(*xmlExternalEntityLoader) (const char *URL,
1248
+ const char *publicId,
1249
+ xmlParserCtxt *context);
1010
1250
 
1011
1251
  /*
1012
1252
  * Variables
@@ -1014,10 +1254,14 @@ typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
1014
1254
 
1015
1255
  XMLPUBVAR const char *const xmlParserVersion;
1016
1256
 
1017
- /** DOC_DISABLE */
1257
+ /** @cond ignore */
1258
+
1018
1259
  XML_DEPRECATED
1019
1260
  XMLPUBVAR const xmlSAXLocator xmlDefaultSAXLocator;
1020
1261
  #ifdef LIBXML_SAX1_ENABLED
1262
+ /**
1263
+ * @deprecated Use #xmlSAXVersion or #xmlSAX2InitDefaultSAXHandler
1264
+ */
1021
1265
  XML_DEPRECATED
1022
1266
  XMLPUBVAR const xmlSAXHandlerV1 xmlDefaultSAXHandler;
1023
1267
  #endif
@@ -1038,31 +1282,96 @@ XML_DEPRECATED
1038
1282
  XMLPUBFUN int *__xmlSubstituteEntitiesDefaultValue(void);
1039
1283
 
1040
1284
  #ifdef LIBXML_OUTPUT_ENABLED
1285
+ XML_DEPRECATED
1041
1286
  XMLPUBFUN int *__xmlIndentTreeOutput(void);
1287
+ XML_DEPRECATED
1042
1288
  XMLPUBFUN const char **__xmlTreeIndentString(void);
1289
+ XML_DEPRECATED
1043
1290
  XMLPUBFUN int *__xmlSaveNoEmptyTags(void);
1044
1291
  #endif
1045
1292
 
1293
+ /** @endcond */
1294
+
1046
1295
  #ifndef XML_GLOBALS_NO_REDEFINITION
1296
+ /**
1297
+ * Thread-local setting to enable validation. Defaults to 0.
1298
+ *
1299
+ * @deprecated Use the parser option XML_PARSE_DTDVALID.
1300
+ */
1047
1301
  #define xmlDoValidityCheckingDefaultValue \
1048
1302
  (*__xmlDoValidityCheckingDefaultValue())
1303
+ /**
1304
+ * Thread-local setting to disable warnings. Defaults to 1.
1305
+ *
1306
+ * @deprecated Use the parser option XML_PARSE_NOWARNING.
1307
+ */
1049
1308
  #define xmlGetWarningsDefaultValue \
1050
1309
  (*__xmlGetWarningsDefaultValue())
1310
+ /**
1311
+ * Thread-local setting to ignore some whitespace. Defaults
1312
+ * to 1.
1313
+ *
1314
+ * @deprecated Use the parser option XML_PARSE_NOBLANKS.
1315
+ */
1051
1316
  #define xmlKeepBlanksDefaultValue (*__xmlKeepBlanksDefaultValue())
1317
+ /**
1318
+ * Thread-local setting to store line numbers. Defaults
1319
+ * to 0, but is always enabled after setting parser options.
1320
+ *
1321
+ * @deprecated Shouldn't be needed when using parser options.
1322
+ */
1052
1323
  #define xmlLineNumbersDefaultValue \
1053
1324
  (*__xmlLineNumbersDefaultValue())
1325
+ /**
1326
+ * Thread-local setting to enable loading of external DTDs.
1327
+ * Defaults to 0.
1328
+ *
1329
+ * @deprecated Use the parser option XML_PARSE_DTDLOAD.
1330
+ */
1054
1331
  #define xmlLoadExtDtdDefaultValue (*__xmlLoadExtDtdDefaultValue())
1332
+ /**
1333
+ * Thread-local setting to enable pedantic warnings.
1334
+ * Defaults to 0.
1335
+ *
1336
+ * @deprecated Use the parser option XML_PARSE_PEDANTIC.
1337
+ */
1055
1338
  #define xmlPedanticParserDefaultValue \
1056
1339
  (*__xmlPedanticParserDefaultValue())
1340
+ /**
1341
+ * Thread-local setting to enable entity substitution.
1342
+ * Defaults to 0.
1343
+ *
1344
+ * @deprecated Use the parser option XML_PARSE_NOENT.
1345
+ */
1057
1346
  #define xmlSubstituteEntitiesDefaultValue \
1058
1347
  (*__xmlSubstituteEntitiesDefaultValue())
1059
1348
  #ifdef LIBXML_OUTPUT_ENABLED
1349
+ /**
1350
+ * Thread-local setting to disable indenting when
1351
+ * formatting output. Defaults to 1.
1352
+ *
1353
+ * @deprecated Use the xmlsave.h API with option
1354
+ * XML_SAVE_NO_INDENT.
1355
+ */
1060
1356
  #define xmlIndentTreeOutput (*__xmlIndentTreeOutput())
1357
+ /**
1358
+ * Thread-local setting to change the indent string.
1359
+ * Defaults to two spaces.
1360
+ *
1361
+ * @deprecated Use the xmlsave.h API and
1362
+ * xmlSaveSetIndentString().
1363
+ */
1061
1364
  #define xmlTreeIndentString (*__xmlTreeIndentString())
1365
+ /**
1366
+ * Thread-local setting to disable empty tags when
1367
+ * serializing. Defaults to 0.
1368
+ *
1369
+ * @deprecated Use the xmlsave.h API with option
1370
+ * XML_SAVE_NO_EMPTY.
1371
+ */
1062
1372
  #define xmlSaveNoEmptyTags (*__xmlSaveNoEmptyTags())
1063
1373
  #endif
1064
1374
  #endif
1065
- /** DOC_ENABLE */
1066
1375
 
1067
1376
  /*
1068
1377
  * Init/Cleanup
@@ -1083,46 +1392,47 @@ XMLPUBFUN void
1083
1392
  */
1084
1393
  XML_DEPRECATED
1085
1394
  XMLPUBFUN int
1086
- xmlParserInputRead (xmlParserInputPtr in,
1395
+ xmlParserInputRead (xmlParserInput *in,
1087
1396
  int len);
1088
1397
  XMLPUBFUN int
1089
- xmlParserInputGrow (xmlParserInputPtr in,
1398
+ xmlParserInputGrow (xmlParserInput *in,
1090
1399
  int len);
1091
1400
 
1092
1401
  /*
1093
1402
  * Basic parsing Interfaces
1094
1403
  */
1095
1404
  #ifdef LIBXML_SAX1_ENABLED
1096
- XMLPUBFUN xmlDocPtr
1405
+ XMLPUBFUN xmlDoc *
1097
1406
  xmlParseDoc (const xmlChar *cur);
1098
- XMLPUBFUN xmlDocPtr
1407
+ XMLPUBFUN xmlDoc *
1099
1408
  xmlParseFile (const char *filename);
1100
- XMLPUBFUN xmlDocPtr
1409
+ XMLPUBFUN xmlDoc *
1101
1410
  xmlParseMemory (const char *buffer,
1102
1411
  int size);
1103
1412
  #endif /* LIBXML_SAX1_ENABLED */
1104
1413
  XML_DEPRECATED
1105
1414
  XMLPUBFUN int
1106
1415
  xmlSubstituteEntitiesDefault(int val);
1107
- XML_DEPRECATED
1108
- XMLPUBFUN int
1109
- xmlThrDefSubstituteEntitiesDefaultValue(int v);
1110
1416
  XMLPUBFUN int
1111
1417
  xmlKeepBlanksDefault (int val);
1112
- XML_DEPRECATED
1113
- XMLPUBFUN int
1114
- xmlThrDefKeepBlanksDefaultValue(int v);
1115
1418
  XMLPUBFUN void
1116
- xmlStopParser (xmlParserCtxtPtr ctxt);
1419
+ xmlStopParser (xmlParserCtxt *ctxt);
1117
1420
  XML_DEPRECATED
1118
1421
  XMLPUBFUN int
1119
1422
  xmlPedanticParserDefault(int val);
1120
1423
  XML_DEPRECATED
1121
1424
  XMLPUBFUN int
1122
- xmlThrDefPedanticParserDefaultValue(int v);
1425
+ xmlLineNumbersDefault (int val);
1426
+
1123
1427
  XML_DEPRECATED
1124
1428
  XMLPUBFUN int
1125
- xmlLineNumbersDefault (int val);
1429
+ xmlThrDefSubstituteEntitiesDefaultValue(int v);
1430
+ XML_DEPRECATED
1431
+ XMLPUBFUN int
1432
+ xmlThrDefKeepBlanksDefaultValue(int v);
1433
+ XML_DEPRECATED
1434
+ XMLPUBFUN int
1435
+ xmlThrDefPedanticParserDefaultValue(int v);
1126
1436
  XML_DEPRECATED
1127
1437
  XMLPUBFUN int
1128
1438
  xmlThrDefLineNumbersDefaultValue(int v);
@@ -1141,14 +1451,14 @@ XMLPUBFUN int
1141
1451
  * Recovery mode
1142
1452
  */
1143
1453
  XML_DEPRECATED
1144
- XMLPUBFUN xmlDocPtr
1454
+ XMLPUBFUN xmlDoc *
1145
1455
  xmlRecoverDoc (const xmlChar *cur);
1146
1456
  XML_DEPRECATED
1147
- XMLPUBFUN xmlDocPtr
1457
+ XMLPUBFUN xmlDoc *
1148
1458
  xmlRecoverMemory (const char *buffer,
1149
1459
  int size);
1150
1460
  XML_DEPRECATED
1151
- XMLPUBFUN xmlDocPtr
1461
+ XMLPUBFUN xmlDoc *
1152
1462
  xmlRecoverFile (const char *filename);
1153
1463
  #endif /* LIBXML_SAX1_ENABLED */
1154
1464
 
@@ -1156,162 +1466,163 @@ XMLPUBFUN xmlDocPtr
1156
1466
  * Less common routines and SAX interfaces
1157
1467
  */
1158
1468
  XMLPUBFUN int
1159
- xmlParseDocument (xmlParserCtxtPtr ctxt);
1469
+ xmlParseDocument (xmlParserCtxt *ctxt);
1160
1470
  XML_DEPRECATED
1161
1471
  XMLPUBFUN int
1162
- xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
1472
+ xmlParseExtParsedEnt (xmlParserCtxt *ctxt);
1163
1473
  #ifdef LIBXML_SAX1_ENABLED
1164
1474
  XML_DEPRECATED
1165
1475
  XMLPUBFUN int
1166
- xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
1476
+ xmlSAXUserParseFile (xmlSAXHandler *sax,
1167
1477
  void *user_data,
1168
1478
  const char *filename);
1169
1479
  XML_DEPRECATED
1170
1480
  XMLPUBFUN int
1171
- xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
1481
+ xmlSAXUserParseMemory (xmlSAXHandler *sax,
1172
1482
  void *user_data,
1173
1483
  const char *buffer,
1174
1484
  int size);
1175
1485
  XML_DEPRECATED
1176
- XMLPUBFUN xmlDocPtr
1177
- xmlSAXParseDoc (xmlSAXHandlerPtr sax,
1486
+ XMLPUBFUN xmlDoc *
1487
+ xmlSAXParseDoc (xmlSAXHandler *sax,
1178
1488
  const xmlChar *cur,
1179
1489
  int recovery);
1180
1490
  XML_DEPRECATED
1181
- XMLPUBFUN xmlDocPtr
1182
- xmlSAXParseMemory (xmlSAXHandlerPtr sax,
1491
+ XMLPUBFUN xmlDoc *
1492
+ xmlSAXParseMemory (xmlSAXHandler *sax,
1183
1493
  const char *buffer,
1184
1494
  int size,
1185
1495
  int recovery);
1186
1496
  XML_DEPRECATED
1187
- XMLPUBFUN xmlDocPtr
1188
- xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
1497
+ XMLPUBFUN xmlDoc *
1498
+ xmlSAXParseMemoryWithData (xmlSAXHandler *sax,
1189
1499
  const char *buffer,
1190
1500
  int size,
1191
1501
  int recovery,
1192
1502
  void *data);
1193
1503
  XML_DEPRECATED
1194
- XMLPUBFUN xmlDocPtr
1195
- xmlSAXParseFile (xmlSAXHandlerPtr sax,
1504
+ XMLPUBFUN xmlDoc *
1505
+ xmlSAXParseFile (xmlSAXHandler *sax,
1196
1506
  const char *filename,
1197
1507
  int recovery);
1198
1508
  XML_DEPRECATED
1199
- XMLPUBFUN xmlDocPtr
1200
- xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
1509
+ XMLPUBFUN xmlDoc *
1510
+ xmlSAXParseFileWithData (xmlSAXHandler *sax,
1201
1511
  const char *filename,
1202
1512
  int recovery,
1203
1513
  void *data);
1204
1514
  XML_DEPRECATED
1205
- XMLPUBFUN xmlDocPtr
1206
- xmlSAXParseEntity (xmlSAXHandlerPtr sax,
1515
+ XMLPUBFUN xmlDoc *
1516
+ xmlSAXParseEntity (xmlSAXHandler *sax,
1207
1517
  const char *filename);
1208
1518
  XML_DEPRECATED
1209
- XMLPUBFUN xmlDocPtr
1519
+ XMLPUBFUN xmlDoc *
1210
1520
  xmlParseEntity (const char *filename);
1211
1521
  #endif /* LIBXML_SAX1_ENABLED */
1212
1522
 
1213
1523
  #ifdef LIBXML_VALID_ENABLED
1214
- XMLPUBFUN xmlDtdPtr
1215
- xmlCtxtParseDtd (xmlParserCtxtPtr ctxt,
1216
- xmlParserInputPtr input,
1217
- const xmlChar *ExternalID,
1218
- const xmlChar *SystemID);
1524
+ XMLPUBFUN xmlDtd *
1525
+ xmlCtxtParseDtd (xmlParserCtxt *ctxt,
1526
+ xmlParserInput *input,
1527
+ const xmlChar *publicId,
1528
+ const xmlChar *systemId);
1219
1529
  XMLPUBFUN int
1220
- xmlCtxtValidateDocument (xmlParserCtxtPtr ctxt,
1221
- xmlDocPtr doc);
1530
+ xmlCtxtValidateDocument (xmlParserCtxt *ctxt,
1531
+ xmlDoc *doc);
1222
1532
  XMLPUBFUN int
1223
- xmlCtxtValidateDtd (xmlParserCtxtPtr ctxt,
1224
- xmlDocPtr doc,
1225
- xmlDtdPtr dtd);
1533
+ xmlCtxtValidateDtd (xmlParserCtxt *ctxt,
1534
+ xmlDoc *doc,
1535
+ xmlDtd *dtd);
1226
1536
  XML_DEPRECATED
1227
- XMLPUBFUN xmlDtdPtr
1228
- xmlSAXParseDTD (xmlSAXHandlerPtr sax,
1229
- const xmlChar *ExternalID,
1230
- const xmlChar *SystemID);
1231
- XMLPUBFUN xmlDtdPtr
1232
- xmlParseDTD (const xmlChar *ExternalID,
1233
- const xmlChar *SystemID);
1234
- XMLPUBFUN xmlDtdPtr
1235
- xmlIOParseDTD (xmlSAXHandlerPtr sax,
1236
- xmlParserInputBufferPtr input,
1537
+ XMLPUBFUN xmlDtd *
1538
+ xmlSAXParseDTD (xmlSAXHandler *sax,
1539
+ const xmlChar *publicId,
1540
+ const xmlChar *systemId);
1541
+ XMLPUBFUN xmlDtd *
1542
+ xmlParseDTD (const xmlChar *publicId,
1543
+ const xmlChar *systemId);
1544
+ XMLPUBFUN xmlDtd *
1545
+ xmlIOParseDTD (xmlSAXHandler *sax,
1546
+ xmlParserInputBuffer *input,
1237
1547
  xmlCharEncoding enc);
1238
1548
  #endif /* LIBXML_VALID_ENABLE */
1239
1549
  #ifdef LIBXML_SAX1_ENABLED
1240
1550
  XMLPUBFUN int
1241
- xmlParseBalancedChunkMemory(xmlDocPtr doc,
1242
- xmlSAXHandlerPtr sax,
1551
+ xmlParseBalancedChunkMemory(xmlDoc *doc,
1552
+ xmlSAXHandler *sax,
1243
1553
  void *user_data,
1244
1554
  int depth,
1245
1555
  const xmlChar *string,
1246
- xmlNodePtr *lst);
1556
+ xmlNode **lst);
1247
1557
  #endif /* LIBXML_SAX1_ENABLED */
1248
1558
  XMLPUBFUN xmlParserErrors
1249
- xmlParseInNodeContext (xmlNodePtr node,
1559
+ xmlParseInNodeContext (xmlNode *node,
1250
1560
  const char *data,
1251
1561
  int datalen,
1252
1562
  int options,
1253
- xmlNodePtr *lst);
1563
+ xmlNode **lst);
1254
1564
  #ifdef LIBXML_SAX1_ENABLED
1255
1565
  XMLPUBFUN int
1256
- xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
1257
- xmlSAXHandlerPtr sax,
1566
+ xmlParseBalancedChunkMemoryRecover(xmlDoc *doc,
1567
+ xmlSAXHandler *sax,
1258
1568
  void *user_data,
1259
1569
  int depth,
1260
1570
  const xmlChar *string,
1261
- xmlNodePtr *lst,
1571
+ xmlNode **lst,
1262
1572
  int recover);
1263
1573
  XML_DEPRECATED
1264
1574
  XMLPUBFUN int
1265
- xmlParseExternalEntity (xmlDocPtr doc,
1266
- xmlSAXHandlerPtr sax,
1575
+ xmlParseExternalEntity (xmlDoc *doc,
1576
+ xmlSAXHandler *sax,
1267
1577
  void *user_data,
1268
1578
  int depth,
1269
1579
  const xmlChar *URL,
1270
1580
  const xmlChar *ID,
1271
- xmlNodePtr *lst);
1581
+ xmlNode **lst);
1272
1582
  #endif /* LIBXML_SAX1_ENABLED */
1273
1583
  XMLPUBFUN int
1274
- xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
1584
+ xmlParseCtxtExternalEntity(xmlParserCtxt *ctx,
1275
1585
  const xmlChar *URL,
1276
1586
  const xmlChar *ID,
1277
- xmlNodePtr *lst);
1587
+ xmlNode **lst);
1278
1588
 
1279
1589
  /*
1280
1590
  * Parser contexts handling.
1281
1591
  */
1282
- XMLPUBFUN xmlParserCtxtPtr
1592
+ XMLPUBFUN xmlParserCtxt *
1283
1593
  xmlNewParserCtxt (void);
1284
- XMLPUBFUN xmlParserCtxtPtr
1594
+ XMLPUBFUN xmlParserCtxt *
1285
1595
  xmlNewSAXParserCtxt (const xmlSAXHandler *sax,
1286
1596
  void *userData);
1287
1597
  XMLPUBFUN int
1288
- xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
1598
+ xmlInitParserCtxt (xmlParserCtxt *ctxt);
1599
+ XML_DEPRECATED
1289
1600
  XMLPUBFUN void
1290
- xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
1601
+ xmlClearParserCtxt (xmlParserCtxt *ctxt);
1291
1602
  XMLPUBFUN void
1292
- xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
1603
+ xmlFreeParserCtxt (xmlParserCtxt *ctxt);
1293
1604
  #ifdef LIBXML_SAX1_ENABLED
1294
1605
  XML_DEPRECATED
1295
1606
  XMLPUBFUN void
1296
- xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
1607
+ xmlSetupParserForBuffer (xmlParserCtxt *ctxt,
1297
1608
  const xmlChar* buffer,
1298
1609
  const char *filename);
1299
1610
  #endif /* LIBXML_SAX1_ENABLED */
1300
- XMLPUBFUN xmlParserCtxtPtr
1611
+ XMLPUBFUN xmlParserCtxt *
1301
1612
  xmlCreateDocParserCtxt (const xmlChar *cur);
1302
1613
 
1303
1614
  #ifdef LIBXML_PUSH_ENABLED
1304
1615
  /*
1305
1616
  * Interfaces for the Push mode.
1306
1617
  */
1307
- XMLPUBFUN xmlParserCtxtPtr
1308
- xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
1618
+ XMLPUBFUN xmlParserCtxt *
1619
+ xmlCreatePushParserCtxt(xmlSAXHandler *sax,
1309
1620
  void *user_data,
1310
1621
  const char *chunk,
1311
1622
  int size,
1312
1623
  const char *filename);
1313
1624
  XMLPUBFUN int
1314
- xmlParseChunk (xmlParserCtxtPtr ctxt,
1625
+ xmlParseChunk (xmlParserCtxt *ctxt,
1315
1626
  const char *chunk,
1316
1627
  int size,
1317
1628
  int terminate);
@@ -1321,17 +1632,17 @@ XMLPUBFUN int
1321
1632
  * Special I/O mode.
1322
1633
  */
1323
1634
 
1324
- XMLPUBFUN xmlParserCtxtPtr
1325
- xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
1635
+ XMLPUBFUN xmlParserCtxt *
1636
+ xmlCreateIOParserCtxt (xmlSAXHandler *sax,
1326
1637
  void *user_data,
1327
1638
  xmlInputReadCallback ioread,
1328
1639
  xmlInputCloseCallback ioclose,
1329
1640
  void *ioctx,
1330
1641
  xmlCharEncoding enc);
1331
1642
 
1332
- XMLPUBFUN xmlParserInputPtr
1333
- xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
1334
- xmlParserInputBufferPtr input,
1643
+ XMLPUBFUN xmlParserInput *
1644
+ xmlNewIOInputStream (xmlParserCtxt *ctxt,
1645
+ xmlParserInputBuffer *input,
1335
1646
  xmlCharEncoding enc);
1336
1647
 
1337
1648
  /*
@@ -1339,22 +1650,22 @@ XMLPUBFUN xmlParserInputPtr
1339
1650
  */
1340
1651
  XML_DEPRECATED
1341
1652
  XMLPUBFUN const xmlParserNodeInfo*
1342
- xmlParserFindNodeInfo (xmlParserCtxtPtr ctxt,
1343
- xmlNodePtr node);
1653
+ xmlParserFindNodeInfo (xmlParserCtxt *ctxt,
1654
+ xmlNode *node);
1344
1655
  XML_DEPRECATED
1345
1656
  XMLPUBFUN void
1346
- xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
1657
+ xmlInitNodeInfoSeq (xmlParserNodeInfoSeq *seq);
1347
1658
  XML_DEPRECATED
1348
1659
  XMLPUBFUN void
1349
- xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
1660
+ xmlClearNodeInfoSeq (xmlParserNodeInfoSeq *seq);
1350
1661
  XML_DEPRECATED
1351
1662
  XMLPUBFUN unsigned long
1352
- xmlParserFindNodeInfoIndex(xmlParserNodeInfoSeqPtr seq,
1353
- xmlNodePtr node);
1663
+ xmlParserFindNodeInfoIndex(xmlParserNodeInfoSeq *seq,
1664
+ xmlNode *node);
1354
1665
  XML_DEPRECATED
1355
1666
  XMLPUBFUN void
1356
- xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
1357
- xmlParserNodeInfoPtr info);
1667
+ xmlParserAddNodeInfo (xmlParserCtxt *ctxt,
1668
+ xmlParserNodeInfo *info);
1358
1669
 
1359
1670
  /*
1360
1671
  * External entities handling actually implemented in xmlIO.
@@ -1364,188 +1675,372 @@ XMLPUBFUN void
1364
1675
  xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
1365
1676
  XMLPUBFUN xmlExternalEntityLoader
1366
1677
  xmlGetExternalEntityLoader(void);
1367
- XMLPUBFUN xmlParserInputPtr
1678
+ XMLPUBFUN xmlParserInput *
1368
1679
  xmlLoadExternalEntity (const char *URL,
1369
1680
  const char *ID,
1370
- xmlParserCtxtPtr ctxt);
1681
+ xmlParserCtxt *ctxt);
1371
1682
 
1372
1683
  XML_DEPRECATED
1373
1684
  XMLPUBFUN long
1374
- xmlByteConsumed (xmlParserCtxtPtr ctxt);
1685
+ xmlByteConsumed (xmlParserCtxt *ctxt);
1375
1686
 
1376
1687
  /*
1377
1688
  * New set of simpler/more flexible APIs
1378
1689
  */
1690
+
1379
1691
  /**
1380
- * xmlParserOption:
1381
- *
1382
- * This is the set of XML parser options that can be passed down
1383
- * to the xmlReadDoc() and similar calls.
1692
+ * This is the set of XML parser options that can be passed to
1693
+ * #xmlReadDoc, #xmlCtxtSetOptions and other functions.
1384
1694
  */
1385
1695
  typedef enum {
1386
- XML_PARSE_RECOVER = 1<<0, /* recover on errors */
1387
- XML_PARSE_NOENT = 1<<1, /* substitute entities */
1388
- XML_PARSE_DTDLOAD = 1<<2, /* load the external subset */
1389
- XML_PARSE_DTDATTR = 1<<3, /* default DTD attributes */
1390
- XML_PARSE_DTDVALID = 1<<4, /* validate with the DTD */
1391
- XML_PARSE_NOERROR = 1<<5, /* suppress error reports */
1392
- XML_PARSE_NOWARNING = 1<<6, /* suppress warning reports */
1393
- XML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
1394
- XML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
1395
- XML_PARSE_SAX1 = 1<<9, /* use the SAX1 interface internally */
1396
- XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitution */
1397
- XML_PARSE_NONET = 1<<11,/* Forbid network access */
1398
- XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionary */
1399
- XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */
1400
- XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */
1401
- XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */
1402
- XML_PARSE_COMPACT = 1<<16,/* compact small text nodes; no modification of
1403
- the tree allowed afterwards (will possibly
1404
- crash if you try to modify the tree) */
1405
- XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */
1406
- XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */
1407
- XML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */
1408
- XML_PARSE_OLDSAX = 1<<20,/* parse using SAX2 interface before 2.7.0 */
1409
- XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */
1410
- XML_PARSE_BIG_LINES = 1<<22,/* Store big lines numbers in text PSVI field */
1411
- /* since 2.13.0 */
1412
- XML_PARSE_NO_XXE = 1<<23,/* disable loading of external content */
1413
- /* since 2.14.0 */
1414
- XML_PARSE_UNZIP = 1<<24,/* allow compressed content */
1415
- XML_PARSE_NO_SYS_CATALOG = 1<<25,/* disable global system catalog */
1416
- XML_PARSE_CATALOG_PI = 1<<26 /* allow catalog PIs */
1696
+ /**
1697
+ * Enable "recovery" mode which allows non-wellformed documents.
1698
+ * How this mode behaves exactly is unspecified and may change
1699
+ * without further notice. Use of this feature is DISCOURAGED.
1700
+ *
1701
+ * Not supported by the push parser.
1702
+ */
1703
+ XML_PARSE_RECOVER = 1<<0,
1704
+ /**
1705
+ * Despite the confusing name, this option enables substitution
1706
+ * of entities. The resulting tree won't contain any entity
1707
+ * reference nodes.
1708
+ *
1709
+ * This option also enables loading of external entities (both
1710
+ * general and parameter entities) which is dangerous. If you
1711
+ * process untrusted data, it's recommended to set the
1712
+ * XML_PARSE_NO_XXE option to disable loading of external
1713
+ * entities.
1714
+ */
1715
+ XML_PARSE_NOENT = 1<<1,
1716
+ /**
1717
+ * Enables loading of an external DTD and the loading and
1718
+ * substitution of external parameter entities. Has no effect
1719
+ * if XML_PARSE_NO_XXE is set.
1720
+ */
1721
+ XML_PARSE_DTDLOAD = 1<<2,
1722
+ /**
1723
+ * Adds default attributes from the DTD to the result document.
1724
+ *
1725
+ * Implies XML_PARSE_DTDLOAD, but loading of external content
1726
+ * can be disabled with XML_PARSE_NO_XXE.
1727
+ */
1728
+ XML_PARSE_DTDATTR = 1<<3,
1729
+ /**
1730
+ * This option enables DTD validation which requires to load
1731
+ * external DTDs and external entities (both general and
1732
+ * parameter entities) unless XML_PARSE_NO_XXE was set.
1733
+ *
1734
+ * DTD validation is vulnerable to algorithmic complexity
1735
+ * attacks and should never be enabled with untrusted input.
1736
+ */
1737
+ XML_PARSE_DTDVALID = 1<<4,
1738
+ /**
1739
+ * Disable error and warning reports to the error handlers.
1740
+ * Errors are still accessible with xmlCtxtGetLastError().
1741
+ */
1742
+ XML_PARSE_NOERROR = 1<<5,
1743
+ /**
1744
+ * Disable warning reports.
1745
+ */
1746
+ XML_PARSE_NOWARNING = 1<<6,
1747
+ /**
1748
+ * Enable some pedantic warnings.
1749
+ */
1750
+ XML_PARSE_PEDANTIC = 1<<7,
1751
+ /**
1752
+ * Remove some whitespace from the result document. Where to
1753
+ * remove whitespace depends on DTD element declarations or a
1754
+ * broken heuristic with unfixable bugs. Use of this option is
1755
+ * DISCOURAGED.
1756
+ *
1757
+ * Not supported by the push parser.
1758
+ */
1759
+ XML_PARSE_NOBLANKS = 1<<8,
1760
+ /**
1761
+ * Always invoke the deprecated SAX1 startElement and endElement
1762
+ * handlers.
1763
+ *
1764
+ * @deprecated This option will be removed in a future version.
1765
+ */
1766
+ XML_PARSE_SAX1 = 1<<9,
1767
+ /**
1768
+ * Enable XInclude processing. This option only affects the
1769
+ * xmlTextReader and XInclude interfaces.
1770
+ */
1771
+ XML_PARSE_XINCLUDE = 1<<10,
1772
+ /**
1773
+ * Disable network access with the built-in HTTP or FTP clients.
1774
+ *
1775
+ * After the last built-in network client was removed in 2.15,
1776
+ * this option has no effect expect for being passed on to custom
1777
+ * resource loaders.
1778
+ */
1779
+ XML_PARSE_NONET = 1<<11,
1780
+ /**
1781
+ * Create a document without interned strings, making all
1782
+ * strings separate memory allocations.
1783
+ */
1784
+ XML_PARSE_NODICT = 1<<12,
1785
+ /**
1786
+ * Remove redundant namespace declarations from the result
1787
+ * document.
1788
+ */
1789
+ XML_PARSE_NSCLEAN = 1<<13,
1790
+ /**
1791
+ * Output normal text nodes instead of CDATA nodes.
1792
+ */
1793
+ XML_PARSE_NOCDATA = 1<<14,
1794
+ /**
1795
+ * Don't generate XInclude start/end nodes when expanding
1796
+ * inclusions. This option only affects the xmlTextReader
1797
+ * and XInclude interfaces.
1798
+ */
1799
+ XML_PARSE_NOXINCNODE = 1<<15,
1800
+ /**
1801
+ * Store small strings directly in the node struct to save
1802
+ * memory.
1803
+ */
1804
+ XML_PARSE_COMPACT = 1<<16,
1805
+ /**
1806
+ * Use old Name productions from before XML 1.0 Fifth Edition.
1807
+ *
1808
+ * @deprecated This option will be removed in a future version.
1809
+ */
1810
+ XML_PARSE_OLD10 = 1<<17,
1811
+ /**
1812
+ * Don't fix up XInclude xml:base URIs. This option only affects
1813
+ * the xmlTextReader and XInclude interfaces.
1814
+ */
1815
+ XML_PARSE_NOBASEFIX = 1<<18,
1816
+ /**
1817
+ * Relax some internal limits.
1818
+ *
1819
+ * Maximum size of text nodes, tags, comments, processing instructions,
1820
+ * CDATA sections, entity values
1821
+ *
1822
+ * normal: 10M
1823
+ * huge: 1B
1824
+ *
1825
+ * Maximum size of names, system literals, pubid literals
1826
+ *
1827
+ * normal: 50K
1828
+ * huge: 10M
1829
+ *
1830
+ * Maximum nesting depth of elements
1831
+ *
1832
+ * normal: 256
1833
+ * huge: 2048
1834
+ *
1835
+ * Maximum nesting depth of entities
1836
+ *
1837
+ * normal: 20
1838
+ * huge: 40
1839
+ */
1840
+ XML_PARSE_HUGE = 1<<19,
1841
+ /**
1842
+ * Enable an unspecified legacy mode for SAX parsers.
1843
+ *
1844
+ * @deprecated This option will be removed in a future version.
1845
+ */
1846
+ XML_PARSE_OLDSAX = 1<<20,
1847
+ /**
1848
+ * Ignore the encoding in the XML declaration. This option is
1849
+ * mostly unneeded these days. The only effect is to enforce
1850
+ * UTF-8 decoding of ASCII-like data.
1851
+ */
1852
+ XML_PARSE_IGNORE_ENC = 1<<21,
1853
+ /**
1854
+ * Enable reporting of line numbers larger than 65535.
1855
+ */
1856
+ XML_PARSE_BIG_LINES = 1<<22,
1857
+ /**
1858
+ * Disables loading of external DTDs or entities.
1859
+ *
1860
+ * @since 2.13.0
1861
+ */
1862
+ XML_PARSE_NO_XXE = 1<<23,
1863
+ /**
1864
+ * Enable input decompression. Setting this option is discouraged
1865
+ * to avoid zip bombs.
1866
+ *
1867
+ * @since 2.14.0
1868
+ */
1869
+ XML_PARSE_UNZIP = 1<<24,
1870
+ /**
1871
+ * Disables the global system XML catalog.
1872
+ *
1873
+ * @since 2.14.0
1874
+ */
1875
+ XML_PARSE_NO_SYS_CATALOG = 1<<25,
1876
+ /**
1877
+ * Enable XML catalog processing instructions.
1878
+ *
1879
+ * @since 2.14.0
1880
+ */
1881
+ XML_PARSE_CATALOG_PI = 1<<26,
1882
+ /**
1883
+ * Force the parser to ignore IDs.
1884
+ *
1885
+ * @since 2.15.0
1886
+ */
1887
+ XML_PARSE_SKIP_IDS = 1<<27
1417
1888
  } xmlParserOption;
1418
1889
 
1419
1890
  XMLPUBFUN void
1420
- xmlCtxtReset (xmlParserCtxtPtr ctxt);
1891
+ xmlCtxtReset (xmlParserCtxt *ctxt);
1421
1892
  XMLPUBFUN int
1422
- xmlCtxtResetPush (xmlParserCtxtPtr ctxt,
1893
+ xmlCtxtResetPush (xmlParserCtxt *ctxt,
1423
1894
  const char *chunk,
1424
1895
  int size,
1425
1896
  const char *filename,
1426
1897
  const char *encoding);
1427
1898
  XMLPUBFUN int
1428
- xmlCtxtGetOptions (xmlParserCtxtPtr ctxt);
1899
+ xmlCtxtGetOptions (xmlParserCtxt *ctxt);
1429
1900
  XMLPUBFUN int
1430
- xmlCtxtSetOptions (xmlParserCtxtPtr ctxt,
1901
+ xmlCtxtSetOptions (xmlParserCtxt *ctxt,
1431
1902
  int options);
1432
1903
  XMLPUBFUN int
1433
- xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
1904
+ xmlCtxtUseOptions (xmlParserCtxt *ctxt,
1434
1905
  int options);
1435
1906
  XMLPUBFUN void *
1436
- xmlCtxtGetPrivate (xmlParserCtxtPtr ctxt);
1907
+ xmlCtxtGetPrivate (xmlParserCtxt *ctxt);
1437
1908
  XMLPUBFUN void
1438
- xmlCtxtSetPrivate (xmlParserCtxtPtr ctxt,
1909
+ xmlCtxtSetPrivate (xmlParserCtxt *ctxt,
1439
1910
  void *priv);
1440
1911
  XMLPUBFUN void *
1441
- xmlCtxtGetCatalogs (xmlParserCtxtPtr ctxt);
1912
+ xmlCtxtGetCatalogs (xmlParserCtxt *ctxt);
1442
1913
  XMLPUBFUN void
1443
- xmlCtxtSetCatalogs (xmlParserCtxtPtr ctxt,
1914
+ xmlCtxtSetCatalogs (xmlParserCtxt *ctxt,
1444
1915
  void *catalogs);
1445
- XMLPUBFUN xmlDictPtr
1446
- xmlCtxtGetDict (xmlParserCtxtPtr ctxt);
1916
+ XMLPUBFUN xmlDict *
1917
+ xmlCtxtGetDict (xmlParserCtxt *ctxt);
1447
1918
  XMLPUBFUN void
1448
- xmlCtxtSetDict (xmlParserCtxtPtr ctxt,
1449
- xmlDictPtr);
1919
+ xmlCtxtSetDict (xmlParserCtxt *ctxt,
1920
+ xmlDict *);
1450
1921
  XMLPUBFUN xmlSAXHandler *
1451
- xmlCtxtGetSaxHandler (xmlParserCtxtPtr ctxt);
1922
+ xmlCtxtGetSaxHandler (xmlParserCtxt *ctxt);
1452
1923
  XMLPUBFUN int
1453
- xmlCtxtSetSaxHandler (xmlParserCtxtPtr ctxt,
1924
+ xmlCtxtSetSaxHandler (xmlParserCtxt *ctxt,
1454
1925
  const xmlSAXHandler *sax);
1455
- XMLPUBFUN xmlDocPtr
1456
- xmlCtxtGetDocument (xmlParserCtxtPtr ctxt);
1926
+ XMLPUBFUN xmlDoc *
1927
+ xmlCtxtGetDocument (xmlParserCtxt *ctxt);
1457
1928
  XMLPUBFUN int
1458
- xmlCtxtIsHtml (xmlParserCtxtPtr ctxt);
1929
+ xmlCtxtIsHtml (xmlParserCtxt *ctxt);
1459
1930
  XMLPUBFUN int
1460
- xmlCtxtIsStopped (xmlParserCtxtPtr ctxt);
1931
+ xmlCtxtIsStopped (xmlParserCtxt *ctxt);
1932
+ XMLPUBFUN int
1933
+ xmlCtxtIsInSubset (xmlParserCtxt *ctxt);
1461
1934
  #ifdef LIBXML_VALID_ENABLED
1462
- XMLPUBFUN xmlValidCtxtPtr
1463
- xmlCtxtGetValidCtxt (xmlParserCtxtPtr ctxt);
1935
+ XMLPUBFUN xmlValidCtxt *
1936
+ xmlCtxtGetValidCtxt (xmlParserCtxt *ctxt);
1464
1937
  #endif
1465
1938
  XMLPUBFUN const xmlChar *
1466
- xmlCtxtGetVersion (xmlParserCtxtPtr ctxt);
1939
+ xmlCtxtGetVersion (xmlParserCtxt *ctxt);
1467
1940
  XMLPUBFUN const xmlChar *
1468
- xmlCtxtGetDeclaredEncoding(xmlParserCtxtPtr ctxt);
1941
+ xmlCtxtGetDeclaredEncoding(xmlParserCtxt *ctxt);
1469
1942
  XMLPUBFUN int
1470
- xmlCtxtGetStandalone (xmlParserCtxtPtr ctxt);
1943
+ xmlCtxtGetStandalone (xmlParserCtxt *ctxt);
1471
1944
  XMLPUBFUN xmlParserStatus
1472
- xmlCtxtGetStatus (xmlParserCtxtPtr ctxt);
1945
+ xmlCtxtGetStatus (xmlParserCtxt *ctxt);
1946
+ XMLPUBFUN void *
1947
+ xmlCtxtGetUserData (xmlParserCtxt *ctxt);
1948
+ XMLPUBFUN xmlNode *
1949
+ xmlCtxtGetNode (xmlParserCtxt *ctxt);
1950
+ XMLPUBFUN int
1951
+ xmlCtxtGetDocTypeDecl (xmlParserCtxt *ctxt,
1952
+ const xmlChar **name,
1953
+ const xmlChar **systemId,
1954
+ const xmlChar **publicId);
1955
+ XMLPUBFUN int
1956
+ xmlCtxtGetInputPosition (xmlParserCtxt *ctxt,
1957
+ int inputIndex,
1958
+ const char **filname,
1959
+ int *line,
1960
+ int *col,
1961
+ unsigned long *bytePos);
1962
+ XMLPUBFUN int
1963
+ xmlCtxtGetInputWindow (xmlParserCtxt *ctxt,
1964
+ int inputIndex,
1965
+ const xmlChar **startOut,
1966
+ int *sizeInOut,
1967
+ int *offsetOut);
1473
1968
  XMLPUBFUN void
1474
- xmlCtxtSetErrorHandler (xmlParserCtxtPtr ctxt,
1969
+ xmlCtxtSetErrorHandler (xmlParserCtxt *ctxt,
1475
1970
  xmlStructuredErrorFunc handler,
1476
1971
  void *data);
1477
1972
  XMLPUBFUN void
1478
- xmlCtxtSetResourceLoader(xmlParserCtxtPtr ctxt,
1973
+ xmlCtxtSetResourceLoader(xmlParserCtxt *ctxt,
1479
1974
  xmlResourceLoader loader,
1480
1975
  void *vctxt);
1481
1976
  XMLPUBFUN void
1482
- xmlCtxtSetCharEncConvImpl(xmlParserCtxtPtr ctxt,
1977
+ xmlCtxtSetCharEncConvImpl(xmlParserCtxt *ctxt,
1483
1978
  xmlCharEncConvImpl impl,
1484
1979
  void *vctxt);
1485
1980
  XMLPUBFUN void
1486
- xmlCtxtSetMaxAmplification(xmlParserCtxtPtr ctxt,
1981
+ xmlCtxtSetMaxAmplification(xmlParserCtxt *ctxt,
1487
1982
  unsigned maxAmpl);
1488
- XMLPUBFUN xmlDocPtr
1983
+ XMLPUBFUN xmlDoc *
1489
1984
  xmlReadDoc (const xmlChar *cur,
1490
1985
  const char *URL,
1491
1986
  const char *encoding,
1492
1987
  int options);
1493
- XMLPUBFUN xmlDocPtr
1988
+ XMLPUBFUN xmlDoc *
1494
1989
  xmlReadFile (const char *URL,
1495
1990
  const char *encoding,
1496
1991
  int options);
1497
- XMLPUBFUN xmlDocPtr
1992
+ XMLPUBFUN xmlDoc *
1498
1993
  xmlReadMemory (const char *buffer,
1499
1994
  int size,
1500
1995
  const char *URL,
1501
1996
  const char *encoding,
1502
1997
  int options);
1503
- XMLPUBFUN xmlDocPtr
1998
+ XMLPUBFUN xmlDoc *
1504
1999
  xmlReadFd (int fd,
1505
2000
  const char *URL,
1506
2001
  const char *encoding,
1507
2002
  int options);
1508
- XMLPUBFUN xmlDocPtr
2003
+ XMLPUBFUN xmlDoc *
1509
2004
  xmlReadIO (xmlInputReadCallback ioread,
1510
2005
  xmlInputCloseCallback ioclose,
1511
2006
  void *ioctx,
1512
2007
  const char *URL,
1513
2008
  const char *encoding,
1514
2009
  int options);
1515
- XMLPUBFUN xmlDocPtr
1516
- xmlCtxtParseDocument (xmlParserCtxtPtr ctxt,
1517
- xmlParserInputPtr input);
1518
- XMLPUBFUN xmlNodePtr
1519
- xmlCtxtParseContent (xmlParserCtxtPtr ctxt,
1520
- xmlParserInputPtr input,
1521
- xmlNodePtr node,
2010
+ XMLPUBFUN xmlDoc *
2011
+ xmlCtxtParseDocument (xmlParserCtxt *ctxt,
2012
+ xmlParserInput *input);
2013
+ XMLPUBFUN xmlNode *
2014
+ xmlCtxtParseContent (xmlParserCtxt *ctxt,
2015
+ xmlParserInput *input,
2016
+ xmlNode *node,
1522
2017
  int hasTextDecl);
1523
- XMLPUBFUN xmlDocPtr
1524
- xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
2018
+ XMLPUBFUN xmlDoc *
2019
+ xmlCtxtReadDoc (xmlParserCtxt *ctxt,
1525
2020
  const xmlChar *cur,
1526
2021
  const char *URL,
1527
2022
  const char *encoding,
1528
2023
  int options);
1529
- XMLPUBFUN xmlDocPtr
1530
- xmlCtxtReadFile (xmlParserCtxtPtr ctxt,
2024
+ XMLPUBFUN xmlDoc *
2025
+ xmlCtxtReadFile (xmlParserCtxt *ctxt,
1531
2026
  const char *filename,
1532
2027
  const char *encoding,
1533
2028
  int options);
1534
- XMLPUBFUN xmlDocPtr
1535
- xmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
2029
+ XMLPUBFUN xmlDoc *
2030
+ xmlCtxtReadMemory (xmlParserCtxt *ctxt,
1536
2031
  const char *buffer,
1537
2032
  int size,
1538
2033
  const char *URL,
1539
2034
  const char *encoding,
1540
2035
  int options);
1541
- XMLPUBFUN xmlDocPtr
1542
- xmlCtxtReadFd (xmlParserCtxtPtr ctxt,
2036
+ XMLPUBFUN xmlDoc *
2037
+ xmlCtxtReadFd (xmlParserCtxt *ctxt,
1543
2038
  int fd,
1544
2039
  const char *URL,
1545
2040
  const char *encoding,
1546
2041
  int options);
1547
- XMLPUBFUN xmlDocPtr
1548
- xmlCtxtReadIO (xmlParserCtxtPtr ctxt,
2042
+ XMLPUBFUN xmlDoc *
2043
+ xmlCtxtReadIO (xmlParserCtxt *ctxt,
1549
2044
  xmlInputReadCallback ioread,
1550
2045
  xmlInputCloseCallback ioclose,
1551
2046
  void *ioctx,
@@ -1553,74 +2048,107 @@ XMLPUBFUN xmlDocPtr
1553
2048
  const char *encoding,
1554
2049
  int options);
1555
2050
 
1556
- /**
2051
+ /*
1557
2052
  * New input API
1558
2053
  */
1559
2054
 
1560
2055
  XMLPUBFUN xmlParserErrors
1561
2056
  xmlNewInputFromUrl(const char *url, xmlParserInputFlags flags,
1562
- xmlParserInputPtr *out);
1563
- XMLPUBFUN xmlParserInputPtr
2057
+ xmlParserInput **out);
2058
+ XMLPUBFUN xmlParserInput *
1564
2059
  xmlNewInputFromMemory(const char *url, const void *mem, size_t size,
1565
2060
  xmlParserInputFlags flags);
1566
- XMLPUBFUN xmlParserInputPtr
2061
+ XMLPUBFUN xmlParserInput *
1567
2062
  xmlNewInputFromString(const char *url, const char *str,
1568
2063
  xmlParserInputFlags flags);
1569
- XMLPUBFUN xmlParserInputPtr
2064
+ XMLPUBFUN xmlParserInput *
1570
2065
  xmlNewInputFromFd(const char *url, int fd, xmlParserInputFlags flags);
1571
- XMLPUBFUN xmlParserInputPtr
2066
+ XMLPUBFUN xmlParserInput *
1572
2067
  xmlNewInputFromIO(const char *url, xmlInputReadCallback ioRead,
1573
2068
  xmlInputCloseCallback ioClose, void *ioCtxt,
1574
2069
  xmlParserInputFlags flags);
1575
2070
  XMLPUBFUN xmlParserErrors
1576
- xmlInputSetEncodingHandler(xmlParserInputPtr input,
1577
- xmlCharEncodingHandlerPtr handler);
2071
+ xmlInputSetEncodingHandler(xmlParserInput *input,
2072
+ xmlCharEncodingHandler *handler);
1578
2073
 
1579
2074
  /*
1580
2075
  * Library wide options
1581
2076
  */
2077
+
1582
2078
  /**
1583
- * xmlFeature:
1584
- *
1585
2079
  * Used to examine the existence of features that can be enabled
1586
2080
  * or disabled at compile-time.
1587
2081
  * They used to be called XML_FEATURE_xxx but this clashed with Expat
1588
2082
  */
1589
2083
  typedef enum {
2084
+ /** Multithreading support */
1590
2085
  XML_WITH_THREAD = 1,
2086
+ /** @deprecated Always available */
1591
2087
  XML_WITH_TREE = 2,
2088
+ /** Serialization support */
1592
2089
  XML_WITH_OUTPUT = 3,
2090
+ /** Push parser */
1593
2091
  XML_WITH_PUSH = 4,
2092
+ /** XML Reader */
1594
2093
  XML_WITH_READER = 5,
2094
+ /** Streaming patterns */
1595
2095
  XML_WITH_PATTERN = 6,
2096
+ /** XML Writer */
1596
2097
  XML_WITH_WRITER = 7,
2098
+ /** Legacy SAX1 API */
1597
2099
  XML_WITH_SAX1 = 8,
2100
+ /** @deprecated FTP support was removed */
1598
2101
  XML_WITH_FTP = 9,
2102
+ /** @deprecated HTTP support was removed */
1599
2103
  XML_WITH_HTTP = 10,
2104
+ /** DTD validation */
1600
2105
  XML_WITH_VALID = 11,
2106
+ /** HTML parser */
1601
2107
  XML_WITH_HTML = 12,
2108
+ /** Legacy symbols */
1602
2109
  XML_WITH_LEGACY = 13,
2110
+ /** Canonical XML */
1603
2111
  XML_WITH_C14N = 14,
2112
+ /** XML Catalogs */
1604
2113
  XML_WITH_CATALOG = 15,
2114
+ /** XPath */
1605
2115
  XML_WITH_XPATH = 16,
2116
+ /** XPointer */
1606
2117
  XML_WITH_XPTR = 17,
2118
+ /** XInclude */
1607
2119
  XML_WITH_XINCLUDE = 18,
2120
+ /** iconv */
1608
2121
  XML_WITH_ICONV = 19,
2122
+ /** Built-in ISO-8859-X */
1609
2123
  XML_WITH_ISO8859X = 20,
2124
+ /** @deprecated Removed */
1610
2125
  XML_WITH_UNICODE = 21,
2126
+ /** Regular expressions */
1611
2127
  XML_WITH_REGEXP = 22,
2128
+ /** @deprecated Same as XML_WITH_REGEXP */
1612
2129
  XML_WITH_AUTOMATA = 23,
2130
+ /** @deprecated Removed */
1613
2131
  XML_WITH_EXPR = 24,
2132
+ /** XML Schemas */
1614
2133
  XML_WITH_SCHEMAS = 25,
2134
+ /** Schematron */
1615
2135
  XML_WITH_SCHEMATRON = 26,
2136
+ /** Loadable modules */
1616
2137
  XML_WITH_MODULES = 27,
2138
+ /** Debugging API */
1617
2139
  XML_WITH_DEBUG = 28,
2140
+ /** @deprecated Removed */
1618
2141
  XML_WITH_DEBUG_MEM = 29,
1619
- XML_WITH_DEBUG_RUN = 30, /* unused */
2142
+ /** @deprecated Removed */
2143
+ XML_WITH_DEBUG_RUN = 30,
2144
+ /** GZIP compression */
1620
2145
  XML_WITH_ZLIB = 31,
2146
+ /** ICU */
1621
2147
  XML_WITH_ICU = 32,
2148
+ /** @deprecated LZMA support was removed */
1622
2149
  XML_WITH_LZMA = 33,
1623
- XML_WITH_RELAXNG = 34, /* since 2.14.0 */
2150
+ /** RELAXNG, since 2.14 */
2151
+ XML_WITH_RELAXNG = 34,
1624
2152
  XML_WITH_NONE = 99999 /* just to be sure of allocation size */
1625
2153
  } xmlFeature;
1626
2154