Ejemplo n.º 1
0
        // Static method

        public static XQueryStaticContext Compile(XQueryModule module, XQueryCompileOptions options, Evidence evidence, XQueryCommandImpl commandImpl)
        {
            if (options == null)
            {
                options = new XQueryCompileOptions();
            }
            return(new XQueryASTCompiler(module, options, new XQueryCompileContext(), evidence, commandImpl).Compile());
        }
Ejemplo n.º 2
0
        // Constructor

        private XQueryASTCompiler(XQueryModule module, XQueryCompileOptions options, XQueryCompileContext compileContext, Evidence evidence, XQueryCommandImpl commandImpl)
        {
            this.module         = module;
            this.options        = options;
            this.compileContext = compileContext;
            this.evidence       = evidence;
            this.commandImpl    = commandImpl;

            inScopeSchemas = new XmlSchemaSet();
            localVariables = new Hashtable();
            localFunctions = new XQueryFunctionTable();
        }
Ejemplo n.º 3
0
		// Constructor

		private XQueryASTCompiler (XQueryModule module, XQueryCompileOptions options, XQueryCompileContext compileContext, Evidence evidence, XQueryCommandImpl commandImpl)
		{
			this.module = module;
			this.options = options;
			this.compileContext = compileContext;
			this.evidence = evidence;
			this.commandImpl = commandImpl;

			inScopeSchemas = new XmlSchemaSet ();
			localVariables = new Hashtable ();
			localFunctions = new XQueryFunctionTable ();
		}
Ejemplo n.º 4
0
		// Don't keep XQueryCompileOptions and XQueryMainModule
		// inside this class. I don't want them affect this instance
		// by being modified externally after the compilation.

		public XQueryStaticContext (
			XQueryCompileOptions options,
			XQueryCompileContext compileContext,
			ExprSequence queryBody,
			XmlSchemaSet inScopeSchemas,
			IDictionary inScopeVariables,
			XQueryFunctionTable functionSignatures,
			IXmlNamespaceResolver nsResolver,
			string defaultFunctionNamespace,
			bool preserveWhitespace,
			bool constructionSpace,
			bool defaultOrdered,
			string baseUri,
			Evidence evidence,
			XQueryCommandImpl commandImpl)
		{
			// Initialization phase.
			compat = options.Compatibility;
			nameTable = options.NameTable;
			this.queryBody = queryBody;
			this.nsResolver = nsResolver;
			this.defaultFunctionNamespace = defaultFunctionNamespace;
//			elemNSManager = new XmlNamespaceManager (nameTable);
//			funcNSManager = new XmlNamespaceManager (nameTable);
			xqueryFlagger = options.XQueryFlagger;
			xqueryStaticFlagger = options.XQueryStaticFlagger;
//			xqueryResolver = options.KnownDocumentResolver;
			knownCollections = (IDictionary) options.KnownCollections.Clone ();
			functions = functionSignatures;
			this.compileContext = compileContext;
			this.inScopeSchemas = inScopeSchemas;
			this.inScopeVariables = inScopeVariables;
			this.preserveWhitespace = preserveWhitespace;
			this.preserveConstructionSpace = constructionSpace;
			this.defaultOrdered = defaultOrdered;
			this.baseUri = baseUri;
			this.defaultCollation = options.DefaultCollation;
			// FIXME: set contextItemStaticType
			// FIXME: set extDocResolver

			this.evidence = evidence;
			this.commandImpl = commandImpl;
		}
Ejemplo n.º 5
0
        // Don't keep XQueryCompileOptions and XQueryMainModule
        // inside this class. I don't want them affect this instance
        // by being modified externally after the compilation.

        public XQueryStaticContext(
            XQueryCompileOptions options,
            XQueryCompileContext compileContext,
            ExprSequence queryBody,
            XmlSchemaSet inScopeSchemas,
            IDictionary inScopeVariables,
            XQueryFunctionTable functionSignatures,
            IXmlNamespaceResolver nsResolver,
            string defaultFunctionNamespace,
            bool preserveWhitespace,
            bool constructionSpace,
            bool defaultOrdered,
            string baseUri,
            Evidence evidence,
            XQueryCommandImpl commandImpl)
        {
            // Initialization phase.
            compat          = options.Compatibility;
            nameTable       = options.NameTable;
            this.queryBody  = queryBody;
            this.nsResolver = nsResolver;
            this.defaultFunctionNamespace = defaultFunctionNamespace;
//			elemNSManager = new XmlNamespaceManager (nameTable);
//			funcNSManager = new XmlNamespaceManager (nameTable);
            xqueryFlagger       = options.XQueryFlagger;
            xqueryStaticFlagger = options.XQueryStaticFlagger;
//			xqueryResolver = options.KnownDocumentResolver;
            knownCollections               = (IDictionary)options.KnownCollections.Clone();
            functions                      = functionSignatures;
            this.compileContext            = compileContext;
            this.inScopeSchemas            = inScopeSchemas;
            this.inScopeVariables          = inScopeVariables;
            this.preserveWhitespace        = preserveWhitespace;
            this.preserveConstructionSpace = constructionSpace;
            this.defaultOrdered            = defaultOrdered;
            this.baseUri                   = baseUri;
            this.defaultCollation          = options.DefaultCollation;
            // FIXME: set contextItemStaticType
            // FIXME: set extDocResolver

            this.evidence    = evidence;
            this.commandImpl = commandImpl;
        }
Ejemplo n.º 6
0
		// Static method

		public static XQueryStaticContext Compile (XQueryModule module, XQueryCompileOptions options, Evidence evidence, XQueryCommandImpl commandImpl)
		{
			if (options == null)
				options = new XQueryCompileOptions ();
			return new XQueryASTCompiler (module, options, new XQueryCompileContext (), evidence, commandImpl).Compile ();
		}