1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00
Commit Graph

6900 Commits

Author SHA1 Message Date
Nick Wellnhofer
8b1f79cea0 SAX2: Make xmlSAXDefaultVersion a no-op 2024-06-27 14:44:55 +02:00
Nick Wellnhofer
5cf5b542d9 SAX2: Deprecate xmlSAX2StartElement 2024-06-27 14:44:55 +02:00
Nick Wellnhofer
71eb710914 xmllint: Switch to xmlCtxtSetErrorHandler 2024-06-27 14:44:55 +02:00
Nick Wellnhofer
c5750fc6a7 python: Switch to xmlCtxtSetErrorHandler 2024-06-27 14:44:55 +02:00
Nick Wellnhofer
eca972e682 parser: Add getters for XML declaration to parser context
Access to struct members will be deprecated.
2024-06-27 14:44:49 +02:00
Nick Wellnhofer
598ee0d2c6 error: Remove underscores from xmlRaiseError 2024-06-27 14:43:10 +02:00
Nick Wellnhofer
3ff8a2c4b8 parser: Deprecate xmlIsLetter 2024-06-27 14:43:10 +02:00
Nick Wellnhofer
fa50be923b parser: Move implementation of xmlCtxtGetLastError 2024-06-27 14:37:53 +02:00
Nick Wellnhofer
7c11da2d98 tests: Clarify licence of test/intsubset2.xml 2024-06-27 12:49:06 +02:00
Nick Wellnhofer
b1a416bf52 encoding: Restore old lookup order in xmlOpenCharEncodingHandler
When looking up encodings with xmlLookupCharEncodingHandler, the
returned handler can have a different name than requested
(capitalization, internal aliases). This should eventually be fixed.
For now we revert part of commit 5b893fa9, start the lookup with
xmlFindHandler and add an explicit check for UTF-8.

Should fix the encoding name issue mentioned in #749.
2024-06-27 12:34:45 +02:00
Nick Wellnhofer
e6f25fdc7c uri: Fix documentation of xmlBuildRelativeURI 2024-06-27 11:55:33 +02:00
Nick Wellnhofer
c195f06fac autotools: Use AX_GCC_FUNC_ATTRIBUTE from autoconf archives 2024-06-25 22:19:47 +02:00
Nick Wellnhofer
1afaa37128 build: Move definition of ATTRIBUTE_DESTRUCTOR to libxml.h 2024-06-25 22:06:36 +02:00
Nick Wellnhofer
fd099dd8dc autotools: Fix pkg.m4 check 2024-06-24 20:37:39 +02:00
Nick Wellnhofer
c4d8343b7c encoding: Make xmlFindCharEncodingHandler return UTF-8 handler
xmlFindCharEncodingHandler must always return a handler.

Remove UTF-8 handler from default handler list.

Fixes 5b893fa9.
2024-06-24 20:08:27 +02:00
Nick Wellnhofer
54c6c7e416 uri: Only set file scheme for special Windows paths
Fixes 2ce70cde.

Also fix a test case.
2024-06-24 20:08:27 +02:00
Sam James
ec47add47c configure.ac: fix bashisms
'==' is a bashism, so use the POSIX '=' instead.
2024-06-24 17:27:50 +00:00
correctmost
c14c20f5ce doc: Add note about meson.build version bump 2024-06-23 18:52:44 -04:00
Nick Wellnhofer
2ce70cde46 uri: Handle filesystem paths in xmlBuildRelativeURISafe
This mainly fixes issues on Windows but should also fix a few general
corner cases.

Should fix #745.
2024-06-23 21:48:16 +02:00
Nick Wellnhofer
7655ed2cc0 cmake: Implement dependent options
This should make sure that configurations are valid but doesn't warn
about invalid configurations.

CMake only supports boolean options and I have no idea how features
like "minimal" or "legacy" that change default values of other options
could be supported.

Fixes #551.
2024-06-23 21:48:16 +02:00
Daniel E
600c6ca4bc cmake: Don't install meson build scripts in documentation
Add meson.build files as exclusions
2024-06-23 12:16:47 +00:00
Nick Wellnhofer
28b9bb0309 uri: Enable Windows paths on Cygwin 2024-06-22 22:07:45 +02:00
Nick Wellnhofer
5b893fa999 encoding: Fix encoding lookup with xmlOpenCharEncodingHandler
Make xmlOpenCharEncodingHandler call xmlParseCharEncoding first so we
prefer our own handlers for names like "UTF8". Only UTF-16 needs an
exception.

Make callers check the return value. For UTF-8, a NULL encoding doesn't
mean an error.

