XQueryExecutable WrapExecutable(SaxonApiXQueryExecutable xqueryExecutable, XQueryCompileOptions options) { return new SaxonXQueryExecutable(xqueryExecutable, this, options.BaseUri); }
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); } }
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; }
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); } }