Beispiel #1
0
    def _testErrors(self, schema_file, instance_file, id):
        su = SU()
        xfm = XFM()
        xsd_file_name = os.path.join(os.path.dirname(__file__),schema_file)
        xml_file_name = os.path.join(os.path.dirname(__file__),instance_file)

        schema = xfm._add_schema_from_file(xsd_file_name)
        formdef = su.get_formdef_from_schema_file(xsd_file_name)
        data_tree = su._get_data_tree_from_file(xml_file_name)
        populator = XFormDBTablePopulator( formdef, schema )
        queries = populator.populate( data_tree )
        xfm.remove_schema(schema.id)
        return populator.errors