1 //------------------------------------------------------------------------------
2 // <copyright file="AbsoluteQuery.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
5 // <owner current="true" primary="true">[....]</owner>
6 //------------------------------------------------------------------------------
8 namespace MS.Internal.Xml.XPath {
11 using System.Xml.XPath;
12 using System.Diagnostics;
13 using System.Globalization;
15 internal sealed class AbsoluteQuery : ContextQuery {
16 public AbsoluteQuery() : base() {}
17 private AbsoluteQuery(AbsoluteQuery other) : base(other) {}
19 public override object Evaluate(XPathNodeIterator context) {
20 base.contextNode = context.Current.Clone();
21 base.contextNode.MoveToRoot();
26 public override XPathNavigator MatchNode(XPathNavigator context) {
27 if (context != null && context.NodeType == XPathNodeType.Root) {
33 public override XPathNodeIterator Clone() { return new AbsoluteQuery(this); }