Exemple #1
0
 public Preprocessor(XmlNameTable nameTable, SchemaNames schemaNames, ValidationEventHandler eventHandler, XmlSchemaCompilationSettings compilationSettings)
     : base(nameTable, schemaNames, eventHandler, compilationSettings)
 {
     _referenceNamespaces = new Hashtable();
     _processedExternals = new Hashtable();
     _lockList = new SortedList();
 }
 public BaseProcessor(XmlNameTable nameTable, System.Xml.Schema.SchemaNames schemaNames, ValidationEventHandler eventHandler, XmlSchemaCompilationSettings compilationSettings)
 {
     this.nameTable = nameTable;
     this.schemaNames = schemaNames;
     this.eventHandler = eventHandler;
     this.compilationSettings = compilationSettings;
     this.NsXml = nameTable.Add("http://www.w3.org/XML/1998/namespace");
 }
            : this(nameTable, schemaNames, eventHandler, new XmlSchemaCompilationSettings()) {} //Use the default for XmlSchemaCollection

        public BaseProcessor(XmlNameTable nameTable, SchemaNames schemaNames, ValidationEventHandler eventHandler, XmlSchemaCompilationSettings compilationSettings) {
            Debug.Assert(nameTable != null);
            this.nameTable = nameTable;
            this.schemaNames = schemaNames;
            this.eventHandler = eventHandler;
            this.compilationSettings = compilationSettings;
            NsXml = nameTable.Add(XmlReservedNs.NsXml);
        }
 public BaseProcessor(XmlNameTable nameTable, System.Xml.Schema.SchemaNames schemaNames, ValidationEventHandler eventHandler, XmlSchemaCompilationSettings compilationSettings)
 {
     this.nameTable           = nameTable;
     this.schemaNames         = schemaNames;
     this.eventHandler        = eventHandler;
     this.compilationSettings = compilationSettings;
     this.NsXml = nameTable.Add("http://www.w3.org/XML/1998/namespace");
 }
Exemple #5
0
        }                                                                                       //Use the default for XmlSchemaCollection

        public BaseProcessor(XmlNameTable nameTable, SchemaNames schemaNames, ValidationEventHandler eventHandler, XmlSchemaCompilationSettings compilationSettings)
        {
            Debug.Assert(nameTable != null);
            this.nameTable           = nameTable;
            this.schemaNames         = schemaNames;
            this.eventHandler        = eventHandler;
            this.compilationSettings = compilationSettings;
            NsXml = nameTable.Add(XmlReservedNs.NsXml);
        }
 public Compiler(XmlNameTable nameTable, ValidationEventHandler eventHandler, XmlSchema schemaForSchema, XmlSchemaCompilationSettings compilationSettings) : base(nameTable, null, eventHandler, compilationSettings)
 {
     this.attributes = new XmlSchemaObjectTable();
     this.attributeGroups = new XmlSchemaObjectTable();
     this.elements = new XmlSchemaObjectTable();
     this.schemaTypes = new XmlSchemaObjectTable();
     this.groups = new XmlSchemaObjectTable();
     this.notations = new XmlSchemaObjectTable();
     this.examplars = new XmlSchemaObjectTable();
     this.identityConstraints = new XmlSchemaObjectTable();
     this.complexTypeStack = new Stack();
     this.schemasToCompile = new Hashtable();
     this.importedSchemas = new Hashtable();
     this.schemaForSchema = schemaForSchema;
 }
 public XmlSchemaSet(XmlNameTable nameTable)
 {
     if (nameTable == null)
     {
         throw new ArgumentNullException("nameTable");
     }
     this.nameTable = nameTable;
     this.schemas = new SortedList();
     this.schemaLocations = new Hashtable();
     this.chameleonSchemas = new Hashtable();
     this.targetNamespaces = new Hashtable();
     this.internalEventHandler = new System.Xml.Schema.ValidationEventHandler(this.InternalValidationCallback);
     this.eventHandler = this.internalEventHandler;
     this.readerSettings = new XmlReaderSettings();
     this.readerSettings.NameTable = nameTable;
     this.readerSettings.DtdProcessing = DtdProcessing.Prohibit;
     this.compilationSettings = new XmlSchemaCompilationSettings();
     this.cachedCompiledInfo = new SchemaInfo();
     this.compileAll = true;
 }
