MatchesXsBoolean🔗
Check that
text conforms to the pattern of an xs:boolean.
Code
pattern = "^(true|false|1|0)$"
return match(pattern, text) is not None