1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-12 09:17:37 +03:00
Commit Graph

1190 Commits

Author SHA1 Message Date
Nick Wellnhofer
1b6403583b schemas: Stop using xmlValidateNotationUse
Simplify symbol availability logic.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
fa01278dcd regexp: Hide experimental legacy code
This was never made public.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
10d60d15d6 regexp: Stop using LIBXML_AUTOMATA_ENABLED
This macro always equals LIBXML_REGEXP_ENABLED.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
11c3f84b6c SAX2: Always make xmlSAX2{Start,End}Element public
Simplify symbol availability logic.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
f307237e14 schemas: Use private copy of global NaN and Inf
Simplify symbol availability logic.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
b0fc67aa22 build: Remove --with-tree configuration option
This option would allow for a smaller, but mostly useless minimal build.
But it complicates the symbol availability logic in an insane way and
requires specialized tools like our custom C parser in doc/apibuild.py.

See #717.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
4967277931 parser: Make XML_INPUT constants signed
Avoid conversion to unsigned which triggers (harmless) UBSan warnings.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
84666581c2 catalog: Fix initialization
Initialize mutex via xmlInitParser.

Fix some other initialization calls.
2024-06-15 21:15:26 +02:00
Nick Wellnhofer
208f27f964 include: Don't define ATTRIBUTE_UNUSED in public header
Stop polluting namespace with unprefixed names.
2024-06-15 19:13:08 +02:00
Nick Wellnhofer
387f0c784f include: Readd circular dependency between tree.h and parser.h
There are dozens of downstream projects that only include tree.h but use
declarations from parser.h. This broke after the recent cleanup of
circular dependencies.

Make tree.h include parser.h again. This is a hack but doesn't change
the include directory struture.

This commit only made it into the 2.12 branch but wasn't applied to
master, so the issue turned up in 2.13.0 again.

Should fix #734.
2024-06-15 16:27:54 +02:00
Nick Wellnhofer
bd208d5fe1 xinclude: Add another missing include 2024-06-15 01:40:06 +02:00
Jan Alexander Steffens (heftig)
599ceaffad
xinclude: Add missing include
Gambas fails to compile with

    error: 'xmlStructuredErrorFunc' has not been declared
2024-06-15 00:59:54 +02:00
Nick Wellnhofer
3b4a84e4b7 encoding: Deprecate xmlCharEncodingHandler members 2024-06-13 18:09:17 +02:00
Nick Wellnhofer
b34dc1e4a3 tree: Deprecate xmlBuffer members 2024-06-13 18:09:17 +02:00
Nick Wellnhofer
712a31abe4 parser: Deprecate most public struct members
This will probably cause many warnings in downstream code abusing
libxml2 internals, but we can always undeprecate some members later.
2024-06-13 18:04:34 +02:00
Nick Wellnhofer
1c1794964e xlink: Deprecate xlinkGetDefault*
These functions read an otherwise unused global and seem useless.
2024-06-12 19:55:47 +02:00
Nick Wellnhofer
046663bc54 xlink: Deprecate xlinkSetDefault*
These functions set an otherwise unused global and seem useless.
2024-06-12 19:43:22 +02:00
Nick Wellnhofer
669bd34993 xpointer: Remove support for XPointer locations
The latest spec for what it essentially an XPath extension seems to be
this working draft from 2002:

    https://www.w3.org/TR/xptr-xpointer/

The xpointer() scheme is listed as "being reviewed" in the XPointer
registry since at least 2006. libxml2 seems to be the only modern
software that tries to implement this spec, but the code has many bugs
and quality issues.

If you configure --with-legacy, old symbols are retained for ABI
compatibility.
2024-06-12 18:20:01 +02:00
Nick Wellnhofer
dba1ed85a3 ftp: Remove FTP support
Remove the built-in FTP client. If you configure --with-legacy, old
symbols are retained for ABI compatibility.
2024-06-12 18:19:55 +02:00
Nick Wellnhofer
5238404325 parser: Pass resource type to resource loader 2024-06-12 16:36:12 +02:00
Nick Wellnhofer
ab5e6debd1 parser: Introduce XML_INPUT_NETWORK input flag
This allows to disable network access when creating parser inputs with
xmlInputCreateUrl.
2024-06-12 16:36:12 +02:00
Nick Wellnhofer
89fcae4dfd parser: Don't report malloc failures when creating context
We don't want messages to stderr before an error handler could be set on
a parser context.
2024-06-12 16:36:12 +02:00
Nick Wellnhofer
ef8dc4f673 schemas: Add callbacks for resource loader 2024-06-12 16:36:12 +02:00
Nick Wellnhofer
fd7d9e5eca reader: Add callbacks for resource loader 2024-06-12 16:36:12 +02:00
Nick Wellnhofer
fa2592b384 xinclude: Add callbacks for resource loader 2024-06-12 16:36:12 +02:00
Nick Wellnhofer
40b76edac4 relaxng: Add callbacks for resource loader 2024-06-12 16:36:12 +02:00
Nick Wellnhofer
64ad272525 parser: Introduce per-context resource loader 2024-06-12 16:22:52 +02:00
Nick Wellnhofer
b9d2f3c911 parser: Introduce new input API
- xmlInputCreateUrl
- xmlInputCreateMemory
- xmlInputCreateString
- xmlInputCreateFd
- xmlInputCreateIO
- xmlInputSetEncoding

