Skip to content

Drop saxmerl; parse CLDR XML with sweet_xml#3

Merged
derrickreimer merged 5 commits into
mainfrom
chore/drop-saxmerl-use-sweet_xml
Jun 23, 2026
Merged

Drop saxmerl; parse CLDR XML with sweet_xml#3
derrickreimer merged 5 commits into
mainfrom
chore/drop-saxmerl-use-sweet_xml

Conversation

@derrickreimer

Copy link
Copy Markdown
Member

Why

saxmerl (unmaintained since 2021) fails to compile on Erlang/OTP 27+. Its application/0 omits :xmerl, so Record.extract(from_lib: "xmerl/include/xmerl.hrl") can no longer resolve the header now that xmerl isn't implicitly on the compile-time code path. This blocks zonex (and any consumer) on the Elixir 1.20 / OTP 27 toolchain.

What

  • Drop saxmerlsweet_xml is already a dependency and provides both parsing and the xpath queries we use. The two parse_xml/1 helpers now call SweetXml.parse/2.
  • Skip DTD fetching via a no-op fetch_fun. The CLDR documents carry a SYSTEM DOCTYPE that :xmerl_scan would otherwise try to read off disk, crashing with :enoent (saxy silently ignored DTDs). The existing xpath(~x"…") queries are unchanged.
  • Bump ssl_verify_fun 1.1.6 → 1.1.7 — 1.1.6 fails to compile on OTP 27 (record 'Extension' undefined).

Testing

Full suite passes on Elixir 1.20.1 / OTP 27.3.4.13: 19 passed (2 doctests, 17 tests).

saxmerl (unmaintained since 2021) fails to compile on Erlang/OTP 27+:
its application/0 omits :xmerl, so Record.extract(from_lib:
"xmerl/include/xmerl.hrl") can no longer resolve the header now that
xmerl is not implicitly on the compile-time code path.

sweet_xml is already a dependency and provides both parsing and the
xpath queries we use, so drop saxmerl entirely. The two parse_xml/1
helpers now call SweetXml.parse/2 with a no-op fetch_fun to skip DTD
fetching: the CLDR documents carry a SYSTEM DOCTYPE that :xmerl_scan
would otherwise try to read off disk and crash on (saxy ignored DTDs).

Also bump ssl_verify_fun 1.1.6 -> 1.1.7; 1.1.6 fails to compile on
OTP 27 (record 'Extension' undefined).
@derrickreimer derrickreimer merged commit 0da95c1 into main Jun 23, 2026
2 checks passed
@derrickreimer derrickreimer deleted the chore/drop-saxmerl-use-sweet_xml branch June 23, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant