lxml 5.3.2__cp39-cp39-macosx_10_9_universal2.whl → 6.0.0__cp39-cp39-macosx_10_9_universal2.whl

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 (82) hide show
  1. lxml/__init__.py +1 -1
  2. lxml/_elementpath.cpython-39-darwin.so +0 -0
  3. lxml/_elementpath.py +3 -1
  4. lxml/apihelpers.pxi +25 -17
  5. lxml/builder.cpython-39-darwin.so +0 -0
  6. lxml/builder.py +11 -0
  7. lxml/debug.pxi +0 -54
  8. lxml/etree.cpython-39-darwin.so +0 -0
  9. lxml/etree.h +24 -28
  10. lxml/etree.pyx +154 -33
  11. lxml/etree_api.h +59 -50
  12. lxml/extensions.pxi +3 -6
  13. lxml/html/__init__.py +7 -3
  14. lxml/html/_difflib.cpython-39-darwin.so +0 -0
  15. lxml/html/_difflib.py +2106 -0
  16. lxml/html/builder.py +40 -0
  17. lxml/html/defs.py +3 -3
  18. lxml/html/diff.cpython-39-darwin.so +0 -0
  19. lxml/html/diff.py +406 -312
  20. lxml/includes/etree_defs.h +6 -6
  21. lxml/includes/libexslt/exsltconfig.h +3 -3
  22. lxml/includes/libxml/HTMLparser.h +41 -45
  23. lxml/includes/libxml/HTMLtree.h +1 -0
  24. lxml/includes/libxml/SAX.h +2 -186
  25. lxml/includes/libxml/SAX2.h +2 -3
  26. lxml/includes/libxml/c14n.h +1 -12
  27. lxml/includes/libxml/catalog.h +1 -0
  28. lxml/includes/libxml/debugXML.h +0 -138
  29. lxml/includes/libxml/encoding.h +131 -59
  30. lxml/includes/libxml/entities.h +12 -20
  31. lxml/includes/libxml/globals.h +0 -16
  32. lxml/includes/libxml/hash.h +19 -0
  33. lxml/includes/libxml/list.h +2 -2
  34. lxml/includes/libxml/nanoftp.h +3 -173
  35. lxml/includes/libxml/nanohttp.h +17 -0
  36. lxml/includes/libxml/parser.h +505 -256
  37. lxml/includes/libxml/parserInternals.h +26 -98
  38. lxml/includes/libxml/relaxng.h +7 -2
  39. lxml/includes/libxml/threads.h +0 -6
  40. lxml/includes/libxml/tree.h +61 -97
  41. lxml/includes/libxml/uri.h +11 -0
  42. lxml/includes/libxml/valid.h +49 -14
  43. lxml/includes/libxml/xinclude.h +12 -0
  44. lxml/includes/libxml/xlink.h +4 -0
  45. lxml/includes/libxml/xmlIO.h +33 -35
  46. lxml/includes/libxml/xmlautomata.h +19 -2
  47. lxml/includes/libxml/xmlerror.h +32 -18
  48. lxml/includes/libxml/xmlexports.h +61 -15
  49. lxml/includes/libxml/xmlmemory.h +27 -64
  50. lxml/includes/libxml/xmlmodule.h +4 -0
  51. lxml/includes/libxml/xmlreader.h +13 -3
  52. lxml/includes/libxml/xmlregexp.h +7 -106
  53. lxml/includes/libxml/xmlsave.h +15 -1
  54. lxml/includes/libxml/xmlschemas.h +10 -5
  55. lxml/includes/libxml/xmlunicode.h +3 -190
  56. lxml/includes/libxml/xmlversion.h +15 -194
  57. lxml/includes/libxml/xmlwriter.h +1 -0
  58. lxml/includes/libxml/xpath.h +9 -15
  59. lxml/includes/libxml/xpathInternals.h +9 -3
  60. lxml/includes/libxml/xpointer.h +1 -91
  61. lxml/includes/libxslt/xsltconfig.h +6 -6
  62. lxml/includes/lxml-version.h +1 -1
  63. lxml/includes/tree.pxd +10 -12
  64. lxml/includes/xmlparser.pxd +46 -8
  65. lxml/lxml.etree.h +24 -28
  66. lxml/lxml.etree_api.h +59 -50
  67. lxml/objectify.cpython-39-darwin.so +0 -0
  68. lxml/objectify.pyx +11 -7
  69. lxml/parser.pxi +106 -47
  70. lxml/sax.cpython-39-darwin.so +0 -0
  71. lxml/sax.py +11 -0
  72. lxml/saxparser.pxi +14 -14
  73. lxml/schematron.pxi +8 -3
  74. lxml/serializer.pxi +71 -3
  75. lxml/xslt.pxi +10 -3
  76. lxml-6.0.0.dist-info/METADATA +163 -0
  77. {lxml-5.3.2.dist-info → lxml-6.0.0.dist-info}/RECORD +81 -79
  78. {lxml-5.3.2.dist-info → lxml-6.0.0.dist-info}/WHEEL +2 -1
  79. {lxml-5.3.2.dist-info → lxml-6.0.0.dist-info}/licenses/LICENSE.txt +3 -1
  80. lxml-5.3.2.dist-info/METADATA +0 -100
  81. {lxml-5.3.2.dist-info → lxml-6.0.0.dist-info}/licenses/LICENSES.txt +0 -0
  82. {lxml-5.3.2.dist-info → lxml-6.0.0.dist-info}/top_level.txt +0 -0
