data-exchange / dxfile

Subclasses the h5py module for interacting with Data Exchange files.
http://dxfile.readthedocs.org/
Other
2 stars 8 forks source link

Fix XML file syntax errors. Add 13-BM files. #15

Closed MarkRivers closed 4 years ago

MarkRivers commented 4 years ago

This fixes some syntax errors in the HDF5 XML layout files.

Previously the files would not validate when using xmllint and the areaDetector XSD file. For example this is flir2bmaLayout.xml.

corvette:demo/areadetector/2-BM>xmllint --noout --schema /home/epics/devel/areaDetector/ADCore/XML_schema/hdf5_xml_layout_schema.xsd flir2bmaLayout.xml
flir2bmaLayout.xml:2: element hdf_layout: Schemas validity error : Element 'hdf_layout': No matching global declaration available for the validation root.
flir2bmaLayout.xml fails to validate

I replaced hdf_layout with hdf5_layout, which is the correct syntax.

diff --git a/doc/demo/areadetector/2-BM/flir2bmaLayout.xml b/doc/demo/areadetector/2-BM/flir2bmaLayout.xml
index 55ce6a8..45702a3 100755
--- a/doc/demo/areadetector/2-BM/flir2bmaLayout.xml
+++ b/doc/demo/areadetector/2-BM/flir2bmaLayout.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" standalone="no" ?>
-<hdf_layout>
+<hdf5_layout>
   <global name="detector_data_destination" ndattribute="SaveDest" />
     <group name="exchange">
       <dataset name="data" source="detector">
@@ -264,4 +264,4 @@
     <group name="defaults" ndattr_default="true">
     </group><!-- /defaults -->

-</hdf_layout>
+</hdf5_layout>

The file now validated OK.

corvette:demo/areadetector/2-BM>xmllint --noout --schema /home/epics/devel/areaDetector/ADCore/XML_schema/hdf5_xml_layout_schema.xsd flir2bmaLayout.xml
flir2bmaLayout.xml validates

The 7-BM mct3.xml file was also using "OnFrame" when it should be "OnFileWrite".

decarlof commented 4 years ago

@MarkRivers just updated the docs