internal bool GetBooleanAttribute(XmlSchemaAnnotated element, string attrName, bool defVal)
{
string value = GetMsdataAttribute(element, attrName);
if (value == null || value.Length == 0)
{
return defVal;
}
if ((value == Keywords.TRUE) || (value == Keywords.ONE_DIGIT))
{
return true;
}
if ((value == Keywords.FALSE) || (value == Keywords.ZERO_DIGIT))
{
return false;
}
// Error processing:
throw ExceptionBuilder.InvalidAttributeValue(attrName, value);
}