internal override XmlNameSemantics?TryXmlSemantics() { var xmlSemantics = XmlNameSemantics.FromName(_name); if (xmlSemantics.Prefix != null) { return(xmlSemantics); } return(null); }
private bool TryExtractXmlnsPrefixMapping(DomAttribute a, out string prefix) { // xmlns attributes are never mapped to QNames, so we can assert directly // on the format of the attribute // TODO This could be re-entrant due to a.LocalName referencing // DomName => XmlNameContext => this resolver var xml = XmlNameSemantics.FromName(a.LocalName); if (xml.Prefix == "xmlns") { prefix = xml.LocalName; return(true); } prefix = null; return(false); }