Open gagbo opened 8 months ago
Could it depend on the macOS version?
Could it depend on the macOS version?
Maybe, but I’d find it surprising to have localhost
at the root without a /
prefix even.
Just in case though, I’m on macOS Sonoma (14.0)
See the reference doc:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
Having any way to validate this file would be a great step forward. It can be loaded with lxml
but not with the standard Python XML library, nor with any web browser I know, because of the numeric entities e.g. 
(pass-through) and many other similar ones that do not correspond to printable characters. If you know a way to work around this, I’m all ears !
So it’s not standard XML?
It is. But it contains numeric character references that do not correspond to printable characters, and most XML parsers block on that.
While the syntax of SGML does not prohibit references to invalid or unassigned code points, such as

, SGML-derived markup languages such as HTML and XML can, and often do, restrict numeric character references to only those code points that are assigned to characters.
https://en.wikipedia.org/wiki/Numeric_character_reference#Restrictions
See the reference doc:
Didn’t know that. Not sure whether the issue is that someone didn’t test their docs or if something actually changed
path to dtd file should be
Double check it though, because I used a file generated by an older version of kalamine