01: package net.sf.saxon.expr;
02:
03: import net.sf.saxon.om.ValueRepresentation;
04: import net.sf.saxon.trans.XPathException;
05:
06: /**
07: * Binding is a interface used to represent the run-time properties and methods
08: * associated with a variable: specifically, a method to get the value
09: * of the variable.
10: */
11:
12: public interface Binding {
13:
14: /**
15: * Evaluate the variable
16: */
17:
18: public ValueRepresentation evaluateVariable(XPathContext context)
19: throws XPathException;
20:
21: /**
22: * Indicate whether the binding is local or global. A global binding is one that has a fixed
23: * value for the life of a query or transformation; any other binding is local.
24: */
25:
26: public boolean isGlobal();
27:
28: /**
29: * Test whether it is permitted to assign to the variable using the saxon:assign
30: * extension element. This will only be for an XSLT global variable where the extra
31: * attribute saxon:assignable="yes" is present.
32: */
33:
34: public boolean isAssignable();
35:
36: /**
37: * If this is a local variable held on the local stack frame, return the corresponding slot number.
38: * In other cases, return -1.
39: */
40:
41: public int getLocalSlotNumber();
42:
43: }
44:
45: //
46: // The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
47: // you may not use this file except in compliance with the License. You may obtain a copy of the
48: // License at http://www.mozilla.org/MPL/
49: //
50: // Software distributed under the License is distributed on an "AS IS" basis,
51: // WITHOUT WARRANTY OF ANY KIND, either express or implied.
52: // See the License for the specific language governing rights and limitations under the License.
53: //
54: // The Original Code is: all this file.
55: //
56: // The Initial Developer of the Original Code is Michael H. Kay.
57: //
58: // Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
59: //
60: // Contributor(s): none.
61: //
|