This Time Self-Hosted
dark mode light mode Search

Simpler GuideXML editing for Emacs users

If you didn’t notice, in the past months I’ve returned to use GNU Emacs as my main editor; lately I was also able to get it work decently with Xft and with the deadkeys just as I like them, so I’m slowly getting rid of Kate in my daily usage.

One thing that lately I found pretty neat was using nxml-mode to edit DocBook files, because it checks the validity against the schema, so you can tell if you misplaced an element. Today while working on the GuideXML updates, I would have liked something like that, not to try the commit without being sure it was fine (the commit hook will prevent me from committing broken files, but that is a time waste as I have to fix and try again).

So I looked up nxml documentation and decided to use trang to convert the DTDs out of the Gentoo site into Relax-NG Compact syntax; after that, I wrote a schemas.xml file to tell nxml to load the proper schema for GuideXML, ProjectXML, GLSA and Metadata files, then I’ve added a little elisp snippet to add that file to the list of the default loaded files, et voilĂ , nxml-mode took care of validating my documents against the schema files!

And to make this available to Gentoo users and developers quickly, I’ve put everything in an ebuild in my overlay, that will put everything in place: just get the GIT overlay and then emerge app-emacs/nxml-gentoo-schemas 🙂

Hope it can be of help to see more documentation written (possibly documentation that won’t encourage users to do stuff that the developers who’re going to support that particular framework are said already a lot of times they won’t support).

Comments 1

Leave a Reply to KarlCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.