@@ -16,6 +16,12 @@
16
16
  extern "C" {
17
17
  #endif
18
18
 
19
+ /*
20
+ * Backward compatibility
21
+ */
22
+ #define initGenericErrorDefaultFunc(h) \
23
+ xmlSetGenericErrorFunc(NULL, (h) ? *(h) : NULL)
24
+
19
25
  /**
20
26
  * xmlErrorLevel:
21
27
  *
@@ -211,6 +217,11 @@ typedef enum {
211
217
  XML_ERR_USER_STOP, /* 111 */
212
218
  XML_ERR_COMMENT_ABRUPTLY_ENDED, /* 112 */
213
219
  XML_WAR_ENCODING_MISMATCH, /* 113 */
220
+ XML_ERR_RESOURCE_LIMIT, /* 114 */
221
+ XML_ERR_ARGUMENT, /* 115 */
222
+ XML_ERR_SYSTEM, /* 116 */
223
+ XML_ERR_REDECL_PREDEF_ENTITY, /* 117 */
224
+ XML_ERR_INT_SUBSET_NOT_FINISHED, /* 118 */
214
225
  XML_NS_ERR_XML_NAMESPACE = 200,
215
226
  XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */
216
227
  XML_NS_ERR_QNAME, /* 202 */
@@ -473,6 +484,7 @@ typedef enum {
473
484
  XML_IO_EADDRINUSE, /* 1554 */
474
485
  XML_IO_EALREADY, /* 1555 */
475
486
  XML_IO_EAFNOSUPPORT, /* 1556 */
487
+ XML_IO_UNSUPPORTED_PROTOCOL, /* 1557 */
476
488
  XML_XINCLUDE_RECURSION=1600,
477
489
  XML_XINCLUDE_PARSE_VALUE, /* 1601 */
478
490
  XML_XINCLUDE_ENTITY_DEF_MISMATCH, /* 1602 */
@@ -859,23 +871,20 @@ typedef void (*xmlGenericErrorFunc) (void *ctx,
859
871
  typedef void (*xmlStructuredErrorFunc) (void *userData, const xmlError *error);
860
872
 
861
873
  /** DOC_DISABLE */
862
- #define XML_GLOBALS_ERROR \
863
- XML_OP(xmlLastError, xmlError, XML_DEPRECATED) \
864
- XML_OP(xmlGenericError, xmlGenericErrorFunc, XML_NO_ATTR) \
865
- XML_OP(xmlGenericErrorContext, void *, XML_NO_ATTR) \
866
- XML_OP(xmlStructuredError, xmlStructuredErrorFunc, XML_NO_ATTR) \
867
- XML_OP(xmlStructuredErrorContext, void *, XML_NO_ATTR)
874
+ XML_DEPRECATED
875
+ XMLPUBFUN const xmlError *__xmlLastError(void);
868
876
 
869
- #define XML_OP XML_DECLARE_GLOBAL
870
- XML_GLOBALS_ERROR
871
- #undef XML_OP
877
+ XMLPUBFUN xmlGenericErrorFunc *__xmlGenericError(void);
878
+ XMLPUBFUN void **__xmlGenericErrorContext(void);
879
+ XMLPUBFUN xmlStructuredErrorFunc *__xmlStructuredError(void);
880
+ XMLPUBFUN void **__xmlStructuredErrorContext(void);
872
881
 
873
- #if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
874
- #define xmlLastError XML_GLOBAL_MACRO(xmlLastError)
875
- #define xmlGenericError XML_GLOBAL_MACRO(xmlGenericError)
876
- #define xmlGenericErrorContext XML_GLOBAL_MACRO(xmlGenericErrorContext)
877
- #define xmlStructuredError XML_GLOBAL_MACRO(xmlStructuredError)
878
- #define xmlStructuredErrorContext XML_GLOBAL_MACRO(xmlStructuredErrorContext)
882
+ #ifndef XML_GLOBALS_NO_REDEFINITION
883
+ #define xmlLastError (*__xmlLastError())
884
+ #define xmlGenericError (*__xmlGenericError())
885
+ #define xmlGenericErrorContext (*__xmlGenericErrorContext())
886
+ #define xmlStructuredError (*__xmlStructuredError())
887
+ #define xmlStructuredErrorContext (*__xmlStructuredErrorContext())
879
888
  #endif
880
889
  /** DOC_ENABLE */
881
890
 
@@ -886,16 +895,15 @@ XML_GLOBALS_ERROR
886
895
  XMLPUBFUN void
887
896
  xmlSetGenericErrorFunc (void *ctx,
888
897
  xmlGenericErrorFunc handler);
898
+ XML_DEPRECATED
889
899
  XMLPUBFUN void
890
900
  xmlThrDefSetGenericErrorFunc(void *ctx,
891
901
  xmlGenericErrorFunc handler);
892
- XML_DEPRECATED
893
- XMLPUBFUN void
894
- initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler);
895
902
 
896
903
  XMLPUBFUN void
897
904
  xmlSetStructuredErrorFunc (void *ctx,
898
905
  xmlStructuredErrorFunc handler);
906
+ XML_DEPRECATED
899
907
  XMLPUBFUN void
900
908
  xmlThrDefSetStructuredErrorFunc(void *ctx,
901
909
  xmlStructuredErrorFunc handler);
@@ -919,11 +927,17 @@ XMLPUBFUN void
919
927
  xmlParserValidityWarning (void *ctx,
920
928
  const char *msg,
921
929
  ...) LIBXML_ATTR_FORMAT(2,3);
930
+ /** DOC_DISABLE */
922
931
  struct _xmlParserInput;
932
+ /** DOC_ENABLE */
923
933
  XMLPUBFUN void
924
934
  xmlParserPrintFileInfo (struct _xmlParserInput *input);
925
935
  XMLPUBFUN void
926
936
  xmlParserPrintFileContext (struct _xmlParserInput *input);
937
+ XMLPUBFUN void
938
+ xmlFormatError (const xmlError *err,
939
+ xmlGenericErrorFunc channel,
940
+ void *data);
927
941
 
928
942
  /*
929
943
  * Extended error information routines
@@ -9,6 +9,11 @@
9
9
  #define __XML_EXPORTS_H__
10
10
 
11
11
  /** DOC_DISABLE */
12
+
13
+ /*
14
+ * Symbol visibility
15
+ */
16
+
12
17
  #if defined(_WIN32) || defined(__CYGWIN__)
13
18
  #ifdef LIBXML_STATIC
14
19
  #define XMLPUBLIC
@@ -20,30 +25,71 @@
20
25
  #else /* not Windows */
21
26
  #define XMLPUBLIC
22
27
  #endif /* platform switch */
23
- /** DOC_ENABLE */
24
28
 
25
- /*
26
- * XMLPUBFUN:
27
- *
28
- * Macro which declares an exportable function
29
- */
30
29
  #define XMLPUBFUN XMLPUBLIC
31
30
 
32
- /**
33
- * XMLPUBVAR:
34
- *
35
- * Macro which declares an exportable variable
36
- */
37
31
  #define XMLPUBVAR XMLPUBLIC extern
38
32
 
39
- /** DOC_DISABLE */
40
33
  /* Compatibility */
41
34
  #define XMLCALL
42
35
  #define XMLCDECL
43
- #if !defined(LIBXML_DLL_IMPORT)
44
- #define LIBXML_DLL_IMPORT XMLPUBVAR
36
+ #ifndef LIBXML_DLL_IMPORT
37
+ #define LIBXML_DLL_IMPORT XMLPUBVAR
38
+ #endif
39
+
40
+ /*
41
+ * Attributes
42
+ */
43
+
44
+ #if !defined(__clang__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)
45
+ #define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
46
+ #else
47
+ #define LIBXML_ATTR_ALLOC_SIZE(x)
48
+ #endif
49
+
50
+ #if __GNUC__ * 100 + __GNUC_MINOR__ >= 303
51
+ #define LIBXML_ATTR_FORMAT(fmt,args) \
52
+ __attribute__((__format__(__printf__,fmt,args)))
53
+ #else
54
+ #define LIBXML_ATTR_FORMAT(fmt,args)
55
+ #endif
56
+
57
+ #ifndef XML_DEPRECATED
58
+ #if defined(IN_LIBXML)
59
+ #define XML_DEPRECATED
60
+ #elif __GNUC__ * 100 + __GNUC_MINOR__ >= 301
61
+ #define XML_DEPRECATED __attribute__((deprecated))
62
+ #elif defined(_MSC_VER) && _MSC_VER >= 1400
63
+ /* Available since Visual Studio 2005 */
64
+ #define XML_DEPRECATED __declspec(deprecated)
65
+ #else
66
+ #define XML_DEPRECATED
67
+ #endif
68
+ #endif
69
+
70
+ #ifndef XML_DEPRECATED_MEMBER
71
+ #if defined(IN_LIBXML)
72
+ #define XML_DEPRECATED_MEMBER
73
+ #elif __GNUC__ * 100 + __GNUC_MINOR__ >= 301
74
+ #define XML_DEPRECATED_MEMBER __attribute__((deprecated))
75
+ #else
76
+ #define XML_DEPRECATED_MEMBER
77
+ #endif
78
+ #endif
79
+
80
+ /*
81
+ * Originally declared in xmlversion.h which is generated
82
+ */
83
+
84
+ #ifdef __cplusplus
85
+ extern "C" {
86
+ #endif
87
+
88
+ XMLPUBFUN void xmlCheckVersion(int version);
89
+
90
+ #ifdef __cplusplus
91
+ }
45
92
  #endif
46
- /** DOC_ENABLE */
47
93
 
48
94
  #endif /* __XML_EXPORTS_H__ */
49
95
 
@@ -69,27 +69,25 @@ typedef char *(*xmlStrdupFunc)(const char *str);
69
69
  * - xmlMemStrdup
70
70
  * - xmlFree
71
71
  */
72
- /** DOC_DISABLE */
73
72
  #ifdef LIBXML_THREAD_ALLOC_ENABLED
74
- #define XML_GLOBALS_ALLOC \
75
- XML_OP(xmlMalloc, xmlMallocFunc, XML_NO_ATTR) \
76
- XML_OP(xmlMallocAtomic, xmlMallocFunc, XML_NO_ATTR) \
77
- XML_OP(xmlRealloc, xmlReallocFunc, XML_NO_ATTR) \
78
- XML_OP(xmlFree, xmlFreeFunc, XML_NO_ATTR) \
79
- XML_OP(xmlMemStrdup, xmlStrdupFunc, XML_NO_ATTR)
80
- #define XML_OP XML_DECLARE_GLOBAL
81
- XML_GLOBALS_ALLOC
82
- #undef XML_OP
83
- #if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
84
- #define xmlMalloc XML_GLOBAL_MACRO(xmlMalloc)
85
- #define xmlMallocAtomic XML_GLOBAL_MACRO(xmlMallocAtomic)
86
- #define xmlRealloc XML_GLOBAL_MACRO(xmlRealloc)
87
- #define xmlFree XML_GLOBAL_MACRO(xmlFree)
88
- #define xmlMemStrdup XML_GLOBAL_MACRO(xmlMemStrdup)
89
- #endif
90
- #else
91
- #define XML_GLOBALS_ALLOC
73
+
74
+ /** DOC_DISABLE */
75
+ XMLPUBFUN xmlMallocFunc *__xmlMalloc(void);
76
+ XMLPUBFUN xmlMallocFunc *__xmlMallocAtomic(void);
77
+ XMLPUBFUN xmlReallocFunc *__xmlRealloc(void);
78
+ XMLPUBFUN xmlFreeFunc *__xmlFree(void);
79
+ XMLPUBFUN xmlStrdupFunc *__xmlMemStrdup(void);
80
+
81
+ #ifndef XML_GLOBALS_NO_REDEFINITION
82
+ #define xmlMalloc (*__xmlMalloc())
83
+ #define xmlMallocAtomic (*__xmlMallocAtomic())
84
+ #define xmlRealloc (*__xmlRealloc())
85
+ #define xmlFree (*__xmlFree())
86
+ #define xmlMemStrdup (*__xmlMemStrdup())
87
+ #endif
92
88
  /** DOC_ENABLE */
89
+
90
+ #else
93
91
  XMLPUBVAR xmlMallocFunc xmlMalloc;
94
92
  XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
95
93
  XMLPUBVAR xmlReallocFunc xmlRealloc;
@@ -112,12 +110,14 @@ XMLPUBFUN int
112
110
  xmlMallocFunc *mallocFunc,
113
111
  xmlReallocFunc *reallocFunc,
114
112
  xmlStrdupFunc *strdupFunc);
113
+ XML_DEPRECATED
115
114
  XMLPUBFUN int
116
115
  xmlGcMemSetup (xmlFreeFunc freeFunc,
117
116
  xmlMallocFunc mallocFunc,
118
117
  xmlMallocFunc mallocAtomicFunc,
119
118
  xmlReallocFunc reallocFunc,
120
119
  xmlStrdupFunc strdupFunc);
120
+ XML_DEPRECATED
121
121
  XMLPUBFUN int
122
122
  xmlGcMemGet (xmlFreeFunc *freeFunc,
123
123
  xmlMallocFunc *mallocFunc,
@@ -147,12 +147,16 @@ XMLPUBFUN int
147
147
  xmlMemUsed (void);
148
148
  XMLPUBFUN int
149
149
  xmlMemBlocks (void);
150
+ XML_DEPRECATED
150
151
  XMLPUBFUN void
151
152
  xmlMemDisplay (FILE *fp);
153
+ XML_DEPRECATED
152
154
  XMLPUBFUN void
153
155
  xmlMemDisplayLast(FILE *fp, long nbBytes);
156
+ XML_DEPRECATED
154
157
  XMLPUBFUN void
155
158
  xmlMemShow (FILE *fp, int nr);
159
+ XML_DEPRECATED
156
160
  XMLPUBFUN void
157
161
  xmlMemoryDump (void);
158
162
  XMLPUBFUN void *
@@ -163,60 +167,19 @@ XMLPUBFUN void
163
167
  xmlMemFree (void *ptr);
164
168
  XMLPUBFUN char *
165
169
  xmlMemoryStrdup (const char *str);
170
+ XML_DEPRECATED
166
171
  XMLPUBFUN void *
167
172
  xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
173
+ XML_DEPRECATED
168
174
  XMLPUBFUN void *
169
175
  xmlReallocLoc (void *ptr, size_t size, const char *file, int line);
176
+ XML_DEPRECATED
170
177
  XMLPUBFUN void *
171
178
  xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
179
+ XML_DEPRECATED
172
180
  XMLPUBFUN char *
173
181
  xmlMemStrdupLoc (const char *str, const char *file, int line);
174
182
 
175
-
176
- /** DOC_DISABLE */
177
- #ifdef DEBUG_MEMORY_LOCATION
178
- /**
179
- * xmlMalloc:
180
- * @size: number of bytes to allocate
181
- *
182
- * Wrapper for the malloc() function used in the XML library.
183
- *
184
- * Returns the pointer to the allocated area or NULL in case of error.
185
- */
186
- #define xmlMalloc(size) xmlMallocLoc((size), __FILE__, __LINE__)
187
- /**
188
- * xmlMallocAtomic:
189
- * @size: number of bytes to allocate
190
- *
191
- * Wrapper for the malloc() function used in the XML library for allocation
192
- * of block not containing pointers to other areas.
193
- *
194
- * Returns the pointer to the allocated area or NULL in case of error.
195
- */
196
- #define xmlMallocAtomic(size) xmlMallocAtomicLoc((size), __FILE__, __LINE__)
197
- /**
198
- * xmlRealloc:
199
- * @ptr: pointer to the existing allocated area
200
- * @size: number of bytes to allocate
201
- *
202
- * Wrapper for the realloc() function used in the XML library.
203
- *
204
- * Returns the pointer to the allocated area or NULL in case of error.
205
- */
206
- #define xmlRealloc(ptr, size) xmlReallocLoc((ptr), (size), __FILE__, __LINE__)
207
- /**
208
- * xmlMemStrdup:
209
- * @str: pointer to the existing string
210
- *
211
- * Wrapper for the strdup() function, xmlStrdup() is usually preferred.
212
- *
213
- * Returns the pointer to the allocated area or NULL in case of error.
214
- */
215
- #define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__)
216
-
217
- #endif /* DEBUG_MEMORY_LOCATION */
218
- /** DOC_ENABLE */
219
-
220
183
  #ifdef __cplusplus
221
184
  }
222
185
  #endif /* __cplusplus */
@@ -37,15 +37,19 @@ typedef enum {
37
37
  XML_MODULE_LOCAL= 2 /* local binding */
38
38
  } xmlModuleOption;
39
39
 
40
+ XML_DEPRECATED
40
41
  XMLPUBFUN xmlModulePtr xmlModuleOpen (const char *filename,
41
42
  int options);
42
43
 
44
+ XML_DEPRECATED
43
45
  XMLPUBFUN int xmlModuleSymbol (xmlModulePtr module,
44
46
  const char* name,
45
47
  void **result);
46
48
 
49
+ XML_DEPRECATED
47
50
  XMLPUBFUN int xmlModuleClose (xmlModulePtr module);
48
51
 
52
+ XML_DEPRECATED
49
53
  XMLPUBFUN int xmlModuleFree (xmlModulePtr module);
50
54
 
51
55
  #ifdef __cplusplus
@@ -14,11 +14,12 @@
14
14
  #include <libxml/tree.h>
15
15
  #include <libxml/xmlerror.h>
16
16
  #include <libxml/xmlIO.h>
17
- #ifdef LIBXML_SCHEMAS_ENABLED
17
+ #ifdef LIBXML_RELAXNG_ENABLED
18
18
  #include <libxml/relaxng.h>
19
+ #endif
20
+ #ifdef LIBXML_SCHEMAS_ENABLED
19
21
  #include <libxml/xmlschemas.h>
20
22
  #endif
21
- /* for compatibility */
22
23
  #include <libxml/parser.h>
23
24
 
24
25
  #ifdef __cplusplus
@@ -127,6 +128,8 @@ XMLPUBFUN int
127
128
  XMLPUBFUN void
128
129
  xmlTextReaderSetMaxAmplification(xmlTextReaderPtr reader,
129
130
  unsigned maxAmpl);
131
+ XMLPUBFUN const xmlError *
132
+ xmlTextReaderGetLastError(xmlTextReaderPtr reader);
130
133
 
131
134
  /*
132
135
  * Iterators
@@ -286,7 +289,7 @@ XMLPUBFUN int
286
289
  xmlTextReaderNextSibling (xmlTextReaderPtr reader);
287
290
  XMLPUBFUN int
288
291
  xmlTextReaderIsValid (xmlTextReaderPtr reader);
289
- #ifdef LIBXML_SCHEMAS_ENABLED
292
+ #ifdef LIBXML_RELAXNG_ENABLED
290
293
  XMLPUBFUN int
291
294
  xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
292
295
  const char *rng);
@@ -298,6 +301,8 @@ XMLPUBFUN int
298
301
  XMLPUBFUN int
299
302
  xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
300
303
  xmlRelaxNGPtr schema);
304
+ #endif
305
+ #ifdef LIBXML_SCHEMAS_ENABLED
301
306
  XMLPUBFUN int
302
307
  xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
303
308
  const char *xsd);
@@ -424,6 +429,11 @@ XMLPUBFUN void
424
429
  xmlTextReaderErrorFunc *f,
425
430
  void **arg);
426
431
 
432
+ XMLPUBFUN void
433
+ xmlTextReaderSetResourceLoader(xmlTextReaderPtr reader,
434
+ xmlResourceLoader loader,
435
+ void *data);
436
+
427
437
  #endif /* LIBXML_READER_ENABLED */
428
438
 
429
439
  #ifdef __cplusplus
@@ -47,6 +47,7 @@ XMLPUBFUN void xmlRegFreeRegexp(xmlRegexpPtr regexp);
47
47
  XMLPUBFUN int
48
48
  xmlRegexpExec (xmlRegexpPtr comp,
49
49
  const xmlChar *value);
50
+ XML_DEPRECATED
50
51
  XMLPUBFUN void
51
52
  xmlRegexpPrint (FILE *output,
52
53
  xmlRegexpPtr regexp);
@@ -70,28 +71,34 @@ typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
70
71
  /*
71
72
  * The progressive API
72
73
  */
74
+ XML_DEPRECATED
73
75
  XMLPUBFUN xmlRegExecCtxtPtr
74
76
  xmlRegNewExecCtxt (xmlRegexpPtr comp,
75
77
  xmlRegExecCallbacks callback,
76
78
  void *data);
79
+ XML_DEPRECATED
77
80
  XMLPUBFUN void
78
81
  xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
82
+ XML_DEPRECATED
79
83
  XMLPUBFUN int
80
84
  xmlRegExecPushString(xmlRegExecCtxtPtr exec,
81
85
  const xmlChar *value,
82
86
  void *data);
87
+ XML_DEPRECATED
83
88
  XMLPUBFUN int
84
89
  xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
85
90
  const xmlChar *value,
86
91
  const xmlChar *value2,
87
92
  void *data);
