Saturday, July 10, 2010

editing XML documents in emacs using nxml-mode

One good reason for not not authoring in XML is not having a suitable editor or IDE. I personally use and recommend emacs and James Clark's nxml-modeI create and modify all sorts of XML documents this way. If you supply nxml-mode with the right schema for your document, nxml-mode can even help you with tag completion and document validation. nxml-mode makes use of schemas in RELAX-NG, co-created by James Clark. RELAX-NG schemas are rather easily created, if not yet just available, as for DocBook, DocBook Website, DocBook Slides, and many, many other XMLs.

"Trang" is your tool for creating a RELAX-NG schema:
  • if you want to convert a DTD into a RELAX-NG schema,
  • if you want to derive a RELAX-NG schema from a couple of XML files of a specific kind,
I have done that a dozen times, it does work.

Here you find nxml-mode's manual page.

Your mileage may vary …

No comments: