Skip to content
This repository was archived by the owner on Nov 21, 2022. It is now read-only.

Generated metadata doesn't follow xml schema #1

@npikki

Description

@npikki

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>
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions