Changeset 227 for Xml/Validator/Backend/OmeValidator.py
- Timestamp:
- 11/20/08 15:37:01 (7 weeks ago)
- Files:
-
- 1 modified
-
Xml/Validator/Backend/OmeValidator.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Xml/Validator/Backend/OmeValidator.py
r185 r227 276 276 277 277 def checkOldSchemas(self, inDocument): 278 for thePossibleSchema in [["ome-2008-0 2-V2.xsd","February 2008 V2"],["ome-2008-02-V1.xsd","February 2008 V1"],["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"]]:278 for thePossibleSchema in [["ome-2008-09-V1.xsd","September 2008 V1"],["ome-2008-02-V2.xsd","February 2008 V2"],["ome-2008-02-V1.xsd","February 2008 V1"],["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: … … 284 284 except: 285 285 # chosen schema failed to laod 286 self.errorList.append(ParseMessage(None, None, None, "XSD", None, "Validator Internal error: XSD schema file could not be found"))286 self.errorList.append(ParseMessage(None, None, None, schemaFilePath(thePossibleSchema[0]), None, "Validator Internal error: XSD schema file could not be found [2]")) 287 287 # try validation 288 288 try: … … 298 298 # choose the schema source 299 299 # assume the new schema 300 self.theSchemaFile = "ome-2008-0 2-V2.xsd"300 self.theSchemaFile = "ome-2008-09-V1.xsd" 301 301 # if old schema 302 302 if self.theNamespace == "http://www.openmicroscopy.org/XMLschemas/OME/FC/ome.xsd": … … 312 312 # use September 2007 schema 313 313 self.theSchemaFile = "ome-2007-06-V2.xsd" 314 else: 315 if self.theNamespace == "http://www.openmicroscopy.org/Schemas/OME/2008-02": 316 # use February 2007 schema 317 self.theSchemaFile = "ome-2008-02-V2.xsd" 314 318 315 319 … … 319 323 except: 320 324 # chosen schema failed to laod 321 self.errorList.append(ParseMessage(None, None, None, "XSD", None, "Validator Internal error: XSD schema file could not be found "))325 self.errorList.append(ParseMessage(None, None, None, "XSD", None, "Validator Internal error: XSD schema file could not be found [1]")) 322 326 schema = None; 323 327 … … 773 777 if __name__ == '__main__': 774 778 for aFilename in ["samples/completesamplenopre.xml","samples/completesample.xml","samples/completesamplenoenc.xml", 775 "samples/sdub.ome", "samples/sdub-fix.ome", "samples/sdub-fix-pre.ome",776 "samples/tiny.ome", "samples/broke.ome",777 "samples/tiny2008-02-V1.ome" ]:779 "samples/sdub.ome", "samples/sdub-fix.ome", "samples/sdub-fix-pre.ome", 780 "samples/tiny.ome", "samples/broke.ome", 781 "samples/tiny2008-02-V1.ome", "samples/tiny2008-09-V1.ome"]: 778 782 print "============ XML file %s ============ " % aFilename 779 783 print XmlReport.validateFile(aFilename) … … 787 791 788 792 print "============" 793 794 ###
