Index: mcs/class/System.XML/System.Xml.XPath/Expression.cs
===================================================================
RCS file: /mono/mcs/class/System.XML/System.Xml.XPath/Expression.cs,v
retrieving revision 1.8
diff -u -p -r1.8 Expression.cs
--- mcs/class/System.XML/System.Xml.XPath/Expression.cs	21 Sep 2002 18:26:49 -0000	1.8
+++ mcs/class/System.XML/System.Xml.XPath/Expression.cs	8 Feb 2003 19:12:06 -0000
@@ -21,7 +21,7 @@ namespace System.Xml.XPath
 	internal class CompiledExpression : XPathExpression
 #endif
 	{
-		protected XmlNamespaceManager _nsm;
+		protected XmlNamespaceManager _nsm = new XmlNamespaceManager(new NameTable());
 		protected Expression _expr;
 
 		public CompiledExpression (Expression expr)
@@ -44,6 +44,8 @@ namespace System.Xml.XPath
 			_nsm = nsManager;
 		}
 		public override String Expression { get { return _expr.ToString (); }}
+		public XmlNamespaceManager NsManager { get { return _nsm; }}
+
 		public override XPathResultType ReturnType { get { return _expr.ReturnType; }}
 		[MonoTODO]
 		public override void AddSort (Object obj, IComparer cmp)
Index: mcs/class/System.XML/System.Xml.XPath/XPathNavigator.cs
===================================================================
RCS file: /mono/mcs/class/System.XML/System.Xml.XPath/XPathNavigator.cs,v
retrieving revision 1.11
diff -u -p -r1.11 XPathNavigator.cs
--- mcs/class/System.XML/System.Xml.XPath/XPathNavigator.cs	21 Sep 2002 18:26:49 -0000	1.11
+++ mcs/class/System.XML/System.Xml.XPath/XPathNavigator.cs	8 Feb 2003 19:12:06 -0000
@@ -9,6 +9,7 @@
 
 using System;
 using Mono.Xml.XPath;
+using System.Xml.Xsl;
 
 namespace System.Xml.XPath
 {
@@ -184,8 +185,16 @@ namespace System.Xml.XPath
 
 		public virtual XPathNodeIterator Select (XPathExpression expr)
 		{
-			BaseIterator iter = new NullIterator (this, new DefaultContext ());
-			return ((CompiledExpression) expr).EvaluateNodeSet (iter);
+			CompiledExpression localExpr = expr as CompiledExpression;
+
+			XsltContext context = new DefaultContext ();
+
+			foreach(string ns in localExpr.NsManager)
+				context.AddNamespace(ns, localExpr.NsManager.LookupNamespace (ns));
+
+			BaseIterator iter = new NullIterator (this, context);
+
+			return localExpr.EvaluateNodeSet (iter);
 		}
 
 		public virtual XPathNodeIterator SelectAncestors (XPathNodeType type, bool matchSelf)
Index: mcs/class/System.XML/Test/SelectNodesTests.cs
===================================================================
RCS file: /mono/mcs/class/System.XML/Test/SelectNodesTests.cs,v
retrieving revision 1.3
diff -u -p -r1.3 SelectNodesTests.cs
--- mcs/class/System.XML/Test/SelectNodesTests.cs	1 Jan 2003 17:37:42 -0000	1.3
+++ mcs/class/System.XML/Test/SelectNodesTests.cs	8 Feb 2003 19:12:07 -0000
@@ -223,5 +223,15 @@ namespace MonoTests.System.Xml
 			AssertEquals (1, nodes.Count);
 			AssertSame (document.DocumentElement, nodes [0]);
 		}
+
+		public void TestNamespaceSelect()
+		{
+			XmlDocument document = new XmlDocument ();
+			document.LoadXml ("<root xmlns=\"urn:foo1:foo2\"/>");
+			XmlNamespaceManager nsmgr = new XmlNamespaceManager(document.NameTable);
+			nsmgr.AddNamespace("foons", "urn:foo1:foo2");
+			XmlNodeList nodes = document.SelectNodes ("/foons:root", nsmgr);
+			AssertEquals (1, nodes.Count);
+		}
 	}
 }
