System.out.println("Type: " + xqst);
info("Retrieve type of external variables");
xqp = xqc.prepareExpression(
"declare variable $i as xs:integer external; $i+1");
QName[] variables = xqp.getAllExternalVariables();
<BUG>for(int i = 0; i < variables.length; i++) {
</BUG>
xqst = xqp.getStaticVariableType(variables[i]);
System.out.println("Variable $" + variables[i] + ": " + xqst);
}

System.out.println("Type: " + xqst);
info("Retrieve type of external variables");
xqp = xqc.prepareExpression(
"declare variable $i as xs:integer external; $i+1");
QName[] variables = xqp.getAllExternalVariables();
for(int i = 0; i < variables.length; ++i) {
xqst = xqp.getStaticVariableType(variables[i]);
System.out.println("Variable $" + variables[i] + ": " + xqst);
}
