internal XmlQualifiedName ToXmlQualifiedName(string value, bool decodeName)
{
int colon = value == null ? -1 : value.LastIndexOf(':');
string prefix = colon < 0 ? null : value.Substring(0, colon);
string localName = value.Substring(colon + 1);
if (decodeName)
{
prefix = XmlConvert.DecodeName(prefix);
localName = XmlConvert.DecodeName(localName);
}
if (prefix == null || prefix.Length == 0)
{
return new XmlQualifiedName(_r.NameTable.Add(value), _r.LookupNamespace(String.Empty));
}
else
{
string ns = _r.LookupNamespace(prefix);
if (ns == null)
{
// Namespace prefix '{0}' is not defined.
throw new InvalidOperationException(SR.Format(SR.XmlUndefinedAlias, prefix));
}
return new XmlQualifiedName(_r.NameTable.Add(localName), ns);
}
}
protected void UnknownAttribute(object o, XmlAttribute attr)