Exemple #1
0
 XQueryExecutable WrapExecutable(SaxonApiXQueryExecutable xqueryExecutable, XQueryCompileOptions options)
 {
     return new SaxonXQueryExecutable(xqueryExecutable, this, options.BaseUri);
 }
Exemple #2
0
        public XQueryExecutable Compile(TextReader module, XQueryCompileOptions options)
        {
            XQueryCompiler compiler = CreateCompiler(options);

             try {
            return WrapExecutable(compiler.Compile(module.ReadToEnd()), options);
             } catch (Exception ex) {
            throw WrapCompileException(ex, compiler);
             }
        }
Exemple #3
0
        XQueryCompiler CreateCompiler(XQueryCompileOptions options)
        {
            XQueryCompiler compiler = this.processor.NewXQueryCompiler();
             compiler.ErrorList = new ArrayList();
             compiler.BaseUri = options.BaseUri.AbsoluteUri;

             foreach (XPathModuleInfo item in XPathModules.Modules.Where(m => m.Predeclare)) {
            compiler.DeclareNamespace(item.PredeclarePrefix, item.Namespace);
             }

             return compiler;
        }
Exemple #4
0
        public XQueryExecutable Compile(Stream module, XQueryCompileOptions options)
        {
            XQueryCompiler compiler = CreateCompiler(options);

             try {
            return WrapExecutable(compiler.Compile(module), options);
             } catch (Exception ex) {
            throw WrapCompileException(ex, compiler);
             }
        }