[feature] Add EXPath Binary Module 4.0 as built-in extension module#6258
Open
joewiz wants to merge 4 commits into
Open
[feature] Add EXPath Binary Module 4.0 as built-in extension module#6258joewiz wants to merge 4 commits into
joewiz wants to merge 4 commits into
Conversation
Port the EXPath Binary Module (http://expath.org/ns/binary) from a standalone XAR package (eXist-db/exist-binary) to a built-in extension module. This makes the module available out of the box without requiring XAR installation. The EXPath Binary Module implements the EXPath Binary Module 4.0 specification for binary data manipulation (hex/bin/octal conversion, packing/unpacking, bitwise operations, text encoding/decoding). Source: https://github.com/eXist-db/exist-binary Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The module was only registered in the distribution conf.xml but not in any test conf.xml files. The XQTS runner uses the test conf.xml, so all EXPath Binary tests fail with "unknown function" errors without this. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
reinhapa
approved these changes
Apr 25, 2026
reinhapa
requested changes
Apr 25, 2026
Member
reinhapa
left a comment
There was a problem hiding this comment.
Please address previous comments
- Remove labeled continue pattern in BinaryBasicFunctions (Codacy branching warning) - Convert switch statements to switch expressions in BinaryBitwiseFunctions and BinaryModuleHelper - Reduce NPath complexity in BinaryConversionFunctions.octalToBinary by extracting helpers - Reduce NPath complexity in BinaryTextFunctions.decodeString by extracting helpers Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
Author
|
[This response was co-authored with Claude Code. -Joe] Thanks @reinhapa — addressed in b47f051:
|
reinhapa
approved these changes
Apr 26, 2026
Adds bin:infer-encoding($data, $encoding?) which detects BOMs in binary data and returns a map with "encoding" (resolved encoding name) and "offset" (byte offset past any BOM). Handles UTF-8 BOM (EF BB BF), UTF-16 BE BOM (FE FF), and UTF-16 LE BOM (FF FE). For unambiguous encodings without BOM, returns the declared encoding with offset 0. Targets 33 XQTS tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
http://expath.org/ns/binary) from a standalone XAR package (eXist-db/exist-binary) to a built-in extension moduleWhat Changed
New module:
extensions/modules/expath-binary/eXist-db/exist-binary(40+ functions)exist-expath-binaryRegistration:
extensions/modules/pom.xml— addedexpath-binarymoduleexist-distribution/pom.xml— addedexist-expath-binaryruntime dependencyexist-distribution/src/main/config/conf.xml— registeredhttp://expath.org/ns/binaryXQTS Impact
The QT4 test suite contains 574 EXPath Binary tests across 27
bin-*test sets, plus 190 EXPath File tests in a companion PR (#6257) — 764 tests total that currently fail because these modules aren't available to the XQTS runner. Making them built-in extension modules resolves this. The standalone XAR achieved 96% compliance.Spec References
Test Plan
bin-*test sets (after merge to integration branch)🤖 Generated with Claude Code