internal XmlSchema Clone()
        {
            XmlSchema schema = new XmlSchema {
                attributeFormDefault = this.attributeFormDefault,
                elementFormDefault   = this.elementFormDefault,
                blockDefault         = this.blockDefault,
                finalDefault         = this.finalDefault,
                targetNs             = this.targetNs,
                version    = this.version,
                includes   = this.includes,
                Namespaces = base.Namespaces,
                items      = this.items,
                BaseUri    = this.BaseUri
            };

            SchemaCollectionCompiler.Cleanup(schema);
            return(schema);
        }
示例#2
0
        internal new XmlSchema Clone()
        {
            XmlSchema that = new XmlSchema();

            that._attributeFormDefault = _attributeFormDefault;
            that._elementFormDefault   = _elementFormDefault;
            that._blockDefault         = _blockDefault;
            that._finalDefault         = _finalDefault;
            that._targetNs             = _targetNs;
            that._version  = _version;
            that._includes = _includes;

            that.Namespaces = this.Namespaces;
            that._items     = _items;
            that.BaseUri    = this.BaseUri;

            SchemaCollectionCompiler.Cleanup(that);
            return(that);
        }
        internal new XmlSchema Clone()
        {
            XmlSchema that = new XmlSchema();

            that.attributeFormDefault = this.attributeFormDefault;
            that.elementFormDefault   = this.elementFormDefault;
            that.blockDefault         = this.blockDefault;
            that.finalDefault         = this.finalDefault;
            that.targetNs             = this.targetNs;
            that.version  = this.version;
            that.includes = this.includes;

            that.Namespaces = this.Namespaces;
            that.items      = this.items;
            that.BaseUri    = this.BaseUri;

            SchemaCollectionCompiler.Cleanup(that);
            return(that);
        }
示例#4
0
#pragma warning disable 618
        internal bool CompileSchema(XmlSchemaCollection?xsc, XmlResolver?resolver, SchemaInfo schemaInfo, string?ns, ValidationEventHandler?validationEventHandler, XmlNameTable nameTable, bool CompileContentModel)
        {
            //Need to lock here to prevent multi-threading problems when same schema is added to set and compiled
            lock (this)
            {
                //Preprocessing
                SchemaCollectionPreprocessor prep = new SchemaCollectionPreprocessor(nameTable, null, validationEventHandler);
                prep.XmlResolver = resolver;
                if (!prep.Execute(this, ns, true, xsc))
                {
                    return(false);
                }

                //Compilation
                SchemaCollectionCompiler compiler = new SchemaCollectionCompiler(nameTable, validationEventHandler);
                _isCompiled = compiler.Execute(this, schemaInfo, CompileContentModel);
                this.SetIsCompiled(_isCompiled);
                return(_isCompiled);
            }
        }
示例#5
0
#pragma warning disable 618
        internal bool CompileSchema(XmlSchemaCollection xsc, XmlResolver resolver, SchemaInfo schemaInfo, string ns, ValidationEventHandler validationEventHandler, XmlNameTable nameTable, bool CompileContentModel) {

            //Need to lock here to prevent multi-threading problems when same schema is added to set and compiled
            lock (this) {
                //Preprocessing
                SchemaCollectionPreprocessor prep = new SchemaCollectionPreprocessor(nameTable, null, validationEventHandler);
                prep.XmlResolver = resolver;
                if (!prep.Execute(this, ns, true, xsc)) {
                    return false;
                }
            
                //Compilation
                SchemaCollectionCompiler compiler = new SchemaCollectionCompiler(nameTable, validationEventHandler);
                isCompiled = compiler.Execute(this, schemaInfo, CompileContentModel);
                this.SetIsCompiled(isCompiled);
                //
                return isCompiled;
            }
        }