Loading translation/translate_120.py +0 −17 Original line number Original line Diff line number Diff line Loading @@ -46,9 +46,6 @@ if __name__ == "__main__": 'http://www.w3.org/2000/09/xmldsig#' : 'xmldsig.json', 'http://www.w3.org/2000/09/xmldsig#' : 'xmldsig.json', } } # js = translate_schema("103280/TS_103_280.xsd", "103120.json") # print(json.dumps(js, indent=2)) output_path = Path('103120/json_schema') output_path = Path('103120/json_schema') if not output_path.exists(): if not output_path.exists(): os.mkdir(str(output_path)) os.mkdir(str(output_path)) Loading Loading @@ -81,17 +78,3 @@ if __name__ == "__main__": if "TS_103_120" in str(js_path): if "TS_103_120" in str(js_path): with open(str(js_path), 'w') as f: with open(str(js_path), 'w') as f: f.write(json_string) f.write(json_string) # json_schemas[js['$id']] = json.loads(json_string) # else: # json_schemas = {} # json_path = Path('103120/json_schema') # for json_file in json_path.glob("*.json"): # json_schemas[json_file.name] = get_json(json_file) # resolver = jsonschema.RefResolver("", "", json_schemas) # instance = get_json("120.json") # schema = json_schemas['core.json'] # jsonschema.validate(instance, schema, resolver=resolver) # # print(json.dumps(js, indent=2)) Loading
translation/translate_120.py +0 −17 Original line number Original line Diff line number Diff line Loading @@ -46,9 +46,6 @@ if __name__ == "__main__": 'http://www.w3.org/2000/09/xmldsig#' : 'xmldsig.json', 'http://www.w3.org/2000/09/xmldsig#' : 'xmldsig.json', } } # js = translate_schema("103280/TS_103_280.xsd", "103120.json") # print(json.dumps(js, indent=2)) output_path = Path('103120/json_schema') output_path = Path('103120/json_schema') if not output_path.exists(): if not output_path.exists(): os.mkdir(str(output_path)) os.mkdir(str(output_path)) Loading Loading @@ -81,17 +78,3 @@ if __name__ == "__main__": if "TS_103_120" in str(js_path): if "TS_103_120" in str(js_path): with open(str(js_path), 'w') as f: with open(str(js_path), 'w') as f: f.write(json_string) f.write(json_string) # json_schemas[js['$id']] = json.loads(json_string) # else: # json_schemas = {} # json_path = Path('103120/json_schema') # for json_file in json_path.glob("*.json"): # json_schemas[json_file.name] = get_json(json_file) # resolver = jsonschema.RefResolver("", "", json_schemas) # instance = get_json("120.json") # schema = json_schemas['core.json'] # jsonschema.validate(instance, schema, resolver=resolver) # # print(json.dumps(js, indent=2))