Example #1
0
 /// <summary>
 /// Retrieves previous item from current context position.
 /// </summary>
 /// <returns> the item from _rs, or null if there is no context item. </returns>
 public virtual AnyType context_item()
 {
     // idexes start at 0
     if (_cp > _rs.size())
     {
         return(null);
     }
     return((AnyType)_rs.item(_cp - 1));
 }
Example #2
0
 public virtual object[] toArray(object[] arg0)
 {
     if (arg0.Length < outerInstance.size())
     {
         arg0 = new Item[outerInstance.size()];
     }
     for (int i = 0; i < outerInstance.size(); ++i)
     {
         arg0[i] = rs.item(i);
     }
     return(arg0);
 }
        public static ResultSequence newToOld(org.eclipse.wst.xml.xpath2.api.ResultSequence result)
        {
            if (result is ResultSequence)
            {
                return((ResultSequence)result);
            }

            ResultSequence rs = ResultSequenceFactory.create_new();

            for (int i = 0; i < result.size(); ++i)
            {
                rs.add((AnyType)result.item(i));
            }
            return(rs);
        }