* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / System.XML / Mono.Xml.XPath / IdPattern.cs
index 696100713ab2038436ee7b79ffe3d94de5d35b58..b4d6f4b5bb49d2e4c6dc4e27314c2aafaa89910f 100644 (file)
@@ -35,6 +35,7 @@ using System.Xml;
 using System.Xml.Schema;
 using System.Xml.XPath;
 using System.Xml.Xsl;
+using Mono.Xml.Xsl;
 
 namespace Mono.Xml.XPath {
        internal class IdPattern : LocationPathPattern {
@@ -46,10 +47,14 @@ namespace Mono.Xml.XPath {
                {
                        ids = arg0.Split (XmlChar.WhitespaceChars);
                }
-               
+
+               public override XPathNodeType EvaluatedNodeType {
+                       get { return XPathNodeType.Element; }
+               }
+
                public override bool Matches (XPathNavigator node, XsltContext ctx)
                {
-                       XPathNavigator tmp = node.Clone ();
+                       XPathNavigator tmp = ((XsltCompiledContext) ctx).GetNavCache (this, node);
                        for (int i = 0; i < ids.Length; i++)
                                if (tmp.MoveToId (ids [i]) && tmp.IsSamePosition (node))
                                        return true;