Skip to content

Commit d4f02f5

Browse files
committed
release: 0.6.0
1 parent 92d4619 commit d4f02f5

4 files changed

Lines changed: 41 additions & 4 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
## [0.6.0] - 2026-11-20
9+
10+
This release contains a breaking change: `ParseOptions` gained a public
11+
field (`dtd_attributes`), so code that constructs `ParseOptions` with a
12+
struct literal must add `..ParseOptions::default()` or switch to the
13+
builder methods.
914

1015
### Security
1116

@@ -24,6 +29,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2429
schema/document pair that exceeds it is reported as invalid with a
2530
"work limit" error instead of running unbounded.
2631

32+
- **RelaxNG: self-referencing defines no longer overflow the stack**
33+
(#55). A `<define>` that referred back to itself without passing through
34+
an `<element>` (e.g. `<define name="a"><ref name="a"/></define>`) made
35+
validation recurse until the stack overflowed, aborting the process.
36+
Such grammars are now rejected as schema errors per RELAX NG §4.19, and
37+
ref chains and combined defines are depth-bounded.
38+
2739
### Added
2840

2941
- **RELAX NG Compact Syntax** (#57). New
@@ -65,6 +77,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6577
now found by their `id` (previously they were not indexed). Duplicate
6678
`id`s still resolve to the last element in document order.
6779

80+
- **Parser: slice input text instead of re-validating UTF-8** (#75, thanks
81+
@dkam). Names, attribute values, comments, CDATA, and PIs are sliced
82+
straight from the already-validated input; roughly 4–10% faster parsing
83+
on attribute- and namespace-heavy documents, with no behavior change.
84+
6885
### Fixed
6986

7087
- **RelaxNG: wrong verdicts from the old matcher.** The derivative-based
@@ -91,6 +108,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
91108
pattern chain that crashed the recursive validator; groups are now folded
92109
into a balanced tree like `choice` and `interleave`.
93110

111+
- **RelaxNG schema parsing** (#52–#56, thanks @casoon): `<define>`s and
112+
`<start>`s inside `<div>` are now collected; foreign-namespace annotation
113+
elements and attributes (e.g. `a:documentation`) are ignored; QNames in
114+
`name` attributes (e.g. `xml:lang`) are resolved against in-scope
115+
namespaces; same-named defines are merged per `combine="choice"` /
116+
`"interleave"` instead of the last one silently winning; and attribute
117+
patterns reached through a `<ref>` inside `<interleave>` now match.
118+
- **Attribute whitespace round-trip** (#50). Serializing an attribute that
119+
contained a literal tab/CR/LF alongside an entity reference wrote the
120+
whitespace back as a character reference, so re-parsing restored a
121+
character that normalization had turned into a space. A literal CRLF in
122+
an attribute value now normalizes to one space (not two), and DTD
123+
default attribute values are entity-expanded and whitespace-normalized.
124+
- **HTML parser** (refs #70): semicolon-less character references are only
125+
decoded for the HTML5 legacy names (and never in an attribute value when
126+
followed by `=`, so `href="?a=1&lang=de"` survives); bogus `<!…>`
127+
constructs are skipped; text in `<head>` implies `<body>`; and
128+
`<script>`/`<style>` after `</body>` are no longer moved into `<head>`.
129+
94130
## [0.5.1] - 2026-11-20
95131

96132
### Security

‎CLAUDE.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
**xmloxide** is a pure Rust reimplementation of libxml2 — the de facto standard XML/HTML parsing library in the open-source world. libxml2 became officially unmaintained in December 2025 with known security issues. xmloxide is a memory-safe, high-performance replacement that passes the same conformance test suites.
66

7-
**Version:** 0.5.1
7+
**Version:** 0.6.0
88
**License:** MIT
99
**MSRV:** Rust 1.81+
1010

@@ -96,6 +96,7 @@ src/
9696
│ ├── mod.rs # ValidationResult, ValidationError
9797
│ ├── dtd.rs # DTD parsing and validation (populates id_map)
9898
│ ├── relaxng.rs # RelaxNG schema parsing and validation
99+
│ ├── relaxng_compact.rs # RelaxNG compact syntax front end (→ XML syntax)
99100
│ ├── xsd.rs # XML Schema (XSD) parsing and validation
100101
│ └── schematron.rs # ISO Schematron (ISO/IEC 19757-3) rule-based validation
101102
├── serial/

‎Cargo.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "xmloxide"
3-
version = "0.5.1"
3+
version = "0.6.0"
44
edition = "2021"
55
rust-version = "1.81"
66
license = "MIT"

0 commit comments

Comments
 (0)