Пример #1
0
        internal XQueryFunction ResolveFunction(XmlQualifiedName name)
        {
            XQueryFunction func = XQueryFunction.FindKnownFunction(name);

            if (func == null)
            {
                func = localFunctions [name];
            }

            if (func != null)
            {
                return(func);
            }
            else
            {
                throw new XmlQueryCompileException("Could not find specified function.");
            }
        }
Пример #2
0
 internal void CheckFunctionName(XmlQualifiedName name)
 {
     if (XQueryFunction.FindKnownFunction(name) != null)
     {
         return;
     }
     if (module.Prolog.Functions [name] != null)
     {
         return;
     }
     foreach (XQueryStaticContext ctx in libModuleContexts)
     {
         if (ctx.InScopeFunctions [name] != null)
         {
             return;
         }
     }
     throw new XmlQueryCompileException(String.Format("Unresolved function name: {0}", name));
 }