Commit 6258a4b9 authored by Kasimier T. Buchcik's avatar Kasimier T. Buchcik
Browse files

Changed to finally validate instance documents.

* xstc/ Changed to finally validate instance documents.
parent f31187d3
Mon Sep 6 16:42:59 CEST 2004 Kasimier Buchcik <>
* xstc/ Changed to finally validate instance documents.
Mon Sep 6 16:04:01 CEST 2004 Daniel Veillard <>
* xstc/ integrated to "make valgrind",
......@@ -258,6 +258,7 @@ class MSTestCase:
return schema
self.debugMsg("schema result is OK")
self.debugMsg("after checking schema result")
......@@ -265,7 +266,7 @@ class MSTestCase:
global msgInstanceNotValidButShould, msgInstanceValidButShouldNot
instance = None
self.debugMsg("loading instance: %s" % file)
self.debugMsg("loading instance: %s" % filePath)
instance_parserCtxt = libxml2.newParserCtxt()
if (instance_parserCtxt is None):
# TODO: Is this one necessary, or will an exception
......@@ -273,7 +274,7 @@ class MSTestCase:
raise Exception("Could not create the instance parser context.")
instance = instance_parserCtxt.ctxtReadFile(file, None, libxml2.XML_PARSE_NOWARNING)
instance = instance_parserCtxt.ctxtReadFile(filePath, None, libxml2.XML_PARSE_NOWARNING)
# Suppress exceptions.
......@@ -324,13 +325,13 @@ class MSTestCase:
schema = self.processSchema(filePath)
if self.instance_Exists and (schema is not None) and (not self.failed):
file = "%s/%s/%s/%s" % (options.baseDir, self.test_Folder, self.instance_Folder, self.instance_File)
processInstance(filePath, schema)
filePath = "%s/%s/%s/%s" % (options.baseDir, self.test_Folder, self.instance_Folder, self.instance_File)
self.processInstance(filePath, schema)
if schema is not None:
del schema
except Exception, e:
except (Exception, libxml2.parserError, libxml2.treeError), e:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment