Ticket #383 (closed defect: fixed)

Opened 11 years ago

Last modified 10 years ago

Generated OME-TIFF files have elements in the wrong order

Reported by: curtis Owned by: curtis
Priority: major Milestone: bio-formats-4.2
Component: bio-formats Severity: serious
Keywords: Cc:
Blocked By: Blocking:

Description

There are many cases, but for example, according to the OME-XML schema, Instrument elements must precede Image elements:

$ bfconvert data/al3d/franz/Iron\ Plate.al3d Iron\ Plate.ome.tif
data/al3d/franz/Iron Plate.al3d [Alicona AL3D] -> Iron Plate.ome.tif [OME-TIFF] ... [done]
1.339s elapsed (734.0+166.0ms per image, 438ms overhead)

$ showinf -nopix -omexml Iron\ Plate.ome.tif 
Checking file format [OME-TIFF]
...
Generating OME-XML (schema version 2008-09)
...
   <Image DefaultPixels="Pixels:0" ID="Image:0" Name="">
...
   <Instrument ID="Instrument:0">
...
Validating OME-XML
...
error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'Instrument'. One of '{"http://www.openmicroscopy.org/Schemas/OME/2008-09":Image, "http://www.openmicroscopy.org/Schemas/STD/2008-09":SemanticTypeDefinitions, "http://www.openmicroscopy.org/Schemas/AnalysisModule/2008-09":AnalysisModuleLibrary, "http://www.openmicroscopy.org/Schemas/CA/2008-09":CustomAttributes, "http://www.openmicroscopy.org/Schemas/SA/2008-09":StructuredAnnotations}' is expected.

Change History

comment:1 Changed 11 years ago by curtis

The solution will be to alter the xsd-fu class template to generate OME-XML Java library classes that do not rely on the org.w3c.dom implementation. That way, no matter what order elements are registered in the model, the generated XML will be output in the proper order.

comment:2 Changed 10 years ago by curtis

  • Status changed from new to closed
  • Resolution set to fixed

This problem was fixed a while ago in r5467. It uses a stylesheet (thanks to Andrew Patterson) to reorder the elements into their correct order. Eventually, the OME-XML Java library will generate output XML in the correct order by default, as described above, but for now the stylesheet does the trick.

comment:3 Changed 10 years ago by melissa

  • Milestone bio-formats-4.2 deleted

Milestone bio-formats-4.2 deleted

comment:4 Changed 10 years ago by melissa

  • Milestone set to bio-formats-4.2
Note: See TracTickets for help on using tickets.