88
93
 
94
+ XML_DEPRECATED
89
95
  XMLPUBFUN int
90
96
  xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
91
97
  int *nbval,
92
98
  int *nbneg,
93
99
  xmlChar **values,
94
100
  int *terminal);
101
+ XML_DEPRECATED
95
102
  XMLPUBFUN int
96
103
  xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
97
104
  const xmlChar **string,
@@ -99,113 +106,7 @@ XMLPUBFUN int
99
106
  int *nbneg,
100
107
  xmlChar **values,
101
108
  int *terminal);
102
- #ifdef LIBXML_EXPR_ENABLED
103
- /*
104
- * Formal regular expression handling
105
- * Its goal is to do some formal work on content models
106
- */
107
-
108
- /* expressions are used within a context */
109
- typedef struct _xmlExpCtxt xmlExpCtxt;
110
- typedef xmlExpCtxt *xmlExpCtxtPtr;
111
-
112
- XMLPUBFUN void
113
- xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
114
- XMLPUBFUN xmlExpCtxtPtr
115
- xmlExpNewCtxt (int maxNodes,
116
- xmlDictPtr dict);
117
-
118
- XMLPUBFUN int
119
- xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
120
- XMLPUBFUN int
121
- xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt);
122
-
123
- /* Expressions are trees but the tree is opaque */
124
- typedef struct _xmlExpNode xmlExpNode;
125
- typedef xmlExpNode *xmlExpNodePtr;
126
-
127
- typedef enum {
128
- XML_EXP_EMPTY = 0,
129
- XML_EXP_FORBID = 1,
130
- XML_EXP_ATOM = 2,
131
- XML_EXP_SEQ = 3,
132
- XML_EXP_OR = 4,
133
- XML_EXP_COUNT = 5
134
- } xmlExpNodeType;
135
-
136
- /*
137
- * 2 core expressions shared by all for the empty language set
138
- * and for the set with just the empty token
139
- */
140
- XMLPUBVAR xmlExpNodePtr forbiddenExp;
141
- XMLPUBVAR xmlExpNodePtr emptyExp;
142
-
143
- /*
144
- * Expressions are reference counted internally
145
- */
146
- XMLPUBFUN void
147
- xmlExpFree (xmlExpCtxtPtr ctxt,
148
- xmlExpNodePtr expr);
149
- XMLPUBFUN void
150
- xmlExpRef (xmlExpNodePtr expr);
151
109
 
