Ejemplo n.º 1
0
 @Override
 public Variable resolveVariable(org.exist.dom.QName qname) throws XPathException {
   Variable var = super.resolveVariable(qname);
   if (var == null) {
     requiredVariables.add(
         new QName(qname.getNamespaceURI(), qname.getLocalName(), qname.getPrefix()));
     var = new VariableImpl(qname);
   }
   return var;
 }
Ejemplo n.º 2
0
 @Override
 public UserDefinedFunction resolveFunction(org.exist.dom.QName qname, int argCount)
     throws XPathException {
   UserDefinedFunction func = super.resolveFunction(qname, argCount);
   if (func == null) {
     requiredFunctions.add(
         new QName(qname.getNamespaceURI(), qname.getLocalName(), qname.getPrefix()));
     func =
         new UserDefinedFunction(
             this,
             new FunctionSignature(
                 qname,
                 null,
                 new SequenceType(Type.ITEM, org.exist.xquery.Cardinality.ZERO_OR_MORE),
                 true));
     func.setFunctionBody(new SequenceConstructor(this));
   }
   return func;
 }