Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS: wrong path to dtd file #167

Open
gagbo opened this issue Mar 21, 2024 · 7 comments
Open

MacOS: wrong path to dtd file #167

gagbo opened this issue Mar 21, 2024 · 7 comments

Comments

@gagbo
Copy link

gagbo commented Mar 21, 2024

path to dtd file should be

+<!DOCTYPE keyboard SYSTEM "file:///System/Library/DTDs/KeyboardLayout.dtd">
-<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">

Double check it though, because I used a file generated by an older version of kalamine

@wismill
Copy link
Contributor

wismill commented Mar 21, 2024

Could it depend on the macOS version?

@gagbo
Copy link
Author

gagbo commented Mar 21, 2024

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)

@wismill
Copy link
Contributor

wismill commented Mar 21, 2024

See the reference doc:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">

@fabi1cazenave
Copy link
Collaborator

fabi1cazenave commented Mar 21, 2024

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. &#x0010; (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 !

@wismill
Copy link
Contributor

wismill commented Mar 21, 2024

So it’s not standard XML?

@fabi1cazenave
Copy link
Collaborator

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 &#xFFFF;, 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

@gagbo
Copy link
Author

gagbo commented Mar 21, 2024

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

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

No branches or pull requests

3 participants