152
- /*
153
- * constructors can be either manual or from a string
154
- */
155
- XMLPUBFUN xmlExpNodePtr
156
- xmlExpParse (xmlExpCtxtPtr ctxt,
157
- const char *expr);
158
- XMLPUBFUN xmlExpNodePtr
159
- xmlExpNewAtom (xmlExpCtxtPtr ctxt,
160
- const xmlChar *name,
161
- int len);
162
- XMLPUBFUN xmlExpNodePtr
163
- xmlExpNewOr (xmlExpCtxtPtr ctxt,
164
- xmlExpNodePtr left,
165
- xmlExpNodePtr right);
166
- XMLPUBFUN xmlExpNodePtr
167
- xmlExpNewSeq (xmlExpCtxtPtr ctxt,
168
- xmlExpNodePtr left,
169
- xmlExpNodePtr right);
170
- XMLPUBFUN xmlExpNodePtr
171
- xmlExpNewRange (xmlExpCtxtPtr ctxt,
172
- xmlExpNodePtr subset,
173
- int min,
174
- int max);
175
- /*
176
- * The really interesting APIs
177
- */
178
- XMLPUBFUN int
179
- xmlExpIsNillable(xmlExpNodePtr expr);
180
- XMLPUBFUN int
181
- xmlExpMaxToken (xmlExpNodePtr expr);
182
- XMLPUBFUN int
183
- xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
184
- xmlExpNodePtr expr,
185
- const xmlChar**langList,
186
- int len);
187
- XMLPUBFUN int
188
- xmlExpGetStart (xmlExpCtxtPtr ctxt,
189
- xmlExpNodePtr expr,
190
- const xmlChar**tokList,
191
- int len);
192
- XMLPUBFUN xmlExpNodePtr
193
- xmlExpStringDerive(xmlExpCtxtPtr ctxt,
194
- xmlExpNodePtr expr,
195
- const xmlChar *str,
196
- int len);
197
- XMLPUBFUN xmlExpNodePtr
198
- xmlExpExpDerive (xmlExpCtxtPtr ctxt,
199
- xmlExpNodePtr expr,
200
- xmlExpNodePtr sub);
201
- XMLPUBFUN int
202
- xmlExpSubsume (xmlExpCtxtPtr ctxt,
203
- xmlExpNodePtr expr,
204
- xmlExpNodePtr sub);
205
- XMLPUBFUN void
206
- xmlExpDump (xmlBufferPtr buf,
207
- xmlExpNodePtr expr);
208
- #endif /* LIBXML_EXPR_ENABLED */
209
110
  #ifdef __cplusplus
