Beispiel #1
0
        public static BaseValidator?CreateInstance(ValidationType valType, XmlValidatingReaderImpl reader, XmlSchemaCollection schemaCollection, IValidationEventHandling eventHandling, bool processIdentityConstraints)
        {
            switch (valType)
            {
            case ValidationType.XDR:
                return(new XdrValidator(reader, schemaCollection, eventHandling));

            case ValidationType.Schema:
                return(new XsdValidator(reader, schemaCollection, eventHandling));

            case ValidationType.DTD:
                return(new DtdValidator(reader, eventHandling, processIdentityConstraints));

            case ValidationType.Auto:
                return(new AutoValidator(reader, schemaCollection, eventHandling));

            case ValidationType.None:
                return(new BaseValidator(reader, schemaCollection, eventHandling));

            default:
                break;
            }

            return(null);
        }
 public BaseValidator(XmlValidatingReaderImpl reader, XmlSchemaCollection schemaCollection, IValidationEventHandling eventHandling)
 {
     this.reader           = reader;
     this.schemaCollection = schemaCollection;
     this.eventHandling    = eventHandling;
     this.nameTable        = reader.NameTable;
     this.positionInfo     = System.Xml.PositionInfo.GetPositionInfo(reader);
     this.elementName      = new XmlQualifiedName();
 }
 public BaseValidator(XmlValidatingReaderImpl reader, XmlSchemaCollection schemaCollection, ValidationEventHandler eventHandler) {
     Debug.Assert(schemaCollection == null || schemaCollection.NameTable == reader.NameTable);
     this.reader = reader;
     this.schemaCollection = schemaCollection;
     this.eventHandler = eventHandler;
     nameTable = reader.NameTable;
     positionInfo = PositionInfo.GetPositionInfo(reader);
     elementName = new XmlQualifiedName();
 }
Beispiel #4
0
 public BaseValidator(XmlValidatingReaderImpl reader, XmlSchemaCollection schemaCollection, IValidationEventHandling eventHandling)
 {
     Debug.Assert(schemaCollection == null || schemaCollection.NameTable == reader.NameTable);
     this.reader       = reader;
     _schemaCollection = schemaCollection;
     _eventHandling    = eventHandling;
     _nameTable        = reader.NameTable;
     _positionInfo     = PositionInfo.GetPositionInfo(reader);
     elementName       = new XmlQualifiedName();
 }
 public BaseValidator(BaseValidator other) {
     reader = other.reader;
     schemaCollection = other.schemaCollection;
     eventHandler = other.eventHandler;
     nameTable = other.nameTable;
     schemaNames = other.schemaNames;
     positionInfo = other.positionInfo;
     xmlResolver = other.xmlResolver;
     baseUri = other.baseUri;
     elementName = other.elementName;
 }
Beispiel #6
0
 public BaseValidator(BaseValidator other)
 {
     reader            = other.reader;
     _schemaCollection = other._schemaCollection;
     _eventHandling    = other._eventHandling;
     _nameTable        = other._nameTable;
     _schemaNames      = other._schemaNames;
     _positionInfo     = other._positionInfo;
     _xmlResolver      = other._xmlResolver;
     _baseUri          = other._baseUri;
     elementName       = other.elementName;
 }
Beispiel #7
0
 public BaseValidator(BaseValidator other)
 {
     reader           = other.reader;
     schemaCollection = other.schemaCollection;
     eventHandling    = other.eventHandling;
     nameTable        = other.nameTable;
     schemaNames      = other.schemaNames;
     positionInfo     = other.positionInfo;
     xmlResolver      = other.xmlResolver;
     baseUri          = other.baseUri;
     elementName      = other.elementName;
 }
 public BaseValidator(BaseValidator other)
 {
     this.reader           = other.reader;
     this.schemaCollection = other.schemaCollection;
     this.eventHandling    = other.eventHandling;
     this.nameTable        = other.nameTable;
     this.schemaNames      = other.schemaNames;
     this.positionInfo     = other.positionInfo;
     this.xmlResolver      = other.xmlResolver;
     this.baseUri          = other.baseUri;
     this.elementName      = other.elementName;
 }