Remove unnecessary UTF-8 check from htmlFindOutputEncoder. Don't try to
look up ASCII handler since the HTML handler is always available.

Fix return code of xmlParseCharEncoding.

Should fix #744.
2024-06-22 21:59:03 +02:00
Nick Wellnhofer
b8903b9e0d runtest: Remove result handling from schemasOneTest
We only care about errors.
2024-06-22 21:59:03 +02:00
Nick Wellnhofer
a470378554 runtest: Remove result handling from rngOneTest
We only care about errors.
2024-06-22 21:59:03 +02:00
Nick Wellnhofer
e68ccfa988 tests: Port Schematron tests to C 2024-06-22 21:59:03 +02:00
Nick Wellnhofer
811373e221 tests: Remove old Python tests
With the exception of the xinclude test, these tests should be
equivalent to runsuite and runxmlconf.
2024-06-22 21:59:03 +02:00
Nick Wellnhofer
0a279e2f68 tests: Remove old timing tests 2024-06-22 21:59:03 +02:00
Nick Wellnhofer
f06fc933cd tests: Move tests for executables to separate script
Move tests for xmllint shell and xmlcatalog to separate scripts and
enabled them in Autotools.
2024-06-22 21:59:03 +02:00
Nick Wellnhofer
2d96adb27b windows: fopen files with "wb" 2024-06-22 21:29:27 +02:00
Nick Wellnhofer
5589c9ea6f xmllint: Set stdin/stdout to binary on Windows 2024-06-22 21:23:15 +02:00
Nick Wellnhofer
4b6e68282b cmake: Stop using win32config.h
Move this file to the win32 subdirectory.
2024-06-22 18:41:00 +02:00
Nick Wellnhofer
84a4f84c1c build: Don't check for required headers and functions
Unless we are on Windows, the following POSIX headers are required.
They're part of the earliest POSIX specs and it doesn't make sense to
check for them.

- fcntl.h
- unistd.h
- sys/stat.h
- sys/time.h

On Windows, io.h, fcntl.h and sys/stat.h are always available.
2024-06-22 18:41:00 +02:00
Nick Wellnhofer
f23fc4faed xmllint: Simplify time handling
Assume that gettimeofday is always available.
2024-06-22 18:41:00 +02:00
Nick Wellnhofer
dc6f55cf6e build: Remove check for IPv6
Only check for availability of netdb.h.
2024-06-22 18:41:00 +02:00
Nick Wellnhofer
02326d72d3 build: Remove socklen_t checks
socklen_t has been mandated by POSIX for ages. Always use "socklen_t" or
"int" on Win32.
2024-06-22 00:40:40 +02:00
Nick Wellnhofer
b01b55d50e README: Fix Meson examples 2024-06-22 00:12:57 +02:00
Rosen Penev
88cc61e3e6 meson: simplify thread_local check
Use a simple loop.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-21 14:48:31 -07:00
Rosen Penev
34fe4b8863 meson: simplify IPv6 check
We only need to find AF_INET6. Also make it a feature.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-21 14:48:30 -07:00
Rosen Penev
609c51c587 meson: simplify socklen_t check
Use a simple loop.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-21 14:39:08 -07:00
Nick Wellnhofer
9d46da1726 ci: Test meson build with legacy enabled 2024-06-21 23:13:34 +02:00
Nick Wellnhofer
c2ccbc0fed meson: Implement option dependencies
This also removes the FreeBSD hack.
2024-06-21 23:13:17 +02:00
Nick Wellnhofer
f9c33a5519 parser: Undeprecate some xmlParserInput members 2024-06-21 18:25:11 +02:00
Nick Wellnhofer
1228b4e0e7 parser: Deprecate xmlParserCtxt->lastError
We alredy have xmlCtxtGetLastError().
2024-06-21 18:22:04 +02:00
Nick Wellnhofer
f82ca02bf5 parser: Undeprecate some xmlParserCtxt members
These are essential for SAX parsers.
2024-06-21 18:17:11 +02:00
Nick Wellnhofer
7ba6c8feea autotools: Remove libxml-2.0-uninstalled.pc 2024-06-21 13:51:09 +02:00
Nick Wellnhofer
c106455c25 build: Set Cflags.private on Windows 2024-06-21 13:51:09 +02:00
Nick Wellnhofer
1a5ed74717 build: Fix XML_LIBDIR usage 2024-06-21 13:48:22 +02:00
Nick Wellnhofer
fc4bd04bdd autotools: Remove unused variable 2024-06-21 13:48:22 +02:00
Nick Wellnhofer
4c1b88513f autotools: Move MODULE_PLATFORM_LIBS into NON_PC_LIBS 2024-06-21 13:48:22 +02:00