Changeset 119 for Xml/Validator/Backend/OmeValidator.py
- Timestamp:
- 10/31/07 10:59:01 (14 months ago)
- Files:
-
- 1 modified
-
Xml/Validator/Backend/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):
