Changeset 119
- Timestamp:
- 10/31/07 10:59:01 (10 months ago)
- Location:
- Xml/Validator
- Files:
-
- 3 modified
-
Backend/OmeValidator.py (modified) (1 diff)
-
Backend/ValidatorBackend.tmproj (modified) (2 diffs)
-
WebApp/validator/OmeValidator.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
Xml/Validator/Backend/OmeValidator.py
r115 r119 255 255 256 256 # validating the documnet tree against the loaded schema 257 # this should not throw an exception 258 schema.validate(document) 259 err = schema.error_log.last_error 260 if err: 257 # according to the docs this should not throw an exception - but it does! 258 try: 259 schema.validate(document) 260 err = schema.error_log.last_error 261 if err: 262 self.isXsdValid = False 263 self.errorList.append(ParseMessage(None, err.line, None, "XSD", None, err.message)) 264 else: 265 self.isXsdValid = True 266 except XMLSchemaValidateError: 261 267 self.isXsdValid = False 262 self.errorList.append(ParseMessage(None, err.line, None, "XSD", None, err.message)) 263 else: 264 self.isXsdValid = True 268 self.errorList.append(ParseMessage(None, None, None, "XML", None, "Internal error in the system XML Schema validation module")) 269 265 270 266 271 def loadChoosenSchema(self): -
Xml/Validator/Backend/ValidatorBackend.tmproj
r115 r119 22 22 <key>lastUsed</key> 23 23 <date>2007-10-16T18:37:26Z</date> 24 <key>selected</key>25 <true/>26 24 </dict> 27 25 <dict> … … 29 27 <string>OmeValidator.py</string> 30 28 <key>lastUsed</key> 31 <date>2007-10-16T18:37:24Z</date> 29 <date>2007-10-26T16:09:53Z</date> 30 <key>selected</key> 31 <true/> 32 32 </dict> 33 33 <dict> -
Xml/Validator/WebApp/validator/OmeValidator.py
r116 r119 256 256 # validating the documnet tree against the loaded schema 257 257 # this should not throw an exception 258 schema.validate(document) 259 err = schema.error_log.last_error 260 if err: 258 try: 259 schema.validate(document) 260 err = schema.error_log.last_error 261 if err: 262 self.isXsdValid = False 263 self.errorList.append(ParseMessage(None, err.line, None, "XSD", None, err.message)) 264 else: 265 self.isXsdValid = True 266 except XMLSchemaValidateError: 261 267 self.isXsdValid = False 262 self.errorList.append(ParseMessage(None, err.line, None, "XSD", None, err.message)) 263 else: 264 self.isXsdValid = True 268 self.errorList.append(ParseMessage(None, None, None, "XML", None, "Internal error in the system XML Schema validation module")) 269 265 270 266 271 def loadChoosenSchema(self):
