public virtual void FixHtmlNameSpace(Node root, string profile)
{
Node node;
//TODO:odd!
for (node = root.Content; node != null && node.Tag != Options.TagTable.TagHtml; node = node.Next)
{
}
if (node != null)
{
AttVal attr;
for (attr = node.Attributes; attr != null; attr = attr.Next)
{
if (attr.Attribute.Equals("xmlns"))
{
break;
}
}
if (attr != null)
{
if (!attr.Val.Equals(profile))
{
Report.Warning(this, node, null, Report.INCONSISTENT_NAMESPACE);
attr.Val = profile;
}
}
else
{
attr = new AttVal(node.Attributes, null, '"', "xmlns", profile);
attr.Dict = AttributeTable.DefaultAttributeTable.FindAttribute(attr);
node.Attributes = attr;
}
}
}