def is_attr_true( element, name ):
	"""Read a name value from an element's attributes.
	
	The value read from the attribute list must be either 'true' or
	'false'.  If the value is 'false', zero will be returned.  If the
	value is 'true', non-zero will be returned.  An exception will be
	raised for any other value."""

	value = element.nsProp( name, None )
	if value == "true":
		return 1
	elif value == "false":
		return 0
	else:
		raise RuntimeError('Invalid value "%s" for boolean "%s".' % (value, name))