210
111
  }
211
112
  #endif
@@ -34,7 +34,11 @@ typedef enum {
34
34
  XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */
35
35
  XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */
36
36
  XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */
37
- XML_SAVE_WSNONSIG = 1<<7 /* format with non-significant whitespace */
37
+ XML_SAVE_WSNONSIG = 1<<7, /* format with non-significant whitespace */
38
+ /* Available since 2.14.0 */
39
+ XML_SAVE_EMPTY = 1<<8, /* force empty tags, overriding global */
40
+ XML_SAVE_NO_INDENT = 1<<9, /* disable indenting */
41
+ XML_SAVE_INDENT = 1<<10 /* force indenting, overriding global */
38
42
  } xmlSaveOption;
39
43
 
40
44
 
@@ -73,17 +77,27 @@ XMLPUBFUN int
73
77
  xmlSaveFlush (xmlSaveCtxtPtr ctxt);
74
78
  XMLPUBFUN int
75
79
  xmlSaveClose (xmlSaveCtxtPtr ctxt);
80
+ XMLPUBFUN xmlParserErrors
81
+ xmlSaveFinish (xmlSaveCtxtPtr ctxt);
82
+ XMLPUBFUN int
83
+ xmlSaveSetIndentString (xmlSaveCtxtPtr ctxt,
84
+ const char *indent);
85
+ XML_DEPRECATED
76
86
  XMLPUBFUN int
