Example #1
0
        private void CreateElement()
        {
            var element = new XPathAxisElement(lastElement);

            if (lastPredicate != null)
            {
                element.Predicates.Add(lastPredicate);
            }

            this.AxisElementQueue.Enqueue(element);

            lastPredicate = null;
            lastElement   = null;
        }
Example #2
0
        public string Operator(XPathOperator op, string left, string right)
        {
            Debug.Assert(op != XPathOperator.Union);

            if (op == XPathOperator.UnaryMinus)
            {
                return("-" + left);
            }

            if (left.StartsWith("attribute::"))
            {
                left = left.Remove(0, "attribute::".Length);
            }

            lastPredicate = new XPathPredicate(left, op, right);

            return(left + opStrings[(int)op] + right);
        }