leptris 1.9.186.0 → 1.9.188.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +39 -0
- data/Rakefile +1 -1
- data/lib/leptris/vendor/aarch64-linux/libleptris.so +0 -0
- data/lib/leptris/vendor/aarch64-linux-musl/libleptris.so +0 -0
- data/lib/leptris/vendor/arm64-darwin/libleptris.dylib +0 -0
- data/lib/leptris/vendor/x86_64-darwin/libleptris.dylib +0 -0
- data/lib/leptris/vendor/x86_64-linux/libleptris.so +0 -0
- data/lib/leptris/vendor/x86_64-linux-musl/libleptris.so +0 -0
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/relaxng.rb +32 -11
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cf80ccf870ddf66abc6a3a4fa99727a9f15d8da89649f337c34d7d24349eb94f
|
|
4
|
+
data.tar.gz: 95bc3a48e901eda33ba20492d98007da08746dbbef90a391fe518ec37db2942b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa413d38c0dc9571c72564d8df2277ddc4c47b0b9a3e38c00824c54b50042042f2594c2acddc94800ba7cd5b455b9b72296b69abe61c0e99711f860de4bd1a71
|
|
7
|
+
data.tar.gz: '089846a5778f5e3fe3bdf8daa0460f09e81cd4d31250860cf12129de8918caefddc219eb11e445898ca183c94490fed804ed3a89b0bea4fb5c94af6a55eaf8e4'
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,45 @@ All notable changes to Leptris will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.9.188.0] - 2026-09-17
|
|
9
|
+
|
|
10
|
+
### Changed — libleptris 1.9.186 → 1.9.188 (lockstep)
|
|
11
|
+
|
|
12
|
+
- **RELAX NG: foreign-namespace annotation elements are skipped**
|
|
13
|
+
in patterns (1.9.187) — `a:documentation` and friends no longer
|
|
14
|
+
abort schema compilation (the metanorma isodoc-compile.rng
|
|
15
|
+
family). Spec-pinned.
|
|
16
|
+
- **RELAX NG: `externalRef`** (1.9.188) — the referenced grammar's
|
|
17
|
+
`<start>` splices in as the pattern body, defines merge so refs
|
|
18
|
+
inside the external grammar resolve; depth-guarded, href-relative
|
|
19
|
+
via `parse_file`. Spec-pinned.
|
|
20
|
+
- **RELAX NG: `anyName` name class** (RELAX NG 4.14, 1.9.188) for
|
|
21
|
+
elements and attributes — the biblio.rng recursive AnyElement
|
|
22
|
+
shape. Spec-pinned. Known engine laxness (bare text under the
|
|
23
|
+
wildcard validates; Jing rejects) filed upstream as
|
|
24
|
+
leptris/leptris#1153 — deliberately not pinned here.
|
|
25
|
+
- **`leptris_rng_parse_file` publishes schema-parse detail** to
|
|
26
|
+
`leptris_last_error` (1.9.188) — `Schema.parse_file` failures
|
|
27
|
+
now raise with the engine's reason instead of an empty channel.
|
|
28
|
+
Spec-pinned.
|
|
29
|
+
- **HTML: after-body insertion-mode restore** (1.9.187, #659) —
|
|
30
|
+
non-whitespace text after `</body>` switches back to in-body;
|
|
31
|
+
text and later comments flow into the still-open body.
|
|
32
|
+
Spec-pinned.
|
|
33
|
+
- No public-symbol changes: audit 322/322.
|
|
34
|
+
|
|
35
|
+
## [1.9.186.1] - 2026-09-17
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- `RelaxNG::Schema#validate_errors(document)` — structured
|
|
40
|
+
`[{ line:, column:, message: }]` rows (Jing's exact attribution,
|
|
41
|
+
upstream #878 accumulation), for callers that need the fields
|
|
42
|
+
for log formatting instead of re-parsing the Jing-form strings
|
|
43
|
+
from `#validate`. `#validate` now renders its strings from the
|
|
44
|
+
same rows (one enumeration of the error surface; identical
|
|
45
|
+
output, including the back-compat zero-count fallback).
|
|
46
|
+
|
|
8
47
|
## [1.9.186.0] - 2026-09-17
|
|
9
48
|
|
|
10
49
|
### Changed — libleptris 1.9.181 → 1.9.186 (lockstep)
|
data/Rakefile
CHANGED
|
@@ -8,7 +8,7 @@ RSpec::Core::RakeTask.new(:spec)
|
|
|
8
8
|
# Pin for `rake compile` and the platform-gem builds. Keep in lockstep
|
|
9
9
|
# with .github/workflows/build.yml (which calls `rake compile`) and the
|
|
10
10
|
# CHANGELOG when libleptris releases.
|
|
11
|
-
LIBLEPTRIS_VERSION = "1.9.
|
|
11
|
+
LIBLEPTRIS_VERSION = "1.9.188"
|
|
12
12
|
# Vendored alongside libleptris for fn:normalize-unicode (TODO
|
|
13
13
|
# .restructure/20): built per platform with a RELOCATABLE @rpath
|
|
14
14
|
# install name, loaded by ffi.rb before libleptris so the
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/leptris/version.rb
CHANGED
data/lib/leptris/xml/relaxng.rb
CHANGED
|
@@ -22,6 +22,7 @@ module Leptris::XML::RelaxNG
|
|
|
22
22
|
# rng = Leptris::XML::RelaxNG.parse(schema_xml)
|
|
23
23
|
# rng.valid?(doc) # => true/false
|
|
24
24
|
# rng.validate(doc) # => [] or ["1:0: error: element ..."]
|
|
25
|
+
# rng.validate_errors(doc) # => [] or [{line:, column:, message:}]
|
|
25
26
|
#
|
|
26
27
|
class Schema
|
|
27
28
|
# GC-managed compiled handle.
|
|
@@ -63,25 +64,45 @@ module Leptris::XML::RelaxNG
|
|
|
63
64
|
# libleptris 1.9.179 (#878): errors accumulate — every failure
|
|
64
65
|
# from the validate call is returned, not just the first.
|
|
65
66
|
def validate(document)
|
|
67
|
+
structured = validate_errors(document)
|
|
68
|
+
unless structured.empty?
|
|
69
|
+
return structured.map do |e|
|
|
70
|
+
e[:line] > 0 ? "#{e[:line]}:#{e[:column]}: error: #{e[:message]}"
|
|
71
|
+
: e[:message]
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
# Invalid verdict with nothing accumulated: the back-compat
|
|
75
|
+
# single-error accessor is the last resort (nil-safe).
|
|
76
|
+
return [] if valid?(document)
|
|
77
|
+
[Leptris::XML::FFI.leptris_rng_error(@handle)].compact
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def valid?(document)
|
|
81
|
+
Leptris::XML::FFI.leptris_rng_validate(@handle,
|
|
82
|
+
document.c_ptr) != 0
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Structured errors: [{ line:, column:, message: }] — the fields
|
|
86
|
+
# callers need for log formatting, instead of re-parsing the
|
|
87
|
+
# Jing-form strings from #validate. Empty when valid. Message,
|
|
88
|
+
# line, and column carry Jing's exact attribution (libleptris
|
|
89
|
+
# >= 1.9.179, upstream #878). This is the single enumeration of
|
|
90
|
+
# the error-accumulation surface; #validate renders these rows.
|
|
91
|
+
def validate_errors(document)
|
|
66
92
|
ok = Leptris::XML::FFI.leptris_rng_validate(@handle,
|
|
67
93
|
document.c_ptr)
|
|
68
94
|
return [] if ok != 0
|
|
69
95
|
count = Leptris::XML::FFI.leptris_rng_error_count(@handle)
|
|
70
|
-
return [
|
|
71
|
-
# Jing's rendering for every accumulated error, matching the
|
|
72
|
-
# single-error accessor's format ("line:col: error: msg").
|
|
96
|
+
return [] if count.zero?
|
|
73
97
|
Array.new(count) do |i|
|
|
74
98
|
msg = Leptris::XML::FFI.leptris_rng_error_message(@handle, i)
|
|
75
99
|
next nil if msg.nil?
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
100
|
+
{
|
|
101
|
+
line: Leptris::XML::FFI.leptris_rng_error_line(@handle, i),
|
|
102
|
+
column: Leptris::XML::FFI.leptris_rng_error_column(@handle, i),
|
|
103
|
+
message: msg,
|
|
104
|
+
}
|
|
79
105
|
end.compact
|
|
80
106
|
end
|
|
81
|
-
|
|
82
|
-
def valid?(document)
|
|
83
|
-
Leptris::XML::FFI.leptris_rng_validate(@handle,
|
|
84
|
-
document.c_ptr) != 0
|
|
85
|
-
end
|
|
86
107
|
end
|
|
87
108
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: leptris
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.9.
|
|
4
|
+
version: 1.9.188.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|