Integrating with Emacs - xspec/xspec GitHub Wiki

To add support for XSpec in nXML mode such that nXML mode will use the XSpec schema with XSpec files:

  1. M-x nxml-mode RET to switch to nXML mode.

  2. Select rng-schema-locating-files for customization:

    1. Either,

      • using the menu, select Options - Customize Emacs - Specific Option,

      or,

      • using the keyboard, enter M-x customize-variable RET
    2. Enter rng-schema-locating-files RET

  3. Select the one of the INS buttons to insert a new File: text box.

  4. Enter the location of editors/emacs/schemas.xml as the value for the new File: text box.

  5. Select the State button and select the Save for Future Sessions option.

You could also customize rng-preferred-prefix-alist to add the XSpec namespace URI, http://www.jenitennison.com/xslt/xspec, and preferred prefix, x, if you want.