1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00
Commit Graph

257 Commits

Author SHA1 Message Date
Michael Mann
cf4f967266 Add XML_PARSE_SKIP_IDS to replace XML_SKIP_IDS
Mark loadset member as deprecated

Fixes #873
2025-06-22 08:03:34 -04:00
Nick Wellnhofer
7bd8d1d9cc doc: Prefix autolinks with '#'
Use `#func` instead of `func()` to ignore parameters and make all
autolinks work.
2025-05-28 16:01:52 +02:00
Nick Wellnhofer
30cf6d0980 parser: Add XML_INPUT_USE_SYS_CATALOG
Also clean up catalog resolution and add error handling using the
global error.

Don't try to look up the resolved URI a second time.

Add some comments. Fix documentation.
2025-05-26 16:51:59 +02:00
Nick Wellnhofer
4dc44c83ab parser: Rework entity boundary check for element content
Only use depth of input stack. This makes the input ID unused
internally.
2025-05-25 14:26:30 +02:00
Nick Wellnhofer
c5b45fbc07 doc: Misc fixes 2025-05-16 19:04:20 +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
a40f36e7f2 include: Stop using *Ptr typedefs in public headers 2025-05-16 18:03:12 +02:00
Nick Wellnhofer
2d83a84ca6 doc: Misc improvements 2025-05-16 18:03:12 +02:00
Nick Wellnhofer
38ea8fa9de doc: Fix varargs 2025-05-06 19:51:38 +02:00
Nick Wellnhofer
9bbffec568 doc: Move brief to top, params to bottom of doc comments 2025-05-06 19:51:38 +02:00
Nick Wellnhofer
e6cfd04994 doc: Misc fixes to tree docs 2025-05-06 19:51:38 +02:00
Nick Wellnhofer
1bf44f09ba doc: Misc fixes to parser docs 2025-05-06 19:51:38 +02:00
Nick Wellnhofer
4a01087585 doc: Move parser option docs to enum 2025-05-06 19:51:38 +02:00
Nick Wellnhofer
f7c412874b doc: Remove more comment block headers 2025-05-02 17:41:26 +02:00
Nick Wellnhofer
1eca6e3476 parser: Deprecate xmlClearParserCtxt 2025-05-02 13:33:35 +02:00
Nick Wellnhofer
fd6ab89be3 doc: Adjust documentation of public structs 2025-05-01 23:23:42 +02:00
Nick Wellnhofer
8816f267be doc: Adjust documentation of enums 2025-05-01 23:23:42 +02:00
Nick Wellnhofer
e549622bc5 doc: Convert documentation to Doxygen
Automated conversion based on a few regexes.
2025-05-01 23:23:42 +02:00
Nick Wellnhofer
61890e399d doc: Prepare for conversion to Doxygen
Fix many params in internal functions (not really necessary but Doxygen
warns about that in XML mode).

Fix formatting in a few corner cases that automatic conversion can't
handle.

Rearrange some DOC_DISABLE blocks.
2025-05-01 23:23:42 +02:00
Nick Wellnhofer
fc8899d47c parser: Make xmlCtxtGetValidCtxt depend on VALID_ENABLED 2025-04-27 13:01:42 +02:00
Nick Wellnhofer
aa4ef7737b parser: Deprecate output-related globals 2025-04-17 21:14:00 +02:00
Nick Wellnhofer
b349225952 include: Change some return types from int to enum
This also affects some new functions from 2.13.
2025-03-14 02:31:01 +01:00
Nick Wellnhofer
fd1b939168 include: Convert some macros to enums 2025-03-14 00:35:40 +01:00
Nick Wellnhofer
03a8f1dd75 doc: Document SAX handlers a little more 2025-03-11 18:53:59 +01:00
Nick Wellnhofer
ba9148d8a5 parser: Undeprecate input->consumed
Should be deprecated after fixing #762.
2025-03-09 20:30:49 +01:00
Nick Wellnhofer
a0dbf030ee parser: Undeprecate ctxt->loadsubset
Should be deprecated after fixing #873.
2025-03-09 20:24:06 +01:00
Nick Wellnhofer
d96911f100 doc: Documentation fixes 2025-03-08 23:03:26 +01:00
Nick Wellnhofer
5f0b1378d7 parser: Add more parser context accessors
Fixes #763.
2025-03-08 22:36:06 +01:00
Nick Wellnhofer
696572248f globals: Remove unused globals
- xmlBufferAllocScheme
- xmlDefaultBufferSize
- xmlParserDebugEntities
2025-03-05 12:24:38 +01:00
Nick Wellnhofer
3d37ff84c3 globals: Also use global state struct if threads are disabled 2025-03-04 16:54:41 +01:00
Nick Wellnhofer
a15ad9b268 parser: Remove compatibility symbols 2025-03-04 16:54:41 +01:00
Nick Wellnhofer
8e871162a6 parser: Remove oldXMLWDcompatibility 2025-03-04 16:54:41 +01:00
Nick Wellnhofer
cdc5cfed0b legacy: Remove legacy symbols 2025-03-04 16:54:05 +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
93506d41cb parser: Make catalog PIs opt-in
This is an obscure feature that shouldn't be enabled by default.
2025-01-29 00:50:47 +01:00
Nick Wellnhofer
1082d813e8 parser: Prepare to make decompression opt-in
Add a new parser option XML_PARSE_UNZIP that enables decompression.
xmlReadFile, xmlCtxtReadFile and xmlCreateURLParserCtxt always set
this option currently, but downstream users should start to set the
option if they really need it.
2025-01-29 00:49:57 +01:00
Nick Wellnhofer
0dc26910c1 parser: Deprecate more internal functions 2024-11-21 22:31:20 +01:00
Nick Wellnhofer
5a51f08517 valid: Implement xmlCtxtValidateDocument
This allows to use the error handler or resource loader of a parser
context.
2024-11-19 00:03:37 +01:00
Nick Wellnhofer
7f8c436c75 parser: Implement xmlCtxtParseDtd and xmlCtxtValidateDtd
This allows to use the context's error handler, options and other
settings.

Fixes #808.
2024-11-15 16:30:52 +01: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
8af55c8d20 parser: Rename new input API functions
These weren't made public yet.
2024-07-11 01:33:29 +02:00
Nick Wellnhofer
4f329dc524 parser: Implement xmlCtxtParseContent
This implements xmlCtxtParseContent, a better alternative to
xmlParseInNodeContext or xmlParseBalancedChunkMemory. It accepts a
parser context and a parser input, making it a lot more versatile.

xmlParseInNodeContext is now implemented in terms of
xmlCtxtParseContent. This makes sure that xmlParseInNodeContext never
modifies the target document, improving thread safety.
xmlParseInNodeContext is also more lenient now with regard to undeclared
entities.

Fixes #727.
2024-07-11 01:26:32 +02:00
Nick Wellnhofer
82e0455cf6 Undeprecate some symbols for now
- xmlKeepBlanksDefault is needed as a work-around for
  xmlParseBalancedChunk, see issue #727.
- ctxt->options already has an accessor and will be deprecated
  later.
- input->cur, input->base, input->end: See #762.
2024-07-06 20:19:51 +02:00
Nick Wellnhofer
205e56dafe parser: Undeprecate ctxt->directory 2024-07-02 22:32:43 +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
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
044ddf07b9 parser: Undeprecate some parser context members 2024-06-29 01:22:15 +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