1 package net.sf.saxon.query; 2 3 import net.sf.saxon.expr.BindingReference; 4 import net.sf.saxon.expr.VariableDeclaration; 5 import net.sf.saxon.instruct.GlobalVariable; 6 import net.sf.saxon.trans.XPathException; 7 8 import java.util.Collections ; 9 import java.util.Iterator ; 10 11 16 17 public class UndeclaredVariable extends GlobalVariableDefinition { 18 19 public void transferReferences(VariableDeclaration var) { 20 Iterator iter = references.iterator(); 21 while (iter.hasNext()) { 22 BindingReference ref = (BindingReference)iter.next(); 23 var.registerReference(ref); 24 } 25 references = Collections.EMPTY_LIST; 26 } 27 28 public GlobalVariable compile(StaticQueryContext env, int slot) throws XPathException { 29 throw new UnsupportedOperationException ("Attempt to compile a place-holder for an undeclared variable"); 30 } 31 } 32 33 | Popular Tags |