diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst index c9bc1df878..337868e943 100644 --- a/docs/source/usersguide/install.rst +++ b/docs/source/usersguide/install.rst @@ -179,3 +179,27 @@ Alternatively, you could run from any directory: Note that in the latter case, any output files will be placed in the present working directory which may be different from ``/home/username/somemodel``. + +----------------------------------------------------- +Configuring Input Validation with GNU Emacs nXML mode +----------------------------------------------------- + +The `GNU Emacs`_ text editor has a built-in mode that extends functionality for +editing XML files. One of the features in nXML mode is the ability to perform +real-time `validation`_ of XML files against a `RELAX NG`_ schema. The OpenMC +source contains RELAX NG schemas for each type of user input file. In order for +nXML mode to know about these schemas, you need to tell emacs where to find a +"locating files" description. Adding the following lines to your ``~/.emacs`` +file will enable real-time validation of XML input files: + +.. code-block:: common-lisp + + (require 'rng-loc) + (add-to-list 'rng-schema-locating-files "~/openmc/schemas.xml") + +Make sure to replace the last string on the second line with the path to the +schemas.xml file in your own OpenMC source directory. + +.. _GNU Emacs: http://www.gnu.org/software/emacs/ +.. _validation: http://en.wikipedia.org/wiki/XML_validation +.. _RELAX NG: http://relaxng.org/