-
Notifications
You must be signed in to change notification settings - Fork 3
Generated metadata doesn't follow xml schema #1
Description
generate_new_metadata function in metadata_handling.py changes the order of elements in metadata ("Channel" and "TiffData" are removed and then appended, therefore if there were elements which came after them in the original metadata, they would come before them in the new metadata), example error of validating new metadata below:
`raise error
xmlschema.validators.exceptions.XMLSchemaChildrenValidationError: failed validating <Element '{http://www.openmicroscopy.org/Schemas/OME/2016-06}Pixels' at 0x7fc271f08130> with XsdGroup(model='sequence', occurs=[1, 1]):
Reason: Unexpected child with tag 'OME:Plane' at position 1. Tag ('OME:BinData' | 'OME:TiffData' | 'OME:MetadataOnly') expected.
Schema:
<xsd:complexType xmlns:xsd="http://www.w3.org/2001/XMLSchema">
xsd:sequence
<xsd:element ref="Channel" minOccurs="0" maxOccurs="unbounded">
xsd:annotation
xsd:appinfo
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:element ref="BinData" minOccurs="1" maxOccurs="unbounded" />
<xsd:element ref="TiffData" minOccurs="1" maxOccurs="unbounded" />
<xsd:element ref="MetadataOnly" minOccurs="1" maxOccurs="1" />
</xsd:choice>
<xsd:element ref="Plane" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="ID" use="required" type="PixelsID" />
<xsd:attribute name="DimensionOrder" use="required">
...
...
</xsd:complexType>
`