public override void WriteStartAttribute(string prefix, string localName, string ns) {
Debug.Assert(prefix != null && localName != null && ns != null, "Invalid argument");
if (prefix.Length == 5 && prefix == "xmlns") {
// Handle namespace attributes that are not sent directly to WriteNamespaceDeclaration
WriteStartNamespace(localName);
}
else {
// All other attributes
Debug.Assert(ValidateNames.ValidateName(prefix, localName, ns, XPathNodeType.Attribute, ValidateNames.Flags.All));
// Xml state transitions
ConstructInEnumAttrs(XPathNodeType.Attribute);
// Check for prefix conflicts and possibly declare prefix
if (ns.Length != 0 && this.depth != 0)
prefix = CheckAttributePrefix(prefix, ns);
// Output the attribute
WriteStartAttributeUnchecked(prefix, localName, ns);
}
}