01: package net.sf.saxon.expr;
02:
03: /**
04: * Generic interface representing a variable declaration in the static context of an XPath expression.
05: * The declaration may be internal or external to the XPath expression itself. An external
06: * VariableDeclaration is identified (perhaps created) by the bindVariable() method in the StaticContext.
07: */
08:
09: public interface VariableDeclaration {
10:
11: /**
12: * Method called by a BindingReference to register the variable reference for
13: * subsequent fixup.
14: * This method is called by the XPath parser when
15: * each reference to the variable is encountered. At some time after parsing and before execution of the
16: * expression, the VariableDeclaration is responsible for calling the two methods setStaticType()
17: * and fixup() on each BindingReference that has been registered with it.<br>
18: */
19:
20: public void registerReference(BindingReference ref);
21:
22: /**
23: * Get the fingerprint code that identifies the name of the variable
24: */
25:
26: public int getNameCode();
27:
28: /**
29: * Get the name of the variable for use in diagnostics - a lexical QName
30: */
31:
32: public String getVariableName();
33:
34: }
35:
36: //
37: // The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
38: // you may not use this file except in compliance with the License. You may obtain a copy of the
39: // License at http://www.mozilla.org/MPL/
40: //
41: // Software distributed under the License is distributed on an "AS IS" basis,
42: // WITHOUT WARRANTY OF ANY KIND, either express or implied.
43: // See the License for the specific language governing rights and limitations under the License.
44: //
45: // The Original Code is: all this file.
46: //
47: // The Initial Developer of the Original Code is Michael H. Kay
48: //
49: // Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
50: //
51: // Contributor(s): none.
52: //
|