/** * Check that all the types used in the signature of an imported function * are available in the module of the caller of the function * @param fd the declaration of the imported function * @throws XPathException if an error is found */ public void checkImportedFunctionSignature(XQueryFunction fd) throws XPathException { checkImportedType(fd.getResultType(), fd); for (int a=0; a<fd.getNumberOfArguments(); a++) { SequenceType argType = fd.getArgumentTypes()[a]; checkImportedType(argType, fd); } }
/** * Check that all the types used in the signature of an imported function * are available in the module of the caller of the function * @param fd the declaration of the imported function * @throws XPathException if an error is found */ public void checkImportedFunctionSignature(XQueryFunction fd) throws XPathException { checkImportedType(fd.getResultType(), fd); for (int a=0; a<fd.getNumberOfArguments(); a++) { SequenceType argType = fd.getArgumentTypes()[a]; checkImportedType(argType, fd); } }
if (fd != null) { fd.registerReference(ufc); ufc.setStaticType(fd.getResultType()); } else { StringBuilder sb = new StringBuilder("Cannot find a " + arity +
if (fd != null) { fd.registerReference(ufc); ufc.setStaticType(fd.getResultType()); } else { StringBuilder sb = new StringBuilder("Cannot find a " + arity +
if (fd != null) { fd.registerReference(ufc); ufc.setStaticType(fd.getResultType()); ufc.setConfirmed(true);
if (fd != null) { fd.registerReference(ufc); ufc.setStaticType(fd.getResultType()); ufc.setConfirmed(true);
private FunctionDefinition[] getFunctionDefinitions() { ArrayList<FunctionDefinition> functionDefinitions = new ArrayList<FunctionDefinition>(); Iterator<XQueryFunction> functions = queryModule.getLocalFunctionLibrary().getFunctionDefinitions(); while (functions.hasNext()) { XQueryFunction function = functions.next(); UserFunctionParameter[] params = function.getParameterDefinitions(); Variable[] args = new Variable[params.length]; for (int i = 0; i < params.length; i++) { QName argname = qnameFor (params[i].getVariableQName()); addNamespaceDeclaration(argname); args[i] = new Variable (argname, getTypeDescription(params[i].getRequiredType())); } QName fname = qnameFor(function.getFunctionName()); addNamespaceDeclaration(fname); SequenceType resultType = function.getResultType(); ItemType returnType = resultType.getPrimaryType(); QName returnTypeName = null; if (returnType instanceof NameTest) { returnTypeName = qnameForNameCode (((NameTest) returnType).getFingerprint()); } FunctionDefinition fdef = new FunctionDefinition(fname, valueTypeForItemType(resultType.getPrimaryType()), cardinalityOf(resultType), returnTypeName, args, exprFor (function.getBody())); functionDefinitions.add (fdef); } return functionDefinitions.toArray(new FunctionDefinition[0]); }
ufc.setFunctionName(fd.getFunctionName()); ufc.setArguments(arguments); ufc.setStaticType(fd.getResultType()); UserFunction fn = fd.getUserFunction(); if (fn == null) {
ufc.setFunctionName(fd.getFunctionName()); ufc.setArguments(arguments); ufc.setStaticType(fd.getResultType()); UserFunction fn = fd.getUserFunction(); if (fn == null) {
ufc.setFunctionName(fd.getFunctionName()); ufc.setArguments(arguments); ufc.setStaticType(fd.getResultType()); UserFunction fn = fd.getUserFunction(); if (fn == null) {
ufc.setFunctionName(fd.getFunctionName()); ufc.setArguments(arguments); ufc.setStaticType(fd.getResultType()); UserFunction fn = fd.getUserFunction(); if (fn == null) {
compiledFunction.setFunctionName(functionName); compiledFunction.setParameterDefinitions(params); compiledFunction.setResultType(getResultType()); compiledFunction.setLineNumber(lineNumber); compiledFunction.setSystemId(systemId);
compiledFunction.setFunctionName(functionName); compiledFunction.setParameterDefinitions(params); compiledFunction.setResultType(getResultType()); compiledFunction.setLineNumber(lineNumber); compiledFunction.setSystemId(systemId);
compiledFunction.setFunctionName(functionName); compiledFunction.setParameterDefinitions(params); compiledFunction.setResultType(getResultType()); compiledFunction.setLineNumber(location.getLineNumber()); compiledFunction.setSystemId(location.getSystemId());
compiledFunction.setFunctionName(functionName); compiledFunction.setParameterDefinitions(params); compiledFunction.setResultType(getResultType()); compiledFunction.setLineNumber(location.getLineNumber()); compiledFunction.setSystemId(location.getSystemId());