3 writes to _context
dotnet-svcutil-lib (3)
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (3)
1544
_context
= (ValidationState)_validationStack.Push();
1547
_context
= new ValidationState();
1574
_context
= (ValidationState)_validationStack.Peek();
148 references to _context
dotnet-svcutil-lib (148)
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (148)
446
_context
.Validity = XmlSchemaValidity.Invalid;
472
_context
.ElementDecl = elementDecl;
479
_context
.NeedValidateChildren = _processContents != XmlSchemaContentProcessing.Skip;
481
elementDecl.ContentValidator.InitValidation(
_context
);
491
schemaInfo.IsNil =
_context
.IsNill;
492
schemaInfo.Validity =
_context
.Validity;
553
SchemaElementDecl currentElementDecl =
_context
.ElementDecl;
755
SchemaElementDecl currentElementDecl =
_context
.ElementDecl;
758
_context
.CheckRequiredAttribute = false;
763
schemaInfo.Validity =
_context
.Validity;
790
if (
_context
.NeedValidateChildren)
792
if (
_context
.IsNill)
794
SendValidationEvent(ResXml.Sch_ContentInNill, QNameString(
_context
.LocalName,
_context
.Namespace));
797
XmlSchemaContentType contentType =
_context
.ElementDecl.ContentValidator.ContentType;
821
ArrayList names =
_context
.ElementDecl.ContentValidator.ExpectedParticles(
_context
, false, _schemaSet);
824
SendValidationEvent(ResXml.Sch_InvalidTextInElement, BuildElementName(
_context
.LocalName,
_context
.Namespace));
829
SendValidationEvent(ResXml.Sch_InvalidTextInElementExpecting, new string[] { BuildElementName(
_context
.LocalName,
_context
.Namespace), PrintExpectedElements(names, true) });
834
if (
_context
.ElementDecl.DefaultValueTyped != null)
873
if (
_context
.NeedValidateChildren)
875
if (
_context
.IsNill)
877
SendValidationEvent(ResXml.Sch_ContentInNill, QNameString(
_context
.LocalName,
_context
.Namespace));
879
XmlSchemaContentType contentType =
_context
.ElementDecl.ContentValidator.ContentType;
898
if (
_context
.ElementDecl.DefaultValueTyped != null)
946
SchemaElementDecl currentElementDecl =
_context
.ElementDecl;
958
schemaInfo.IsNil =
_context
.IsNill;
959
schemaInfo.IsDefault =
_context
.IsDefault;
960
Debug.Assert(
_context
.Validity != XmlSchemaValidity.Valid);
961
schemaInfo.Validity =
_context
.Validity;
963
_context
.ValidationSkipped = true;
1002
if (
_context
.ElementDecl != null)
1004
ArrayList expected =
_context
.ElementDecl.ContentValidator.ExpectedParticles(
_context
, false, _schemaSet);
1017
SchemaElementDecl elementDecl =
_context
.ElementDecl;
1052
SchemaElementDecl currentElementDecl =
_context
.ElementDecl;
1074
SendValidationEvent(ResXml.Sch_DefaultAttributeNotApplied, new string[2] { attdef.Name.ToString(), QNameString(
_context
.LocalName,
_context
.Namespace) });
1146
if (
_context
.ElementDecl == null)
1150
return
_context
.ElementDecl.ContentValidator.ContentType;
1172
return (_processContents == XmlSchemaContentProcessing.Strict || _processContents == XmlSchemaContentProcessing.Lax) &&
_context
.ElementDecl != null && !
_context
.ValidationSkipped;
1183
if (!_compiledSchemaInfo.Contains(
_context
.Namespace))
1205
SchemaElementDecl contextElementDecl =
_context
.ElementDecl;
1214
if (
_context
.CheckRequiredAttribute && contextElementDecl.HasRequiredAttribute)
1218
if (!
_context
.IsNill)
1220
if (
_context
.NeedValidateChildren)
1258
if (!contextElementDecl.ContentValidator.CompleteValidation(
_context
))
1260
CompleteValidationError(
_context
, _eventHandler, _nsResolver, _sourceUriString, _positionInfo.LineNumber, _positionInfo.LinePosition, _schemaSet);
1261
_context
.Validity = XmlSchemaValidity.Invalid;
1279
schemaInfo.IsNil =
_context
.IsNill;
1280
schemaInfo.IsDefault =
_context
.IsDefault;
1281
if (
_context
.Validity == XmlSchemaValidity.NotKnown && StrictlyAssessed)
1283
_context
.Validity = XmlSchemaValidity.Valid;
1285
schemaInfo.Validity =
_context
.Validity;
1339
if (
_context
.NeedValidateChildren)
1341
if (
_context
.IsNill)
1343
SendValidationEvent(ResXml.Sch_ContentInNill, QNameString(
_context
.LocalName,
_context
.Namespace));
1346
ContentValidator contentValidator =
_context
.ElementDecl.ContentValidator;
1347
if (contentValidator.ContentType == XmlSchemaContentType.Mixed &&
_context
.ElementDecl.Presence == SchemaDeclBase.Use.Fixed)
1349
SendValidationEvent(ResXml.Sch_ElementInMixedWithFixed, QNameString(
_context
.LocalName,
_context
.Namespace));
1358
particle =
_context
.ElementDecl.ContentValidator.ValidateElement(head,
_context
, out errorCode);
1367
_processContents =
_context
.ProcessContents = XmlSchemaContentProcessing.Skip;
1395
_processContents =
_context
.ProcessContents = XmlSchemaContentProcessing.Skip;
1400
_context
.NeedValidateChildren = true; //This will be reset to false once member match is not found
1405
ElementValidationError(elementName,
_context
, _eventHandler, _nsResolver, _sourceUriString, _positionInfo.LineNumber, _positionInfo.LinePosition, _schemaSet);
1407
_processContents =
_context
.ProcessContents = XmlSchemaContentProcessing.Skip;
1446
SchemaElementDecl currentElementDecl =
_context
.ElementDecl;
1447
if (!
_context
.IsNill)
1451
SchemaElementDecl declBeforeXsi =
_context
.ElementDeclBeforeXsi;
1458
SendValidationEvent(ResXml.Sch_InvalidElementDefaultValue, new string[] { currentElementDecl.DefaultValueRaw, QNameString(
_context
.LocalName,
_context
.Namespace) });
1462
_context
.IsDefault = true;
1467
_context
.IsDefault = true;
1491
SchemaElementDecl currentElementDecl =
_context
.ElementDecl;
1493
if (!
_context
.IsNill)
1505
SendValidationEvent(ResXml.Sch_ElementValueDataTypeDetailed, new string[] { QNameString(
_context
.LocalName,
_context
.Namespace), stringValue, GetTypeName(decl), exception.Message }, exception);
1510
SendValidationEvent(ResXml.Sch_FixedElementValue, QNameString(
_context
.LocalName,
_context
.Namespace));
1545
if (
_context
== null)
1548
_validationStack.AddToTop(
_context
);
1550
_context
.LocalName = elementName.Name;
1551
_context
.Namespace = elementName.Namespace;
1552
_context
.HasMatched = false;
1553
_context
.IsNill = false;
1554
_context
.IsDefault = false;
1555
_context
.CheckRequiredAttribute = true;
1556
_context
.ValidationSkipped = false;
1557
_context
.Validity = XmlSchemaValidity.NotKnown;
1558
_context
.NeedValidateChildren = false;
1559
_context
.ProcessContents = _processContents;
1560
_context
.ElementDeclBeforeXsi = null;
1561
_context
.Constr = null; //resetting the constraints to be null incase context != null
1577
_context
.Validity = XmlSchemaValidity.Invalid;
1581
_context
.ValidationSkipped = true;
1583
_processContents =
_context
.ProcessContents;
1680
_context
.IsNill = XmlConvert.ToBoolean(xsiNil);
1681
if (
_context
.IsNill && elementDecl.Presence == SchemaDeclBase.Use.Fixed)
1697
SendValidationEvent(ResXml.Sch_AbstractElement, QNameString(
_context
.LocalName,
_context
.Namespace));
1736
SendValidationEvent(ResXml.Sch_XsiTypeBlockedEx, new string[] { xsiTypeName.ToString(), QNameString(
_context
.LocalName,
_context
.Namespace) });
1749
_context
.ElementDeclBeforeXsi = elementDecl;
1761
_processContents =
_context
.ProcessContents = XmlSchemaContentProcessing.Skip;
1762
_context
.NeedValidateChildren = false;
1766
_processContents =
_context
.ProcessContents = XmlSchemaContentProcessing.Skip;
1767
_context
.NeedValidateChildren = false;
1768
SendValidationEvent(ResXml.Sch_UndeclaredElement, QNameString(
_context
.LocalName,
_context
.Namespace));
1772
SendValidationEvent(ResXml.Sch_NoElementSchemaFound, QNameString(
_context
.LocalName,
_context
.Namespace), XmlSeverityType.Warning);
1778
if (
_context
.ElementDecl.IsAbstract)
1780
SendValidationEvent(ResXml.Sch_AbstractElement, QNameString(
_context
.LocalName,
_context
.Namespace));
1787
if (ProcessIdentityConstraints &&
_context
.ElementDecl.Constraints != null)
1836
SchemaElementDecl elementDecl =
_context
.ElementDecl;
1838
if (
_context
.IsNill)
1844
_context
.IsDefault = true;
1931
_IDs.Add(name,
_context
.LocalName);
1993
SchemaDeclBase decl =
_context
.ElementDecl as SchemaDeclBase;
2001
SendValidationEvent(ResXml.Sch_ElementValueDataTypeDetailed, new string[] { QNameString(
_context
.LocalName,
_context
.Namespace), stringValue, GetTypeName(decl), exception.Message }, exception);
2006
SendValidationEvent(ResXml.Sch_FixedElementValue, QNameString(
_context
.LocalName,
_context
.Namespace));
2146
SchemaElementDecl beforeXsiDecl =
_context
.ElementDeclBeforeXsi;
2147
SchemaElementDecl currentDecl =
_context
.ElementDecl;
2187
SchemaElementDecl currentElementDecl =
_context
.ElementDecl;
2188
_context
.Constr = new ConstraintStruct[currentElementDecl.Constraints.Length];
2192
_context
.Constr[id++] = new ConstraintStruct(currentElementDecl.Constraints[i]);
2197
for (int i = 0; i <
_context
.Constr.Length; ++i)
2199
if (
_context
.Constr[i].constraint.Role == CompiledIdentityConstraint.ConstraintRole.Keyref)
2214
if (constraintStructures[j].constraint.name ==
_context
.Constr[i].constraint.refer)
2221
_context
.Constr[i].qualifiedTable = constraintStructures[j].keyrefTable;
2234
SendValidationEvent(ResXml.Sch_RefNotInScope, QNameString(
_context
.LocalName,
_context
.Namespace));
2248
SchemaElementDecl currentElementDecl =
_context
.ElementDecl;
2249
string localName =
_context
.LocalName;
2250
string namespaceUri =
_context
.Namespace;
2351
string localName =
_context
.LocalName;
2352
string namespaceUri =
_context
.Namespace;
2869
_context
.Validity = XmlSchemaValidity.Invalid;