You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.
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.
Hi @npikki, in general order of nodes in the XML file doesn't matter. The validation error you got says that the node Plane is in the metadata, but it shouldn't be there.
Could you please provide more info on what you are validating: the actuall metadata you tried to validate, proper XML schema and software you used for validation.
Hi @npikki, sorry it took me so long, I had (and still have) a lot of higher prioriry work. I just had a look at your metadata, do you need the Plane nodes? Do they contain any information that you use in your workflow? I personally never used them.
So, adding a proper way to handle them will require a lot of work for a very limited benefit. My solution would be to rather remove Plane nodes from the metadata, as they are not required by the schema.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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>
`
The text was updated successfully, but these errors were encountered: