private void BeginNamespace(string name, string nspace)
{
bool thisScope = false;
if (Ref.Equal(name, _atoms.Empty))
{
if (Ref.Equal(nspace, _scopeManager.DefaultNamespace))
{
// Main Node is OK
}
else if (Ref.Equal(_mainNode.NamespaceURI, _atoms.Empty))
{
// http://www.w3.org/1999/11/REC-xslt-19991116-errata/ E25
// Should throw an error but ingnoring it in Everett.
// Would be a breaking change
}
else
{
DeclareNamespace(nspace, name);
}
}
else
{
string?nspaceDeclared = _scopeManager.ResolveNamespace(name, out thisScope);
if (nspaceDeclared != null)
{
if (!Ref.Equal(nspace, nspaceDeclared))
{
if (!thisScope)
{
DeclareNamespace(nspace, name);
}
}
}
else
{
DeclareNamespace(nspace, name);
}
}
_currentInfo = _dummy;
_currentInfo.NodeType = XmlNodeType.Attribute;
}