Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Author: ~blee Unknown User (blee)

Introduction

nXML Mode is a major mode for GNU Emacs which provides guided editing of XML documents based on an associated schema. Like other major modes (e.g. c-mode, etc.) it also provides features like syntax highlighting and automatic indentation.

...

The unix-admin folks have kindly made nxml-mode available in the Central Unix site-lisp library. Use the following procedure to set up nxml-mode on your Central Unix account:

  • Add the statement 'alias emacs emacs-21.4' to your .cshrc file. On Linux nodes, the default emacs installation is in /usr/bin, and is local to the individual machine. This alias will ensure that you use the site-wide Emacs installation.
  • Add the following lines to your .emacs file:
No Format
;; make sure that nxml-mode can auto-load
(load "rng-auto.el")

;; load nxml-mode for files ending in .xml, .xsl, .xsd, .rng, .xhtml
(setq auto-mode-alist
      (cons '("\\.\\(xml\\|xsl\\|xsd\\|rng\\|xhtml\\)\\'" . nxml-mode)
            auto-mode-alist))

...

  • Download the distribution. Windows users can retrieve nxml-mode-20041004.zip, which already includes the pipeline schema.
  • Unpack the tarball to a convenient directory, such as the one where you keep your other Emacs extensions. In these instructions, we'll use ~/site-lisp as the installation path.
  • For ease of upgrading, symlink the version-specific directory name to the generic name 'nxml'
  • Add the following lines to your .emacs file:
No Format
;; Add the nxml files to the search path for loading
(setq load-path
      (append load-path
              '("~/site-lisp/nxml/")))

;; make sure that nxml-mode can auto-load
(load "~/site-lisp/nxml/rng-auto.el")

;; load nxml-mode for files ending in .xml, .xsl, .xsd, .rng, .xhtml
(setq auto-mode-alist
      (cons '("\\.\\(xml\\|xsl\\|xsd\\|rng\\|xhtml\\)\\'" . nxml-mode)
            auto-mode-alist))

...