Beispiel #1
0
        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());
        }
Beispiel #2
0
        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());
        }
Beispiel #3
0
        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();
        }
Beispiel #4
0
        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();
        }