internal bool MoveToFirstNamespace(XPathNamespaceScope namespaceScope)
{
RealFoliate();
_parentOfNS = _node as XmlBoundElement;
//only need to check with _node, even if _column is not null and its mapping type is element, it can't have attributes
if (_parentOfNS == null)
return false;
XmlNode node = _node;
XmlBoundElement be = null;
while (node != null)
{
be = node as XmlBoundElement;
if (MoveToNextNamespace(be, null, null))
return true;
//didn't find it
if (namespaceScope == XPathNamespaceScope.Local)
goto labelNoNS;
//try the next element anccestor.
do
{
node = node.ParentNode;
} while (node != null && node.NodeType != XmlNodeType.Element);
}
if (namespaceScope == XPathNamespaceScope.All)
{
MoveTo(_doc._attrXml, null, false);
return true;
}
labelNoNS:
//didn't find one namespace node
_parentOfNS = null;
return false;
}