public XPathItem CompileFrom(string moduleUri, string processor) { IXQueryProcessor proc = (processor != null) ? Processors.XQuery[processor] : Processors.XQuery.DefaultProcessor; Uri uri = this.Resolver.ResolveUri(null, moduleUri); XQueryInvoker.With(uri, proc); var reference = new CompiledQueryReference { Uri = uri.AbsoluteUri, Processor = processor }; return(this.ItemFactory.CreateDocument(reference) .CreateNavigator()); }
public XPathItem CompileQuery(string query, string processor) { IXQueryProcessor proc = (processor != null) ? Processors.XQuery[processor] : this.CurrentXQueryProcessor ?? Processors.XQuery.DefaultProcessor; int hashCode; XQueryInvoker.WithQuery(query, proc, null, out hashCode); if (processor == null) { return(this.ItemFactory.CreateAtomicValue(hashCode, XmlTypeCode.Integer)); } var reference = new CompiledQueryReference { HashCode = hashCode, Processor = processor }; return(this.ItemFactory.CreateDocument(reference) .CreateNavigator()); }
public XPathItem CompileQuery(string query, string processor) { IXQueryProcessor proc = (processor != null) ? Processors.XQuery[processor] : this.CurrentXQueryProcessor ?? Processors.XQuery.DefaultProcessor; int hashCode; XQueryInvoker.WithQuery(query, proc, null, out hashCode); if (processor == null) { return this.ItemFactory.CreateAtomicValue(hashCode, XmlTypeCode.Integer); } var reference = new CompiledQueryReference { HashCode = hashCode, Processor = processor }; return this.ItemFactory.CreateDocument(reference) .CreateNavigator(); }
public XPathItem CompileFrom(string moduleUri, string processor) { IXQueryProcessor proc = (processor != null) ? Processors.XQuery[processor] : Processors.XQuery.DefaultProcessor; Uri uri = this.Resolver.ResolveUri(null, moduleUri); XQueryInvoker.With(uri, proc); var reference = new CompiledQueryReference { Uri = uri.AbsoluteUri, Processor = processor }; return this.ItemFactory.CreateDocument(reference) .CreateNavigator(); }