nXML editing mode for GNU Emacs - with RDF/XML RelaxNG schema

In this great writeup by Michael Smith on XMLHack
  http://www.xmlhack.com/read.php?item=2061
gives a description of a new XML mode (nXML) James Clark has written
for GNU Emacs 21.x.

This is cool in several ways - a much better XML editing mode
(compared to psgmls), using hilighting in emacs to make errors
visible, real-time validation as you type against Relax NG schemas
and pop-up validation errors.

Of interest to the RDF world is that it includes the RDF/XML RelaxNG
schema I've been maintaining in the RDF/XML specification based on
the original one he wrote:
  http://www.w3.org/TR/rdf-syntax-grammar/#section-RELAXNG-Schema
(I must check he updates to the latest version from 5 September 2003).

This means for example, that you can edit RDF/XML files and have it
check while you type that you got the striping correct.  As soon as
you put an rdf:about or rdf:resource in the wrong place, it gets
underlined.  Mistakes in using property attributes and rdf:
attributes are similiarly flagged.

You have to do a little editing to enable it by default, for .rdf
files in your ~/.emacs
  (setq auto-mode-alist
      (cons '("\\.\\(xml\\|xsl\\|rng\\|xhtml\\|rdf\\)\\'" . nxml-mode)
            auto-mode-alist))

As usual, James' stuff rocks!

Dave

Received on Wednesday, 10 September 2003 16:06:25 UTC