2 writes to reader
System.Private.Xml (2)
System\Xml\Schema\BaseValidator.cs (2)
36reader = other.reader; 50this.reader = reader;
170 references to reader
System.Private.Xml (170)
System\Xml\Schema\AutoValidator.cs (21)
29reader.Validator = new XdrValidator(this); 30reader.Validator.Validate(); 34reader.Validator = new XsdValidator(this); 35reader.Validator.Validate(); 53if (reader.Schemas != null && reader.Schemas.Count > 0) 55XmlSchemaCollectionEnumerator enumerator = reader.Schemas.GetEnumerator(); 67if (reader.NodeType == XmlNodeType.Element) 69SchemaType schemaType = SchemaNames.SchemaTypeFromRoot(reader.LocalName, reader.NamespaceURI); 80int count = reader.AttributeCount; 83reader.MoveToAttribute(i); 84string objectNs = reader.NamespaceURI; 85string objectName = reader.LocalName; 88if (XdrBuilder.IsXdrSchema(reader.Value)) 90reader.MoveToElement(); 96reader.MoveToElement(); 101reader.SchemaTypeObject = XmlSchemaDatatype.FromXdrName(reader.Value); 102reader.MoveToElement(); 108reader.MoveToElement();
System\Xml\Schema\BaseValidator.cs (8)
36reader = other.reader; 60get { return reader; } 202SaveTextValue(reader.Value); 225SaveTextValue(reader.Value); 257SendValidationEvent(new XmlSchemaException(code, args, reader.BaseURI, _positionInfo.LineNumber, _positionInfo.LinePosition)); 262SendValidationEvent(new XmlSchemaException(code, arg, reader.BaseURI, _positionInfo.LineNumber, _positionInfo.LinePosition)); 272SendValidationEvent(new XmlSchemaException(code, msg, reader.BaseURI, _positionInfo.LineNumber, _positionInfo.LinePosition), severity); 277SendValidationEvent(new XmlSchemaException(code, args, reader.BaseURI, _positionInfo.LineNumber, _positionInfo.LinePosition), severity);
System\Xml\Schema\DtdValidator.cs (25)
46Debug.Assert(reader != null); 60switch (reader.NodeType) 64if (reader.IsEmptyElement) 86if (!GenEntity(new XmlQualifiedName(reader.LocalName, reader.Prefix))) 98if (reader.Depth == 0 && 99reader.NodeType == XmlNodeType.Element) 108if (reader.StandAlone && // VC 1 - iv 133elementName.Init(reader.LocalName, reader.Prefix); 134if ((reader.Depth == 0) && 149Debug.Assert(reader.NodeType == XmlNodeType.Element); 156XmlSchemaValidator.ElementValidationError(elementName, context, EventHandler, reader, reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null); 184reader.SchemaTypeObject = null; 185SchemaAttDef? attnDef = context.ElementDecl!.GetAttDef(new XmlQualifiedName(reader.LocalName, reader.Prefix)); 194if (attnDef.Datatype != null && !reader.IsDefault) 202SendValidationEvent(SR.Sch_UndeclaredAttribute, reader.Name); 278XmlSchemaValidator.CompleteValidationError(context, EventHandler, reader, reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null); 344reader.TypedValueObject = null; 358reader.TypedValueObject = typedValue; 454if (reader.StandAlone && en.DeclaredInExternal) 490SendValidationEvent(new XmlSchemaException(SR.Sch_UndeclaredId, next.Id, reader.BaseURI, next.LineNo, next.LinePos));
System\Xml\Schema\XdrValidator.cs (44)
44_nsManager = reader.NamespaceManager!; 67switch (reader.NodeType) 71if (reader.IsEmptyElement) 93elementName.Init(reader.LocalName, XmlSchemaDatatype.XdrCanonizeUri(reader.NamespaceURI, NameTable, SchemaNames)); 95if (SchemaNames.IsXDRRoot(elementName.Name, elementName.Namespace) && reader.Depth > 0) 98_inlineSchemaParser.StartParsing(reader, null); 115XmlSchemaValidator.ElementValidationError(elementName, context, EventHandler, reader, reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null); 178XmlSchemaValidator.CompleteValidationError(context, EventHandler, reader, reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null); 198if (reader.Depth == 0) 202if (reader.MoveToFirstAttribute()) 206string objectNs = reader.NamespaceURI; 207string objectName = reader.LocalName; 210LoadSchema(reader.Value); 213_nsManager.AddNamespace(reader.Prefix.Length == 0 ? string.Empty : reader.LocalName, reader.Value); 221reader.SchemaTypeObject = XmlSchemaDatatype.FromXdrName(reader.Value); 223} while (reader.MoveToNextAttribute()); 224reader.MoveToElement(); 244reader.SchemaTypeObject = context.ElementDecl.SchemaType; 248reader.SchemaTypeObject = context.ElementDecl.Datatype; 250if (reader.IsEmptyElement && !context.IsNill && context.ElementDecl.DefaultValueTyped != null) 252reader.TypedValueObject = context.ElementDecl.DefaultValueTyped; 261if (reader.MoveToFirstAttribute()) 265if ((object)reader.NamespaceURI == (object)SchemaNames.NsXmlNs) 272reader.SchemaTypeObject = null; 273SchemaAttDef? attnDef = schemaInfo!.GetAttributeXdr(context.ElementDecl, QualifiedName(reader.LocalName, reader.NamespaceURI)); 280reader.SchemaTypeObject = (attnDef.SchemaType != null) ? (object)attnDef.SchemaType : (object)attnDef.Datatype; 283string attributeValue = reader.Value; 292e.SetSource(reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition); 295} while (reader.MoveToNextAttribute()); 296reader.MoveToElement(); 306reader.AddDefaultAttribute((SchemaAttDef)context.ElementDecl.DefaultAttDefs[i]); 314context.ElementDecl.CheckAttributes(_attPresence, reader.StandAlone); 318e.SetSource(reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition); 434ProcessEntity(schemaInfo!, name, this, EventHandler, reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition); 462reader.TypedValueObject = null; 482reader.TypedValueObject = typedValue; 683SendValidationEvent(new XmlSchemaException(SR.Sch_UndeclaredId, next.Id, reader.BaseURI, next.LineNo, next.LinePos));
System\Xml\Schema\XsdValidator.cs (72)
70_nsManager = reader.NamespaceManager!; 104switch (reader.NodeType) 108if (reader.IsEmptyElement) 173elementName.Init(reader.LocalName, reader.NamespaceURI); 175if (IsXSDRoot(elementName.Name, elementName.Namespace) && reader.Depth > 0) 178_inlineSchemaParser.StartParsing(reader, null); 206XmlSchemaValidator.ElementValidationError(elementName, context, EventHandler, reader, reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null); 262if (reader.Depth == 0) 274if (reader.MoveToFirstAttribute()) 278string objectNs = reader.NamespaceURI; 279string objectName = reader.LocalName; 282LoadSchema(reader.Value, null); 285_nsManager.AddNamespace(reader.Prefix.Length == 0 ? string.Empty : reader.LocalName, reader.Value); 292xsiSchemaLocation = (string[])s_dtStringArray.ParseValue(reader.Value, NameTable, _nsManager); 296xsiNoNamespaceSchemaLocation = reader.Value; 300xsiType = (XmlQualifiedName)s_dtQName.ParseValue(reader.Value, NameTable, _nsManager); 304xsiNil = reader.Value; 307} while (reader.MoveToNextAttribute()); 308reader.MoveToElement(); 337XmlSchemaValidator.CompleteValidationError(context, EventHandler, reader, reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null); 451reader.SchemaTypeObject = context.ElementDecl.SchemaType; 453if (reader.IsEmptyElement && !context.IsNill && context.ElementDecl.DefaultValueTyped != null) 455reader.TypedValueObject = UnWrapUnion(context.ElementDecl.DefaultValueTyped); 460reader.TypedValueObject = null; //Typed value cleanup 468if (reader.MoveToFirstAttribute()) 472if ((object)reader.NamespaceURI == (object)_nsXmlNs) 476if ((object)reader.NamespaceURI == (object)_nsXsi) 483reader.SchemaTypeObject = null; 484XmlQualifiedName attQName = new XmlQualifiedName(reader.LocalName, reader.NamespaceURI); 495reader.SchemaTypeObject = attnDef.SchemaType; 500CheckValue(reader.Value, attnDef); 504AttributeIdentityConstraints(reader.LocalName, reader.NamespaceURI, reader.TypedValueObject, reader.Value, attnDef); 525e.SetSource(reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition); 528} while (reader.MoveToNextAttribute()); 529reader.MoveToElement(); 540reader.AddDefaultAttribute(attdef); 553context.ElementDecl.CheckAttributes(_attPresence, reader.StandAlone); 557e.SetSource(reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition); 679ProcessEntity(schemaInfo!, name, this, EventHandler, reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition); 693reader.TypedValueObject = null; 737reader.TypedValueObject = typedValue; 815SendValidationEvent(new XmlSchemaException(SR.Sch_UndeclaredId, next.Id, reader.BaseURI, next.LineNo, next.LinePos)); 923if (constraints[j].axisSelector.MoveToStartElement(reader.LocalName, reader.NamespaceURI)) 927Debug.WriteLine($"Name: {reader.LocalName}\t|\tURI: {reader.NamespaceURI}\n"); 938if (laxis.MoveToStartElement(reader.LocalName, reader.NamespaceURI)) 946SendValidationEvent(SR.Sch_FieldSimpleTypeExpected, reader.LocalName); 1041Debug.WriteLine($"Name: {reader.LocalName}\t|\tURI: {reader.NamespaceURI}\t|\tValue: {reader.TypedValueObject}\n"); 1048SendValidationEvent(SR.Sch_FieldSingleValueExpected, reader.LocalName); 1054if (reader.TypedValueObject != null && stringValue.Length != 0) 1056laxis.Ks[laxis.Column] = new TypedObject(reader.TypedValueObject, stringValue, context!.ElementDecl!.Datatype); 1061laxis.EndElement(reader.LocalName, reader.NamespaceURI); 1064if (constraints[i].axisSelector.EndElement(reader.LocalName, reader.NamespaceURI)) 1076SendValidationEvent(new XmlSchemaException(SR.Sch_MissingKey, constraints[i].constraint.name.ToString(), reader.BaseURI, ks.PosLine, ks.PosCol)); 1085reader.BaseURI, ks.PosLine, ks.PosCol)); 1102reader.BaseURI, ks.PosLine, ks.PosCol)); 1144reader.BaseURI, ks.PosLine, ks.PosCol));