01: package net.sf.saxon.expr;
02:
03: import net.sf.saxon.trans.XPathException;
04: import net.sf.saxon.value.Value;
05: import net.sf.saxon.om.ValueRepresentation;
06:
07: /**
08: * An EagerLetExpression is the same as a LetExpression except that the variable is evaluated using
09: * eager evaluation rather than lazy evaluation. This is used when performing diagnostic tracing.
10: */
11:
12: public class EagerLetExpression extends LetExpression {
13:
14: public EagerLetExpression() {
15: }
16:
17: /**
18: * Evaluate the variable.
19: */
20:
21: protected ValueRepresentation eval(XPathContext context)
22: throws XPathException {
23: return ExpressionTool.eagerEvaluate(sequence, context);
24: }
25:
26: }
27:
28: //
29: // The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
30: // you may not use this file except in compliance with the License. You may obtain a copy of the
31: // License at http://www.mozilla.org/MPL/
32: //
33: // Software distributed under the License is distributed on an "AS IS" basis,
34: // WITHOUT WARRANTY OF ANY KIND, either express or implied.
35: // See the License for the specific language governing rights and limitations under the License.
36: //
37: // The Original Code is: all this file.
38: //
39: // The Initial Developer of the Original Code is Michael H. Kay
40: //
41: // Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
42: //
43: // Contributor(s): none.
44: //
|