Remove RELAX NG schema and openmc-validate-xml script

This commit is contained in:
Paul Romano 2022-09-08 13:01:42 -05:00
parent aea5628819
commit d590aa7ad7
22 changed files with 2 additions and 3392 deletions

View file

@ -75,10 +75,7 @@ person. The nested tags *firstname*, *lastname*, *age*, and *occupation*
indicate characteristics about the person being described.
In much the same way, OpenMC input uses XML tags to describe the geometry, the
materials, and settings for a Monte Carlo simulation. Note that because the XML
files have a well-defined structure, they can be validated using the
:ref:`scripts_validate` script or using :ref:`Emacs nXML mode
<usersguide_nxml>`.
materials, and settings for a Monte Carlo simulation.
Creating Input Files
--------------------

View file

@ -545,8 +545,7 @@ distributions.
Uncertainties are used for decay data in the :mod:`openmc.data` module.
`lxml <https://lxml.de/>`_
lxml is used for the :ref:`scripts_validate` script and various other
parts of the Python API.
lxml is used for various parts of the Python API.
.. admonition:: Optional
:class: note
@ -590,31 +589,5 @@ wrapper is used when installing h5py:
CC=<path to mpicc> HDF5_MPI=ON HDF5_DIR=<path to HDF5> pip install --no-binary=h5py h5py
.. _usersguide_nxml:
-----------------------------------------------------
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: https://en.wikipedia.org/wiki/XML_validation
.. _RELAX NG: https://relaxng.org/
.. _ctest: https://cmake.org/cmake/help/latest/manual/ctest.1.html
.. _Conda: https://conda.io/en/latest/
.. _pip: https://pip.pypa.io/en/stable/

View file

@ -171,34 +171,6 @@ the latest HDF5-based format.
-i IN, --input IN Input XML file
-o OUT, --output OUT Output file in HDF5 format
.. _scripts_validate:
-----------------------
``openmc-validate-xml``
-----------------------
Input files can be checked before executing OpenMC using the
``openmc-validate-xml`` script which is installed alongside the Python API. Two
command line arguments can be set when running ``openmc-validate-xml``:
-i, --input-path Location of OpenMC input files.
-r, --relaxng-path Location of OpenMC RelaxNG files
If the RelaxNG path is not set, the script will search for these files because
it expects that the user is either running the script located in the install
directory ``bin`` folder or in ``src/utils``. Once executed, it will match
OpenMC XML files with their RelaxNG schema and check if they are valid. Below
is a table of the messages that will be printed after each file is checked.
======================== ===================================
Message Description
======================== ===================================
[XML ERROR] Cannot parse XML file.
[NO RELAXNG FOUND] No RelaxNG file found for XML file.
[NOT VALID] XML file does not match RelaxNG.
[VALID] XML file matches RelaxNG.
======================== ===================================
.. _scripts_voxel:
---------------------------