Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
304 changes: 304 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,309 @@
# News

## 3.4.5 - 2026-12-04 {#version-3-4-5}

### Incompatible changes

* Dropped support for Ruby 2.5 (Ruby 2.6 or later is now required)
* GH-271
* GH-347
* Patch by NAITOH Jun
* Reported by pboling

* Removed unused `REXML::QuickPath` (`rexml/quickpath`)
* GH-250
* GH-362
* Patch by Sutou Kouhei
* Reported by NAITOH Jun

* Changed `REXML::Functions` to a `REXML::FunctionsClass` instance for thread safety and removed unused `REXML::Functions.text`, `.processing_instruction`, `.variables`, and `.namespace_context`
* GH-327
* GH-329
* GH-368
* Patch by tomoya ishida

* Switched available XPath function checks from a denylist to an allowlist
* Monkey-patching custom XPath functions onto `REXML::Functions` is no longer supported
* GH-369
* Patch by tomoya ishida, Sutou Kouhei

* Stopped falling back to `XPath.match` for unregistered XPath functions in `FunctionsClass#send` (now returns `[]`)
* GH-364
* Patch by tomoya ishida

* Changed XPath to always return node-sets in document order
* Changes the returned order of `XPath.match` / `XPath.first` for reverse axes such as `ancestor::` and `preceding::` to match the XPath 1.0 specification
* GH-319
* GH-320
* GH-356
* Patch by tomoya ishida, NAITOH Jun
* Reported by tomoya ishida

* Stopped matching prefixed attributes by their local name only
* `Attributes#[]`, `#get_attribute`, and `Element#attribute` no longer return `x:b` for `"b"`; use the qualified name (`"x:b"`) or a namespace
* `Attributes#keys` now returns qualified names (e.g. `"xmlns:x"`, `"x:b"`)
* GH-335
* Patch by tomoya ishida

* Validated XPath variable values and fixed `id()` return value
* Unsupported variable value types now raise `TypeError`, predicates on non-nodeset variables return `[]`, and unimplemented `id()` returns `[]` instead of `nil`
* GH-15
* GH-342
* Patch by tomoya ishida
* Reported by Sutou Kouhei

* Removed non-working XPath `namespace::` axis handling
* Emits a warning and returns `[]` instead of raising `NoMethodError`
* GH-323
* Patch by tomoya ishida

* Changed XPath `mod` operator to use truncating remainder (`Numeric#remainder`) and return `NaN` for `mod 0`
* Matches XPath 1.0 for negative operands and no longer raises `ZeroDivisionError` for a zero divisor
* GH-385
* GH-386
* Patch by Sourya Singh
* Reported by bardrop

* Returned `Infinity` / `NaN` from XPath `string()`, `floor()`, and `ceiling()` instead of raising `FloatDomainError`
* GH-374
* Patch by KBS

### Improvements

* Improved performance
* GH-299
* GH-300
* GH-303
* GH-310
* GH-311
* GH-313
* GH-315
* GH-325
* GH-330
* GH-333
* GH-339
* GH-341
* GH-359
* GH-391
* Patch by NAITOH Jun, tomoya ishida, Gal Be

* Made REXML Ractor-compatible
* GH-344
* Patch by John Hawthorn

* Deprecated unused `REXML::Text.read_with_substitution` (use `REXML::Text.unnormalize` instead)
* GH-363
* Patch by Sutou Kouhei

* Supported parenthesized XPath expressions and `abbreviate` of parentheses
* GH-316
* GH-317
* GH-322
* GH-328
* Patch by tomoya ishida
* Reported by tomoya ishida

* Supported `string-length()` XPath function without an argument
* GH-337
* Patch by Sai Asish Y

* Accepted processing instructions in the internal DTD subset
* GH-377
* Patch by Wleeaf

* Accepted non-ASCII names, combining characters, and extenders in DOCTYPE, processing instructions, DTD declarations, elements, and attributes
* GH-378
* GH-379
* Patch by Wleeaf

* Accepted any XML whitespace around XPath operators `and`, `or`, `div`, and `mod`
* GH-399
* Patch by Moksh Upadhyay

* Rejected underscored XPath function names (e.g. `local_name()`) in strict mode (default mode keeps the alias for backward compatibility)
* GH-352
* GH-366
* Patch by JinHyuk Sung
* Reported by tomoya ishida

* Improved documentation
* GH-151
* GH-307
* GH-308
* GH-348
* GH-360
* GH-367
* Patch by Burdette Lamar, NAITOH Jun
* Reported by Hiroya Fujinami

### Fixes