77
87
  xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
78
88
  xmlCharEncodingOutputFunc escape);
89
+ XML_DEPRECATED
79
90
  XMLPUBFUN int
80
91
  xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
81
92
  xmlCharEncodingOutputFunc escape);
82
93
 
94
+ XML_DEPRECATED
83
95
  XMLPUBFUN int
84
96
  xmlThrDefIndentTreeOutput(int v);
97
+ XML_DEPRECATED
85
98
  XMLPUBFUN const char *
86
99
  xmlThrDefTreeIndentString(const char * v);
100
+ XML_DEPRECATED
87
101
  XMLPUBFUN int
88
102
  xmlThrDefSaveNoEmptyTags(int v);
89
103
 
@@ -18,6 +18,7 @@
18
18
 
19
19
  #include <stdio.h>
20
20
  #include <libxml/encoding.h>
21
+ #include <libxml/parser.h>
21
22
  #include <libxml/tree.h>
22
23
  #include <libxml/xmlerror.h>
23
24
 
@@ -156,22 +157,26 @@ XMLPUBFUN void
156
157
  xmlStructuredErrorFunc serror,
157
158
  void *ctx);
158
159
  XMLPUBFUN int
159
- xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
160
+ xmlSchemaGetParserErrors (xmlSchemaParserCtxtPtr ctxt,
160
161
  xmlSchemaValidityErrorFunc * err,
161
162
  xmlSchemaValidityWarningFunc * warn,
162
163
  void **ctx);
