Nick Wellnhofer
fdfeecfe5e
parser: Reenable ctxt->directory
...
Unused internally, but used in downstream code.
Should fix #753 .
2024-07-02 22:06:53 +02:00
Nick Wellnhofer
606f410891
parser: Allow to disable catalogs with parser options
...
Implement XML_PARSE_NO_SYS_CATALOG and XML_PARSE_NO_CATALOG_PI.
Fixes #735 .
2024-07-02 22:06:53 +02:00
Nick Wellnhofer
197e09d5c5
parser: Fix xmlLoadResource
...
Short-lived regression.
2024-07-02 20:03:23 +02:00
Nick Wellnhofer
ede5d99af3
parser: Fix typo
2024-07-02 16:38:15 +02:00
Nick Wellnhofer
30ef77554b
parser: Don't use deprecated xmlCopyChar
2024-07-02 13:34:11 +02:00
Nick Wellnhofer
751ba00e00
parser: Don't use deprecated xmlSwitchInputEncoding
2024-07-02 13:34:04 +02:00
Nick Wellnhofer
9a4770ef84
doc: Improve documentation
2024-07-02 13:34:04 +02:00
Nick Wellnhofer
0b0dd98983
parser: Fix EBCDIC detection
2024-07-01 18:05:40 +02:00
Nick Wellnhofer
221df37529
parser: Support custom charset conversion implementations
...
Implement xmlCtxtSetCharEncConvImpl. I agree that the name is terrible.
2024-07-01 18:05:40 +02:00
Nick Wellnhofer
e72eda101e
parser: Add NULL check in xmlNewIOInputStream
2024-06-29 01:22:02 +02:00
Nick Wellnhofer
bc793390d5
parser: Update documentation
2024-06-27 16:23:14 +02:00
Nick Wellnhofer
193f4653a5
parser: Implement xmlCtxtGetStatus
...
This allows access to ctxt->wellFormed, ctxt->nsWellFormed and
ctxt->valid. It also detects several fatal non-parser errors which
really should be another error level.
2024-06-27 15:17:40 +02:00
Nick Wellnhofer
cc0cc2d3b7
parser: Add more parser context accessors
2024-06-27 14:45:33 +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
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
Rosen Penev
217e9b7af2
clang-tidy: don't return in void functions
...
Found with readability-redundant-control-flow
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2024-06-20 20:37:34 +00:00
Nick Wellnhofer
c5e9a5b2c9
parser: Use catalogs with resource loader
2024-06-17 15:49:25 +02:00
Nick Wellnhofer
6deebe036a
parser: Make xmlInputCreateUrl handle HTTP input
2024-06-17 15:47:43 +02:00
Nick Wellnhofer
d2fd9d37b0
parser: Fix swapped arguments
2024-06-17 15:47:43 +02:00
Nick Wellnhofer
2608baaf92
parser: Make failure to load main document a warning
...
Revert the change that made failures to load the main document an error.
This fixes the --path option of xmllint and xsltproc.
Should fix #733 .
2024-06-14 20:06:07 +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
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
410931e385
parser: Only set input ID for PE refs
...
Other input streams don't require IDs.
2024-06-12 16:22:52 +02:00
Nick Wellnhofer
a3b2baeb67
parser: Simplify xmlNewInputFromFile
2024-06-12 16:22:52 +02:00
Nick Wellnhofer
0b58838764
parser: Rework XML_PARSE_NONET handling
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
Nick Wellnhofer
47cbb6bb3c
doc: Don't mention xmlNewInputURL
2024-06-12 16:04:45 +02:00
Nick Wellnhofer
4467b89143
Add missing argument checks for new API functions
2024-06-12 13:57:20 +02:00
Nick Wellnhofer
e75e878e02
doc: Update and fix documentation
2024-05-20 14:23:39 +02:00
Nick Wellnhofer
ec2f68f164
parser: Report malloc failure in xmlNewInputFromFile
2024-05-14 16:04:56 +02:00
Nick Wellnhofer
4ff2dccf9f
SAX2: Warn if URI resolution failed
2024-05-13 12:50:08 +02:00
Nick Wellnhofer
84a71860a8
xmlreader: Fix xmlTextReaderConstEncoding
...
Regression from commit f1c1f5c6 .
Fixes #697 .
2024-02-26 15:33:06 +01:00
Nick Wellnhofer
c444c96e20
parser: Report OOM errors even after parser was stopped
2024-02-13 12:23:54 +01:00
Nick Wellnhofer
63986c45b9
parser: Report fatal error if document entity couldn't be loaded
...
Only lower error level when loading entities.
Fixes #667 .
2024-01-22 21:07:41 +01:00
Nick Wellnhofer
12f0bb9478
parser: Synchronize more options
2024-01-05 20:39:40 +01:00
Nick Wellnhofer
3efbe916a1
parser: Mark 'token' member as unused in xmlParserCtxt
2024-01-05 20:39:40 +01:00
Nick Wellnhofer
b82fd81d06
parser: Rework xmlCtxtParseDocument
...
Make xmlCtxtParseDocument take a parser input which can be popped after
parsing.
2024-01-05 20:39:40 +01:00
Nick Wellnhofer
d0eb5a7e54
parser: Remove xmlErrEncodingInt
...
Convert the last user to xmlFatalErr.
2024-01-04 15:28:57 +01:00
Nick Wellnhofer
f30b9b2331
fuzz: Add assertion in xmlCopyCharMultibyte
...
This is an internal function that should never receive out-of-range
codepoints.
2024-01-04 15:28:57 +01:00
Nick Wellnhofer
0821efc8ee
encoding: Check whether encoding handlers support input/output
...
The "HTML" encoding handler doesn't support input which could lead to a
wrong error report.
2024-01-02 19:48:23 +01:00
Nick Wellnhofer
85f99023ae
parser: Fix buffer size checks
...
Don't test size of remaining data. This causes false positives with
memory buffers.
Also impose XML_MAX_HUGE_LENGTH limit when parsing with XML_PARSE_HUGE.
2024-01-02 19:48:23 +01:00
Nick Wellnhofer
16b0dbc1b3
parser: Fix XML_ERR_UNSUPPORTED_ENCODING errors
...
Commit 45157261 added the check in the wrong place.
Also allow unsupported encoding in xmlNewInputInternal.
Fixes #654 .
2024-01-02 14:17:27 +01:00