def validate_shexc(shexc_str: str, input_fname: str) -> bool:
if has_invalid_chars(shexc_str):<EOL><INDENT>print("<STR_LIT>")<EOL>return False<EOL><DEDENT>log = MemLogger('<STR_LIT:\t>')<EOL>logger = Logger(log)<EOL>shexj = parse(shexc_str)<EOL>shexj['<STR_LIT>'] = "<STR_LIT>"<EOL>if shexj is None:<EOL><INDENT>return False<EOL><DEDENT>shex_obj = jsg_loads(shexj._as_json, ShExJ)<EOL>if not shex_obj._is_valid(logger):<EOL><INDENT>print("<STR_LIT>".format(input_fname))<EOL>print(log.log)<EOL>return False<EOL><DEDENT>elif not compare_json(input_fname, shex_obj._as_json, log):<EOL><INDENT>print("<STR_LIT>".format(input_fname))<EOL>print(log.log)<EOL>return False<EOL><DEDENT>return True<EOL>
Validate json_str against ShEx Schema
:param shexc_str: String to validate
:param input_fname: Name of source file for error reporting
:return: True if pass