/* * Copyright (c) 2001, DecisionSoft Limited All rights reserved. * Please see LICENSE.TXT for more information. */ /* 11.1.7 op:node-before op:node-before(node $parameter1, node $parameter2) => boolean If the node identified by the value of $parameter1 occurs in document order before the node identified by the value of $parameter2, this function returns true; otherwise, it returns false. The rules determining the order of nodes within a single document and in different documents can be found in [XQuery 1.0 and XPath 2.0 Data Model]. This function backs up the "<<" operator. 11.1.7.1 Examples * op:node-before($item1, $item2) returns true. * op:node-before($item1, $item1) returns false. 11.1.8 op:node-after op:node-after(node $parameter1, node $parameter2) => boolean If the node identified by the value of $parameter1 occurs in document after the node identified by the value of $parameter2, this function returns true; otherwise, it returns false. The rules determining the order of nodes within a single document and in different documents can be found in [XQuery 1.0 and XPath 2.0 Data Model]. This function backs up the ">>" operator. 11.1.8.1 Examples * op:node-after($item1, $item2) returns false. * op:node-after($item1, $item1) returns false. */ #ifndef _ORDERCOMPARISON_HPP #define _ORDERCOMPARISON_HPP #include #include /** OpPlus operator function*/ class PATHAN_EXPORT OrderComparison : public DataItemOperator { public: static const XMLCh name[]; ///testBefore should be set to true if you want to test that the first parameter is before the second. OrderComparison(const VectorOfDataItems &args, bool testBefore, XPath2MemoryManager* memMgr); ///if testBefore is true then this method returns true if the node in the first paremeter is before the node in the second Sequence collapseTreeInternal(DynamicContext* context, int flags=0) const; private: bool _testBefore; }; #endif // _FUNCTIONOPPLUS_HPP