Skip to content

Commit

Permalink
Merge pull request #1497 from nexusformat/1380-how-to-validate-XML-files
Browse files Browse the repository at this point in the history
show how to validate an XML file
  • Loading branch information
prjemian authored Oct 17, 2024
2 parents 1dcc838 + dc6879f commit 979ec79
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions manual/source/examples/epics/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,28 @@ were arrays rather than single values. That was due to an error in the original
This has been fixed in the ``attributes.xml`` file presented here.


.. _EPICS_Area_Detector.examples.validate-xml:

Validate the XML files
**********************

To validate an XML file, you'll need the associated ``.xsd`` (XML Schema) file,
then use this command::

xmllint --noout --schema path/to/local/schema/file.xsd file_to_validate.xml

These are the XML Schema files to use:

=================== ===================================
to validate ... ... use this XML Schema file
=================== ===================================
``attributes.xml`` `NDAttributes.xsd <https://github.com/areaDetector/ADCore/blob/master/XML_schema/NDAttributes.xsd>`_
``layout.xml`` `hdf5_xml_layout_schema.xsd <https://github.com/areaDetector/ADCore/blob/master/XML_schema/hdf5_xml_layout_schema.xsd>`_
``nxdl.xsd`` `XMLSchema.xsd <https://www.w3.org/2012/04/XMLSchema.xsd>`_
``nxdlTypes.xsd`` `XMLSchema.xsd <https://www.w3.org/2012/04/XMLSchema.xsd>`_
any NXDL file ``nxdl.xsd``
=================== ===================================

.. _EPICS_Area_Detector.examples.python:

Python code to store an image in a NeXus file
Expand Down

0 comments on commit 979ec79

Please sign in to comment.