KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > saxon > trace > Location


1 package net.sf.saxon.trace;
2
3 /**
4  * This class holds constants identifying different kinds of location in a source stylesheet or query.
5  * These constants are used in the getConstructType() method of class InstructionInfo. Some of these
6  * locations represent points where the dynamic context changes, and they are therefore recorded as
7  * such on the context stack. Some of the locations represent points in the evaluation of a stylesheet
8  * (or query or XPath expression) that are notified to the trace listener. Some fulfil both roles.
9  *
10  * <p>Any constant used in {@link net.sf.saxon.style.StandardNames} can be used as a Location. Such
11  * names are generally used to identify XSLT instructions. They are also used for equivalent constructs
12  * in XQuery, for example XSL_ELEMENT is used for a computed element constructor in XQuery. The constants
13  * in StandardNames are all in the range 0-1023, so constants defined in this class are outside this
14  * range.</p>
15  *
16  * <p>The constants in this file are annotated with Q to indicate they can appear in XQuery trace output,
17  * T to indicate they can appear in XSLT trace output, and/or C to indicate that they can appear on the
18  * dynamic context stack.</p>
19  */

20 public class Location {
21
22     /**
23      * The outer system environment, identified as the caller of a user query or stylesheet.
24      * Usage:C
25      */

26     public static final int CONTROLLER = 2000;
27
28
29     /**
30      * An XSLT instruction. The name of the instruction (which may be an extension instruction) can
31      * be obtained using the fingerprint property. Usage:T
32      */

33     public static final int EXTENSION_INSTRUCTION = 2005;
34
35     /**
36      * An XSLT literal result element, or an XQuery direct element constructor. Usage:QT
37      */

38     public static final int LITERAL_RESULT_ELEMENT = 2006;
39
40     /**
41      * An attribute of an XSLT literal result element or of an XQuery direct element constructor.
42      * Usage: QT
43      */

44     public static final int LITERAL_RESULT_ATTRIBUTE = 2007;
45
46     /**
47      * An XPath function call to a user-defined function.
48      * The "expression" property references the actual expression, of class ComputedExpression.
49      * The "target" property references the function being called, of class UserFunction.
50      * Usage: QTC
51      */

52     public static final int FUNCTION_CALL = 2009;
53
54     /**
55      * An XSLT built-in template rule. Usage: TC
56      */

57     public static final int BUILT_IN_TEMPLATE = 2010;
58
59     /**
60      * Entry point to a top-level XPath expression within an XSLT stylesheet.
61      * Usage: TC
62      */

63
64     public static final int XPATH_IN_XSLT = 2011;
65
66     /**
67      * An XPath or XQuery "for" clause. Usage: Q
68      */

69
70     public static final int FOR_EXPRESSION = 2012;
71
72     /**
73      * An XQuery "let" clause, or an XSLT local variable (which compiles into a LET clause).
74      * Usage: Q,T
75      */

76
77     public static final int LET_EXPRESSION = 2013;
78
79     /**
80      * An XPath or XQuery "return" clause. Usage: Q
81      */

82
83     public static final int RETURN_EXPRESSION = 2014;
84
85
86     /**
87      * An XPath or XQuery "if" expression. Usage: Q
88      */

89
90     public static final int IF_EXPRESSION = 2015;
91
92     /**
93      * An XPath or XQuery "then" clause. Usage: Q
94      */

95
96     public static final int THEN_EXPRESSION = 2016;
97
98     /**
99      * An XPath or XQuery "else" clause. Usage: Q
100      */

101
102     public static final int ELSE_EXPRESSION = 2017;
103
104     /**
105      * A WHERE clause in a FLWOR expression. Usage: Q
106      */

107
108     public static final int WHERE_CLAUSE = 2018;
109
110     /**
111      * An order-by clause in a FLWOR expression. Usage: Q
112      */

113
114     public static final int ORDER_BY_CLAUSE = 2019;
115
116     /**
117      * An XPath or XQuery "typeswitch" expression. Usage: Q
118      */

119
120     public static final int TYPESWITCH_EXPRESSION = 2020;
121
122     /**
123      * CASE clause within "typeswitch". Usage: Q
124      */

125
126     public static final int CASE_EXPRESSION = 2021;
127
128     /**
129      * DEFAULT clause within "typeswitch". Usage: Q
130      */

131
132     public static final int DEFAULT_EXPRESSION = 2022;
133
134     /**
135      * An XPath or XQuery "validate" expression. Usage: Q
136      */

137
138     public static final int VALIDATE_EXPRESSION = 2023;
139
140     /**
141      * An XPath or XQuery filter expression. Usage: C
142      */

143
144     public static final int FILTER_EXPRESSION = 2024;
145
146      /**
147      * An XPath or XQuery path expression. Usage: C
148      */

149
150     public static final int PATH_EXPRESSION = 2025;
151
152     /**
153      * An explicit call of the fn:trace() function. Usage: QT
154      */

155
156     public static final int TRACE_CALL = 2031;
157
158     /**
159      * An XPath expression constructed dynamically using saxon:evaluate (or saxon:expression).
160      * Usage: QTC
161      */

162
163     public static final int SAXON_EVALUATE = 2051;
164
165     /**
166      * A higher-order extension function such as saxon:sum, saxon:highest. Usage: C
167      */

168
169     public static final int SAXON_HIGHER_ORDER_EXTENSION_FUNCTION = 2052;
170
171     /**
172      * The saxon:serialize() extension function. Usage: C
173      */

174
175     public static final int SAXON_SERIALIZE = 2053;
176
177     /**
178      * A sort key (or order-by key). Usage: C
179      */

180
181     public static final int SORT_KEY = 2061;
182
183     /**
184      * A grouping key in XSLT. Usage: C
185      */

186
187     public static final int GROUPING_KEY = 2062;
188
189     /**
190      * Lazy evaluation of an expression (this code is used to identify a context created as a saved
191      * copy of an existing context, to be stored in a Closure). Usage: C
192      */

193
194     public static final int LAZY_EVALUATION = 2063;
195
196     /**
197      * An XSLT Pattern. Usage: C
198      */

199
200     public static final int PATTERN = 2064;
201
202     /**
203      * XPath expression, otherwise unclassified. The "expression" property references the actual expression,
204      * of class ComputedExpression. Used in fallback cases only.
205      */

206     public static final int XPATH_EXPRESSION = 2098;
207
208     /**
209      * Unclassified location. Used in fallback cases only.
210      */

211     public static final int UNCLASSIFIED = 2099;
212
213     private Location() {
214     }
215 }
216
217
218 //
219
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
220
// you may not use this file except in compliance with the License. You may obtain a copy of the
221
// License at http://www.mozilla.org/MPL/
222
//
223
// Software distributed under the License is distributed on an "AS IS" basis,
224
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
225
// See the License for the specific language governing rights and limitations under the License.
226
//
227
// The Original Code is: all this file.
228
//
229
// The Initial Developer of the Original Code is Michael H. Kay
230
//
231
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
232
//
233
// Contributor(s): none
234
//
Popular Tags