def getTypedValue(data_type, value):
if data_type == '<STR_LIT>':<EOL><INDENT>return True if value.lower() == '<STR_LIT:true>' else False<EOL><DEDENT>elif data_type == '<STR_LIT>':<EOL><INDENT>return int(value)<EOL><DEDENT>elif data_type == '<STR_LIT:float>':<EOL><INDENT>return float(value)<EOL><DEDENT>elif data_type == '<STR_LIT:string>':<EOL><INDENT>return str(value)<EOL><DEDENT>else:<EOL><INDENT>return value<EOL><DEDENT>
Utility function to cast a string value to the appropriate XSD type.