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