The Labs \ Source Viewer \ SSCLI \ System.Xml.Xsl.XPath \ IFocus

  1. //------------------------------------------------------------------------------
  2. // <copyright file="IXPathEnvironment.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. using System.Collections.Generic;
  16. using System.Xml.Xsl.Qil;
  17. namespace System.Xml.Xsl.XPath
  18. {
  19.    
  20.     // <spec>http://www.w3.org/TR/xslt20/#dt-focus</spec>
  21.     internal interface IFocus
  22.     {
  23.         // The context item: the item currently being processed
  24.         QilNode GetCurrent();
  25.        
  26.         // The context position: the position of the context item within the sequence of items
  27.         // currently being processed
  28.         QilNode GetPosition();
  29.        
  30.         // The context size: the number of items in the sequence of items currently being processed
  31.         QilNode GetLast();
  32.     }
  33.    
  34.     internal interface IXPathEnvironment : IFocus
  35.     {
  36.         XPathQilFactory Factory {
  37.             get;
  38.         }
  39.        
  40.         // Resolution of variables, functions, and prefixes
  41.         QilNode ResolveVariable(string prefix, string name);
  42.         QilNode ResolveFunction(string prefix, string name, IList<QilNode> args, IFocus env);
  43.         string ResolvePrefix(string prefix);
  44.     }
  45. }

Developer Fusion