Changeset 102 for Xml/Validator/Backend/OmeValidator.py
- Timestamp:
- 09/26/07 09:35:33 (16 months ago)
- Files:
-
- 1 modified
-
Xml/Validator/Backend/OmeValidator.py (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Xml/Validator/Backend/OmeValidator.py
r93 r102 37 37 return inFilename 38 38 39 # Try to load Image for XML Schema VlaidationSupport39 # Try to load Image for Tiff Support 40 40 haveTiffSupport = True 41 41 try: … … 45 45 haveTiffSupport = False 46 46 47 # Try to load lxml for XML Schema V laidation Support47 # Try to load lxml for XML Schema Validation Support 48 48 haveXsdSupport = True 49 49 try: … … 137 137 """ 138 138 theNamespace = None 139 140 """ 141 The namespace define in the OME element of the OME-XML document 142 """ 143 thePrefix = None 139 144 140 145 """ … … 240 245 241 246 # 242 print self.theDom.toprettyxml()247 #print self.theDom.toprettyxml() 243 248 244 249 # building the document tree from the input xml … … 523 528 # a prefex is being used 524 529 self.thePrefix = name[:-4] 525 print "Prefix : %s" % self.thePrefix526 530 try: 527 531 self.theNamespace = attribs.getValue("xmlns" + ':' + self.thePrefix) … … 641 645 self.omePlanesCount = self.omePlanesCount + 1 642 646 647 if name[-12:] == "ManufactSpec": 648 try: 649 # look for the serial number 650 theSerial = int(attribs.getValue("SerialNumber")) 651 except KeyValue: 652 pass 653 if theSerial is None or len(theSerial) == 0: 654 self.warningList.append(ParseMessage(None, None, None, "OME","", "Missing or empty SerialNumber in ManufactSpec")) 655 643 656 self.domify(name, attribs) 644 657 … … 688 701 # a prefex is being used 689 702 self.thePrefix = name[:-4] 690 print "Prefix : %s" % self.thePrefix691 703 try: 692 704 # pull the namespace for prefix out of the OME element … … 720 732 for aFilename in ["samples/4d2wOME.tif", "samples/4d2wOME-fixed.tif", 721 733 "samples/4d2wOME-fixed-updated.tif", "samples/blank.tif", 722 "samples/ome.xsd" ]:734 "samples/ome.xsd", "samples/4d2wOME-EdExtra.tif"]: 723 735 print "============ XML file %s ============ " % aFilename 724 736 print XmlReport.validateTiff(aFilename)
