1 //------------------------------------------------------------------------------ 2 // <copyright file="IXPathEnvironment.cs" company="Microsoft"> 3 // Copyright (c) Microsoft Corporation. All rights reserved. 4 // </copyright> 5 // <owner current="true" primary="true">sdub</owner> 6 //------------------------------------------------------------------------------ 7 using System.Collections.Generic; 8 using System.Xml.Xsl.Qil; 9 10 namespace System.Xml.Xsl.XPath { 11 12 // <spec>http://www.w3.org/TR/xslt20/#dt-focus</spec> 13 internal interface IFocus { 14 // The context item: the item currently being processed GetCurrent()15 QilNode GetCurrent(); 16 17 // The context position: the position of the context item within the sequence of items 18 // currently being processed GetPosition()19 QilNode GetPosition(); 20 21 // The context size: the number of items in the sequence of items currently being processed GetLast()22 QilNode GetLast(); 23 } 24 25 internal interface IXPathEnvironment : IFocus { 26 XPathQilFactory Factory { get; } 27 28 // Resolution of variables, functions, and prefixes ResolveVariable(string prefix, string name)29 QilNode ResolveVariable(string prefix, string name); ResolveFunction(string prefix, string name, IList<QilNode> args, IFocus env)30 QilNode ResolveFunction(string prefix, string name, IList<QilNode> args, IFocus env); ResolvePrefix(string prefix)31 string ResolvePrefix (string prefix); 32 } 33 } 34