• Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Changeset
  • Next Changeset →

Changeset 116

Show
Ignore:
Timestamp:
10/18/07 10:51:31 (10 months ago)
Author:
andrew
Message:

Changed file to use version 2 of 2007-07 schema.

Location:
Xml/Validator/WebApp
Files:
2 added
1 modified

  • schema/ome-2007-07-V1.xsd (added)
  • schema/ome-2007-07-V2.xsd (added)
  • validator/OmeValidator.py (modified) (6 diffs)

Legend:

Unmodified
Added
Removed
  • Xml/Validator/WebApp/validator/OmeValidator.py

    r93 r116  
    139139         
    140140        """ 
     141        The namespace define in the OME element of the OME-XML document 
     142        """ 
     143        thePrefix = None 
     144         
     145        """ 
    141146        Create the message lists for this instance of the report object 
    142147        """ 
    … …  
    262267                # choose the schema source 
    263268                # assume the new schema 
    264                 theSchemaFile = "ome-2007-07.xsd" 
     269                theSchemaFile = "ome-2007-07-V2.xsd" 
    265270                # if old schema 
    266271                if self.theNamespace == "http://www.openmicroscopy.org/XMLschemas/OME/FC/ome.xsd": 
    … …  
    523528                                # a prefex is being used 
    524529                                self.thePrefix = name[:-4] 
    525                                 print "Prefix : %s" % self.thePrefix 
    526530                                try: 
    527531                                        self.theNamespace = attribs.getValue("xmlns" + ':' + self.thePrefix) 
    … …  
    632636                        self.omePlanesCount = self.omePlanesCount + 1 
    633637                 
     638                if name[-12:] == "ManufactSpec": 
     639                        try: 
     640                                # look for the serial number 
     641                                theSerial = int(attribs.getValue("SerialNumber")) 
     642                        except KeyValue: 
     643                                pass 
     644                        if theSerial is None or len(theSerial) == 0: 
     645                                self.warningList.append(ParseMessage(None, None, None, "OME","", "Missing or empty SerialNumber in ManufactSpec")) 
     646                 
    634647                self.domify(name, attribs) 
    635648                         
    … …  
    679692                                # a prefex is being used 
    680693                                self.thePrefix = name[:-4] 
    681                                 print "Prefix : %s" % self.thePrefix 
    682694                                try: 
    683695                                        # pull the namespace for prefix out of the OME element 
    … …  
    711723        for aFilename in ["samples/4d2wOME.tif", "samples/4d2wOME-fixed.tif", 
    712724                "samples/4d2wOME-fixed-updated.tif", "samples/blank.tif", 
    713                 "samples/ome.xsd"]: 
     725                "samples/ome.xsd", "samples/4d2wOME-EdExtra.tif"]: 
    714726                print "============ XML file %s ============ " % aFilename 
    715727                print XmlReport.validateTiff(aFilename) 

Download in other formats:

  • Unified Diff
  • Zip Archive

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/