These functions don't take a parser context and work on xmlParserInputs,
replacing functions working on xmlParserInputBuffers.

xmlInputCreateUrl and xmlInputSetEncoding offer fine-grained error
handling.

Several XML_INPUT_* flags offer additional control.
2024-06-12 16:22:52 +02:00
Nick Wellnhofer
ff3b091910 parser: Implement XML_PARSE_NO_UNZIP option 2024-06-12 16:14:15 +02:00
Nick Wellnhofer
1432949d3c io: Pass input flags to xmlParserInputBufferCreateUrl 2024-06-12 16:14:15 +02:00
Nick Wellnhofer
b5890cb425 io: Remove xmlParserInputBufferCreateFilenameSafe 2024-06-12 16:14:15 +02:00
Nick Wellnhofer
1b1e8b3c12 io: Stop invoking generic error handler for IO errors 2024-06-12 16:14:15 +02:00
Rosen Penev
f227086380 meson: convert boolean options to feature option
Simpler. Seems like they're only disabled by minimum.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-06 17:13:41 -07:00
Sadaf Ebrahimi
897c73fe24 Add missing _cplusplus processing clause 2024-06-06 09:40:18 +00:00
Nick Wellnhofer
5b1d7ff0b2 parser: Remove redefinitions for legacy globals 2024-05-20 23:59:55 +02:00
Nick Wellnhofer
e75e878e02 doc: Update and fix documentation 2024-05-20 14:23:39 +02:00
Nick Wellnhofer
b47a95fe31 parser: Don't make xmlCtxtErrIO public 2024-05-20 14:22:56 +02:00
Nick Wellnhofer
592546267f threads: Deprecate remaining ThrDef functions 2024-05-14 15:44:50 +02:00
Nick Wellnhofer
422ae4623a xmllint: Make some strings const 2024-05-05 17:26:11 +02:00
Nick Wellnhofer
ae23a4ce56 unicode: Deprecate most xmlUCSIs* functions
These don't seem to be used by downstream code.
2024-04-30 17:42:59 +02:00
Nick Wellnhofer
1cdfece12b memory: Remove memory debugging
This is useless compared to sanitizers or valgrind and has a
considerable performance impact if enabled accidentally.
2024-04-28 20:42:55 +02:00
Nick Wellnhofer
5e80f4381b tree: Deprecate xmlRegisterNodeDefault
This rarely used feature should be phased out.
2024-04-28 19:30:40 +02:00
Nick Wellnhofer
88169bfda6 tree: Deprecate xmlSetCompressMode 2024-04-28 19:30:39 +02:00
Nick Wellnhofer
05654cfe00 html: Deprecate htmlHandleOmittedElem 2024-04-28 18:58:27 +02:00
Vincent Torri
5732ce56f3 meson: Initial commit 2024-04-04 12:23:39 +02:00
Nick Wellnhofer
3f05508a53 tree: Report malloc failures in attribute setters 2024-03-18 15:14:43 +01:00
Nick Wellnhofer
6a49bb777c tree: Introduce xmlSearchNsSafe
After the failed experiment with a static XML namespace, introduce
versions of xmlSearchNs that report malloc failures.

Optimize the no-document case by only adding the XML namespace
declaration if it wasn't found in an ancestor.
2024-03-17 21:07:46 +01:00
Nick Wellnhofer
047ea3ecb3 Revert "tree: Allocate XML namespace statically"
This reverts commit 2840e33c5e.
2024-03-17 21:04:40 +01:00
Nick Wellnhofer
dc2a03d482 valid: Deprecate internal validation functions 2024-03-16 15:20:08 +01:00
Nick Wellnhofer
9f049afa6d tree: Refactor element creation and parsing of attribute values
Replace xmlStringGetNodeList and xmlStringLenGetNodeList with
xmlNodeParseContentInternal which also updates an optional parent
node.

Don't look up entities a second time via xmlNewReference.
2024-03-15 19:54:26 +01:00