164
+ XMLPUBFUN void
165
+ xmlSchemaSetResourceLoader (xmlSchemaParserCtxtPtr ctxt,
166
+ xmlResourceLoader loader,
167
+ void *data);
163
168
  XMLPUBFUN int
164
- xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
169
+ xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
165
170
 
166
171
  XMLPUBFUN xmlSchemaPtr
167
172
  xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
168
173
  XMLPUBFUN void
169
174
  xmlSchemaFree (xmlSchemaPtr schema);
170
- #ifdef LIBXML_OUTPUT_ENABLED
175
+ #ifdef LIBXML_DEBUG_ENABLED
171
176
  XMLPUBFUN void
172
177
  xmlSchemaDump (FILE *output,
173
178
  xmlSchemaPtr schema);
174
- #endif /* LIBXML_OUTPUT_ENABLED */
179
+ #endif /* LIBXML_DEBUG_ENABLED */
175
180
  /*
176
181
  * Interfaces for validating
177
182
  */
@@ -212,7 +217,7 @@ XMLPUBFUN int
212
217
  xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
213
218
  xmlParserInputBufferPtr input,
214
219
  xmlCharEncoding enc,
215
- xmlSAXHandlerPtr sax,
220
+ const xmlSAXHandler *sax,
216
221
  void *user_data);
217
222
  XMLPUBFUN int
218
223
  xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,