Beispiel #9
0
 public AutoValidator(XmlValidatingReaderImpl reader, XmlSchemaCollection schemaCollection, IValidationEventHandling eventHandling) : base(reader, schemaCollection, eventHandling)
 {
     schemaInfo = new SchemaInfo();
 }
 internal XdrValidator(XmlValidatingReaderImpl reader, XmlSchemaCollection schemaCollection, IValidationEventHandling eventHandling) : base(reader, schemaCollection, eventHandling) {
     Init();
 }
 internal XdrValidator(XmlValidatingReaderImpl reader, XmlSchemaCollection schemaCollection, IValidationEventHandling eventHandling) : base(reader, schemaCollection, eventHandling)
 {
     this.name = XmlQualifiedName.Empty;
     this.Init();
 }
 internal DtdValidator(XmlValidatingReaderImpl reader, ValidationEventHandler eventHandler, bool processIdentityConstraints)  : base(reader, null, eventHandler)
 {
     this.processIdentityConstraints = processIdentityConstraints;
     Init();
 }
Beispiel #13
0
 internal XsdValidator(XmlValidatingReaderImpl reader, XmlSchemaCollection schemaCollection, IValidationEventHandling eventHandling) : base(reader, schemaCollection, eventHandling)
 {
     this.startIDConstraint = -1;
     this.Init();
 }
 internal XsdValidator(XmlValidatingReaderImpl reader, XmlSchemaCollection schemaCollection, ValidationEventHandler eventHandler) : base(reader, schemaCollection, eventHandler) {
     Init();
 }
Beispiel #15
0
 internal DtdValidator(XmlValidatingReaderImpl reader, IValidationEventHandling eventHandling, bool processIdentityConstraints) : base(reader, null, eventHandling)
 {
     _processIdentityConstraints = processIdentityConstraints;
     Init();
 }
Beispiel #16
0
 internal XsdValidator(XmlValidatingReaderImpl reader, XmlSchemaCollection schemaCollection, IValidationEventHandling eventHandling) : base(reader, schemaCollection, eventHandling)
 {
     Init();
 }
 internal DtdValidator(XmlValidatingReaderImpl reader, IValidationEventHandling eventHandling, bool processIdentityConstraints) : base(reader, null, eventHandling)
 {
     this.name = XmlQualifiedName.Empty;
     this.processIdentityConstraints = processIdentityConstraints;
     this.Init();
 }
 public AutoValidator(XmlValidatingReaderImpl reader, XmlSchemaCollection schemaCollection, ValidationEventHandler eventHandler) : base(reader, schemaCollection, eventHandler) {
     schemaInfo = new SchemaInfo();
 } 
 internal DtdValidator(XmlValidatingReaderImpl reader, IValidationEventHandling eventHandling, bool processIdentityConstraints)  : base(reader, null, eventHandling) {
     this.processIdentityConstraints = processIdentityConstraints;
     Init();
 }
Beispiel #20
0
 internal XdrValidator(XmlValidatingReaderImpl reader, XmlSchemaCollection schemaCollection, ValidationEventHandler eventHandler) : base(reader, schemaCollection, eventHandler)
 {
     Init();
 }
        public static BaseValidator CreateInstance(ValidationType valType, XmlValidatingReaderImpl reader, XmlSchemaCollection schemaCollection, ValidationEventHandler eventHandler, bool processIdentityConstraints) {
            switch(valType) {
                case ValidationType.XDR:
                    return new XdrValidator(reader, schemaCollection, eventHandler);

                case ValidationType.Schema:
                    return new XsdValidator(reader, schemaCollection, eventHandler);
                   
                case ValidationType.DTD:
                    return new DtdValidator(reader, eventHandler, processIdentityConstraints);
                    
                case ValidationType.Auto:
                    return new AutoValidator(reader, schemaCollection, eventHandler);

                case ValidationType.None:
                    return new BaseValidator(reader, schemaCollection, eventHandler);

                default:
                        break;
            }
            return null;
        }