* Compiler.cs : XPathNavigatorNsm needed more love. Clone() does not
make sense here.
svn path=/trunk/mcs/; revision=36891
+2004-12-01 Atsushi Enomoto <atsushi@ximian.com>
+
+ * Compiler.cs : XPathNavigatorNsm needed more love. Clone() does not
+ make sense here.
+
2004-12-01 Atsushi Enomoto <atsushi@ximian.com>
* Compiler.cs : don't create XPathNavigatorNsm for every GetNsm() call.
XPathNavigator nsScope;
public XPathNavigatorNsm (XPathNavigator n) : base (n.NameTable) {
- nsScope = n.Clone ();
- if (nsScope.NodeType == XPathNodeType.Attribute)
- nsScope.MoveToParent ();
+ nsScope = n;
}
public XPathNavigator Navigator {
if (prefix == "" || prefix == null)
return "";
- return nsScope.GetNamespace (prefix);
+ XPathNavigator n = nsScope;
+ if (nsScope.NodeType == XPathNodeType.Attribute) {
+ n = nsScope.Clone ();
+ n.MoveToParent ();
+ }
+
+ return n.GetNamespace (prefix);
}
}
}