Repository navigation
Conversation
Author
|
The Test workflow currently reports This follow-up was prepared with Codex. |
bardrop
reviewed
Nov 18, 2026
This branch has not been deployed
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.
Documents with XML declarations fail RELAX NG validation on
:xmldecl. The multiline example in #241 also emits whitespace before and after the root, which the validator incorrectly treats as element content.Handle the declaration and root-external XML whitespace in
RelaxNG#receive. Skip comments, processing instructions, and DTD declarations so markup before, inside, or after the root does not advance the schema. Use the existing attribute stack to identify element nesting, initialize it for validation without an initialreset, and retain its existing reset behavior. Whitespace inside elements still reaches schema validation, includingtextand exactvaluepatterns. The sharedValidatoris unchanged.Fixes #241.
Regressions preserve the issue's original schema and multiline document verbatim, and cover declaration variants, string and IO sources, leading/trailing whitespace with and without declarations, first use without reset, repeated resets, and resetting an unfinished document. They also check that incorrect roots/children, missing required children, mismatched text values, and non-XML whitespace outside the root are rejected.
Validation on macOS arm64 / Ruby 3.4.9:
3ed87beand pass on1a90d7c. The current targeted suite passes all 34 tests and 218 assertions.bundle exec rake test: 852 tests, 2744 assertions, no failures/errors, 5 omissions.bundle exec rake test RUBYOPT=--enable-frozen-string-literal: the same result.bundle exec rake warning:error clobber_rdoc rdocandgit diff --check: pass.The five omissions are the repository's Ruby < 4.0 Ractor exclusions. Bundler 2.6.9 required
BUNDLE_DISABLE_EXEC_LOAD=truefor this non-ASCII installation path. Other Ruby versions and the Linux/Windows/JRuby matrix have not been run locally.AI assistance: OpenAI Codex generated the implementation, tests and this description, and ran the listed checks. No human review is claimed.