emacsnxml

Make nXML open the same schema file every time?


I only use nXML for authoring docbook documents, and I would like to tell nxml to always load C:\docbook-5.0\rng\docbookxi.rnc

How do I do this?


Solution

  • The easiest way to do this is using the emacs' schemas.xml file (which emacs will save into the same directory as your current XML file after telling emacs to load schema from a file) is to edit schemas.xml to say:

    <?xml version="1.0"?>
    <locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
      <uri pattern="*.xml" uri="path/to/schema/docbookxi.rnc"/>
    </locatingRules>