/* * Copyright (c) 2001, DecisionSoft Limited All rights reserved. * Please see LICENSE.TXT for more information. */ /* The result of a node comparison is defined by applying the following rules, in order: 1. Both operands must be either a single node or an empty sequence; otherwise the error value is returned. 2. If either operand is an empty sequence, the result of the comparison is an empty sequence. 3. A comparison with the is operator is true if the two operands are nodes that have the same identity; otherwise it is false. See [XQuery 1.0 and XPath 2.0 Data Model] for a discussion of node identity. */ #ifndef _NODECOMPARISON_HPP #define _NODECOMPARISON_HPP #include #include /** NodeComparison operator function*/ class PATHAN_EXPORT NodeComparison : public DataItemOperator { public: static const XMLCh name[]; ///this class returns true if the nodes are the same NodeComparison(const VectorOfDataItems &args, XPath2MemoryManager* memMgr); /** returns true of the nodes are identical */ Sequence collapseTreeInternal(DynamicContext* context, int flags=0) const; }; #endif // _FUNCTIONOPPLUS_HPP