NOTICE! This is a static HTML version of a legacy LOCI Software ticket.

LOCI projects are now located on GitHub. The Bio-Formats project can be found here.

Ticket #383 (closed defect: fixed)

Opened 2009-04-23T15:16:25-05:00

Last modified 2010-07-13T17:02:33-05:00

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 2009-04-23T15:19:00-05:00 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 2009-12-17T12:00:52-06:00 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 2010-07-09T12:55:02-05:00 by melissa

  • Milestone bio-formats-4.2 deleted

Milestone bio-formats-4.2 deleted

comment:4 Changed 2010-07-13T17:02:33-05:00 by melissa

  • Milestone set to bio-formats-4.2