private void ParseValidationAttribute(int attNum, bool defVal)
{
Debug.Assert(!_input.IsRequiredAttribute(attNum), "All 'validation' attributes are optional.");
string attributeName = defVal ? _atoms.DefaultValidation : "validation";
if (_input.MoveToXsltAttribute(attNum, attributeName))
{
string value = _input.Value;
if (value == "strip")
{
// no error
}
else if (
value == "preserve" ||
value == "strict" && !defVal ||
value == "lax" && !defVal
)
{
ReportError(/*[???]*/SR.Xslt_SchemaAttributeValue, attributeName, value);
}
else if (!_input.ForwardCompatibility)
{
ReportError(/*[???]*/SR.Xslt_InvalidAttrValue, attributeName, value);
}
}
}