Changeset 158 for Xml/Validator/Backend/OmeValidator.py
- Timestamp:
- 02/28/08 14:27:44 (9 months ago)
- Files:
-
- 1 modified
-
Xml/Validator/Backend/OmeValidator.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Xml/Validator/Backend/OmeValidator.py
r131 r158 274 274 self.isXsdValid = False 275 275 self.errorList.append(ParseMessage(None, None, None, "XML", None, "Processing the XML data has generated an unspecified error in the XML sub-system. This is usually a result of an incorrect top level block. Please check the OME block is well-formed and that the schemaLocation is specified correctly. This may also be caused by a missing namespace prefix or incorrect xmlns attribute.")) 276 276 277 277 def checkOldSchemas(self, inDocument): 278 for thePossibleSchema in [["ome-200 7-07-V2.xsd","September 2007 V2"],["ome-2007-07-V1.xsd","June 2007 V1"],["ome-fc-tiff.xsd","2003 - Tiff Variant"], ["ome-fc.xsd","2003 - Standard version"]]:278 for thePossibleSchema in [["ome-2008-02-V1.xsd","February 2008 V2"],["ome-2007-06-V2.xsd","September 2007 V2"],["ome-2007-06-V1.xsd","June 2007 V1"],["ome-fc-tiff.xsd","2003 - Tiff Variant"], ["ome-fc.xsd","2003 - Standard version"]]: 279 279 # skip current one 280 280 if not thePossibleSchema[0] == self.theSchemaFile: … … 298 298 # choose the schema source 299 299 # assume the new schema 300 self.theSchemaFile = "ome-200 7-07-V2.xsd"300 self.theSchemaFile = "ome-2008-02-V1.xsd" 301 301 # if old schema 302 302 if self.theNamespace == "http://www.openmicroscopy.org/XMLschemas/OME/FC/ome.xsd": … … 308 308 # use normal version of old schema 309 309 self.theSchemaFile = "ome-fc.xsd" 310 else: 311 if self.theNamespace == "http://www.openmicroscopy.org/Schemas/OME/2007-06": 312 # use September 2007 schema 313 self.theSchemaFile = "ome-2007-06-V2.xsd" 314 310 315 311 316 # loading the OME schema to validate against … … 598 603 if name[-5:] == "Image": 599 604 try: 600 # in Image - ID is an ID and DefaultPixels is a Reference 605 # in Image - ID is an ID 606 # and DefaultPixels is a Reference 601 607 self.references.append(attribs.getValue("DefaultPixels")) 608 except KeyError: 609 pass 610 try: 611 # and AcquiredPixels is a Reference 612 self.references.append(attribs.getValue("AcquiredPixels")) 602 613 except KeyError: 603 614 pass … … 757 768 for aFilename in ["samples/completesamplenopre.xml","samples/completesample.xml","samples/completesamplenoenc.xml", 758 769 "samples/sdub.ome", "samples/sdub-fix.ome", "samples/sdub-fix-pre.ome", 759 "samples/tiny.ome", "samples/broke.ome"]: 770 "samples/tiny.ome", "samples/broke.ome", 771 "samples/tiny2008-02-V1.ome"]: 760 772 print "============ XML file %s ============ " % aFilename 761 773 print XmlReport.validateFile(aFilename)
