Nick Wellnhofer
fca0860d6c
tree: Deprecate public struct members related to DTDs
...
Let's deprecate these members for now. If these are really used, they
can be undeprecated later.
2025-05-25 14:26:30 +02:00
Dag-Erling Smørgrav
3ab040c203
Fix unidiomatic use of vsnprintf().
...
* Don't terminate an already-terminated buffer.
* Consistently use 1024-byte buffers.
* While here, consistently use ap for a va_list.
2025-05-24 01:28:49 +02:00
Dag-Erling Smørgrav
8ea253b895
Remove bogus casts.
...
* Casting a string literal to `char *` and then immediately passing or
assigning the result to a `const char *` makes no sense.
* There is no need to cast `int` to `Py_ssize_t` as they have the same
sign and the latter is at least as wide as the former.
2025-05-24 01:28:21 +02:00
Nick Wellnhofer
210f5a3746
chvalid: Mark functions as deprecated
2025-05-16 23:27:51 +02:00
Nick Wellnhofer
6f4b452742
parser: Stop using ctxt->linenumbers
...
I think this was used to avoid setting the `line` member before it was
added (20+ years ago).
2025-05-16 18:03:12 +02:00
Nick Wellnhofer
d834437b59
python: Add deprecation warning
2025-05-16 18:03:12 +02:00
Nick Wellnhofer
258d870629
codegen: Consolidate tools for code generation
...
Move tools, source files and output tables into codegen directory.
Rename some files.
Adjust tools to match modified files. Remove generation date and source
files from output.
Distribute all tools and sources.
2025-05-16 18:03:12 +02:00
Nick Wellnhofer
a40f36e7f2
include: Stop using *Ptr typedefs in public headers
2025-05-16 18:03:12 +02:00
Nick Wellnhofer
46f05ea4d5
html: Rework meta charset handling
...
Don't use encoding from meta tags when serializing. Only use the value
in `doc->encoding`, matching the XML serializer. This is the actual
encoding used when parsing.
Stop modifying the input document by setting meta tags before
serializing. Meta tags are now injected during serialization.
Add full support for <meta charset=""> which is also used when adding
meta tags.
Align with HTML5 and implement the "algorithm for extracting a character
encoding from a meta element". Only modify the encoding substring in
Content-Type meta tags.
Only switch encoding once when parsing.
Fix htmlSaveFileFormat with a NULL encoding not to declare a misleading
UTF-8 charset.
Fixes #909 .
2025-05-11 20:29:25 +02:00
Pavel Kopylov
4ed7157406
python: fix use-after-free in functions xmlPythonFileReadRaw(), xmlPythonFileRead()
...
with python2.
Fixes #910 .
2025-05-09 11:58:01 +02:00
Nick Wellnhofer
a449c5fde3
catalog: Deprecate some functions
2025-05-06 19:51:38 +02:00
Nick Wellnhofer
05d0f59221
python: Skip __xml thread-local accessors
...
So we can remove conditional directives for Doxygen.
2025-05-06 19:51:26 +02:00
Nick Wellnhofer
18c446a5d7
python: Remove libxml2-python-api.xml
...
Should have been removed with commit ed850ec1 .
2025-05-02 14:41:29 +02:00
Nick Wellnhofer
1eca6e3476
parser: Deprecate xmlClearParserCtxt
2025-05-02 13:33:35 +02:00
Nick Wellnhofer
321aa35638
python: Make generator.py use Doxygen XML
2025-05-02 13:33:34 +02:00
Nick Wellnhofer
ed850ec1e6
python: Merge libxml2-python-api.xml into generator.py
2025-05-02 13:33:34 +02:00
Nick Wellnhofer
9419f6de61
meson: Install libxml2.py
...
Apparently, nobody has ever tried to use the Python bindings built with
Meson.
2025-04-29 18:03:05 +02:00
Nick Wellnhofer
6896f478d4
Revert "valid: Remove duplicate error messages when streaming"
...
This reverts commit cd220b93d8 .
This commit broke the xmstarlet tests.
2025-04-18 17:24:45 +02:00
Maks Verver
4d24aa22ac
python: Add a test to reproduce bug #889
2025-04-13 13:50:19 +02:00
Maks Verver
8d415b8911
[CVE-2025-32414] python: Read at most len/4 characters.
...
Fixes #889 by reserving space in the buffer for UTF-8 encoding of text.
2025-04-13 13:49:46 +02:00
Dan Yeaw
38cc2b53ed
python: Stop generating libxml2class.txt
2025-04-12 17:08:54 +02:00
Dan Yeaw
e26478545f
python: Fix file variable not defined during exception
2025-04-12 17:08:54 +02:00
Dan Yeaw
ffef921be3
python: Concat generated files in generator.py
2025-04-12 17:08:54 +02:00
Nick Wellnhofer
97ffa77d6d
encoding: Deprecate non-thread-safe functions
2025-04-10 17:36:58 +02:00
Nick Wellnhofer
2ecc08f6dc
html: Deprecate more functions
2025-04-10 16:36:03 +02:00
Nick Wellnhofer
4135ceea75
meson: Run Python tests
2025-03-14 03:27:31 +01:00
Nick Wellnhofer
696572248f
globals: Remove unused globals
...
- xmlBufferAllocScheme
- xmlDefaultBufferSize
- xmlParserDebugEntities
2025-03-05 12:24:38 +01:00
Nick Wellnhofer
92d7b0cd90
xpath: Rename valuePush and valuePop
2025-03-05 12:24:38 +01:00
Nick Wellnhofer
03be993ce5
Use memcpy to avoid pointer cast warnings
2025-03-05 12:24:38 +01:00
Nick Wellnhofer
85bd58ef56
globals: Remove functions related to global state handling
...
- xmlGetGlobalState
- xmlInitializeGlobalState
- xmlGetThreadId
- xmlIsMainThread
2025-03-04 17:38:10 +01:00
Nick Wellnhofer
03a8d5f93d
unicode: Make Unicode functions private
2025-03-04 17:31:11 +01:00
Nick Wellnhofer
361f7bff92
parser: Make nodePush, nodePop, namePush, namePop private
2025-03-04 16:47:14 +01:00
Nick Wellnhofer
e50d314a27
build: Add separate configuration option for RELAX NG
...
Support for RELAX NG used to be enabled together with XML Schema support
(--with-schemas). Now there's a separate option and a new feature macro
LIBXML_RELAXNG_ENABLED.
2025-03-01 15:18:20 +01:00
Nick Wellnhofer
6fc260760a
regexp: Hide debugging code behind DEBUG_REGEXP
...
xmlRegexpPrint is now a deprecated no-op.
2025-02-22 20:55:06 +01:00
Jan Alexander Steffens (heftig)
064a02114a
meson: Fix Python module build
2025-02-20 13:53:25 +01:00
Jan Alexander Steffens (heftig)
c2e2d76211
python: Pass destination dir to generator.py
...
Simplify usage across build systems.
2025-02-20 13:53:25 +01:00
Nick Wellnhofer
cd220b93d8
valid: Remove duplicate error messages when streaming
2024-12-28 11:55:24 +01:00
Nick Wellnhofer
7ca75b321f
python: Declare init func with PyMODINIT_FUNC
2024-12-07 15:12:15 +01:00
Nick Wellnhofer
0dc26910c1
parser: Deprecate more internal functions
2024-11-21 22:31:20 +01:00
Nick Wellnhofer
e2ad249c23
parser: Deprecate more internal symbols
...
- xmlParseExternalSubset
- xmlPushInput
- xmlPopInput
- xmlCopyCharMultiByte
- xmlCreateEntityParserCtxt
- xmlStringComment
2024-11-19 00:25:23 +01:00
Yegor Yefremov
513949293d
python/tests: fix typos
...
Typos were found with codespell.
2024-10-15 11:11:38 +02:00
Satadru Pramanik
c7b2786676
Avoid Python 'licence' distribution option is deprecated; use 'license' error
2024-10-12 11:55:50 +00:00
Nick Wellnhofer
c34d0ae9cc
html: Deprecate htmlIsBooleanAttr
2024-10-06 20:04:00 +02:00
Nick Wellnhofer
6040785ac4
html: Deprecate AutoClose API
2024-10-06 20:04:00 +02:00
Nick Wellnhofer
e179f3ec0e
html: Stop reporting syntax errors
...
It doesn't make much sense to keep the old syntax error handling which
doesn't conform to HTML5.
Handling HTML5 parser errors is rather involved and not essential for
parsers.
2024-10-06 20:04:00 +02:00
Nick Wellnhofer
c46b89e243
xpath: Deprecate xmlXPathEvalExpr
...
Also check the argument instead of crashing if there's no context.
2024-09-13 21:06:36 +02:00
Nick Wellnhofer
40abebbc73
python: Fix SAX driver with character streams
...
This apparently broke with Python 3.5 which introduced character
streams.
Fixes #790 .
2024-08-29 01:31:26 +02:00
Nick Wellnhofer
eb66d03ef7
io: Deprecate a few functions
2024-07-16 17:42:10 +02:00
Nick Wellnhofer
69f12d6d47
encoding: Deprecate xmlByteConsumed
...
This was only used by Chromium/WebKit to detect whether xmlParseContent
really succeeded. It's a horrible, overcomplicated hack.
See 8c5848bd and #767 .
2024-07-13 15:42:02 +02:00
Nick Wellnhofer
ec0881099b
parser: Upgrade XML_IO_NETWORK_ATTEMPT to error
...
Fixes XML::LibXML test suite.
2024-07-04 15:47:20 +02:00