Changeset 102 for Xml/Validator
- Timestamp:
- 09/26/07 09:35:33 (16 months ago)
- Location:
- Xml/Validator/Backend
- Files:
-
- 2 modified
-
OmeValidator.py (modified) (8 diffs)
-
ValidatorBackend.tmproj (modified) (6 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) -
Xml/Validator/Backend/ValidatorBackend.tmproj
r96 r102 3 3 <plist version="1.0"> 4 4 <dict> 5 <key>currentDocument</key>6 <string>mateTiff.py</string>7 5 <key>documents</key> 8 6 <array> 9 7 <dict> 10 8 <key>filename</key> 9 <string>isValidOME.py</string> 10 <key>lastUsed</key> 11 <date>2007-09-24T11:42:01Z</date> 12 </dict> 13 <dict> 14 <key>filename</key> 11 15 <string>mateTiff.py</string> 12 16 <key>lastUsed</key> 13 <date>2007-09-19T13:54:42Z</date> 14 <key>selected</key> 15 <true/> 17 <date>2007-09-24T11:41:59Z</date> 16 18 </dict> 17 19 <dict> … … 19 21 <string>RunAndCheck.py</string> 20 22 <key>lastUsed</key> 21 <date>2007-09- 19T09:21:35Z</date>23 <date>2007-09-24T11:42:02Z</date> 22 24 </dict> 23 25 <dict> … … 25 27 <string>OmeValidator.py</string> 26 28 <key>lastUsed</key> 27 <date>2007-09- 19T13:54:42Z</date>29 <date>2007-09-24T11:42:02Z</date> 28 30 </dict> 29 31 <dict> … … 31 33 <string>ome-fc-tiff.xsd</string> 32 34 <key>lastUsed</key> 33 <date>2007-09-19T09:23:40Z</date> 35 <date>2007-09-24T11:42:03Z</date> 36 <key>selected</key> 37 <true/> 34 38 </dict> 35 39 <dict> … … 56 60 <key>metaData</key> 57 61 <dict> 58 <key>OmeValidator.py</key>59 <dict>60 <key>caret</key>61 <dict>62 <key>column</key>63 <integer>40</integer>64 <key>line</key>65 <integer>224</integer>66 </dict>67 <key>firstVisibleColumn</key>68 <integer>0</integer>69 <key>firstVisibleLine</key>70 <integer>103</integer>71 </dict>72 <key>RunAndCheck.py</key>73 <dict>74 <key>caret</key>75 <dict>76 <key>column</key>77 <integer>1</integer>78 <key>line</key>79 <integer>29</integer>80 </dict>81 <key>firstVisibleColumn</key>82 <integer>0</integer>83 <key>firstVisibleLine</key>84 <integer>0</integer>85 </dict>86 <key>mateTiff.py</key>87 <dict>88 <key>caret</key>89 <dict>90 <key>column</key>91 <integer>20</integer>92 <key>line</key>93 <integer>44</integer>94 </dict>95 <key>firstVisibleColumn</key>96 <integer>0</integer>97 <key>firstVisibleLine</key>98 <integer>38</integer>99 </dict>100 <key>ome-fc-tiff.xsd</key>101 <dict>102 <key>caret</key>103 <dict>104 <key>column</key>105 <integer>16</integer>106 <key>line</key>107 <integer>9</integer>108 </dict>109 <key>firstVisibleColumn</key>110 <integer>0</integer>111 <key>firstVisibleLine</key>112 <integer>0</integer>113 </dict>114 62 <key>samples/completesamplenoenc.xml</key> 115 63 <dict> … … 185 133 </dict> 186 134 </dict> 187 <key>openDocuments</key>188 <array>189 <string>mateTiff.py</string>190 <string>OmeValidator.py</string>191 <string>RunAndCheck.py</string>192 <string>ome-fc-tiff.xsd</string>193 </array>194 135 <key>showFileHierarchyDrawer</key> 195 136 <true/> 196 137 <key>windowFrame</key> 197 <string>{{ 580, 61}, {788, 840}}</string>138 <string>{{392, 104}, {857, 983}}</string> 198 139 </dict> 199 140 </plist>
