public static PathStep CreateFilter(XPath2Context context, object node, List <Object> predicateList) { if (predicateList.Count == 1) { AbstractNode predicate = AbstractNode.Create(context, predicateList[0]); ValueNode numexpr = predicate as ValueNode; if (numexpr != null && numexpr.Content is Integer) { PathStep res = Create(context, node); res.AddLast(new PathStep(numexpr.Content, XPath2ExprType.PositionFilter)); return(res); } } AbstractNode filterExpr = new FilterExprNode(context, node, predicateList); return(new PathStep(filterExpr)); }
public FollowingNodeIterator(XPath2Context context, object nodeTest, XPath2NodeIterator iter) : base(context, nodeTest, false, iter) { if (typeTest == null) { if (nameTest == null) { kind = XPathNodeType.All; } else { kind = XPathNodeType.Element; } } else { kind = typeTest.GetNodeKind(); } }
public FollowingSiblingNodeIterator(XPath2Context context, object nodeTest, XPath2NodeIterator iter) : base(context, nodeTest, false, iter) { }
public ContextItemNode(XPath2Context context) : base(context) { }
public ArithmeticBinaryOperatorNode(XPath2Context context, BinaryOperator action, object node1, object node2, GetReturnTypeDelegate returnTypeDelegate) : base(context, action, node1, node2, XPath2ResultType.Number) { _returnTypeDelegate = returnTypeDelegate; }
public ExprNode(XPath2Context context, object node) : base(context) { Add(node); }
public ValueNode(XPath2Context context, object value) : base(context) { _value = value; }
public OrderedBinaryOperatorNode(XPath2Context context, BinaryOperator action, object node1, object node2, XPath2ResultType resultType) : base(context, action, node1, node2, resultType) { }
public ParentNodeIterator(XPath2Context context, object nodeTest, XPath2NodeIterator iter) : base(context, nodeTest, false, iter) { }
public ForNode(XPath2Context context, Tokenizer.VarName varName, object expr) : base(context) { _varName = varName; Add(expr); }
public NamespaceNodeIterator(XPath2Context context, object nodeTest, XPath2NodeIterator iter) : base(context, nodeTest, false, iter) { }
public AttributeNodeIterator(XPath2Context context, object nodeTest, XPath2NodeIterator iter) : base(context, nodeTest, false, iter) { }
public VarRefNode(XPath2Context context, Tokenizer.VarName varRef) : base(context) { _varName = varRef; }
public ArithmeticUnaryOperatorNode(XPath2Context context, UnaryOperator action, object node) : base(context, action, node, XPath2ResultType.Number) { }
public XPath2NodeIterator Create(XPath2Context context, object[] dataPool, XPath2NodeIterator baseIter, bool special) { switch (type) { case XPath2ExprType.Attribute: return(new AttributeNodeIterator(context, nodeTest, baseIter)); case XPath2ExprType.Child: { if (special && nodeTest != SequenceType.Node) { return(new SpecialChildNodeIterator(context, nodeTest, baseIter)); } return(new ChildNodeIterator(context, nodeTest, baseIter)); } case XPath2ExprType.Descendant: { if (special && nodeTest != SequenceType.Node) { return(new SpecialDescendantNodeIterator(context, nodeTest, false, baseIter)); } return(new DescendantNodeIterator(context, nodeTest, false, baseIter)); } case XPath2ExprType.DescendantOrSelf: { if (special && nodeTest != SequenceType.Node) { return(new SpecialDescendantNodeIterator(context, nodeTest, true, baseIter)); } return(new DescendantNodeIterator(context, nodeTest, true, baseIter)); } case XPath2ExprType.Ancestor: return(new AncestorNodeIterator(context, nodeTest, false, baseIter)); case XPath2ExprType.AncestorOrSelf: return(new AncestorNodeIterator(context, nodeTest, true, baseIter)); case XPath2ExprType.Following: return(new FollowingNodeIterator(context, nodeTest, baseIter)); case XPath2ExprType.FollowingSibling: return(new FollowingSiblingNodeIterator(context, nodeTest, baseIter)); case XPath2ExprType.Parent: return(new ParentNodeIterator(context, nodeTest, baseIter)); case XPath2ExprType.Preceding: return(new PrecedingNodeIterator(context, nodeTest, baseIter)); case XPath2ExprType.PrecedingSibling: return(new PrecedingSiblingNodeIterator(context, nodeTest, baseIter)); case XPath2ExprType.Namespace: return(new NamespaceNodeIterator(context, nodeTest, baseIter)); case XPath2ExprType.Self: return(new SelfNodeIterator(context, nodeTest, baseIter)); case XPath2ExprType.Expr: return(new ExprNodeIterator(context, node, dataPool, baseIter)); case XPath2ExprType.PositionFilter: return(new PositionFilterNodeIterator(Convert.ToInt32(nodeTest), baseIter)); case XPath2ExprType.ChildOverDescendants: return(new ChildOverDescendantsNodeIterator(context, (ChildOverDescendantsNodeIterator.NodeTest[])nodeTest, baseIter)); default: return(null); } }
public FilterExprNode(XPath2Context context, object src, List <Object> nodes) : base(context) { Add(src); AddRange(nodes); }
public RangeNode(XPath2Context context, object node1, object node2) : base(context) { Add(node1); Add(node2); }
public AncestorNodeIterator(XPath2Context context, object nodeTest, bool matchSelf, XPath2NodeIterator iter) : base(context, nodeTest, matchSelf, iter) { }
public SequentialAxisNodeIterator(XPath2Context context, object nodeTest, bool matchSelf, XPath2NodeIterator iter) : base(context, nodeTest, matchSelf, iter) { }
public AbstractNode(XPath2Context context) { _context = context; }
public AtomizedUnaryOperatorNode(XPath2Context context, UnaryOperator action, object node, XPath2ResultType resultType) : base(context, action, node, resultType) { }
public AndExprNode(XPath2Context context, object node1, object node2) : base(context) { Add(node1); Add(node2); }
public ExprNode(XPath2Context context, AbstractNode node) : base(context) { Add(node); }