mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Adding section to installation guide about configuring emacs nxml mode.
This commit is contained in:
parent
1fdb09baab
commit
cdcf1b1138
1 changed files with 24 additions and 0 deletions
|
|
@ -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/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue