1 package com.icl.saxon.style; 2 import com.icl.saxon.*; 3 import javax.xml.transform.*; 4 5 /** 6 * A procedure represents a top-level element that can contain local variable declarations. 7 * Specifically, a top-level xsl:template, xsl:variable, xsl:param, or saxon:function element 8 * or an xsl:attribute-set element. 9 */ 10 11 public class Procedure { 12 13 protected int numberOfVariables = 0; 14 15 /** 16 * Get number of variables (size of stack frame) 17 */ 18 19 public int getNumberOfVariables() { 20 return numberOfVariables; 21 } 22 23 /** 24 * Allocate a slot number for a variable 25 */ 26 27 public int allocateSlotNumber() { 28 return numberOfVariables++; 29 } 30 31 } 32 33 // 34 // The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); 35 // you may not use this file except in compliance with the License. You may obtain a copy of the 36 // License at http://www.mozilla.org/MPL/ 37 // 38 // Software distributed under the License is distributed on an "AS IS" basis, 39 // WITHOUT WARRANTY OF ANY KIND, either express or implied. 40 // See the License for the specific language governing rights and limitations under the License. 41 // 42 // The Original Code is: all this file. 43 // 44 // The Initial Developer of the Original Code is 45 // Michael Kay of International Computers Limited (mhkay@iclway.co.uk). 46 // 47 // Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved. 48 // 49 // Contributor(s): none. 50 // 51