2 * The contents of this file are subject to the Mozilla Public
3 * License Version 1.1 (the "License"); you may not use this file
4 * except in compliance with the License. You may obtain a copy of
5 * the License at http://www.mozilla.org/MPL/
7 * Software distributed under the License is distributed on an "AS
8 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9 * implied. See the License for the specific language governing
10 * rights and limitations under the License.
12 * The Original Code is the Sablotron XSLT Processor.
14 * The Initial Developer of the Original Code is Ginger Alliance Ltd.
15 * Portions created by Ginger Alliance are Copyright (C) 2000-2002
16 * Ginger Alliance Ltd. All Rights Reserved.
20 * Alternatively, the contents of this file may be used under the
21 * terms of the GNU General Public License Version 2 or later (the
22 * "GPL"), in which case the provisions of the GPL are applicable
23 * instead of those above. If you wish to allow use of your
24 * version of this file only under the terms of the GPL and not to
25 * allow others to use your version of this file under the MPL,
26 * indicate your decision by deleting the provisions above and
27 * replace them with the notice and other provisions required by
28 * the GPL. If you do not delete the provisions above, a recipient
29 * may use your version of this file under either the MPL or the
38 /*****************************************************************
42 *****************************************************************/
49 class CList : public SList<NodeHandle>
55 virtual int compare(int i, int j, void *data);
56 virtual void swap(int i, int j);
59 eFlag sort(Sit S, XSLElement *caller, Context*, SortDefList* sortDefs_ = NULL);
61 Bool wcsValues; //says whether values are wcsxfrm'ed
63 List<int> tags; //used for the nested sort
66 SortDefList *sortDefs;
67 eFlag makeValues(Sit S, int from, int to, int level,
68 XSLElement *caller, Context *ctxt);
70 int compareWithoutDocOrd(int i, int j);
71 Bool tagChanged(int i, int j);
72 void report(Sit S, MsgType type, MsgCode code, const Str& arg1, const Str& arg2);
76 /*****************************************************************
80 expression evaluation context
82 *****************************************************************/
90 Context(NodeHandle current, Bool isForKey_ = FALSE);
99 getCurrentNode() const;
101 setCurrentNode(NodeHandle);
113 setVirtual(NodeHandle v, int virtualPosition_, int virtualSize_);
115 operator[] (int) const;
125 *swallow(Sit S, Context *);
129 contains(NodeHandle v) const;
131 KList* getKeyArray();
133 eFlag sort(Sit S, XSLElement *caller = NULL, SortDefList* sortDefs_ = NULL)
135 assert(caller || !sortDefs_);
136 E( array -> sort(S, caller, this, sortDefs_) );
140 CList* getArrayForDOM();
146 void setPosition(int pos)
157 #endif //ifndef ContextHIncl