Exemple #8
0
 public XmlSchemaSet(XmlNameTable nameTable)
 {
     if (nameTable == null)
     {
         throw new ArgumentNullException("nameTable");
     }
     this.nameTable                    = nameTable;
     this.schemas                      = new SortedList();
     this.schemaLocations              = new Hashtable();
     this.chameleonSchemas             = new Hashtable();
     this.targetNamespaces             = new Hashtable();
     this.internalEventHandler         = new System.Xml.Schema.ValidationEventHandler(this.InternalValidationCallback);
     this.eventHandler                 = this.internalEventHandler;
     this.readerSettings               = new XmlReaderSettings();
     this.readerSettings.NameTable     = nameTable;
     this.readerSettings.DtdProcessing = DtdProcessing.Prohibit;
     this.compilationSettings          = new XmlSchemaCompilationSettings();
     this.cachedCompiledInfo           = new SchemaInfo();
     this.compileAll                   = true;
 }
#pragma warning restore 618

        internal void CompileSchemaInSet(XmlNameTable nameTable, ValidationEventHandler eventHandler, XmlSchemaCompilationSettings compilationSettings)
        {
            Debug.Assert(this.isPreprocessed);
            Compiler setCompiler = new Compiler(nameTable, eventHandler, null, compilationSettings);

            setCompiler.Prepare(this, true);
            this.isCompiledBySet = setCompiler.Compile();
        }
 public Compiler(XmlNameTable nameTable, ValidationEventHandler eventHandler, XmlSchema schemaForSchema, XmlSchemaCompilationSettings compilationSettings) : base(nameTable, null, eventHandler, compilationSettings) {
     this.schemaForSchema = schemaForSchema;
 }
 internal void CompileSchemaInSet(XmlNameTable nameTable, ValidationEventHandler eventHandler, XmlSchemaCompilationSettings compilationSettings)
 {
     System.Xml.Schema.Compiler compiler = new System.Xml.Schema.Compiler(nameTable, eventHandler, null, compilationSettings);
     compiler.Prepare(this, true);
     this.isCompiledBySet = compiler.Compile();
 }
        /// <include file='doc\XmlSchemaSet.uex' path='docs/doc[@for="XmlSchemaSet.XmlSchemaSet1"]/*' />
        /// <devdoc>
        ///    <para>Construct a new empty schema schemas with associated XmlNameTable.
        ///       The XmlNameTable is used when loading schemas</para>
        /// </devdoc>
        public XmlSchemaSet(XmlNameTable nameTable) {
            if (nameTable == null) {
                throw new ArgumentNullException("nameTable");
            }
            this.nameTable = nameTable;
            schemas = new SortedList();

            /*schemaLocations = new Dictionary<Uri, XmlSchema>();
            chameleonSchemas = new Dictionary<ChameleonKey, XmlSchema>();*/
            schemaLocations = new Hashtable();
            chameleonSchemas = new Hashtable();
            targetNamespaces = new Hashtable();
            internalEventHandler = new ValidationEventHandler(InternalValidationCallback);
            eventHandler = internalEventHandler;
            
            readerSettings = new XmlReaderSettings();
            readerSettings.NameTable = nameTable;
            readerSettings.ProhibitDtd = true;
    
            compilationSettings = new XmlSchemaCompilationSettings();
            cachedCompiledInfo = new SchemaInfo();
            compileAll = true;
        }
 internal void CompileSchemaInSet(XmlNameTable nameTable, ValidationEventHandler eventHandler, XmlSchemaCompilationSettings compilationSettings)
 {
     System.Xml.Schema.Compiler compiler = new System.Xml.Schema.Compiler(nameTable, eventHandler, null, compilationSettings);
     compiler.Prepare(this, true);
     this.isCompiledBySet = compiler.Compile();
 }
#pragma warning restore 618

        internal void CompileSchemaInSet(XmlNameTable nameTable, ValidationEventHandler eventHandler, XmlSchemaCompilationSettings compilationSettings) {
            Debug.Assert(this.isPreprocessed);
            Compiler setCompiler = new Compiler(nameTable, eventHandler, null, compilationSettings);
            setCompiler.Prepare(this, true);
            this.isCompiledBySet = setCompiler.Compile();
        }