예제 #1
0
 public static QilNode GetCurrentPosition(QilFactory f, QilTuple context) {
     Debug.Assert(context != null);
     if (context.Where.Type != QilNodeType.True) {
         Debug.Assert(context.For.Type == QilNodeType.For);
         // convert context (1) --> (2)
         QilIterator for2 = f.For(context.For.Binding);
         QilNode     cnd2 = new Replacer(f).Replace(/*inExpr:*/context.Where, /*from:*/context.For, /*to:*/for2);
         context.For.Binding = f.OldTuple(for2, cnd2, for2);
         context.Where = f.True();
     }
     return f.Convert(f.PositionOf((QilIterator)XPathContext.GetCurrentNode(context)), f.TypeFactory.Double());
 }
예제 #2
0
 public static QilNode GetCurrentPosition(QilFactory f, QilTuple context)
 {
     Debug.Assert(context != null);
     if (context.Where.Type != QilNodeType.True)
     {
         Debug.Assert(context.For.Type == QilNodeType.For);
         // convert context (1) --> (2)
         QilIterator for2 = f.For(context.For.Binding);
         QilNode     cnd2 = new Replacer(f).Replace(/*inExpr:*/ context.Where, /*from:*/ context.For, /*to:*/ for2);
         context.For.Binding = f.OldTuple(for2, cnd2, for2);
         context.Where       = f.True();
     }
     return(f.Convert(f.PositionOf((QilIterator)XPathContext.GetCurrentNode(context)), f.TypeFactory.Double()));
 }
예제 #3
0
 public static QilNode GetLastPosition(QilFactory f, QilTuple context)
 {
     return(f.Convert(f.Length(context.Clone(f)), f.TypeFactory.Double()));
 }
예제 #4
0
 public static QilNode GetLastPosition(QilFactory f, QilTuple context) {
     return f.Convert(f.Length(context.Clone(f)), f.TypeFactory.Double());
 }