* Fixed an issue when executing `REXML::Parsers::SAX2Parser#parse` without specifying `#listen`
* GH-302
* Patch by NAITOH Jun

* Fixed infinite entity expansion by detecting circular references
* Circular entity references now raise `REXML::ParseException` instead of `SystemStackError`
* GH-312
* Patch by NAITOH Jun

* Fixed parsing XPath expressions with string literals containing parentheses and brackets
* GH-318
* Patch by tomoya ishida

* Fixed XPath `normalize-space()` function
* GH-324
* Patch by tomoya ishida

* Fixed XPath functions not to return a primitive value wrapped in an array
* GH-326
* Patch by tomoya ishida

* Fixed XPath `self` axis nodeset position
* GH-336
* Patch by tomoya ishida

* Fixed `XMLDecl` being included in XPath `descendant::node()` results
* GH-331
* GH-341
* Patch by tomoya ishida
* Reported by tomoya ishida

* Fixed XPath name functions (`name()`, `local-name()`, `namespace-uri()`)
* Uses the first node in document order without skipping unnamed nodes (e.g. `name(root/node())` returns `""` instead of `"node"` when a text node comes first)
* GH-343
* Patch by tomoya ishida, NAITOH Jun

* Fixed `substring-after()` XPath function not to use Regexp match
* GH-355
* Patch by Vít Ondruch

* Fixed `REXML::Element#attribute` when a namespace URI has multiple bindings
* GH-346
* GH-357
* Patch by JinHyuk Sung
* Reported by tomoya ishida

* Avoided stack exhaustion in `REXML::Formatters::Default#write_element` for deeply nested documents
* GH-354
* GH-358
* Patch by NAITOH Jun
* Reported by Brian

* Explicitly required `"set"` in `xpath_parser.rb`
* GH-361
* Patch by tomoya ishida

* Stopped substituting entities with an empty value
* Entities declared with an empty value are no longer inserted between every character during text/attribute normalization
* GH-370
* Patch by NAITOH Jun

* Fixed `REXML::Formatters::Pretty` mutating text nodes while pretty printing
* GH-371
* Patch by KBS

* Rejected invalid character references in entity expansion
* Invalid XML character references inside entity values now raise `REXML::ParseException`
* GH-372
* Patch by Sutou Kouhei

* Fixed XPath `lang()` not to match a language prefix that is not a sublanguage
* GH-373
* Patch by KBS

* Fixed RELAX NG validation of documents with XML declarations
* GH-241
* GH-380
* Patch by FFspiky
* Reported by gemmaro

* Fixed XPath `substring()` with a start before the first character and `round()` for negative halves
* e.g. `substring('12345', 0)` now returns `"12345"` instead of `"1234"`, and `round(-2.5)` returns `-2` instead of `-3`
* GH-382
* Patch by bardrop

* Fixed XPath comparisons between a node-set and a boolean, number, or string
* Fixes reversed relational operators when the node-set is on the right (e.g. `10 > @price`), boolean comparisons, and string comparisons
* GH-383
* Patch by bardrop

* Preserved whitespace before word operators after XPath predicates
* GH-384
* GH-387
* Patch by FFspiky
* Reported by bardrop

* Fixed XPath unary minus parsing with leading or separating spaces
* Unary minus without an operand (e.g. `"-"`, `" - - "`) now raises `REXML::ParseException`
* GH-393
* Patch by NAITOH Jun

* Renamed the XPath test fixture `xp.tst` to `xp.txt`
* GH-394
* Patch by botamochi0x12

* Formatted small floats without scientific notation in XPath `string()`
* e.g. `string(0.00001)` now returns `"0.00001"` instead of `"1.0e-05"`
* GH-395
* Patch by Moksh Upadhyay

* Fixed XPath parsing of expressions and literals containing line breaks
* GH-397
* Patch by Moksh Upadhyay

* Fixed XPath matching for the predefined `xml` namespace and empty strings
* GH-396
* GH-398
* Patch by Akshay Kumar Sharma
* Reported by Dickson Wu

### Thanks

* NAITOH Jun

* Sutou Kouhei

* tomoya ishida

* Burdette Lamar

* John Hawthorn

* Sai Asish Y

* Vít Ondruch

* JinHyuk Sung

* KBS

* Wleeaf

* FFspiky

* Sourya Singh

* Gal Be

* bardrop

* Moksh Upadhyay

* Akshay Kumar Sharma

* botamochi0x12

* Hiroya Fujinami

* Brian

* pboling

* gemmaro

* Dickson Wu

## 3.4.4 - 2025-09-10 {#version-3-4-4}

### Improvement
Expand Down
Loading