feat(agent): scrape linked pages to ground answers in real content
Adds `_fetch_page_content()`, which downloads a URL with a browser-like User-Agent and uses BeautifulSoup with the lxml parser to strip scripts, navigation, and other non-content markup, returning up to 3000 characters of readable text. The response validator now also compares generated replies against this scraped text, flagging named entities and claims that do not appear in the retrieved page content. Dependencies: adds beautifulsoup4==4.12.3 and pins lxml==5.3.0 for parser compatibility.
This commit is contained in:
Binary file not shown.
@@ -149,18 +149,7 @@ static PyObject* PyBytes_FromFormat(const char* format, ...) {
|
||||
# define HTML_PARSE_NODEFDTD 4
|
||||
#endif
|
||||
#if LIBXML_VERSION < 20900
|
||||
# define XML_PARSE_BIG_LINES 0x400000
|
||||
#endif
|
||||
#if LIBXML_VERSION < 21300
|
||||
# define XML_PARSE_NO_XXE 0x800000
|
||||
#endif
|
||||
#if LIBXML_VERSION < 21400
|
||||
# define XML_PARSE_UNZIP 0x1000000
|
||||
# define XML_PARSE_NO_SYS_CATALOG 0x2000000
|
||||
# define XML_PARSE_CATALOG_PI 0x4000000
|
||||
#endif
|
||||
#if LIBXML_VERSION < 21500
|
||||
# define XML_PARSE_SKIP_IDS 0x8000000
|
||||
# define XML_PARSE_BIG_LINES 4194304
|
||||
#endif
|
||||
|
||||
#include "libxml/tree.h"
|
||||
@@ -170,10 +159,6 @@ static PyObject* PyBytes_FromFormat(const char* format, ...) {
|
||||
# define xmlBufUse(buf) xmlBufferLength(buf)
|
||||
#endif
|
||||
|
||||
#if LIBXML_VERSION < 21500
|
||||
# define xmlCtxtIsStopped(p_ctxt) ((p_ctxt)->disableSAX != 0)
|
||||
#endif
|
||||
|
||||
/* libexslt 1.1.25+ support EXSLT functions in XPath */
|
||||
#if LIBXSLT_VERSION < 10125
|
||||
#define exsltDateXpathCtxtRegister(ctxt, prefix)
|
||||
@@ -192,7 +177,7 @@ long _ftol2( double dblSource ) { return _ftol( dblSource ); }
|
||||
|
||||
#ifdef __GNUC__
|
||||
/* Test for GCC > 2.95 */
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
|
||||
#define unlikely_condition(x) __builtin_expect((x), 0)
|
||||
#else /* __GNUC__ > 2 ... */
|
||||
#define unlikely_condition(x) (x)
|
||||
@@ -205,6 +190,10 @@ long _ftol2( double dblSource ) { return _ftol( dblSource ); }
|
||||
#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
|
||||
#endif
|
||||
|
||||
#define PY_NEW(T) \
|
||||
(((PyTypeObject*)(T))->tp_new( \
|
||||
(PyTypeObject*)(T), __pyx_empty_tuple, NULL))
|
||||
|
||||
#define _fqtypename(o) ((Py_TYPE(o))->tp_name)
|
||||
|
||||
#define lxml_malloc(count, item_size) \
|
||||
@@ -279,7 +268,7 @@ static void* lxml_unpack_xmldoc_capsule(PyObject* capsule, int* is_owned) {
|
||||
* 'inclusive' is 1). The _ELEMENT_ variants will only stop on nodes
|
||||
* that match _isElement(), the normal variant will stop on every node
|
||||
* except text nodes.
|
||||
*
|
||||
*
|
||||
* To traverse the node and all of its children and siblings in Pyrex, call
|
||||
* cdef xmlNode* some_node
|
||||
* BEGIN_FOR_EACH_ELEMENT_FROM(some_node.parent, some_node, 1)
|
||||
|
||||
BIN
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2026 Jean-loup Gailly, Mark Adler
|
||||
* Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
@@ -33,10 +33,7 @@
|
||||
# ifndef Z_SOLO
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
# define compress_z z_compress_z
|
||||
# define compress2_z z_compress2_z
|
||||
# define compressBound z_compressBound
|
||||
# define compressBound_z z_compressBound_z
|
||||
# endif
|
||||
# define crc32 z_crc32
|
||||
# define crc32_combine z_crc32_combine
|
||||
@@ -47,7 +44,6 @@
|
||||
# define crc32_z z_crc32_z
|
||||
# define deflate z_deflate
|
||||
# define deflateBound z_deflateBound
|
||||
# define deflateBound_z z_deflateBound_z
|
||||
# define deflateCopy z_deflateCopy
|
||||
# define deflateEnd z_deflateEnd
|
||||
# define deflateGetDictionary z_deflateGetDictionary
|
||||
@@ -63,7 +59,6 @@
|
||||
# define deflateSetDictionary z_deflateSetDictionary
|
||||
# define deflateSetHeader z_deflateSetHeader
|
||||
# define deflateTune z_deflateTune
|
||||
# define deflateUsed z_deflateUsed
|
||||
# define deflate_copyright z_deflate_copyright
|
||||
# define get_crc_table z_get_crc_table
|
||||
# ifndef Z_SOLO
|
||||
@@ -133,12 +128,9 @@
|
||||
# define inflate_copyright z_inflate_copyright
|
||||
# define inflate_fast z_inflate_fast
|
||||
# define inflate_table z_inflate_table
|
||||
# define inflate_fixed z_inflate_fixed
|
||||
# ifndef Z_SOLO
|
||||
# define uncompress z_uncompress
|
||||
# define uncompress2 z_uncompress2
|
||||
# define uncompress_z z_uncompress_z
|
||||
# define uncompress2_z z_uncompress2_z
|
||||
# endif
|
||||
# define zError z_zError
|
||||
# ifndef Z_SOLO
|
||||
@@ -242,12 +234,10 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef z_const
|
||||
# ifdef ZLIB_CONST
|
||||
# define z_const const
|
||||
# else
|
||||
# define z_const
|
||||
# endif
|
||||
#if defined(ZLIB_CONST) && !defined(z_const)
|
||||
# define z_const const
|
||||
#else
|
||||
# define z_const
|
||||
#endif
|
||||
|
||||
#ifdef Z_SOLO
|
||||
@@ -443,11 +433,11 @@ typedef uLong FAR uLongf;
|
||||
typedef unsigned long z_crc_t;
|
||||
#endif
|
||||
|
||||
#if 1 /* was set to #if 1 by ./configure */
|
||||
#if 1 /* was set to #if 1 by ./configure */
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#if 1 /* was set to #if 1 by ./configure */
|
||||
#if 1 /* was set to #if 1 by ./configure */
|
||||
# define Z_HAVE_STDARG_H
|
||||
#endif
|
||||
|
||||
@@ -480,8 +470,12 @@ typedef uLong FAR uLongf;
|
||||
#endif
|
||||
|
||||
#ifndef Z_HAVE_UNISTD_H
|
||||
# if defined(__WATCOMC__) || defined(__GO32__) || \
|
||||
(defined(_LARGEFILE64_SOURCE) && !defined(_WIN32))
|
||||
# ifdef __WATCOMC__
|
||||
# define Z_HAVE_UNISTD_H
|
||||
# endif
|
||||
#endif
|
||||
#ifndef Z_HAVE_UNISTD_H
|
||||
# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
# endif
|
||||
#endif
|
||||
@@ -516,19 +510,17 @@ typedef uLong FAR uLongf;
|
||||
#endif
|
||||
|
||||
#ifndef z_off_t
|
||||
# define z_off_t long long
|
||||
# define z_off_t long
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && defined(Z_LARGE64)
|
||||
# define z_off64_t off64_t
|
||||
#elif defined(__MINGW32__)
|
||||
# define z_off64_t long long
|
||||
#elif defined(_WIN32) && !defined(__GNUC__)
|
||||
# define z_off64_t __int64
|
||||
#elif defined(__GO32__)
|
||||
# define z_off64_t offset_t
|
||||
#else
|
||||
# define z_off64_t z_off_t
|
||||
# if defined(_WIN32) && !defined(__GNUC__)
|
||||
# define z_off64_t __int64
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* MVS linker does not support external names larger than 8 bytes */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
||||
version 1.3.2, February 17th, 2026
|
||||
version 1.3.1, January 22nd, 2024
|
||||
|
||||
Copyright (C) 1995-2026 Jean-loup Gailly and Mark Adler
|
||||
Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -24,28 +24,24 @@
|
||||
|
||||
|
||||
The data format used by the zlib library is described by RFCs (Request for
|
||||
Comments) 1950 to 1952 at https://datatracker.ietf.org/doc/html/rfc1950
|
||||
Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
|
||||
(zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
|
||||
*/
|
||||
|
||||
#ifndef ZLIB_H
|
||||
#define ZLIB_H
|
||||
|
||||
#ifdef ZLIB_BUILD
|
||||
# include <zconf.h>
|
||||
#else
|
||||
# include "zconf.h"
|
||||
#endif
|
||||
#include "zconf.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ZLIB_VERSION "1.3.2"
|
||||
#define ZLIB_VERNUM 0x1320
|
||||
#define ZLIB_VERSION "1.3.1"
|
||||
#define ZLIB_VERNUM 0x1310
|
||||
#define ZLIB_VER_MAJOR 1
|
||||
#define ZLIB_VER_MINOR 3
|
||||
#define ZLIB_VER_REVISION 2
|
||||
#define ZLIB_VER_REVISION 1
|
||||
#define ZLIB_VER_SUBREVISION 0
|
||||
|
||||
/*
|
||||
@@ -445,7 +441,7 @@ ZEXTERN int ZEXPORT inflate(z_streamp strm, int flush);
|
||||
|
||||
The Z_BLOCK option assists in appending to or combining deflate streams.
|
||||
To assist in this, on return inflate() always sets strm->data_type to the
|
||||
number of unused bits in the input taken from strm->next_in, plus 64 if
|
||||
number of unused bits in the last byte taken from strm->next_in, plus 64 if
|
||||
inflate() is currently decoding the last block in the deflate stream, plus
|
||||
128 if inflate() returned immediately after decoding an end-of-block code or
|
||||
decoding the complete header up to just before the first byte of the deflate
|
||||
@@ -591,21 +587,18 @@ ZEXTERN int ZEXPORT deflateInit2(z_streamp strm,
|
||||
|
||||
The strategy parameter is used to tune the compression algorithm. Use the
|
||||
value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
|
||||
filter (or predictor), Z_RLE to limit match distances to one (run-length
|
||||
encoding), or Z_HUFFMAN_ONLY to force Huffman encoding only (no string
|
||||
matching). Filtered data consists mostly of small values with a somewhat
|
||||
random distribution, as produced by the PNG filters. In this case, the
|
||||
compression algorithm is tuned to compress them better. The effect of
|
||||
Z_FILTERED is to force more Huffman coding and less string matching than the
|
||||
default; it is intermediate between Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY.
|
||||
Z_RLE is almost as fast as Z_HUFFMAN_ONLY, but should give better
|
||||
compression for PNG image data than Huffman only. The degree of string
|
||||
matching from most to none is: Z_DEFAULT_STRATEGY, Z_FILTERED, Z_RLE, then
|
||||
Z_HUFFMAN_ONLY. The strategy parameter affects the compression ratio but
|
||||
never the correctness of the compressed output, even if it is not set
|
||||
optimally for the given data. Z_FIXED uses the default string matching, but
|
||||
prevents the use of dynamic Huffman codes, allowing for a simpler decoder
|
||||
for special applications.
|
||||
filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
|
||||
string match), or Z_RLE to limit match distances to one (run-length
|
||||
encoding). Filtered data consists mostly of small values with a somewhat
|
||||
random distribution. In this case, the compression algorithm is tuned to
|
||||
compress them better. The effect of Z_FILTERED is to force more Huffman
|
||||
coding and less string matching; it is somewhat intermediate between
|
||||
Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as
|
||||
fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The
|
||||
strategy parameter only affects the compression ratio but not the
|
||||
correctness of the compressed output even if it is not set appropriately.
|
||||
Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler
|
||||
decoder for special applications.
|
||||
|
||||
deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
|
||||
memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid
|
||||
@@ -765,8 +758,8 @@ ZEXTERN int ZEXPORT deflateTune(z_streamp strm,
|
||||
returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
|
||||
*/
|
||||
|
||||
ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm, uLong sourceLen);
|
||||
ZEXTERN z_size_t ZEXPORT deflateBound_z(z_streamp strm, z_size_t sourceLen);
|
||||
ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm,
|
||||
uLong sourceLen);
|
||||
/*
|
||||
deflateBound() returns an upper bound on the compressed size after
|
||||
deflation of sourceLen bytes. It must be called after deflateInit() or
|
||||
@@ -778,9 +771,6 @@ ZEXTERN z_size_t ZEXPORT deflateBound_z(z_streamp strm, z_size_t sourceLen);
|
||||
to return Z_STREAM_END. Note that it is possible for the compressed size to
|
||||
be larger than the value returned by deflateBound() if flush options other
|
||||
than Z_FINISH or Z_NO_FLUSH are used.
|
||||
|
||||
delfateBound_z() is the same, but takes and returns a size_t length. Note
|
||||
that a long is 32 bits on Windows.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT deflatePending(z_streamp strm,
|
||||
@@ -795,21 +785,6 @@ ZEXTERN int ZEXPORT deflatePending(z_streamp strm,
|
||||
or bits are Z_NULL, then those values are not set.
|
||||
|
||||
deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
|
||||
stream state was inconsistent. If an int is 16 bits and memLevel is 9, then
|
||||
it is possible for the number of pending bytes to not fit in an unsigned. In
|
||||
that case Z_BUF_ERROR is returned and *pending is set to the maximum value
|
||||
of an unsigned.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT deflateUsed(z_streamp strm,
|
||||
int *bits);
|
||||
/*
|
||||
deflateUsed() returns in *bits the most recent number of deflate bits used
|
||||
in the last byte when flushing to a byte boundary. The result is in 1..8, or
|
||||
0 if there has not yet been a flush. This helps determine the location of
|
||||
the last bit of a deflate stream.
|
||||
|
||||
deflateUsed returns Z_OK if success, or Z_STREAM_ERROR if the source
|
||||
stream state was inconsistent.
|
||||
*/
|
||||
|
||||
@@ -1012,15 +987,13 @@ ZEXTERN int ZEXPORT inflatePrime(z_streamp strm,
|
||||
int bits,
|
||||
int value);
|
||||
/*
|
||||
This function inserts bits in the inflate input stream. The intent is to
|
||||
use inflatePrime() to start inflating at a bit position in the middle of a
|
||||
byte. The provided bits will be used before any bytes are used from
|
||||
next_in. This function should be used with raw inflate, before the first
|
||||
inflate() call, after inflateInit2() or inflateReset(). It can also be used
|
||||
after an inflate() return indicates the end of a deflate block or header
|
||||
when using Z_BLOCK. bits must be less than or equal to 16, and that many of
|
||||
the least significant bits of value will be inserted in the input. The
|
||||
other bits in value can be non-zero, and will be ignored.
|
||||
This function inserts bits in the inflate input stream. The intent is
|
||||
that this function is used to start inflating at a bit position in the
|
||||
middle of a byte. The provided bits will be used before any bytes are used
|
||||
from next_in. This function should only be used with raw inflate, and
|
||||
should be used before the first inflate() call after inflateInit2() or
|
||||
inflateReset(). bits must be less than or equal to 16, and that many of the
|
||||
least significant bits of value will be inserted in the input.
|
||||
|
||||
If bits is negative, then the input stream bit buffer is emptied. Then
|
||||
inflatePrime() can be called again to put bits in the buffer. This is used
|
||||
@@ -1028,15 +1001,7 @@ ZEXTERN int ZEXPORT inflatePrime(z_streamp strm,
|
||||
to feeding inflate codes.
|
||||
|
||||
inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
|
||||
stream state was inconsistent, or if bits is out of range. If inflate was
|
||||
in the middle of processing a header, trailer, or stored block lengths, then
|
||||
it is possible for there to be only eight bits available in the bit buffer.
|
||||
In that case, bits > 8 is considered out of range. However, when used as
|
||||
outlined above, there will always be 16 bits available in the buffer for
|
||||
insertion. As noted in its documentation above, inflate records the number
|
||||
of bits in the bit buffer on return in data_type. 32 minus that is the
|
||||
number of bits available for insertion. inflatePrime does not update
|
||||
data_type with the new number of bits in buffer.
|
||||
stream state was inconsistent.
|
||||
*/
|
||||
|
||||
ZEXTERN long ZEXPORT inflateMark(z_streamp strm);
|
||||
@@ -1082,22 +1047,20 @@ ZEXTERN int ZEXPORT inflateGetHeader(z_streamp strm,
|
||||
|
||||
The text, time, xflags, and os fields are filled in with the gzip header
|
||||
contents. hcrc is set to true if there is a header CRC. (The header CRC
|
||||
was valid if done is set to one.) The extra, name, and comment pointers
|
||||
much each be either Z_NULL or point to space to store that information from
|
||||
the header. If extra is not Z_NULL, then extra_max contains the maximum
|
||||
number of bytes that can be written to extra. Once done is true, extra_len
|
||||
contains the actual extra field length, and extra contains the extra field,
|
||||
or that field truncated if extra_max is less than extra_len. If name is not
|
||||
Z_NULL, then up to name_max characters, including the terminating zero, are
|
||||
written there. If comment is not Z_NULL, then up to comm_max characters,
|
||||
including the terminating zero, are written there. The application can tell
|
||||
that the name or comment did not fit in the provided space by the absence of
|
||||
a terminating zero. If any of extra, name, or comment are not present in
|
||||
the header, then that field's pointer is set to Z_NULL. This allows the use
|
||||
of deflateSetHeader() with the returned structure to duplicate the header.
|
||||
Note that if those fields initially pointed to allocated memory, then the
|
||||
application will need to save them elsewhere so that they can be eventually
|
||||
freed.
|
||||
was valid if done is set to one.) If extra is not Z_NULL, then extra_max
|
||||
contains the maximum number of bytes to write to extra. Once done is true,
|
||||
extra_len contains the actual extra field length, and extra contains the
|
||||
extra field, or that field truncated if extra_max is less than extra_len.
|
||||
If name is not Z_NULL, then up to name_max characters are written there,
|
||||
terminated with a zero unless the length is greater than name_max. If
|
||||
comment is not Z_NULL, then up to comm_max characters are written there,
|
||||
terminated with a zero unless the length is greater than comm_max. When any
|
||||
of extra, name, or comment are not Z_NULL and the respective field is not
|
||||
present in the header, then that field is set to Z_NULL to signal its
|
||||
absence. This allows the use of deflateSetHeader() with the returned
|
||||
structure to duplicate the header. However if those fields are set to
|
||||
allocated memory, then the application will need to save those pointers
|
||||
elsewhere so that they can be eventually freed.
|
||||
|
||||
If inflateGetHeader is not used, then the header information is simply
|
||||
discarded. The header is always checked for validity, including the header
|
||||
@@ -1245,14 +1208,13 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags(void);
|
||||
21: FASTEST -- deflate algorithm with only one, lowest compression level
|
||||
22,23: 0 (reserved)
|
||||
|
||||
The sprintf variant used by gzprintf (all zeros is best):
|
||||
The sprintf variant used by gzprintf (zero is best):
|
||||
24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
|
||||
25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() is not secure!
|
||||
25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
|
||||
26: 0 = returns value, 1 = void -- 1 means inferred string length returned
|
||||
27: 0 = gzprintf() present, 1 = not -- 1 means gzprintf() returns an error
|
||||
|
||||
Remainder:
|
||||
28-31: 0 (reserved)
|
||||
27-31: 0 (reserved)
|
||||
*/
|
||||
|
||||
#ifndef Z_SOLO
|
||||
@@ -1264,14 +1226,11 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags(void);
|
||||
stream-oriented functions. To simplify the interface, some default options
|
||||
are assumed (compression level and memory usage, standard memory allocation
|
||||
functions). The source code of these utility functions can be modified if
|
||||
you need special options. The _z versions of the functions use the size_t
|
||||
type for lengths. Note that a long is 32 bits on Windows.
|
||||
you need special options.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT compress(Bytef *dest, uLongf *destLen,
|
||||
ZEXTERN int ZEXPORT compress(Bytef *dest, uLongf *destLen,
|
||||
const Bytef *source, uLong sourceLen);
|
||||
ZEXTERN int ZEXPORT compress_z(Bytef *dest, z_size_t *destLen,
|
||||
const Bytef *source, z_size_t sourceLen);
|
||||
/*
|
||||
Compresses the source buffer into the destination buffer. sourceLen is
|
||||
the byte length of the source buffer. Upon entry, destLen is the total size
|
||||
@@ -1285,12 +1244,9 @@ ZEXTERN int ZEXPORT compress_z(Bytef *dest, z_size_t *destLen,
|
||||
buffer.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT compress2(Bytef *dest, uLongf *destLen,
|
||||
ZEXTERN int ZEXPORT compress2(Bytef *dest, uLongf *destLen,
|
||||
const Bytef *source, uLong sourceLen,
|
||||
int level);
|
||||
ZEXTERN int ZEXPORT compress2_z(Bytef *dest, z_size_t *destLen,
|
||||
const Bytef *source, z_size_t sourceLen,
|
||||
int level);
|
||||
/*
|
||||
Compresses the source buffer into the destination buffer. The level
|
||||
parameter has the same meaning as in deflateInit. sourceLen is the byte
|
||||
@@ -1305,24 +1261,21 @@ ZEXTERN int ZEXPORT compress2_z(Bytef *dest, z_size_t *destLen,
|
||||
*/
|
||||
|
||||
ZEXTERN uLong ZEXPORT compressBound(uLong sourceLen);
|
||||
ZEXTERN z_size_t ZEXPORT compressBound_z(z_size_t sourceLen);
|
||||
/*
|
||||
compressBound() returns an upper bound on the compressed size after
|
||||
compress() or compress2() on sourceLen bytes. It would be used before a
|
||||
compress() or compress2() call to allocate the destination buffer.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT uncompress(Bytef *dest, uLongf *destLen,
|
||||
ZEXTERN int ZEXPORT uncompress(Bytef *dest, uLongf *destLen,
|
||||
const Bytef *source, uLong sourceLen);
|
||||
ZEXTERN int ZEXPORT uncompress_z(Bytef *dest, z_size_t *destLen,
|
||||
const Bytef *source, z_size_t sourceLen);
|
||||
/*
|
||||
Decompresses the source buffer into the destination buffer. sourceLen is
|
||||
the byte length of the source buffer. On entry, *destLen is the total size
|
||||
the byte length of the source buffer. Upon entry, destLen is the total size
|
||||
of the destination buffer, which must be large enough to hold the entire
|
||||
uncompressed data. (The size of the uncompressed data must have been saved
|
||||
previously by the compressor and transmitted to the decompressor by some
|
||||
mechanism outside the scope of this compression library.) On exit, *destLen
|
||||
mechanism outside the scope of this compression library.) Upon exit, destLen
|
||||
is the actual size of the uncompressed data.
|
||||
|
||||
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
|
||||
@@ -1332,10 +1285,8 @@ ZEXTERN int ZEXPORT uncompress_z(Bytef *dest, z_size_t *destLen,
|
||||
buffer with the uncompressed data up to that point.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen,
|
||||
ZEXTERN int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen,
|
||||
const Bytef *source, uLong *sourceLen);
|
||||
ZEXTERN int ZEXPORT uncompress2_z(Bytef *dest, z_size_t *destLen,
|
||||
const Bytef *source, z_size_t *sourceLen);
|
||||
/*
|
||||
Same as uncompress, except that sourceLen is a pointer, where the
|
||||
length of the source is *sourceLen. On return, *sourceLen is the number of
|
||||
@@ -1363,17 +1314,13 @@ ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode);
|
||||
'R' for run-length encoding as in "wb1R", or 'F' for fixed code compression
|
||||
as in "wb9F". (See the description of deflateInit2 for more information
|
||||
about the strategy parameter.) 'T' will request transparent writing or
|
||||
appending with no compression and not using the gzip format. 'T' cannot be
|
||||
used to force transparent reading. Transparent reading is automatically
|
||||
performed if there is no gzip header at the start. Transparent reading can
|
||||
be disabled with the 'G' option, which will instead return an error if there
|
||||
is no gzip header. 'N' will open the file in non-blocking mode.
|
||||
appending with no compression and not using the gzip format.
|
||||
|
||||
'a' can be used instead of 'w' to request that the gzip stream that will
|
||||
be written be appended to the file. '+' will result in an error, since
|
||||
"a" can be used instead of "w" to request that the gzip stream that will
|
||||
be written be appended to the file. "+" will result in an error, since
|
||||
reading and writing to the same gzip file is not supported. The addition of
|
||||
'x' when writing will create the file exclusively, which fails if the file
|
||||
already exists. On systems that support it, the addition of 'e' when
|
||||
"x" when writing will create the file exclusively, which fails if the file
|
||||
already exists. On systems that support it, the addition of "e" when
|
||||
reading or writing will set the flag to close the file on an execve() call.
|
||||
|
||||
These functions, as well as gzip, will read and decode a sequence of gzip
|
||||
@@ -1392,22 +1339,14 @@ ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode);
|
||||
insufficient memory to allocate the gzFile state, or if an invalid mode was
|
||||
specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
|
||||
errno can be checked to determine if the reason gzopen failed was that the
|
||||
file could not be opened. Note that if 'N' is in mode for non-blocking, the
|
||||
open() itself can fail in order to not block. In that case gzopen() will
|
||||
return NULL and errno will be EAGAIN or ENONBLOCK. The call to gzopen() can
|
||||
then be re-tried. If the application would like to block on opening the
|
||||
file, then it can use open() without O_NONBLOCK, and then gzdopen() with the
|
||||
resulting file descriptor and 'N' in the mode, which will set it to non-
|
||||
blocking.
|
||||
file could not be opened.
|
||||
*/
|
||||
|
||||
ZEXTERN gzFile ZEXPORT gzdopen(int fd, const char *mode);
|
||||
/*
|
||||
Associate a gzFile with the file descriptor fd. File descriptors are
|
||||
obtained from calls like open, dup, creat, pipe or fileno (if the file has
|
||||
been previously opened with fopen). The mode parameter is as in gzopen. An
|
||||
'e' in mode will set fd's flag to close the file on an execve() call. An 'N'
|
||||
in mode will set fd's non-blocking flag.
|
||||
been previously opened with fopen). The mode parameter is as in gzopen.
|
||||
|
||||
The next call of gzclose on the returned gzFile will also close the file
|
||||
descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
|
||||
@@ -1477,16 +1416,10 @@ ZEXTERN int ZEXPORT gzread(gzFile file, voidp buf, unsigned len);
|
||||
stream. Alternatively, gzerror can be used before gzclose to detect this
|
||||
case.
|
||||
|
||||
gzread can be used to read a gzip file on a non-blocking device. If the
|
||||
input stalls and there is no uncompressed data to return, then gzread() will
|
||||
return -1, and errno will be EAGAIN or EWOULDBLOCK. gzread() can then be
|
||||
called again.
|
||||
|
||||
gzread returns the number of uncompressed bytes actually read, less than
|
||||
len for end of file, or -1 for error. If len is too large to fit in an int,
|
||||
then nothing is read, -1 is returned, and the error state is set to
|
||||
Z_STREAM_ERROR. If some data was read before an error, then that data is
|
||||
returned until exhausted, after which the next call will signal the error.
|
||||
Z_STREAM_ERROR.
|
||||
*/
|
||||
|
||||
ZEXTERN z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems,
|
||||
@@ -1510,20 +1443,15 @@ ZEXTERN z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems,
|
||||
multiple of size, then the final partial item is nevertheless read into buf
|
||||
and the end-of-file flag is set. The length of the partial item read is not
|
||||
provided, but could be inferred from the result of gztell(). This behavior
|
||||
is the same as that of fread() implementations in common libraries. This
|
||||
could result in data loss if used with size != 1 when reading a concurrently
|
||||
written file or a non-blocking file. In that case, use size == 1 or gzread()
|
||||
instead.
|
||||
is the same as the behavior of fread() implementations in common libraries,
|
||||
but it prevents the direct use of gzfread() to read a concurrently written
|
||||
file, resetting and retrying on end-of-file, when size is not 1.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len);
|
||||
/*
|
||||
Compress and write the len uncompressed bytes at buf to file. gzwrite
|
||||
returns the number of uncompressed bytes written, or 0 in case of error or
|
||||
if len is 0. If the write destination is non-blocking, then gzwrite() may
|
||||
return a number of bytes written that is not 0 and less than len.
|
||||
|
||||
If len does not fit in an int, then 0 is returned and nothing is written.
|
||||
returns the number of uncompressed bytes written or 0 in case of error.
|
||||
*/
|
||||
|
||||
ZEXTERN z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size,
|
||||
@@ -1538,18 +1466,9 @@ ZEXTERN z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size,
|
||||
if there was an error. If the multiplication of size and nitems overflows,
|
||||
i.e. the product does not fit in a z_size_t, then nothing is written, zero
|
||||
is returned, and the error state is set to Z_STREAM_ERROR.
|
||||
|
||||
If writing a concurrently read file or a non-blocking file with size != 1,
|
||||
a partial item could be written, with no way of knowing how much of it was
|
||||
not written, resulting in data loss. In that case, use size == 1 or
|
||||
gzwrite() instead.
|
||||
*/
|
||||
|
||||
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...);
|
||||
#else
|
||||
ZEXTERN int ZEXPORTVA gzprintf();
|
||||
#endif
|
||||
/*
|
||||
Convert, format, compress, and write the arguments (...) to file under
|
||||
control of the string format, as in fprintf. gzprintf returns the number of
|
||||
@@ -1557,19 +1476,11 @@ ZEXTERN int ZEXPORTVA gzprintf();
|
||||
of error. The number of uncompressed bytes written is limited to 8191, or
|
||||
one less than the buffer size given to gzbuffer(). The caller should assure
|
||||
that this limit is not exceeded. If it is exceeded, then gzprintf() will
|
||||
return an error (0) with nothing written.
|
||||
|
||||
In that last case, there may also be a buffer overflow with unpredictable
|
||||
consequences, which is possible only if zlib was compiled with the insecure
|
||||
functions sprintf() or vsprintf(), because the secure snprintf() and
|
||||
vsnprintf() functions were not available. That would only be the case for
|
||||
a non-ANSI C compiler. zlib may have been built without gzprintf() because
|
||||
secure functions were not available and having gzprintf() be insecure was
|
||||
not an option, in which case, gzprintf() returns Z_STREAM_ERROR. All of
|
||||
these possibilities can be determined using zlibCompileFlags().
|
||||
|
||||
If a Z_BUF_ERROR is returned, then nothing was written due to a stall on
|
||||
the non-blocking write destination.
|
||||
return an error (0) with nothing written. In this case, there may also be a
|
||||
buffer overflow with unpredictable consequences, which is possible only if
|
||||
zlib was compiled with the insecure functions sprintf() or vsprintf(),
|
||||
because the secure snprintf() or vsnprintf() functions were not available.
|
||||
This can be determined using zlibCompileFlags().
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s);
|
||||
@@ -1578,11 +1489,6 @@ ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s);
|
||||
the terminating null character.
|
||||
|
||||
gzputs returns the number of characters written, or -1 in case of error.
|
||||
The number of characters written may be less than the length of the string
|
||||
if the write destination is non-blocking.
|
||||
|
||||
If the length of the string does not fit in an int, then -1 is returned
|
||||
and nothing is written.
|
||||
*/
|
||||
|
||||
ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len);
|
||||
@@ -1595,13 +1501,8 @@ ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len);
|
||||
left untouched.
|
||||
|
||||
gzgets returns buf which is a null-terminated string, or it returns NULL
|
||||
for end-of-file or in case of error. If some data was read before an error,
|
||||
then that data is returned until exhausted, after which the next call will
|
||||
return NULL to signal the error.
|
||||
|
||||
gzgets can be used on a file being concurrently written, and on a non-
|
||||
blocking device, both as for gzread(). However lines may be broken in the
|
||||
middle, leaving it up to the application to reassemble them as needed.
|
||||
for end-of-file or in case of error. If there was an error, the contents at
|
||||
buf are indeterminate.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzputc(gzFile file, int c);
|
||||
@@ -1612,19 +1513,11 @@ ZEXTERN int ZEXPORT gzputc(gzFile file, int c);
|
||||
|
||||
ZEXTERN int ZEXPORT gzgetc(gzFile file);
|
||||
/*
|
||||
Read and decompress one byte from file. gzgetc returns this byte or -1 in
|
||||
case of end of file or error. If some data was read before an error, then
|
||||
that data is returned until exhausted, after which the next call will return
|
||||
-1 to signal the error.
|
||||
|
||||
This is implemented as a macro for speed. As such, it does not do all of
|
||||
the checking the other functions do. I.e. it does not check to see if file
|
||||
is NULL, nor whether the structure file points to has been clobbered or not.
|
||||
|
||||
gzgetc can be used to read a gzip file on a non-blocking device. If the
|
||||
input stalls and there is no uncompressed data to return, then gzgetc() will
|
||||
return -1, and errno will be EAGAIN or EWOULDBLOCK. gzread() can then be
|
||||
called again.
|
||||
Read and decompress one byte from file. gzgetc returns this byte or -1
|
||||
in case of end of file or error. This is implemented as a macro for speed.
|
||||
As such, it does not do all of the checking the other functions do. I.e.
|
||||
it does not check to see if file is NULL, nor whether the structure file
|
||||
points to has been clobbered or not.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzungetc(int c, gzFile file);
|
||||
@@ -1637,11 +1530,6 @@ ZEXTERN int ZEXPORT gzungetc(int c, gzFile file);
|
||||
output buffer size of pushed characters is allowed. (See gzbuffer above.)
|
||||
The pushed character will be discarded if the stream is repositioned with
|
||||
gzseek() or gzrewind().
|
||||
|
||||
gzungetc(-1, file) will force any pending seek to execute. Then gztell()
|
||||
will report the position, even if the requested seek reached end of file.
|
||||
This can be used to determine the number of uncompressed bytes in a gzip
|
||||
file without having to read it into a buffer.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzflush(gzFile file, int flush);
|
||||
@@ -1671,8 +1559,7 @@ ZEXTERN z_off_t ZEXPORT gzseek(gzFile file,
|
||||
If the file is opened for reading, this function is emulated but can be
|
||||
extremely slow. If the file is opened for writing, only forward seeks are
|
||||
supported; gzseek then compresses a sequence of zeroes up to the new
|
||||
starting position. For reading or writing, any actual seeking is deferred
|
||||
until the next read or write operation, or close operation when writing.
|
||||
starting position.
|
||||
|
||||
gzseek returns the resulting offset location as measured in bytes from
|
||||
the beginning of the uncompressed stream, or -1 in case of error, in
|
||||
@@ -1680,7 +1567,7 @@ ZEXTERN z_off_t ZEXPORT gzseek(gzFile file,
|
||||
would be before the current position.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzrewind(gzFile file);
|
||||
ZEXTERN int ZEXPORT gzrewind(gzFile file);
|
||||
/*
|
||||
Rewind file. This function is supported only for reading.
|
||||
|
||||
@@ -1688,7 +1575,7 @@ ZEXTERN int ZEXPORT gzrewind(gzFile file);
|
||||
*/
|
||||
|
||||
/*
|
||||
ZEXTERN z_off_t ZEXPORT gztell(gzFile file);
|
||||
ZEXTERN z_off_t ZEXPORT gztell(gzFile file);
|
||||
|
||||
Return the starting position for the next gzread or gzwrite on file.
|
||||
This position represents a number of bytes in the uncompressed data stream,
|
||||
@@ -1733,11 +1620,8 @@ ZEXTERN int ZEXPORT gzdirect(gzFile file);
|
||||
|
||||
If gzdirect() is used immediately after gzopen() or gzdopen() it will
|
||||
cause buffers to be allocated to allow reading the file to determine if it
|
||||
is a gzip file. Therefore if gzbuffer() is used, it should be called before
|
||||
gzdirect(). If the input is being written concurrently or the device is non-
|
||||
blocking, then gzdirect() may give a different answer once four bytes of
|
||||
input have been accumulated, which is what is needed to confirm or deny a
|
||||
gzip header. Before this, gzdirect() will return true (1).
|
||||
is a gzip file. Therefore if gzbuffer() is used, it should be called before
|
||||
gzdirect().
|
||||
|
||||
When writing, gzdirect() returns true (1) if transparent writing was
|
||||
requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note:
|
||||
@@ -1747,7 +1631,7 @@ ZEXTERN int ZEXPORT gzdirect(gzFile file);
|
||||
gzip file reading and decompression, which may not be desired.)
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzclose(gzFile file);
|
||||
ZEXTERN int ZEXPORT gzclose(gzFile file);
|
||||
/*
|
||||
Flush all pending output for file, if necessary, close file and
|
||||
deallocate the (de)compression state. Note that once file is closed, you
|
||||
@@ -1775,10 +1659,9 @@ ZEXTERN int ZEXPORT gzclose_w(gzFile file);
|
||||
ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum);
|
||||
/*
|
||||
Return the error message for the last error which occurred on file.
|
||||
If errnum is not NULL, *errnum is set to zlib error number. If an error
|
||||
occurred in the file system and not in the compression library, *errnum is
|
||||
set to Z_ERRNO and the application may consult errno to get the exact error
|
||||
code.
|
||||
errnum is set to zlib error number. If an error occurred in the file system
|
||||
and not in the compression library, errnum is set to Z_ERRNO and the
|
||||
application may consult errno to get the exact error code.
|
||||
|
||||
The application must not modify the returned string. Future calls to
|
||||
this function may invalidate the previously returned string. If file is
|
||||
@@ -1829,8 +1712,7 @@ ZEXTERN uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len);
|
||||
ZEXTERN uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf,
|
||||
z_size_t len);
|
||||
/*
|
||||
Same as adler32(), but with a size_t length. Note that a long is 32 bits
|
||||
on Windows.
|
||||
Same as adler32(), but with a size_t length.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -1866,8 +1748,7 @@ ZEXTERN uLong ZEXPORT crc32(uLong crc, const Bytef *buf, uInt len);
|
||||
ZEXTERN uLong ZEXPORT crc32_z(uLong crc, const Bytef *buf,
|
||||
z_size_t len);
|
||||
/*
|
||||
Same as crc32(), but with a size_t length. Note that a long is 32 bits on
|
||||
Windows.
|
||||
Same as crc32(), but with a size_t length.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -1877,14 +1758,14 @@ ZEXTERN uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2);
|
||||
seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
|
||||
calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
|
||||
check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
|
||||
len2. len2 must be non-negative, otherwise zero is returned.
|
||||
len2. len2 must be non-negative.
|
||||
*/
|
||||
|
||||
/*
|
||||
ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2);
|
||||
|
||||
Return the operator corresponding to length len2, to be used with
|
||||
crc32_combine_op(). len2 must be non-negative, otherwise zero is returned.
|
||||
crc32_combine_op(). len2 must be non-negative.
|
||||
*/
|
||||
|
||||
ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op);
|
||||
@@ -2007,9 +1888,9 @@ ZEXTERN int ZEXPORT gzgetc_(gzFile file); /* backward compatibility */
|
||||
ZEXTERN z_off_t ZEXPORT gzseek64(gzFile, z_off_t, int);
|
||||
ZEXTERN z_off_t ZEXPORT gztell64(gzFile);
|
||||
ZEXTERN z_off_t ZEXPORT gzoffset64(gzFile);
|
||||
ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
|
||||
ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
|
||||
ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
|
||||
ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t);
|
||||
ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t);
|
||||
ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t);
|
||||
# endif
|
||||
#else
|
||||
ZEXTERN gzFile ZEXPORT gzopen(const char *, const char *);
|
||||
|
||||
BIN
Binary file not shown.
@@ -18,21 +18,21 @@ extern "C" {
|
||||
*
|
||||
* the version string like "1.2.3"
|
||||
*/
|
||||
#define LIBEXSLT_DOTTED_VERSION "0.8.24"
|
||||
#define LIBEXSLT_DOTTED_VERSION "0.8.23"
|
||||
|
||||
/**
|
||||
* LIBEXSLT_VERSION:
|
||||
*
|
||||
* the version number: 1.2.3 value is 10203
|
||||
*/
|
||||
#define LIBEXSLT_VERSION 824
|
||||
#define LIBEXSLT_VERSION 823
|
||||
|
||||
/**
|
||||
* LIBEXSLT_VERSION_STRING:
|
||||
*
|
||||
* the version number string, 1.2.3 value is "10203"
|
||||
*/
|
||||
#define LIBEXSLT_VERSION_STRING "824"
|
||||
#define LIBEXSLT_VERSION_STRING "823"
|
||||
|
||||
/**
|
||||
* LIBEXSLT_VERSION_EXTRA:
|
||||
|
||||
@@ -21,11 +21,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Backward compatibility
|
||||
*/
|
||||
#define UTF8ToHtml htmlUTF8ToHtml
|
||||
|
||||
/*
|
||||
* Most of the back-end structures from XML and HTML are shared.
|
||||
*/
|
||||
@@ -47,22 +42,31 @@ typedef struct _htmlElemDesc htmlElemDesc;
|
||||
typedef htmlElemDesc *htmlElemDescPtr;
|
||||
struct _htmlElemDesc {
|
||||
const char *name; /* The tag name */
|
||||
char startTag; /* unused */
|
||||
char startTag; /* Whether the start tag can be implied */
|
||||
char endTag; /* Whether the end tag can be implied */
|
||||
char saveEndTag; /* Whether the end tag should be saved */
|
||||
char empty; /* Is this an empty element ? */
|
||||
char depr; /* unused */
|
||||
char dtd; /* unused */
|
||||
char depr; /* Is this a deprecated element ? */
|
||||
char dtd; /* 1: only in Loose DTD, 2: only Frameset one */
|
||||
char isinline; /* is this a block 0 or inline 1 element */
|
||||
const char *desc; /* the description */
|
||||
|
||||
const char** subelts XML_DEPRECATED_MEMBER;
|
||||
const char* defaultsubelt XML_DEPRECATED_MEMBER;
|
||||
const char** attrs_opt XML_DEPRECATED_MEMBER;
|
||||
const char** attrs_depr XML_DEPRECATED_MEMBER;
|
||||
const char** attrs_req XML_DEPRECATED_MEMBER;
|
||||
|
||||
int dataMode;
|
||||
/* NRK Jan.2003
|
||||
* New fields encapsulating HTML structure
|
||||
*
|
||||
* Bugs:
|
||||
* This is a very limited representation. It fails to tell us when
|
||||
* an element *requires* subelements (we only have whether they're
|
||||
* allowed or not), and it doesn't tell us where CDATA and PCDATA
|
||||
* are allowed. Some element relationships are not fully represented:
|
||||
* these are flagged with the word MODIFIER
|
||||
*/
|
||||
const char** subelts; /* allowed sub-elements of this element */
|
||||
const char* defaultsubelt; /* subelement for suggested auto-repair
|
||||
if necessary or NULL */
|
||||
const char** attrs_opt; /* Optional Attributes */
|
||||
const char** attrs_depr; /* Additional deprecated attributes */
|
||||
const char** attrs_req; /* Required attributes */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -76,12 +80,22 @@ struct _htmlEntityDesc {
|
||||
const char *desc; /* the description */
|
||||
};
|
||||
|
||||
/** DOC_DISABLE */
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
#define XML_GLOBALS_HTML \
|
||||
XML_OP(htmlDefaultSAXHandler, xmlSAXHandlerV1, XML_DEPRECATED)
|
||||
#else
|
||||
#define XML_GLOBALS_HTML
|
||||
#endif
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBVAR const xmlSAXHandlerV1 htmlDefaultSAXHandler;
|
||||
#define XML_OP XML_DECLARE_GLOBAL
|
||||
XML_GLOBALS_HTML
|
||||
#undef XML_OP
|
||||
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
||||
#define htmlDefaultSAXHandler XML_GLOBAL_MACRO(htmlDefaultSAXHandler)
|
||||
#endif
|
||||
/** DOC_ENABLE */
|
||||
|
||||
/*
|
||||
* There is only few public functions.
|
||||
@@ -96,11 +110,9 @@ XMLPUBFUN const htmlEntityDesc *
|
||||
XMLPUBFUN const htmlEntityDesc *
|
||||
htmlEntityValueLookup(unsigned int value);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
htmlIsAutoClosed(htmlDocPtr doc,
|
||||
htmlNodePtr elem);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
htmlAutoCloseTag(htmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
@@ -150,7 +162,7 @@ XMLPUBFUN htmlDocPtr
|
||||
htmlParseFile (const char *filename,
|
||||
const char *encoding);
|
||||
XMLPUBFUN int
|
||||
htmlUTF8ToHtml (unsigned char *out,
|
||||
UTF8ToHtml (unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
int *inlen);
|
||||
@@ -161,7 +173,6 @@ XMLPUBFUN int
|
||||
int *inlen, int quoteChar);
|
||||
XMLPUBFUN int
|
||||
htmlIsScriptAttribute(const xmlChar *name);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
htmlHandleOmittedElem(int val);
|
||||
|
||||
@@ -196,26 +207,20 @@ XMLPUBFUN void
|
||||
* to the xmlReadDoc() and similar calls.
|
||||
*/
|
||||
typedef enum {
|
||||
HTML_PARSE_RECOVER = 1<<0, /* No effect */
|
||||
HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */
|
||||
HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */
|
||||
HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */
|
||||
HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */
|
||||
HTML_PARSE_PEDANTIC = 1<<7, /* No effect */
|
||||
HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
|
||||
HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
|
||||
HTML_PARSE_NONET = 1<<11,/* No effect */
|
||||
HTML_PARSE_NONET = 1<<11,/* Forbid network access */
|
||||
HTML_PARSE_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */
|
||||
HTML_PARSE_COMPACT = 1<<16,/* compact small text nodes */
|
||||
HTML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */
|
||||
HTML_PARSE_IGNORE_ENC=1<<21,/* ignore internal document encoding hint */
|
||||
HTML_PARSE_BIG_LINES= 1<<22,/* Store big lines numbers in text PSVI field */
|
||||
HTML_PARSE_HTML5 = 1<<26 /* HTML5 support */
|
||||
HTML_PARSE_IGNORE_ENC=1<<21 /* ignore internal document encoding hint */
|
||||
} htmlParserOption;
|
||||
|
||||
XMLPUBFUN void
|
||||
htmlCtxtReset (htmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int
|
||||
htmlCtxtSetOptions (htmlParserCtxtPtr ctxt,
|
||||
int options);
|
||||
XMLPUBFUN int
|
||||
htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
|
||||
int options);
|
||||
@@ -246,9 +251,6 @@ XMLPUBFUN htmlDocPtr
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlCtxtParseDocument (htmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr input);
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *cur,
|
||||
@@ -282,7 +284,7 @@ XMLPUBFUN htmlDocPtr
|
||||
const char *encoding,
|
||||
int options);
|
||||
|
||||
/* deprecated content model
|
||||
/* NRK/Jan2003: further knowledge of HTML structure
|
||||
*/
|
||||
typedef enum {
|
||||
HTML_NA = 0 , /* something we don't check at all */
|
||||
@@ -295,14 +297,10 @@ typedef enum {
|
||||
/* Using htmlElemDesc rather than name here, to emphasise the fact
|
||||
that otherwise there's a lookup overhead
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN htmlStatus htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN htmlStatus htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN htmlStatus htmlNodeStatus(htmlNodePtr, int) ;
|
||||
XMLPUBFUN htmlStatus htmlNodeStatus(const htmlNodePtr, int) ;
|
||||
/**
|
||||
* htmlDefaultSubelement:
|
||||
* @elt: HTML element
|
||||
@@ -335,5 +333,11 @@ XMLPUBFUN htmlStatus htmlNodeStatus(htmlNodePtr, int) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else /* LIBXML_HTML_ENABLED */
|
||||
|
||||
/** DOC_DISABLE */
|
||||
#define XML_GLOBALS_HTML
|
||||
/** DOC_ENABLE */
|
||||
|
||||
#endif /* LIBXML_HTML_ENABLED */
|
||||
#endif /* __HTML_PARSER_H__ */
|
||||
|
||||
@@ -133,7 +133,6 @@ XMLPUBFUN void
|
||||
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
htmlIsBooleanAttr (const xmlChar *name);
|
||||
|
||||
|
||||
@@ -8,11 +8,195 @@
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __XML_SAX_H__
|
||||
#define __XML_SAX_H__
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning "libxml/SAX.h is deprecated"
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const xmlChar *
|
||||
getPublicId (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const xmlChar *
|
||||
getSystemId (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
setDocumentLocator (void *ctx,
|
||||
xmlSAXLocatorPtr loc);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
getLineNumber (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
getColumnNumber (void *ctx);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
isStandalone (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
hasInternalSubset (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
hasExternalSubset (void *ctx);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
internalSubset (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
externalSubset (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
getEntity (void *ctx,
|
||||
const xmlChar *name);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
getParameterEntity (void *ctx,
|
||||
const xmlChar *name);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
resolveEntity (void *ctx,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
entityDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId,
|
||||
xmlChar *content);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
attributeDecl (void *ctx,
|
||||
const xmlChar *elem,
|
||||
const xmlChar *fullname,
|
||||
int type,
|
||||
int def,
|
||||
const xmlChar *defaultValue,
|
||||
xmlEnumerationPtr tree);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
elementDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
xmlElementContentPtr content);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
notationDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
unparsedEntityDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId,
|
||||
const xmlChar *notationName);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
startDocument (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
endDocument (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
attribute (void *ctx,
|
||||
const xmlChar *fullname,
|
||||
const xmlChar *value);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
startElement (void *ctx,
|
||||
const xmlChar *fullname,
|
||||
const xmlChar **atts);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
endElement (void *ctx,
|
||||
const xmlChar *name);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
reference (void *ctx,
|
||||
const xmlChar *name);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
characters (void *ctx,
|
||||
const xmlChar *ch,
|
||||
int len);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
ignorableWhitespace (void *ctx,
|
||||
const xmlChar *ch,
|
||||
int len);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
processingInstruction (void *ctx,
|
||||
const xmlChar *target,
|
||||
const xmlChar *data);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
globalNamespace (void *ctx,
|
||||
const xmlChar *href,
|
||||
const xmlChar *prefix);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
setNamespace (void *ctx,
|
||||
const xmlChar *name);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlNsPtr
|
||||
getNamespace (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
checkNamespace (void *ctx,
|
||||
xmlChar *nameSpace);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
namespaceDecl (void *ctx,
|
||||
const xmlChar *href,
|
||||
const xmlChar *prefix);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
comment (void *ctx,
|
||||
const xmlChar *value);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
cdataBlock (void *ctx,
|
||||
const xmlChar *value,
|
||||
int len);
|
||||
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
|
||||
int warning);
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
|
||||
#endif
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
|
||||
#endif /* __XML_SAX_H__ */
|
||||
|
||||
@@ -95,15 +95,16 @@ XMLPUBFUN void
|
||||
xmlSAX2StartDocument (void *ctx);
|
||||
XMLPUBFUN void
|
||||
xmlSAX2EndDocument (void *ctx);
|
||||
XML_DEPRECATED
|
||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
|
||||
defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
XMLPUBFUN void
|
||||
xmlSAX2StartElement (void *ctx,
|
||||
const xmlChar *fullname,
|
||||
const xmlChar **atts);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlSAX2EndElement (void *ctx,
|
||||
const xmlChar *name);
|
||||
#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */
|
||||
XMLPUBFUN void
|
||||
xmlSAX2StartElementNs (void *ctx,
|
||||
const xmlChar *localname,
|
||||
|
||||
BIN
Binary file not shown.
@@ -39,7 +39,18 @@ extern "C" {
|
||||
* a) default attributes (if any) are added to all nodes
|
||||
* b) all character and parsed entity references are resolved
|
||||
* In order to achieve this in libxml2 the document MUST be loaded with
|
||||
* following options: XML_PARSE_DTDATTR | XML_PARSE_NOENT
|
||||
* following global settings:
|
||||
*
|
||||
* xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
|
||||
* xmlSubstituteEntitiesDefault(1);
|
||||
*
|
||||
* or corresponding parser context setting:
|
||||
* xmlParserCtxtPtr ctxt;
|
||||
*
|
||||
* ...
|
||||
* ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
|
||||
* ctxt->replaceEntities = 1;
|
||||
* ...
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -161,7 +161,6 @@ XMLPUBFUN xmlChar *
|
||||
*/
|
||||
XMLPUBFUN int
|
||||
xmlCatalogSetDebug (int level);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlCatalogPrefer
|
||||
xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
|
||||
XMLPUBFUN void
|
||||
|
||||
@@ -71,6 +71,144 @@ XMLPUBFUN int
|
||||
xmlDebugCheckDocument (FILE * output,
|
||||
xmlDocPtr doc);
|
||||
|
||||
/****************************************************************
|
||||
* *
|
||||
* XML shell helpers *
|
||||
* *
|
||||
****************************************************************/
|
||||
|
||||
XMLPUBFUN void
|
||||
xmlLsOneNode (FILE *output, xmlNodePtr node);
|
||||
XMLPUBFUN int
|
||||
xmlLsCountNode (xmlNodePtr node);
|
||||
|
||||
XMLPUBFUN const char *
|
||||
xmlBoolToText (int boolval);
|
||||
|
||||
/****************************************************************
|
||||
* *
|
||||
* The XML shell related structures and functions *
|
||||
* *
|
||||
****************************************************************/
|
||||
|
||||
#ifdef LIBXML_XPATH_ENABLED
|
||||
/**
|
||||
* xmlShellReadlineFunc:
|
||||
* @prompt: a string prompt
|
||||
*
|
||||
* This is a generic signature for the XML shell input function.
|
||||
*
|
||||
* Returns a string which will be freed by the Shell.
|
||||
*/
|
||||
typedef char * (* xmlShellReadlineFunc)(char *prompt);
|
||||
|
||||
/**
|
||||
* xmlShellCtxt:
|
||||
*
|
||||
* A debugging shell context.
|
||||
* TODO: add the defined function tables.
|
||||
*/
|
||||
typedef struct _xmlShellCtxt xmlShellCtxt;
|
||||
typedef xmlShellCtxt *xmlShellCtxtPtr;
|
||||
struct _xmlShellCtxt {
|
||||
char *filename;
|
||||
xmlDocPtr doc;
|
||||
xmlNodePtr node;
|
||||
xmlXPathContextPtr pctxt;
|
||||
int loaded;
|
||||
FILE *output;
|
||||
xmlShellReadlineFunc input;
|
||||
};
|
||||
|
||||
/**
|
||||
* xmlShellCmd:
|
||||
* @ctxt: a shell context
|
||||
* @arg: a string argument
|
||||
* @node: a first node
|
||||
* @node2: a second node
|
||||
*
|
||||
* This is a generic signature for the XML shell functions.
|
||||
*
|
||||
* Returns an int, negative returns indicating errors.
|
||||
*/
|
||||
typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
|
||||
XMLPUBFUN void
|
||||
xmlShellPrintXPathError (int errorType,
|
||||
const char *arg);
|
||||
XMLPUBFUN void
|
||||
xmlShellPrintXPathResult(xmlXPathObjectPtr list);
|
||||
XMLPUBFUN int
|
||||
xmlShellList (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int
|
||||
xmlShellBase (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int
|
||||
xmlShellDir (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int
|
||||
xmlShellLoad (xmlShellCtxtPtr ctxt,
|
||||
char *filename,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void
|
||||
xmlShellPrintNode (xmlNodePtr node);
|
||||
XMLPUBFUN int
|
||||
xmlShellCat (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int
|
||||
xmlShellWrite (xmlShellCtxtPtr ctxt,
|
||||
char *filename,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int
|
||||
xmlShellSave (xmlShellCtxtPtr ctxt,
|
||||
char *filename,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
XMLPUBFUN int
|
||||
xmlShellValidate (xmlShellCtxtPtr ctxt,
|
||||
char *dtd,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
XMLPUBFUN int
|
||||
xmlShellDu (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr tree,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int
|
||||
xmlShellPwd (xmlShellCtxtPtr ctxt,
|
||||
char *buffer,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
|
||||
/*
|
||||
* The Shell interface.
|
||||
*/
|
||||
XMLPUBFUN void
|
||||
xmlShell (xmlDocPtr doc,
|
||||
char *filename,
|
||||
xmlShellReadlineFunc input,
|
||||
FILE *output);
|
||||
|
||||
#endif /* LIBXML_XPATH_ENABLED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -23,30 +23,44 @@
|
||||
#define __XML_CHAR_ENCODING_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
|
||||
#ifdef LIBXML_ICONV_ENABLED
|
||||
#include <iconv.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Backward compatibility
|
||||
*/
|
||||
#define UTF8Toisolat1 xmlUTF8ToIsolat1
|
||||
#define isolat1ToUTF8 xmlIsolat1ToUTF8
|
||||
|
||||
typedef enum {
|
||||
XML_ENC_ERR_SUCCESS = 0,
|
||||
XML_ENC_ERR_INTERNAL = -1,
|
||||
XML_ENC_ERR_SPACE = -1,
|
||||
XML_ENC_ERR_INPUT = -2,
|
||||
XML_ENC_ERR_SPACE = -3,
|
||||
XML_ENC_ERR_MEMORY = -4
|
||||
XML_ENC_ERR_PARTIAL = -3,
|
||||
XML_ENC_ERR_INTERNAL = -4,
|
||||
XML_ENC_ERR_MEMORY = -5
|
||||
} xmlCharEncError;
|
||||
|
||||
/*
|
||||
* xmlCharEncoding:
|
||||
*
|
||||
* Predefined values for some standard encodings.
|
||||
* Libxml does not do beforehand translation on UTF8 and ISOLatinX.
|
||||
* It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default.
|
||||
*
|
||||
* Anything else would have to be translated to UTF8 before being
|
||||
* given to the parser itself. The BOM for UTF16 and the encoding
|
||||
* declaration are looked at and a converter is looked for at that
|
||||
* point. If not found the parser stops here as asked by the XML REC. A
|
||||
* converter can be registered by the user using xmlRegisterCharEncodingHandler
|
||||
* but the current form doesn't allow stateful transcoding (a serious
|
||||
* problem agreed !). If iconv has been found it will be used
|
||||
* automatically and allow stateful transcoding, the simplest is then
|
||||
* to be sure to enable iconv and to provide iconv libs for the encoding
|
||||
* support needed.
|
||||
*
|
||||
* Note that the generic "UTF-16" is not a predefined value. Instead, only
|
||||
* the specific UTF-16LE and UTF-16BE are present.
|
||||
*/
|
||||
typedef enum {
|
||||
XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
|
||||
@@ -72,23 +86,9 @@ typedef enum {
|
||||
XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
|
||||
XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
|
||||
XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
|
||||
XML_CHAR_ENCODING_ASCII= 22,/* pure ASCII */
|
||||
/* Available since 2.14.0 */
|
||||
XML_CHAR_ENCODING_UTF16= 23,/* UTF-16 native */
|
||||
XML_CHAR_ENCODING_HTML= 24,/* HTML (output only) */
|
||||
XML_CHAR_ENCODING_8859_10= 25,/* ISO-8859-10 */
|
||||
XML_CHAR_ENCODING_8859_11= 26,/* ISO-8859-11 */
|
||||
XML_CHAR_ENCODING_8859_13= 27,/* ISO-8859-13 */
|
||||
XML_CHAR_ENCODING_8859_14= 28,/* ISO-8859-14 */
|
||||
XML_CHAR_ENCODING_8859_15= 29,/* ISO-8859-15 */
|
||||
XML_CHAR_ENCODING_8859_16= 30 /* ISO-8859-16 */
|
||||
XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */
|
||||
} xmlCharEncoding;
|
||||
|
||||
typedef enum {
|
||||
XML_ENC_INPUT = (1 << 0),
|
||||
XML_ENC_OUTPUT = (1 << 1)
|
||||
} xmlCharEncFlags;
|
||||
|
||||
/**
|
||||
* xmlCharEncodingInputFunc:
|
||||
* @out: a pointer to an array of bytes to store the UTF-8 result
|
||||
@@ -96,15 +96,17 @@ typedef enum {
|
||||
* @in: a pointer to an array of chars in the original encoding
|
||||
* @inlen: the length of @in
|
||||
*
|
||||
* Convert characters to UTF-8.
|
||||
* Take a block of chars in the original encoding and try to convert
|
||||
* it to an UTF-8 block of chars out.
|
||||
*
|
||||
* On success, the value of @inlen after return is the number of
|
||||
* bytes consumed and @outlen is the number of bytes produced.
|
||||
*
|
||||
* Returns the number of bytes written or an XML_ENC_ERR code.
|
||||
* Returns the number of bytes written, -1 if lack of space, or -2
|
||||
* if the transcoding failed.
|
||||
* The value of @inlen after return is the number of octets consumed
|
||||
* if the return value is positive, else unpredictiable.
|
||||
* The value of @outlen after return is the number of octets consumed.
|
||||
*/
|
||||
typedef int (*xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
|
||||
const unsigned char *in, int *inlen);
|
||||
typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
|
||||
const unsigned char *in, int *inlen);
|
||||
|
||||
|
||||
/**
|
||||
@@ -114,92 +116,41 @@ typedef int (*xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
|
||||
* @in: a pointer to an array of UTF-8 chars
|
||||
* @inlen: the length of @in
|
||||
*
|
||||
* Convert characters from UTF-8.
|
||||
* Take a block of UTF-8 chars in and try to convert it to another
|
||||
* encoding.
|
||||
* Note: a first call designed to produce heading info is called with
|
||||
* in = NULL. If stateful this should also initialize the encoder state.
|
||||
*
|
||||
* On success, the value of @inlen after return is the number of
|
||||
* bytes consumed and @outlen is the number of bytes produced.
|
||||
*
|
||||
* Returns the number of bytes written or an XML_ENC_ERR code.
|
||||
* Returns the number of bytes written, -1 if lack of space, or -2
|
||||
* if the transcoding failed.
|
||||
* The value of @inlen after return is the number of octets consumed
|
||||
* if the return value is positive, else unpredictiable.
|
||||
* The value of @outlen after return is the number of octets produced.
|
||||
*/
|
||||
typedef int (*xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
|
||||
const unsigned char *in, int *inlen);
|
||||
typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
|
||||
const unsigned char *in, int *inlen);
|
||||
|
||||
|
||||
/**
|
||||
* xmlCharEncConvFunc:
|
||||
* @vctxt: conversion context
|
||||
* @out: a pointer to an array of bytes to store the result
|
||||
* @outlen: the length of @out
|
||||
* @in: a pointer to an array of input bytes
|
||||
* @inlen: the length of @in
|
||||
* @flush: end of input
|
||||
*
|
||||
* Convert between character encodings.
|
||||
*
|
||||
* The value of @inlen after return is the number of bytes consumed
|
||||
* and @outlen is the number of bytes produced.
|
||||
*
|
||||
* If the converter can consume partial multi-byte sequences, the
|
||||
* @flush flag can be used to detect truncated sequences at EOF.
|
||||
* Otherwise, the flag can be ignored.
|
||||
*
|
||||
* Returns an XML_ENC_ERR code.
|
||||
*/
|
||||
typedef xmlCharEncError
|
||||
(*xmlCharEncConvFunc)(void *vctxt, unsigned char *out, int *outlen,
|
||||
const unsigned char *in, int *inlen, int flush);
|
||||
|
||||
/**
|
||||
* xmlCharEncConvCtxtDtor:
|
||||
* @vctxt: conversion context
|
||||
*
|
||||
* Free a conversion context.
|
||||
*/
|
||||
typedef void
|
||||
(*xmlCharEncConvCtxtDtor)(void *vctxt);
|
||||
|
||||
/*
|
||||
* Block defining the handlers for non UTF-8 encodings.
|
||||
*
|
||||
* This structure will be made private.
|
||||
* If iconv is supported, there are two extra fields.
|
||||
*/
|
||||
typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
|
||||
typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
|
||||
struct _xmlCharEncodingHandler {
|
||||
char *name XML_DEPRECATED_MEMBER;
|
||||
union {
|
||||
xmlCharEncConvFunc func;
|
||||
xmlCharEncodingInputFunc legacyFunc;
|
||||
} input XML_DEPRECATED_MEMBER;
|
||||
union {
|
||||
xmlCharEncConvFunc func;
|
||||
xmlCharEncodingOutputFunc legacyFunc;
|
||||
} output XML_DEPRECATED_MEMBER;
|
||||
void *inputCtxt XML_DEPRECATED_MEMBER;
|
||||
void *outputCtxt XML_DEPRECATED_MEMBER;
|
||||
xmlCharEncConvCtxtDtor ctxtDtor XML_DEPRECATED_MEMBER;
|
||||
int flags XML_DEPRECATED_MEMBER;
|
||||
char *name;
|
||||
xmlCharEncodingInputFunc input;
|
||||
xmlCharEncodingOutputFunc output;
|
||||
#ifdef LIBXML_ICONV_ENABLED
|
||||
iconv_t iconv_in;
|
||||
iconv_t iconv_out;
|
||||
#endif /* LIBXML_ICONV_ENABLED */
|
||||
#ifdef LIBXML_ICU_ENABLED
|
||||
struct _uconv_t *uconv_in;
|
||||
struct _uconv_t *uconv_out;
|
||||
#endif /* LIBXML_ICU_ENABLED */
|
||||
};
|
||||
|
||||
/**
|
||||
* xmlCharEncConvImpl:
|
||||
* @vctxt: user data
|
||||
* @name: encoding name
|
||||
* @flags: bit mask of flags
|
||||
* @out: pointer to resulting handler
|
||||
*
|
||||
* If this function returns XML_ERR_OK, it must fill the @out
|
||||
* pointer with an encoding handler. The handler can be obtained
|
||||
* from xmlCharEncNewCustomHandler.
|
||||
*
|
||||
* @flags can contain XML_ENC_INPUT, XML_ENC_OUTPUT or both.
|
||||
*
|
||||
* Returns an xmlParserErrors code.
|
||||
*/
|
||||
typedef xmlParserErrors
|
||||
(*xmlCharEncConvImpl)(void *vctxt, const char *name, xmlCharEncFlags flags,
|
||||
xmlCharEncodingHandler **out);
|
||||
|
||||
/*
|
||||
* Interfaces for encoding handlers.
|
||||
*/
|
||||
@@ -211,19 +162,6 @@ XMLPUBFUN void
|
||||
xmlCleanupCharEncodingHandlers (void);
|
||||
XMLPUBFUN void
|
||||
xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
|
||||
XMLPUBFUN xmlParserErrors
|
||||
xmlLookupCharEncodingHandler (xmlCharEncoding enc,
|
||||
xmlCharEncodingHandlerPtr *out);
|
||||
XMLPUBFUN xmlParserErrors
|
||||
xmlOpenCharEncodingHandler (const char *name,
|
||||
int output,
|
||||
xmlCharEncodingHandlerPtr *out);
|
||||
XMLPUBFUN xmlParserErrors
|
||||
xmlCreateCharEncodingHandler (const char *name,
|
||||
xmlCharEncFlags flags,
|
||||
xmlCharEncConvImpl impl,
|
||||
void *implCtxt,
|
||||
xmlCharEncodingHandlerPtr *out);
|
||||
XMLPUBFUN xmlCharEncodingHandlerPtr
|
||||
xmlGetCharEncodingHandler (xmlCharEncoding enc);
|
||||
XMLPUBFUN xmlCharEncodingHandlerPtr
|
||||
@@ -232,14 +170,6 @@ XMLPUBFUN xmlCharEncodingHandlerPtr
|
||||
xmlNewCharEncodingHandler (const char *name,
|
||||
xmlCharEncodingInputFunc input,
|
||||
xmlCharEncodingOutputFunc output);
|
||||
XMLPUBFUN xmlParserErrors
|
||||
xmlCharEncNewCustomHandler (const char *name,
|
||||
xmlCharEncConvFunc input,
|
||||
xmlCharEncConvFunc output,
|
||||
xmlCharEncConvCtxtDtor ctxtDtor,
|
||||
void *inputCtxt,
|
||||
void *outputCtxt,
|
||||
xmlCharEncodingHandler **out);
|
||||
|
||||
/*
|
||||
* Interfaces for encoding names and aliases.
|
||||
@@ -265,9 +195,7 @@ XMLPUBFUN xmlCharEncoding
|
||||
xmlDetectCharEncoding (const unsigned char *in,
|
||||
int len);
|
||||
|
||||
/** DOC_DISABLE */
|
||||
struct _xmlBuffer;
|
||||
/** DOC_ENABLE */
|
||||
XMLPUBFUN int
|
||||
xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
|
||||
struct _xmlBuffer *out,
|
||||
@@ -290,13 +218,13 @@ XMLPUBFUN int
|
||||
*/
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN int
|
||||
xmlUTF8ToIsolat1 (unsigned char *out,
|
||||
UTF8Toisolat1 (unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
int *inlen);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN int
|
||||
xmlIsolat1ToUTF8 (unsigned char *out,
|
||||
isolat1ToUTF8 (unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
int *inlen);
|
||||
|
||||
@@ -11,12 +11,10 @@
|
||||
#ifndef __XML_ENTITIES_H__
|
||||
#define __XML_ENTITIES_H__
|
||||
|
||||
/** DOC_DISABLE */
|
||||
#include <libxml/xmlversion.h>
|
||||
#define XML_TREE_INTERNALS
|
||||
#include <libxml/tree.h>
|
||||
#undef XML_TREE_INTERNALS
|
||||
/** DOC_ENABLE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -59,7 +57,7 @@ struct _xmlEntity {
|
||||
|
||||
struct _xmlEntity *nexte; /* unused */
|
||||
const xmlChar *URI; /* the full URI as computed */
|
||||
int owner; /* unused */
|
||||
int owner; /* does the entity own the childrens */
|
||||
int flags; /* various flags */
|
||||
unsigned long expandedSize; /* expanded size */
|
||||
};
|
||||
@@ -76,6 +74,12 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr;
|
||||
* External functions:
|
||||
*/
|
||||
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlInitializePredefinedEntities (void);
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
xmlNewEntity (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
@@ -85,15 +89,6 @@ XMLPUBFUN xmlEntityPtr
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN void
|
||||
xmlFreeEntity (xmlEntityPtr entity);
|
||||
XMLPUBFUN int
|
||||
xmlAddEntity (xmlDocPtr doc,
|
||||
int extSubset,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID,
|
||||
const xmlChar *content,
|
||||
xmlEntityPtr *out);
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
xmlAddDocEntity (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
@@ -119,6 +114,12 @@ XMLPUBFUN xmlEntityPtr
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
xmlGetParameterEntity (xmlDocPtr doc,
|
||||
const xmlChar *name);
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlEncodeEntities (xmlDocPtr doc,
|
||||
const xmlChar *input);
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlEncodeEntitiesReentrant(xmlDocPtr doc,
|
||||
const xmlChar *input);
|
||||
@@ -127,8 +128,10 @@ XMLPUBFUN xmlChar *
|
||||
const xmlChar *input);
|
||||
XMLPUBFUN xmlEntitiesTablePtr
|
||||
xmlCreateEntitiesTable (void);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlEntitiesTablePtr
|
||||
xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void
|
||||
xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
@@ -139,6 +142,11 @@ XMLPUBFUN void
|
||||
xmlDumpEntityDecl (xmlBufferPtr buf,
|
||||
xmlEntityPtr ent);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
XMLPUBFUN void
|
||||
xmlCleanupPredefinedEntities(void);
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -22,4 +22,20 @@
|
||||
#include <libxml/xmlsave.h>
|
||||
#include <libxml/threads.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _xmlGlobalState xmlGlobalState;
|
||||
typedef xmlGlobalState *xmlGlobalStatePtr;
|
||||
|
||||
XML_DEPRECATED XMLPUBFUN void
|
||||
xmlInitializeGlobalState(xmlGlobalStatePtr gs);
|
||||
XML_DEPRECATED XMLPUBFUN
|
||||
xmlGlobalStatePtr xmlGetGlobalState(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __XML_GLOBALS_H */
|
||||
|
||||
@@ -109,10 +109,6 @@ XMLPUBFUN void
|
||||
/*
|
||||
* Add a new entry to the hash table.
|
||||
*/
|
||||
XMLPUBFUN int
|
||||
xmlHashAdd (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
void *userdata);
|
||||
XMLPUBFUN int
|
||||
xmlHashAddEntry (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
@@ -122,11 +118,6 @@ XMLPUBFUN int
|
||||
const xmlChar *name,
|
||||
void *userdata,
|
||||
xmlHashDeallocator dealloc);
|
||||
XMLPUBFUN int
|
||||
xmlHashAdd2 (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
void *userdata);
|
||||
XMLPUBFUN int
|
||||
xmlHashAddEntry2 (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
@@ -138,12 +129,6 @@ XMLPUBFUN int
|
||||
const xmlChar *name2,
|
||||
void *userdata,
|
||||
xmlHashDeallocator dealloc);
|
||||
XMLPUBFUN int
|
||||
xmlHashAdd3 (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *name3,
|
||||
void *userdata);
|
||||
XMLPUBFUN int
|
||||
xmlHashAddEntry3 (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
@@ -214,10 +199,6 @@ XMLPUBFUN void *
|
||||
/*
|
||||
* Helpers.
|
||||
*/
|
||||
XMLPUBFUN xmlHashTablePtr
|
||||
xmlHashCopySafe (xmlHashTablePtr hash,
|
||||
xmlHashCopier copy,
|
||||
xmlHashDeallocator dealloc);
|
||||
XMLPUBFUN xmlHashTablePtr
|
||||
xmlHashCopy (xmlHashTablePtr hash,
|
||||
xmlHashCopier copy);
|
||||
|
||||
@@ -119,10 +119,10 @@ XMLPUBFUN void
|
||||
xmlListMerge (xmlListPtr l1,
|
||||
xmlListPtr l2);
|
||||
XMLPUBFUN xmlListPtr
|
||||
xmlListDup (xmlListPtr old);
|
||||
xmlListDup (const xmlListPtr old);
|
||||
XMLPUBFUN int
|
||||
xmlListCopy (xmlListPtr cur,
|
||||
xmlListPtr old);
|
||||
const xmlListPtr old);
|
||||
/* Link operators */
|
||||
XMLPUBFUN void *
|
||||
xmlLinkGetData (xmlLinkPtr lk);
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
/*
|
||||
* Summary: Removed legacy symbols for an outdated FTP client
|
||||
* Summary: minimal FTP implementation
|
||||
* Description: minimal FTP implementation allowing to fetch resources
|
||||
* like external subset. This module is DEPRECATED, do not
|
||||
* use any of its functions.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
@@ -9,8 +12,175 @@
|
||||
#ifndef __NANO_FTP_H__
|
||||
#define __NANO_FTP_H__
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning "libxml/nanoftp.h is deprecated"
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#if defined(LIBXML_FTP_ENABLED)
|
||||
|
||||
/* Needed for portability to Windows 64 bits */
|
||||
#if defined(_WIN32)
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
/**
|
||||
* SOCKET:
|
||||
*
|
||||
* macro used to provide portability of code to windows sockets
|
||||
*/
|
||||
#define SOCKET int
|
||||
/**
|
||||
* INVALID_SOCKET:
|
||||
*
|
||||
* macro used to provide portability of code to windows sockets
|
||||
* the value to be used when the socket is not valid
|
||||
*/
|
||||
#undef INVALID_SOCKET
|
||||
#define INVALID_SOCKET (-1)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ftpListCallback:
|
||||
* @userData: user provided data for the callback
|
||||
* @filename: the file name (including "->" when links are shown)
|
||||
* @attrib: the attribute string
|
||||
* @owner: the owner string
|
||||
* @group: the group string
|
||||
* @size: the file size
|
||||
* @links: the link count
|
||||
* @year: the year
|
||||
* @month: the month
|
||||
* @day: the day
|
||||
* @hour: the hour
|
||||
* @minute: the minute
|
||||
*
|
||||
* A callback for the xmlNanoFTPList command.
|
||||
* Note that only one of year and day:minute are specified.
|
||||
*/
|
||||
typedef void (*ftpListCallback) (void *userData,
|
||||
const char *filename, const char *attrib,
|
||||
const char *owner, const char *group,
|
||||
unsigned long size, int links, int year,
|
||||
const char *month, int day, int hour,
|
||||
int minute);
|
||||
/**
|
||||
* ftpDataCallback:
|
||||
* @userData: the user provided context
|
||||
* @data: the data received
|
||||
* @len: its size in bytes
|
||||
*
|
||||
* A callback for the xmlNanoFTPGet command.
|
||||
*/
|
||||
typedef void (*ftpDataCallback) (void *userData,
|
||||
const char *data,
|
||||
int len);
|
||||
|
||||
/*
|
||||
* Init
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlNanoFTPInit (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlNanoFTPCleanup (void);
|
||||
|
||||
/*
|
||||
* Creating/freeing contexts.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void *
|
||||
xmlNanoFTPNewCtxt (const char *URL);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlNanoFTPFreeCtxt (void * ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void *
|
||||
xmlNanoFTPConnectTo (const char *server,
|
||||
int port);
|
||||
/*
|
||||
* Opening/closing session connections.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void *
|
||||
xmlNanoFTPOpen (const char *URL);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPConnect (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPClose (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPQuit (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlNanoFTPScanProxy (const char *URL);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlNanoFTPProxy (const char *host,
|
||||
int port,
|
||||
const char *user,
|
||||
const char *passwd,
|
||||
int type);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPUpdateURL (void *ctx,
|
||||
const char *URL);
|
||||
|
||||
/*
|
||||
* Rather internal commands.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPGetResponse (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPCheckResponse (void *ctx);
|
||||
|
||||
/*
|
||||
* CD/DIR/GET handlers.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPCwd (void *ctx,
|
||||
const char *directory);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPDele (void *ctx,
|
||||
const char *file);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN SOCKET
|
||||
xmlNanoFTPGetConnection (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPCloseConnection(void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPList (void *ctx,
|
||||
ftpListCallback callback,
|
||||
void *userData,
|
||||
const char *filename);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN SOCKET
|
||||
xmlNanoFTPGetSocket (void *ctx,
|
||||
const char *filename);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPGet (void *ctx,
|
||||
ftpDataCallback callback,
|
||||
void *userData,
|
||||
const char *filename);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPRead (void *ctx,
|
||||
void *dest,
|
||||
int len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* defined(LIBXML_FTP_ENABLED) || defined(LIBXML_LEGACY_ENABLED) */
|
||||
#endif /* __NANO_FTP_H__ */
|
||||
|
||||
@@ -18,21 +18,16 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlNanoHTTPInit (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlNanoHTTPCleanup (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlNanoHTTPScanProxy (const char *URL);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoHTTPFetch (const char *URL,
|
||||
const char *filename,
|
||||
char **contentType);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void *
|
||||
xmlNanoHTTPMethod (const char *URL,
|
||||
const char *method,
|
||||
@@ -40,7 +35,6 @@ XMLPUBFUN void *
|
||||
char **contentType,
|
||||
const char *headers,
|
||||
int ilen);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void *
|
||||
xmlNanoHTTPMethodRedir (const char *URL,
|
||||
const char *method,
|
||||
@@ -49,45 +43,34 @@ XMLPUBFUN void *
|
||||
char **redir,
|
||||
const char *headers,
|
||||
int ilen);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void *
|
||||
xmlNanoHTTPOpen (const char *URL,
|
||||
char **contentType);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void *
|
||||
xmlNanoHTTPOpenRedir (const char *URL,
|
||||
char **contentType,
|
||||
char **redir);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoHTTPReturnCode (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const char *
|
||||
xmlNanoHTTPAuthHeader (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const char *
|
||||
xmlNanoHTTPRedir (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoHTTPContentLength( void * ctx );
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const char *
|
||||
xmlNanoHTTPEncoding (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const char *
|
||||
xmlNanoHTTPMimeType (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoHTTPRead (void *ctx,
|
||||
void *dest,
|
||||
int len);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlNanoHTTPSave (void *ctxt,
|
||||
const char *filename);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlNanoHTTPClose (void *ctx);
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#ifndef __XML_PARSER_H__
|
||||
#define __XML_PARSER_H__
|
||||
|
||||
/** DOC_DISABLE */
|
||||
#include <libxml/xmlversion.h>
|
||||
#define XML_TREE_INTERNALS
|
||||
#include <libxml/tree.h>
|
||||
@@ -27,7 +26,6 @@
|
||||
/* for compatibility */
|
||||
#include <libxml/SAX2.h>
|
||||
#include <libxml/threads.h>
|
||||
/** DOC_ENABLE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -40,30 +38,6 @@ extern "C" {
|
||||
*/
|
||||
#define XML_DEFAULT_VERSION "1.0"
|
||||
|
||||
typedef enum {
|
||||
XML_STATUS_NOT_WELL_FORMED = (1 << 0),
|
||||
XML_STATUS_NOT_NS_WELL_FORMED = (1 << 1),
|
||||
XML_STATUS_DTD_VALIDATION_FAILED = (1 << 2),
|
||||
XML_STATUS_CATASTROPHIC_ERROR = (1 << 3)
|
||||
} xmlParserStatus;
|
||||
|
||||
typedef enum {
|
||||
XML_RESOURCE_UNKNOWN = 0,
|
||||
XML_RESOURCE_MAIN_DOCUMENT,
|
||||
XML_RESOURCE_DTD,
|
||||
XML_RESOURCE_GENERAL_ENTITY,
|
||||
XML_RESOURCE_PARAMETER_ENTITY,
|
||||
XML_RESOURCE_XINCLUDE,
|
||||
XML_RESOURCE_XINCLUDE_TEXT
|
||||
} xmlResourceType;
|
||||
|
||||
typedef enum {
|
||||
XML_INPUT_BUF_STATIC = (1 << 1),
|
||||
XML_INPUT_BUF_ZERO_TERMINATED = (1 << 2),
|
||||
XML_INPUT_UNZIP = (1 << 3),
|
||||
XML_INPUT_NETWORK = (1 << 4)
|
||||
} xmlParserInputFlags;
|
||||
|
||||
/**
|
||||
* xmlParserInput:
|
||||
*
|
||||
@@ -85,39 +59,24 @@ typedef void (* xmlParserInputDeallocate)(xmlChar *str);
|
||||
|
||||
struct _xmlParserInput {
|
||||
/* Input buffer */
|
||||
xmlParserInputBufferPtr buf;
|
||||
/* The file analyzed, if any */
|
||||
const char *filename;
|
||||
/* unused */
|
||||
const char *directory XML_DEPRECATED_MEMBER;
|
||||
/* Base of the array to parse */
|
||||
const xmlChar *base;
|
||||
/* Current char being parsed */
|
||||
const xmlChar *cur;
|
||||
/* end of the array to parse */
|
||||
const xmlChar *end;
|
||||
/* unused */
|
||||
int length XML_DEPRECATED_MEMBER;
|
||||
/* Current line */
|
||||
int line;
|
||||
/* Current column */
|
||||
int col;
|
||||
/* How many xmlChars already consumed */
|
||||
unsigned long consumed;
|
||||
/* function to deallocate the base */
|
||||
xmlParserInputDeallocate free XML_DEPRECATED_MEMBER;
|
||||
/* unused */
|
||||
const xmlChar *encoding XML_DEPRECATED_MEMBER;
|
||||
/* the version string for entity */
|
||||
const xmlChar *version XML_DEPRECATED_MEMBER;
|
||||
/* Flags */
|
||||
int flags XML_DEPRECATED_MEMBER;
|
||||
/* an unique identifier for the entity */
|
||||
int id XML_DEPRECATED_MEMBER;
|
||||
/* unused */
|
||||
unsigned long parentConsumed XML_DEPRECATED_MEMBER;
|
||||
/* entity, if any */
|
||||
xmlEntityPtr entity XML_DEPRECATED_MEMBER;
|
||||
xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */
|
||||
|
||||
const char *filename; /* The file analyzed, if any */
|
||||
const char *directory; /* the directory/base of the file */
|
||||
const xmlChar *base; /* Base of the array to parse */
|
||||
const xmlChar *cur; /* Current char being parsed */
|
||||
const xmlChar *end; /* end of the array to parse */
|
||||
int length; /* length if known */
|
||||
int line; /* Current line */
|
||||
int col; /* Current column */
|
||||
unsigned long consumed; /* How many xmlChars already consumed */
|
||||
xmlParserInputDeallocate free; /* function to deallocate the base */
|
||||
const xmlChar *encoding; /* unused */
|
||||
const xmlChar *version; /* the version string for entity */
|
||||
int flags; /* Flags */
|
||||
int id; /* an unique identifier for the entity */
|
||||
unsigned long parentConsumed; /* consumed bytes from parents */
|
||||
xmlEntityPtr entity; /* entity, if any */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -175,14 +134,30 @@ typedef enum {
|
||||
XML_PARSER_XML_DECL /* before XML decl (but after BOM) */
|
||||
} xmlParserInputState;
|
||||
|
||||
/** DOC_DISABLE */
|
||||
/*
|
||||
* Internal bits in the 'loadsubset' context member
|
||||
/**
|
||||
* XML_DETECT_IDS:
|
||||
*
|
||||
* Bit in the loadsubset context field to tell to do ID/REFs lookups.
|
||||
* Use it to initialize xmlLoadExtDtdDefaultValue.
|
||||
*/
|
||||
#define XML_DETECT_IDS 2
|
||||
|
||||
/**
|
||||
* XML_COMPLETE_ATTRS:
|
||||
*
|
||||
* Bit in the loadsubset context field to tell to do complete the
|
||||
* elements attributes lists with the ones defaulted from the DTDs.
|
||||
* Use it to initialize xmlLoadExtDtdDefaultValue.
|
||||
*/
|
||||
#define XML_COMPLETE_ATTRS 4
|
||||
|
||||
/**
|
||||
* XML_SKIP_IDS:
|
||||
*
|
||||
* Bit in the loadsubset context field to tell to not do ID/REFs registration.
|
||||
* Used to initialize xmlLoadExtDtdDefaultValue in some special cases.
|
||||
*/
|
||||
#define XML_SKIP_IDS 8
|
||||
/** DOC_ENABLE */
|
||||
|
||||
/**
|
||||
* xmlParserMode:
|
||||
@@ -202,29 +177,6 @@ typedef struct _xmlStartTag xmlStartTag;
|
||||
typedef struct _xmlParserNsData xmlParserNsData;
|
||||
typedef struct _xmlAttrHashBucket xmlAttrHashBucket;
|
||||
|
||||
/**
|
||||
* xmlResourceLoader:
|
||||
* @ctxt: parser context
|
||||
* @url: URL to load
|
||||
* @publicId: publid ID from DTD (optional)
|
||||
* @type: resource type
|
||||
* @flags: flags
|
||||
* @out: result pointer
|
||||
*
|
||||
* Callback for custom resource loaders.
|
||||
*
|
||||
* @flags can contain XML_INPUT_UNZIP and XML_INPUT_NETWORK.
|
||||
*
|
||||
* On success, @out should be set to a new parser input object and
|
||||
* XML_ERR_OK should be returned.
|
||||
*
|
||||
* Returns an xmlParserErrors code.
|
||||
*/
|
||||
typedef xmlParserErrors
|
||||
(*xmlResourceLoader)(void *ctxt, const char *url, const char *publicId,
|
||||
xmlResourceType type, xmlParserInputFlags flags,
|
||||
xmlParserInputPtr *out);
|
||||
|
||||
/**
|
||||
* xmlParserCtxt:
|
||||
*
|
||||
@@ -238,251 +190,143 @@ typedef xmlParserErrors
|
||||
* to a state based parser for progressive parsing shouldn't be too hard.
|
||||
*/
|
||||
struct _xmlParserCtxt {
|
||||
/* The SAX handler */
|
||||
struct _xmlSAXHandler *sax;
|
||||
/* For SAX interface only, used by DOM build */
|
||||
void *userData;
|
||||
/* the document being built */
|
||||
xmlDocPtr myDoc;
|
||||
/* is the document well formed */
|
||||
int wellFormed;
|
||||
/* shall we replace entities ? */
|
||||
int replaceEntities XML_DEPRECATED_MEMBER;
|
||||
/* the XML version string */
|
||||
const xmlChar *version;
|
||||
/* the declared encoding, if any */
|
||||
const xmlChar *encoding;
|
||||
/* standalone document */
|
||||
int standalone;
|
||||
|
||||
/* an HTML(1) document
|
||||
* 3 is HTML after <head>
|
||||
* 10 is HTML after <body>
|
||||
*/
|
||||
int html;
|
||||
struct _xmlSAXHandler *sax; /* The SAX handler */
|
||||
void *userData; /* For SAX interface only, used by DOM build */
|
||||
xmlDocPtr myDoc; /* the document being built */
|
||||
int wellFormed; /* is the document well formed */
|
||||
int replaceEntities; /* shall we replace entities ? */
|
||||
const xmlChar *version; /* the XML version string */
|
||||
const xmlChar *encoding; /* the declared encoding, if any */
|
||||
int standalone; /* standalone document */
|
||||
int html; /* an HTML(1) document
|
||||
* 3 is HTML after <head>
|
||||
* 10 is HTML after <body>
|
||||
*/
|
||||
|
||||
/* Input stream stack */
|
||||
|
||||
/* Current input stream */
|
||||
xmlParserInputPtr input;
|
||||
/* Number of current input streams */
|
||||
int inputNr;
|
||||
/* Max number of input streams */
|
||||
int inputMax XML_DEPRECATED_MEMBER;
|
||||
/* stack of inputs */
|
||||
xmlParserInputPtr *inputTab;
|
||||
xmlParserInputPtr input; /* Current input stream */
|
||||
int inputNr; /* Number of current input streams */
|
||||
int inputMax; /* Max number of input streams */
|
||||
xmlParserInputPtr *inputTab; /* stack of inputs */
|
||||
|
||||
/* Node analysis stack only used for DOM building */
|
||||
xmlNodePtr node; /* Current parsed Node */
|
||||
int nodeNr; /* Depth of the parsing stack */
|
||||
int nodeMax; /* Max depth of the parsing stack */
|
||||
xmlNodePtr *nodeTab; /* array of nodes */
|
||||
|
||||
/* Current parsed Node */
|
||||
xmlNodePtr node;
|
||||
/* Depth of the parsing stack */
|
||||
int nodeNr XML_DEPRECATED_MEMBER;
|
||||
/* Max depth of the parsing stack */
|
||||
int nodeMax XML_DEPRECATED_MEMBER;
|
||||
/* array of nodes */
|
||||
xmlNodePtr *nodeTab XML_DEPRECATED_MEMBER;
|
||||
int record_info; /* Whether node info should be kept */
|
||||
xmlParserNodeInfoSeq node_seq; /* info about each node parsed */
|
||||
|
||||
/* Whether node info should be kept */
|
||||
int record_info;
|
||||
/* info about each node parsed */
|
||||
xmlParserNodeInfoSeq node_seq XML_DEPRECATED_MEMBER;
|
||||
int errNo; /* error code */
|
||||
|
||||
/* error code */
|
||||
int errNo;
|
||||
int hasExternalSubset; /* reference and external subset */
|
||||
int hasPErefs; /* the internal subset has PE refs */
|
||||
int external; /* are we parsing an external entity */
|
||||
|
||||
/* reference and external subset */
|
||||
int hasExternalSubset XML_DEPRECATED_MEMBER;
|
||||
/* the internal subset has PE refs */
|
||||
int hasPErefs XML_DEPRECATED_MEMBER;
|
||||
/* unused */
|
||||
int external XML_DEPRECATED_MEMBER;
|
||||
int valid; /* is the document valid */
|
||||
int validate; /* shall we try to validate ? */
|
||||
xmlValidCtxt vctxt; /* The validity context */
|
||||
|
||||
/* is the document valid */
|
||||
int valid;
|
||||
/* shall we try to validate ? */
|
||||
int validate XML_DEPRECATED_MEMBER;
|
||||
/* The validity context */
|
||||
xmlValidCtxt vctxt;
|
||||
xmlParserInputState instate; /* current type of input */
|
||||
int token; /* next char look-ahead */
|
||||
|
||||
/* push parser state */
|
||||
xmlParserInputState instate XML_DEPRECATED_MEMBER;
|
||||
/* unused */
|
||||
int token XML_DEPRECATED_MEMBER;
|
||||
|
||||
/* unused internally, still used downstream */
|
||||
char *directory;
|
||||
char *directory; /* the data directory */
|
||||
|
||||
/* Node name stack */
|
||||
const xmlChar *name; /* Current parsed Node */
|
||||
int nameNr; /* Depth of the parsing stack */
|
||||
int nameMax; /* Max depth of the parsing stack */
|
||||
const xmlChar * *nameTab; /* array of nodes */
|
||||
|
||||
/* Current parsed Node */
|
||||
const xmlChar *name XML_DEPRECATED_MEMBER;
|
||||
/* Depth of the parsing stack */
|
||||
int nameNr XML_DEPRECATED_MEMBER;
|
||||
/* Max depth of the parsing stack */
|
||||
int nameMax XML_DEPRECATED_MEMBER;
|
||||
/* array of nodes */
|
||||
const xmlChar **nameTab XML_DEPRECATED_MEMBER;
|
||||
|
||||
/* unused */
|
||||
long nbChars XML_DEPRECATED_MEMBER;
|
||||
/* used by progressive parsing lookup */
|
||||
long checkIndex XML_DEPRECATED_MEMBER;
|
||||
/* ugly but ... */
|
||||
int keepBlanks XML_DEPRECATED_MEMBER;
|
||||
/* SAX callbacks are disabled */
|
||||
int disableSAX;
|
||||
/* Parsing is in int 1/ext 2 subset */
|
||||
int inSubset;
|
||||
/* name of subset */
|
||||
const xmlChar *intSubName;
|
||||
/* URI of external subset */
|
||||
xmlChar *extSubURI;
|
||||
/* SYSTEM ID of external subset */
|
||||
xmlChar *extSubSystem;
|
||||
long nbChars; /* unused */
|
||||
long checkIndex; /* used by progressive parsing lookup */
|
||||
int keepBlanks; /* ugly but ... */
|
||||
int disableSAX; /* SAX callbacks are disabled */
|
||||
int inSubset; /* Parsing is in int 1/ext 2 subset */
|
||||
const xmlChar * intSubName; /* name of subset */
|
||||
xmlChar * extSubURI; /* URI of external subset */
|
||||
xmlChar * extSubSystem; /* SYSTEM ID of external subset */
|
||||
|
||||
/* xml:space values */
|
||||
int * space; /* Should the parser preserve spaces */
|
||||
int spaceNr; /* Depth of the parsing stack */
|
||||
int spaceMax; /* Max depth of the parsing stack */
|
||||
int * spaceTab; /* array of space infos */
|
||||
|
||||
/* Should the parser preserve spaces */
|
||||
int *space XML_DEPRECATED_MEMBER;
|
||||
/* Depth of the parsing stack */
|
||||
int spaceNr XML_DEPRECATED_MEMBER;
|
||||
/* Max depth of the parsing stack */
|
||||
int spaceMax XML_DEPRECATED_MEMBER;
|
||||
/* array of space infos */
|
||||
int *spaceTab XML_DEPRECATED_MEMBER;
|
||||
int depth; /* to prevent entity substitution loops */
|
||||
xmlParserInputPtr entity; /* used to check entities boundaries */
|
||||
int charset; /* unused */
|
||||
int nodelen; /* Those two fields are there to */
|
||||
int nodemem; /* Speed up large node parsing */
|
||||
int pedantic; /* signal pedantic warnings */
|
||||
void *_private; /* For user data, libxml won't touch it */
|
||||
|
||||
/* to prevent entity substitution loops */
|
||||
int depth XML_DEPRECATED_MEMBER;
|
||||
/* unused */
|
||||
xmlParserInputPtr entity XML_DEPRECATED_MEMBER;
|
||||
/* unused */
|
||||
int charset XML_DEPRECATED_MEMBER;
|
||||
/* Those two fields are there to */
|
||||
int nodelen XML_DEPRECATED_MEMBER;
|
||||
/* Speed up large node parsing */
|
||||
int nodemem XML_DEPRECATED_MEMBER;
|
||||
/* signal pedantic warnings */
|
||||
int pedantic XML_DEPRECATED_MEMBER;
|
||||
/* For user data, libxml won't touch it */
|
||||
void *_private;
|
||||
|
||||
/* should the external subset be loaded */
|
||||
int loadsubset;
|
||||
/* set line number in element content */
|
||||
int linenumbers XML_DEPRECATED_MEMBER;
|
||||
/* document's own catalog */
|
||||
void *catalogs XML_DEPRECATED_MEMBER;
|
||||
/* run in recovery mode */
|
||||
int recovery XML_DEPRECATED_MEMBER;
|
||||
/* unused */
|
||||
int progressive XML_DEPRECATED_MEMBER;
|
||||
/* dictionary for the parser */
|
||||
xmlDictPtr dict;
|
||||
/* array for the attributes callbacks */
|
||||
const xmlChar **atts XML_DEPRECATED_MEMBER;
|
||||
/* the size of the array */
|
||||
int maxatts XML_DEPRECATED_MEMBER;
|
||||
/* unused */
|
||||
int docdict XML_DEPRECATED_MEMBER;
|
||||
int loadsubset; /* should the external subset be loaded */
|
||||
int linenumbers; /* set line number in element content */
|
||||
void *catalogs; /* document's own catalog */
|
||||
int recovery; /* run in recovery mode */
|
||||
int progressive; /* is this a progressive parsing */
|
||||
xmlDictPtr dict; /* dictionary for the parser */
|
||||
const xmlChar * *atts; /* array for the attributes callbacks */
|
||||
int maxatts; /* the size of the array */
|
||||
int docdict; /* use strings from dict to build tree */
|
||||
|
||||
/*
|
||||
* pre-interned strings
|
||||
*/
|
||||
const xmlChar *str_xml XML_DEPRECATED_MEMBER;
|
||||
const xmlChar *str_xmlns XML_DEPRECATED_MEMBER;
|
||||
const xmlChar *str_xml_ns XML_DEPRECATED_MEMBER;
|
||||
const xmlChar *str_xml;
|
||||
const xmlChar *str_xmlns;
|
||||
const xmlChar *str_xml_ns;
|
||||
|
||||
/*
|
||||
* Everything below is used only by the new SAX mode
|
||||
*/
|
||||
|
||||
/* operating in the new SAX mode */
|
||||
int sax2 XML_DEPRECATED_MEMBER;
|
||||
/* the number of inherited namespaces */
|
||||
int nsNr XML_DEPRECATED_MEMBER;
|
||||
/* the size of the arrays */
|
||||
int nsMax XML_DEPRECATED_MEMBER;
|
||||
/* the array of prefix/namespace name */
|
||||
const xmlChar **nsTab XML_DEPRECATED_MEMBER;
|
||||
/* which attribute were allocated */
|
||||
unsigned *attallocs XML_DEPRECATED_MEMBER;
|
||||
/* array of data for push */
|
||||
xmlStartTag *pushTab XML_DEPRECATED_MEMBER;
|
||||
/* defaulted attributes if any */
|
||||
xmlHashTablePtr attsDefault XML_DEPRECATED_MEMBER;
|
||||
/* non-CDATA attributes if any */
|
||||
xmlHashTablePtr attsSpecial XML_DEPRECATED_MEMBER;
|
||||
/* is the document XML Namespace okay */
|
||||
int nsWellFormed;
|
||||
/* Extra options */
|
||||
int options;
|
||||
int sax2; /* operating in the new SAX mode */
|
||||
int nsNr; /* the number of inherited namespaces */
|
||||
int nsMax; /* the size of the arrays */
|
||||
const xmlChar * *nsTab; /* the array of prefix/namespace name */
|
||||
unsigned *attallocs; /* which attribute were allocated */
|
||||
xmlStartTag *pushTab; /* array of data for push */
|
||||
xmlHashTablePtr attsDefault; /* defaulted attributes if any */
|
||||
xmlHashTablePtr attsSpecial; /* non-CDATA attributes if any */
|
||||
int nsWellFormed; /* is the document XML Namespace okay */
|
||||
int options; /* Extra options */
|
||||
|
||||
/*
|
||||
* Those fields are needed only for streaming parsing so far
|
||||
*/
|
||||
|
||||
/* Use dictionary names for the tree */
|
||||
int dictNames XML_DEPRECATED_MEMBER;
|
||||
/* number of freed element nodes */
|
||||
int freeElemsNr XML_DEPRECATED_MEMBER;
|
||||
/* List of freed element nodes */
|
||||
xmlNodePtr freeElems XML_DEPRECATED_MEMBER;
|
||||
/* number of freed attributes nodes */
|
||||
int freeAttrsNr XML_DEPRECATED_MEMBER;
|
||||
/* List of freed attributes nodes */
|
||||
xmlAttrPtr freeAttrs XML_DEPRECATED_MEMBER;
|
||||
int dictNames; /* Use dictionary names for the tree */
|
||||
int freeElemsNr; /* number of freed element nodes */
|
||||
xmlNodePtr freeElems; /* List of freed element nodes */
|
||||
int freeAttrsNr; /* number of freed attributes nodes */
|
||||
xmlAttrPtr freeAttrs; /* List of freed attributes nodes */
|
||||
|
||||
/*
|
||||
* the complete error information for the last error.
|
||||
*/
|
||||
xmlError lastError XML_DEPRECATED_MEMBER;
|
||||
/* the parser mode */
|
||||
xmlParserMode parseMode XML_DEPRECATED_MEMBER;
|
||||
/* unused */
|
||||
unsigned long nbentities XML_DEPRECATED_MEMBER;
|
||||
/* size of external entities */
|
||||
unsigned long sizeentities XML_DEPRECATED_MEMBER;
|
||||
xmlError lastError;
|
||||
xmlParserMode parseMode; /* the parser mode */
|
||||
unsigned long nbentities; /* unused */
|
||||
unsigned long sizeentities; /* size of parsed entities */
|
||||
|
||||
/* for use by HTML non-recursive parser */
|
||||
/* Current NodeInfo */
|
||||
xmlParserNodeInfo *nodeInfo XML_DEPRECATED_MEMBER;
|
||||
/* Depth of the parsing stack */
|
||||
int nodeInfoNr XML_DEPRECATED_MEMBER;
|
||||
/* Max depth of the parsing stack */
|
||||
int nodeInfoMax XML_DEPRECATED_MEMBER;
|
||||
/* array of nodeInfos */
|
||||
xmlParserNodeInfo *nodeInfoTab XML_DEPRECATED_MEMBER;
|
||||
xmlParserNodeInfo *nodeInfo; /* Current NodeInfo */
|
||||
int nodeInfoNr; /* Depth of the parsing stack */
|
||||
int nodeInfoMax; /* Max depth of the parsing stack */
|
||||
xmlParserNodeInfo *nodeInfoTab; /* array of nodeInfos */
|
||||
|
||||
/* we need to label inputs */
|
||||
int input_id XML_DEPRECATED_MEMBER;
|
||||
/* volume of entity copy */
|
||||
unsigned long sizeentcopy XML_DEPRECATED_MEMBER;
|
||||
int input_id; /* we need to label inputs */
|
||||
unsigned long sizeentcopy; /* volume of entity copy */
|
||||
|
||||
/* quote state for push parser */
|
||||
int endCheckState XML_DEPRECATED_MEMBER;
|
||||
/* number of errors */
|
||||
unsigned short nbErrors XML_DEPRECATED_MEMBER;
|
||||
/* number of warnings */
|
||||
unsigned short nbWarnings XML_DEPRECATED_MEMBER;
|
||||
/* maximum amplification factor */
|
||||
unsigned maxAmpl XML_DEPRECATED_MEMBER;
|
||||
int endCheckState; /* quote state for push parser */
|
||||
unsigned short nbErrors; /* number of errors */
|
||||
unsigned short nbWarnings; /* number of warnings */
|
||||
unsigned maxAmpl; /* maximum amplification factor */
|
||||
|
||||
/* namespace database */
|
||||
xmlParserNsData *nsdb XML_DEPRECATED_MEMBER;
|
||||
/* allocated size */
|
||||
unsigned attrHashMax XML_DEPRECATED_MEMBER;
|
||||
/* atttribute hash table */
|
||||
xmlAttrHashBucket *attrHash XML_DEPRECATED_MEMBER;
|
||||
|
||||
xmlStructuredErrorFunc errorHandler XML_DEPRECATED_MEMBER;
|
||||
void *errorCtxt XML_DEPRECATED_MEMBER;
|
||||
|
||||
xmlResourceLoader resourceLoader XML_DEPRECATED_MEMBER;
|
||||
void *resourceCtxt XML_DEPRECATED_MEMBER;
|
||||
|
||||
xmlCharEncConvImpl convImpl XML_DEPRECATED_MEMBER;
|
||||
void *convCtxt XML_DEPRECATED_MEMBER;
|
||||
xmlParserNsData *nsdb; /* namespace database */
|
||||
unsigned attrHashMax; /* allocated size */
|
||||
xmlAttrHashBucket *attrHash; /* atttribute hash table */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -889,23 +733,18 @@ typedef void (*endElementNsSAX2Func) (void *ctx,
|
||||
|
||||
|
||||
struct _xmlSAXHandler {
|
||||
/*
|
||||
* For DTD-related handlers, it's recommended to either use the
|
||||
* original libxml2 handler or set them to NULL if DTDs can be
|
||||
* ignored.
|
||||
*/
|
||||
internalSubsetSAXFunc internalSubset; /* DTD */
|
||||
isStandaloneSAXFunc isStandalone; /* unused */
|
||||
hasInternalSubsetSAXFunc hasInternalSubset; /* DTD */
|
||||
hasExternalSubsetSAXFunc hasExternalSubset; /* DTD */
|
||||
resolveEntitySAXFunc resolveEntity; /* DTD */
|
||||
getEntitySAXFunc getEntity; /* DTD */
|
||||
entityDeclSAXFunc entityDecl; /* DTD */
|
||||
notationDeclSAXFunc notationDecl; /* DTD */
|
||||
attributeDeclSAXFunc attributeDecl; /* DTD */
|
||||
elementDeclSAXFunc elementDecl; /* DTD */
|
||||
unparsedEntityDeclSAXFunc unparsedEntityDecl; /* DTD */
|
||||
setDocumentLocatorSAXFunc setDocumentLocator; /* deprecated */
|
||||
internalSubsetSAXFunc internalSubset;
|
||||
isStandaloneSAXFunc isStandalone;
|
||||
hasInternalSubsetSAXFunc hasInternalSubset;
|
||||
hasExternalSubsetSAXFunc hasExternalSubset;
|
||||
resolveEntitySAXFunc resolveEntity;
|
||||
getEntitySAXFunc getEntity;
|
||||
entityDeclSAXFunc entityDecl;
|
||||
notationDeclSAXFunc notationDecl;
|
||||
attributeDeclSAXFunc attributeDecl;
|
||||
elementDeclSAXFunc elementDecl;
|
||||
unparsedEntityDeclSAXFunc unparsedEntityDecl;
|
||||
setDocumentLocatorSAXFunc setDocumentLocator;
|
||||
startDocumentSAXFunc startDocument;
|
||||
endDocumentSAXFunc endDocument;
|
||||
/*
|
||||
@@ -925,20 +764,15 @@ struct _xmlSAXHandler {
|
||||
endElementSAXFunc endElement;
|
||||
referenceSAXFunc reference;
|
||||
charactersSAXFunc characters;
|
||||
/*
|
||||
* `ignorableWhitespace` should always be set to the same value
|
||||
* as `characters`. Otherwise, the parser will try to detect
|
||||
* whitespace which is unreliable.
|
||||
*/
|
||||
ignorableWhitespaceSAXFunc ignorableWhitespace;
|
||||
processingInstructionSAXFunc processingInstruction;
|
||||
commentSAXFunc comment;
|
||||
warningSAXFunc warning;
|
||||
errorSAXFunc error;
|
||||
fatalErrorSAXFunc fatalError; /* unused, `error` gets all the errors */
|
||||
getParameterEntitySAXFunc getParameterEntity; /* DTD */
|
||||
fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
|
||||
getParameterEntitySAXFunc getParameterEntity;
|
||||
cdataBlockSAXFunc cdataBlock;
|
||||
externalSubsetSAXFunc externalSubset; /* DTD */
|
||||
externalSubsetSAXFunc externalSubset;
|
||||
/*
|
||||
* `initialized` should always be set to XML_SAX2_MAGIC to enable the
|
||||
* modern SAX2 interface.
|
||||
@@ -950,10 +784,6 @@ struct _xmlSAXHandler {
|
||||
void *_private;
|
||||
startElementNsSAX2Func startElementNs;
|
||||
endElementNsSAX2Func endElementNs;
|
||||
/*
|
||||
* Takes precedence over `error` or `warning`, but modern code
|
||||
* should use xmlCtxtSetErrorHandler.
|
||||
*/
|
||||
xmlStructuredErrorFunc serror;
|
||||
};
|
||||
|
||||
@@ -1013,53 +843,70 @@ typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
|
||||
*/
|
||||
|
||||
XMLPUBVAR const char *const xmlParserVersion;
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
/* backward compatibility */
|
||||
XMLPUBFUN const char *const *__xmlParserVersion(void);
|
||||
#endif
|
||||
|
||||
/** DOC_DISABLE */
|
||||
XML_DEPRECATED
|
||||
XMLPUBVAR const xmlSAXLocator xmlDefaultSAXLocator;
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBVAR const xmlSAXHandlerV1 xmlDefaultSAXHandler;
|
||||
#endif
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int *__xmlDoValidityCheckingDefaultValue(void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int *__xmlGetWarningsDefaultValue(void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int *__xmlKeepBlanksDefaultValue(void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int *__xmlLineNumbersDefaultValue(void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int *__xmlLoadExtDtdDefaultValue(void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int *__xmlPedanticParserDefaultValue(void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int *__xmlSubstituteEntitiesDefaultValue(void);
|
||||
#define XML_GLOBALS_PARSER_CORE \
|
||||
XML_OP(oldXMLWDcompatibility, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlDefaultSAXLocator, xmlSAXLocator, XML_DEPRECATED) \
|
||||
XML_OP(xmlDoValidityCheckingDefaultValue, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlGetWarningsDefaultValue, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlKeepBlanksDefaultValue, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlLineNumbersDefaultValue, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlLoadExtDtdDefaultValue, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlParserDebugEntities, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlPedanticParserDefaultValue, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlSubstituteEntitiesDefaultValue, int, XML_DEPRECATED)
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN int *__xmlIndentTreeOutput(void);
|
||||
XMLPUBFUN const char **__xmlTreeIndentString(void);
|
||||
XMLPUBFUN int *__xmlSaveNoEmptyTags(void);
|
||||
#define XML_GLOBALS_PARSER_OUTPUT \
|
||||
XML_OP(xmlIndentTreeOutput, int, XML_NO_ATTR) \
|
||||
XML_OP(xmlTreeIndentString, const char *, XML_NO_ATTR) \
|
||||
XML_OP(xmlSaveNoEmptyTags, int, XML_NO_ATTR)
|
||||
#else
|
||||
#define XML_GLOBALS_PARSER_OUTPUT
|
||||
#endif
|
||||
|
||||
#ifndef XML_GLOBALS_NO_REDEFINITION
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
#define XML_GLOBALS_PARSER_SAX1 \
|
||||
XML_OP(xmlDefaultSAXHandler, xmlSAXHandlerV1, XML_DEPRECATED)
|
||||
#else
|
||||
#define XML_GLOBALS_PARSER_SAX1
|
||||
#endif
|
||||
|
||||
#define XML_GLOBALS_PARSER \
|
||||
XML_GLOBALS_PARSER_CORE \
|
||||
XML_GLOBALS_PARSER_OUTPUT \
|
||||
XML_GLOBALS_PARSER_SAX1
|
||||
|
||||
#define XML_OP XML_DECLARE_GLOBAL
|
||||
XML_GLOBALS_PARSER
|
||||
#undef XML_OP
|
||||
|
||||
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
||||
#define oldXMLWDcompatibility XML_GLOBAL_MACRO(oldXMLWDcompatibility)
|
||||
#define xmlDefaultSAXHandler XML_GLOBAL_MACRO(xmlDefaultSAXHandler)
|
||||
#define xmlDefaultSAXLocator XML_GLOBAL_MACRO(xmlDefaultSAXLocator)
|
||||
#define xmlDoValidityCheckingDefaultValue \
|
||||
(*__xmlDoValidityCheckingDefaultValue())
|
||||
XML_GLOBAL_MACRO(xmlDoValidityCheckingDefaultValue)
|
||||
#define xmlGetWarningsDefaultValue \
|
||||
(*__xmlGetWarningsDefaultValue())
|
||||
#define xmlKeepBlanksDefaultValue (*__xmlKeepBlanksDefaultValue())
|
||||
XML_GLOBAL_MACRO(xmlGetWarningsDefaultValue)
|
||||
#define xmlKeepBlanksDefaultValue XML_GLOBAL_MACRO(xmlKeepBlanksDefaultValue)
|
||||
#define xmlLineNumbersDefaultValue \
|
||||
(*__xmlLineNumbersDefaultValue())
|
||||
#define xmlLoadExtDtdDefaultValue (*__xmlLoadExtDtdDefaultValue())
|
||||
XML_GLOBAL_MACRO(xmlLineNumbersDefaultValue)
|
||||
#define xmlLoadExtDtdDefaultValue XML_GLOBAL_MACRO(xmlLoadExtDtdDefaultValue)
|
||||
#define xmlParserDebugEntities XML_GLOBAL_MACRO(xmlParserDebugEntities)
|
||||
#define xmlPedanticParserDefaultValue \
|
||||
(*__xmlPedanticParserDefaultValue())
|
||||
XML_GLOBAL_MACRO(xmlPedanticParserDefaultValue)
|
||||
#define xmlSubstituteEntitiesDefaultValue \
|
||||
(*__xmlSubstituteEntitiesDefaultValue())
|
||||
XML_GLOBAL_MACRO(xmlSubstituteEntitiesDefaultValue)
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
#define xmlIndentTreeOutput (*__xmlIndentTreeOutput())
|
||||
#define xmlTreeIndentString (*__xmlTreeIndentString())
|
||||
#define xmlSaveNoEmptyTags (*__xmlSaveNoEmptyTags())
|
||||
#define xmlIndentTreeOutput XML_GLOBAL_MACRO(xmlIndentTreeOutput)
|
||||
#define xmlTreeIndentString XML_GLOBAL_MACRO(xmlTreeIndentString)
|
||||
#define xmlSaveNoEmptyTags XML_GLOBAL_MACRO(xmlSaveNoEmptyTags)
|
||||
#endif
|
||||
#endif
|
||||
/** DOC_ENABLE */
|
||||
@@ -1085,6 +932,7 @@ XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlParserInputRead (xmlParserInputPtr in,
|
||||
int len);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlParserInputGrow (xmlParserInputPtr in,
|
||||
int len);
|
||||
@@ -1101,40 +949,32 @@ XMLPUBFUN xmlDocPtr
|
||||
xmlParseMemory (const char *buffer,
|
||||
int size);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlSubstituteEntitiesDefault(int val);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefSubstituteEntitiesDefaultValue(int v);
|
||||
XMLPUBFUN int
|
||||
xmlKeepBlanksDefault (int val);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefKeepBlanksDefaultValue(int v);
|
||||
XMLPUBFUN void
|
||||
xmlStopParser (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlPedanticParserDefault(int val);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefPedanticParserDefaultValue(int v);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlLineNumbersDefault (int val);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefLineNumbersDefaultValue(int v);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefDoValidityCheckingDefaultValue(int v);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefGetWarningsDefaultValue(int v);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefLoadExtDtdDefaultValue(int v);
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefParserDebugEntities(int v);
|
||||
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
/*
|
||||
@@ -1157,7 +997,6 @@ XMLPUBFUN xmlDocPtr
|
||||
*/
|
||||
XMLPUBFUN int
|
||||
xmlParseDocument (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
@@ -1211,18 +1050,6 @@ XMLPUBFUN xmlDocPtr
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
XMLPUBFUN xmlDtdPtr
|
||||
xmlCtxtParseDtd (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr input,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN int
|
||||
xmlCtxtValidateDocument (xmlParserCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN int
|
||||
xmlCtxtValidateDtd (xmlParserCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlDtdPtr dtd);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlDtdPtr
|
||||
xmlSAXParseDTD (xmlSAXHandlerPtr sax,
|
||||
@@ -1300,6 +1127,26 @@ XMLPUBFUN void
|
||||
XMLPUBFUN xmlParserCtxtPtr
|
||||
xmlCreateDocParserCtxt (const xmlChar *cur);
|
||||
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
/*
|
||||
* Reading/setting optional parsing features.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlGetFeaturesList (int *len,
|
||||
const char **result);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlGetFeature (xmlParserCtxtPtr ctxt,
|
||||
const char *name,
|
||||
void *result);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlSetFeature (xmlParserCtxtPtr ctxt,
|
||||
const char *name,
|
||||
void *value);
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
|
||||
#ifdef LIBXML_PUSH_ENABLED
|
||||
/*
|
||||
* Interfaces for the Push mode.
|
||||
@@ -1337,24 +1184,19 @@ XMLPUBFUN xmlParserInputPtr
|
||||
/*
|
||||
* Node infos.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const xmlParserNodeInfo*
|
||||
xmlParserFindNodeInfo (xmlParserCtxtPtr ctxt,
|
||||
xmlNodePtr node);
|
||||
XML_DEPRECATED
|
||||
xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt,
|
||||
const xmlNodePtr node);
|
||||
XMLPUBFUN void
|
||||
xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN unsigned long
|
||||
xmlParserFindNodeInfoIndex(xmlParserNodeInfoSeqPtr seq,
|
||||
xmlNodePtr node);
|
||||
XML_DEPRECATED
|
||||
xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
|
||||
const xmlNodePtr node);
|
||||
XMLPUBFUN void
|
||||
xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
|
||||
xmlParserNodeInfoPtr info);
|
||||
const xmlParserNodeInfoPtr info);
|
||||
|
||||
/*
|
||||
* External entities handling actually implemented in xmlIO.
|
||||
@@ -1369,7 +1211,9 @@ XMLPUBFUN xmlParserInputPtr
|
||||
const char *ID,
|
||||
xmlParserCtxtPtr ctxt);
|
||||
|
||||
XML_DEPRECATED
|
||||
/*
|
||||
* Index lookup, actually implemented in the encoding module
|
||||
*/
|
||||
XMLPUBFUN long
|
||||
xmlByteConsumed (xmlParserCtxtPtr ctxt);
|
||||
|
||||
@@ -1407,13 +1251,7 @@ typedef enum {
|
||||
XML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */
|
||||
XML_PARSE_OLDSAX = 1<<20,/* parse using SAX2 interface before 2.7.0 */
|
||||
XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */
|
||||
XML_PARSE_BIG_LINES = 1<<22,/* Store big lines numbers in text PSVI field */
|
||||
/* since 2.13.0 */
|
||||
XML_PARSE_NO_XXE = 1<<23,/* disable loading of external content */
|
||||
/* since 2.14.0 */
|
||||
XML_PARSE_UNZIP = 1<<24,/* allow compressed content */
|
||||
XML_PARSE_NO_SYS_CATALOG = 1<<25,/* disable global system catalog */
|
||||
XML_PARSE_CATALOG_PI = 1<<26 /* allow catalog PIs */
|
||||
XML_PARSE_BIG_LINES = 1<<22 /* Store big lines numbers in text PSVI field */
|
||||
} xmlParserOption;
|
||||
|
||||
XMLPUBFUN void
|
||||
@@ -1424,64 +1262,9 @@ XMLPUBFUN int
|
||||
int size,
|
||||
const char *filename,
|
||||
const char *encoding);
|
||||
XMLPUBFUN int
|
||||
xmlCtxtGetOptions (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int
|
||||
xmlCtxtSetOptions (xmlParserCtxtPtr ctxt,
|
||||
int options);
|
||||
XMLPUBFUN int
|
||||
xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
|
||||
int options);
|
||||
XMLPUBFUN void *
|
||||
xmlCtxtGetPrivate (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void
|
||||
xmlCtxtSetPrivate (xmlParserCtxtPtr ctxt,
|
||||
void *priv);
|
||||
XMLPUBFUN void *
|
||||
xmlCtxtGetCatalogs (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void
|
||||
xmlCtxtSetCatalogs (xmlParserCtxtPtr ctxt,
|
||||
void *catalogs);
|
||||
XMLPUBFUN xmlDictPtr
|
||||
xmlCtxtGetDict (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void
|
||||
xmlCtxtSetDict (xmlParserCtxtPtr ctxt,
|
||||
xmlDictPtr);
|
||||
XMLPUBFUN xmlSAXHandler *
|
||||
xmlCtxtGetSaxHandler (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int
|
||||
xmlCtxtSetSaxHandler (xmlParserCtxtPtr ctxt,
|
||||
const xmlSAXHandler *sax);
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlCtxtGetDocument (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int
|
||||
xmlCtxtIsHtml (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int
|
||||
xmlCtxtIsStopped (xmlParserCtxtPtr ctxt);
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
XMLPUBFUN xmlValidCtxtPtr
|
||||
xmlCtxtGetValidCtxt (xmlParserCtxtPtr ctxt);
|
||||
#endif
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlCtxtGetVersion (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlCtxtGetDeclaredEncoding(xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int
|
||||
xmlCtxtGetStandalone (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlParserStatus
|
||||
xmlCtxtGetStatus (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void
|
||||
xmlCtxtSetErrorHandler (xmlParserCtxtPtr ctxt,
|
||||
xmlStructuredErrorFunc handler,
|
||||
void *data);
|
||||
XMLPUBFUN void
|
||||
xmlCtxtSetResourceLoader(xmlParserCtxtPtr ctxt,
|
||||
xmlResourceLoader loader,
|
||||
void *vctxt);
|
||||
XMLPUBFUN void
|
||||
xmlCtxtSetCharEncConvImpl(xmlParserCtxtPtr ctxt,
|
||||
xmlCharEncConvImpl impl,
|
||||
void *vctxt);
|
||||
XMLPUBFUN void
|
||||
xmlCtxtSetMaxAmplification(xmlParserCtxtPtr ctxt,
|
||||
unsigned maxAmpl);
|
||||
@@ -1512,14 +1295,6 @@ XMLPUBFUN xmlDocPtr
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlCtxtParseDocument (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr input);
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlCtxtParseContent (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr input,
|
||||
xmlNodePtr node,
|
||||
int hasTextDecl);
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *cur,
|
||||
@@ -1553,29 +1328,6 @@ XMLPUBFUN xmlDocPtr
|
||||
const char *encoding,
|
||||
int options);
|
||||
|
||||
/**
|
||||
* New input API
|
||||
*/
|
||||
|
||||
XMLPUBFUN xmlParserErrors
|
||||
xmlNewInputFromUrl(const char *url, xmlParserInputFlags flags,
|
||||
xmlParserInputPtr *out);
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
xmlNewInputFromMemory(const char *url, const void *mem, size_t size,
|
||||
xmlParserInputFlags flags);
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
xmlNewInputFromString(const char *url, const char *str,
|
||||
xmlParserInputFlags flags);
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
xmlNewInputFromFd(const char *url, int fd, xmlParserInputFlags flags);
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
xmlNewInputFromIO(const char *url, xmlInputReadCallback ioRead,
|
||||
xmlInputCloseCallback ioClose, void *ioCtxt,
|
||||
xmlParserInputFlags flags);
|
||||
XMLPUBFUN xmlParserErrors
|
||||
xmlInputSetEncodingHandler(xmlParserInputPtr input,
|
||||
xmlCharEncodingHandlerPtr handler);
|
||||
|
||||
/*
|
||||
* Library wide options
|
||||
*/
|
||||
@@ -1616,11 +1368,10 @@ typedef enum {
|
||||
XML_WITH_MODULES = 27,
|
||||
XML_WITH_DEBUG = 28,
|
||||
XML_WITH_DEBUG_MEM = 29,
|
||||
XML_WITH_DEBUG_RUN = 30, /* unused */
|
||||
XML_WITH_DEBUG_RUN = 30,
|
||||
XML_WITH_ZLIB = 31,
|
||||
XML_WITH_ICU = 32,
|
||||
XML_WITH_LZMA = 33,
|
||||
XML_WITH_RELAXNG = 34, /* since 2.14.0 */
|
||||
XML_WITH_NONE = 99999 /* just to be sure of allocation size */
|
||||
} xmlFeature;
|
||||
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Backward compatibility
|
||||
/**
|
||||
* xmlParserMaxDepth:
|
||||
*
|
||||
* arbitrary depth limit for the XML documents that we allow to
|
||||
* process. This is not a limitation of the parser but a safety
|
||||
* boundary feature, use XML_PARSE_HUGE option to override it.
|
||||
*/
|
||||
#define inputPush xmlCtxtPushInput
|
||||
#define inputPop xmlCtxtPopInput
|
||||
#define xmlParserMaxDepth 256
|
||||
XMLPUBVAR unsigned int xmlParserMaxDepth;
|
||||
|
||||
/**
|
||||
* XML_MAX_TEXT_LENGTH:
|
||||
@@ -66,7 +68,7 @@ extern "C" {
|
||||
* use XML_PARSE_HUGE option to override it.
|
||||
* Introduced in 2.9.0
|
||||
*/
|
||||
#define XML_MAX_DICTIONARY_LIMIT 100000000
|
||||
#define XML_MAX_DICTIONARY_LIMIT 10000000
|
||||
|
||||
/**
|
||||
* XML_MAX_LOOKUP_LIMIT:
|
||||
@@ -86,6 +88,14 @@ extern "C" {
|
||||
*/
|
||||
#define XML_MAX_NAMELEN 100
|
||||
|
||||
/**
|
||||
* INPUT_CHUNK:
|
||||
*
|
||||
* The parser tries to always have that amount of input ready.
|
||||
* One of the point is providing context when reporting errors.
|
||||
*/
|
||||
#define INPUT_CHUNK 250
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* UNICODE version of the macros. *
|
||||
@@ -245,8 +255,8 @@ extern "C" {
|
||||
* Macro to check [a-zA-Z]
|
||||
*
|
||||
*/
|
||||
#define IS_ASCII_LETTER(c) ((0x61 <= ((c) | 0x20)) && \
|
||||
(((c) | 0x20) <= 0x7a))
|
||||
#define IS_ASCII_LETTER(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
|
||||
((0x61 <= (c)) && ((c) <= 0x7a)))
|
||||
|
||||
/**
|
||||
* IS_ASCII_DIGIT:
|
||||
@@ -281,10 +291,11 @@ extern "C" {
|
||||
*/
|
||||
XMLPUBVAR const xmlChar xmlStringText[];
|
||||
XMLPUBVAR const xmlChar xmlStringTextNoenc[];
|
||||
XML_DEPRECATED
|
||||
XMLPUBVAR const xmlChar xmlStringComment[];
|
||||
|
||||
XML_DEPRECATED
|
||||
/*
|
||||
* Function to finish the work of the macros where needed.
|
||||
*/
|
||||
XMLPUBFUN int xmlIsLetter (int c);
|
||||
|
||||
/**
|
||||
@@ -298,19 +309,13 @@ XMLPUBFUN xmlParserCtxtPtr
|
||||
XMLPUBFUN xmlParserCtxtPtr
|
||||
xmlCreateMemoryParserCtxt(const char *buffer,
|
||||
int size);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlParserCtxtPtr
|
||||
xmlCreateEntityParserCtxt(const xmlChar *URL,
|
||||
const xmlChar *ID,
|
||||
const xmlChar *base);
|
||||
XMLPUBFUN void
|
||||
xmlCtxtErrMemory (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int
|
||||
xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN int
|
||||
xmlSwitchEncodingName (xmlParserCtxtPtr ctxt,
|
||||
const char *encoding);
|
||||
XMLPUBFUN int
|
||||
xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
|
||||
xmlCharEncodingHandlerPtr handler);
|
||||
@@ -330,16 +335,9 @@ XML_DEPRECATED
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
|
||||
xmlEntityPtr entity);
|
||||
XMLPUBFUN int
|
||||
xmlCtxtPushInput (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr input);
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
xmlCtxtPopInput (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlPushInput (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr input);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar
|
||||
xmlPopInput (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void
|
||||
@@ -505,7 +503,6 @@ XMLPUBFUN void
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseMisc (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *ExternalID,
|
||||
@@ -553,6 +550,23 @@ XMLPUBFUN xmlChar *
|
||||
xmlChar end2,
|
||||
xmlChar end3);
|
||||
|
||||
/*
|
||||
* Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int nodePush (xmlParserCtxtPtr ctxt,
|
||||
xmlNodePtr value);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlNodePtr nodePop (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int inputPush (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr value);
|
||||
XMLPUBFUN xmlParserInputPtr inputPop (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const xmlChar * namePop (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int namePush (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *value);
|
||||
|
||||
/*
|
||||
* other commodities shared between parser.c and parserInternals.
|
||||
*/
|
||||
@@ -573,10 +587,8 @@ XMLPUBFUN int xmlCheckLanguageID (const xmlChar *lang);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int xmlCurrentChar (xmlParserCtxtPtr ctxt,
|
||||
int *len);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int xmlCopyCharMultiByte (xmlChar *out,
|
||||
int val);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int xmlCopyChar (int len,
|
||||
xmlChar *out,
|
||||
int val);
|
||||
@@ -585,6 +597,66 @@ XMLPUBFUN void xmlNextChar (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void xmlParserInputShrink (xmlParserInputPtr in);
|
||||
|
||||
/*
|
||||
* Specific function to keep track of entities references
|
||||
* and used by the XSLT debugger.
|
||||
*/
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
/**
|
||||
* xmlEntityReferenceFunc:
|
||||
* @ent: the entity
|
||||
* @firstNode: the fist node in the chunk
|
||||
* @lastNode: the last nod in the chunk
|
||||
*
|
||||
* Callback function used when one needs to be able to track back the
|
||||
* provenance of a chunk of nodes inherited from an entity replacement.
|
||||
*/
|
||||
typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
|
||||
xmlNodePtr firstNode,
|
||||
xmlNodePtr lastNode);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlParseQuotedString (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseNamespace (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlScanName (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void xmlParserHandleReference(xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
|
||||
xmlChar **prefix);
|
||||
/**
|
||||
* Entities
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlDecodeEntities (xmlParserCtxtPtr ctxt,
|
||||
int len,
|
||||
int what,
|
||||
xmlChar end,
|
||||
xmlChar end2,
|
||||
xmlChar end3);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlHandleEntity (xmlParserCtxtPtr ctxt,
|
||||
xmlEntityPtr entity);
|
||||
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -14,9 +14,8 @@
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#ifdef LIBXML_RELAXNG_ENABLED
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -156,10 +155,6 @@ XMLPUBFUN void
|
||||
xmlRelaxNGParserCtxtPtr ctxt,
|
||||
xmlStructuredErrorFunc serror,
|
||||
void *ctx);
|
||||
XMLPUBFUN void
|
||||
xmlRelaxNGSetResourceLoader (xmlRelaxNGParserCtxtPtr ctxt,
|
||||
xmlResourceLoader loader,
|
||||
void *vctxt);
|
||||
XMLPUBFUN xmlRelaxNGPtr
|
||||
xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void
|
||||
@@ -219,6 +214,6 @@ XMLPUBFUN int
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_RELAXNG_ENABLED */
|
||||
#endif /* LIBXML_SCHEMAS_ENABLED */
|
||||
|
||||
#endif /* __XML_RELAX_NG__ */
|
||||
|
||||
@@ -61,6 +61,12 @@ XMLPUBFUN void
|
||||
XMLPUBFUN void
|
||||
xmlUnlockLibrary(void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlGetThreadId (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlIsMainThread (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlCleanupThreads(void);
|
||||
|
||||
|
||||
@@ -32,12 +32,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Backward compatibility
|
||||
*/
|
||||
#define xmlBufferAllocScheme XML_BUFFER_ALLOC_EXACT
|
||||
#define xmlDefaultBufferSize 4096
|
||||
|
||||
/*
|
||||
* Some of the basic types pointer to structures:
|
||||
*/
|
||||
@@ -65,6 +59,13 @@ typedef xmlSAXHandler *xmlSAXHandlerPtr;
|
||||
typedef struct _xmlEntity xmlEntity;
|
||||
typedef xmlEntity *xmlEntityPtr;
|
||||
|
||||
/**
|
||||
* BASE_BUFFER_SIZE:
|
||||
*
|
||||
* default buffer size 4000.
|
||||
*/
|
||||
#define BASE_BUFFER_SIZE 4096
|
||||
|
||||
/**
|
||||
* LIBXML_NAMESPACE_DICT:
|
||||
*
|
||||
@@ -99,16 +100,11 @@ typedef enum {
|
||||
typedef struct _xmlBuffer xmlBuffer;
|
||||
typedef xmlBuffer *xmlBufferPtr;
|
||||
struct _xmlBuffer {
|
||||
/* The buffer content UTF8 */
|
||||
xmlChar *content XML_DEPRECATED_MEMBER;
|
||||
/* The buffer size used */
|
||||
unsigned int use XML_DEPRECATED_MEMBER;
|
||||
/* The buffer size */
|
||||
unsigned int size XML_DEPRECATED_MEMBER;
|
||||
/* The realloc method */
|
||||
xmlBufferAllocationScheme alloc XML_DEPRECATED_MEMBER;
|
||||
/* in IO mode we may have a different base */
|
||||
xmlChar *contentIO XML_DEPRECATED_MEMBER;
|
||||
xmlChar *content; /* The buffer content UTF8 */
|
||||
unsigned int use; /* The buffer size used */
|
||||
unsigned int size; /* The buffer size */
|
||||
xmlBufferAllocationScheme alloc; /* The realloc method */
|
||||
xmlChar *contentIO; /* in IO mode we may have a different base */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -177,13 +173,13 @@ typedef enum {
|
||||
XML_TEXT_NODE= 3,
|
||||
XML_CDATA_SECTION_NODE= 4,
|
||||
XML_ENTITY_REF_NODE= 5,
|
||||
XML_ENTITY_NODE= 6, /* unused */
|
||||
XML_ENTITY_NODE= 6,
|
||||
XML_PI_NODE= 7,
|
||||
XML_COMMENT_NODE= 8,
|
||||
XML_DOCUMENT_NODE= 9,
|
||||
XML_DOCUMENT_TYPE_NODE= 10, /* unused */
|
||||
XML_DOCUMENT_TYPE_NODE= 10,
|
||||
XML_DOCUMENT_FRAG_NODE= 11,
|
||||
XML_NOTATION_NODE= 12, /* unused */
|
||||
XML_NOTATION_NODE= 12,
|
||||
XML_HTML_DOCUMENT_NODE= 13,
|
||||
XML_DTD_NODE= 14,
|
||||
XML_ELEMENT_DECL= 15,
|
||||
@@ -453,7 +449,6 @@ struct _xmlAttr {
|
||||
xmlNs *ns; /* pointer to the associated namespace */
|
||||
xmlAttributeType atype; /* the attribute type if validating */
|
||||
void *psvi; /* for type/PSVI information */
|
||||
struct _xmlID *id; /* the ID struct */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -678,16 +673,24 @@ typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
|
||||
*/
|
||||
|
||||
/** DOC_DISABLE */
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlRegisterNodeFunc *__xmlRegisterNodeDefaultValue(void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlDeregisterNodeFunc *__xmlDeregisterNodeDefaultValue(void);
|
||||
#define XML_GLOBALS_TREE \
|
||||
XML_OP(xmlBufferAllocScheme, xmlBufferAllocationScheme, XML_DEPRECATED) \
|
||||
XML_OP(xmlDefaultBufferSize, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlRegisterNodeDefaultValue, xmlRegisterNodeFunc, XML_DEPRECATED) \
|
||||
XML_OP(xmlDeregisterNodeDefaultValue, xmlDeregisterNodeFunc, \
|
||||
XML_DEPRECATED)
|
||||
|
||||
#ifndef XML_GLOBALS_NO_REDEFINITION
|
||||
#define XML_OP XML_DECLARE_GLOBAL
|
||||
XML_GLOBALS_TREE
|
||||
#undef XML_OP
|
||||
|
||||
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
||||
#define xmlBufferAllocScheme XML_GLOBAL_MACRO(xmlBufferAllocScheme)
|
||||
#define xmlDefaultBufferSize XML_GLOBAL_MACRO(xmlDefaultBufferSize)
|
||||
#define xmlRegisterNodeDefaultValue \
|
||||
(*__xmlRegisterNodeDefaultValue())
|
||||
XML_GLOBAL_MACRO(xmlRegisterNodeDefaultValue)
|
||||
#define xmlDeregisterNodeDefaultValue \
|
||||
(*__xmlDeregisterNodeDefaultValue())
|
||||
XML_GLOBAL_MACRO(xmlDeregisterNodeDefaultValue)
|
||||
#endif
|
||||
/** DOC_ENABLE */
|
||||
|
||||
@@ -698,6 +701,7 @@ XMLPUBFUN int
|
||||
xmlValidateNCName (const xmlChar *value,
|
||||
int space);
|
||||
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN int
|
||||
xmlValidateQName (const xmlChar *value,
|
||||
int space);
|
||||
@@ -707,6 +711,7 @@ XMLPUBFUN int
|
||||
XMLPUBFUN int
|
||||
xmlValidateNMToken (const xmlChar *value,
|
||||
int space);
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlBuildQName (const xmlChar *ncname,
|
||||
@@ -724,10 +729,8 @@ XMLPUBFUN const xmlChar *
|
||||
* Handling Buffers, the old ones see @xmlBuf for the new ones.
|
||||
*/
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlBufferAllocationScheme
|
||||
xmlGetBufferAllocationScheme(void);
|
||||
|
||||
@@ -738,7 +741,6 @@ XMLPUBFUN xmlBufferPtr
|
||||
XMLPUBFUN xmlBufferPtr
|
||||
xmlBufferCreateStatic (void *mem,
|
||||
size_t size);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlBufferResize (xmlBufferPtr buf,
|
||||
unsigned int size);
|
||||
@@ -761,11 +763,9 @@ XMLPUBFUN int
|
||||
XMLPUBFUN int
|
||||
xmlBufferCCat (xmlBufferPtr buf,
|
||||
const char *str);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlBufferShrink (xmlBufferPtr buf,
|
||||
unsigned int len);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlBufferGrow (xmlBufferPtr buf,
|
||||
unsigned int len);
|
||||
@@ -798,6 +798,13 @@ XMLPUBFUN xmlDtdPtr
|
||||
xmlGetIntSubset (const xmlDoc *doc);
|
||||
XMLPUBFUN void
|
||||
xmlFreeDtd (xmlDtdPtr cur);
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlNsPtr
|
||||
xmlNewGlobalNs (xmlDocPtr doc,
|
||||
const xmlChar *href,
|
||||
const xmlChar *prefix);
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
XMLPUBFUN xmlNsPtr
|
||||
xmlNewNs (xmlNodePtr node,
|
||||
const xmlChar *href,
|
||||
@@ -814,10 +821,13 @@ XMLPUBFUN xmlAttrPtr
|
||||
xmlNewDocProp (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN xmlAttrPtr
|
||||
xmlNewProp (xmlNodePtr node,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
#endif
|
||||
XMLPUBFUN xmlAttrPtr
|
||||
xmlNewNsProp (xmlNodePtr node,
|
||||
xmlNsPtr ns,
|
||||
@@ -838,11 +848,15 @@ XMLPUBFUN xmlAttrPtr
|
||||
XMLPUBFUN xmlAttrPtr
|
||||
xmlCopyPropList (xmlNodePtr target,
|
||||
xmlAttrPtr cur);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlDtdPtr
|
||||
xmlCopyDtd (xmlDtdPtr dtd);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlCopyDoc (xmlDocPtr doc,
|
||||
int recursive);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
|
||||
/*
|
||||
* Creating new nodes.
|
||||
*/
|
||||
@@ -862,11 +876,13 @@ XMLPUBFUN xmlNodePtr
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewNodeEatName (xmlNsPtr ns,
|
||||
xmlChar *name);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewChild (xmlNodePtr parent,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *name,
|
||||
const xmlChar *content);
|
||||
#endif
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewDocText (const xmlDoc *doc,
|
||||
const xmlChar *content);
|
||||
@@ -913,6 +929,7 @@ XMLPUBFUN xmlNodePtr
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlCopyNodeList (xmlNodePtr node);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewTextChild (xmlNodePtr parent,
|
||||
xmlNsPtr ns,
|
||||
@@ -925,14 +942,17 @@ XMLPUBFUN xmlNodePtr
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewDocFragment (xmlDocPtr doc);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
|
||||
/*
|
||||
* Navigating.
|
||||
*/
|
||||
XMLPUBFUN long
|
||||
xmlGetLineNo (const xmlNode *node);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlGetNodePath (const xmlNode *node);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlDocGetRootElement (const xmlDoc *doc);
|
||||
XMLPUBFUN xmlNodePtr
|
||||
@@ -945,24 +965,33 @@ XMLPUBFUN int
|
||||
/*
|
||||
* Changing the structure.
|
||||
*/
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlDocSetRootElement (xmlDocPtr doc,
|
||||
xmlNodePtr root);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN void
|
||||
xmlNodeSetName (xmlNodePtr cur,
|
||||
const xmlChar *name);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlAddChild (xmlNodePtr parent,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlAddChildList (xmlNodePtr parent,
|
||||
xmlNodePtr cur);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlReplaceNode (xmlNodePtr old,
|
||||
xmlNodePtr cur);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlAddPrevSibling (xmlNodePtr cur,
|
||||
xmlNodePtr elem);
|
||||
#endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlAddSibling (xmlNodePtr cur,
|
||||
xmlNodePtr elem);
|
||||
@@ -982,10 +1011,10 @@ XMLPUBFUN void
|
||||
xmlFreeNodeList (xmlNodePtr cur);
|
||||
XMLPUBFUN void
|
||||
xmlFreeNode (xmlNodePtr cur);
|
||||
XMLPUBFUN int
|
||||
XMLPUBFUN void
|
||||
xmlSetTreeDoc (xmlNodePtr tree,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN int
|
||||
XMLPUBFUN void
|
||||
xmlSetListDoc (xmlNodePtr list,
|
||||
xmlDocPtr doc);
|
||||
/*
|
||||
@@ -999,13 +1028,12 @@ XMLPUBFUN xmlNsPtr
|
||||
xmlSearchNsByHref (xmlDocPtr doc,
|
||||
xmlNodePtr node,
|
||||
const xmlChar *href);
|
||||
XMLPUBFUN int
|
||||
xmlGetNsListSafe (const xmlDoc *doc,
|
||||
const xmlNode *node,
|
||||
xmlNsPtr **out);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN xmlNsPtr *
|
||||
xmlGetNsList (const xmlDoc *doc,
|
||||
const xmlNode *node);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
|
||||
|
||||
XMLPUBFUN void
|
||||
xmlSetNs (xmlNodePtr node,
|
||||
@@ -1018,6 +1046,8 @@ XMLPUBFUN xmlNsPtr
|
||||
/*
|
||||
* Changing the content.
|
||||
*/
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
|
||||
XMLPUBFUN xmlAttrPtr
|
||||
xmlSetProp (xmlNodePtr node,
|
||||
const xmlChar *name,
|
||||
@@ -1027,11 +1057,8 @@ XMLPUBFUN xmlAttrPtr
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN int
|
||||
xmlNodeGetAttrValue (const xmlNode *node,
|
||||
const xmlChar *name,
|
||||
const xmlChar *nsUri,
|
||||
xmlChar **out);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlGetNoNsProp (const xmlNode *node,
|
||||
const xmlChar *name);
|
||||
@@ -1060,21 +1087,25 @@ XMLPUBFUN xmlChar *
|
||||
xmlNodeListGetString (xmlDocPtr doc,
|
||||
const xmlNode *list,
|
||||
int inLine);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlNodeListGetRawString (const xmlDoc *doc,
|
||||
const xmlNode *list,
|
||||
int inLine);
|
||||
XMLPUBFUN int
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void
|
||||
xmlNodeSetContent (xmlNodePtr cur,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN int
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN void
|
||||
xmlNodeSetContentLen (xmlNodePtr cur,
|
||||
const xmlChar *content,
|
||||
int len);
|
||||
XMLPUBFUN int
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void
|
||||
xmlNodeAddContent (xmlNodePtr cur,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN int
|
||||
XMLPUBFUN void
|
||||
xmlNodeAddContentLen (xmlNodePtr cur,
|
||||
const xmlChar *content,
|
||||
int len);
|
||||
@@ -1092,28 +1123,29 @@ XMLPUBFUN xmlChar *
|
||||
xmlNodeGetLang (const xmlNode *cur);
|
||||
XMLPUBFUN int
|
||||
xmlNodeGetSpacePreserve (const xmlNode *cur);
|
||||
XMLPUBFUN int
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN void
|
||||
xmlNodeSetLang (xmlNodePtr cur,
|
||||
const xmlChar *lang);
|
||||
XMLPUBFUN int
|
||||
XMLPUBFUN void
|
||||
xmlNodeSetSpacePreserve (xmlNodePtr cur,
|
||||
int val);
|
||||
XMLPUBFUN int
|
||||
xmlNodeGetBaseSafe (const xmlDoc *doc,
|
||||
const xmlNode *cur,
|
||||
xmlChar **baseOut);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlNodeGetBase (const xmlDoc *doc,
|
||||
const xmlNode *cur);
|
||||
XMLPUBFUN int
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
|
||||
XMLPUBFUN void
|
||||
xmlNodeSetBase (xmlNodePtr cur,
|
||||
const xmlChar *uri);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Removing content.
|
||||
*/
|
||||
XMLPUBFUN int
|
||||
xmlRemoveProp (xmlAttrPtr cur);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN int
|
||||
xmlUnsetNsProp (xmlNodePtr node,
|
||||
xmlNsPtr ns,
|
||||
@@ -1121,6 +1153,7 @@ XMLPUBFUN int
|
||||
XMLPUBFUN int
|
||||
xmlUnsetProp (xmlNodePtr node,
|
||||
const xmlChar *name);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
|
||||
|
||||
/*
|
||||
* Internal, don't use.
|
||||
@@ -1142,12 +1175,14 @@ XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
|
||||
const xmlChar *string);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
/*
|
||||
* Namespace handling.
|
||||
*/
|
||||
XMLPUBFUN int
|
||||
xmlReconciliateNs (xmlDocPtr doc,
|
||||
xmlNodePtr tree);
|
||||
#endif
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
/*
|
||||
@@ -1248,10 +1283,8 @@ XMLPUBFUN int
|
||||
XMLPUBFUN void
|
||||
xmlSetDocCompressMode (xmlDocPtr doc,
|
||||
int mode);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlGetCompressMode (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlSetCompressMode (int mode);
|
||||
|
||||
@@ -1288,6 +1321,7 @@ XMLPUBFUN int
|
||||
int deep,
|
||||
int options);
|
||||
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
/*
|
||||
* 5 interfaces from DOM ElementTraversal, but different in entities
|
||||
* traversal.
|
||||
@@ -1302,20 +1336,22 @@ XMLPUBFUN xmlNodePtr
|
||||
xmlLastElementChild (xmlNodePtr parent);
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlPreviousElementSibling (xmlNodePtr node);
|
||||
#endif
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlRegisterNodeFunc
|
||||
xmlRegisterNodeDefault (xmlRegisterNodeFunc func);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlDeregisterNodeFunc
|
||||
xmlDeregisterNodeDefault (xmlDeregisterNodeFunc func);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlRegisterNodeFunc
|
||||
xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlDeregisterNodeFunc
|
||||
xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
|
||||
|
||||
XML_DEPRECATED XMLPUBFUN xmlBufferAllocationScheme
|
||||
xmlThrDefBufferAllocScheme (xmlBufferAllocationScheme v);
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefDefaultBufferSize (int v);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -52,25 +52,14 @@ struct _xmlURI {
|
||||
*/
|
||||
XMLPUBFUN xmlURIPtr
|
||||
xmlCreateURI (void);
|
||||
XMLPUBFUN int
|
||||
xmlBuildURISafe (const xmlChar *URI,
|
||||
const xmlChar *base,
|
||||
xmlChar **out);
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlBuildURI (const xmlChar *URI,
|
||||
const xmlChar *base);
|
||||
XMLPUBFUN int
|
||||
xmlBuildRelativeURISafe (const xmlChar *URI,
|
||||
const xmlChar *base,
|
||||
xmlChar **out);
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlBuildRelativeURI (const xmlChar *URI,
|
||||
const xmlChar *base);
|
||||
XMLPUBFUN xmlURIPtr
|
||||
xmlParseURI (const char *str);
|
||||
XMLPUBFUN int
|
||||
xmlParseURISafe (const char *str,
|
||||
xmlURIPtr *uri);
|
||||
XMLPUBFUN xmlURIPtr
|
||||
xmlParseURIRaw (const char *str,
|
||||
int raw);
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#ifndef __XML_VALID_H__
|
||||
#define __XML_VALID_H__
|
||||
|
||||
/** DOC_DISABLE */
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#define XML_TREE_INTERNALS
|
||||
@@ -20,7 +19,6 @@
|
||||
#include <libxml/list.h>
|
||||
#include <libxml/xmlautomata.h>
|
||||
#include <libxml/xmlregexp.h>
|
||||
/** DOC_ENABLE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -145,18 +143,16 @@ XMLPUBFUN xmlNotationPtr
|
||||
const xmlChar *name,
|
||||
const xmlChar *PublicID,
|
||||
const xmlChar *SystemID);
|
||||
XML_DEPRECATED
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlNotationTablePtr
|
||||
xmlCopyNotationTable (xmlNotationTablePtr table);
|
||||
XML_DEPRECATED
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void
|
||||
xmlFreeNotationTable (xmlNotationTablePtr table);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlDumpNotationDecl (xmlBufferPtr buf,
|
||||
xmlNotationPtr nota);
|
||||
/* XML_DEPRECATED, still used in lxml */
|
||||
XMLPUBFUN void
|
||||
xmlDumpNotationTable (xmlBufferPtr buf,
|
||||
xmlNotationTablePtr table);
|
||||
@@ -164,43 +160,37 @@ XMLPUBFUN void
|
||||
|
||||
/* Element Content */
|
||||
/* the non Doc version are being deprecated */
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlElementContentPtr
|
||||
xmlNewElementContent (const xmlChar *name,
|
||||
xmlElementContentType type);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlElementContentPtr
|
||||
xmlCopyElementContent (xmlElementContentPtr content);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlFreeElementContent (xmlElementContentPtr cur);
|
||||
/* the new versions with doc argument */
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlElementContentPtr
|
||||
xmlNewDocElementContent (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
xmlElementContentType type);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlElementContentPtr
|
||||
xmlCopyDocElementContent(xmlDocPtr doc,
|
||||
xmlElementContentPtr content);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlFreeDocElementContent(xmlDocPtr doc,
|
||||
xmlElementContentPtr cur);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlSnprintfElementContent(char *buf,
|
||||
int size,
|
||||
xmlElementContentPtr content,
|
||||
int englob);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XML_DEPRECATED
|
||||
/* DEPRECATED */
|
||||
XMLPUBFUN void
|
||||
xmlSprintfElementContent(char *buf,
|
||||
xmlElementContentPtr content,
|
||||
int englob);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
/* DEPRECATED */
|
||||
|
||||
/* Element */
|
||||
XMLPUBFUN xmlElementPtr
|
||||
@@ -209,33 +199,30 @@ XMLPUBFUN xmlElementPtr
|
||||
const xmlChar *name,
|
||||
xmlElementTypeVal type,
|
||||
xmlElementContentPtr content);
|
||||
XML_DEPRECATED
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlElementTablePtr
|
||||
xmlCopyElementTable (xmlElementTablePtr table);
|
||||
XML_DEPRECATED
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void
|
||||
xmlFreeElementTable (xmlElementTablePtr table);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlDumpElementTable (xmlBufferPtr buf,
|
||||
xmlElementTablePtr table);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlDumpElementDecl (xmlBufferPtr buf,
|
||||
xmlElementPtr elem);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/* Enumeration */
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlEnumerationPtr
|
||||
xmlCreateEnumeration (const xmlChar *name);
|
||||
/* XML_DEPRECATED, needed for custom attributeDecl SAX handler */
|
||||
XMLPUBFUN void
|
||||
xmlFreeEnumeration (xmlEnumerationPtr cur);
|
||||
XML_DEPRECATED
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlEnumerationPtr
|
||||
xmlCopyEnumeration (xmlEnumerationPtr cur);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
|
||||
/* Attribute */
|
||||
XMLPUBFUN xmlAttributePtr
|
||||
@@ -248,27 +235,22 @@ XMLPUBFUN xmlAttributePtr
|
||||
xmlAttributeDefault def,
|
||||
const xmlChar *defaultValue,
|
||||
xmlEnumerationPtr tree);
|
||||
XML_DEPRECATED
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlAttributeTablePtr
|
||||
xmlCopyAttributeTable (xmlAttributeTablePtr table);
|
||||
XML_DEPRECATED
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void
|
||||
xmlFreeAttributeTable (xmlAttributeTablePtr table);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlDumpAttributeTable (xmlBufferPtr buf,
|
||||
xmlAttributeTablePtr table);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlDumpAttributeDecl (xmlBufferPtr buf,
|
||||
xmlAttributePtr attr);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/* IDs */
|
||||
XMLPUBFUN int
|
||||
xmlAddIDSafe (xmlAttrPtr attr,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN xmlIDPtr
|
||||
xmlAddID (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
@@ -321,38 +303,31 @@ XMLPUBFUN xmlValidCtxtPtr
|
||||
XMLPUBFUN void
|
||||
xmlFreeValidCtxt(xmlValidCtxtPtr);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlValidateRoot (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlElementPtr elem);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlValidNormalizeAttributeValue(xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlAttributePtr attr);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlValidateAttributeValue(xmlAttributeType type,
|
||||
const xmlChar *value);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
@@ -361,7 +336,6 @@ XMLPUBFUN int
|
||||
xmlValidateDtd (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlDtdPtr dtd);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
@@ -372,19 +346,16 @@ XMLPUBFUN int
|
||||
xmlValidateElement (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlValidateOneElement (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
xmlAttrPtr attr,
|
||||
const xmlChar *value);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
@@ -392,16 +363,17 @@ XMLPUBFUN int
|
||||
const xmlChar *prefix,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *value);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
XML_DEPRECATED
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
|
||||
#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN int
|
||||
xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
const xmlChar *notationName);
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
|
||||
|
||||
XMLPUBFUN int
|
||||
xmlIsMixedElement (xmlDocPtr doc,
|
||||
@@ -452,23 +424,19 @@ XMLPUBFUN int
|
||||
/*
|
||||
* Validation based on the regexp support
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
|
||||
xmlElementPtr elem);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlValidatePushElement (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
const xmlChar *qname);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlValidatePushCData (xmlValidCtxtPtr ctxt,
|
||||
const xmlChar *data,
|
||||
int len);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlValidatePopElement (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
#define __XML_XINCLUDE_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
|
||||
@@ -117,16 +115,6 @@ XMLPUBFUN xmlXIncludeCtxtPtr
|
||||
XMLPUBFUN int
|
||||
xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
|
||||
int flags);
|
||||
XMLPUBFUN void
|
||||
xmlXIncludeSetErrorHandler(xmlXIncludeCtxtPtr ctxt,
|
||||
xmlStructuredErrorFunc handler,
|
||||
void *data);
|
||||
XMLPUBFUN void
|
||||
xmlXIncludeSetResourceLoader(xmlXIncludeCtxtPtr ctxt,
|
||||
xmlResourceLoader loader,
|
||||
void *data);
|
||||
XMLPUBFUN int
|
||||
xmlXIncludeGetLastError (xmlXIncludeCtxtPtr ctxt);
|
||||
XMLPUBFUN void
|
||||
xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
|
||||
XMLPUBFUN int
|
||||
|
||||
@@ -160,20 +160,16 @@ struct _xlinkHandler {
|
||||
* detection callbacks.
|
||||
*/
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xlinkNodeDetectFunc
|
||||
xlinkGetDefaultDetect (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xlinkSetDefaultDetect (xlinkNodeDetectFunc func);
|
||||
|
||||
/*
|
||||
* Routines to set/get the default handlers.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xlinkHandlerPtr
|
||||
xlinkGetDefaultHandler (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xlinkSetDefaultHandler (xlinkHandlerPtr handler);
|
||||
|
||||
|
||||
@@ -10,14 +10,12 @@
|
||||
#ifndef __XML_IO_H__
|
||||
#define __XML_IO_H__
|
||||
|
||||
/** DOC_DISABLE */
|
||||
#include <stdio.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/encoding.h>
|
||||
#define XML_TREE_INTERNALS
|
||||
#include <libxml/tree.h>
|
||||
#undef XML_TREE_INTERNALS
|
||||
/** DOC_ENABLE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -176,18 +174,21 @@ struct _xmlOutputBuffer {
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/** DOC_DISABLE */
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc *
|
||||
__xmlParserInputBufferCreateFilenameValue(void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlOutputBufferCreateFilenameFunc *
|
||||
__xmlOutputBufferCreateFilenameValue(void);
|
||||
#define XML_GLOBALS_IO \
|
||||
XML_OP(xmlParserInputBufferCreateFilenameValue, \
|
||||
xmlParserInputBufferCreateFilenameFunc, XML_DEPRECATED) \
|
||||
XML_OP(xmlOutputBufferCreateFilenameValue, \
|
||||
xmlOutputBufferCreateFilenameFunc, XML_DEPRECATED)
|
||||
|
||||
#ifndef XML_GLOBALS_NO_REDEFINITION
|
||||
#define XML_OP XML_DECLARE_GLOBAL
|
||||
XML_GLOBALS_IO
|
||||
#undef XML_OP
|
||||
|
||||
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
||||
#define xmlParserInputBufferCreateFilenameValue \
|
||||
(*__xmlParserInputBufferCreateFilenameValue())
|
||||
XML_GLOBAL_MACRO(xmlParserInputBufferCreateFilenameValue)
|
||||
#define xmlOutputBufferCreateFilenameValue \
|
||||
(*__xmlOutputBufferCreateFilenameValue())
|
||||
XML_GLOBAL_MACRO(xmlOutputBufferCreateFilenameValue)
|
||||
#endif
|
||||
/** DOC_ENABLE */
|
||||
|
||||
@@ -208,7 +209,6 @@ XMLPUBFUN xmlParserInputBufferPtr
|
||||
XMLPUBFUN xmlParserInputBufferPtr
|
||||
xmlParserInputBufferCreateFilename (const char *URI,
|
||||
xmlCharEncoding enc);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlParserInputBufferPtr
|
||||
xmlParserInputBufferCreateFile (FILE *file,
|
||||
xmlCharEncoding enc);
|
||||
@@ -226,15 +226,12 @@ XMLPUBFUN xmlParserInputBufferPtr
|
||||
xmlInputCloseCallback ioclose,
|
||||
void *ioctx,
|
||||
xmlCharEncoding enc);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlParserInputBufferRead (xmlParserInputBufferPtr in,
|
||||
int len);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
|
||||
int len);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlParserInputBufferPush (xmlParserInputBufferPtr in,
|
||||
int len,
|
||||
@@ -250,7 +247,7 @@ XMLPUBFUN int
|
||||
xmlInputReadCallback readFunc,
|
||||
xmlInputCloseCallback closeFunc);
|
||||
|
||||
XMLPUBFUN xmlParserInputBufferPtr
|
||||
xmlParserInputBufferPtr
|
||||
__xmlParserInputBufferCreateFilename(const char *URI,
|
||||
xmlCharEncoding enc);
|
||||
|
||||
@@ -319,21 +316,19 @@ XMLPUBFUN int
|
||||
xmlOutputWriteCallback writeFunc,
|
||||
xmlOutputCloseCallback closeFunc);
|
||||
|
||||
XMLPUBFUN xmlOutputBufferPtr
|
||||
xmlOutputBufferPtr
|
||||
__xmlOutputBufferCreateFilename(const char *URI,
|
||||
xmlCharEncodingHandlerPtr encoder,
|
||||
int compression);
|
||||
|
||||
#ifdef LIBXML_HTTP_ENABLED
|
||||
/* This function only exists if HTTP support built into the library */
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlRegisterHTTPPostCallbacks (void );
|
||||
#endif /* LIBXML_HTTP_ENABLED */
|
||||
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
xmlCheckHTTPInput (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr ret);
|
||||
@@ -346,28 +341,26 @@ XMLPUBFUN xmlParserInputPtr
|
||||
const char *ID,
|
||||
xmlParserCtxtPtr ctxt);
|
||||
|
||||
XML_DEPRECATED
|
||||
/*
|
||||
* xmlNormalizeWindowsPath is obsolete, don't use it.
|
||||
* Check xmlCanonicPath in uri.h for a better alternative.
|
||||
*/
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlNormalizeWindowsPath (const xmlChar *path);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlCheckFilename (const char *path);
|
||||
/**
|
||||
* Default 'file://' protocol callbacks
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlFileMatch (const char *filename);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void *
|
||||
xmlFileOpen (const char *filename);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlFileRead (void * context,
|
||||
char * buffer,
|
||||
int len);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlFileClose (void * context);
|
||||
|
||||
@@ -375,39 +368,48 @@ XMLPUBFUN int
|
||||
* Default 'http://' protocol callbacks
|
||||
*/
|
||||
#ifdef LIBXML_HTTP_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlIOHTTPMatch (const char *filename);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void *
|
||||
xmlIOHTTPOpen (const char *filename);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void *
|
||||
xmlIOHTTPOpenW (const char * post_uri,
|
||||
int compression );
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlIOHTTPRead (void * context,
|
||||
char * buffer,
|
||||
int len);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlIOHTTPClose (void * context);
|
||||
#endif /* LIBXML_HTTP_ENABLED */
|
||||
|
||||
/**
|
||||
* Default 'ftp://' protocol callbacks
|
||||
*/
|
||||
#if defined(LIBXML_FTP_ENABLED)
|
||||
XMLPUBFUN int
|
||||
xmlIOFTPMatch (const char *filename);
|
||||
XMLPUBFUN void *
|
||||
xmlIOFTPOpen (const char *filename);
|
||||
XMLPUBFUN int
|
||||
xmlIOFTPRead (void * context,
|
||||
char * buffer,
|
||||
int len);
|
||||
XMLPUBFUN int
|
||||
xmlIOFTPClose (void * context);
|
||||
#endif /* defined(LIBXML_FTP_ENABLED) */
|
||||
|
||||
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
|
||||
xmlParserInputBufferCreateFilenameDefault(
|
||||
xmlParserInputBufferCreateFilenameFunc func);
|
||||
XMLPUBFUN xmlOutputBufferCreateFilenameFunc
|
||||
xmlOutputBufferCreateFilenameDefault(
|
||||
xmlOutputBufferCreateFilenameFunc func);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlOutputBufferCreateFilenameFunc
|
||||
xmlThrDefOutputBufferCreateFilenameDefault(
|
||||
xmlOutputBufferCreateFilenameFunc func);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
|
||||
xmlThrDefParserInputBufferCreateFilenameDefault(
|
||||
xmlParserInputBufferCreateFilenameFunc func);
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_REGEXP_ENABLED
|
||||
#ifdef LIBXML_AUTOMATA_ENABLED
|
||||
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
@@ -39,31 +40,24 @@ typedef xmlAutomataState *xmlAutomataStatePtr;
|
||||
/*
|
||||
* Building API
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlAutomataPtr
|
||||
xmlNewAutomata (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlFreeAutomata (xmlAutomataPtr am);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataGetInitState (xmlAutomataPtr am);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlAutomataSetFinalState (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr state);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewState (xmlAutomataPtr am);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewTransition (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
const xmlChar *token,
|
||||
void *data);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewTransition2 (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
@@ -71,7 +65,6 @@ XMLPUBFUN xmlAutomataStatePtr
|
||||
const xmlChar *token,
|
||||
const xmlChar *token2,
|
||||
void *data);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewNegTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
@@ -80,7 +73,6 @@ XMLPUBFUN xmlAutomataStatePtr
|
||||
const xmlChar *token2,
|
||||
void *data);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewCountTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
@@ -89,7 +81,6 @@ XMLPUBFUN xmlAutomataStatePtr
|
||||
int min,
|
||||
int max,
|
||||
void *data);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
@@ -99,7 +90,6 @@ XMLPUBFUN xmlAutomataStatePtr
|
||||
int min,
|
||||
int max,
|
||||
void *data);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewOnceTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
@@ -108,7 +98,6 @@ XMLPUBFUN xmlAutomataStatePtr
|
||||
int min,
|
||||
int max,
|
||||
void *data);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
@@ -118,39 +107,32 @@ XMLPUBFUN xmlAutomataStatePtr
|
||||
int min,
|
||||
int max,
|
||||
void *data);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewAllTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
int lax);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewEpsilon (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewCountedTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
int counter);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewCounterTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
int counter);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlAutomataNewCounter (xmlAutomataPtr am,
|
||||
int min,
|
||||
int max);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN struct _xmlRegexp *
|
||||
xmlAutomataCompile (xmlAutomataPtr am);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlAutomataIsDeterminist (xmlAutomataPtr am);
|
||||
|
||||
@@ -158,6 +140,7 @@ XMLPUBFUN int
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_AUTOMATA_ENABLED */
|
||||
#endif /* LIBXML_REGEXP_ENABLED */
|
||||
|
||||
#endif /* __XML_AUTOMATA_H__ */
|
||||
|
||||
@@ -16,12 +16,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Backward compatibility
|
||||
*/
|
||||
#define initGenericErrorDefaultFunc(h) \
|
||||
xmlSetGenericErrorFunc(NULL, (h) ? *((xmlGenericErrorFunc *) (h)) : NULL)
|
||||
|
||||
/**
|
||||
* xmlErrorLevel:
|
||||
*
|
||||
@@ -217,11 +211,6 @@ typedef enum {
|
||||
XML_ERR_USER_STOP, /* 111 */
|
||||
XML_ERR_COMMENT_ABRUPTLY_ENDED, /* 112 */
|
||||
XML_WAR_ENCODING_MISMATCH, /* 113 */
|
||||
XML_ERR_RESOURCE_LIMIT, /* 114 */
|
||||
XML_ERR_ARGUMENT, /* 115 */
|
||||
XML_ERR_SYSTEM, /* 116 */
|
||||
XML_ERR_REDECL_PREDEF_ENTITY, /* 117 */
|
||||
XML_ERR_INT_SUBSET_NOT_FINISHED, /* 118 */
|
||||
XML_NS_ERR_XML_NAMESPACE = 200,
|
||||
XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */
|
||||
XML_NS_ERR_QNAME, /* 202 */
|
||||
@@ -484,7 +473,6 @@ typedef enum {
|
||||
XML_IO_EADDRINUSE, /* 1554 */
|
||||
XML_IO_EALREADY, /* 1555 */
|
||||
XML_IO_EAFNOSUPPORT, /* 1556 */
|
||||
XML_IO_UNSUPPORTED_PROTOCOL, /* 1557 */
|
||||
XML_XINCLUDE_RECURSION=1600,
|
||||
XML_XINCLUDE_PARSE_VALUE, /* 1601 */
|
||||
XML_XINCLUDE_ENTITY_DEF_MISMATCH, /* 1602 */
|
||||
@@ -871,20 +859,23 @@ typedef void (*xmlGenericErrorFunc) (void *ctx,
|
||||
typedef void (*xmlStructuredErrorFunc) (void *userData, const xmlError *error);
|
||||
|
||||
/** DOC_DISABLE */
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const xmlError *__xmlLastError(void);
|
||||
#define XML_GLOBALS_ERROR \
|
||||
XML_OP(xmlLastError, xmlError, XML_DEPRECATED) \
|
||||
XML_OP(xmlGenericError, xmlGenericErrorFunc, XML_NO_ATTR) \
|
||||
XML_OP(xmlGenericErrorContext, void *, XML_NO_ATTR) \
|
||||
XML_OP(xmlStructuredError, xmlStructuredErrorFunc, XML_NO_ATTR) \
|
||||
XML_OP(xmlStructuredErrorContext, void *, XML_NO_ATTR)
|
||||
|
||||
XMLPUBFUN xmlGenericErrorFunc *__xmlGenericError(void);
|
||||
XMLPUBFUN void **__xmlGenericErrorContext(void);
|
||||
XMLPUBFUN xmlStructuredErrorFunc *__xmlStructuredError(void);
|
||||
XMLPUBFUN void **__xmlStructuredErrorContext(void);
|
||||
#define XML_OP XML_DECLARE_GLOBAL
|
||||
XML_GLOBALS_ERROR
|
||||
#undef XML_OP
|
||||
|
||||
#ifndef XML_GLOBALS_NO_REDEFINITION
|
||||
#define xmlLastError (*__xmlLastError())
|
||||
#define xmlGenericError (*__xmlGenericError())
|
||||
#define xmlGenericErrorContext (*__xmlGenericErrorContext())
|
||||
#define xmlStructuredError (*__xmlStructuredError())
|
||||
#define xmlStructuredErrorContext (*__xmlStructuredErrorContext())
|
||||
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
||||
#define xmlLastError XML_GLOBAL_MACRO(xmlLastError)
|
||||
#define xmlGenericError XML_GLOBAL_MACRO(xmlGenericError)
|
||||
#define xmlGenericErrorContext XML_GLOBAL_MACRO(xmlGenericErrorContext)
|
||||
#define xmlStructuredError XML_GLOBAL_MACRO(xmlStructuredError)
|
||||
#define xmlStructuredErrorContext XML_GLOBAL_MACRO(xmlStructuredErrorContext)
|
||||
#endif
|
||||
/** DOC_ENABLE */
|
||||
|
||||
@@ -895,15 +886,16 @@ XMLPUBFUN void **__xmlStructuredErrorContext(void);
|
||||
XMLPUBFUN void
|
||||
xmlSetGenericErrorFunc (void *ctx,
|
||||
xmlGenericErrorFunc handler);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlThrDefSetGenericErrorFunc(void *ctx,
|
||||
xmlGenericErrorFunc handler);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler);
|
||||
|
||||
XMLPUBFUN void
|
||||
xmlSetStructuredErrorFunc (void *ctx,
|
||||
xmlStructuredErrorFunc handler);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlThrDefSetStructuredErrorFunc(void *ctx,
|
||||
xmlStructuredErrorFunc handler);
|
||||
@@ -927,17 +919,11 @@ XMLPUBFUN void
|
||||
xmlParserValidityWarning (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
/** DOC_DISABLE */
|
||||
struct _xmlParserInput;
|
||||
/** DOC_ENABLE */
|
||||
XMLPUBFUN void
|
||||
xmlParserPrintFileInfo (struct _xmlParserInput *input);
|
||||
XMLPUBFUN void
|
||||
xmlParserPrintFileContext (struct _xmlParserInput *input);
|
||||
XMLPUBFUN void
|
||||
xmlFormatError (const xmlError *err,
|
||||
xmlGenericErrorFunc channel,
|
||||
void *data);
|
||||
|
||||
/*
|
||||
* Extended error information routines
|
||||
|
||||
@@ -9,11 +9,6 @@
|
||||
#define __XML_EXPORTS_H__
|
||||
|
||||
/** DOC_DISABLE */
|
||||
|
||||
/*
|
||||
* Symbol visibility
|
||||
*/
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
#ifdef LIBXML_STATIC
|
||||
#define XMLPUBLIC
|
||||
@@ -25,71 +20,30 @@
|
||||
#else /* not Windows */
|
||||
#define XMLPUBLIC
|
||||
#endif /* platform switch */
|
||||
/** DOC_ENABLE */
|
||||
|
||||
/*
|
||||
* XMLPUBFUN:
|
||||
*
|
||||
* Macro which declares an exportable function
|
||||
*/
|
||||
#define XMLPUBFUN XMLPUBLIC
|
||||
|
||||
/**
|
||||
* XMLPUBVAR:
|
||||
*
|
||||
* Macro which declares an exportable variable
|
||||
*/
|
||||
#define XMLPUBVAR XMLPUBLIC extern
|
||||
|
||||
/** DOC_DISABLE */
|
||||
/* Compatibility */
|
||||
#define XMLCALL
|
||||
#define XMLCDECL
|
||||
#ifndef LIBXML_DLL_IMPORT
|
||||
#define LIBXML_DLL_IMPORT XMLPUBVAR
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Attributes
|
||||
*/
|
||||
|
||||
#if !defined(__clang__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)
|
||||
#define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
|
||||
#else
|
||||
#define LIBXML_ATTR_ALLOC_SIZE(x)
|
||||
#endif
|
||||
|
||||
#if __GNUC__ * 100 + __GNUC_MINOR__ >= 303
|
||||
#define LIBXML_ATTR_FORMAT(fmt,args) \
|
||||
__attribute__((__format__(__printf__,fmt,args)))
|
||||
#else
|
||||
#define LIBXML_ATTR_FORMAT(fmt,args)
|
||||
#endif
|
||||
|
||||
#ifndef XML_DEPRECATED
|
||||
#if defined(IN_LIBXML)
|
||||
#define XML_DEPRECATED
|
||||
#elif __GNUC__ * 100 + __GNUC_MINOR__ >= 301
|
||||
#define XML_DEPRECATED __attribute__((deprecated))
|
||||
#elif defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
/* Available since Visual Studio 2005 */
|
||||
#define XML_DEPRECATED __declspec(deprecated)
|
||||
#else
|
||||
#define XML_DEPRECATED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef XML_DEPRECATED_MEMBER
|
||||
#if defined(IN_LIBXML)
|
||||
#define XML_DEPRECATED_MEMBER
|
||||
#elif __GNUC__ * 100 + __GNUC_MINOR__ >= 301
|
||||
#define XML_DEPRECATED_MEMBER __attribute__((deprecated))
|
||||
#else
|
||||
#define XML_DEPRECATED_MEMBER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Originally declared in xmlversion.h which is generated
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
XMLPUBFUN void xmlCheckVersion(int version);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#if !defined(LIBXML_DLL_IMPORT)
|
||||
#define LIBXML_DLL_IMPORT XMLPUBVAR
|
||||
#endif
|
||||
/** DOC_ENABLE */
|
||||
|
||||
#endif /* __XML_EXPORTS_H__ */
|
||||
|
||||
|
||||
@@ -69,25 +69,27 @@ typedef char *(*xmlStrdupFunc)(const char *str);
|
||||
* - xmlMemStrdup
|
||||
* - xmlFree
|
||||
*/
|
||||
#ifdef LIBXML_THREAD_ALLOC_ENABLED
|
||||
|
||||
/** DOC_DISABLE */
|
||||
XMLPUBFUN xmlMallocFunc *__xmlMalloc(void);
|
||||
XMLPUBFUN xmlMallocFunc *__xmlMallocAtomic(void);
|
||||
XMLPUBFUN xmlReallocFunc *__xmlRealloc(void);
|
||||
XMLPUBFUN xmlFreeFunc *__xmlFree(void);
|
||||
XMLPUBFUN xmlStrdupFunc *__xmlMemStrdup(void);
|
||||
|
||||
#ifndef XML_GLOBALS_NO_REDEFINITION
|
||||
#define xmlMalloc (*__xmlMalloc())
|
||||
#define xmlMallocAtomic (*__xmlMallocAtomic())
|
||||
#define xmlRealloc (*__xmlRealloc())
|
||||
#define xmlFree (*__xmlFree())
|
||||
#define xmlMemStrdup (*__xmlMemStrdup())
|
||||
#endif
|
||||
/** DOC_ENABLE */
|
||||
|
||||
#ifdef LIBXML_THREAD_ALLOC_ENABLED
|
||||
#define XML_GLOBALS_ALLOC \
|
||||
XML_OP(xmlMalloc, xmlMallocFunc, XML_NO_ATTR) \
|
||||
XML_OP(xmlMallocAtomic, xmlMallocFunc, XML_NO_ATTR) \
|
||||
XML_OP(xmlRealloc, xmlReallocFunc, XML_NO_ATTR) \
|
||||
XML_OP(xmlFree, xmlFreeFunc, XML_NO_ATTR) \
|
||||
XML_OP(xmlMemStrdup, xmlStrdupFunc, XML_NO_ATTR)
|
||||
#define XML_OP XML_DECLARE_GLOBAL
|
||||
XML_GLOBALS_ALLOC
|
||||
#undef XML_OP
|
||||
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
||||
#define xmlMalloc XML_GLOBAL_MACRO(xmlMalloc)
|
||||
#define xmlMallocAtomic XML_GLOBAL_MACRO(xmlMallocAtomic)
|
||||
#define xmlRealloc XML_GLOBAL_MACRO(xmlRealloc)
|
||||
#define xmlFree XML_GLOBAL_MACRO(xmlFree)
|
||||
#define xmlMemStrdup XML_GLOBAL_MACRO(xmlMemStrdup)
|
||||
#endif
|
||||
#else
|
||||
#define XML_GLOBALS_ALLOC
|
||||
/** DOC_ENABLE */
|
||||
XMLPUBVAR xmlMallocFunc xmlMalloc;
|
||||
XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
|
||||
XMLPUBVAR xmlReallocFunc xmlRealloc;
|
||||
@@ -110,14 +112,12 @@ XMLPUBFUN int
|
||||
xmlMallocFunc *mallocFunc,
|
||||
xmlReallocFunc *reallocFunc,
|
||||
xmlStrdupFunc *strdupFunc);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlGcMemSetup (xmlFreeFunc freeFunc,
|
||||
xmlMallocFunc mallocFunc,
|
||||
xmlMallocFunc mallocAtomicFunc,
|
||||
xmlReallocFunc reallocFunc,
|
||||
xmlStrdupFunc strdupFunc);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlGcMemGet (xmlFreeFunc *freeFunc,
|
||||
xmlMallocFunc *mallocFunc,
|
||||
@@ -147,16 +147,12 @@ XMLPUBFUN int
|
||||
xmlMemUsed (void);
|
||||
XMLPUBFUN int
|
||||
xmlMemBlocks (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlMemDisplay (FILE *fp);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlMemDisplayLast(FILE *fp, long nbBytes);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlMemShow (FILE *fp, int nr);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlMemoryDump (void);
|
||||
XMLPUBFUN void *
|
||||
@@ -167,19 +163,60 @@ XMLPUBFUN void
|
||||
xmlMemFree (void *ptr);
|
||||
XMLPUBFUN char *
|
||||
xmlMemoryStrdup (const char *str);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void *
|
||||
xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void *
|
||||
xmlReallocLoc (void *ptr, size_t size, const char *file, int line);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void *
|
||||
xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN char *
|
||||
xmlMemStrdupLoc (const char *str, const char *file, int line);
|
||||
|
||||
|
||||
/** DOC_DISABLE */
|
||||
#ifdef DEBUG_MEMORY_LOCATION
|
||||
/**
|
||||
* xmlMalloc:
|
||||
* @size: number of bytes to allocate
|
||||
*
|
||||
* Wrapper for the malloc() function used in the XML library.
|
||||
*
|
||||
* Returns the pointer to the allocated area or NULL in case of error.
|
||||
*/
|
||||
#define xmlMalloc(size) xmlMallocLoc((size), __FILE__, __LINE__)
|
||||
/**
|
||||
* xmlMallocAtomic:
|
||||
* @size: number of bytes to allocate
|
||||
*
|
||||
* Wrapper for the malloc() function used in the XML library for allocation
|
||||
* of block not containing pointers to other areas.
|
||||
*
|
||||
* Returns the pointer to the allocated area or NULL in case of error.
|
||||
*/
|
||||
#define xmlMallocAtomic(size) xmlMallocAtomicLoc((size), __FILE__, __LINE__)
|
||||
/**
|
||||
* xmlRealloc:
|
||||
* @ptr: pointer to the existing allocated area
|
||||
* @size: number of bytes to allocate
|
||||
*
|
||||
* Wrapper for the realloc() function used in the XML library.
|
||||
*
|
||||
* Returns the pointer to the allocated area or NULL in case of error.
|
||||
*/
|
||||
#define xmlRealloc(ptr, size) xmlReallocLoc((ptr), (size), __FILE__, __LINE__)
|
||||
/**
|
||||
* xmlMemStrdup:
|
||||
* @str: pointer to the existing string
|
||||
*
|
||||
* Wrapper for the strdup() function, xmlStrdup() is usually preferred.
|
||||
*
|
||||
* Returns the pointer to the allocated area or NULL in case of error.
|
||||
*/
|
||||
#define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__)
|
||||
|
||||
#endif /* DEBUG_MEMORY_LOCATION */
|
||||
/** DOC_ENABLE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@@ -37,19 +37,15 @@ typedef enum {
|
||||
XML_MODULE_LOCAL= 2 /* local binding */
|
||||
} xmlModuleOption;
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlModulePtr xmlModuleOpen (const char *filename,
|
||||
int options);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int xmlModuleSymbol (xmlModulePtr module,
|
||||
const char* name,
|
||||
void **result);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int xmlModuleClose (xmlModulePtr module);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int xmlModuleFree (xmlModulePtr module);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -14,12 +14,11 @@
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/xmlIO.h>
|
||||
#ifdef LIBXML_RELAXNG_ENABLED
|
||||
#include <libxml/relaxng.h>
|
||||
#endif
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
#include <libxml/relaxng.h>
|
||||
#include <libxml/xmlschemas.h>
|
||||
#endif
|
||||
/* for compatibility */
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -128,8 +127,6 @@ XMLPUBFUN int
|
||||
XMLPUBFUN void
|
||||
xmlTextReaderSetMaxAmplification(xmlTextReaderPtr reader,
|
||||
unsigned maxAmpl);
|
||||
XMLPUBFUN const xmlError *
|
||||
xmlTextReaderGetLastError(xmlTextReaderPtr reader);
|
||||
|
||||
/*
|
||||
* Iterators
|
||||
@@ -289,7 +286,7 @@ XMLPUBFUN int
|
||||
xmlTextReaderNextSibling (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderIsValid (xmlTextReaderPtr reader);
|
||||
#ifdef LIBXML_RELAXNG_ENABLED
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
|
||||
const char *rng);
|
||||
@@ -301,8 +298,6 @@ XMLPUBFUN int
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
|
||||
xmlRelaxNGPtr schema);
|
||||
#endif
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
|
||||
const char *xsd);
|
||||
@@ -429,11 +424,6 @@ XMLPUBFUN void
|
||||
xmlTextReaderErrorFunc *f,
|
||||
void **arg);
|
||||
|
||||
XMLPUBFUN void
|
||||
xmlTextReaderSetResourceLoader(xmlTextReaderPtr reader,
|
||||
xmlResourceLoader loader,
|
||||
void *data);
|
||||
|
||||
#endif /* LIBXML_READER_ENABLED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -47,7 +47,6 @@ XMLPUBFUN void xmlRegFreeRegexp(xmlRegexpPtr regexp);
|
||||
XMLPUBFUN int
|
||||
xmlRegexpExec (xmlRegexpPtr comp,
|
||||
const xmlChar *value);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlRegexpPrint (FILE *output,
|
||||
xmlRegexpPtr regexp);
|
||||
@@ -71,34 +70,28 @@ typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
|
||||
/*
|
||||
* The progressive API
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlRegExecCtxtPtr
|
||||
xmlRegNewExecCtxt (xmlRegexpPtr comp,
|
||||
xmlRegExecCallbacks callback,
|
||||
void *data);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlRegExecPushString(xmlRegExecCtxtPtr exec,
|
||||
const xmlChar *value,
|
||||
void *data);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
|
||||
const xmlChar *value,
|
||||
const xmlChar *value2,
|
||||
void *data);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
|
||||
int *nbval,
|
||||
int *nbneg,
|
||||
xmlChar **values,
|
||||
int *terminal);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
|
||||
const xmlChar **string,
|
||||
@@ -106,7 +99,113 @@ XMLPUBFUN int
|
||||
int *nbneg,
|
||||
xmlChar **values,
|
||||
int *terminal);
|
||||
#ifdef LIBXML_EXPR_ENABLED
|
||||
/*
|
||||
* Formal regular expression handling
|
||||
* Its goal is to do some formal work on content models
|
||||
*/
|
||||
|
||||
/* expressions are used within a context */
|
||||
typedef struct _xmlExpCtxt xmlExpCtxt;
|
||||
typedef xmlExpCtxt *xmlExpCtxtPtr;
|
||||
|
||||
XMLPUBFUN void
|
||||
xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlExpCtxtPtr
|
||||
xmlExpNewCtxt (int maxNodes,
|
||||
xmlDictPtr dict);
|
||||
|
||||
XMLPUBFUN int
|
||||
xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
|
||||
XMLPUBFUN int
|
||||
xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt);
|
||||
|
||||
/* Expressions are trees but the tree is opaque */
|
||||
typedef struct _xmlExpNode xmlExpNode;
|
||||
typedef xmlExpNode *xmlExpNodePtr;
|
||||
|
||||
typedef enum {
|
||||
XML_EXP_EMPTY = 0,
|
||||
XML_EXP_FORBID = 1,
|
||||
XML_EXP_ATOM = 2,
|
||||
XML_EXP_SEQ = 3,
|
||||
XML_EXP_OR = 4,
|
||||
XML_EXP_COUNT = 5
|
||||
} xmlExpNodeType;
|
||||
|
||||
/*
|
||||
* 2 core expressions shared by all for the empty language set
|
||||
* and for the set with just the empty token
|
||||
*/
|
||||
XMLPUBVAR xmlExpNodePtr forbiddenExp;
|
||||
XMLPUBVAR xmlExpNodePtr emptyExp;
|
||||
|
||||
/*
|
||||
* Expressions are reference counted internally
|
||||
*/
|
||||
XMLPUBFUN void
|
||||
xmlExpFree (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr);
|
||||
XMLPUBFUN void
|
||||
xmlExpRef (xmlExpNodePtr expr);
|
||||
|
||||
/*
|
||||
* constructors can be either manual or from a string
|
||||
*/
|
||||
XMLPUBFUN xmlExpNodePtr
|
||||
xmlExpParse (xmlExpCtxtPtr ctxt,
|
||||
const char *expr);
|
||||
XMLPUBFUN xmlExpNodePtr
|
||||
xmlExpNewAtom (xmlExpCtxtPtr ctxt,
|
||||
const xmlChar *name,
|
||||
int len);
|
||||
XMLPUBFUN xmlExpNodePtr
|
||||
xmlExpNewOr (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr left,
|
||||
xmlExpNodePtr right);
|
||||
XMLPUBFUN xmlExpNodePtr
|
||||
xmlExpNewSeq (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr left,
|
||||
xmlExpNodePtr right);
|
||||
XMLPUBFUN xmlExpNodePtr
|
||||
xmlExpNewRange (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr subset,
|
||||
int min,
|
||||
int max);
|
||||
/*
|
||||
* The really interesting APIs
|
||||
*/
|
||||
XMLPUBFUN int
|
||||
xmlExpIsNillable(xmlExpNodePtr expr);
|
||||
XMLPUBFUN int
|
||||
xmlExpMaxToken (xmlExpNodePtr expr);
|
||||
XMLPUBFUN int
|
||||
xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr,
|
||||
const xmlChar**langList,
|
||||
int len);
|
||||
XMLPUBFUN int
|
||||
xmlExpGetStart (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr,
|
||||
const xmlChar**tokList,
|
||||
int len);
|
||||
XMLPUBFUN xmlExpNodePtr
|
||||
xmlExpStringDerive(xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr,
|
||||
const xmlChar *str,
|
||||
int len);
|
||||
XMLPUBFUN xmlExpNodePtr
|
||||
xmlExpExpDerive (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr,
|
||||
xmlExpNodePtr sub);
|
||||
XMLPUBFUN int
|
||||
xmlExpSubsume (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr,
|
||||
xmlExpNodePtr sub);
|
||||
XMLPUBFUN void
|
||||
xmlExpDump (xmlBufferPtr buf,
|
||||
xmlExpNodePtr expr);
|
||||
#endif /* LIBXML_EXPR_ENABLED */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -34,11 +34,7 @@ typedef enum {
|
||||
XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */
|
||||
XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */
|
||||
XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */
|
||||
XML_SAVE_WSNONSIG = 1<<7, /* format with non-significant whitespace */
|
||||
/* Available since 2.14.0 */
|
||||
XML_SAVE_EMPTY = 1<<8, /* force empty tags, overriding global */
|
||||
XML_SAVE_NO_INDENT = 1<<9, /* disable indenting */
|
||||
XML_SAVE_INDENT = 1<<10 /* force indenting, overriding global */
|
||||
XML_SAVE_WSNONSIG = 1<<7 /* format with non-significant whitespace */
|
||||
} xmlSaveOption;
|
||||
|
||||
|
||||
@@ -77,27 +73,17 @@ XMLPUBFUN int
|
||||
xmlSaveFlush (xmlSaveCtxtPtr ctxt);
|
||||
XMLPUBFUN int
|
||||
xmlSaveClose (xmlSaveCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlParserErrors
|
||||
xmlSaveFinish (xmlSaveCtxtPtr ctxt);
|
||||
XMLPUBFUN int
|
||||
xmlSaveSetIndentString (xmlSaveCtxtPtr ctxt,
|
||||
const char *indent);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
|
||||
xmlCharEncodingOutputFunc escape);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
|
||||
xmlCharEncodingOutputFunc escape);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlThrDefIndentTreeOutput(int v);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const char *
|
||||
xmlThrDefTreeIndentString(const char * v);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlThrDefSaveNoEmptyTags(int v);
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <libxml/encoding.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
|
||||
@@ -157,26 +156,22 @@ XMLPUBFUN void
|
||||
xmlStructuredErrorFunc serror,
|
||||
void *ctx);
|
||||
XMLPUBFUN int
|
||||
xmlSchemaGetParserErrors (xmlSchemaParserCtxtPtr ctxt,
|
||||
xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
|
||||
xmlSchemaValidityErrorFunc * err,
|
||||
xmlSchemaValidityWarningFunc * warn,
|
||||
void **ctx);
|
||||
XMLPUBFUN void
|
||||
xmlSchemaSetResourceLoader (xmlSchemaParserCtxtPtr ctxt,
|
||||
xmlResourceLoader loader,
|
||||
void *data);
|
||||
XMLPUBFUN int
|
||||
xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
|
||||
xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
|
||||
|
||||
XMLPUBFUN xmlSchemaPtr
|
||||
xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void
|
||||
xmlSchemaFree (xmlSchemaPtr schema);
|
||||
#ifdef LIBXML_DEBUG_ENABLED
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void
|
||||
xmlSchemaDump (FILE *output,
|
||||
xmlSchemaPtr schema);
|
||||
#endif /* LIBXML_DEBUG_ENABLED */
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
/*
|
||||
* Interfaces for validating
|
||||
*/
|
||||
@@ -217,7 +212,7 @@ XMLPUBFUN int
|
||||
xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
|
||||
xmlParserInputBufferPtr input,
|
||||
xmlCharEncoding enc,
|
||||
const xmlSAXHandler *sax,
|
||||
xmlSAXHandlerPtr sax,
|
||||
void *user_data);
|
||||
XMLPUBFUN int
|
||||
xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,
|
||||
|
||||
@@ -2,14 +2,201 @@
|
||||
* Summary: Unicode character APIs
|
||||
* Description: API for the Unicode character APIs
|
||||
*
|
||||
* Deprecated, don't use.
|
||||
* This file is automatically generated from the
|
||||
* UCS description files of the Unicode Character Database
|
||||
* http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html
|
||||
* using the genUnicode.py Python script.
|
||||
*
|
||||
* Generation date: Mon Mar 27 11:09:52 2006
|
||||
* Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_UNICODE_H__
|
||||
#define __XML_UNICODE_H__
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning "libxml/xmlunicode.h is deprecated"
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_UNICODE_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
XMLPUBFUN int xmlUCSIsAegeanNumbers (int code);
|
||||
XMLPUBFUN int xmlUCSIsAlphabeticPresentationForms (int code);
|
||||
XMLPUBFUN int xmlUCSIsArabic (int code);
|
||||
XMLPUBFUN int xmlUCSIsArabicPresentationFormsA (int code);
|
||||
XMLPUBFUN int xmlUCSIsArabicPresentationFormsB (int code);
|
||||
XMLPUBFUN int xmlUCSIsArmenian (int code);
|
||||
XMLPUBFUN int xmlUCSIsArrows (int code);
|
||||
XMLPUBFUN int xmlUCSIsBasicLatin (int code);
|
||||
XMLPUBFUN int xmlUCSIsBengali (int code);
|
||||
XMLPUBFUN int xmlUCSIsBlockElements (int code);
|
||||
XMLPUBFUN int xmlUCSIsBopomofo (int code);
|
||||
XMLPUBFUN int xmlUCSIsBopomofoExtended (int code);
|
||||
XMLPUBFUN int xmlUCSIsBoxDrawing (int code);
|
||||
XMLPUBFUN int xmlUCSIsBraillePatterns (int code);
|
||||
XMLPUBFUN int xmlUCSIsBuhid (int code);
|
||||
XMLPUBFUN int xmlUCSIsByzantineMusicalSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKCompatibility (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKCompatibilityForms (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKCompatibilityIdeographs (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKCompatibilityIdeographsSupplement (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKRadicalsSupplement (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKSymbolsandPunctuation (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographs (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographsExtensionA (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographsExtensionB (int code);
|
||||
XMLPUBFUN int xmlUCSIsCherokee (int code);
|
||||
XMLPUBFUN int xmlUCSIsCombiningDiacriticalMarks (int code);
|
||||
XMLPUBFUN int xmlUCSIsCombiningDiacriticalMarksforSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsCombiningHalfMarks (int code);
|
||||
XMLPUBFUN int xmlUCSIsCombiningMarksforSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsControlPictures (int code);
|
||||
XMLPUBFUN int xmlUCSIsCurrencySymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsCypriotSyllabary (int code);
|
||||
XMLPUBFUN int xmlUCSIsCyrillic (int code);
|
||||
XMLPUBFUN int xmlUCSIsCyrillicSupplement (int code);
|
||||
XMLPUBFUN int xmlUCSIsDeseret (int code);
|
||||
XMLPUBFUN int xmlUCSIsDevanagari (int code);
|
||||
XMLPUBFUN int xmlUCSIsDingbats (int code);
|
||||
XMLPUBFUN int xmlUCSIsEnclosedAlphanumerics (int code);
|
||||
XMLPUBFUN int xmlUCSIsEnclosedCJKLettersandMonths (int code);
|
||||
XMLPUBFUN int xmlUCSIsEthiopic (int code);
|
||||
XMLPUBFUN int xmlUCSIsGeneralPunctuation (int code);
|
||||
XMLPUBFUN int xmlUCSIsGeometricShapes (int code);
|
||||
XMLPUBFUN int xmlUCSIsGeorgian (int code);
|
||||
XMLPUBFUN int xmlUCSIsGothic (int code);
|
||||
XMLPUBFUN int xmlUCSIsGreek (int code);
|
||||
XMLPUBFUN int xmlUCSIsGreekExtended (int code);
|
||||
XMLPUBFUN int xmlUCSIsGreekandCoptic (int code);
|
||||
XMLPUBFUN int xmlUCSIsGujarati (int code);
|
||||
XMLPUBFUN int xmlUCSIsGurmukhi (int code);
|
||||
XMLPUBFUN int xmlUCSIsHalfwidthandFullwidthForms (int code);
|
||||
XMLPUBFUN int xmlUCSIsHangulCompatibilityJamo (int code);
|
||||
XMLPUBFUN int xmlUCSIsHangulJamo (int code);
|
||||
XMLPUBFUN int xmlUCSIsHangulSyllables (int code);
|
||||
XMLPUBFUN int xmlUCSIsHanunoo (int code);
|
||||
XMLPUBFUN int xmlUCSIsHebrew (int code);
|
||||
XMLPUBFUN int xmlUCSIsHighPrivateUseSurrogates (int code);
|
||||
XMLPUBFUN int xmlUCSIsHighSurrogates (int code);
|
||||
XMLPUBFUN int xmlUCSIsHiragana (int code);
|
||||
XMLPUBFUN int xmlUCSIsIPAExtensions (int code);
|
||||
XMLPUBFUN int xmlUCSIsIdeographicDescriptionCharacters (int code);
|
||||
XMLPUBFUN int xmlUCSIsKanbun (int code);
|
||||
XMLPUBFUN int xmlUCSIsKangxiRadicals (int code);
|
||||
XMLPUBFUN int xmlUCSIsKannada (int code);
|
||||
XMLPUBFUN int xmlUCSIsKatakana (int code);
|
||||
XMLPUBFUN int xmlUCSIsKatakanaPhoneticExtensions (int code);
|
||||
XMLPUBFUN int xmlUCSIsKhmer (int code);
|
||||
XMLPUBFUN int xmlUCSIsKhmerSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsLao (int code);
|
||||
XMLPUBFUN int xmlUCSIsLatin1Supplement (int code);
|
||||
XMLPUBFUN int xmlUCSIsLatinExtendedA (int code);
|
||||
XMLPUBFUN int xmlUCSIsLatinExtendedB (int code);
|
||||
XMLPUBFUN int xmlUCSIsLatinExtendedAdditional (int code);
|
||||
XMLPUBFUN int xmlUCSIsLetterlikeSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsLimbu (int code);
|
||||
XMLPUBFUN int xmlUCSIsLinearBIdeograms (int code);
|
||||
XMLPUBFUN int xmlUCSIsLinearBSyllabary (int code);
|
||||
XMLPUBFUN int xmlUCSIsLowSurrogates (int code);
|
||||
XMLPUBFUN int xmlUCSIsMalayalam (int code);
|
||||
XMLPUBFUN int xmlUCSIsMathematicalAlphanumericSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsMathematicalOperators (int code);
|
||||
XMLPUBFUN int xmlUCSIsMiscellaneousMathematicalSymbolsA (int code);
|
||||
XMLPUBFUN int xmlUCSIsMiscellaneousMathematicalSymbolsB (int code);
|
||||
XMLPUBFUN int xmlUCSIsMiscellaneousSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsMiscellaneousSymbolsandArrows (int code);
|
||||
XMLPUBFUN int xmlUCSIsMiscellaneousTechnical (int code);
|
||||
XMLPUBFUN int xmlUCSIsMongolian (int code);
|
||||
XMLPUBFUN int xmlUCSIsMusicalSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsMyanmar (int code);
|
||||
XMLPUBFUN int xmlUCSIsNumberForms (int code);
|
||||
XMLPUBFUN int xmlUCSIsOgham (int code);
|
||||
XMLPUBFUN int xmlUCSIsOldItalic (int code);
|
||||
XMLPUBFUN int xmlUCSIsOpticalCharacterRecognition (int code);
|
||||
XMLPUBFUN int xmlUCSIsOriya (int code);
|
||||
XMLPUBFUN int xmlUCSIsOsmanya (int code);
|
||||
XMLPUBFUN int xmlUCSIsPhoneticExtensions (int code);
|
||||
XMLPUBFUN int xmlUCSIsPrivateUse (int code);
|
||||
XMLPUBFUN int xmlUCSIsPrivateUseArea (int code);
|
||||
XMLPUBFUN int xmlUCSIsRunic (int code);
|
||||
XMLPUBFUN int xmlUCSIsShavian (int code);
|
||||
XMLPUBFUN int xmlUCSIsSinhala (int code);
|
||||
XMLPUBFUN int xmlUCSIsSmallFormVariants (int code);
|
||||
XMLPUBFUN int xmlUCSIsSpacingModifierLetters (int code);
|
||||
XMLPUBFUN int xmlUCSIsSpecials (int code);
|
||||
XMLPUBFUN int xmlUCSIsSuperscriptsandSubscripts (int code);
|
||||
XMLPUBFUN int xmlUCSIsSupplementalArrowsA (int code);
|
||||
XMLPUBFUN int xmlUCSIsSupplementalArrowsB (int code);
|
||||
XMLPUBFUN int xmlUCSIsSupplementalMathematicalOperators (int code);
|
||||
XMLPUBFUN int xmlUCSIsSupplementaryPrivateUseAreaA (int code);
|
||||
XMLPUBFUN int xmlUCSIsSupplementaryPrivateUseAreaB (int code);
|
||||
XMLPUBFUN int xmlUCSIsSyriac (int code);
|
||||
XMLPUBFUN int xmlUCSIsTagalog (int code);
|
||||
XMLPUBFUN int xmlUCSIsTagbanwa (int code);
|
||||
XMLPUBFUN int xmlUCSIsTags (int code);
|
||||
XMLPUBFUN int xmlUCSIsTaiLe (int code);
|
||||
XMLPUBFUN int xmlUCSIsTaiXuanJingSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsTamil (int code);
|
||||
XMLPUBFUN int xmlUCSIsTelugu (int code);
|
||||
XMLPUBFUN int xmlUCSIsThaana (int code);
|
||||
XMLPUBFUN int xmlUCSIsThai (int code);
|
||||
XMLPUBFUN int xmlUCSIsTibetan (int code);
|
||||
XMLPUBFUN int xmlUCSIsUgaritic (int code);
|
||||
XMLPUBFUN int xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code);
|
||||
XMLPUBFUN int xmlUCSIsVariationSelectors (int code);
|
||||
XMLPUBFUN int xmlUCSIsVariationSelectorsSupplement (int code);
|
||||
XMLPUBFUN int xmlUCSIsYiRadicals (int code);
|
||||
XMLPUBFUN int xmlUCSIsYiSyllables (int code);
|
||||
XMLPUBFUN int xmlUCSIsYijingHexagramSymbols (int code);
|
||||
|
||||
XMLPUBFUN int xmlUCSIsBlock (int code, const char *block);
|
||||
|
||||
XMLPUBFUN int xmlUCSIsCatC (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatCc (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatCf (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatCo (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatCs (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatL (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatLl (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatLm (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatLo (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatLt (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatLu (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatM (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatMc (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatMe (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatMn (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatN (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatNd (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatNl (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatNo (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatP (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatPc (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatPd (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatPe (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatPf (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatPi (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatPo (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatPs (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatS (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatSc (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatSk (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatSm (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatSo (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatZ (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatZl (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatZp (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatZs (int code);
|
||||
|
||||
XMLPUBFUN int xmlUCSIsCat (int code, const char *cat);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_UNICODE_ENABLED */
|
||||
|
||||
#endif /* __XML_UNICODE_H__ */
|
||||
|
||||
@@ -10,26 +10,40 @@
|
||||
#ifndef __XML_VERSION_H__
|
||||
#define __XML_VERSION_H__
|
||||
|
||||
#include <libxml/xmlexports.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* use those to be sure nothing nasty will happen if
|
||||
* your library and includes mismatch
|
||||
*/
|
||||
#ifndef LIBXML2_COMPILING_MSCCDEF
|
||||
XMLPUBFUN void xmlCheckVersion(int version);
|
||||
#endif /* LIBXML2_COMPILING_MSCCDEF */
|
||||
|
||||
/**
|
||||
* LIBXML_DOTTED_VERSION:
|
||||
*
|
||||
* the version string like "1.2.3"
|
||||
*/
|
||||
#define LIBXML_DOTTED_VERSION "2.14.6"
|
||||
#define LIBXML_DOTTED_VERSION "2.12.9"
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION:
|
||||
*
|
||||
* the version number: 1.2.3 value is 10203
|
||||
*/
|
||||
#define LIBXML_VERSION 21406
|
||||
#define LIBXML_VERSION 21209
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION_STRING:
|
||||
*
|
||||
* the version number string, 1.2.3 value is "10203"
|
||||
*/
|
||||
#define LIBXML_VERSION_STRING "21406"
|
||||
#define LIBXML_VERSION_STRING "21209"
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION_EXTRA:
|
||||
@@ -44,7 +58,32 @@
|
||||
* Macro to check that the libxml version in use is compatible with
|
||||
* the version the software has been compiled against
|
||||
*/
|
||||
#define LIBXML_TEST_VERSION xmlCheckVersion(21406);
|
||||
#define LIBXML_TEST_VERSION xmlCheckVersion(21209);
|
||||
|
||||
#ifndef VMS
|
||||
#if 0
|
||||
/**
|
||||
* WITH_TRIO:
|
||||
*
|
||||
* defined if the trio support need to be configured in
|
||||
*/
|
||||
#define WITH_TRIO
|
||||
#else
|
||||
/**
|
||||
* WITHOUT_TRIO:
|
||||
*
|
||||
* defined if the trio support should not be configured in
|
||||
*/
|
||||
#define WITHOUT_TRIO
|
||||
#endif
|
||||
#else /* VMS */
|
||||
/**
|
||||
* WITH_TRIO:
|
||||
*
|
||||
* defined if the trio support need to be configured in
|
||||
*/
|
||||
#define WITH_TRIO 1
|
||||
#endif /* VMS */
|
||||
|
||||
/**
|
||||
* LIBXML_THREAD_ENABLED:
|
||||
@@ -67,9 +106,11 @@
|
||||
/**
|
||||
* LIBXML_TREE_ENABLED:
|
||||
*
|
||||
* Always enabled since 2.14.0
|
||||
* Whether the DOM like tree manipulation API support is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_TREE_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_OUTPUT_ENABLED:
|
||||
@@ -125,12 +166,21 @@
|
||||
#define LIBXML_SAX1_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_FTP_ENABLED:
|
||||
*
|
||||
* Whether the FTP support is configured in
|
||||
*/
|
||||
#if 0
|
||||
#define LIBXML_FTP_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_HTTP_ENABLED:
|
||||
*
|
||||
* Whether the HTTP support is configured in
|
||||
*/
|
||||
#if 0
|
||||
#if 1
|
||||
#define LIBXML_HTTP_ENABLED
|
||||
#endif
|
||||
|
||||
@@ -155,9 +205,11 @@
|
||||
/**
|
||||
* LIBXML_LEGACY_ENABLED:
|
||||
*
|
||||
* Removed in 2.14
|
||||
* Whether the deprecated APIs are compiled in for compatibility
|
||||
*/
|
||||
#undef LIBXML_LEGACY_ENABLED
|
||||
#if 0
|
||||
#define LIBXML_LEGACY_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_C14N_ENABLED:
|
||||
@@ -195,6 +247,15 @@
|
||||
#define LIBXML_XPTR_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_XPTR_LOCS_ENABLED:
|
||||
*
|
||||
* Whether support for XPointer locations is configured in
|
||||
*/
|
||||
#if 0
|
||||
#define LIBXML_XPTR_LOCS_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_XINCLUDE_ENABLED:
|
||||
*
|
||||
@@ -240,12 +301,32 @@
|
||||
#define LIBXML_DEBUG_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* DEBUG_MEMORY_LOCATION:
|
||||
*
|
||||
* Whether the memory debugging is configured in
|
||||
*/
|
||||
#if 0
|
||||
#define DEBUG_MEMORY_LOCATION
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_DEBUG_RUNTIME:
|
||||
*
|
||||
* Removed
|
||||
*/
|
||||
#if 0
|
||||
#define LIBXML_DEBUG_RUNTIME
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_UNICODE_ENABLED:
|
||||
*
|
||||
* Removed in 2.14
|
||||
* Whether the Unicode related interfaces are compiled in
|
||||
*/
|
||||
#undef LIBXML_UNICODE_ENABLED
|
||||
#if 1
|
||||
#define LIBXML_UNICODE_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_REGEXP_ENABLED:
|
||||
@@ -266,12 +347,14 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_RELAXNG_ENABLED:
|
||||
* LIBXML_EXPR_ENABLED:
|
||||
*
|
||||
* Whether the RelaxNG validation interfaces are compiled in
|
||||
* Whether the formal expressions interfaces are compiled in
|
||||
*
|
||||
* This code is unused and disabled unconditionally for now.
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_RELAXNG_ENABLED
|
||||
#if 0
|
||||
#define LIBXML_EXPR_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -325,8 +408,104 @@
|
||||
#define LIBXML_LZMA_ENABLED
|
||||
#endif
|
||||
|
||||
#include <libxml/xmlexports.h>
|
||||
#ifdef __GNUC__
|
||||
/** DOC_DISABLE */
|
||||
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
|
||||
# define ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
# else
|
||||
# define ATTRIBUTE_UNUSED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LIBXML_ATTR_ALLOC_SIZE
|
||||
# if (!defined(__clang__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))))
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
|
||||
# else
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x)
|
||||
# endif
|
||||
#else
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x)
|
||||
#endif
|
||||
|
||||
#ifndef LIBXML_ATTR_FORMAT
|
||||
# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
|
||||
# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
|
||||
# else
|
||||
# define LIBXML_ATTR_FORMAT(fmt,args)
|
||||
# endif
|
||||
#else
|
||||
# define LIBXML_ATTR_FORMAT(fmt,args)
|
||||
#endif
|
||||
|
||||
#ifndef XML_DEPRECATED
|
||||
# if defined (IN_LIBXML) || (__GNUC__ * 100 + __GNUC_MINOR__ < 301)
|
||||
# define XML_DEPRECATED
|
||||
/* Available since at least GCC 3.1 */
|
||||
# else
|
||||
# define XML_DEPRECATED __attribute__((deprecated))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
|
||||
#if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 800)
|
||||
#define XML_IGNORE_FPTR_CAST_WARNINGS \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
|
||||
#else
|
||||
#define XML_IGNORE_FPTR_CAST_WARNINGS \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wpedantic\"")
|
||||
#endif
|
||||
#define XML_POP_WARNINGS \
|
||||
_Pragma("GCC diagnostic pop")
|
||||
#else
|
||||
#define XML_IGNORE_FPTR_CAST_WARNINGS
|
||||
#define XML_POP_WARNINGS
|
||||
#endif
|
||||
|
||||
#else /* ! __GNUC__ */
|
||||
#define ATTRIBUTE_UNUSED
|
||||
#define LIBXML_ATTR_ALLOC_SIZE(x)
|
||||
#define LIBXML_ATTR_FORMAT(fmt,args)
|
||||
#ifndef XML_DEPRECATED
|
||||
# if defined (IN_LIBXML) || !defined (_MSC_VER)
|
||||
# define XML_DEPRECATED
|
||||
/* Available since Visual Studio 2005 */
|
||||
# elif defined (_MSC_VER) && (_MSC_VER >= 1400)
|
||||
# define XML_DEPRECATED __declspec(deprecated)
|
||||
# endif
|
||||
#endif
|
||||
#if defined (_MSC_VER) && (_MSC_VER >= 1400)
|
||||
# define XML_IGNORE_FPTR_CAST_WARNINGS __pragma(warning(push))
|
||||
#else
|
||||
# define XML_IGNORE_FPTR_CAST_WARNINGS
|
||||
#endif
|
||||
#ifndef XML_POP_WARNINGS
|
||||
# if defined (_MSC_VER) && (_MSC_VER >= 1400)
|
||||
# define XML_POP_WARNINGS __pragma(warning(pop))
|
||||
# else
|
||||
# define XML_POP_WARNINGS
|
||||
# endif
|
||||
#endif
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#define XML_NO_ATTR
|
||||
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define XML_DECLARE_GLOBAL(name, type, attrs) \
|
||||
attrs XMLPUBFUN type *__##name(void);
|
||||
#define XML_GLOBAL_MACRO(name) (*__##name())
|
||||
#else
|
||||
#define XML_DECLARE_GLOBAL(name, type, attrs) \
|
||||
attrs XMLPUBVAR type name;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -478,7 +478,6 @@ extern "C" {
|
||||
* misc
|
||||
*/
|
||||
XMLPUBFUN int xmlTextWriterFlush(xmlTextWriterPtr writer);
|
||||
XMLPUBFUN int xmlTextWriterClose(xmlTextWriterPtr writer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -26,10 +26,15 @@
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/hash.h>
|
||||
#endif /* LIBXML_XPATH_ENABLED */
|
||||
|
||||
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */
|
||||
|
||||
#ifdef LIBXML_XPATH_ENABLED
|
||||
|
||||
typedef struct _xmlXPathContext xmlXPathContext;
|
||||
typedef xmlXPathContext *xmlXPathContextPtr;
|
||||
@@ -99,15 +104,22 @@ typedef enum {
|
||||
XPATH_BOOLEAN = 2,
|
||||
XPATH_NUMBER = 3,
|
||||
XPATH_STRING = 4,
|
||||
#ifdef LIBXML_XPTR_LOCS_ENABLED
|
||||
XPATH_POINT = 5,
|
||||
XPATH_RANGE = 6,
|
||||
XPATH_LOCATIONSET = 7,
|
||||
#endif
|
||||
XPATH_USERS = 8,
|
||||
XPATH_XSLT_TREE = 9 /* An XSLT value tree, non modifiable */
|
||||
} xmlXPathObjectType;
|
||||
|
||||
#ifndef LIBXML_XPTR_LOCS_ENABLED
|
||||
/** DOC_DISABLE */
|
||||
#define XPATH_POINT 5
|
||||
#define XPATH_RANGE 6
|
||||
#define XPATH_LOCATIONSET 7
|
||||
/** DOC_ENABLE */
|
||||
#endif
|
||||
|
||||
typedef struct _xmlXPathObject xmlXPathObject;
|
||||
typedef xmlXPathObject *xmlXPathObjectPtr;
|
||||
@@ -401,11 +413,8 @@ struct _xmlXPathParserContext {
|
||||
* Objects and Nodesets handling
|
||||
*/
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBVAR double xmlXPathNAN;
|
||||
XML_DEPRECATED
|
||||
XMLPUBVAR double xmlXPathPINF;
|
||||
XML_DEPRECATED
|
||||
XMLPUBVAR double xmlXPathNINF;
|
||||
|
||||
/* These macros may later turn into functions */
|
||||
@@ -506,10 +515,6 @@ XMLPUBFUN xmlXPathContextPtr
|
||||
xmlXPathNewContext (xmlDocPtr doc);
|
||||
XMLPUBFUN void
|
||||
xmlXPathFreeContext (xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN void
|
||||
xmlXPathSetErrorHandler(xmlXPathContextPtr ctxt,
|
||||
xmlStructuredErrorFunc handler,
|
||||
void *context);
|
||||
XMLPUBFUN int
|
||||
xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
|
||||
int active,
|
||||
@@ -552,7 +557,8 @@ XMLPUBFUN int
|
||||
xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN void
|
||||
xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp);
|
||||
|
||||
#endif /* LIBXML_XPATH_ENABLED */
|
||||
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlXPathInit (void);
|
||||
@@ -565,5 +571,5 @@ XMLPUBFUN int
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_XPATH_ENABLED */
|
||||
#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED*/
|
||||
#endif /* ! __XML_XPATH_H__ */
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Backward compatibility
|
||||
*/
|
||||
#define valuePush xmlXPathValuePush
|
||||
#define valuePop xmlXPathValuePop
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Helpers *
|
||||
@@ -484,10 +478,11 @@ XMLPUBFUN xmlXPathParserContextPtr
|
||||
XMLPUBFUN void
|
||||
xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt);
|
||||
|
||||
/* TODO: remap to xmlXPathValuePop and Push. */
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathValuePop (xmlXPathParserContextPtr ctxt);
|
||||
valuePop (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN int
|
||||
xmlXPathValuePush (xmlXPathParserContextPtr ctxt,
|
||||
valuePush (xmlXPathParserContextPtr ctxt,
|
||||
xmlXPathObjectPtr value);
|
||||
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
@@ -521,7 +516,6 @@ XMLPUBFUN void
|
||||
|
||||
XMLPUBFUN void
|
||||
xmlXPathRoot (xmlXPathParserContextPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN xmlChar *
|
||||
|
||||
@@ -28,10 +28,88 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_XPTR_LOCS_ENABLED)
|
||||
/*
|
||||
* A Location Set
|
||||
*/
|
||||
typedef struct _xmlLocationSet xmlLocationSet;
|
||||
typedef xmlLocationSet *xmlLocationSetPtr;
|
||||
struct _xmlLocationSet {
|
||||
int locNr; /* number of locations in the set */
|
||||
int locMax; /* size of the array as allocated */
|
||||
xmlXPathObjectPtr *locTab;/* array of locations */
|
||||
};
|
||||
|
||||
/*
|
||||
* Handling of location sets.
|
||||
*/
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlLocationSetPtr
|
||||
xmlXPtrLocationSetCreate (xmlXPathObjectPtr val);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlXPtrFreeLocationSet (xmlLocationSetPtr obj);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlLocationSetPtr
|
||||
xmlXPtrLocationSetMerge (xmlLocationSetPtr val1,
|
||||
xmlLocationSetPtr val2);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewRange (xmlNodePtr start,
|
||||
int startindex,
|
||||
xmlNodePtr end,
|
||||
int endindex);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewRangePoints (xmlXPathObjectPtr start,
|
||||
xmlXPathObjectPtr end);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewRangeNodePoint (xmlNodePtr start,
|
||||
xmlXPathObjectPtr end);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewRangePointNode (xmlXPathObjectPtr start,
|
||||
xmlNodePtr end);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewRangeNodes (xmlNodePtr start,
|
||||
xmlNodePtr end);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewLocationSetNodes (xmlNodePtr start,
|
||||
xmlNodePtr end);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewRangeNodeObject (xmlNodePtr start,
|
||||
xmlXPathObjectPtr end);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewCollapsedRange (xmlNodePtr start);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlXPtrLocationSetAdd (xmlLocationSetPtr cur,
|
||||
xmlXPathObjectPtr val);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrWrapLocationSet (xmlLocationSetPtr val);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlXPtrLocationSetDel (xmlLocationSetPtr cur,
|
||||
xmlXPathObjectPtr val);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlXPtrLocationSetRemove (xmlLocationSetPtr cur,
|
||||
int val);
|
||||
#endif /* defined(LIBXML_XPTR_LOCS_ENABLED) */
|
||||
|
||||
/*
|
||||
* Functions.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathContextPtr
|
||||
xmlXPtrNewContext (xmlDocPtr doc,
|
||||
xmlNodePtr here,
|
||||
@@ -40,6 +118,18 @@ XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrEval (const xmlChar *str,
|
||||
xmlXPathContextPtr ctx);
|
||||
|
||||
#if defined(LIBXML_XPTR_LOCS_ENABLED)
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt,
|
||||
int nargs);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlXPtrBuildNodeList (xmlXPathObjectPtr obj);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt);
|
||||
#endif /* defined(LIBXML_XPTR_LOCS_ENABLED) */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
BIN
Binary file not shown.
@@ -20,21 +20,21 @@ extern "C" {
|
||||
*
|
||||
* the version string like "1.2.3"
|
||||
*/
|
||||
#define LIBXSLT_DOTTED_VERSION "1.1.43"
|
||||
#define LIBXSLT_DOTTED_VERSION "1.1.42"
|
||||
|
||||
/**
|
||||
* LIBXSLT_VERSION:
|
||||
*
|
||||
* the version number: 1.2.3 value is 10203
|
||||
*/
|
||||
#define LIBXSLT_VERSION 10143
|
||||
#define LIBXSLT_VERSION 10142
|
||||
|
||||
/**
|
||||
* LIBXSLT_VERSION_STRING:
|
||||
*
|
||||
* the version number string, 1.2.3 value is "10203"
|
||||
*/
|
||||
#define LIBXSLT_VERSION_STRING "10143"
|
||||
#define LIBXSLT_VERSION_STRING "10142"
|
||||
|
||||
/**
|
||||
* LIBXSLT_VERSION_EXTRA:
|
||||
@@ -50,7 +50,7 @@ extern "C" {
|
||||
* is insignifiant and being able to run xsltpoc -v is useful. On
|
||||
* by default unless --without-debug is passed to configure
|
||||
*/
|
||||
#if 0
|
||||
#if 1
|
||||
#define WITH_XSLT_DEBUG
|
||||
#endif
|
||||
|
||||
@@ -83,7 +83,7 @@ extern "C" {
|
||||
* is insignifiant.
|
||||
* On by default unless --without-debugger is passed to configure
|
||||
*/
|
||||
#if 0
|
||||
#if 1
|
||||
#ifndef WITH_DEBUGGER
|
||||
#define WITH_DEBUGGER
|
||||
#endif
|
||||
@@ -112,7 +112,7 @@ extern "C" {
|
||||
#ifndef WITH_MODULES
|
||||
#define WITH_MODULES
|
||||
#endif
|
||||
#define LIBXSLT_DEFAULT_PLUGINS_PATH() ""
|
||||
#define LIBXSLT_DEFAULT_PLUGINS_PATH() "/project/build/tmp/libxml2/lib/libxslt-plugins"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#ifndef LXML_VERSION_STRING
|
||||
#define LXML_VERSION_STRING "6.1.3"
|
||||
#define LXML_VERSION_STRING "5.3.0"
|
||||
#endif
|
||||
|
||||
@@ -6,9 +6,8 @@ cdef extern from "lxml-version.h":
|
||||
cdef char* LXML_VERSION_STRING
|
||||
|
||||
cdef extern from "libxml/xmlversion.h":
|
||||
const char* xmlParserVersion
|
||||
int LIBXML_VERSION
|
||||
|
||||
cdef const_char* xmlParserVersion
|
||||
cdef int LIBXML_VERSION
|
||||
|
||||
cdef extern from "libxml/xmlstring.h" nogil:
|
||||
ctypedef unsigned char xmlChar
|
||||
@@ -142,7 +141,7 @@ cdef extern from "libxml/tree.h" nogil:
|
||||
XML_ATTRIBUTE_NMTOKENS= 8
|
||||
XML_ATTRIBUTE_ENUMERATION= 9
|
||||
XML_ATTRIBUTE_NOTATION= 10
|
||||
|
||||
|
||||
ctypedef enum xmlAttributeDefault:
|
||||
XML_ATTRIBUTE_NONE= 1
|
||||
XML_ATTRIBUTE_REQUIRED= 2
|
||||
@@ -289,7 +288,7 @@ cdef extern from "libxml/tree.h" nogil:
|
||||
xmlDtd* intSubset
|
||||
xmlDtd* extSubset
|
||||
int properties
|
||||
|
||||
|
||||
ctypedef struct xmlAttr:
|
||||
void* _private
|
||||
xmlElementType type
|
||||
@@ -308,7 +307,7 @@ cdef extern from "libxml/tree.h" nogil:
|
||||
const_xmlChar* name
|
||||
xmlAttr* attr
|
||||
xmlDoc* doc
|
||||
|
||||
|
||||
ctypedef struct xmlBuffer
|
||||
|
||||
ctypedef struct xmlBuf # new in libxml2 2.9
|
||||
@@ -319,14 +318,14 @@ cdef extern from "libxml/tree.h" nogil:
|
||||
int error
|
||||
|
||||
const_xmlChar* XML_XML_NAMESPACE
|
||||
|
||||
|
||||
cdef void xmlFreeDoc(xmlDoc* cur)
|
||||
cdef void xmlFreeDtd(xmlDtd* cur)
|
||||
cdef void xmlFreeNode(xmlNode* cur)
|
||||
cdef void xmlFreeNsList(xmlNs* ns)
|
||||
cdef void xmlFreeNs(xmlNs* ns)
|
||||
cdef void xmlFree(void* buf)
|
||||
|
||||
|
||||
cdef xmlNode* xmlNewNode(xmlNs* ns, const_xmlChar* name)
|
||||
cdef xmlNode* xmlNewDocText(xmlDoc* doc, const_xmlChar* content)
|
||||
cdef xmlNode* xmlNewDocComment(xmlDoc* doc, const_xmlChar* content)
|
||||
@@ -438,7 +437,7 @@ cdef extern from "libxml/xmlIO.h":
|
||||
cdef xmlOutputBuffer* xmlOutputBufferCreateIO(
|
||||
xmlOutputWriteCallback iowrite,
|
||||
xmlOutputCloseCallback ioclose,
|
||||
void * ioctx,
|
||||
void * ioctx,
|
||||
xmlCharEncodingHandler* encoder) nogil
|
||||
cdef xmlOutputBuffer* xmlOutputBufferCreateFile(
|
||||
stdio.FILE* file, xmlCharEncodingHandler* encoder) nogil
|
||||
@@ -472,11 +471,14 @@ cdef extern from "libxml/globals.h" nogil:
|
||||
cdef int xmlThrDefKeepBlanksDefaultValue(int onoff)
|
||||
cdef int xmlThrDefLineNumbersDefaultValue(int onoff)
|
||||
cdef int xmlThrDefIndentTreeOutput(int onoff)
|
||||
|
||||
|
||||
cdef extern from "libxml/xmlmemory.h" nogil:
|
||||
cdef void* xmlMalloc(size_t size)
|
||||
cdef int xmlMemBlocks()
|
||||
cdef int xmlMemUsed()
|
||||
cdef void xmlMemDisplay(stdio.FILE* file)
|
||||
cdef void xmlMemDisplayLast(stdio.FILE* file, long num_bytes)
|
||||
cdef void xmlMemShow(stdio.FILE* file, int count)
|
||||
|
||||
cdef extern from "etree_defs.h" nogil:
|
||||
cdef bint _isElement(xmlNode* node)
|
||||
|
||||
@@ -5,23 +5,23 @@
|
||||
|
||||
cdef extern from "libxml/xmlerror.h":
|
||||
ctypedef enum xmlErrorLevel:
|
||||
XML_ERR_NONE = 0 # Success
|
||||
XML_ERR_WARNING = 1 # A warning
|
||||
XML_ERR_ERROR = 2 # An error
|
||||
XML_ERR_NONE = 0
|
||||
XML_ERR_WARNING = 1 # A simple warning
|
||||
XML_ERR_ERROR = 2 # A recoverable error
|
||||
XML_ERR_FATAL = 3 # A fatal error
|
||||
|
||||
ctypedef enum xmlErrorDomain:
|
||||
XML_FROM_NONE = 0 # Unknown
|
||||
XML_FROM_NONE = 0
|
||||
XML_FROM_PARSER = 1 # The XML parser
|
||||
XML_FROM_TREE = 2 # The tree module (unused)
|
||||
XML_FROM_TREE = 2 # The tree module
|
||||
XML_FROM_NAMESPACE = 3 # The XML Namespace module
|
||||
XML_FROM_DTD = 4 # The XML DTD validation with parser context
|
||||
XML_FROM_DTD = 4 # The XML DTD validation with parser contex
|
||||
XML_FROM_HTML = 5 # The HTML parser
|
||||
XML_FROM_MEMORY = 6 # The memory allocator (unused)
|
||||
XML_FROM_MEMORY = 6 # The memory allocator
|
||||
XML_FROM_OUTPUT = 7 # The serialization code
|
||||
XML_FROM_IO = 8 # The Input/Output stack
|
||||
XML_FROM_FTP = 9 # The FTP module (unused)
|
||||
XML_FROM_HTTP = 10 # The HTTP module (unused)
|
||||
XML_FROM_FTP = 9 # The FTP module
|
||||
XML_FROM_HTTP = 10 # The HTTP module
|
||||
XML_FROM_XINCLUDE = 11 # The XInclude processing
|
||||
XML_FROM_XPATH = 12 # The XPath module
|
||||
XML_FROM_XPOINTER = 13 # The XPointer module
|
||||
@@ -33,20 +33,20 @@ cdef extern from "libxml/xmlerror.h":
|
||||
XML_FROM_RELAXNGV = 19 # The Relax-NG validator module
|
||||
XML_FROM_CATALOG = 20 # The Catalog module
|
||||
XML_FROM_C14N = 21 # The Canonicalization module
|
||||
XML_FROM_XSLT = 22 # The XSLT engine from libxslt (unused)
|
||||
XML_FROM_XSLT = 22 # The XSLT engine from libxslt
|
||||
XML_FROM_VALID = 23 # The XML DTD validation with valid context
|
||||
XML_FROM_CHECK = 24 # The error checking module (unused)
|
||||
XML_FROM_CHECK = 24 # The error checking module
|
||||
XML_FROM_WRITER = 25 # The xmlwriter module
|
||||
XML_FROM_MODULE = 26 # The dynamically loaded module module (unused)
|
||||
XML_FROM_I18N = 27 # The module handling character conversion (unused)
|
||||
XML_FROM_MODULE = 26 # The dynamically loaded module modul
|
||||
XML_FROM_I18N = 27 # The module handling character conversion
|
||||
XML_FROM_SCHEMATRONV = 28 # The Schematron validator module
|
||||
XML_FROM_BUFFER = 29 # The buffers module (unused)
|
||||
XML_FROM_URI = 30 # The URI module (unused)
|
||||
XML_FROM_BUFFER = 29 # The buffers module
|
||||
XML_FROM_URI = 30 # The URI module
|
||||
|
||||
ctypedef enum xmlParserErrors:
|
||||
XML_ERR_OK = 0 # Success
|
||||
XML_ERR_INTERNAL_ERROR = 1 # Internal assertion failure
|
||||
XML_ERR_NO_MEMORY = 2 # Out of memory
|
||||
XML_ERR_OK = 0
|
||||
XML_ERR_INTERNAL_ERROR = 1
|
||||
XML_ERR_NO_MEMORY = 2
|
||||
XML_ERR_DOCUMENT_START = 3
|
||||
XML_ERR_DOCUMENT_EMPTY = 4
|
||||
XML_ERR_DOCUMENT_END = 5
|
||||
@@ -76,7 +76,7 @@ cdef extern from "libxml/xmlerror.h":
|
||||
XML_ERR_ENTITY_IS_EXTERNAL = 29
|
||||
XML_ERR_ENTITY_IS_PARAMETER = 30
|
||||
XML_ERR_UNKNOWN_ENCODING = 31
|
||||
XML_ERR_UNSUPPORTED_ENCODING = 32 # Unsupported character encoding
|
||||
XML_ERR_UNSUPPORTED_ENCODING = 32
|
||||
XML_ERR_STRING_NOT_STARTED = 33
|
||||
XML_ERR_STRING_NOT_CLOSED = 34
|
||||
XML_ERR_NS_DECL_ERROR = 35
|
||||
@@ -157,12 +157,6 @@ cdef extern from "libxml/xmlerror.h":
|
||||
XML_ERR_NAME_TOO_LONG = 110
|
||||
XML_ERR_USER_STOP = 111
|
||||
XML_ERR_COMMENT_ABRUPTLY_ENDED = 112
|
||||
XML_WAR_ENCODING_MISMATCH = 113
|
||||
XML_ERR_RESOURCE_LIMIT = 114 # Internal resource limit like maximum amplification factor exceeded
|
||||
XML_ERR_ARGUMENT = 115 # Invalid argument
|
||||
XML_ERR_SYSTEM = 116 # Unexpected error from the OS or an external library
|
||||
XML_ERR_REDECL_PREDEF_ENTITY = 117
|
||||
XML_ERR_INT_SUBSET_NOT_FINISHED = 118
|
||||
XML_NS_ERR_XML_NAMESPACE = 200
|
||||
XML_NS_ERR_UNDEFINED_NAMESPACE = 201
|
||||
XML_NS_ERR_QNAME = 202
|
||||
@@ -213,7 +207,6 @@ cdef extern from "libxml/xmlerror.h":
|
||||
XML_DTD_DUP_TOKEN = 541
|
||||
XML_HTML_STRUCURE_ERROR = 800
|
||||
XML_HTML_UNKNOWN_TAG = 801
|
||||
XML_HTML_INCORRECTLY_OPENED_COMMENT = 802
|
||||
XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000
|
||||
XML_RNGP_ATTR_CONFLICT = 1001
|
||||
XML_RNGP_ATTRIBUTE_CHILDREN = 1002
|
||||
@@ -392,7 +385,7 @@ cdef extern from "libxml/xmlerror.h":
|
||||
XML_IO_ENAMETOOLONG = 1521
|
||||
XML_IO_ENFILE = 1522
|
||||
XML_IO_ENODEV = 1523
|
||||
XML_IO_ENOENT = 1524 # File not found
|
||||
XML_IO_ENOENT = 1524
|
||||
XML_IO_ENOEXEC = 1525
|
||||
XML_IO_ENOLCK = 1526
|
||||
XML_IO_ENOMEM = 1527
|
||||
@@ -425,7 +418,6 @@ cdef extern from "libxml/xmlerror.h":
|
||||
XML_IO_EADDRINUSE = 1554
|
||||
XML_IO_EALREADY = 1555
|
||||
XML_IO_EAFNOSUPPORT = 1556
|
||||
XML_IO_UNSUPPORTED_PROTOCOL = 1557
|
||||
XML_XINCLUDE_RECURSION = 1600
|
||||
XML_XINCLUDE_PARSE_VALUE = 1601
|
||||
XML_XINCLUDE_ENTITY_DEF_MISMATCH = 1602
|
||||
@@ -716,8 +708,8 @@ cdef extern from "libxml/xmlerror.h":
|
||||
XML_SCHEMAP_SRC_IMPORT_2 = 3066
|
||||
XML_SCHEMAP_SRC_IMPORT_2_1 = 3067
|
||||
XML_SCHEMAP_SRC_IMPORT_2_2 = 3068
|
||||
XML_SCHEMAP_INTERNAL = 3069
|
||||
XML_SCHEMAP_NOT_DETERMINISTIC = 3070
|
||||
XML_SCHEMAP_INTERNAL = 3069 # 3069 non-W3C
|
||||
XML_SCHEMAP_NOT_DETERMINISTIC = 3070 # 3070 non-W3C
|
||||
XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1 = 3071
|
||||
XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2 = 3072
|
||||
XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3 = 3073
|
||||
@@ -733,12 +725,12 @@ cdef extern from "libxml/xmlerror.h":
|
||||
XML_SCHEMAP_WARN_SKIP_SCHEMA = 3083
|
||||
XML_SCHEMAP_WARN_UNLOCATED_SCHEMA = 3084
|
||||
XML_SCHEMAP_WARN_ATTR_REDECL_PROH = 3085
|
||||
XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH = 3086
|
||||
XML_SCHEMAP_AG_PROPS_CORRECT = 3087
|
||||
XML_SCHEMAP_COS_CT_EXTENDS_1_2 = 3088
|
||||
XML_SCHEMAP_AU_PROPS_CORRECT = 3089
|
||||
XML_SCHEMAP_A_PROPS_CORRECT_3 = 3090
|
||||
XML_SCHEMAP_COS_ALL_LIMITED = 3091
|
||||
XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH = 3086 # 3085
|
||||
XML_SCHEMAP_AG_PROPS_CORRECT = 3087 # 3086
|
||||
XML_SCHEMAP_COS_CT_EXTENDS_1_2 = 3088 # 3087
|
||||
XML_SCHEMAP_AU_PROPS_CORRECT = 3089 # 3088
|
||||
XML_SCHEMAP_A_PROPS_CORRECT_3 = 3090 # 3089
|
||||
XML_SCHEMAP_COS_ALL_LIMITED = 3091 # 3090
|
||||
XML_SCHEMATRONV_ASSERT = 4000
|
||||
XML_SCHEMATRONV_REPORT = 4001
|
||||
XML_MODULE_OPEN = 4900
|
||||
|
||||
@@ -32,11 +32,11 @@ cdef extern from "libxml/parser.h" nogil:
|
||||
|
||||
ctypedef void (*commentSAXFunc)(void* ctx, const_xmlChar* value) noexcept
|
||||
|
||||
ctypedef void (*processingInstructionSAXFunc)(void* ctx,
|
||||
ctypedef void (*processingInstructionSAXFunc)(void* ctx,
|
||||
const_xmlChar* target,
|
||||
const_xmlChar* data) noexcept
|
||||
|
||||
ctypedef void (*internalSubsetSAXFunc)(void* ctx,
|
||||
ctypedef void (*internalSubsetSAXFunc)(void* ctx,
|
||||
const_xmlChar* name,
|
||||
const_xmlChar* externalID,
|
||||
const_xmlChar* systemID) noexcept
|
||||
@@ -80,7 +80,6 @@ cdef extern from "libxml/tree.h" nogil:
|
||||
cdataBlockSAXFunc cdataBlock
|
||||
referenceSAXFunc reference
|
||||
getEntitySAXFunc getEntity
|
||||
getEntitySAXFunc getParameterEntity
|
||||
commentSAXFunc comment
|
||||
processingInstructionSAXFunc processingInstruction
|
||||
startDocumentSAXFunc startDocument
|
||||
@@ -100,48 +99,11 @@ cdef extern from "libxml/xmlIO.h" nogil:
|
||||
|
||||
cdef extern from "libxml/parser.h" nogil:
|
||||
|
||||
ctypedef enum xmlFeature:
|
||||
XML_WITH_THREAD = 1
|
||||
XML_WITH_TREE = 2
|
||||
XML_WITH_OUTPUT = 3
|
||||
XML_WITH_PUSH = 4
|
||||
XML_WITH_READER = 5
|
||||
XML_WITH_PATTERN = 6
|
||||
XML_WITH_WRITER = 7
|
||||
XML_WITH_SAX1 = 8
|
||||
XML_WITH_FTP = 9
|
||||
XML_WITH_HTTP = 10
|
||||
XML_WITH_VALID = 11
|
||||
XML_WITH_HTML = 12
|
||||
XML_WITH_LEGACY = 13
|
||||
XML_WITH_C14N = 14
|
||||
XML_WITH_CATALOG = 15
|
||||
XML_WITH_XPATH = 16
|
||||
XML_WITH_XPTR = 17
|
||||
XML_WITH_XINCLUDE = 18
|
||||
XML_WITH_ICONV = 19
|
||||
XML_WITH_ISO8859X = 20
|
||||
XML_WITH_UNICODE = 21
|
||||
XML_WITH_REGEXP = 22
|
||||
XML_WITH_AUTOMATA = 23
|
||||
XML_WITH_EXPR = 24
|
||||
XML_WITH_SCHEMAS = 25
|
||||
XML_WITH_SCHEMATRON = 26
|
||||
XML_WITH_MODULES = 27
|
||||
XML_WITH_DEBUG = 28
|
||||
XML_WITH_DEBUG_MEM = 29
|
||||
XML_WITH_DEBUG_RUN = 30
|
||||
XML_WITH_ZLIB = 31
|
||||
XML_WITH_ICU = 32
|
||||
XML_WITH_LZMA = 33
|
||||
|
||||
cdef bint xmlHasFeature(xmlFeature feature)
|
||||
|
||||
cdef xmlDict* xmlDictCreate()
|
||||
cdef xmlDict* xmlDictCreateSub(xmlDict* subdict)
|
||||
cdef void xmlDictFree(xmlDict* sub)
|
||||
cdef int xmlDictReference(xmlDict* dict)
|
||||
|
||||
|
||||
cdef int XML_COMPLETE_ATTRS # SAX option for adding DTD default attributes
|
||||
cdef int XML_SKIP_IDS # SAX option for not building an XML ID dict
|
||||
|
||||
@@ -196,42 +158,34 @@ cdef extern from "libxml/parser.h" nogil:
|
||||
xmlParserInput* inputTab[]
|
||||
|
||||
ctypedef enum xmlParserOption:
|
||||
XML_PARSE_RECOVER = 0x1 # recover on errors
|
||||
XML_PARSE_NOENT = 0x2 # substitute entities
|
||||
XML_PARSE_DTDLOAD = 0x4 # load the external subset
|
||||
XML_PARSE_DTDATTR = 0x8 # default DTD attributes
|
||||
XML_PARSE_DTDVALID = 0x10 # validate with the DTD
|
||||
XML_PARSE_NOERROR = 0x20 # suppress error reports
|
||||
XML_PARSE_NOWARNING = 0x40 # suppress warning reports
|
||||
XML_PARSE_PEDANTIC = 0x80 # pedantic error reporting
|
||||
XML_PARSE_NOBLANKS = 0x100 # remove blank nodes
|
||||
XML_PARSE_SAX1 = 0x200 # use the SAX1 interface internally
|
||||
XML_PARSE_XINCLUDE = 0x400 # Implement XInclude substitution
|
||||
XML_PARSE_NONET = 0x800 # Forbid network access
|
||||
XML_PARSE_NODICT = 0x1000 # Do not reuse the context dictionary
|
||||
XML_PARSE_NSCLEAN = 0x2000 # remove redundant namespaces declarations
|
||||
XML_PARSE_NOCDATA = 0x4000 # merge CDATA as text nodes
|
||||
XML_PARSE_NOXINCNODE = 0x8000 # do not generate XINCLUDE START/END nodes
|
||||
XML_PARSE_RECOVER = 1 # recover on errors
|
||||
XML_PARSE_NOENT = 2 # substitute entities
|
||||
XML_PARSE_DTDLOAD = 4 # load the external subset
|
||||
XML_PARSE_DTDATTR = 8 # default DTD attributes
|
||||
XML_PARSE_DTDVALID = 16 # validate with the DTD
|
||||
XML_PARSE_NOERROR = 32 # suppress error reports
|
||||
XML_PARSE_NOWARNING = 64 # suppress warning reports
|
||||
XML_PARSE_PEDANTIC = 128 # pedantic error reporting
|
||||
XML_PARSE_NOBLANKS = 256 # remove blank nodes
|
||||
XML_PARSE_SAX1 = 512 # use the SAX1 interface internally
|
||||
XML_PARSE_XINCLUDE = 1024 # Implement XInclude substitution
|
||||
XML_PARSE_NONET = 2048 # Forbid network access
|
||||
XML_PARSE_NODICT = 4096 # Do not reuse the context dictionary
|
||||
XML_PARSE_NSCLEAN = 8192 # remove redundant namespaces declarations
|
||||
XML_PARSE_NOCDATA = 16384 # merge CDATA as text nodes
|
||||
XML_PARSE_NOXINCNODE = 32768 # do not generate XINCLUDE START/END nodes
|
||||
# libxml2 2.6.21+ only:
|
||||
XML_PARSE_COMPACT = 0x1_0000 # compact small text nodes
|
||||
XML_PARSE_COMPACT = 65536 # compact small text nodes
|
||||
# libxml2 2.7.0+ only:
|
||||
XML_PARSE_OLD10 = 0x2_0000 # parse using XML-1.0 before update 5
|
||||
XML_PARSE_NOBASEFIX = 0x4_0000 # do not fixup XINCLUDE xml:base uris
|
||||
XML_PARSE_HUGE = 0x8_0000 # relax any hardcoded limit from the parser
|
||||
XML_PARSE_OLD10 = 131072 # parse using XML-1.0 before update 5
|
||||
XML_PARSE_NOBASEFIX = 262144 # do not fixup XINCLUDE xml:base uris
|
||||
XML_PARSE_HUGE = 524288 # relax any hardcoded limit from the parser
|
||||
# libxml2 2.7.3+ only:
|
||||
XML_PARSE_OLDSAX = 0x10_0000 # parse using SAX2 interface before 2.7.0
|
||||
XML_PARSE_OLDSAX = 1048576 # parse using SAX2 interface before 2.7.0
|
||||
# libxml2 2.8.0+ only:
|
||||
XML_PARSE_IGNORE_ENC = 0x20_0000 # ignore internal document encoding hint
|
||||
XML_PARSE_IGNORE_ENC = 2097152 # ignore internal document encoding hint
|
||||
# libxml2 2.9.0+ only:
|
||||
XML_PARSE_BIG_LINES = 0x40_0000 # Store big lines numbers in text PSVI field
|
||||
# libxml2 2.13.0+ only:
|
||||
XML_PARSE_NO_XXE = 0x80_0000 # Disable loading of external DTDs or entities
|
||||
# libxml2 2.14.0+ only:
|
||||
XML_PARSE_UNZIP = 0x100_0000 # Enable input decompression (and potential gzip bombs)
|
||||
XML_PARSE_NO_SYS_CATALOG = 0x200_0000 # Disable the global system XML catalog
|
||||
XML_PARSE_CATALOG_PI = 0x400_0000 # Enable XML catalog processing instructions
|
||||
# libxml2 2.15.0+ only:
|
||||
XML_PARSE_SKIP_IDS = 0x800_0000 # Force the parser to ignore IDs
|
||||
XML_PARSE_BIG_LINES = 4194304 # Store big lines numbers in text PSVI field
|
||||
|
||||
cdef void xmlInitParser()
|
||||
cdef void xmlCleanupParser()
|
||||
@@ -253,9 +207,9 @@ cdef extern from "libxml/parser.h" nogil:
|
||||
cdef xmlDoc* xmlCtxtReadFile(xmlParserCtxt* ctxt,
|
||||
char* filename, char* encoding,
|
||||
int options)
|
||||
cdef xmlDoc* xmlCtxtReadIO(xmlParserCtxt* ctxt,
|
||||
xmlInputReadCallback ioread,
|
||||
xmlInputCloseCallback ioclose,
|
||||
cdef xmlDoc* xmlCtxtReadIO(xmlParserCtxt* ctxt,
|
||||
xmlInputReadCallback ioread,
|
||||
xmlInputCloseCallback ioclose,
|
||||
void* ioctx,
|
||||
char* URL, char* encoding,
|
||||
int options)
|
||||
@@ -302,18 +256,10 @@ cdef extern from "libxml/parser.h" nogil:
|
||||
|
||||
|
||||
cdef extern from "libxml/parserInternals.h" nogil:
|
||||
"""
|
||||
#if LIBXML_VERSION < 21400
|
||||
#define xmlNewInputFromMemory(url, mem, size, flags) (NULL)
|
||||
#endif
|
||||
"""
|
||||
cdef xmlParserInput* xmlNewInputStream(xmlParserCtxt* ctxt)
|
||||
cdef xmlParserInput* xmlNewStringInputStream(xmlParserCtxt* ctxt,
|
||||
cdef xmlParserInput* xmlNewStringInputStream(xmlParserCtxt* ctxt,
|
||||
char* buffer)
|
||||
cdef xmlParserInput* xmlNewInputFromFile(xmlParserCtxt* ctxt,
|
||||
cdef xmlParserInput* xmlNewInputFromFile(xmlParserCtxt* ctxt,
|
||||
char* filename)
|
||||
cdef xmlParserInput* xmlNewInputFromMemory(
|
||||
const char *url, const void *mem, size_t size, int flags) # actually "xmlParserInputFlags flags"
|
||||
cdef void xmlFreeInputStream(xmlParserInput* input)
|
||||
cdef int xmlSwitchEncoding(xmlParserCtxt* ctxt, int enc)
|
||||
cdef bint xmlCtxtIsStopped(xmlParserCtxt* ctxt)
|
||||
|
||||
Reference in New Issue
Block a user