Exemplo n.º 1
0
        public override object Evaluate(BaseIterator iter)
        {
            BaseIterator iter2 = this.left.EvaluateNodeSet(iter);

            if (this.left.Peer && this.right.Subtree)
            {
                return(new SimpleSlashIterator(iter2, this.right));
            }
            BaseIterator iter3 = new SlashIterator(iter2, this.right);

            return(new SortedIterator(iter3));
        }
Exemplo n.º 2
0
        public override object Evaluate(BaseIterator iter)
        {
            BaseIterator iter2 = this.left.EvaluateNodeSet(iter);

            if (this.left.Peer && !this.left.RequireSorting)
            {
                iter2 = new SimpleSlashIterator(iter2, ExprSLASH2.DescendantOrSelfStar);
            }
            else
            {
                BaseIterator baseIterator = new SlashIterator(iter2, ExprSLASH2.DescendantOrSelfStar);
                iter2 = ((!this.left.RequireSorting) ? baseIterator : new SortedIterator(baseIterator));
            }
            SlashIterator iter3 = new SlashIterator(iter2, this.right);

            return(new SortedIterator(iter3));
        }
Exemplo n.º 3
0
 private SlashIterator(SlashIterator other) : base(other)
 {
     _iterLeft = (BaseIterator)other._iterLeft.Clone();
     if (other._iterRight != null)
     {
         _iterRight = (BaseIterator)other._iterRight.Clone();
     }
     _expr = other._expr;
     if (other._iterList != null)
     {
         _iterList = (SortedList)other._iterList.Clone();
     }
     _finished = other._finished;
     if (other._nextIterRight != null)
     {
         _nextIterRight = (BaseIterator)other._nextIterRight.Clone();
     }
 }
Exemplo n.º 4
0
		private SlashIterator (SlashIterator other) : base (other)
		{
			_iterLeft = (BaseIterator) other._iterLeft.Clone ();
			if (other._iterRight != null)
				_iterRight = (BaseIterator) other._iterRight.Clone ();
			_expr = other._expr;
			if (other._iterList != null)
				_iterList = (SortedList) other._iterList.Clone ();
			_finished = other._finished;
			if (other._nextIterRight != null)
				_nextIterRight = (BaseIterator) other._nextIterRight.Clone ();
		}
Exemplo n.º 5
0
		public override object Evaluate (BaseIterator iter)
		{
			BaseIterator il = left.EvaluateNodeSet (iter);
			if (left.Peer && !left.RequireSorting)
				il = new SimpleSlashIterator (
					il, DescendantOrSelfStar);
			else {
				BaseIterator bb = new SlashIterator (il, DescendantOrSelfStar);
				il = left.RequireSorting ? new SortedIterator (bb) : bb;
			}

			// FIXME: there could be chances to introduce sort-less
			// iterator, but no one could do it yet.
			SlashIterator b = new SlashIterator (il, right);
			return new SortedIterator (b);
		}
Exemplo n.º 6
0
		public override object Evaluate (BaseIterator iter)
		{
			// Peer and subtree optimization. see
			// http://idealliance.org/papers/dx_xmle04/papers/02-03-02/02-03-02.html
			BaseIterator iterLeft = left.EvaluateNodeSet (iter);
			if (left.Peer && right.Subtree)
				return new SimpleSlashIterator (iterLeft, right);
			BaseIterator si = new SlashIterator (iterLeft, right);
			return new SortedIterator (si);
		}