Wednesday, February 19, 2003


I need a geek journal where I can write about stuff that my normal readers (all two of you) wouldn't necessarily understand. For example, this entry.

Today I wandered across an article about editing structured documents in emacs, specifically about SGML and Docbook documents. Well, it just so happens that XML is a subset of SGML, and XHTML is a subset of XML,and I frequently author XHTML documents so I went about downloading the code for the PSGML Major Mode. With some minor editing of the Makefile to install the stuff in my home directory, and some massaging of my .emacs file, I got the dang thing to work. And it's a beauty, folks. C-c C-e and it asks me which tag I want to insert, inserting the opening and closing tags and placing the cursor smack dab in between them. Then a quick flick fo the wrist, C-c C-d, and the cursor moves outside of the tag to the next point where I'm allowed to have CDATA. How can it do this? It reads the DTDs themselves to figure out the rules. Yes, you heard me right, those cryptic Document Type Declaractions actually contain useful information that allow this PSGML Major Mode to do magical stuff in XHTML documents. With a little more elbow grease, I should have a validator working as the final icing on the cake. Imagine that. I can clearly see that you are flabbergasted. Well, enough for the night.


Post a Comment

Post a Comment

« Home