System\Xml\BinaryXml\XmlBinaryReader.cs (73)
93throw new XmlException(SR.XmlBinary_NoRemapPrefix, new string[] { prefix, this.namespaceUri, namespaceUri });
1049throw CreateNotSupportedException(SR.XmlBinary_ListsOfValuesNotSupported);
1109throw new InvalidCastException(SR.Format(SR.XmlBinary_CastNotSupported, _token, "Boolean"));
1130throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, null);
1134throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, null);
1199throw new InvalidCastException(SR.Format(SR.XmlBinary_CastNotSupported, _token, "DateTime"));
1220throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, null);
1224throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, null);
1228throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, null);
1294throw new InvalidCastException(SR.Format(SR.XmlBinary_CastNotSupported, _token, "Double"));
1315throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, null);
1319throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, null);
1323throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, null);
1389throw new InvalidCastException(SR.Format(SR.XmlBinary_CastNotSupported, _token, "Float"));
1410throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, null);
1414throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, null);
1418throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, null);
1484throw new InvalidCastException(SR.Format(SR.XmlBinary_CastNotSupported, _token, "Decimal"));
1505throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, null);
1509throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, null);
1513throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, null);
1579throw new InvalidCastException(SR.Format(SR.XmlBinary_CastNotSupported, _token, "Int32"));
1600throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int32", e, null);
1604throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int32", e, null);
1608throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int32", e, null);
1674throw new InvalidCastException(SR.Format(SR.XmlBinary_CastNotSupported, _token, "Int64"));
1695throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int64", e, null);
1699throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int64", e, null);
1703throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int64", e, null);
1735throw new XmlException(SR.Xml_ReadContentAsFormatException, "Object", e, null);
1739throw new XmlException(SR.Xml_ReadContentAsFormatException, "Object", e, null);
1743throw new XmlException(SR.Xml_ReadContentAsFormatException, "Object", e, null);
1782throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, null);
1786throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, null);
1790throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, null);
1956throw new XmlException(SR.Xml_BadNamespaceDecl, (string[]?)null);
1977throw new XmlException(SR.XmlBin_InvalidQNameID, string.Empty);
1985throw new XmlException(SR.XmlBin_InvalidQNameID, string.Empty);
2053throw CreateXmlException(SR.Xml_UnexpectedEOF1);
2111throw CreateXmlException(SR.XmlBinary_ValueTooBig);
2148throw CreateXmlException(SR.XmlBinary_ValueTooBig);
2324throw new XmlException(SR.Xml_UnexpectedEOF1, (string[]?)null);
2519err = SR.XmlBinary_InvalidSignature;
2528err = SR.XmlBinary_InvalidProtocolVersion;
2535err = SR.XmlBinary_UnsupportedCodePage;
2563err = SR.XmlBinary_InvalidStandalone;
2630throw new XmlException(SR.Xml_PrefixForEmptyNs, string.Empty);
2635throw CreateXmlException(SR.XmlBinary_AttrWithNsNoPrefix, n.localname, n.namespaceUri);
2647throw CreateNotSupportedException(SR.XmlBinary_ListsOfValuesNotSupported);
2705throw new XmlException(SR.Xml_DupAttributeName, _attributes[i].name.ToString());
2730throw new XmlException(SR.Xml_DupAttributeName, _attributes[i].name.ToString());
2789throw new XmlException(SR.XmlBin_MissingEndCDATA);
2838throw new XmlException(SR.Xml_UnexpectedEOF1, (string[]?)null);
3018throw CreateNotSupportedException(SR.XmlBinary_ListsOfValuesNotSupported);
3095throw CreateXmlException(SR.Xml_UnexpectedEndTag);
3107throw CreateXmlException(SR.Xml_DtdIsProhibited);
3115throw CreateXmlException(SR.Xml_DtdNotAllowedInFragment);
3117throw CreateXmlException(SR.Xml_BadDTDLocation);
3259throw CreateXmlException(SR.Xml_InvalidRootData);
3527throw CreateXmlException(SR.Xml_InvalidSurrogateMissingLowChar);
3569throw CreateXmlException(SR.Xml_UnexpectedEOF1);
3602throw new XmlException(SR.SqlTypes_ArithOverflow, (string?)null);
4014throw new XmlException(SR.XmlBin_InvalidQNameID, string.Empty);
4163throw new XmlException(SR.XmlBin_InvalidQNameID, string.Empty);
4361throw new XmlException(SR.XmlBin_InvalidQNameID, string.Empty);
4394return CreateXmlException(SR.XmlBinary_UnexpectedToken);
System\Xml\Core\XmlReader.cs (46)
167throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, this as IXmlLineInfo);
186throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, this as IXmlLineInfo);
205throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTimeOffset", e, this as IXmlLineInfo);
224throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, this as IXmlLineInfo);
243throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, this as IXmlLineInfo);
262throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, this as IXmlLineInfo);
281throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int", e, this as IXmlLineInfo);
300throw new XmlException(SR.Xml_ReadContentAsFormatException, "Long", e, this as IXmlLineInfo);
337throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
341throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
650throw new NotSupportedException(SR.Format(SR.Xml_ReadBinaryContentNotSupported, "ReadContentAsBase64"));
656throw new NotSupportedException(SR.Format(SR.Xml_ReadBinaryContentNotSupported, "ReadElementContentAsBase64"));
662throw new NotSupportedException(SR.Format(SR.Xml_ReadBinaryContentNotSupported, "ReadContentAsBinHex"));
668throw new NotSupportedException(SR.Format(SR.Xml_ReadBinaryContentNotSupported, "ReadElementContentAsBinHex"));
680throw new NotSupportedException(SR.Xml_ReadValueChunkNotSupported);
702throw new InvalidOperationException(SR.Xml_InvalidOperation);
750throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
760throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
768throw new XmlException(SR.Xml_ElementNotFound, name, this as IXmlLineInfo);
778throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
786throw new XmlException(SR.Xml_ElementNotFoundNs, new string[] { localname, ns }, this as IXmlLineInfo);
798throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
806throw new XmlException(SR.Xml_UnexpectedNodeInSimpleContent, new string[] { NodeType.ToString(), "ReadElementString" }, this as IXmlLineInfo);
825throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
829throw new XmlException(SR.Xml_ElementNotFound, name, this as IXmlLineInfo);
838throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
857throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
861throw new XmlException(SR.Xml_ElementNotFoundNs, new string[] { localname, ns }, this as IXmlLineInfo);
870throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
887throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
1271throw new InvalidOperationException(SR.Xml_ReadSubtreeNotOnElement);
1417throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
1422throw new XmlException(SR.Xml_ElementNotFoundNs, new string[] { localName, namespaceURI }, this as IXmlLineInfo);
1443return new InvalidOperationException(AddLineInfo(SR.Format(SR.Xml_InvalidReadContentAs, methodName, nodeType), lineInfo));
1448return new InvalidOperationException(AddLineInfo(SR.Format(SR.Xml_InvalidReadElementContentAs, methodName, nodeType), lineInfo));
1460return $"{message} {SR.Format(SR.Xml_ErrorPosition, lineArgs)}";
1539throw new XmlException(SR.Xml_MixedReadElementContentAs, string.Empty, this as IXmlLineInfo);
1549throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString());
1720throw new ArgumentException(SR.XmlBinary_NoParserContext, nameof(inputContext));
System\Xml\Core\XmlReaderAsync.cs (13)
65throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
69throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
126throw new NotSupportedException(SR.Format(SR.Xml_ReadBinaryContentNotSupported, "ReadContentAsBase64"));
132throw new NotSupportedException(SR.Format(SR.Xml_ReadBinaryContentNotSupported, "ReadElementContentAsBase64"));
138throw new NotSupportedException(SR.Format(SR.Xml_ReadBinaryContentNotSupported, "ReadContentAsBinHex"));
144throw new NotSupportedException(SR.Format(SR.Xml_ReadBinaryContentNotSupported, "ReadElementContentAsBinHex"));
151throw new NotSupportedException(SR.Xml_ReadValueChunkNotSupported);
393throw new XmlException(SR.Xml_MixedReadElementContentAs, string.Empty, this as IXmlLineInfo);
402throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString());
System\Xml\Core\XmlTextReaderImpl.cs (147)
599Throw(SR.Xml_DoubleBaseUri);
648throw new XmlException(SR.Xml_CannotResolveUrl, _laterInitParam.inputUriStr);
696Throw(SR.Xml_DoubleBaseUri);
1319ThrowWithoutLineInfo(SR.Xml_MissingRoot);
1495throw new InvalidOperationException(SR.Xml_InvalidOperation);
1518throw new XmlException(SR.Xml_InternalError, string.Empty);
1544throw new XmlException(SR.Xml_InternalError, string.Empty);
1571throw new InvalidOperationException(SR.Xml_InvalidOperation);
1618throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods);
1665throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods);
1711throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods);
1758throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods);
1792throw new InvalidOperationException(SR.Format(SR.Xml_InvalidReadValueChunk, _curNode.type));
1841Throw(SR.Xml_NotEnoughSpaceForSurrogatePair);
1885Throw(SR.Xml_NotEnoughSpaceForSurrogatePair);
1970throw new InvalidOperationException(SR.Xml_InvalidOperation);
2016throw new InvalidOperationException(SR.Xml_InvalidOperation);
2049throw new InvalidOperationException(SR.Xml_InvalidOperation);
2054throw new XmlException(SR.Xml_WhitespaceHandling, string.Empty);
2090throw new XmlException(SR.Xml_EntityHandling, string.Empty);
2127Throw(new InvalidOperationException(SR.Xml_InvalidResetStateCall));
2514if (e.ResString == SR.Xml_UnexpectedEOF && _ps.entity != null)
2516SendValidationEvent(XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, null, _ps.LineNo, _ps.LinePos);
2756Throw(invCharPos, SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(data, length, invCharPos));
3024Throw(SR.Xml_PartialContentNodeTypeNotSupportedEx, fragmentType.ToString());
3039ThrowWithoutLineInfo(SR.Xml_DtdIsProhibitedEx);
3078ThrowWithoutLineInfo(SR.Xml_CannotResolveUrl, _ps.baseUriStr);
3155Throw(SR.Xml_UnknownEncoding, "ebcdic");
3240Throw(SR.Xml_EncodingSwitchAfterResetState, newEncodingName);
3244ThrowWithoutLineInfo(SR.Xml_MissingByteOrderMark);
3263Throw(SR.Xml_UnknownEncoding, newEncodingName, innerEx);
3267Throw(SR.Xml_UnknownEncoding, newEncodingName, innerEx);
3277Throw(SR.Xml_EncodingSwitchAfterResetState, newEncodingName);
3545Throw(_ps.charsUsed, SR.Xml_InvalidCharInThisEncoding);
3630Throw(isTextDecl ? SR.Xml_InvalidTextDecl : SR.Xml_InvalidXmlDecl);
3648Throw(SR.Xml_InvalidTextDecl);
3658Throw(SR.Xml_EncodingSwitchAfterResetState, (_ps.encoding.GetByteCount("A") == 1) ? "UTF-8" : "UTF-16");
3724Throw(isTextDecl ? SR.Xml_InvalidTextDecl : SR.Xml_InvalidXmlDecl);
3796Throw(SR.Xml_InvalidVersionNumber, badVersion);
3820Throw(SR.Xml_InvalidXmlDecl, _ps.LineNo, _ps.LinePos - 1);
3847Throw(SR.Xml_UnclosedQuote);
3852Throw(isTextDecl ? SR.Xml_InvalidTextDecl : SR.Xml_InvalidXmlDecl);
3858Throw(SR.Xml_UnexpectedEOF1);
3876Throw(SR.Xml_EncodingSwitchAfterResetState, (_ps.encoding.GetByteCount("A") == 1) ? "UTF-8" : "UTF-16");
3963Throw(_ps.charPos, SR.Xml_InvalidRootData);
3983Throw(SR.Xml_BadDTDLocation);
3993Throw(pos + 1, SR.Xml_UnexpectedEndTag);
4001Throw(pos, SR.Xml_MultipleRoots);
4018Throw(pos, SR.Xml_InvalidRootData);
4085Throw(SR.Xml_InvalidRootData);
4101ThrowWithoutLineInfo(SR.Xml_MissingRoot);
4181Throw(SR.Xml_BadDTDLocation);
4262Throw(_ps.charsUsed, SR.Xml_UnexpectedEOF1);
4286Throw(_ps.charsUsed, SR.Xml_UnexpectedEOFInElementContent, _stringBuilder.ToString());
4334Throw(pos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
4416Throw(pos, SR.Xml_UnexpectedEOF, ">");
4436Throw(pos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(chars, _ps.charsUsed, pos));
4483SendValidationEvent(XmlSeverityType.Error, SR.Sch_StandAloneNormalization, attr.GetNameWPrefix(_nameTable), attr.LineNo, attr.LinePos);
4514SendValidationEvent(XmlSeverityType.Error, SR.Sch_UnSpecifiedDefaultAttributeInExternalStandalone, qname, _curNode.LineNo, _curNode.LinePos);
4662Throw(SR.Xml_TagMismatchEx, args);
4667Throw(SR.Xml_UnexpectedEndTag);
4760Throw(pos, SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(chars, _ps.charsUsed, pos));
4807Throw(pos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
4996Throw(SR.Xml_DupAttributeName, _nodes[j].GetNameWPrefix(_nameTable), _nodes[j].LineNo, _nodes[j].LinePos);
5016Throw(SR.Xml_DupAttributeName, attr2.GetNameWPrefix(_nameTable), attr2.LineNo, attr2.LinePos);
5052Throw(SR.Xml_BadNamespaceDecl, attr.lineInfo2.lineNo, attr.lineInfo2.linePos - 1);
5077Throw(SR.Xml_InvalidXmlSpace, attr.StringValue, attr.lineInfo.lineNo, attr.lineInfo.linePos);
5178Throw(pos, SR.Xml_BadAttributeChar, XmlException.BuildCharExceptionArgs('<', '\0'));
5313Throw(SR.Xml_UnexpectedEOF1);
5325Throw(SR.Xml_EntityRefNesting);
5329Throw(SR.Xml_UnclosedQuote);
5334Throw(SR.Xml_InternalError);
5672Throw(pos, SR.Xml_CDATAEndInText);
5727Throw(SR.Xml_UnexpectedEOF1);
5892Throw(SR.Xml_InvalidNodeType, _curNode.type.ToString());
5931Throw(SR.Xml_InvalidRootData);
5959Throw(SR.Xml_UnexpectedEOF1);
6000Throw(SR.Xml_ErrorParsingEntityName, _ps.LineNo, savedLinePos);
6043Throw(SR.Xml_UndeclaredEntity, name, _ps.LineNo, entityStartLinePos);
6057Throw(SR.Xml_UnparsedEntityRef, name, _ps.LineNo, entityStartLinePos);
6062Throw(SR.Xml_ExternalEntityInStandAloneDocument, entity.Name, _ps.LineNo, entityStartLinePos);
6069Throw(SR.Xml_ExternalEntityInAttValue, name, _ps.LineNo, entityStartLinePos);
6123Throw(SR.Xml_InternalError);
6134Throw(SR.Xml_IncompleteEntity);
6149Throw(SR.Xml_IncompleteEntity);
6212Throw(target.Equals("xml") ? SR.Xml_XmlDeclNotFirst : SR.Xml_InvalidPIName, target);
6239Throw(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(_ps.chars, _ps.charsUsed, _ps.charPos));
6304Throw(_ps.charsUsed, SR.Xml_UnexpectedEOF, "PI");
6509Throw(SR.Xml_UnexpectedEOF, (type == XmlNodeType.Comment) ? "Comment" : "CDATA");
6555Throw(pos, SR.Xml_InvalidCommentChars);
6669ThrowWithoutLineInfo(_v1Compat ? SR.Xml_DtdIsProhibited : SR.Xml_DtdIsProhibitedEx);
6677Throw(SR.Xml_UnexpectedEOF, "DOCTYPE");
6694Throw(_ps.charPos - 2, SR.Xml_MultipleDTDsProvided); // position just before <!DOCTYPE
6699Throw(_ps.charPos - 2, SR.Xml_DtdAfterRootElement);
6759Throw(SR.Xml_UnexpectedEOF1);
6796Throw(SR.Xml_UnexpectedEOF1);
6819Throw(SR.Xml_ExpectExternalOrClose);
6841Throw(SR.Xml_ExpectSubOrClose);
7046Throw(SR.Xml_UnexpectedEOF1);
7052Throw(SR.Xml_UnexpectedEOF1);
7147Throw(SR.Xml_UnexpectedEOF1);
7189Throw(SR.Xml_UnexpectedEOF);
7233badDigitExceptionString = SR.Xml_BadHexEntity;
7247badDigitExceptionString = SR.Xml_BadDecimalEntity;
7266Throw(SR.Xml_CharEntityOverflow, (string?)null, e);
7291Throw((_ps.chars[startPos + 2] == 'x') ? startPos + 3 : startPos + 2, SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(ch, '\0'));
7317Throw((_ps.chars[startPos + 2] == 'x') ? startPos + 3 : startPos + 2, SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(high, low));
7528Throw(pos, SR.Xml_UnexpectedEOF, "Name");
7532Throw(pos, SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(chars, _ps.charsUsed, pos));
7557Throw(pos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
7579Throw(pos, SR.Xml_UnexpectedEOF, "Name");
7604Throw(SR.Xml_ErrorParsingEntityName);
7613Throw(SR.Xml_ErrorParsingEntityName);
7770Throw(SR.Xml_UnknownNs, node.prefix, node.LineNo, node.LinePos);
7781Throw(SR.Xml_XmlnsPrefix, (int)attr.lineInfo2.lineNo, (int)attr.lineInfo2.linePos);
7785Throw(SR.Xml_NamespaceDeclXmlXmlns, prefix, (int)attr.lineInfo2.lineNo, (int)attr.lineInfo2.linePos);
7792Throw(SR.Xml_NamespaceDeclXmlXmlns, prefix, (int)attr.lineInfo2.lineNo, (int)attr.lineInfo2.linePos);
7797Throw(SR.Xml_BadNamespaceDecl, (int)attr.lineInfo.lineNo, (int)attr.lineInfo.linePos);
7930Throw(new XmlException(entityName == null ? SR.Xml_ErrorOpeningExternalDtd : SR.Xml_ErrorOpeningExternalEntity, new string[] { uri.ToString(), innerMessage }, e, 0, 0));
7935ThrowWithoutLineInfo(SR.Xml_CannotResolveExternalSubset, new string?[] { publicId ?? string.Empty, systemId }, null);
7939Throw(_dtdProcessing == DtdProcessing.Ignore ? SR.Xml_CannotResolveEntityDtdIgnored : SR.Xml_CannotResolveEntity, entityName);
8067Throw(entity.IsParameterEntity ? SR.Xml_RecursiveParEntity : SR.Xml_RecursiveGenEntity, entity.Name,
8609Throw(pos, SR.Xml_BadAttributeChar, XmlException.BuildCharExceptionArgs('<', '\0'));
8757Throw(SR.Xml_UnexpectedEOF1);
8762Throw(SR.Xml_UnexpectedTokens2, new string[3] { unexpectedToken, expectedToken1, expectedToken2 });
8766Throw(SR.Xml_UnexpectedTokenEx, new string[2] { unexpectedToken, expectedToken1 });
8807Throw(pos, SR.Xml_UnexpectedEOF1);
8811Throw(pos, SR.Xml_ExpectingWhiteSpace, unexpectedToken);
8894throw new InvalidOperationException(SR.Xml_MixingReadValueChunkWithBinary);
8899throw new InvalidOperationException(SR.Xml_MixingV1StreamingWithV2Binary);
8935Throw(SR.Xml_InvalidNodeType, _curNode.type.ToString());
9013throw new XmlException(SR.Xml_NametableMismatch);
9031throw new XmlException(SR.Xml_NametableMismatch, string.Empty);
9458throw new XmlException(SR.Xml_InvalidNodeType, _curNode.type.ToString(), this as IXmlLineInfo);
9527ThrowWithoutLineInfo(SR.Xml_LimitExceeded, "MaxCharactersInDocument");
9536ThrowWithoutLineInfo(SR.Xml_LimitExceeded, "MaxCharactersInDocument");
9546ThrowWithoutLineInfo(SR.Xml_LimitExceeded, "MaxCharactersFromEntities");
9555ThrowWithoutLineInfo(SR.Xml_LimitExceeded, "MaxCharactersFromEntities");
System\Xml\Core\XmlTextReaderImplAsync.cs (92)
26throw new InvalidOperationException(SR.Xml_ReaderAsyncNotSetException);
81throw new XmlException(SR.Xml_CannotResolveUrl, _laterInitParam.inputUriStr);
253ThrowWithoutLineInfo(SR.Xml_MissingRoot);
414throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods);
470throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods);
535throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods);
591throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods);
617throw new InvalidOperationException(SR.Format(SR.Xml_InvalidReadValueChunk, _curNode.type));
666Throw(SR.Xml_NotEnoughSpaceForSurrogatePair);
712Throw(SR.Xml_NotEnoughSpaceForSurrogatePair);
786if (e.ResString == SR.Xml_UnexpectedEOF && _ps.entity != null)
788SendValidationEvent(XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, null, _ps.LineNo, _ps.LinePos);
982ThrowWithoutLineInfo(SR.Xml_DtdIsProhibitedEx);
1214Throw(isTextDecl ? SR.Xml_InvalidTextDecl : SR.Xml_InvalidXmlDecl);
1232Throw(SR.Xml_InvalidTextDecl);
1242Throw(SR.Xml_EncodingSwitchAfterResetState, (_ps.encoding.GetByteCount("A") == 1) ? "UTF-8" : "UTF-16");
1308Throw(isTextDecl ? SR.Xml_InvalidTextDecl : SR.Xml_InvalidXmlDecl);
1377Throw(SR.Xml_InvalidVersionNumber, badVersion);
1400Throw(SR.Xml_InvalidXmlDecl, _ps.LineNo, _ps.LinePos - 1);
1426Throw(SR.Xml_UnclosedQuote);
1431Throw(isTextDecl ? SR.Xml_InvalidTextDecl : SR.Xml_InvalidXmlDecl);
1437Throw(SR.Xml_UnexpectedEOF1);
1455Throw(SR.Xml_EncodingSwitchAfterResetState, (_ps.encoding.GetByteCount("A") == 1) ? "UTF-8" : "UTF-16");
1529Throw(_ps.charPos, SR.Xml_InvalidRootData);
1545Throw(SR.Xml_BadDTDLocation);
1555Throw(pos + 1, SR.Xml_UnexpectedEndTag);
1563Throw(pos, SR.Xml_MultipleRoots);
1616Throw(pos, SR.Xml_InvalidRootData);
1700Throw(SR.Xml_InvalidRootData);
1716ThrowWithoutLineInfo(SR.Xml_MissingRoot);
1785Throw(SR.Xml_BadDTDLocation);
1898Throw(pos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
2035Throw(pos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(chars, _ps.charsUsed, pos));
2054Throw(pos, SR.Xml_UnexpectedEOF, ">");
2295Throw(SR.Xml_TagMismatchEx, args);
2300Throw(SR.Xml_UnexpectedEndTag);
2393Throw(pos, SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(chars, _ps.charsUsed, pos));
2440Throw(pos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
2688Throw(pos, SR.Xml_BadAttributeChar, XmlException.BuildCharExceptionArgs('<', '\0'));
2828Throw(SR.Xml_UnexpectedEOF1);
2840Throw(SR.Xml_EntityRefNesting);
2844Throw(SR.Xml_UnclosedQuote);
2850Throw(SR.Xml_InternalError);
3326Throw(pos, SR.Xml_CDATAEndInText);
3455throw new XmlException(SR.Xml_InternalError);
3473Throw(SR.Xml_UnexpectedEOF1);
3669Throw(SR.Xml_InvalidNodeType, _curNode.type.ToString());
3707Throw(SR.Xml_InvalidRootData);
3735Throw(SR.Xml_UnexpectedEOF1);
3783Throw(SR.Xml_ErrorParsingEntityName, _ps.LineNo, savedLinePos);
3829Throw(SR.Xml_UndeclaredEntity, name, _ps.LineNo, entityStartLinePos);
3842Throw(SR.Xml_UnparsedEntityRef, name, _ps.LineNo, entityStartLinePos);
3847Throw(SR.Xml_ExternalEntityInStandAloneDocument, entity.Name, _ps.LineNo, entityStartLinePos);
3854Throw(SR.Xml_ExternalEntityInAttValue, name, _ps.LineNo, entityStartLinePos);
3916Throw(target.Equals("xml") ? SR.Xml_XmlDeclNotFirst : SR.Xml_InvalidPIName, target);
3943Throw(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(_ps.chars, _ps.charsUsed, _ps.charPos));
4027Throw(_ps.charsUsed, SR.Xml_UnexpectedEOF, "PI");
4252Throw(SR.Xml_UnexpectedEOF, (type == XmlNodeType.Comment) ? "Comment" : "CDATA");
4298Throw(pos, SR.Xml_InvalidCommentChars);
4413ThrowWithoutLineInfo(_v1Compat ? SR.Xml_DtdIsProhibited : SR.Xml_DtdIsProhibitedEx);
4421Throw(SR.Xml_UnexpectedEOF, "DOCTYPE");
4435Throw(_ps.charPos - 2, SR.Xml_MultipleDTDsProvided); // position just before <!DOCTYPE
4439Throw(_ps.charPos - 2, SR.Xml_DtdAfterRootElement);
4504Throw(SR.Xml_UnexpectedEOF1);
4541Throw(SR.Xml_UnexpectedEOF1);
4564Throw(SR.Xml_ExpectExternalOrClose);
4586Throw(SR.Xml_ExpectSubOrClose);
4789Throw(SR.Xml_UnexpectedEOF1);
4795Throw(SR.Xml_UnexpectedEOF1);
4889Throw(SR.Xml_UnexpectedEOF1);
4918Throw(SR.Xml_UnexpectedEOF);
5003Throw(pos, SR.Xml_UnexpectedEOF, "Name");
5007Throw(pos, SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(chars, _ps.charsUsed, pos));
5032Throw(pos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
5056Throw(pos, SR.Xml_UnexpectedEOF, "Name");
5083Throw(SR.Xml_ErrorParsingEntityName);
5090Throw(SR.Xml_ErrorParsingEntityName);
5139Throw(new XmlException(entityName == null ? SR.Xml_ErrorOpeningExternalDtd : SR.Xml_ErrorOpeningExternalEntity, new string[] { uri.ToString(), innerMessage }, e, 0, 0));
5144ThrowWithoutLineInfo(SR.Xml_CannotResolveExternalSubset, new string?[] { publicId ?? string.Empty, systemId }, null);
5148Throw(_dtdProcessing == DtdProcessing.Ignore ? SR.Xml_CannotResolveEntityDtdIgnored : SR.Xml_CannotResolveEntity, entityName);
5274throw new InvalidOperationException(SR.Xml_MixingReadValueChunkWithBinary);
5278throw new InvalidOperationException(SR.Xml_MixingV1StreamingWithV2Binary);
5313Throw(SR.Xml_InvalidNodeType, _curNode.type.ToString());
5467throw new XmlException(SR.Xml_InvalidNodeType, _curNode.type.ToString(), this as IXmlLineInfo);
System\Xml\Core\XmlWellFormedWriter.cs (47)
345throw new ArgumentException(SR.Xml_NoRoot);
368throw new InvalidOperationException(SR.Xml_DtdNotAllowedInFragment);
375throw new InvalidOperationException(SR.Xml_DtdAlreadyWritten);
393throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(pubid, i)), nameof(pubid));
400throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(sysid, i)), nameof(sysid));
407throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(subset, i)), nameof(subset));
448throw new ArgumentException(SR.Xml_PrefixForEmptyNs);
506throw new XmlException(SR.Xml_NoStartTag, string.Empty);
557throw new XmlException(SR.Xml_NoStartTag, string.Empty);
613throw new ArgumentException(SR.Xml_EmptyLocalName);
648throw new ArgumentException(SR.Xml_XmlnsPrefix);
671throw new ArgumentException(SR.Xml_XmlnsPrefix);
681throw new ArgumentException(SR.Xml_XmlPrefix);
778throw new ArgumentException(SR.Xml_PrefixForEmptyNs);
782throw new ArgumentException(SR.Xml_CanNotBindToReservedNamespace);
825throw new ArgumentException(SR.Format(SR.Xml_InvalidXmlSpace, value));
900throw new ArgumentException(_conformanceLevel == ConformanceLevel.Document ? SR.Xml_DupXmlDecl : SR.Xml_CannotWriteXmlDecl);
960throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar);
1013throw new ArgumentException(SR.Xml_NonWhitespace);
1294throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns));
1488throw new InvalidOperationException(SR.Xml_ClosedOrError);
1555throw new InvalidOperationException(SR.Xml_CannotStartDocumentOnFragment);
1601throw new XmlException(SR.Xml_RedefinePrefix, new string[] { prefix, _nsStack[existingNsIndex].namespaceUri, ns });
1616throw new ArgumentException(SR.Xml_XmlPrefix);
1626throw new ArgumentException(SR.Xml_XmlnsPrefix);
1643throw new ArgumentException(SR.Format(SR.Xml_NamespaceDeclXmlXmlns, prefix));
1681throw new XmlException(SR.Xml_RedefinePrefix, new string?[] { prefix, _nsStack[existingNsIndex].namespaceUri, ns });
1727throw new ArgumentException(SR.Format(SR.Xml_NamespaceDeclXmlXmlns, prefix));
1735throw new ArgumentException(SR.Xml_XmlPrefix);
1740throw new ArgumentException(SR.Xml_XmlnsPrefix);
1837return new XmlException(SR.Xml_DupAttributeName, attr);
1847throw new InvalidOperationException(SR.Xml_ClosedOrError);
1851throw new InvalidOperationException(SR.Format(SR.Xml_WrongToken, tokenName[(int)token], GetStateName(_currentState)));
2067return new ArgumentException(SR.Format(SR.Xml_InvalidNameCharsDetail, args));
2073string wrongTokenMessage = SR.Format(SR.Xml_WrongToken, tokenName[(int)token], GetStateName(currentState));
2080throw new InvalidOperationException($"{wrongTokenMessage} {SR.Xml_ConformanceLevelFragment}");
System\Xml\Core\XmlWellFormedWriterAsync.cs (31)
45throw new ArgumentException(SR.Xml_NoRoot);
69throw new InvalidOperationException(SR.Xml_DtdNotAllowedInFragment);
76throw new InvalidOperationException(SR.Xml_DtdAlreadyWritten);
94throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(pubid, i)), nameof(pubid));
101throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(sysid, i)), nameof(sysid));
108throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(subset, i)), nameof(subset));
221throw new ArgumentException(SR.Xml_PrefixForEmptyNs);
338throw new XmlException(SR.Xml_NoStartTag, string.Empty);
417throw new XmlException(SR.Xml_NoStartTag, string.Empty);
453throw new ArgumentException(SR.Xml_EmptyLocalName);
506throw new ArgumentException(SR.Xml_XmlnsPrefix);
529throw new ArgumentException(SR.Xml_XmlnsPrefix);
539throw new ArgumentException(SR.Xml_XmlPrefix);
683throw new ArgumentException(SR.Xml_PrefixForEmptyNs);
687throw new ArgumentException(SR.Xml_CanNotBindToReservedNamespace);
729throw new ArgumentException(SR.Format(SR.Xml_InvalidXmlSpace, value));
801throw new ArgumentException(_conformanceLevel == ConformanceLevel.Document ? SR.Xml_DupXmlDecl : SR.Xml_CannotWriteXmlDecl);
861throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar);
915throw new ArgumentException(SR.Xml_NonWhitespace);
1145throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns));
1178throw new InvalidOperationException(SR.Xml_ClosedOrError);
1205throw new InvalidOperationException(SR.Xml_CannotStartDocumentOnFragment);
1275throw new InvalidOperationException(SR.Xml_ClosedOrError);
1279throw new InvalidOperationException(SR.Format(SR.Xml_WrongToken, tokenName[(int)token], GetStateName(_currentState)));
System\Xml\Core\XsdValidatingReader.cs (56)
478throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, this as IXmlLineInfo);
482throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, this as IXmlLineInfo);
486throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, this as IXmlLineInfo);
512throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, this as IXmlLineInfo);
516throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, this as IXmlLineInfo);
520throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, this as IXmlLineInfo);
546throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, this as IXmlLineInfo);
550throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, this as IXmlLineInfo);
554throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, this as IXmlLineInfo);
580throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, this as IXmlLineInfo);
584throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, this as IXmlLineInfo);
588throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, this as IXmlLineInfo);
614throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, this as IXmlLineInfo);
618throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, this as IXmlLineInfo);
622throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, this as IXmlLineInfo);
648throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int", e, this as IXmlLineInfo);
652throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int", e, this as IXmlLineInfo);
656throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int", e, this as IXmlLineInfo);
683throw new XmlException(SR.Xml_ReadContentAsFormatException, "Long", e, this as IXmlLineInfo);
687throw new XmlException(SR.Xml_ReadContentAsFormatException, "Long", e, this as IXmlLineInfo);
691throw new XmlException(SR.Xml_ReadContentAsFormatException, "Long", e, this as IXmlLineInfo);
718throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
722throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
726throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
760throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
764throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
768throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
806throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, this as IXmlLineInfo);
810throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, this as IXmlLineInfo);
814throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, this as IXmlLineInfo);
841throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, this as IXmlLineInfo);
845throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, this as IXmlLineInfo);
849throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, this as IXmlLineInfo);
876throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, this as IXmlLineInfo);
880throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, this as IXmlLineInfo);
884throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, this as IXmlLineInfo);
911throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, this as IXmlLineInfo);
915throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, this as IXmlLineInfo);
919throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, this as IXmlLineInfo);
946throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, this as IXmlLineInfo);
950throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, this as IXmlLineInfo);
954throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, this as IXmlLineInfo);
981throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int", e, this as IXmlLineInfo);
985throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int", e, this as IXmlLineInfo);
989throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int", e, this as IXmlLineInfo);
1016throw new XmlException(SR.Xml_ReadContentAsFormatException, "Long", e, this as IXmlLineInfo);
1020throw new XmlException(SR.Xml_ReadContentAsFormatException, "Long", e, this as IXmlLineInfo);
1024throw new XmlException(SR.Xml_ReadContentAsFormatException, "Long", e, this as IXmlLineInfo);
1051throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
1055throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
1059throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
1094throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
1098throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
1102throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
2494throw new XmlException(SR.Xml_MixedReadElementContentAs, string.Empty, this as IXmlLineInfo);
2503throw new XmlException(SR.Xml_MixedReadElementContentAs, string.Empty, this as IXmlLineInfo);
System\Xml\Core\XsdValidatingReaderAsync.cs (14)
63throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
67throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
71throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
110throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
114throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
118throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
162throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
166throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
170throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
210throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
214throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
218throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
829throw new XmlException(SR.Xml_MixedReadElementContentAs, string.Empty, this as IXmlLineInfo);
841throw new XmlException(SR.Xml_MixedReadElementContentAs, string.Empty, this as IXmlLineInfo);
System\Xml\Schema\Asttree.cs (10)
552throw new XmlSchemaException(SR.Sch_EmptyXPath, string.Empty);
574throw new XmlSchemaException(SR.Sch_ICXpathError, xPath);
587throw new XmlSchemaException(SR.Sch_ICXpathError, xPath);
598throw new XmlSchemaException(SR.Sch_SelectorAttr, xPath);
609throw new XmlSchemaException(SR.Sch_ICXpathError, xPath);
637throw new XmlSchemaException(SR.Sch_ICXpathError, xPath);
658throw new XmlSchemaException(SR.Sch_ICXpathError, xPath);
666throw new XmlSchemaException(SR.Sch_ICXpathError, xPath);
670throw new XmlSchemaException(SR.Sch_ICXpathError, xPath);
701throw new XmlSchemaException(SR.Sch_UnresolvedPrefix, axis.Prefix);
System\Xml\Schema\BaseValidator.cs (11)
141throw new XmlException(SR.Xml_InternalError, string.Empty);
176SendValidationEvent(SR.Sch_ContentInNill, XmlSchemaValidator.QNameString(context.LocalName!, context.Namespace!));
187SendValidationEvent(SR.Sch_InvalidTextInElement, XmlSchemaValidator.BuildElementName(context.LocalName!, context.Namespace!));
192SendValidationEvent(SR.Sch_InvalidTextInElementExpecting, new string[] { XmlSchemaValidator.BuildElementName(context.LocalName!, context.Namespace!), XmlSchemaValidator.PrintExpectedElements(names, false) });
197SendValidationEvent(SR.Sch_InvalidTextInEmpty, string.Empty);
215SendValidationEvent(SR.Sch_ContentInNill, XmlSchemaValidator.QNameString(context.LocalName!, context.Namespace!));
220SendValidationEvent(SR.Sch_InvalidWhitespaceInEmpty, string.Empty);
299e = new XmlSchemaException(SR.Sch_UndeclaredEntity, name, baseUri, lineNumber, linePosition);
303e = new XmlSchemaException(SR.Sch_UnparsedEntityRef, name, baseUri, lineNumber, linePosition);
326errorResId = SR.Sch_UndeclaredEntity;
330errorResId = SR.Sch_UnparsedEntityRef;
System\Xml\Schema\DataTypeImplementation.cs (31)
387throw new XmlSchemaException(SR.Sch_ListFromNonatomic, string.Empty);
391throw new XmlSchemaException(SR.Sch_ListFromNonatomic, string.Empty);
535throw new XmlSchemaException(SR.Sch_InvalidValueDetailed, new string[] { s, GetTypeName(), exception.Message }, exception, null, 0, 0, null);
556throw new XmlSchemaException(SR.Sch_InvalidValueDetailed, new string[] { s, GetTypeName(), exception.Message }, exception, null, 0, 0, null);
1134return new XmlSchemaException(SR.Sch_EmptyAttributeValue, string.Empty);
1263exception = new XmlSchemaException(SR.Sch_UnionFailedEx, s);
1302exception = new XmlSchemaException(SR.Sch_UnionFailedEx, value.ToString());
1882return new XmlSchemaException(SR.Sch_EmptyAttributeValue, string.Empty);
1913return new XmlSchemaException(SR.Sch_EmptyAttributeValue, string.Empty);
1952return new XmlSchemaException(SR.Sch_EmptyAttributeValue, string.Empty);
2041exception = new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, _dateTimeFlags.ToString()));
2707return new XmlSchemaException(SR.Sch_EmptyAttributeValue, string.Empty);
3040return new XmlSchemaException(SR.Sch_EmptyAttributeValue, string.Empty);
3087throw new XmlSchemaException(SR.Sch_NotationRequired, caller);
3093throw new XmlSchemaException(SR.Sch_NotationRequired, caller);
3697throw new XmlSchemaException(SR.Format(SR.Sch_InvalidValue, s), e);
3702throw new XmlSchemaException(SR.Sch_InvalidValue, s);
3719throw new XmlSchemaException(SR.Format(SR.Sch_InvalidValue, s), e);
3724throw new XmlSchemaException(SR.Sch_InvalidValue, s);
3738throw new XmlSchemaException(SR.Sch_EmptyAttributeValue, string.Empty);
3753throw new XmlSchemaException(SR.Format(SR.Sch_InvalidValue, s), e);
3793throw new XmlSchemaException(SR.Format(SR.Sch_InvalidValue, s), e);
3836throw new XmlSchemaException(SR.Format(SR.Sch_InvalidValue, s), e);
3889throw new XmlSchemaException(SR.Format(SR.Sch_InvalidValue, s), e);
System\Xml\Schema\DtdParser.cs (111)
421SendValidationEvent(XmlSeverityType.Error, new XmlSchemaException(SR.Sch_UndeclaredNotation, un.name, BaseUriStr, (int)un.lineNo, (int)un.linePos));
560Throw(_curPos - 3, SR.Xml_InvalidConditionalSection); // 3==strlen("<![")
571SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
576Throw(_curPos - 3, SR.Xml_UnexpectedCDataEnd);
584Throw(_curPos, SR.Xml_UnclosedConditionalSection);
607Throw(_curPos, SR.Xml_ExpectDtdMarkup);
613Throw(_curPos, SR.Xml_IncompleteDtdContent);
617Throw(_curPos, SR.Xml_UnclosedConditionalSection);
631SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
637Throw(_curPos, SR.Sch_ParEntityRefNesting);
687Throw(SR.Xml_EnumerationRequired, string.Empty, attrDef.LineNumber, attrDef.LinePosition);
727Throw(SR.Xml_EnumerationRequired, string.Empty, attrDef.LineNumber, attrDef.LinePosition);
776SendValidationEvent(XmlSeverityType.Error, SR.Sch_IdAttrDeclared, elementDecl.Name.ToString());
789SendValidationEvent(_curPos - 8, XmlSeverityType.Error, SR.Sch_DupNotationAttribute, elementDecl.Name.ToString()); // 8 == strlen("NOTATION")
797SendValidationEvent(_curPos - 8, XmlSeverityType.Error, SR.Sch_NotationAttributeOnEmptyElement, elementDecl.Name.ToString()); // 8 == strlen("NOTATION")
822SendValidationEvent(XmlSeverityType.Error, new XmlSchemaException(SR.Xml_AttlistDuplNotationValue, notationName, BaseUriStr, (int)LineNo, (int)LinePos));
861SendValidationEvent(XmlSeverityType.Error, new XmlSchemaException(SR.Xml_AttlistDuplEnumValue, nmtoken, BaseUriStr, (int)LineNo, (int)LinePos));
906SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_AttListPresence, string.Empty);
944SendValidationEvent(_curPos - name.Name.Length, XmlSeverityType.Error, SR.Sch_DupElementDecl, GetNameString());
1059Throw(_curPos, SR.Xml_InvalidContentModel);
1071Throw(_curPos, SR.Xml_InvalidContentModel);
1079Throw(_curPos, SR.Xml_InvalidContentModel);
1088SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
1093Throw(_curPos, SR.Xml_InvalidContentModel);
1150SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
1175SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
1187SendValidationEvent(XmlSeverityType.Error, SR.Sch_DupElement, name.ToString());
1196SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
1267Throw(_curPos - 5, SR.Xml_ExpectingWhiteSpace, "NDATA");
1323SendValidationEvent(_curPos - notationName.Name.Length, XmlSeverityType.Error, SR.Sch_DupNotation, notationName.Name);
1383if (e.ResString == SR.Xml_UnexpectedEOF && _currentEntityId != 0)
1385SendValidationEvent(XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, null);
1423SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
1448SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
1457SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
1483Throw(_curPos - systemId.Length - 1, SR.Xml_FragmentId, new string[] { systemId.Substring(systemId.IndexOf('#')), systemId });
1513Throw(SR.Xml_ExpectingWhiteSpace, char.ToString(_literalQuoteChar), (int)_literalLineInfo.lineNo, (int)_literalLineInfo.linePos);
1530Throw(SR.Xml_ExpectingWhiteSpace, char.ToString(_literalQuoteChar), (int)_literalLineInfo.lineNo, (int)_literalLineInfo.linePos);
1614Throw(_curPos, SR.Xml_ExpectingWhiteSpace, ParseUnexpectedToken(_curPos));
1673Throw(_curPos, SR.Xml_IncompleteDtdContent);
1702Throw(_curPos, SR.Xml_ExpectDtdMarkup);
1718Throw(_curPos, SR.Xml_ExpectDtdMarkup);
1730Throw(_curPos, SR.Xml_ExpectDtdMarkup);
1743Throw(_curPos, SR.Xml_ExpectDtdMarkup);
1760Throw(_curPos, SR.Xml_ExpectDtdMarkup);
1783Throw(_curPos, SR.Xml_ExpectDtdMarkup);
1791Throw(_curPos + 2, SR.Xml_ExpectDtdMarkup);
1803Throw(_curPos, SR.Xml_ExpectDtdMarkup);
1833Throw(_curPos, SR.Xml_ExpectDtdMarkup);
1839Throw(_charsUsed, SR.Xml_IncompleteDtdContent);
1872Throw(_curPos, SR.Xml_ExpectExternalOrClose);
1880Throw(_curPos, SR.Xml_ExpectExternalOrClose);
1894Throw(_curPos, SR.Xml_ExpectExternalOrClose);
1912Throw(_curPos, SR.Xml_ExpectSubOrClose);
1964Throw(_curPos, SR.Xml_InvalidContentModel);
1970Throw(_curPos, SR.Xml_IncompleteDtdContent);
1983Throw(_curPos, SR.Xml_IncompleteDtdContent);
1995Throw(_curPos + 1, SR.Xml_ExpectPcData);
2042Throw(_curPos, SR.Xml_ExpectNoWhitespace);
2069Throw(_curPos, SR.Xml_ExpectOp);
2115Throw(_curPos, SR.Xml_ExpectingWhiteSpace, ParseUnexpectedToken(_curPos));
2140Throw(_curPos, SR.Xml_InvalidAttributeType1);
2152Throw(_curPos, SR.Xml_InvalidAttributeType);
2159Throw(_curPos, SR.Xml_InvalidAttributeType);
2167Throw(_curPos, SR.Xml_InvalidAttributeType);
2177Throw(_curPos, SR.Xml_InvalidAttributeType);
2188Throw(_curPos, SR.Xml_InvalidAttributeType);
2213Throw(_curPos, SR.Xml_InvalidAttributeType);
2223Throw(_curPos, SR.Xml_InvalidAttributeType);
2238Throw(_curPos, SR.Xml_InvalidAttributeType);
2243Throw(_curPos, SR.Xml_InvalidAttributeType);
2250Throw(_curPos, SR.Xml_IncompleteDtdContent);
2333Throw(_curPos, SR.Xml_ExpectAttType);
2345Throw(_curPos, SR.Xml_ExpectAttType);
2354Throw(_curPos, SR.Xml_ExpectAttType);
2360Throw(_curPos, SR.Xml_ExpectAttType);
2365Throw(_curPos, SR.Xml_ExpectAttType);
2371Throw(_curPos, SR.Xml_IncompleteDtdContent);
2496Throw(_curPos, SR.Xml_BadAttributeChar, XmlException.BuildCharExceptionArgs('<', '\0'));
2616Throw(_curPos, SR.Xml_UnclosedQuote);
2631Throw(SR.Xml_ErrorParsingEntityName, string.Empty, e.LineNumber, e.LinePosition);
2651Throw(_curPos, SR.Xml_ExpectExternalOrClose);
2659Throw(_curPos, SR.Xml_ExpectExternalOrClose);
2665Throw(_curPos, SR.Xml_ExpectExternalOrPublicId);
2707Throw(_curPos, SR.Xml_ExpectExternalOrClose);
2715Throw(_curPos, SR.Xml_ExpectExternalOrClose);
2727Throw(_curPos, SR.Xml_ExpectExternalIdOrEntityValue);
2788Throw(_curPos, SR.Xml_ExpectIgnoreOrInclude);
2827Throw(_curPos - 1, SR.Xml_ExpectIgnoreOrInclude);
2833Throw(_curPos, SR.Xml_IncompleteDtdContent);
2960Throw(_curPos, SR.Xml_UnclosedConditionalSection);
2995Throw(_curPos, SR.Xml_UnexpectedEOF, "Name");
2999Throw(_curPos, SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(_chars, _charsUsed, _curPos));
3023Throw(_curPos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
3044Throw(_curPos, SR.Xml_UnexpectedEOF, "Name");
3085Throw(_curPos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(_chars, _charsUsed, _curPos));
3100Throw(_curPos, SR.Xml_UnexpectedEOF, "NmToken");
3164Throw(_tokenStartPos, SR.Xml_ColonInLocalName, GetNameString());
3257Throw(_curPos - entityName.Name.Length - 1, SR.Xml_InvalidParEntityRef);
3267Throw(_curPos - entityName.Name.Length - 1, paramEntity ? SR.Xml_RecursiveParEntity : SR.Xml_RecursiveGenEntity, entityName.Name);
3360SendValidationEvent(_curPos - entityName.Name.Length - 1, XmlSeverityType.Error, SR.Xml_UndeclaredParEntity, entityName.Name);
3369SendValidationEvent(_curPos - entityName.Name.Length - 1, XmlSeverityType.Error, SR.Xml_UndeclaredEntity, entityName.Name);
3374Throw(_curPos - entityName.Name.Length - 1, SR.Xml_UndeclaredEntity, entityName.Name);
3382Throw(_curPos - entityName.Name.Length - 1, SR.Xml_UnparsedEntityRef, entityName.Name);
3387Throw(_curPos - entityName.Name.Length - 1, SR.Xml_ExternalEntityInAttValue, entityName.Name);
3448Throw(_curPos, SR.Xml_InternalError);
3481Throw(pos, SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(data, invCharPos));
3486Throw(invCharPos, SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(data, length, invCharPos));
3499Throw(_curPos, SR.Xml_UnexpectedTokens2, new string[3] { unexpectedToken, expectedToken1, expectedToken2 });
3503Throw(_curPos, SR.Xml_UnexpectedTokenEx, new string[2] { unexpectedToken, expectedToken1 });
System\Xml\Schema\DtdParserAsync.cs (96)
63SendValidationEvent(XmlSeverityType.Error, new XmlSchemaException(SR.Sch_UndeclaredNotation, un.name, BaseUriStr, (int)un.lineNo, (int)un.linePos));
204Throw(_curPos - 3, SR.Xml_InvalidConditionalSection); // 3==strlen("<![")
215SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
220Throw(_curPos - 3, SR.Xml_UnexpectedCDataEnd);
228Throw(_curPos, SR.Xml_UnclosedConditionalSection);
251Throw(_curPos, SR.Xml_ExpectDtdMarkup);
257Throw(_curPos, SR.Xml_IncompleteDtdContent);
261Throw(_curPos, SR.Xml_UnclosedConditionalSection);
275SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
281Throw(_curPos, SR.Sch_ParEntityRefNesting);
331Throw(SR.Xml_EnumerationRequired, string.Empty, attrDef.LineNumber, attrDef.LinePosition);
371Throw(SR.Xml_EnumerationRequired, string.Empty, attrDef.LineNumber, attrDef.LinePosition);
420SendValidationEvent(XmlSeverityType.Error, SR.Sch_IdAttrDeclared, elementDecl.Name.ToString());
433SendValidationEvent(_curPos - 8, XmlSeverityType.Error, SR.Sch_DupNotationAttribute, elementDecl.Name.ToString()); // 8 == strlen("NOTATION")
441SendValidationEvent(_curPos - 8, XmlSeverityType.Error, SR.Sch_NotationAttributeOnEmptyElement, elementDecl.Name.ToString()); // 8 == strlen("NOTATION")
466SendValidationEvent(XmlSeverityType.Error, new XmlSchemaException(SR.Xml_AttlistDuplNotationValue, notationName, BaseUriStr, (int)LineNo, (int)LinePos));
505SendValidationEvent(XmlSeverityType.Error, new XmlSchemaException(SR.Xml_AttlistDuplEnumValue, nmtoken, BaseUriStr, (int)LineNo, (int)LinePos));
550SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_AttListPresence, string.Empty);
588SendValidationEvent(_curPos - name.Name.Length, XmlSeverityType.Error, SR.Sch_DupElementDecl, GetNameString());
690Throw(_curPos, SR.Xml_InvalidContentModel);
702Throw(_curPos, SR.Xml_InvalidContentModel);
710Throw(_curPos, SR.Xml_InvalidContentModel);
719SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
724Throw(_curPos, SR.Xml_InvalidContentModel);
781SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
806SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
818SendValidationEvent(XmlSeverityType.Error, SR.Sch_DupElement, name.ToString());
827SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
900Throw(_curPos - 5, SR.Xml_ExpectingWhiteSpace, "NDATA");
957SendValidationEvent(_curPos - notationName.Name.Length, XmlSeverityType.Error, SR.Sch_DupNotation, notationName.Name);
1004if (e.ResString == SR.Xml_UnexpectedEOF && _currentEntityId != 0)
1006SendValidationEvent(XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, null);
1045SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
1070SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
1079SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
1108Throw(_curPos - systemId.Length - 1, SR.Xml_FragmentId, new string[] { systemId.Substring(systemId.IndexOf('#')), systemId });
1138Throw(SR.Xml_ExpectingWhiteSpace, char.ToString(_literalQuoteChar), (int)_literalLineInfo.lineNo, (int)_literalLineInfo.linePos);
1155Throw(SR.Xml_ExpectingWhiteSpace, char.ToString(_literalQuoteChar), (int)_literalLineInfo.lineNo, (int)_literalLineInfo.linePos);
1241Throw(_curPos, SR.Xml_ExpectingWhiteSpace, ParseUnexpectedToken(_curPos));
1300Throw(_curPos, SR.Xml_IncompleteDtdContent);
1329Throw(_curPos, SR.Xml_ExpectDtdMarkup);
1345Throw(_curPos, SR.Xml_ExpectDtdMarkup);
1357Throw(_curPos, SR.Xml_ExpectDtdMarkup);
1370Throw(_curPos, SR.Xml_ExpectDtdMarkup);
1387Throw(_curPos, SR.Xml_ExpectDtdMarkup);
1410Throw(_curPos, SR.Xml_ExpectDtdMarkup);
1418Throw(_curPos + 2, SR.Xml_ExpectDtdMarkup);
1430Throw(_curPos, SR.Xml_ExpectDtdMarkup);
1460Throw(_curPos, SR.Xml_ExpectDtdMarkup);
1466Throw(_charsUsed, SR.Xml_IncompleteDtdContent);
1499Throw(_curPos, SR.Xml_ExpectExternalOrClose);
1507Throw(_curPos, SR.Xml_ExpectExternalOrClose);
1521Throw(_curPos, SR.Xml_ExpectExternalOrClose);
1562Throw(_curPos, SR.Xml_InvalidContentModel);
1568Throw(_curPos, SR.Xml_IncompleteDtdContent);
1581Throw(_curPos, SR.Xml_IncompleteDtdContent);
1593Throw(_curPos + 1, SR.Xml_ExpectPcData);
1630Throw(_curPos, SR.Xml_ExpectingWhiteSpace, ParseUnexpectedToken(_curPos));
1655Throw(_curPos, SR.Xml_InvalidAttributeType1);
1667Throw(_curPos, SR.Xml_InvalidAttributeType);
1674Throw(_curPos, SR.Xml_InvalidAttributeType);
1682Throw(_curPos, SR.Xml_InvalidAttributeType);
1692Throw(_curPos, SR.Xml_InvalidAttributeType);
1703Throw(_curPos, SR.Xml_InvalidAttributeType);
1728Throw(_curPos, SR.Xml_InvalidAttributeType);
1738Throw(_curPos, SR.Xml_InvalidAttributeType);
1753Throw(_curPos, SR.Xml_InvalidAttributeType);
1758Throw(_curPos, SR.Xml_InvalidAttributeType);
1765Throw(_curPos, SR.Xml_IncompleteDtdContent);
1794Throw(_curPos, SR.Xml_ExpectAttType);
1806Throw(_curPos, SR.Xml_ExpectAttType);
1815Throw(_curPos, SR.Xml_ExpectAttType);
1821Throw(_curPos, SR.Xml_ExpectAttType);
1826Throw(_curPos, SR.Xml_ExpectAttType);
1832Throw(_curPos, SR.Xml_IncompleteDtdContent);
1942Throw(_curPos, SR.Xml_BadAttributeChar, XmlException.BuildCharExceptionArgs('<', '\0'));
2062Throw(_curPos, SR.Xml_UnclosedQuote);
2076Throw(_curPos, SR.Xml_ExpectExternalOrClose);
2084Throw(_curPos, SR.Xml_ExpectExternalOrClose);
2090Throw(_curPos, SR.Xml_ExpectExternalOrPublicId);
2132Throw(_curPos, SR.Xml_ExpectExternalOrClose);
2140Throw(_curPos, SR.Xml_ExpectExternalOrClose);
2152Throw(_curPos, SR.Xml_ExpectExternalIdOrEntityValue);
2213Throw(_curPos, SR.Xml_ExpectIgnoreOrInclude);
2252Throw(_curPos - 1, SR.Xml_ExpectIgnoreOrInclude);
2258Throw(_curPos, SR.Xml_IncompleteDtdContent);
2374Throw(_curPos, SR.Xml_UnclosedConditionalSection);
2409Throw(_curPos, SR.Xml_UnexpectedEOF, "Name");
2413Throw(_curPos, SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(_chars, _charsUsed, _curPos));
2436Throw(_curPos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
2457Throw(_curPos, SR.Xml_UnexpectedEOF, "Name");
2498Throw(_curPos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(_chars, _charsUsed, _curPos));
2513Throw(_curPos, SR.Xml_UnexpectedEOF, "NmToken");
2587Throw(_curPos - entityName.Name.Length - 1, SR.Xml_InvalidParEntityRef);
2597Throw(_curPos - entityName.Name.Length - 1, paramEntity ? SR.Xml_RecursiveParEntity : SR.Xml_RecursiveGenEntity, entityName.Name);
System\Xml\Schema\DtdValidator.cs (20)
101SendValidationEvent(SR.Xml_NoDTDPresent, _name.ToString(), XmlSeverityType.Warning);
113SendValidationEvent(SR.Sch_StandAlone);
126SendValidationEvent(SR.Sch_InvalidPIComment);
138SendValidationEvent(SR.Sch_RootMatchDocType);
202SendValidationEvent(SR.Sch_UndeclaredAttribute, reader.Name);
253SendValidationEvent(SR.Sch_UndeclaredElement, XmlSchemaValidator.QNameString(context!.LocalName!, context.Namespace!));
312SendValidationEvent(SR.Sch_DupId, name);
382SendValidationEvent(SR.Sch_NotationValue, typedValue.ToString());
386SendValidationEvent(SR.Sch_EnumerationValue, typedValue.ToString());
393SendValidationEvent(SR.Sch_FixedAttributeValue, attdef!.Name.ToString());
397SendValidationEvent(SR.Sch_FixedElementValue, XmlSchemaValidator.QNameString(context!.LocalName!, context.Namespace!));
405SendValidationEvent(SR.Sch_AttributeValueDataType, attdef.Name.ToString());
409SendValidationEvent(SR.Sch_ElementValueDataType, XmlSchemaValidator.QNameString(context!.LocalName!, context.Namespace!));
446throw new XmlException(SR.Xml_UndeclaredEntity, n);
451throw new XmlException(SR.Xml_UnparsedEntityRef, n);
456SendValidationEvent(SR.Sch_StandAlone);
490SendValidationEvent(new XmlSchemaException(SR.Sch_UndeclaredId, next.Id, reader.BaseURI, next.LineNo, next.LinePos));
554XmlSchemaException e = new XmlSchemaException(SR.Sch_AttributeDefaultDataType, attdef.Name.ToString());
600XmlSchemaException e = new XmlSchemaException(SR.Sch_EnumerationValue, typedValue!.ToString(), baseUriStr, attdef.ValueLineNumber, attdef.ValueLinePosition);
615XmlSchemaException e = new XmlSchemaException(SR.Sch_AttributeDefaultDataType, attdef.Name.ToString());
System\Xml\Schema\FacetChecker.cs (122)
55CheckProhibitedFlag(facet, RestrictionFlags.Length, SR.Sch_LengthFacetProhibited);
56CheckDupFlag(facet, RestrictionFlags.Length, SR.Sch_DupLengthFacet);
57_derivedRestriction.Length = XmlBaseConverter.DecimalToInt32((decimal)ParseFacetValue(_nonNegativeInt, facet, SR.Sch_LengthFacetInvalid, null, null));
63throw new XmlSchemaException(SR.Sch_FacetBaseFixed, facet);
70throw new XmlSchemaException(SR.Sch_LengthGtBaseLength, facet);
78throw new XmlSchemaException(SR.Sch_MaxMinLengthBaseLength, facet);
86throw new XmlSchemaException(SR.Sch_MaxMinLengthBaseLength, facet);
94CheckProhibitedFlag(facet, RestrictionFlags.MinLength, SR.Sch_MinLengthFacetProhibited);
95CheckDupFlag(facet, RestrictionFlags.MinLength, SR.Sch_DupMinLengthFacet);
96_derivedRestriction.MinLength = XmlBaseConverter.DecimalToInt32((decimal)ParseFacetValue(_nonNegativeInt, facet, SR.Sch_MinLengthFacetInvalid, null, null));
102throw new XmlSchemaException(SR.Sch_FacetBaseFixed, facet);
109throw new XmlSchemaException(SR.Sch_MinLengthGtBaseMinLength, facet);
116throw new XmlSchemaException(SR.Sch_MaxMinLengthBaseLength, facet);
124CheckProhibitedFlag(facet, RestrictionFlags.MaxLength, SR.Sch_MaxLengthFacetProhibited);
125CheckDupFlag(facet, RestrictionFlags.MaxLength, SR.Sch_DupMaxLengthFacet);
126_derivedRestriction.MaxLength = XmlBaseConverter.DecimalToInt32((decimal)ParseFacetValue(_nonNegativeInt, facet, SR.Sch_MaxLengthFacetInvalid, null, null));
132throw new XmlSchemaException(SR.Sch_FacetBaseFixed, facet);
139throw new XmlSchemaException(SR.Sch_MaxLengthGtBaseMaxLength, facet);
146throw new XmlSchemaException(SR.Sch_MaxMinLengthBaseLength, facet);
154CheckProhibitedFlag(facet, RestrictionFlags.Pattern, SR.Sch_PatternFacetProhibited);
173CheckProhibitedFlag(facet, RestrictionFlags.Enumeration, SR.Sch_EnumerationFacetProhibited);
175_derivedRestriction.Enumeration.Add(ParseFacetValue(_datatype, facet, SR.Sch_EnumerationFacetInvalid, nsmgr, nameTable));
181CheckProhibitedFlag(facet, RestrictionFlags.WhiteSpace, SR.Sch_WhiteSpaceFacetProhibited);
182CheckDupFlag(facet, RestrictionFlags.WhiteSpace, SR.Sch_DupWhiteSpaceFacet);
197throw new XmlSchemaException(SR.Sch_InvalidWhiteSpace, facet.Value, facet);
203throw new XmlSchemaException(SR.Sch_FacetBaseFixed, facet);
220throw new XmlSchemaException(SR.Sch_WhiteSpaceRestriction1, facet);
226throw new XmlSchemaException(SR.Sch_WhiteSpaceRestriction2, facet);
233CheckProhibitedFlag(facet, RestrictionFlags.MaxInclusive, SR.Sch_MaxInclusiveFacetProhibited);
234CheckDupFlag(facet, RestrictionFlags.MaxInclusive, SR.Sch_DupMaxInclusiveFacet);
235_derivedRestriction.MaxInclusive = ParseFacetValue(_builtInType, facet, SR.Sch_MaxInclusiveFacetInvalid, null, null);
241throw new XmlSchemaException(SR.Sch_FacetBaseFixed, facet);
250CheckProhibitedFlag(facet, RestrictionFlags.MaxExclusive, SR.Sch_MaxExclusiveFacetProhibited);
251CheckDupFlag(facet, RestrictionFlags.MaxExclusive, SR.Sch_DupMaxExclusiveFacet);
252_derivedRestriction.MaxExclusive = ParseFacetValue(_builtInType, facet, SR.Sch_MaxExclusiveFacetInvalid, null, null);
258throw new XmlSchemaException(SR.Sch_FacetBaseFixed, facet);
267CheckProhibitedFlag(facet, RestrictionFlags.MinInclusive, SR.Sch_MinInclusiveFacetProhibited);
268CheckDupFlag(facet, RestrictionFlags.MinInclusive, SR.Sch_DupMinInclusiveFacet);
269_derivedRestriction.MinInclusive = ParseFacetValue(_builtInType, facet, SR.Sch_MinInclusiveFacetInvalid, null, null);
275throw new XmlSchemaException(SR.Sch_FacetBaseFixed, facet);
284CheckProhibitedFlag(facet, RestrictionFlags.MinExclusive, SR.Sch_MinExclusiveFacetProhibited);
285CheckDupFlag(facet, RestrictionFlags.MinExclusive, SR.Sch_DupMinExclusiveFacet);
286_derivedRestriction.MinExclusive = ParseFacetValue(_builtInType, facet, SR.Sch_MinExclusiveFacetInvalid, null, null);
292throw new XmlSchemaException(SR.Sch_FacetBaseFixed, facet);
301CheckProhibitedFlag(facet, RestrictionFlags.TotalDigits, SR.Sch_TotalDigitsFacetProhibited);
302CheckDupFlag(facet, RestrictionFlags.TotalDigits, SR.Sch_DupTotalDigitsFacet);
304_derivedRestriction.TotalDigits = XmlBaseConverter.DecimalToInt32((decimal)ParseFacetValue(positiveInt, facet, SR.Sch_TotalDigitsFacetInvalid, null, null));
310throw new XmlSchemaException(SR.Sch_FacetBaseFixed, facet);
317throw new XmlSchemaException(SR.Sch_TotalDigitsMismatch, string.Empty);
325CheckProhibitedFlag(facet, RestrictionFlags.FractionDigits, SR.Sch_FractionDigitsFacetProhibited);
326CheckDupFlag(facet, RestrictionFlags.FractionDigits, SR.Sch_DupFractionDigitsFacet);
327_derivedRestriction.FractionDigits = XmlBaseConverter.DecimalToInt32((decimal)ParseFacetValue(_nonNegativeInt, facet, SR.Sch_FractionDigitsFacetInvalid, null, null));
331throw new XmlSchemaException(SR.Sch_FractionDigitsFacetInvalid, SR.Sch_FractionDigitsNotOnDecimal, facet);
337throw new XmlSchemaException(SR.Sch_FacetBaseFixed, facet);
344throw new XmlSchemaException(SR.Sch_FractionDigitsMismatch, string.Empty);
371throw new XmlSchemaException(SR.Sch_PatternFacetInvalid, new string[] { e.Message }, e, _pattern_facet!.SourceUri, _pattern_facet.LineNumber, _pattern_facet.LinePosition, _pattern_facet);
386throw new XmlSchemaException(SR.Sch_MaxInclusiveMismatch, string.Empty);
393throw new XmlSchemaException(SR.Sch_MaxIncExlMismatch, string.Empty);
403throw new XmlSchemaException(SR.Sch_MaxExclusiveMismatch, string.Empty);
410throw new XmlSchemaException(SR.Sch_MaxExlIncMismatch, string.Empty);
420throw new XmlSchemaException(SR.Sch_MinInclusiveMismatch, string.Empty);
427throw new XmlSchemaException(SR.Sch_MinIncExlMismatch, string.Empty);
434throw new XmlSchemaException(SR.Sch_MinIncMaxExlMismatch, string.Empty);
444throw new XmlSchemaException(SR.Sch_MinExclusiveMismatch, string.Empty);
451throw new XmlSchemaException(SR.Sch_MinExlIncMismatch, string.Empty);
458throw new XmlSchemaException(SR.Sch_MinExlMaxExlMismatch, string.Empty);
477throw new XmlSchemaException(SR.Sch_MaxInclusiveExclusive, string.Empty);
484throw new XmlSchemaException(SR.Sch_MinInclusiveExclusive, string.Empty);
491throw new XmlSchemaException(SR.Sch_LengthAndMinMax, string.Empty);
504throw new XmlSchemaException(SR.Sch_MinLengthGtMaxLength, string.Empty);
515throw new XmlSchemaException(SR.Sch_MinInclusiveGtMaxInclusive, string.Empty);
525throw new XmlSchemaException(SR.Sch_MinInclusiveGtMaxExclusive, string.Empty);
535throw new XmlSchemaException(SR.Sch_MinExclusiveGtMaxExclusive, string.Empty);
545throw new XmlSchemaException(SR.Sch_MinExclusiveGtMaxInclusive, string.Empty);
552throw new XmlSchemaException(SR.Sch_FractionDigitsGtTotalDigits, string.Empty);
877return new XmlSchemaException(SR.Sch_PatternConstraintFailed, string.Empty);
902throw new XmlSchemaException(SR.Sch_InvalidFacet, facet);
956throw new XmlSchemaException(SR.Sch_UnknownFacet, facet);
1012return new OverflowException(SR.Format(SR.XmlConvert_Overflow, value.ToString(CultureInfo.InvariantCulture), datatype.TypeCodeString));
1022return new XmlSchemaException(SR.Sch_MaxInclusiveConstraintFailed, string.Empty);
1030return new XmlSchemaException(SR.Sch_MaxExclusiveConstraintFailed, string.Empty);
1038return new XmlSchemaException(SR.Sch_MinInclusiveConstraintFailed, string.Empty);
1046return new XmlSchemaException(SR.Sch_MinExclusiveConstraintFailed, string.Empty);
1053return new XmlSchemaException(SR.Sch_EnumerationConstraintFailed, string.Empty);
1109return new XmlSchemaException(SR.Sch_TotalDigitsConstraintFailed, string.Empty);
1113return new XmlSchemaException(SR.Sch_FractionDigitsConstraintFailed, string.Empty);
1138return new XmlSchemaException(SR.Sch_MaxInclusiveConstraintFailed, string.Empty);
1145return new XmlSchemaException(SR.Sch_MaxExclusiveConstraintFailed, string.Empty);
1153return new XmlSchemaException(SR.Sch_MinInclusiveConstraintFailed, string.Empty);
1161return new XmlSchemaException(SR.Sch_MinExclusiveConstraintFailed, string.Empty);
1168return new XmlSchemaException(SR.Sch_EnumerationConstraintFailed, string.Empty);
1213return new XmlSchemaException(SR.Sch_MaxInclusiveConstraintFailed, string.Empty);
1221return new XmlSchemaException(SR.Sch_MaxExclusiveConstraintFailed, string.Empty);
1229return new XmlSchemaException(SR.Sch_MinInclusiveConstraintFailed, string.Empty);
1237return new XmlSchemaException(SR.Sch_MinExclusiveConstraintFailed, string.Empty);
1244return new XmlSchemaException(SR.Sch_EnumerationConstraintFailed, string.Empty);
1284return new XmlSchemaException(SR.Sch_MaxInclusiveConstraintFailed, string.Empty);
1292return new XmlSchemaException(SR.Sch_MaxExclusiveConstraintFailed, string.Empty);
1300return new XmlSchemaException(SR.Sch_MinInclusiveConstraintFailed, string.Empty);
1308return new XmlSchemaException(SR.Sch_MinExclusiveConstraintFailed, string.Empty);
1316return new XmlSchemaException(SR.Sch_EnumerationConstraintFailed, string.Empty);
1375return new XmlSchemaException(SR.Sch_LengthConstraintFailed, string.Empty);
1382return new XmlSchemaException(SR.Sch_MinLengthConstraintFailed, string.Empty);
1389return new XmlSchemaException(SR.Sch_MaxLengthConstraintFailed, string.Empty);
1396return new XmlSchemaException(SR.Sch_EnumerationConstraintFailed, string.Empty);
1457return new XmlSchemaException(SR.Sch_EmptyAttributeValue, string.Empty);
1461return new XmlSchemaException(SR.Sch_InvalidLanguageId, string.Empty);
1509return new XmlSchemaException(SR.Sch_LengthConstraintFailed, string.Empty);
1516return new XmlSchemaException(SR.Sch_MinLengthConstraintFailed, string.Empty);
1523return new XmlSchemaException(SR.Sch_MaxLengthConstraintFailed, string.Empty);
1530return new XmlSchemaException(SR.Sch_EnumerationConstraintFailed, string.Empty);
1578return new XmlSchemaException(SR.Sch_LengthConstraintFailed, string.Empty);
1585return new XmlSchemaException(SR.Sch_MinLengthConstraintFailed, string.Empty);
1592return new XmlSchemaException(SR.Sch_MaxLengthConstraintFailed, string.Empty);
1599return new XmlSchemaException(SR.Sch_EnumerationConstraintFailed, string.Empty);
1641return new XmlSchemaException(SR.Sch_LengthConstraintFailed, string.Empty);
1649return new XmlSchemaException(SR.Sch_MinLengthConstraintFailed, string.Empty);
1657return new XmlSchemaException(SR.Sch_MaxLengthConstraintFailed, string.Empty);
1665return new XmlSchemaException(SR.Sch_EnumerationConstraintFailed, string.Empty);
1710return new XmlSchemaException(SR.Sch_EnumerationConstraintFailed, string.Empty);
System\Xml\Schema\Inference\Infer.cs (20)
195throw new XmlSchemaInferenceException(SR.SchInf_schema, 0, 0);
260throw new XmlSchemaInferenceException(SR.SchInf_NoElement, 0, 0);
269throw new XmlSchemaInferenceException(SR.SchInf_schema, 0, 0);
496throw new XmlSchemaInferenceException(SR.SchInf_schema, 0, 0);
699throw new XmlSchemaInferenceException(SR.SchInf_entity, 0, 0);
918throw new XmlSchemaInferenceException(SR.SchInf_particle, 0, 0);
947throw new XmlSchemaInferenceException(SR.SchInf_ct, 0, 0);
954throw new XmlSchemaInferenceException(SR.SchInf_entity, 0, 0);
972throw new XmlSchemaInferenceException(SR.SchInf_seq, 0, 0);
984throw new XmlSchemaInferenceException(SR.SchInf_simplecontent, 0, 0);
989throw new XmlSchemaInferenceException(SR.SchInf_extension, 0, 0);
1033throw new XmlSchemaInferenceException(SR.SchInf_schema, 0, 0);
1062throw new XmlSchemaInferenceException(SR.SchInf_UnknownParticle, 0, 0);
1090throw new XmlSchemaInferenceException(SR.SchInf_UnknownParticle, 0, 0);
1120throw new XmlSchemaInferenceException(SR.SchInf_UnknownParticle, 0, 0);
1194throw new XmlSchemaInferenceException(SR.SchInf_noseq, 0, 0);
1207throw new XmlSchemaInferenceException(SR.SchInf_schema, 0, 0);
1224throw new XmlSchemaInferenceException(SR.Sch_NotXsiAttribute, localName);
1401throw new XmlSchemaInferenceException(SR.SchInf_noct, 0, 0);
2505throw new XmlSchemaInferenceException(SR.SchInf_schematype, 0, 0);
System\Xml\Schema\Preprocessor.cs (118)
113SendValidationEvent(SR.Sch_MismatchTargetNamespaceEx, targetNamespace, _rootSchema.TargetNamespace, _rootSchema);
329SendValidationEvent(new XmlSchemaException(SR.Sch_InvalidIncludeLocation, null, innerException, include.SourceUri, include.LineNumber, include.LinePosition, include), XmlSeverityType.Warning);
379SendValidationEvent(SR.Sch_InvalidIncludeLocation, include, XmlSeverityType.Warning);
395SendValidationEvent(SR.Sch_CannotLoadSchemaLocation, schemaLocation, e.Message, e.SourceUri, e.LineNumber, e.LinePosition);
399SendValidationEvent(new XmlSchemaException(SR.Sch_InvalidIncludeLocation, null, eInner, include.SourceUri, include.LineNumber, include.LinePosition, include), XmlSeverityType.Warning);
409SendValidationEvent(new XmlSchemaException(SR.Sch_InvalidIncludeLocation, null, innerException, include.SourceUri, include.LineNumber, include.LinePosition, include), XmlSeverityType.Warning);
532SendValidationEvent(SR.Sch_InvalidTargetNamespaceAttribute, schema);
536ParseUri(tns, SR.Sch_InvalidNamespace, schema);
546SendValidationEvent(SR.Sch_AttributeValueDataTypeDetailed, new string[] { "version", schema.Version, tokenDt.TypeCodeString, exception.Message }, exception, schema);
566ParseUri(loc, SR.Sch_InvalidSchemaLocation, include);
570SendValidationEvent(SR.Sch_MissRequiredAttribute, "schemaLocation", include);
580SendValidationEvent(SR.Sch_ImportTargetNamespace, include);
586SendValidationEvent(SR.Sch_MismatchTargetNamespaceImport, importNS, externalSchema.TargetNamespace, import);
600SendValidationEvent(SR.Sch_InvalidNamespaceAttribute, importNS, include);
604ParseUri(importNS, SR.Sch_InvalidNamespace, include);
632SendValidationEvent(SR.Sch_MismatchTargetNamespaceInclude, externalSchema.TargetNamespace, schema.TargetNamespace, include);
717SendValidationEvent(SR.Sch_RedefineNoSchema, redefine);
773SendValidationEvent(SR.Sch_InvalidCollection, (XmlSchemaObject)schemaItems[i]);
828SendValidationEvent(SR.Sch_MultipleRedefine, redefine, XmlSeverityType.Warning);
849SendValidationEvent(SR.Sch_GroupDoubleRedefine, group);
858SendValidationEvent(SR.Sch_ComponentRedefineNotFound, "<group>", group.QualifiedName.ToString(), group);
874SendValidationEvent(SR.Sch_AttrGroupDoubleRedefine, attributeGroup);
883SendValidationEvent(SR.Sch_ComponentRedefineNotFound, "<attributeGroup>", attributeGroup.QualifiedName.ToString(), attributeGroup);
899SendValidationEvent(SR.Sch_ComplexTypeDoubleRedefine, complexType);
908SendValidationEvent(SR.Sch_ComponentRedefineNotFound, "<complexType>", complexType.QualifiedName.ToString(), complexType);
918SendValidationEvent(SR.Sch_SimpleToComplexTypeRedefine, complexType);
928SendValidationEvent(SR.Sch_SimpleTypeDoubleRedefine, simpleType);
937SendValidationEvent(SR.Sch_ComponentRedefineNotFound, "<simpleType>", simpleType.QualifiedName.ToString(), simpleType);
947SendValidationEvent(SR.Sch_ComplexToSimpleTypeRedefine, simpleType);
1001SendValidationEvent(SR.Sch_InvalidBlockDefaultValue, schema);
1017SendValidationEvent(SR.Sch_InvalidFinalDefaultValue, schema);
1046SendValidationEvent(SR.Sch_MinMaxGroupRedefine, groupRef);
1072SendValidationEvent(SR.Sch_MultipleGroupSelfRef, group);
1090SendValidationEvent(SR.Sch_MultipleAttrGroupSelfRef, attributeGroup);
1105SendValidationEvent(SR.Sch_InvalidTypeRedefine, stype);
1144SendValidationEvent(SR.Sch_InvalidTypeRedefine, ctype);
1156SendValidationEvent(SR.Sch_MissRequiredAttribute, "name", attribute);
1160SendValidationEvent(SR.Sch_ForbiddenAttribute, "use", attribute);
1164SendValidationEvent(SR.Sch_ForbiddenAttribute, "form", attribute);
1183SendValidationEvent(SR.Sch_AttributeNameRef, "???", attribute);
1196SendValidationEvent(SR.Sch_InvalidAttributeRef, attribute);
1209SendValidationEvent(SR.Sch_TargetNamespaceXsi, attribute);
1214SendValidationEvent(SR.Sch_ForbiddenAttribute, "ref", attribute);
1218SendValidationEvent(SR.Sch_DefaultFixedAttributes, attribute);
1222SendValidationEvent(SR.Sch_OptionalDefaultAttribute, attribute);
1226SendValidationEvent(SR.Sch_XmlNsAttribute, attribute);
1233SendValidationEvent(SR.Sch_TypeMutualExclusive, attribute);
1252SendValidationEvent(SR.Sch_MissRequiredAttribute, "name", attributeGroup);
1268SendValidationEvent(SR.Sch_MissRequiredAttribute, "name", element);
1291SendValidationEvent(SR.Sch_InvalidElementFinalValue, element);
1297SendValidationEvent(SR.Sch_ForbiddenAttribute, "form", element);
1301SendValidationEvent(SR.Sch_ForbiddenAttribute, "minOccurs", element);
1305SendValidationEvent(SR.Sch_ForbiddenAttribute, "maxOccurs", element);
1327SendValidationEvent(SR.Sch_ElementNameRef, element);
1343SendValidationEvent(SR.Sch_InvalidElementRef, element);
1347SendValidationEvent(SR.Sch_DefaultFixedAttributes, element);
1354SendValidationEvent(SR.Sch_MinGtMax, element);
1358SendValidationEvent(SR.Sch_ForbiddenAttribute, "abstract", element);
1362SendValidationEvent(SR.Sch_ForbiddenAttribute, "final", element);
1366SendValidationEvent(SR.Sch_ForbiddenAttribute, "substitutionGroup", element);
1376SendValidationEvent(SR.Sch_ForbiddenAttribute, "ref", element);
1397SendValidationEvent(SR.Sch_InvalidElementBlockValue, element);
1406SendValidationEvent(SR.Sch_TypeMutualExclusive, element);
1423SendValidationEvent(SR.Sch_DefaultFixedAttributes, element);
1445SendValidationEvent(SR.Sch_MissRequiredAttribute, "name", constraint);
1451SendValidationEvent(SR.Sch_DupIdentityConstraint, constraint.QualifiedName.ToString(), constraint);
1461SendValidationEvent(SR.Sch_IdConstraintNoSelector, constraint);
1467SendValidationEvent(SR.Sch_IdConstraintNoFields, constraint);
1475SendValidationEvent(SR.Sch_IdConstraintNoRefer, constraint);
1504SendValidationEvent(SR.Sch_ForbiddenAttribute, "name", simpleType);
1516SendValidationEvent(SR.Sch_MissRequiredAttribute, "name", simpleType);
1538SendValidationEvent(SR.Sch_InvalidSimpleTypeFinalValue, simpleType);
1546SendValidationEvent(SR.Sch_NoSimpleTypeContent, simpleType);
1561SendValidationEvent(SR.Sch_SimpleTypeRestRefBase, restriction);
1569SendValidationEvent(SR.Sch_SimpleTypeRestRefBaseNone, restriction);
1587SendValidationEvent(SR.Sch_SimpleTypeListRefBase, list);
1596SendValidationEvent(SR.Sch_SimpleTypeListRefBaseNone, list);
1623SendValidationEvent(SR.Sch_SimpleTypeUnionNoBase, union1);
1643SendValidationEvent(SR.Sch_ForbiddenAttribute, "name", complexType);
1655SendValidationEvent(SR.Sch_MissRequiredAttribute, "name", complexType);
1669SendValidationEvent(SR.Sch_InvalidComplexTypeBlockValue, complexType);
1692SendValidationEvent(SR.Sch_InvalidComplexTypeFinalValue, complexType);
1712SendValidationEvent(SR.Sch_NoRestOrExt, complexType);
1716SendValidationEvent(SR.Sch_NoRestOrExtQName, complexType.QualifiedName.Name, complexType.QualifiedName.Namespace, complexType);
1728SendValidationEvent(SR.Sch_MissAttribute, "base", contentExtension);
1742SendValidationEvent(SR.Sch_MissAttribute, "base", contentRestriction);
1766SendValidationEvent(SR.Sch_NoRestOrExt, complexType);
1770SendValidationEvent(SR.Sch_NoRestOrExtQName, complexType.QualifiedName.Name, complexType.QualifiedName.Namespace, complexType);
1786SendValidationEvent(SR.Sch_MissAttribute, "base", contentExtension);
1805SendValidationEvent(SR.Sch_MissAttribute, "base", contentRestriction);
1846SendValidationEvent(SR.Sch_MissRequiredAttribute, "name", group);
1850SendValidationEvent(SR.Sch_NoGroupParticle, group);
1855SendValidationEvent(SR.Sch_ForbiddenAttribute, "minOccurs", group.Particle);
1859SendValidationEvent(SR.Sch_ForbiddenAttribute, "maxOccurs", group.Particle);
1876SendValidationEvent(SR.Sch_MissRequiredAttribute, "name", notation);
1880SendValidationEvent(SR.Sch_MissingPublicSystemAttribute, notation);
1892SendValidationEvent(SR.Sch_InvalidPublicAttribute, new string[] { notation.Public }, eInner, notation);
1897ParseUri(notation.System, SR.Sch_InvalidSystemAttribute, notation);
1913SendValidationEvent(SR.Sch_InvalidAllMin, particle);
1918SendValidationEvent(SR.Sch_InvalidAllMax, particle);
1927SendValidationEvent(SR.Sch_InvalidAllElementMax, element);
1938SendValidationEvent(SR.Sch_MinGtMax, particle);
1978SendValidationEvent(SR.Sch_MissAttribute, "ref", groupRef);
1993SendValidationEvent(SR.Sch_InvalidAnyDetailed, new string[] { fe.Message }, fe, particle);
2016SendValidationEvent(SR.Sch_MissAttribute, "ref", attributeGroupRef);
2037SendValidationEvent(SR.Sch_InvalidAnyDetailed, new string[] { fe.Message }, fe, anyAttribute);
2054SendValidationEvent(SR.Sch_InvalidIdAttribute, new string[] { ex.Message }, ex, xso);
2059SendValidationEvent(SR.Sch_InvalidIdAttribute, SR.Sch_NullValue, xso);
2068SendValidationEvent(SR.Sch_DupIdAttribute, xso);
2078SendValidationEvent(SR.Sch_InvalidNameAttributeEx, null, SR.Sch_NullValue, xso);
2088string innerStr = SR.Format(SR.Xml_BadNameCharWithPos, invCharArgs[0], invCharArgs[1], len);
2089SendValidationEvent(SR.Sch_InvalidNameAttributeEx, name, innerStr, xso);
2109SendValidationEvent(SR.Sch_UnrefNS, value.Namespace, xso, XmlSeverityType.Warning);
2114SendValidationEvent(SR.Sch_InvalidAttribute, new string[] { attributeName, fx.Message }, fx, xso);
2118SendValidationEvent(SR.Sch_InvalidAttribute, new string[] { attributeName, ex.Message }, ex, xso);
System\Xml\Schema\SchemaCollectionCompiler.cs (81)
437SendValidationEvent(SR.Sch_SubstitutionCircularRef, (XmlSchemaElement)substitutionGroup.Members[0]!);
452SendValidationEvent(SR.Sch_InvalidExamplar, examplar.Name, examplar);
478SendValidationEvent(SR.Sch_NoExamplar, (XmlSchemaElement)substitutionGroup.Members[0]!);
496SendValidationEvent(SR.Sch_InvalidSubstitutionMember, (element.QualifiedName).ToString(), (examplar.QualifiedName).ToString(), element);
507SendValidationEvent(SR.Sch_GroupCircularRef, group);
523throw new XmlSchemaException(SR.Sch_TypeCircularRef, simpleType);
549SendValidationEvent(SR.Sch_BaseFinalList, simpleType);
556throw new XmlSchemaException(SR.Sch_UndeclaredSimpleType, list.ItemTypeName.ToString(), simpleType);
581throw new XmlSchemaException(SR.Sch_InvalidSimpleTypeRestriction, restriction.BaseTypeName.ToString(), simpleType);
588SendValidationEvent(SR.Sch_BaseFinalRestriction, simpleType);
595throw new XmlSchemaException(SR.Sch_UndeclaredSimpleType, restriction.BaseTypeName.ToString(), simpleType);
656SendValidationEvent(SR.Sch_BaseFinalUnion, simpleType);
661throw new XmlSchemaException(SR.Sch_UndeclaredSimpleType, mainMemberTypes[i].ToString(), simpleType);
695SendValidationEvent(SR.Sch_UnionFromUnion, parentType);
712SendValidationEvent(SR.Sch_TypeCircularRef, complexType);
761SendValidationEvent(SR.Sch_TwoIdAttrUses, complexType);
816SendValidationEvent(SR.Sch_UndeclaredType, simpleExtension.BaseTypeName.ToString(), complexType);
829SendValidationEvent(SR.Sch_BaseFinalExtension, complexType);
833SendValidationEvent(SR.Sch_NotSimpleContent, complexType);
855SendValidationEvent(SR.Sch_UndefBaseRestriction, simpleRestriction.BaseTypeName.ToString(), simpleRestriction);
871SendValidationEvent(SR.Sch_DerivedNotFromBase, simpleRestriction);
886SendValidationEvent(SR.Sch_NeedSimpleTypeChild, simpleRestriction);
891SendValidationEvent(SR.Sch_NotSimpleContent, complexType);
898SendValidationEvent(SR.Sch_BaseFinalRestriction, complexType);
938SendValidationEvent(SR.Sch_UndefBaseExtension, complexExtension.BaseTypeName.ToString(), complexExtension);
946SendValidationEvent(SR.Sch_NotComplexContent, complexType);
953SendValidationEvent(SR.Sch_BaseFinalExtension, complexType);
980SendValidationEvent(SR.Sch_DifContentType, complexType);
1004SendValidationEvent(SR.Sch_UndefBaseRestriction, complexRestriction.BaseTypeName.ToString(), complexRestriction);
1012SendValidationEvent(SR.Sch_NotComplexContent, complexType);
1019SendValidationEvent(SR.Sch_BaseFinalRestriction, complexType);
1034SendValidationEvent(SR.Sch_InvalidContentRestriction, complexType);
1048SendValidationEvent(SR.Sch_InvalidParticleRestriction, complexType);
1061SendValidationEvent(SR.Sch_EmptyChoice, choice, XmlSeverityType.Warning);
1136SendValidationEvent(SR.Sch_UndefGroupRef, groupRef.RefName.ToString(), groupRef);
1152SendValidationEvent(SR.Sch_AllRefNotRoot, "", groupRef);
1157SendValidationEvent(SR.Sch_AllRefMinMax, groupRef);
1165SendValidationEvent(SR.Sch_EmptyChoice, groupRef, XmlSeverityType.Warning);
1222SendValidationEvent(SR.Sch_NotAllAlone, all);
1264SendValidationEvent(SR.Sch_EmptyChoice, oldChoice, XmlSeverityType.Warning);
1718SendValidationEvent(SR.Sch_AttributeGroupCircularRef, attributeGroup);
1742SendValidationEvent(SR.Sch_DupAttributeUse, attribute.QualifiedName.ToString(), attribute);
1768SendValidationEvent(SR.Sch_DupAttributeUse, attributeValue.QualifiedName.ToString(), attributeValue);
1776SendValidationEvent(SR.Sch_UndefAttributeGroupRef, attributeGroupRef.RefName.ToString(), attributeGroupRef);
1805SendValidationEvent(SR.Sch_DupAttributeUse, attribute.QualifiedName.ToString(), attribute);
1810SendValidationEvent(SR.Sch_AttributeIgnored, attribute.QualifiedName.ToString(), attribute, XmlSeverityType.Warning);
1831SendValidationEvent(SR.Sch_DupAttributeUse, attributeValue.QualifiedName.ToString(), attributeGroupRef);
1836SendValidationEvent(SR.Sch_AttributeIgnored, attributeValue.QualifiedName.ToString(), attributeValue, XmlSeverityType.Warning);
1843SendValidationEvent(SR.Sch_UndefAttributeGroupRef, attributeGroupRef.RefName.ToString(), attributeGroupRef);
1862SendValidationEvent(SR.Sch_InvalidAttributeExtension, attribute);
1876SendValidationEvent(SR.Sch_InvalidAnyAttributeRestriction, derivedType);
1895SendValidationEvent(SR.Sch_AttributeRestrictionProhibited, attribute);
1903SendValidationEvent(SR.Sch_AttributeRestrictionInvalid, attribute);
1919SendValidationEvent(SR.Sch_AttributeRestrictionInvalidFromWildcard, attribute);
1945SendValidationEvent(SR.Sch_UnexpressibleAnyAttribute, a);
1966SendValidationEvent(SR.Sch_UnexpressibleAnyAttribute, a);
1976SendValidationEvent(SR.Sch_AttributeCircularRef, xa);
1992throw new XmlSchemaException(SR.Sch_UndeclaredAttribute, xa.RefName.ToString(), xa);
1997throw new XmlSchemaException(SR.Sch_RefInvalidAttribute, xa.RefName.ToString(), xa);
2006throw new XmlSchemaException(SR.Sch_FixedDefaultInRef, xa.RefName.ToString(), xa);
2012throw new XmlSchemaException(SR.Sch_FixedInRef, xa.RefName.ToString(), xa);
2055throw new XmlSchemaException(SR.Sch_UndeclaredSimpleType, xa.SchemaTypeName.ToString(), xa);
2121SendValidationEvent(SR.Sch_IdentityConstraintCircularRef, xi);
2141throw new XmlSchemaException(SR.Sch_UndeclaredIdentityConstraint, ((XmlSchemaKeyref)xi).Refer.ToString(), xi);
2146throw new XmlSchemaException(SR.Sch_RefInvalidIdentityConstraint, ((XmlSchemaKeyref)xi).Refer.ToString(), xi);
2151throw new XmlSchemaException(SR.Sch_RefInvalidCardin, xi.QualifiedName.ToString(), xi);
2156throw new XmlSchemaException(SR.Sch_ReftoKeyref, xi.QualifiedName.ToString(), xi);
2181SendValidationEvent(SR.Sch_ElementCircularRef, xe);
2197throw new XmlSchemaException(SR.Sch_UndeclaredElement, xe.RefName.ToString(), xe);
2202throw new XmlSchemaException(SR.Sch_RefInvalidElement, xe.RefName.ToString(), xe);
2218throw new XmlSchemaException(SR.Sch_UndeclaredType, xe.SchemaTypeName.ToString(), xe);
2226throw new XmlSchemaException(SR.Sch_UndeclaredEquivClass, xe.SubstitutionGroup.Name, xe);
2307throw new XmlSchemaException(SR.Sch_ElementCannotHaveValue, xe);
2374SendValidationEvent(SR.Sch_DupElement, localElement.QualifiedName.ToString(), localElement);
2394SendValidationEvent(SR.Sch_NonDeterministic, ((XmlSchemaElement)e.Particle1).QualifiedName.ToString(), (XmlSchemaElement)e.Particle2);
2398SendValidationEvent(SR.Sch_NonDeterministicAnyEx, ((XmlSchemaAny)e.Particle2!).NamespaceList!.ToString(), ((XmlSchemaElement)e.Particle1).QualifiedName.ToString(), (XmlSchemaAny)e.Particle2);
2405SendValidationEvent(SR.Sch_NonDeterministicAnyEx, ((XmlSchemaAny)e.Particle1!).NamespaceList!.ToString(), ((XmlSchemaElement)e.Particle2).QualifiedName.ToString(), (XmlSchemaAny)e.Particle1);
2409SendValidationEvent(SR.Sch_NonDeterministicAnyAny, ((XmlSchemaAny)e.Particle1!).NamespaceList!.ToString(), ((XmlSchemaAny)e.Particle2!).NamespaceList!.ToString(), (XmlSchemaAny)e.Particle1);
2416SendValidationEvent(SR.Sch_ComplexContentModel, complexType, XmlSeverityType.Warning);
2588SendValidationEvent(SR.Sch_ElementTypeCollision, particle);
2606SendValidationEvent(SR.Sch_TypeCircularRef, complexType);
System\Xml\Schema\SchemaCollectionpreProcessor.cs (113)
240SendValidationEventNoThrow(new XmlSchemaException(SR.Sch_CannotLoadSchema, new string[] { schemaLocation, e.Message }, e.SourceUri, e.LineNumber, e.LinePosition), XmlSeverityType.Error);
244SendValidationEvent(SR.Sch_InvalidIncludeLocation, include, XmlSeverityType.Warning);
253SendValidationEvent(SR.Sch_InvalidIncludeLocation, include, XmlSeverityType.Warning);
300SendValidationEvent(SR.Sch_InvalidTargetNamespaceAttribute, schema);
310SendValidationEvent(SR.Sch_InvalidNamespace, schema.TargetNamespace, schema);
323SendValidationEvent(SR.Sch_AttributeValueDataType, "version", schema);
339SendValidationEvent(SR.Sch_MismatchTargetNamespaceEx, targetNamespace, schema.TargetNamespace, schema);
345SendValidationEvent(SR.Sch_MismatchTargetNamespaceImport, targetNamespace, schema.TargetNamespace, schema);
353SendValidationEvent(SR.Sch_MismatchTargetNamespaceInclude, targetNamespace, schema.TargetNamespace, schema);
374SendValidationEvent(SR.Sch_InvalidSchemaLocation, loc, include);
379SendValidationEvent(SR.Sch_MissRequiredAttribute, "schemaLocation", include);
391SendValidationEvent(SR.Sch_ImportTargetNamespaceNull, include);
395SendValidationEvent(SR.Sch_ImportTargetNamespace, include);
411SendValidationEvent(SR.Sch_InvalidNamespaceAttribute, ns, include);
421SendValidationEvent(SR.Sch_InvalidNamespace, ns, include);
446SendValidationEvent(SR.Sch_InvalidBlockDefaultValue, schema);
462SendValidationEvent(SR.Sch_InvalidFinalDefaultValue, schema);
492SendValidationEvent(SR.Sch_RedefineNoSchema, redefine);
576SendValidationEvent(SR.Sch_InvalidCollection, schema.Items[i]);
599SendValidationEvent(SR.Sch_GroupDoubleRedefine, group);
611SendValidationEvent(SR.Sch_GroupRedefineNotFound, group);
620SendValidationEvent(SR.Sch_AttrGroupDoubleRedefine, attributeGroup);
632SendValidationEvent(SR.Sch_AttrGroupRedefineNotFound, attributeGroup);
641SendValidationEvent(SR.Sch_ComplexTypeDoubleRedefine, complexType);
656SendValidationEvent(SR.Sch_SimpleToComplexTypeRedefine, complexType);
661SendValidationEvent(SR.Sch_ComplexTypeRedefineNotFound, complexType);
670SendValidationEvent(SR.Sch_SimpleTypeDoubleRedefine, simpleType);
685SendValidationEvent(SR.Sch_ComplexToSimpleTypeRedefine, simpleType);
690SendValidationEvent(SR.Sch_SimpleTypeRedefineNotFound, simpleType);
724SendValidationEvent(SR.Sch_MinMaxGroupRedefine, groupRef);
750SendValidationEvent(SR.Sch_MultipleGroupSelfRef, group);
767SendValidationEvent(SR.Sch_MultipleAttrGroupSelfRef, attributeGroup);
781SendValidationEvent(SR.Sch_InvalidTypeRedefine, stype);
818SendValidationEvent(SR.Sch_InvalidTypeRedefine, ctype);
830SendValidationEvent(SR.Sch_MissRequiredAttribute, "name", attribute);
834SendValidationEvent(SR.Sch_ForbiddenAttribute, "use", attribute);
838SendValidationEvent(SR.Sch_ForbiddenAttribute, "form", attribute);
857SendValidationEvent(SR.Sch_AttributeNameRef, "???", attribute);
870SendValidationEvent(SR.Sch_InvalidAttributeRef, attribute);
882SendValidationEvent(SR.Sch_TargetNamespaceXsi, attribute);
886SendValidationEvent(SR.Sch_ForbiddenAttribute, "ref", attribute);
890SendValidationEvent(SR.Sch_DefaultFixedAttributes, attribute);
894SendValidationEvent(SR.Sch_OptionalDefaultAttribute, attribute);
898SendValidationEvent(SR.Sch_XmlNsAttribute, attribute);
905SendValidationEvent(SR.Sch_TypeMutualExclusive, attribute);
924SendValidationEvent(SR.Sch_MissRequiredAttribute, "name", attributeGroup);
941SendValidationEvent(SR.Sch_MissRequiredAttribute, "name", element);
964SendValidationEvent(SR.Sch_InvalidElementFinalValue, element);
970SendValidationEvent(SR.Sch_ForbiddenAttribute, "form", element);
974SendValidationEvent(SR.Sch_ForbiddenAttribute, "minOccurs", element);
978SendValidationEvent(SR.Sch_ForbiddenAttribute, "maxOccurs", element);
1000SendValidationEvent(SR.Sch_ElementNameRef, element);
1016SendValidationEvent(SR.Sch_InvalidElementRef, element);
1020SendValidationEvent(SR.Sch_DefaultFixedAttributes, element);
1027SendValidationEvent(SR.Sch_MinGtMax, element);
1031SendValidationEvent(SR.Sch_ForbiddenAttribute, "abstract", element);
1035SendValidationEvent(SR.Sch_ForbiddenAttribute, "final", element);
1039SendValidationEvent(SR.Sch_ForbiddenAttribute, "substitutionGroup", element);
1049SendValidationEvent(SR.Sch_ForbiddenAttribute, "ref", element);
1070SendValidationEvent(SR.Sch_InvalidElementBlockValue, element);
1079SendValidationEvent(SR.Sch_TypeMutualExclusive, element);
1096SendValidationEvent(SR.Sch_DefaultFixedAttributes, element);
1116SendValidationEvent(SR.Sch_MissRequiredAttribute, "name", constraint);
1122SendValidationEvent(SR.Sch_DupIdentityConstraint, constraint.QualifiedName.ToString(), constraint);
1132SendValidationEvent(SR.Sch_IdConstraintNoSelector, constraint);
1137SendValidationEvent(SR.Sch_IdConstraintNoFields, constraint);
1144SendValidationEvent(SR.Sch_IdConstraintNoRefer, constraint);
1171SendValidationEvent(SR.Sch_ForbiddenAttribute, "name", simpleType);
1183SendValidationEvent(SR.Sch_MissRequiredAttribute, "name", simpleType);
1205SendValidationEvent(SR.Sch_InvalidSimpleTypeFinalValue, simpleType);
1213SendValidationEvent(SR.Sch_NoSimpleTypeContent, simpleType);
1228SendValidationEvent(SR.Sch_SimpleTypeRestRefBase, restriction);
1236SendValidationEvent(SR.Sch_SimpleTypeRestRefBaseNone, restriction);
1254SendValidationEvent(SR.Sch_SimpleTypeListRefBase, list);
1263SendValidationEvent(SR.Sch_SimpleTypeListRefBaseNone, list);
1289SendValidationEvent(SR.Sch_SimpleTypeUnionNoBase, union1);
1308SendValidationEvent(SR.Sch_ForbiddenAttribute, "name", complexType);
1320SendValidationEvent(SR.Sch_MissRequiredAttribute, "name", complexType);
1334SendValidationEvent(SR.Sch_InvalidComplexTypeBlockValue, complexType);
1357SendValidationEvent(SR.Sch_InvalidComplexTypeFinalValue, complexType);
1377SendValidationEvent(SR.Sch_NoRestOrExt, complexType);
1381SendValidationEvent(SR.Sch_NoRestOrExtQName, complexType.QualifiedName.Name, complexType.QualifiedName.Namespace, complexType);
1393SendValidationEvent(SR.Sch_MissAttribute, "base", contentExtension);
1407SendValidationEvent(SR.Sch_MissAttribute, "base", contentRestriction);
1431SendValidationEvent(SR.Sch_NoRestOrExt, complexType);
1435SendValidationEvent(SR.Sch_NoRestOrExtQName, complexType.QualifiedName.Name, complexType.QualifiedName.Namespace, complexType);
1451SendValidationEvent(SR.Sch_MissAttribute, "base", contentExtension);
1470SendValidationEvent(SR.Sch_MissAttribute, "base", contentRestriction);
1510SendValidationEvent(SR.Sch_MissRequiredAttribute, "name", group);
1514SendValidationEvent(SR.Sch_NoGroupParticle, group);
1519SendValidationEvent(SR.Sch_ForbiddenAttribute, "minOccurs", group.Particle);
1523SendValidationEvent(SR.Sch_ForbiddenAttribute, "maxOccurs", group.Particle);
1540SendValidationEvent(SR.Sch_MissRequiredAttribute, "name", notation);
1550SendValidationEvent(SR.Sch_InvalidPublicAttribute, notation.Public, notation);
1555SendValidationEvent(SR.Sch_MissRequiredAttribute, "public", notation);
1565SendValidationEvent(SR.Sch_InvalidSystemAttribute, notation.System, notation);
1581SendValidationEvent(SR.Sch_InvalidAllMin, particle);
1586SendValidationEvent(SR.Sch_InvalidAllMax, particle);
1594SendValidationEvent(SR.Sch_InvalidAllElementMax, element);
1605SendValidationEvent(SR.Sch_MinGtMax, particle);
1646SendValidationEvent(SR.Sch_MissAttribute, "ref", groupRef);
1661SendValidationEvent(SR.Sch_InvalidAny, particle);
1684SendValidationEvent(SR.Sch_MissAttribute, "ref", attributeGroupRef);
1704SendValidationEvent(SR.Sch_InvalidAnyAttribute, anyAttribute);
1719SendValidationEvent(SR.Sch_DupIdAttribute, xso);
1728SendValidationEvent(SR.Sch_InvalidIdAttribute, ex.Message, xso);
1738SendValidationEvent(SR.Sch_InvalidNameAttributeEx, null, SR.Sch_NullValue, xso);
1747string innerStr = SR.Format(SR.Xml_BadNameCharWithPos, invCharArgs[0], invCharArgs[1], len);
1748SendValidationEvent(SR.Sch_InvalidNameAttributeEx, name, innerStr, xso);
1764SendValidationEvent(SR.Sch_UnrefNS, value.Namespace, xso, XmlSeverityType.Warning);
1769SendValidationEvent(SR.Sch_InvalidAttribute, attributeName, ex.Message, xso);
System\Xml\Schema\SchemaSetCompiler.cs (126)
456SendValidationEvent(SR.Sch_NoExamplar, element);
463SendValidationEvent(SR.Sch_InvalidSubstitutionMember, (element.QualifiedName).ToString(), (headElement.QualifiedName).ToString(), element);
494SendValidationEvent(SR.Sch_SubstitutionCircularRef, (XmlSchemaElement)substitutionGroup.Members[0]!);
510SendValidationEvent(SR.Sch_InvalidExamplar, examplar.Name, examplar);
589SendValidationEvent(SR.Sch_GroupCircularRef, group);
605throw new XmlSchemaException(SR.Sch_TypeCircularRef, simpleType);
633SendValidationEvent(SR.Sch_BaseFinalList, simpleType);
641throw new XmlSchemaException(SR.Sch_UndeclaredSimpleType, list.ItemTypeName.ToString(), list);
670throw new XmlSchemaException(SR.Sch_InvalidSimpleTypeRestriction, restriction.BaseTypeName.ToString(), simpleType);
678SendValidationEvent(SR.Sch_BaseFinalRestriction, simpleType);
685throw new XmlSchemaException(SR.Sch_UndeclaredSimpleType, restriction.BaseTypeName.ToString(), restriction);
746SendValidationEvent(SR.Sch_BaseFinalUnion, simpleType);
751throw new XmlSchemaException(SR.Sch_UndeclaredSimpleType, mainMemberTypes[i].ToString(), mainUnion);
784SendValidationEvent(SR.Sch_UnionFromUnion, parentType);
801SendValidationEvent(SR.Sch_TypeCircularRef, complexType);
844SendValidationEvent(SR.Sch_TwoIdAttrUses, complexType);
894SendValidationEvent(SR.Sch_UndeclaredType, simpleExtension.BaseTypeName.ToString(), simpleExtension);
908SendValidationEvent(SR.Sch_BaseFinalExtension, complexType);
912SendValidationEvent(SR.Sch_NotSimpleContent, complexType);
935SendValidationEvent(SR.Sch_UndefBaseRestriction, simpleRestriction.BaseTypeName.ToString(), simpleRestriction);
951SendValidationEvent(SR.Sch_DerivedNotFromBase, simpleRestriction);
966SendValidationEvent(SR.Sch_NeedSimpleTypeChild, simpleRestriction);
971SendValidationEvent(SR.Sch_NotSimpleContent, complexType);
979SendValidationEvent(SR.Sch_BaseFinalRestriction, complexType);
1021SendValidationEvent(SR.Sch_UndefBaseExtension, complexExtension.BaseTypeName.ToString(), complexExtension);
1028SendValidationEvent(SR.Sch_BaseFinalExtension, complexType);
1071SendValidationEvent(SR.Sch_DifContentType, complexType);
1092SendValidationEvent(SR.Sch_UndefBaseRestriction, complexRestriction.BaseTypeName.ToString(), complexRestriction);
1099SendValidationEvent(SR.Sch_BaseFinalRestriction, complexType);
1111SendValidationEvent(SR.Sch_InvalidContentRestrictionDetailed, SR.Sch_InvalidBaseToEmpty, complexType);
1118SendValidationEvent(SR.Sch_InvalidContentRestrictionDetailed, SR.Sch_InvalidBaseToMixed, complexType);
1137SendValidationEvent(SR.Sch_InvalidParticleRestrictionDetailed, _restrictionErrorMsg, complexType);
1141SendValidationEvent(SR.Sch_InvalidParticleRestriction, complexType);
1173SendValidationEvent(SR.Sch_InvalidParticleRestrictionDetailed, _restrictionErrorMsg, derivedParticle);
1177SendValidationEvent(SR.Sch_InvalidParticleRestriction, derivedParticle);
1190SendValidationEvent(SR.Sch_EmptyChoice, choice, XmlSeverityType.Warning);
1273SendValidationEvent(SR.Sch_UndefGroupRef, groupRef.RefName.ToString(), groupRef);
1292SendValidationEvent(SR.Sch_AllRefNotRoot, "", groupRef);
1298SendValidationEvent(SR.Sch_AllRefMinMax, groupRef);
1306SendValidationEvent(SR.Sch_EmptyChoice, groupRef, XmlSeverityType.Warning);
1354SendValidationEvent(SR.Sch_NotAllAlone, all);
1397SendValidationEvent(SR.Sch_EmptyChoice, oldChoice, XmlSeverityType.Warning);
1545_restrictionErrorMsg = SR.Sch_ForbiddenDerivedParticleForElem;
1583_restrictionErrorMsg = SR.Format(SR.Sch_SeqFromAll, derivedParticle.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedParticle.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseParticle.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseParticle.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
1587_restrictionErrorMsg = SR.Sch_ForbiddenDerivedParticleForAll;
1617_restrictionErrorMsg = SR.Format(SR.Sch_SeqFromChoice, derivedParticle.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedParticle.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseParticle.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseParticle.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
1621_restrictionErrorMsg = SR.Sch_ForbiddenDerivedParticleForChoice;
1640_restrictionErrorMsg = SR.Sch_ForbiddenDerivedParticleForSeq;
1675_restrictionErrorMsg = SR.Format(SR.Sch_ElementFromElement, derivedElement.QualifiedName, baseElement.QualifiedName);
1685_restrictionErrorMsg = SR.Format(SR.Sch_ElementFromAnyRule1, derivedElement.QualifiedName.ToString());
1690_restrictionErrorMsg = SR.Format(SR.Sch_ElementFromAnyRule2, derivedElement.QualifiedName.ToString());
1700_restrictionErrorMsg = SR.Sch_AnyFromAnyRule1;
1705_restrictionErrorMsg = SR.Sch_AnyFromAnyRule2;
1710_restrictionErrorMsg = SR.Sch_AnyFromAnyRule3;
1722_restrictionErrorMsg = SR.Format(SR.Sch_GroupBaseFromAny2, derivedGroupBase.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedGroupBase.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseAny.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseAny.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
1732_restrictionErrorMsg = SR.Sch_GroupBaseFromAny1;
1797_restrictionErrorMsg = SR.Format(SR.Sch_ElementFromGroupBase1, derivedElement.QualifiedName.ToString(), derivedElement.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedElement.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
1809_restrictionErrorMsg = SR.Format(SR.Sch_ElementFromGroupBase2, derivedElement.QualifiedName.ToString(), derivedElement.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedElement.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
1821_restrictionErrorMsg = SR.Format(SR.Sch_ElementFromGroupBase3, derivedElement.QualifiedName.ToString(), derivedElement.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedElement.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseGroupBase.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
1830_restrictionErrorMsg = SR.Sch_GroupBaseRestRangeInvalid;
1847_restrictionErrorMsg = SR.Sch_GroupBaseRestRangeInvalid;
1852_restrictionErrorMsg = SR.Sch_GroupBaseRestNoMap;
1867_restrictionErrorMsg ??= SR.Sch_GroupBaseRestNotEmptiable;
2069SendValidationEvent(SR.Sch_AttributeGroupCircularRef, attributeGroup);
2097SendValidationEvent(SR.Sch_DupAttributeUse, attr.QualifiedName.ToString(), attr);
2124SendValidationEvent(SR.Sch_DupAttributeUse, attribute.QualifiedName.ToString(), attribute);
2132SendValidationEvent(SR.Sch_UndefAttributeGroupRef, attributeGroupRef.RefName.ToString(), attributeGroupRef);
2165SendValidationEvent(SR.Sch_DupAttributeUse, attr.QualifiedName.ToString(), attr);
2170SendValidationEvent(SR.Sch_AttributeIgnored, attr.QualifiedName.ToString(), attr, XmlSeverityType.Warning);
2191SendValidationEvent(SR.Sch_DupAttributeUse, attribute.QualifiedName.ToString(), attributeGroupRef);
2196SendValidationEvent(SR.Sch_AttributeIgnored, attribute.QualifiedName.ToString(), attribute, XmlSeverityType.Warning);
2204SendValidationEvent(SR.Sch_UndefAttributeGroupRef, attributeGroupRef.RefName.ToString(), attributeGroupRef);
2227SendValidationEvent(SR.Sch_InvalidAttributeExtension, attribute);
2237SendValidationEvent(SR.Sch_InvalidAnyAttributeRestriction, derivedType);
2256SendValidationEvent(SR.Sch_AttributeRestrictionProhibited, attribute);
2260SendValidationEvent(SR.Sch_AttributeUseInvalid, attribute);
2268SendValidationEvent(SR.Sch_AttributeRestrictionInvalid, attribute);
2272SendValidationEvent(SR.Sch_AttributeFixedInvalid, attribute);
2288SendValidationEvent(SR.Sch_AttributeRestrictionInvalidFromWildcard, attribute);
2306SendValidationEvent(SR.Sch_InvalidAnyAttributeRestriction, derivedAttributeGroup);
2316SendValidationEvent(SR.Sch_AttributeRestrictionProhibited, attribute);
2320SendValidationEvent(SR.Sch_AttributeUseInvalid, attribute);
2328SendValidationEvent(SR.Sch_AttributeRestrictionInvalid, attribute);
2332SendValidationEvent(SR.Sch_AttributeFixedInvalid, attribute);
2337SendValidationEvent(SR.Sch_NoDerivedAttribute, attributeBase.QualifiedName.ToString(), baseAttributeGroup.QualifiedName.ToString(), derivedAttributeGroup);
2351SendValidationEvent(SR.Sch_AttributeRestrictionInvalidFromWildcard, attribute);
2384SendValidationEvent(SR.Sch_UnexpressibleAnyAttribute, a);
2406SendValidationEvent(SR.Sch_UnexpressibleAnyAttribute, a);
2417SendValidationEvent(SR.Sch_AttributeCircularRef, xa);
2433throw new XmlSchemaException(SR.Sch_UndeclaredAttribute, xa.RefName.ToString(), xa);
2438throw new XmlSchemaException(SR.Sch_RefInvalidAttribute, xa.RefName.ToString(), xa);
2453throw new XmlSchemaException(SR.Sch_FixedDefaultInRef, xa.RefName.ToString(), xa);
2460throw new XmlSchemaException(SR.Sch_FixedInRef, xa.RefName.ToString(), xa);
2488throw new XmlSchemaException(SR.Sch_UndeclaredSimpleType, xa.SchemaTypeName.ToString(), xa);
2547SendValidationEvent(SR.Sch_DefaultIdValue, xa);
2577SendValidationEvent(SR.Sch_IdentityConstraintCircularRef, xi);
2597throw new XmlSchemaException(SR.Sch_UndeclaredIdentityConstraint, ((XmlSchemaKeyref)xi).Refer.ToString(), xi);
2603throw new XmlSchemaException(SR.Sch_RefInvalidIdentityConstraint, ((XmlSchemaKeyref)xi).Refer.ToString(), xi);
2609throw new XmlSchemaException(SR.Sch_RefInvalidCardin, xi.QualifiedName.ToString(), xi);
2615throw new XmlSchemaException(SR.Sch_ReftoKeyref, xi.QualifiedName.ToString(), xi);
2640SendValidationEvent(SR.Sch_ElementCircularRef, xe);
2656throw new XmlSchemaException(SR.Sch_UndeclaredElement, xe.RefName.ToString(), xe);
2661throw new XmlSchemaException(SR.Sch_RefInvalidElement, xe.RefName.ToString(), xe);
2677throw new XmlSchemaException(SR.Sch_UndeclaredType, xe.SchemaTypeName.ToString(), xe);
2685throw new XmlSchemaException(SR.Sch_UndeclaredEquivClass, xe.SubstitutionGroup.Name, xe);
2763SendValidationEvent(SR.Sch_DefaultIdValue, xe);
2777throw new XmlSchemaException(SR.Sch_ElementCannotHaveValue, xe);
2843SendValidationEvent(SR.Sch_DupElement, localElement.QualifiedName.ToString(), localElement);
2863SendValidationEvent(SR.Sch_NonDeterministic, ((XmlSchemaElement)e.Particle1).QualifiedName.ToString(), (XmlSchemaElement)e.Particle2);
2867SendValidationEvent(SR.Sch_NonDeterministicAnyEx, ((XmlSchemaAny)e.Particle2!).ResolvedNamespace, ((XmlSchemaElement)e.Particle1).QualifiedName.ToString(), (XmlSchemaAny)e.Particle2);
2874SendValidationEvent(SR.Sch_NonDeterministicAnyEx, ((XmlSchemaAny)e.Particle1!).ResolvedNamespace, ((XmlSchemaElement)e.Particle2).QualifiedName.ToString(), (XmlSchemaElement)e.Particle2);
2878SendValidationEvent(SR.Sch_NonDeterministicAnyAny, ((XmlSchemaAny)e.Particle1!).ResolvedNamespace, ((XmlSchemaAny)e.Particle2!).ResolvedNamespace, (XmlSchemaAny)e.Particle2);
2885SendValidationEvent(SR.Sch_ComplexContentModel, complexType, XmlSeverityType.Warning);
2970SendValidationEvent(SR.Sch_ElementTypeCollision, particle);
3004SendValidationEvent(SR.Sch_TypeCircularRef, complexType);
System\Xml\Schema\XdrBuilder.cs (52)
438SendValidationEvent(SR.Sch_UnsupportedElement, XmlQualifiedName.ToString(name, prefix));
464throw new XmlException(SR.Xml_UnexpectedToken, "NAME");
494SendValidationEvent(SR.Sch_UnsupportedAttribute,
534SendValidationEvent(SR.Sch_CannotLoadSchema, new string[] { uri, e.Message }, XmlSeverityType.Warning);
563throw new InvalidOperationException(SR.Xml_InvalidOperation); // should never be called
574SendValidationEvent(SR.Sch_TextNotAllowed, value);
689builder.SendValidationEvent(SR.Sch_UndeclaredAttribute, gname.Name);
697builder.SendValidationEvent(SR.Sch_UndeclaredElement, XmlQualifiedName.ToString(ed!.Name.Name, ed.Prefix));
733builder.SendValidationEvent(SR.Sch_DupElementDecl, XmlQualifiedName.ToString(qname.Name, prefix));
766builder.SendValidationEvent(SR.Sch_MissDtvalue);
773builder.SendValidationEvent(SR.Sch_UnknownDtType, s);
806code = SR.Sch_MissAttribute;
818code = SR.Sch_DataTypeTextOnly;
879code = SR.Sch_MixedMany;
962builder.SendValidationEvent(SR.Sch_ElementMissing);
980builder.SendValidationEvent(SR.Sch_MissDtvaluesAttribute);
986builder.SendValidationEvent(SR.Sch_RequireEnumeration);
1046builder.SendValidationEvent(SR.Sch_DupAttribute, XmlQualifiedName.ToString(qname.Name, prefix));
1056builder.SendValidationEvent(SR.Sch_DupAttribute, XmlQualifiedName.ToString(qname.Name, prefix));
1098builder.SendValidationEvent(SR.Sch_MissAttribute);
1111code = SR.Sch_MissDtvaluesAttribute;
1117code = SR.Sch_RequireEnumeration;
1124code = SR.Sch_DefaultIdValue;
1169builder.SendValidationEvent(SR.Sch_ElementNotAllowed);
1229builder.SendValidationEvent(SR.Sch_MissAttribute);
1267builder.SendValidationEvent(SR.Sch_MissAttribute);
1297builder.SendValidationEvent(SR.Sch_UndeclaredAttribute, XmlQualifiedName.ToString(qname.Name, prefix));
1340builder.SendValidationEvent(SR.Sch_GroupDisabled);
1364builder.SendValidationEvent(SR.Sch_MixedMany);
1391builder.SendValidationEvent(SR.Sch_ElementMissing);
1405builder.SendValidationEvent(SR.Sch_ManyMaxOccurs);
1424builder.SendValidationEvent(SR.Sch_DupDtType);
1429builder.SendValidationEvent(SR.Sch_DataTypeTextOnly);
1437builder.SendValidationEvent(SR.Sch_MissAttribute);
1449builder.SendValidationEvent(SR.Sch_DupDtType);
1459code = SR.Sch_MissAttribute;
1469code = SR.Sch_MissDtvaluesAttribute;
1473code = SR.Sch_RequireEnumeration;
1560SendValidationEvent(SR.Sch_UnknownOrder, qname.Name);
1580throw new XmlException(SR.Xml_UnexpectedToken, "NAME");
1595builder.SendValidationEvent(SR.Sch_UnknownRequired);
1607builder.SendValidationEvent(SR.Sch_MinOccursInvalid);
1620builder.SendValidationEvent(SR.Sch_MaxOccursInvalid);
1647builder.SendValidationEvent(SR.Sch_DupDtMaxLength);
1652builder.SendValidationEvent(SR.Sch_DtMaxLengthInvalid, obj.ToString());
1660builder.SendValidationEvent(SR.Sch_DupDtMinLength);
1665builder.SendValidationEvent(SR.Sch_DtMinLengthInvalid, obj.ToString());
1673builder.SendValidationEvent(SR.Sch_DtMinMaxLength);
1743SendValidationEvent(SR.Sch_UnknownContent, qname.Name);
1756SendValidationEvent(SR.Sch_UnknownModel, qname.Name);
1765SendValidationEvent(SR.Sch_UnknownDtType, str);
1773SendValidationEvent(SR.Sch_IdAttrDeclared,
System\Xml\Schema\XdrValidator.cs (17)
232SendValidationEvent(SR.Sch_UndeclaredElement, XmlSchemaValidator.QNameString(context.LocalName!, context.Namespace!));
356SendValidationEvent(SR.Sch_CannotLoadSchema, new string[] { uri, e.Message }, XmlSeverityType.Error);
360SendValidationEvent(SR.Sch_CannotLoadSchema, new string[] { uri, e.Message }, XmlSeverityType.Warning);
392throw new XmlException(SR.Xml_MultipleValidationTypes, string.Empty, this.PositionInfo.LineNumber, this.PositionInfo.LinePosition);
419SendValidationEvent(SR.Sch_DupId, name);
450SendValidationEvent(new XmlSchemaException(SR.Xml_NoValidation, string.Empty), XmlSeverityType.Warning);
507SendValidationEvent(SR.Sch_MaxLengthConstraintFailed, value);
514SendValidationEvent(SR.Sch_MinLengthConstraintFailed, value);
521SendValidationEvent(SR.Sch_NotationValue, typedValue.ToString());
525SendValidationEvent(SR.Sch_EnumerationValue, typedValue.ToString());
532SendValidationEvent(SR.Sch_FixedAttributeValue, attdef!.Name.ToString());
536SendValidationEvent(SR.Sch_FixedElementValue, XmlSchemaValidator.QNameString(context!.LocalName!, context.Namespace!));
544SendValidationEvent(SR.Sch_AttributeValueDataType, attdef.Name.ToString());
548SendValidationEvent(SR.Sch_ElementValueDataType, XmlSchemaValidator.QNameString(context!.LocalName!, context.Namespace!));
605XmlSchemaException e = new XmlSchemaException(SR.Sch_EnumerationValue, typedValue.ToString(), baseUri, lineNo, linePos);
624XmlSchemaException e = new XmlSchemaException(SR.Sch_AttributeDefaultDataType, attdef.Name.ToString(), baseUri, lineNo, linePos);
683SendValidationEvent(new XmlSchemaException(SR.Sch_UndeclaredId, next.Id, reader.BaseURI, next.LineNo, next.LinePos));
System\Xml\Schema\XmlSchemaSet.cs (10)
447SendValidationEvent(new XmlSchemaException(SR.Sch_SchemaNotRemoved, string.Empty), XmlSeverityType.Warning);
519SendValidationEvent(new XmlSchemaException(SR.Sch_SchemaNotPreprocessed, string.Empty), XmlSeverityType.Error);
586throw new ArgumentException(SR.Sch_SchemaDoesNotExist, nameof(schema));
806throw new XmlSchemaException(SR.Sch_ComponentAlreadySeenForNS, targetNamespace);
836throw new XmlSchemaException(SR.Sch_ComponentAlreadySeenForNS, tns);
1261SendValidationEvent(new XmlSchemaException(SR.Sch_MismatchTargetNamespaceEx, new string[] { targetNamespace, schema.TargetNamespace }), XmlSeverityType.Error);
1399code = SR.Sch_DupComplexType;
1403code = SR.Sch_DupSimpleType;
1407code = SR.Sch_DupGlobalElement;
1426code = SR.Sch_DupGlobalAttribute;
System\Xml\Schema\XmlSchemaValidator.cs (111)
336SendValidationEvent(SR.Sch_ComponentAlreadySeenForNS, tns, XmlSeverityType.Error);
347SendValidationEvent(SR.Sch_CannotLoadSchema, new string[] { schema.BaseUri!.ToString(), e.Message }, e);
355SendValidationEvent(SR.Sch_ComponentAlreadySeenForNS, tns, XmlSeverityType.Error);
367throw new InvalidOperationException(SR.Format(SR.Sch_InvalidStateTransition, new string[] { s_methodNames[(int)_currentState], s_methodNames[(int)ValidatorState.Start] }));
377throw new InvalidOperationException(SR.Format(SR.Sch_InvalidStateTransition, new string[] { s_methodNames[(int)_currentState], s_methodNames[(int)ValidatorState.Start] }));
382throw new ArgumentException(SR.Sch_InvalidPartialValidationType);
518SendValidationEvent(SR.Sch_DuplicateAttribute, attQName.ToString());
543SendValidationEvent(SR.Sch_UndeclaredAttribute, attQName.ToString());
547SendValidationEvent(SR.Sch_NoAttributeSchemaFound, attQName.ToString(), XmlSeverityType.Warning);
559SendValidationEvent(SR.Sch_UndeclaredAttribute, attQName.ToString());
571SendValidationEvent(SR.Sch_ProhibitedAttribute, attQName.ToString());
577SendValidationEvent(SR.Sch_ProhibitedAttribute, attQName.ToString());
582SendValidationEvent(SR.Sch_SchemaAttributeNameMismatch, new string[] { attQName.ToString(), ((XmlSchemaAttribute)pvtAttribute!).QualifiedName.ToString() });
589SendValidationEvent(SR.Sch_ValidateAttributeInvalidCall, string.Empty);
601SendValidationEvent(SR.Sch_AttrUseAndWildId, string.Empty);
610SendValidationEvent(SR.Sch_MoreThanOneWildId, string.Empty);
651SendValidationEvent(SR.Sch_NoAttributeSchemaFound, attQName.ToString(), XmlSeverityType.Warning);
671SendValidationEvent(SR.Sch_NotXsiAttribute, attQName.ToString());
748SendValidationEvent(SR.Sch_ContentInNill, QNameString(_context.LocalName!, _context.Namespace!));
755SendValidationEvent(SR.Sch_InvalidTextInEmpty, string.Empty);
778SendValidationEvent(SR.Sch_InvalidTextInElement, BuildElementName(_context.LocalName!, _context.Namespace!));
783SendValidationEvent(SR.Sch_InvalidTextInElementExpecting, new string[] { BuildElementName(_context.LocalName!, _context.Namespace!), PrintExpectedElements(names, true) });
827SendValidationEvent(SR.Sch_ContentInNill, QNameString(_context.LocalName!, _context.Namespace!));
834SendValidationEvent(SR.Sch_InvalidWhitespaceInEmpty, string.Empty);
879throw new InvalidOperationException(SR.Sch_InvalidEndElementCall);
889throw new InvalidOperationException(SR.Format(SR.Sch_InvalidEndElementMultiple, s_methodNames[(int)ValidatorState.SkipToEndElement]));
922throw new InvalidOperationException(SR.Sch_InvalidEndValidation);
1042SendValidationEvent(SR.Sch_DefaultAttributeNotApplied, new string[2] { attdef.Name.ToString(), QNameString(_context.LocalName!, _context.Namespace!) });
1171throw new InvalidOperationException(SR.Format(SR.Sch_InvalidEndElementMultiple, s_methodNames[(int)ValidatorState.EndElement]));
1222throw new InvalidOperationException(SR.Sch_InvalidEndElementCallTyped);
1278SendValidationEvent(SR.Sch_InvalidValueDetailedAttribute, new string[] { "schemaLocation", xsiSchemaLocation, s_dtStringArray.TypeCodeString, exception.Message }, exception);
1317SendValidationEvent(SR.Sch_ContentInNill, QNameString(_context.LocalName!, _context.Namespace!));
1323SendValidationEvent(SR.Sch_ElementInMixedWithFixed, QNameString(_context.LocalName!, _context.Namespace!));
1339SendValidationEvent(SR.Sch_AllElement, elementName.ToString());
1367SendValidationEvent(SR.Sch_InvalidElementSubstitution, BuildElementName(elementName), BuildElementName(matchedElem.QualifiedName));
1401SendValidationEvent(SR.Sch_SubstitutionNotAllowed, new string[] { member.ToString(), head.ToString() });
1406SendValidationEvent(SR.Sch_SubstitutionBlocked, new string[] { member.ToString(), head.ToString() });
1433SendValidationEvent(SR.Sch_InvalidElementDefaultValue, new string[] { currentElementDecl.DefaultValueRaw, QNameString(_context.LocalName!, _context.Namespace!) });
1479SendValidationEvent(SR.Sch_ElementValueDataTypeDetailed, new string[] { QNameString(_context.LocalName!, _context.Namespace!), stringValue, GetTypeName(decl), exception.Message }, exception);
1485SendValidationEvent(SR.Sch_FixedElementValue, QNameString(_context.LocalName!, _context.Namespace!));
1619SendValidationEvent(SR.Sch_SchemaElementNameMismatch, elementName.ToString(), element.QualifiedName.ToString());
1629SendValidationEvent(SR.Sch_ValidateElementInvalidCall, string.Empty);
1650SendValidationEvent(SR.Sch_InvalidValueDetailedAttribute, new string[] { "type", xsiType, s_dtQName.TypeCodeString, exception.Message }, exception);
1667SendValidationEvent(SR.Sch_XsiNilAndFixed);
1673SendValidationEvent(SR.Sch_InvalidXsiNill);
1680SendValidationEvent(SR.Sch_AbstractElement, QNameString(_context.LocalName!, _context.Namespace!));
1703SendValidationEvent(SR.Sch_XsiTypeNotFound, xsiTypeName.ToString(), severity);
1711SendValidationEvent(SR.Sch_XsiTypeAbstract, xsiTypeName.ToString(), severity);
1716SendValidationEvent(SR.Sch_XsiTypeBlockedEx, new string?[] { xsiTypeName.ToString(), QNameString(_context.LocalName!, _context.Namespace!) });
1748SendValidationEvent(SR.Sch_UndeclaredElement, QNameString(_context.LocalName!, _context.Namespace!));
1752SendValidationEvent(SR.Sch_NoElementSchemaFound, QNameString(_context.LocalName!, _context.Namespace!), XmlSeverityType.Warning);
1760SendValidationEvent(SR.Sch_AbstractElement, QNameString(_context.LocalName!, _context.Namespace!));
1834SendValidationEvent(SR.Sch_FixedElementValue, elementDecl.Name.ToString());
1857SendValidationEvent(SR.Sch_CannotLoadSchema, new string[] { uri, e.Message }, e);
1861SendValidationEvent(SR.Sch_CannotLoadSchema, new string[] { uri, e.Message }, e, XmlSeverityType.Warning);
1900SendValidationEvent(SR.Sch_DupId, name);
1955SendValidationEvent(SR.Sch_FixedAttributeValue, attdef.Name.ToString());
1963SendValidationEvent(SR.Sch_AttributeValueDataTypeDetailed, new string[] { attdef.Name.ToString(), stringValue, GetTypeName(decl), exception.Message }, exception);
1978SendValidationEvent(SR.Sch_ElementValueDataTypeDetailed, new string[] { QNameString(_context.LocalName!, _context.Namespace!), stringValue, GetTypeName(decl), exception.Message }, exception);
1986SendValidationEvent(SR.Sch_FixedElementValue, QNameString(_context.LocalName!, _context.Namespace!));
2030SendValidationEvent(new XmlSchemaValidationException(SR.Sch_UndeclaredId, next.Id, _sourceUriString, next.LineNo, next.LinePos), XmlSeverityType.Error);
2078throw new InvalidOperationException(SR.Format(SR.Sch_InvalidStartTransition, new string[] { methodName, s_methodNames[(int)ValidatorState.Start] }));
2080throw new InvalidOperationException(SR.Format(SR.Sch_InvalidStateTransition, new string[] { s_methodNames[(int)_currentState], methodName }));
2106SendValidationEvent(SR.Sch_MissRequiredAttribute, attdef.Name.ToString());
2206SendValidationEvent(SR.Sch_RefNotInScope, QNameString(_context.LocalName!, _context.Namespace!));
2261SendValidationEvent(SR.Sch_FieldSimpleTypeExpected, localName);
2308SendValidationEvent(SR.Sch_FieldSingleValueExpected, name);
2355SendValidationEvent(SR.Sch_FieldSingleValueExpected, localName);
2392SendValidationEvent(new XmlSchemaValidationException(SR.Sch_MissingKey, constraints[i].constraint.name.ToString(), _sourceUriString, ks.PosLine, ks.PosCol));
2400SendValidationEvent(new XmlSchemaValidationException(SR.Sch_DuplicateKey,
2419SendValidationEvent(new XmlSchemaValidationException(SR.Sch_DuplicateKey,
2464SendValidationEvent(new XmlSchemaValidationException(SR.Sch_UnresolvedKeyref, new string[2] { ks!.ToString(), vcs[i].constraint.name.ToString() },
2534SendValidationEvent(eventHandler, sender, new XmlSchemaValidationException(SR.Sch_InvalidElementContentComplex, new string[] { BuildElementName(context.LocalName!, context.Namespace!), BuildElementName(name), SR.Sch_ComplexContentModel }, sourceUri, lineNo, linePos), XmlSeverityType.Error);
2538SendValidationEvent(eventHandler, sender, new XmlSchemaValidationException(SR.Sch_InvalidElementContent, new string[] { BuildElementName(context.LocalName!, context.Namespace!), BuildElementName(name) }, sourceUri, lineNo, linePos), XmlSeverityType.Error);
2546SendValidationEvent(eventHandler, sender, new XmlSchemaValidationException(SR.Sch_InvalidElementContentExpectingComplex, new string[] { BuildElementName(context.LocalName!, context.Namespace!), BuildElementName(name), PrintExpectedElements(names, getParticles), SR.Sch_ComplexContentModel }, sourceUri, lineNo, linePos), XmlSeverityType.Error);
2550SendValidationEvent(eventHandler, sender, new XmlSchemaValidationException(SR.Sch_InvalidElementContentExpecting, new string[] { BuildElementName(context.LocalName!, context.Namespace!), BuildElementName(name), PrintExpectedElements(names, getParticles) }, sourceUri, lineNo, linePos), XmlSeverityType.Error);
2558SendValidationEvent(eventHandler, sender, new XmlSchemaValidationException(SR.Sch_InvalidElementInEmptyEx, new string[] { QNameString(context.LocalName!, context.Namespace!), name.ToString() }, sourceUri, lineNo, linePos), XmlSeverityType.Error);
2562SendValidationEvent(eventHandler, sender, new XmlSchemaValidationException(SR.Sch_InvalidElementInTextOnlyEx, new string[] { QNameString(context.LocalName!, context.Namespace!), name.ToString() }, sourceUri, lineNo, linePos), XmlSeverityType.Error);
2588SendValidationEvent(eventHandler, sender, new XmlSchemaValidationException(SR.Sch_IncompleteContentComplex, new string?[] { BuildElementName(context.LocalName!, context.Namespace!), SR.Sch_ComplexContentModel }, sourceUri, lineNo, linePos), XmlSeverityType.Error);
2591SendValidationEvent(eventHandler, sender, new XmlSchemaValidationException(SR.Sch_IncompleteContent, BuildElementName(context.LocalName!, context.Namespace!), sourceUri, lineNo, linePos), XmlSeverityType.Error);
2598SendValidationEvent(eventHandler, sender, new XmlSchemaValidationException(SR.Sch_IncompleteContentExpectingComplex, new string?[] { BuildElementName(context.LocalName!, context.Namespace!), PrintExpectedElements(names, getParticles), SR.Sch_ComplexContentModel }, sourceUri, lineNo, linePos), XmlSeverityType.Error);
2602SendValidationEvent(eventHandler, sender, new XmlSchemaValidationException(SR.Sch_IncompleteContentExpecting, new string?[] { BuildElementName(context.LocalName!, context.Namespace!), PrintExpectedElements(names, getParticles) }, sourceUri, lineNo, linePos), XmlSeverityType.Error);
2611string ContinuationString = SR.Format(SR.Sch_ContinuationString, " ");
2685builder.Append(SR.Format(SR.Sch_ElementNameAndNamespace, name.Name, name.Namespace));
2689builder.Append(SR.Format(SR.Sch_ElementName, name.Name));
2719subBuilder.Append(SR.Sch_AnyElement);
2725builder.Append(SR.Format(SR.Sch_ElementNameAndNamespace, subBuilder, name.Namespace));
2729builder.Append(SR.Format(SR.Sch_ElementName, subBuilder));
2753builder.Append(SR.Format(SR.Sch_AnyElementNS, subBuilder));
2770return SR.Format(SR.Sch_ElementNameAndNamespace, localName, ns);
2774return SR.Format(SR.Sch_ElementName, localName);
2793SendValidationEvent(SR.Sch_UndeclaredEntity, name);
2798SendValidationEvent(SR.Sch_UnparsedEntityRef, name);
System\Xml\Schema\XmlValueConverter.cs (36)
478return new InvalidCastException(SR.Format(SR.XmlConvert_TypeBadMapping, XmlTypeName, sourceType.Name));
480return new InvalidCastException(SR.Format(SR.XmlConvert_TypeBadMapping2, XmlTypeName, sourceType.Name, destinationType.Name));
639throw new InvalidCastException(SR.Format(SR.XmlConvert_TypeNoNamespace, value, prefix));
644throw new InvalidCastException(SR.Format(SR.XmlConvert_TypeNoNamespace, value, prefix));
770throw new InvalidCastException(SR.Format(SR.XmlConvert_TypeNoPrefix, qname, qname.Namespace));
803throw new OverflowException(SR.Format(SR.XmlConvert_Overflow, new string[] { XmlConvert.ToString(value), "Int32" }));
811throw new OverflowException(SR.Format(SR.XmlConvert_Overflow, new string[] { XmlConvert.ToString(value), "Int64" }));
819throw new OverflowException(SR.Format(SR.XmlConvert_Overflow, new string[] { XmlConvert.ToString(value), "UInt64" }));
827throw new OverflowException(SR.Format(SR.XmlConvert_Overflow, new string[] { XmlConvert.ToString(value), "Byte" }));
835throw new OverflowException(SR.Format(SR.XmlConvert_Overflow, new string[] { XmlConvert.ToString(value), "Int16" }));
843throw new OverflowException(SR.Format(SR.XmlConvert_Overflow, new string[] { XmlConvert.ToString(value), "SByte" }));
851throw new OverflowException(SR.Format(SR.XmlConvert_Overflow, new string[] { XmlConvert.ToString(value), "UInt16" }));
859throw new OverflowException(SR.Format(SR.XmlConvert_Overflow, new string[] { XmlConvert.ToString(value), "Int32" }));
867throw new OverflowException(SR.Format(SR.XmlConvert_Overflow, new string[] { XmlConvert.ToString(value), "UInt32" }));
2493throw new InvalidCastException(SR.Format(SR.XmlConvert_TypeToString, XmlTypeName, sourceType.Name));
2496throw new InvalidCastException(SR.Format(SR.XmlConvert_TypeFromString, XmlTypeName, destinationType.Name));
3128return new InvalidCastException(SR.Format(SR.XmlConvert_TypeListBadMapping, XmlTypeName, sourceType.Name));
3130return new InvalidCastException(SR.Format(SR.XmlConvert_TypeListBadMapping2, XmlTypeName, sourceType.Name, destinationType.Name));
System\Xml\Schema\XsdBuilder.cs (56)
715SendValidationEvent(SR.Sch_UnsupportedElement, XmlQualifiedName.ToString(name, ns));
741SendValidationEvent(SR.Sch_InvalidXsdAttributeDatatypeValue, new string[] { name, e.Message }, XmlSeverityType.Error);
765SendValidationEvent(SR.Sch_UnsupportedAttribute, XmlQualifiedName.ToString(name, ns));
781SendValidationEvent(SR.Sch_TextNotAllowed, value);
1168builder.SendValidationEvent(SR.Sch_IncludeLocation, null);
1193builder.SendValidationEvent(SR.Sch_ImportLocation, null);
1220builder.SendValidationEvent(SR.Sch_RedefineLocation, null);
1426builder.SendValidationEvent(SR.Sch_DupXsdElement, "simpleType");
1433builder.SendValidationEvent(SR.Sch_DupXsdElement, "simpleType");
1437builder.SendValidationEvent(SR.Sch_TypeAfterConstraints, null);
1444builder.SendValidationEvent(SR.Sch_DupXsdElement, "simpleType");
1451builder.SendValidationEvent(SR.Sch_DupXsdElement, "simpleType");
1458builder.SendValidationEvent(SR.Sch_DupXsdElement, "simpleType");
1466builder.SendValidationEvent(SR.Sch_SimpleTypeRestriction, null);
1500builder.SendValidationEvent(SR.Sch_DupSimpleTypeChild, null);
1533builder.SendValidationEvent(SR.Sch_DupSimpleTypeChild, null);
1557builder.SendValidationEvent(SR.Sch_DupSimpleTypeChild, null);
1596builder.SendValidationEvent(SR.Sch_DupElement, "complexType");
1600builder.SendValidationEvent(SR.Sch_TypeAfterConstraints, null);
1646builder.SendValidationEvent(SR.Sch_ComplexTypeContentModel, "complexContent");
1669builder.SendValidationEvent(SR.Sch_ComplexContentContentModel, "extension");
1712builder.SendValidationEvent(SR.Sch_ComplexTypeContentModel, "simpleContent");
1731builder.SendValidationEvent(SR.Sch_DupElement, "extension");
1755builder.SendValidationEvent(SR.Sch_DupElement, "restriction");
1831builder.SendValidationEvent(SR.Sch_AttributeMutuallyExclusive, "anyAttribute");
1835builder.SendValidationEvent(SR.Sch_DupElement, "anyAttribute");
1842builder.SendValidationEvent(SR.Sch_DupElement, "anyAttribute");
1849builder.SendValidationEvent(SR.Sch_DupElement, "anyAttribute");
1856builder.SendValidationEvent(SR.Sch_DupElement, "anyAttribute");
1863builder.SendValidationEvent(SR.Sch_DupElement, "anyAttribute");
1870builder.SendValidationEvent(SR.Sch_DupElement, "anyAttribute");
2111builder.SendValidationEvent(SR.Sch_InvalidFacetPosition, null);
2154builder.SendValidationEvent(SR.Sch_ElementRef, null);
2185builder.SendValidationEvent(SR.Sch_UnsupportedAttribute, "refer");
2206builder.SendValidationEvent(SR.Sch_DupSelector, builder._identityConstraint.Name);
2229builder.SendValidationEvent(SR.Sch_SelectorBeforeFields, builder._identityConstraint.Name);
2254builder.SendValidationEvent(SR.Sch_AnnotationLocation, null);
2332SendValidationEvent(SR.Sch_AttributeMutuallyExclusive, "attribute");
2336SendValidationEvent(SR.Sch_AnyAttributeLastChild, null);
2343SendValidationEvent(SR.Sch_AnyAttributeLastChild, null);
2350SendValidationEvent(SR.Sch_AnyAttributeLastChild, null);
2357SendValidationEvent(SR.Sch_AnyAttributeLastChild, null);
2364SendValidationEvent(SR.Sch_AnyAttributeLastChild, null);
2371SendValidationEvent(SR.Sch_AnyAttributeLastChild, null);
2391SendValidationEvent(SR.Sch_ComplexTypeContentModel, "complexType");
2400SendValidationEvent(SR.Sch_ComplexContentContentModel, "ComplexContentExtension");
2409SendValidationEvent(SR.Sch_ComplexContentContentModel, "ComplexContentExtension");
2416SendValidationEvent(SR.Sch_DupGroupParticle, nameof(particle));
2462SendValidationEvent(SR.Sch_MinOccursInvalidXsd, null);
2474SendValidationEvent(SR.Sch_MaxOccursInvalidXsd, null);
2486SendValidationEvent(SR.Sch_InvalidXsdAttributeValue, attributeName, value, null);
2499SendValidationEvent(SR.Sch_InvalidXsdAttributeValue, attributeName, s, null);
2513SendValidationEvent(SR.Sch_InvalidXsdAttributeValue, attributeName, value, null);
2532SendValidationEvent(SR.Sch_InvalidXsdAttributeValue, attributeName, value, null);
2542SendValidationEvent(SR.Sch_InvalidXsdAttributeValue, attributeName, value, null);
2547SendValidationEvent(SR.Sch_InvalidXsdAttributeValue, attributeName, value, null);
System\Xml\Schema\XsdValidator.cs (31)
164SendValidationEvent(SR.Sch_CannotLoadSchema, new string[] { BaseUri!.AbsoluteUri, e.Message }, XmlSeverityType.Error);
195SendValidationEvent(SR.Sch_ContentInNill, elementName.ToString());
204SendValidationEvent(SR.Sch_AllElement, elementName.ToString());
233SendValidationEvent(SR.Sch_UndeclaredElement, XmlSchemaValidator.QNameString(context!.LocalName!, context.Namespace!));
237SendValidationEvent(SR.Sch_NoElementSchemaFound, XmlSchemaValidator.QNameString(context!.LocalName!, context.Namespace!), XmlSeverityType.Warning);
389SendValidationEvent(SR.Sch_AbstractElement, XmlSchemaValidator.QNameString(context!.LocalName!, context.Namespace!));
395SendValidationEvent(SR.Sch_XsiNilAndType);
410SendValidationEvent(SR.Sch_XsiTypeNotFound, xsiType.ToString());
415SendValidationEvent(SR.Sch_XsiTypeBlockedEx, new string?[] { xsiType.ToString(), XmlSchemaValidator.QNameString(context!.LocalName!, context.Namespace!) });
430SendValidationEvent(SR.Sch_XsiNilAndFixed);
436SendValidationEvent(SR.Sch_InvalidXsiNill);
448SendValidationEvent(SR.Sch_AbstractElement, XmlSchemaValidator.QNameString(context.LocalName!, context.Namespace!));
515SendValidationEvent(SR.Sch_UndeclaredAttribute, attQName.ToString());
519SendValidationEvent(SR.Sch_NoAttributeSchemaFound, attQName.ToString(), XmlSeverityType.Warning);
604SendValidationEvent(SR.Sch_CannotLoadSchema, new string[] { uri, e.Message }, XmlSeverityType.Error);
609SendValidationEvent(SR.Sch_CannotLoadSchema, new string[] { uri, e.Message }, XmlSeverityType.Warning);
635throw new XmlException(SR.Xml_MultipleValidationTypes, string.Empty, this.PositionInfo.LineNumber, this.PositionInfo.LinePosition);
664SendValidationEvent(SR.Sch_DupId, name);
726SendValidationEvent(SR.Sch_FixedAttributeValue, attdef!.Name.ToString());
730SendValidationEvent(SR.Sch_FixedElementValue, XmlSchemaValidator.QNameString(context!.LocalName!, context.Namespace!));
743SendValidationEvent(SR.Sch_AttributeValueDataType, attdef.Name.ToString());
747SendValidationEvent(SR.Sch_ElementValueDataType, XmlSchemaValidator.QNameString(context!.LocalName!, context.Namespace!));
815SendValidationEvent(new XmlSchemaException(SR.Sch_UndeclaredId, next.Id, reader.BaseURI, next.LineNo, next.LinePos));
896SendValidationEvent(SR.Sch_RefNotInScope, XmlSchemaValidator.QNameString(context.LocalName!, context.Namespace!));
946SendValidationEvent(SR.Sch_FieldSimpleTypeExpected, reader.LocalName);
994SendValidationEvent(SR.Sch_FieldSingleValueExpected, name);
1048SendValidationEvent(SR.Sch_FieldSingleValueExpected, reader.LocalName);
1076SendValidationEvent(new XmlSchemaException(SR.Sch_MissingKey, constraints[i].constraint.name.ToString(), reader.BaseURI, ks.PosLine, ks.PosCol));
1083SendValidationEvent(new XmlSchemaException(SR.Sch_DuplicateKey,
1100SendValidationEvent(new XmlSchemaException(SR.Sch_DuplicateKey,
1143SendValidationEvent(new XmlSchemaException(SR.Sch_UnresolvedKeyref, new string[2] { ks!.ToString(), vcs[i].constraint.name.ToString() },
System\Xml\Serialization\Compilation.cs (23)
83throw new PlatformNotSupportedException(SR.CompilingScriptsNotSupported);
89throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Failed to generate XmlSerializer assembly, but did not throw"));
175throw new Exception(SR.Format(SR.FailLoadAssemblyUnderPregenMode, serializerName));
191throw new InvalidOperationException(SR.Format(SR.XmlPregenInvalidXmlSerializerAssemblyAttribute, "AssemblyName", "CodeBase"));
351throw new InvalidOperationException(SR.Format(SR.XmlPregenTypeDynamic, types[i]!.FullName));
545throw new InvalidOperationException(SR.Format(SR.XmlMissingType, typeName, assembly.FullName));
571throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncoding3, encodingStyle, Soap.Encoding, Soap12.Encoding));
576throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncodingNotEncoded1, encodingStyle));
603throw new InvalidOperationException(SR.Format(SR.XmlTypeInBadLoadContext, t.FullName));
621throw new InvalidOperationException(SR.Format(SR.XmlNotSerializable, mapping.Accessor.Name));
629throw new InvalidOperationException(SR.XmlNoPartialTrust, e);
648throw new InvalidOperationException(SR.Format(SR.XmlNotSerializable, mapping.Accessor.Name));
656throw new InvalidOperationException(SR.XmlNoPartialTrust, e);
System\Xml\Serialization\Mappings.cs (32)
120throw new ArgumentException(SR.Format(SR.Xml_InvalidNameChars, name), nameof(name));
242throw new InvalidOperationException(SR.Format(SR.Xml_InvalidNameChars, Name));
599throw new InvalidOperationException(SR.Format(SR.XmlHiddenMember, parent, member.Name, member.TypeDesc!.FullName, this.TypeName, _members[i].Name, _members[i].TypeDesc!.FullName));
602throw new InvalidOperationException(SR.Format(SR.XmlInvalidXmlOverride, parent, member.Name, this.TypeName, _members[i].Name));
626throw new InvalidOperationException(SR.Format(SR.XmlIllegalSimpleContentExtension, TypeDesc!.FullName, BaseMapping.TypeDesc.FullName));
639throw new InvalidOperationException(SR.Format(SR.XmlIllegalTypedTextAttribute, TypeDesc!.FullName, text.Name, text.Mapping.TypeDesc.FullName));
1108throw new InvalidOperationException(SR.Format(SR.XmlCircularDerivation, TypeDesc!.FullName));
1233throw new InvalidOperationException(SR.Format(SR.XmlSerializableSchemaError, nameof(IXmlSerializable), args.Message));
1266throw new InvalidOperationException(SR.Format(SR.XmlSerializableRootDupName, _getSchemaMethod!.DeclaringType!.FullName, e.Name, elementNs));
1319throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaEmptyTypeName, _type!.FullName, _getSchemaMethod.Name));
1324throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaMethodReturnType, _type!.Name, _getSchemaMethod.Name, nameof(XmlSchemaProviderAttribute), typeof(XmlQualifiedName).FullName));
1348throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, _xsiType.Namespace));
1352throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaInclude, _xsiType.Namespace, _getSchemaMethod.DeclaringType!.FullName, _getSchemaMethod.Name));
1357throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, _xsiType.Namespace));
1362throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaTypeMissing, _getSchemaMethod.DeclaringType!.FullName, _getSchemaMethod.Name, _xsiType.Name, _xsiType.Namespace));
1375if (string.IsNullOrEmpty(_schema.Id)) throw new InvalidOperationException(SR.Format(SR.XmlSerializableNameMissing1, _type!.FullName));
System\Xml\Serialization\Models.cs (10)
67if (!typeDesc.IsSpecial) throw new NotSupportedException(SR.Format(SR.XmlUnsupportedTypeKind, type.FullName));
209typeDesc.Exception ??= new NotSupportedException(SR.Format(SR.XmlSerializerUnsupportedType, typeDesc.FullName));
210throw new InvalidOperationException(SR.Format(SR.XmlSerializerUnsupportedMember, $"{member.DeclaringType!.FullName}.{member.Name}", type.FullName), typeDesc.Exception);
308throw new InvalidOperationException(SR.Format(SR.XmlInvalidSpecifiedType, specifiedField.Name, specifiedField.FieldType.FullName, typeof(bool).FullName));
325throw new InvalidOperationException(SR.Format(SR.XmlInvalidSpecifiedType, specifiedProperty.Name, specifiedProperty.PropertyType.FullName, typeof(bool).FullName));
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (26)
62throw new ArgumentException(SR.Format(SR.XmlInternalError, "xmlMapping"));
74throw new ArgumentException(SR.Format(SR.XmlInternalError, "xmlMapping"));
585throw new InvalidOperationException(SR.XmlInternalError);
627throw new InvalidOperationException(SR.XmlInternalError);
643throw new InvalidOperationException(SR.XmlInternalError);
671throw new InvalidOperationException(SR.XmlInternalError);
692throw new InvalidOperationException(SR.XmlInternalError);
926throw new InvalidOperationException(SR.XmlInternalError);
998throw new InvalidOperationException(SR.XmlInternalError);
1003throw new InvalidOperationException(SR.XmlInternalError);
1064throw new InvalidOperationException(SR.XmlInternalError);
1109throw new InvalidOperationException(SR.XmlInternalError);
1210_ => throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"unknown FormatterName: {mapping.TypeDesc.FormatterName}")),
1220throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"unknown FormatterName: {mapping.TypeDesc.FormatterName}"));
1495throw new InvalidOperationException(SR.XmlInternalError);
1629throw new InvalidOperationException(SR.Format(SR.XmlSequenceHierarchy, structMapping.TypeDesc.FullName, mapping.Name, declaringMapping!.TypeDesc!.FullName, "Order"));
1665member.Source = (value) => throw new InvalidOperationException(SR.Format(SR.XmlReadOnlyPropertyError, pi.Name, pi.DeclaringType!.FullName));
1684throw new InvalidOperationException(SR.Format(SR.XmlReadOnlyPropertyError, pi.Name, pi.DeclaringType!.FullName));
1980throw new InvalidOperationException(SR.XmlInternalError);
System\Xml\Serialization\SoapReflectionImporter.cs (45)
139return new InvalidOperationException(SR.Format(SR.XmlReflectionError, context), e);
169throw new InvalidOperationException(SR.Format(SR.XmlInvalidDataTypeUsage, dataType, "SoapElementAttribute.DataType"));
174throw new InvalidOperationException(SR.Format(SR.XmlInvalidXsdDataType, dataType, "SoapElementAttribute.DataType", new XmlQualifiedName(dataType, XmlSchema.Namespace).ToString()));
178throw new InvalidOperationException(SR.Format(SR.XmlDataTypeMismatch, dataType, "SoapElementAttribute.DataType", model.TypeDesc.FullName));
185throw new InvalidOperationException(SR.Format(SR.XmlInvalidTypeAttributes, model.Type.FullName));
219throw new NotSupportedException(SR.Format(SR.XmlUnsupportedSoapTypeKind, model.TypeDesc.FullName));
253throw new InvalidOperationException(SR.Format(SR.XmlTypesDuplicate, typeDesc.FullName, mapping.TypeDesc!.FullName, typeName, ns));
276throw new InvalidOperationException(SR.Format(SR.XmlTypesDuplicate, typeDesc.FullName, existingMapping.TypeDesc!.FullName, typeDesc.Name, existingMapping.Namespace));
281throw new InvalidOperationException(SR.Format(SR.XmlTypesDuplicate, typeDesc.FullName, existingMapping.TypeDesc!.FullName, typeDesc.Name, existingMapping.Namespace));
340throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "DeferredWorkItems.Count have changed"));
342throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "DeferredWorkItems.Top have changed"));
401throw new NotSupportedException(SR.Format(SR.XmlRpcRefsInValueType, model.TypeDesc.FullName));
403throw new NotSupportedException(SR.Format(SR.XmlRpcNestedValueType, member.TypeDesc.FullName));
426throw new NotSupportedException(SR.Format(SR.XmlRpcArrayOfValueTypes, model.TypeDesc.FullName));
502throw new InvalidOperationException(SR.Format(SR.XmlInvalidSoapArray, mapping.TypeDesc!.FullName));
541throw new InvalidOperationException(SR.Format(SR.XmlUdeclaredXsdType, dataType));
583throw new InvalidOperationException(SR.Format(SR.XmlNoSerializableMembers, model.TypeDesc.FullName));
595throw new InvalidOperationException(SR.XmlInvalidEnumAttribute);
619if (i > 0) throw new InvalidOperationException(SR.XmlInvalidReturnPosition);
690throw new InvalidOperationException(SR.XmlInvalidVoid);
697throw new InvalidOperationException(SR.Format(SR.XmlIllegalSoapAttribute, accessorName, accessor.TypeDesc.FullName));
700throw new InvalidOperationException(SR.XmlInvalidElementAttribute);
714throw new InvalidOperationException(SR.XmlInvalidElementAttribute);
751throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultEnumValue, a.SoapDefaultValue.GetType().FullName, fieldTypeDesc.FullName));
755throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, strValue, a.SoapDefaultValue.GetType().FullName));
System\Xml\Serialization\Types.cs (36)
380throw new NotSupportedException(SR.Format(SR.XmlSerializerUnsupportedType, FullName));
392_exception = new InvalidOperationException(SR.Format(SR.XmlConstructorInaccessible, FullName));
702throw new InvalidOperationException(SR.Format(SR.XmlUnsupportedOpenGenericType, type));
766exception = new InvalidOperationException(SR.Format(SR.XmlTypeInaccessible, type.FullName));
771exception = new InvalidOperationException(SR.Format(SR.XmlTypeStatic, type.FullName));
789exception ??= new NotSupportedException(SR.Format(SR.XmlSerializerUnsupportedType, type.FullName));
807exception ??= new NotSupportedException(SR.Format(SR.XmlUnsupportedRank, type.FullName));
826exception ??= new NotSupportedException(SR.Format(SR.XmlSerializerUnsupportedType, type.FullName));
881exception = new NotSupportedException(SR.Format(SR.XmlUnsupportedInterface, type.FullName));
885exception = new NotSupportedException(SR.Format(SR.XmlUnsupportedInterfaceDetails, $"{memberInfo.DeclaringType!.FullName}.{memberInfo.Name}", type.FullName));
893exception ??= new NotSupportedException(SR.Format(SR.XmlSerializerUnsupportedType, type.FullName));
1082throw new InvalidOperationException(SR.Format(SR.XmlReadOnlyPropertyError, propertyInfo.DeclaringType, propertyInfo.Name));
1320throw new InvalidOperationException(SR.Format(SR.XmlNoAddMethod, type.FullName, currentType, "IEnumerable"));
1337throw new NotSupportedException(SR.Format(SR.XmlUnsupportedIDictionary, type.FullName));
1341throw new NotSupportedException(SR.Format(SR.XmlUnsupportedIDictionaryDetails, memberInfo, type.FullName));
1371throw new InvalidOperationException(SR.Format(SR.XmlNoDefaultAccessors, type.FullName));
1376throw new InvalidOperationException(SR.Format(SR.XmlNoAddMethod, type.FullName, indexer.PropertyType, "ICollection"));
1406throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayTypeSyntax, type));
System\Xml\Serialization\XmlReflectionImporter.cs (189)
130throw new InvalidOperationException(SR.Format(SR.XmlAnonymousInclude, type.FullName));
286throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, model.TypeDesc.BaseTypeDesc!.FullName, "XmlRoot"));
303throw new ArgumentException(SR.XmlInternalError, nameof(mapping));
341throw new InvalidOperationException(SR.Format(SR.XmlCannotReconcileAccessorDefault, accessor.Name, accessor.Namespace, value1, value2));
346throw new InvalidOperationException(SR.Format(SR.XmlMethodTypeNameConflict, accessor.Name, accessor.Namespace));
352throw new InvalidOperationException(SR.Format(SR.XmlCannotReconcileAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.Mapping!), GetMappingName(accessor.Mapping)));
369throw new InvalidOperationException(SR.Format(SR.XmlCannotReconcileAttributeAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.Mapping!), GetMappingName(accessor.Mapping!)));
371throw new InvalidOperationException(SR.Format(SR.XmlCannotReconcileAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.Mapping!), GetMappingName(accessor.Mapping!)));
376return new InvalidOperationException(SR.Format(SR.XmlReflectionError, context), e);
381return new InvalidOperationException(SR.Format(SR.XmlTypeReflectionError, context), e);
386return new InvalidOperationException(SR.Format(model.IsProperty ? SR.XmlPropertyReflectionError : SR.XmlFieldReflectionError, model.Name), e);
407throw new InvalidOperationException(SR.Format(SR.XmlInvalidDataTypeUsage, dataType, "XmlElementAttribute.DataType"));
412throw new InvalidOperationException(SR.Format(SR.XmlInvalidXsdDataType, dataType, "XmlElementAttribute.DataType", new XmlQualifiedName(dataType, XmlSchema.Namespace).ToString()));
416throw new InvalidOperationException(SR.Format(SR.XmlDataTypeMismatch, dataType, "XmlElementAttribute.DataType", modelTypeDesc.FullName));
423throw new InvalidOperationException(SR.Format(SR.XmlInvalidTypeAttributes, model.Type.FullName));
464throw new InvalidOperationException(SR.Format(SR.XmlSerializableAttributes, model.TypeDesc.FullName, nameof(XmlSchemaProviderAttribute)));
496throw new ArgumentException(SR.Format(SR.XmlGetSchemaMethodName, provider.MethodName), nameof(provider.MethodName));
500throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaMethodMissing, provider.MethodName, nameof(XmlSchemaSet), type.FullName));
503throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaMethodReturnType, type.Name, provider.MethodName, nameof(XmlSchemaProviderAttribute), typeof(XmlQualifiedName).FullName, typeof(XmlSchemaType).FullName));
594throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, baseQname.Namespace));
598throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaInclude, baseQname.Namespace, nameof(IXmlSerializable), "GetSchema"));
620_ => throw new ArgumentException(SR.XmlInternalError, nameof(context)),
625return new InvalidOperationException(SR.Format(SR.XmlInvalidAttributeUse, type.FullName));
630return new InvalidOperationException(SR.Format(SR.XmlIllegalTypeContext, typeDesc.FullName, GetContextName(context)));
674throw new InvalidOperationException(SR.Format(SR.XmlTypesDuplicate, typeDesc.FullName, existingMapping.TypeDesc!.FullName, typeDesc.Name, existingMapping.Namespace));
679throw new InvalidOperationException(SR.Format(SR.XmlTypesDuplicate, typeDesc.FullName, existingMapping.TypeDesc!.FullName, typeDesc.Name, existingMapping.Namespace));
722throw new InvalidOperationException(SR.Format(SR.XmlTypesDuplicate, typeDesc.FullName, mapping.TypeDesc!.FullName, typeName, ns));
779throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "DeferredWorkItems.Count have changed"));
781throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "DeferredWorkItems.Top have changed"));
805throw new NotSupportedException(SR.Format(SR.XmlUnsupportedInheritance, model.Type.BaseType!.FullName));
878throw new InvalidOperationException(SR.Format(SR.XmlIllegalTypedTextAttribute, typeName, member.Text.Name, member.Text.Mapping.TypeDesc.FullName));
881throw new InvalidOperationException(SR.Format(SR.XmlIllegalMultipleText, model.Type.FullName));
888throw new InvalidOperationException(SR.Format(SR.XmlMultipleXmlns, model.Type.FullName));
919throw new InvalidOperationException(SR.Format(SR.XmlSequenceUnique, member.SequenceId.ToString(CultureInfo.InvariantCulture), "Order", member.Name));
925throw new InvalidOperationException(SR.Format(SR.XmlSequenceInconsistent, "Order", member.Name));
935throw new InvalidOperationException(SR.Format(SR.XmlMultipleXmlns, model.Type.FullName));
1159throw new ArgumentException(SR.XmlInternalError, nameof(context));
1176throw new InvalidOperationException(SR.Format(SR.XmlUdeclaredXsdType, dataType));
1211throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttributeFlagsArray, model.TypeDesc.FullName));
1226throw new InvalidOperationException(SR.Format(SR.XmlNoSerializableMembers, model.TypeDesc.FullName));
1239throw new InvalidOperationException(SR.XmlInvalidConstantAttribute);
1272throw new InvalidOperationException(SR.XmlRpcLitAttributeAttributes);
1276throw new InvalidOperationException(SR.Format(SR.XmlInvalidAttributeType, "XmlAttribute"));
1282if (i > 0) throw new InvalidOperationException(SR.XmlInvalidReturnPosition);
1298throw new InvalidOperationException(SR.XmlIllegalMultipleTextMembers);
1306throw new InvalidOperationException(SR.XmlMultipleXmlnsMembers);
1321throw new InvalidOperationException(SR.Format(SR.XmlSequenceMembers, "Order"));
1438throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierType, identifierName, memberName, type.GetElementType()!.FullName));
1445throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierArrayType, identifierName, memberName, type.FullName));
1451throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierTypeEnum, identifierName));
1466throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMemberMissing, choice.MemberName, accessorName));
1483throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMemberMissing, choice.MemberName, accessorName));
1490throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierAmbiguous, choice.MemberName));
1497throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMemberMissing, choice.MemberName, accessorName));
1580throw new InvalidOperationException(SR.XmlIllegalAttributesArrayAttribute);
1586throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrTextInterface, accessorName, accessor.TypeDesc.ArrayElementTypeDesc.FullName, nameof(IXmlSerializable)));
1590throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrText, accessorName, accessor.TypeDesc.ArrayElementTypeDesc.FullName));
1627throw new InvalidOperationException(SR.XmlIllegalElementsArrayAttribute);
1637throw new InvalidOperationException(SR.Format(SR.XmlIllegalArrayTextAttribute, accessorName));
1665throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc!.FullName, "XmlElement"));
1678throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order"));
1690throw new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, arrayElementType.FullName));
1701throw new InvalidOperationException(SR.Format(SR.XmlAnyElementDuplicate, accessorName, xmlAnyElement.Name, xmlAnyElement.Namespace ?? "null"));
1728throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order"));
1738throw new InvalidOperationException(SR.XmlIllegalArrayArrayAttribute);
1772throw new InvalidOperationException(SR.XmlIllegalAttribute);
1776if (a.XmlAnyElements.Count > 0) throw new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, accessor.TypeDesc.FullName));
1780if (a.XmlElements.Count > 0) throw new InvalidOperationException(SR.XmlIllegalAttribute);
1781if (a.XmlAttribute.Type != null) throw new InvalidOperationException(SR.Format(SR.XmlIllegalType, "XmlAttribute"));
1807throw new InvalidOperationException(SR.Format(SR.XmlIllegalType, "XmlText"));
1824throw new InvalidOperationException(SR.Format(SR.XmlIllegalType, "XmlElement"));
1838throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc!.FullName, "XmlElement"));
1851throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order"));
1862throw new InvalidOperationException(SR.XmlSoleXmlnsAttribute);
1866throw new InvalidOperationException(SR.Format(SR.XmlXmlnsInvalidType, accessorName, accessorType.FullName, typeof(System.Xml.Serialization.XmlSerializerNamespaces).FullName));
1877throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrTextInterface, accessorName, accessor.TypeDesc.FullName, nameof(IXmlSerializable)));
1881throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrText, accessorName, accessor.TypeDesc));
1906throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc!.FullName, "XmlElement"));
1919throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order"));
1931throw new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, accessorType.FullName));
1943throw new InvalidOperationException(SR.Format(SR.XmlAnyElementDuplicate, accessorName, xmlAnyElement.Name, xmlAnyElement.Namespace ?? "null"));
1968throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order"));
1982throw new InvalidOperationException(SR.Format(SR.XmlRpcLitArrayElement, accessor.Elements[0].Name));
1985throw new InvalidOperationException(SR.Format(SR.XmlRpcLitXmlns, accessor.Name));
2031throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, accessor.ChoiceIdentifier.Mapping!.TypeDesc!.FullName));
2037throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingValue, accessor.ChoiceIdentifier.Mapping!.TypeDesc!.FullName, id, element.Name, element.Namespace));
2053throw new InvalidOperationException(SR.XmlRpcLitAttributeAttributes);
2056throw new InvalidOperationException(SR.XmlRpcLitAttributes);
2062throw new InvalidOperationException(SR.XmlRpcLitElements);
2067throw new InvalidOperationException(SR.Format(SR.XmlRpcLitElementNamespace, "Namespace", xmlElement.Namespace));
2071throw new InvalidOperationException(SR.Format(SR.XmlRpcLitElementNullable, "IsNullable", "true"));
2076throw new InvalidOperationException(SR.Format(SR.XmlRpcLitElementNamespace, "Namespace", a.XmlArray.Namespace));
2093throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMissing, nameof(XmlChoiceIdentifierAttribute), accessorName));
2104throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMissing, nameof(XmlChoiceIdentifierAttribute), accessorName));
2119throw new InvalidOperationException(SR.Format(SR.XmlArrayItemAmbiguousTypes, accessorName, item.ElementName, items[i]!.ElementName, nameof(XmlElementAttribute), nameof(XmlChoiceIdentifierAttribute), accessorName));
2142throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdDuplicate, choiceMapping.TypeName, choiceId));
2163throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, strValue, a.XmlDefaultValue.GetType().FullName));
2196throw new InvalidOperationException(SR.Format(SR.XmlDuplicateElementName, existing.Name, existing.Namespace));
2202throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Bad accessor type " + accessor.GetType().FullName));
2204throw new InvalidOperationException(SR.Format(SR.XmlDuplicateAttributeName, existing.Name, existing.Namespace));
2238throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"The XML attribute/element '{accessor.Namespace}{accessor.Name}' does not have an existing accessor to remove."));
2260if (isQualified && form == XmlSchemaForm.Unqualified) throw new InvalidOperationException(SR.XmlInvalidFormUnqualified);
2267if (isNullable && !typeDesc.IsNullable) throw new InvalidOperationException(SR.Format(SR.XmlInvalidIsNullable, typeDesc.FullName));
System\Xml\Serialization\XmlSchemaExporter.cs (50)
79throw new InvalidOperationException(SR.Format(SR.XmlBareAttributeMember, member.Attribute.Name));
81throw new InvalidOperationException(SR.Format(SR.XmlBareTextMember, member.Text.Name));
86throw new InvalidOperationException(SR.Format(SR.XmlIllegalArrayElement, member.Elements[0].Name));
225throw new InvalidOperationException(SR.XmlMappingsScopeMismatch);
236throw new InvalidOperationException(SR.XmlIllegalWildcard);
261throw new InvalidOperationException(SR.Format(SR.XmlDuplicateTypeName, newTypeName, newNamespace));
287throw new InvalidOperationException(SR.Format(SR.XmlIllegalForm, e.Name));
293throw new InvalidOperationException(SR.Format(SR.XmlIllegalForm, a.Name));
364throw new ArgumentException(SR.XmlInternalError, nameof(mapping));
395throw new ArgumentException(SR.XmlInternalError, nameof(mapping));
511throw new InvalidOperationException(SR.Format(SR.XmlDuplicateNamespace, anyNs));
537throw new ArgumentException(SR.XmlInternalError, nameof(mapping));
562throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"Unsupported anonymous mapping type: {mapping}"));
619throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Type " + mapping.TypeName + " from namespace '" + ns + "' is an invalid array mapping"));
681throw new InvalidOperationException(SR.Format(SR.XmlInvalidContent, type.ContentModel.Content!.GetType().Name));
792throw new InvalidOperationException(SR.XmlInternalError);
876if (value.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, SR.Format(SR.XmlInvalidDefaultValue, value, value.GetType().FullName)));
916throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Mapping for " + pm.TypeDesc.Name + " missing type property"));
932throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, value, pm.TypeDesc.Name));
935throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, value, pm.TypeDesc.Name));
969throw new InvalidOperationException(SR.Format(SR.XmlCircularReference2, mapping.TypeDesc.Name, "AnonymousType", "false"));
975if (!mapping.IncludeInSchema) throw new InvalidOperationException(SR.Format(SR.XmlCannotIncludeInSchema, mapping.TypeDesc.Name));
990throw new InvalidOperationException(SR.Format(SR.XmlAnonymousBaseType, mapping.TypeDesc.Name, mapping.BaseMapping.TypeDesc!.Name, "AnonymousType", "false"));
1051throw new InvalidOperationException(SR.Format(SR.XmlIllegalMultipleText, name));
1074throw new InvalidOperationException(SR.Format(SR.XmlInvalidContent, type.ContentModel.Content!.GetType().Name));
1096throw new InvalidOperationException(SR.Format(SR.XmlAnonymousBaseType, textMapping.TypeDesc!.Name, pm.TypeDesc!.Name, "AnonymousType", "false"));
1143if (!mapping.IncludeInSchema) throw new InvalidOperationException(SR.Format(SR.XmlCannotIncludeInSchema, mapping.TypeDesc!.Name));
System\Xml\Serialization\XmlSchemaImporter.cs (39)
71throw new InvalidOperationException(SR.Format(SR.XmlBadBaseElement, name.Name, name.Namespace, baseType.FullName));
124throw new InvalidOperationException(SR.Format(SR.XmlBadBaseType, typeName.Name, typeName.Namespace, baseType.FullName));
285throw new InvalidOperationException(SR.Format(SR.XmlElementHasNoName, parentType.Name, parentType.Namespace));
365throw new InvalidOperationException(SR.Format(SR.XmlElementImportedTwice, element.Name, ns, mapping.GetType().Name, desiredMappingType.Name));
426AddReference(name, TypesInUse, SR.XmlCircularTypeReference);
434throw new InvalidOperationException(SR.XmlInternalError);
449throw new NotSupportedException(SR.Format(SR.XmlUnsupportedRedefine, type.Name, typeNs));
474throw new ArgumentException(SR.XmlInternalError, nameof(desiredMappingType));
481if (!type.DerivedFrom.IsEmpty) throw new InvalidOperationException(SR.XmlMembersDeriveError);
544throw new InvalidOperationException(SR.Format(SR.XmlTypeUsedTwice, type.QualifiedName.Name, type.QualifiedName.Namespace));
591throw new InvalidOperationException(SR.Format(SR.XmlIllegalOverride, type.Name, baseMember.Name, baseMember.TypeDesc!.FullName, structMapping.Members[i].TypeDesc!.FullName, declaringMapping!.TypeDesc!.FullName));
921AddReference(refGroup.RefName, GroupsInUse, SR.XmlCircularGroupReference);
993throw new InvalidOperationException(SR.Format(SR.XmlDuplicateElementInScope, element.Name, element.Namespace));
997throw new InvalidOperationException(SR.Format(SR.XmlDuplicateElementInScope1, element.Name, element.Namespace));
1023AddReference(refGroup.RefName, GroupsInUse, SR.XmlCircularGroupReference);
1614if (attribute.Name!.Length == 0) throw new InvalidOperationException(SR.XmlAttributeHasNoName);
1687AddReference(restriction.BaseTypeName, TypesInUse, SR.XmlCircularTypeReference);
1859throw new InvalidOperationException(SR.Format(SR.XmlMissingGroup, name.Name));
1868throw new InvalidOperationException(SR.Format(SR.XmlMissingAttributeGroup, name.Name));
1902AddReference(qname, TypesInUse, SR.XmlCircularTypeReference);
1936throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncoding, name));
1940throw new InvalidOperationException(SR.Format(SR.XmlMissingDataType, name));
1966throw new InvalidOperationException(SR.Format(SR.XmlMissingElement, name));
1974throw new InvalidOperationException(SR.Format(SR.XmlMissingAttribute, name.Name));
System\Xml\Serialization\XmlSchemas.cs (35)
49throw new InvalidOperationException(SR.Format(SR.XmlSchemaDuplicateNamespace, ns));
173if (_isCompiled) throw new InvalidOperationException(SR.XmlSchemaCompiled);
262throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "XmlSchemas.Find: Invalid object type " + type.FullName));
395throw new InvalidOperationException(SR.Format(SR.XmlSchemaIncludeLocation, this.GetType().Name, external.SchemaLocation));
509item = SR.Format(SR.XmlSchemaNamedItem, ns, "notation", ((XmlSchemaNotation)o).Name, details);
513item = SR.Format(SR.XmlSchemaNamedItem, ns, "group", ((XmlSchemaGroup)o).Name, details);
521item = SR.Format(SR.XmlSchemaElementReference, e.RefName.ToString(), parentName.Name, parentName.Namespace);
525item = SR.Format(SR.XmlSchemaNamedItem, ns, "element", e.Name, details);
530item = SR.Format(SR.XmlSchemaNamedItem, ns, o.GetType() == typeof(XmlSchemaSimpleType) ? "simpleType" : "complexType", ((XmlSchemaType)o).Name, null);
534item = SR.Format(SR.XmlSchemaNamedItem, ns, "attributeGroup", ((XmlSchemaAttributeGroup)o).Name, details);
542return SR.Format(SR.XmlSchemaAttributeReference, a.RefName.ToString(), parentName.Name, parentName.Namespace);
546item = SR.Format(SR.XmlSchemaNamedItem, ns, "attribute", a.Name, details);
553item = SR.Format(SR.XmlSchemaContentDef, parentName.Name, parentName.Namespace, null);
558item = SR.Format(SR.XmlSchemaItem, ns, itemType, details);
562item = SR.Format(SR.XmlSchema, ns, details);
566item = SR.Format(SR.XmlSchemaNamedItem, ns, o.GetType().Name, null, details);
592string err = SR.Format(SR.XmlSerializableMergeItem, ns, GetSchemaItem(src, ns, null));
712throw new InvalidOperationException(SR.Format(SR.XmlSchemaSyntaxErrorDetails, ns, message, exception.LineNumber, exception.LinePosition), exception);
System\Xml\Serialization\XmlSerializationReader.cs (80)
948if (arrayInfo.dimensions != 1) throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag()));
950if (qname.Name != name) throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayTypeName, qname.Name, name, CurrentTag()));
951if (qname.Namespace != ns) throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayTypeNamespace, qname.Namespace, ns, CurrentTag()));
967throw new ArgumentNullException(nameof(value), SR.Format(SR.XmlMissingArrayType, CurrentTag()));
972throw new ArgumentException(SR.Format(SR.XmlEmptyArrayType, CurrentTag()), nameof(value));
985throw new ArgumentException(SR.XmlInvalidArraySyntax, nameof(value));
993throw new ArgumentException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag()), nameof(value));
998throw new ArgumentException(SR.XmlMismatchedArrayBrackets, nameof(value));
1006throw new ArgumentException(SR.Format(SR.XmlInvalidArrayLength, new string(lengthStringSpan)), nameof(value));
1020throw new ArgumentException(SR.XmlMismatchedArrayBrackets, nameof(value));
1022throw new ArgumentException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag()), nameof(value));
1024throw new ArgumentException(SR.XmlInvalidArraySyntax, nameof(value));
1074throw new ArgumentException(SR.Format(SR.XmlInvalidArrayLength, dimensions[i]), "value");
1160throw new InvalidOperationException(SR.Format(SR.XmlUndefinedAlias, prefix));
1285return new InvalidOperationException(SR.Format(SR.XmlUnknownType, type.Name, type.Namespace, CurrentTag()));
1290return new InvalidOperationException(SR.Format(SR.XmlReadOnlyCollection, name));
1295return new InvalidOperationException(SR.Format(SR.XmlAbstractType, name, ns, CurrentTag()));
1300return new InvalidOperationException(SR.Format(SR.XmlConstructorInaccessible, typeName));
1305return new InvalidOperationException(SR.Format(SR.XmlConstructorHasSecurityAttributes, typeName));
1310return new InvalidOperationException(SR.Format(SR.XmlUnknownNode, CurrentTag()));
1315return new InvalidOperationException(SR.Format(SR.XmlUnknownConstant, value, enumType.Name));
1326return new InvalidCastException(SR.Format(SR.XmlInvalidNullCast, type.FullName));
1328return new InvalidCastException(SR.Format(SR.XmlInvalidCast, value.GetType().FullName, type.FullName));
1330return new InvalidCastException(SR.Format(SR.XmlInvalidCastWithId, value.GetType().FullName, type.FullName, id));
1335return new InvalidOperationException(SR.Format(SR.XmlSerializableBadDerivation, xsdDerived, nsDerived, xsdBase, nsBase, clrDerived, clrBase));
1340return new InvalidOperationException(SR.Format(SR.XmlSerializableMissingClrType, name, ns, nameof(XmlIncludeAttribute), clrType));
1427if (!href.StartsWith('#')) throw new InvalidOperationException(SR.Format(SR.XmlMissingHref, href));
1478throw new InvalidOperationException(SR.Format(SR.XmlInvalidHref, id));
1547throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayRef, id, o.GetType().FullName, i.ToString(CultureInfo.InvariantCulture)));
1580if (arrayInfo.dimensions != 1) throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag()));
1666throw new NotSupportedException(SR.Format(SR.XmlRpcArrayOfValueTypes, elementType.FullName));
2332throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
2338throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
2459if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping."));
2826if (enumMethodName == null) throw new InvalidOperationException(SR.Format(SR.XmlMissingMethodEnum, mapping.TypeDesc!.Name));
3070if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc!.Name));
3107if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, enumMapping.TypeDesc!.Name));
3344throw new InvalidOperationException(SR.Format(SR.XmlSequenceHierarchy, structMapping.TypeDesc.FullName, mapping.Name, declaringMapping!.TypeDesc!.FullName, "Order"));
3822throw new InvalidOperationException(SR.XmlInternalError);
4085throw new InvalidOperationException(SR.XmlInternalError);
4635if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, element.Mapping.TypeDesc!.Name));
4782if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name));
4861throw new InvalidOperationException(SR.XmlInternalError);
4866throw new InvalidOperationException(SR.XmlInternalError);
4872if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "need parent for the " + source));
System\Xml\Serialization\XmlSerializationReaderILGen.cs (23)
270throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
276throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
369if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping."));
685if (enumMethodName == null) throw new InvalidOperationException(SR.Format(SR.XmlMissingMethodEnum, mapping.TypeDesc!.Name));
1142if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc!.Name));
1197if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, enumMapping.TypeDesc!.Name));
1405throw Globals.NotSupported(SR.Arg_NeverValueType);
1568throw new InvalidOperationException(SR.Format(SR.XmlSequenceHierarchy, structMapping.TypeDesc.FullName, mapping.Name, declaringMapping!.TypeDesc!.FullName, "Order"));
2063throw new InvalidOperationException(SR.XmlInternalError);
2351throw new InvalidOperationException(SR.XmlInternalError);
2979if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, element.Mapping.TypeDesc!.Name));
3128if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name));
3246throw new InvalidOperationException(SR.XmlInternalError);
3251throw new InvalidOperationException(SR.XmlInternalError);
3257if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "need parent for the " + source));
System\Xml\Serialization\XmlSerializationWriter.cs (57)
500if (_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(SR.Format(SR.XmlCircularReference, o.GetType().FullName));
546throw new InvalidOperationException(SR.Format(SR.XmlInvalidXmlns, alias));
658if (!_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "missing stack object of type " + o.GetType().FullName));
783throw new InvalidOperationException(SR.XmlNoAttributeHere);
799throw new InvalidOperationException(SR.Format(SR.XmlElementNameMismatch, node.LocalName, node.NamespaceURI, name, ns));
820if (typeof(IXmlSerializable).IsAssignableFrom(type)) return new InvalidOperationException(SR.Format(SR.XmlInvalidSerializable, type.FullName));
822if (!typeDesc.IsStructLike) return new InvalidOperationException(SR.Format(SR.XmlInvalidUseOfType, type.FullName));
823return new InvalidOperationException(SR.Format(SR.XmlUnxpectedType, type.FullName));
829return new InvalidOperationException(SR.Format(SR.XmlChoiceMismatchChoiceException, elementName, value, enumValue));
834return new InvalidOperationException(SR.Format(SR.XmlUnknownAnyElement, name, ns));
839return new InvalidOperationException(SR.Format(SR.XmlInvalidChoiceIdentifierValue, type, identifier));
845return new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMismatch, value, identifier, name, ns));
850return new InvalidOperationException(SR.Format(SR.XmlUnknownConstant, value, typeName));
860return new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, type.FullName));
929if (attr == null) throw new InvalidOperationException(SR.XmlNeedAttributeHere);
1284if (!typeof(IEnumerable).IsAssignableFrom(type)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "not array like type " + type.FullName));
1448throw new InvalidOperationException(SR.Format(SR.XmlDuplicateNs, prefix, ns));
1797throw new InvalidOperationException(SR.Format(SR.XmlSerializerUnsupportedType, memberInfos[0]));
2319throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
2325throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
2408if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name) + Environment.StackTrace);
2456if (defaultValue!.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name));
2759if (enumSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping."));
2987if (methodName == null) throw new InvalidOperationException("derived from " + mapping.TypeDesc!.FullName + ", " + SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc.Name) + Environment.StackTrace);
3026if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace);
3473throw new InvalidOperationException(SR.XmlInternalError);
3904throw new InvalidOperationException(SR.XmlInternalError);
4113if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, structMapping.TypeDesc!.Name) + Environment.StackTrace);
4172throw new InvalidOperationException(SR.XmlInternalError);
4377throw new InvalidOperationException(SR.Format(SR.XmlUnsupportedDefaultType, type.FullName));
4486throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, choiceMapping.TypeDesc!.FullName));
4489throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingValue, choiceMapping.TypeDesc!.FullName, $"{element.Namespace}:{element.Name}", element.Name, element.Namespace));
System\Xml\Serialization\XmlSerializationWriterILGen.cs (21)
77throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
83throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
127if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name));
201if (defaultValue!.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name));
519if (enumSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping."));
748if (methodName == null) throw new InvalidOperationException("derived from " + mapping.TypeDesc!.FullName + ", " + SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc.Name));
799if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc.Name));
1375throw new InvalidOperationException(SR.XmlInternalError);
1891throw new InvalidOperationException(SR.XmlInternalError);
1994if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, structMapping.TypeDesc!.Name));
2060throw new InvalidOperationException(SR.XmlInternalError);
2277throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, choiceMapping.TypeDesc!.FullName));
2280throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingValue, choiceMapping.TypeDesc!.FullName, $"{element.Namespace}:{element.Name}", element.Name, element.Namespace));
System\Xml\Serialization\XmlSerializer.cs (21)
251throw new FileLoadException(SR.Format(SR.FailLoadAssemblyUnderPregenMode, serializerName));
393throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncodingNotEncoded1, encodingStyle));
416throw new InvalidOperationException(SR.XmlGenError, e);
493throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncodingNotEncoded1, encodingStyle));
519throw new InvalidOperationException(SR.Format(SR.XmlSerializeErrorDetails, lineInfo.LineNumber.ToString(CultureInfo.InvariantCulture), lineInfo.LinePosition.ToString(CultureInfo.InvariantCulture)), e);
523throw new InvalidOperationException(SR.XmlSerializeError, e);
604throw new FileLoadException(SR.Format(SR.FailLoadAssemblyUnderPregenMode, serializerName));
675throw new InvalidOperationException(SR.XmlMelformMapping);
684throw new InvalidOperationException(SR.Format(SR.XmlPregenTypeDynamic, type.FullName));
696throw new ArgumentException(SR.Format(SR.XmlPregenOrphanType, type.FullName, nameOrLocation), nameof(types));
931throw new InvalidOperationException(SR.Format(SR.XmlUnxpectedType, _primitiveType!.FullName));
1013throw new InvalidOperationException(SR.Format(SR.XmlUnxpectedType, _primitiveType!.FullName));
System\Xml\ValidateNames.cs (20)
374throw new XmlException(SR.Format(SR.Xml_EmptyName, string.Empty));
381throw new XmlException(SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(s, offsetBadChar));
386throw new XmlException(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(s, offsetBadChar));
394return new XmlException(SR.Xml_EmptyName, string.Empty);
401return new XmlException(SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(s, offsetBadChar));
406return new XmlException(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(s, offsetBadChar));
480if (throwOnError) throw new XmlException(SR.Xdom_Empty_LocalName, string.Empty);
489if (throwOnError) throw new XmlException(SR.XmlBadName, new string[] { nodeKind.ToString(), localName });
498if (throwOnError) throw new XmlException(SR.Xml_InvalidPIName, localName);
507if (throwOnError) throw new XmlException(SR.XmlNoNameAllowed, nodeKind.ToString());
527if (throwOnError) throw new XmlException(SR.Xml_PrefixForEmptyNs, string.Empty);
536if (throwOnError) throw new XmlException(SR.XmlBadName, new string[] { nodeKind.ToString(), localName });
545if (throwOnError) throw new XmlException(SR.Xml_XmlPrefix, string.Empty);
552if (throwOnError) throw new XmlException(SR.Xml_XmlnsPrefix, string.Empty);
558if (throwOnError) throw new XmlException(SR.Xml_NamespaceDeclXmlXmlns, string.Empty);
568if (throwOnError) throw new XmlException(SR.Xml_InvalidPIName, CreateName(prefix, localName));
577if (throwOnError) throw new XmlException(SR.XmlNoNameAllowed, nodeKind.ToString());
609throw new ArgumentException(SR.Format(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0')), nameof(name));
System\Xml\XmlConvert.cs (72)
333return new XmlException(SR.Xml_EmptyName, string.Empty);
339return new XmlException(endPos == 0 ? SR.Xml_BadStartNameChar : SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(name, endPos));
355throw CreateException(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(name, endPos), exceptionType, 0, endPos + 1);
414throw new XmlException(SR.Sch_NotTokenString, token);
431return new XmlException(SR.Sch_NotTokenString, token);
452throw CreateException(SR.Xml_InvalidNmToken, name, exceptionType);
459throw CreateException(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(name, endPos), exceptionType, 0, endPos + 1);
469return new XmlException(SR.Xml_EmptyName, string.Empty);
475return new XmlException(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(name, endPos));
485return new XmlSchemaException(SR.Sch_NotNormalizedString, str);
527throw new XmlException(SR.Xml_InvalidWhitespaceCharacter, XmlException.BuildCharExceptionArgs(content, pos), 0, pos + 1);
722throw new ArgumentException(SR.Format(SR.Sch_InvalidDateTimeOption, dateTimeOption, nameof(dateTimeOption)));
756throw new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Boolean"));
774return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Boolean"));
784throw new FormatException(SR.XmlConvert_NotOneCharString);
794return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Char"));
809return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Decimal"));
824return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Integer"));
840return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "SByte"));
855return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Int16"));
870return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Int32"));
885return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Int64"));
900return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Byte"));
916return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "UInt16"));
932return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "UInt32"));
948return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "UInt64"));
990return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Single"));
1037return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Double"));
1121throw new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "TimeSpan"));
1233throw new ArgumentException(SR.Format(SR.Sch_InvalidDateTimeOption, dateTimeOption, nameof(dateTimeOption)));
1278exception = new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Guid"));
1282exception = new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Guid"));
1314throw new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Uri"));
1321throw new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Uri"));
1336return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Uri"));
1341return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Uri"));
1419throw CreateException(SR.Xml_InvalidSurrogateMissingLowChar, invSurrogateExceptionType, 0, i + 1);
1461throw CreateException(SR.Xml_InvalidSurrogateMissingLowChar, exceptionType, 0, offset - i + 1);
1591return CreateException(SR.Xml_InvalidSurrogatePairWithArgs, args, exceptionType, lineNo, linePos);
1606return CreateException(SR.Xml_InvalidSurrogateHighChar, ((uint)hi).ToString("X", CultureInfo.InvariantCulture), exceptionType, lineNo, linePos);
1611return CreateException(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(data, length, invCharPos), exceptionType, 0, invCharPos + 1);
1621return CreateException(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(data, invCharPos), exceptionType, 0, invCharPos + 1);
1631return CreateException(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(invChar, nextChar), exceptionType);
1636return CreateException(index == 0 ? SR.Xml_BadStartNameChar : SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(name, index), exceptionType, 0, index + 1);
1784throw new ArgumentException(SR.Format(SR.Sch_InvalidDateTimeOption, dateTimeOption, nameof(dateTimeOption)));
System\Xml\XmlEncoding.cs (14)
32throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, -1), (string?)null);
524throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, new object[1] { i }), (string?)null);
535throw new XmlException(SR.Xml_InvalidCharInThisEncoding, string.Empty);
565throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, new object[1] { i }), (string?)null);
576throw new XmlException(SR.Xml_InvalidCharInThisEncoding, string.Empty);
607throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, new object[1] { i }), (string?)null);
618throw new XmlException(SR.Xml_InvalidCharInThisEncoding, string.Empty);
649throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, new object[1] { i }), (string?)null);
660throw new XmlException(SR.Xml_InvalidCharInThisEncoding, string.Empty);
System\Xml\XPath\Internal\XPathParser.cs (11)
28throw XPathException.Create(SR.Xp_InvalidToken, parser._scanner.SourceText);
39throw XPathException.Create(SR.Xp_InvalidToken, parser._scanner.SourceText);
57throw XPathException.Create(SR.Xp_QueryTooComplex);
449throw XPathException.Create(SR.Xp_NodeSetExpected, _scanner.SourceText);
530throw XPathException.Create(SR.Xp_InvalidNumArgs, name, _scanner.SourceText);
548throw XPathException.Create(SR.Xp_InvalidNumArgs, name, _scanner.SourceText);
567throw XPathException.Create(SR.Xp_InvalidArgumentType, name, _scanner.SourceText);
722throw XPathException.Create(SR.Xp_InvalidToken, _scanner.SourceText);
747throw XPathException.Create(SR.Xp_InvalidToken, _scanner.SourceText);
775throw XPathException.Create(SR.Xp_NodeSetExpected, _scanner.SourceText);
871throw XPathException.Create(SR.Xp_InvalidToken, _scanner.SourceText);
System\Xml\Xsl\Runtime\XmlExtensionFunction.cs (7)
201throw new XslTransformException(/*[XT_037]*/SR.XmlIl_AmbiguousExtensionMethod, _namespaceUri, _name, _numArgs.ToString(CultureInfo.InvariantCulture));
213throw new XslTransformException(/*[XT_038]*/SR.XmlIl_NonPublicExtensionMethod, _namespaceUri, _name);
215throw new XslTransformException(/*[XT_039]*/SR.XmlIl_NoExtensionMethod, _namespaceUri, _name, _numArgs.ToString(CultureInfo.InvariantCulture));
219throw new XslTransformException(/*[XT_040]*/SR.XmlIl_GenericExtensionMethod, _namespaceUri, _name);
290throw new XslTransformException(e.InnerException, SR.XmlIl_ExtensionError, _name);
298throw new XslTransformException(e, SR.XmlIl_ExtensionError, _name);
333throw new XslTransformException(/*[XT_050]*/SR.XmlIl_ByRefType, _namespaceUri, _name);
System\Xml\Xsl\Runtime\XmlQueryOutput.cs (6)
726throw new XslTransformException(SR.XmlIl_NmspConflict, new string[] { prefix.Length == 0 ? "" : ":", prefix, ns, nsExisting });
1148throw new XslTransformException(SR.XmlIl_NmspAfterAttr, string.Empty);
1573throw new XslTransformException(SR.XmlIl_BadXmlState, new string[] { constructorType.ToString(), XmlStateToNodeType(_xstate).ToString() });
1578throw new XslTransformException(SR.XmlIl_BadXmlState, new string[] { constructorType.ToString(), _rootType.ToString() });
1581throw new XslTransformException(SR.XmlIl_BadXmlStateAttr, string.Empty);
1586throw new XslTransformException(SR.XmlIl_BadXmlState, new string[] { "Unknown", XmlStateToNodeType(_xstate).ToString() });
System\Xml\Xsl\Runtime\XsltLibrary.cs (10)
105throw new XslTransformException(SR.Xslt_ScriptAndExtensionClash, nsUri);
205throw new XslTransformException(SR.Xslt_NoDecimalFormat, errorMessageName);
241errorHelper.ReportError(SR.Xslt_InvalidAttrValue, nameof(lang), lang);
245throw new XslTransformException(SR.Xslt_InvalidAttrValue, nameof(lang), lang);
262errorHelper.ReportError(SR.Xslt_InvalidLanguage, lang);
266throw new XslTransformException(SR.Xslt_InvalidLanguage, lang);
290errorHelper.ReportError(/*[XT_032]*/SR.Xslt_InvalidAttrValue, nameof(lang), lang);
294throw new XslTransformException(SR.Xslt_InvalidAttrValue, nameof(lang), lang);
311errorHelper.ReportError(/*[XT_033]*/SR.Xslt_InvalidLanguage, lang);
315throw new XslTransformException(SR.Xslt_InvalidLanguage, lang);
System\Xml\Xsl\Xslt\QilGenerator.cs (19)
527ReportError(/*[XT0580]*/SR.Xslt_DupLocalVariable, xslPar.Name.QualifiedName);
955ReportError(/*[XT_031]*/SR.Xslt_XmlnsAttr, "name", name);
1011ReportError(/*[XT0370]*/SR.Xslt_SingleRightBraceInAvt, source);
1014return _f.Error(_lastScope!.SourceLine, SR.Xslt_SingleRightBraceInAvt, source);
1253_compiler.ReportError(/*[XT0710]*/node.SourceLine!, SR.Xslt_InvalidCallTemplate, node.Name!.QualifiedName);
1288_compiler.ReportError(/*[XT0710]*/node.SourceLine!, SR.Xslt_NoAttributeSet, node.Name!.QualifiedName);
1463ReportError(/*[XT_030]*/SR.Xslt_DupLocalVariable, node.Name.QualifiedName);
1634ReportError(/*[XT_034]*/SR.Xslt_BistateAttribute, "data-type", DtText, DtNumber);
1650SR.Xslt_BistateAttribute, "data-type", DtText, DtNumber
1701ReportError(/*[XT_034]*/SR.Xslt_BistateAttribute, attName, value0, value1);
1714SR.Xslt_BistateAttribute, attName, value0, value1
2005ReportError(/*[XT_034]*/SR.Xslt_BistateAttribute, "letter-value", Alphabetic, Traditional);
2023_f.Error(_lastScope!.SourceLine, SR.Xslt_BistateAttribute, "letter-value", Alphabetic, Traditional)
2046ReportError(/*[XT_035]*/SR.Xslt_CharAttribute, "grouping-separator");
2058_f.Error(_lastScope!.SourceLine, SR.Xslt_CharAttribute, "grouping-separator")
2279_compiler.ReportError(_lastScope!.SourceLine!, SR.Xml_UserException, errorText);
2334XPathCompileException e = new XPathCompileException(expr, 0, expr.Length, SR.XPath_NodeSetExpected, null);
2461result = _f.Error(_f.String(XslLoadException.CreateMessage(key.SourceLine, SR.Xslt_MissingAttribute, "use")));
2777ReportError(/*[XT0280]*/SR.Xslt_InvalidPrefix, prefix);
System\Xml\Xsl\Xslt\QilGeneratorEnv.cs (15)
27throw new XslLoadException(SR.Xml_UserException, res);
73throw new XslLoadException(SR.Xslt_VariablesNotAllowed);
83throw new XslLoadException(SR.Xslt_InvalidVariable, Compiler.ConstructQName(prefix, name));
116throw new XslLoadException(SR.Xslt_CurrentNotAllowed);
123throw new XslLoadException(SR.Xslt_KeyNotAllowed);
140throw new XslLoadException(SR.Xslt_UnknownXsltFunction, Compiler.ConstructQName(prefix, name));
228ReportWarning(SR.Xslt_ScriptsProhibited);
229return _f.Error(_lastScope!.SourceLine, SR.Xslt_ScriptsProhibited);
271throw new XslLoadException(SR.Xslt_InvalidPrefix, prefix);
422throw new XslLoadException(SR.Xslt_UndefinedKey, keyName);
475QilNode fdef = _f.Error(SR.Xslt_UndefinedKey, name);
498ReportWarning(SR.Xslt_DocumentFuncProhibited);
499return _f.Error(_lastScope!.SourceLine, SR.Xslt_DocumentFuncProhibited);
593throw new XslLoadException(SR.Xslt_NoDecimalFormat, (string)(QilLiteral)formatName);
626return _f.Error(_lastScope!.SourceLine, SR.Xslt_UnsupportedXsltFunction, "unparsed-entity-uri");
System\Xml\Xsl\Xslt\XsltLoader.cs (83)
78throw new XslLoadException(SR.Xslt_CantResolve, uri);
195throw new XslLoadException(SR.Xslt_CantResolve, relativeUri);
222throw new XslLoadException(SR.Xslt_CannotLoadStylesheet, uri.ToString(), input == null ? "null" : input.GetType().ToString());
295ReportError(/*[XT_002]*/SR.Xslt_WrongStylesheetElement);
310ReportError(/*[XT_002]*/SR.Xslt_WrongStylesheetElement);
377ReportError(/*[XT0200]*/SR.Xslt_NotAtTop, _input.QualifiedName, parentName);
443ReportError(/*[XT_003]*/SR.Xslt_UnexpectedElement, _input.QualifiedName, parentName);
456ReportError(/*[XT0130]*/SR.Xslt_NullNsAtTopLevel, _input.LocalName);
469ReportError(/*[XT0120]*/SR.Xslt_TextNodesNotAllowed, parentName);
492ReportError(/*[XT0210]*/SR.Xslt_CircularInclude, _input.Value);
520ReportError(/*[XT0180]*/SR.Xslt_CircularInclude, _input.Value);
602ReportWarning(/*[XT1560]*/SR.Xslt_AttributeRedefinition, "method");
636ReportWarning(/*[XT1560]*/SR.Xslt_AttributeRedefinition, "doctype-public");
649ReportWarning(/*[XT1560]*/SR.Xslt_AttributeRedefinition, "doctype-system");
666ReportWarning(/*[XT1560]*/SR.Xslt_AttributeRedefinition, "encoding");
676ReportWarning(/*[XT_004]*/SR.Xslt_InvalidEncoding, _input.Value);
696ReportWarning(/*[XT1560]*/SR.Xslt_AttributeRedefinition, "indent");
709ReportWarning(/*[XT1560]*/SR.Xslt_AttributeRedefinition, "media-type");
729ReportWarning(/*[XT1560]*/SR.Xslt_AttributeRedefinition, "omit-xml-declaration");
744ReportWarning(/*[XT1560]*/SR.Xslt_AttributeRedefinition, "standalone");
763ReportWarning(/*[XT1560]*/SR.Xslt_AttributeRedefinition, "version");
838_compiler.ReportError(/*[XT0720]*/attSet.Content[0].SourceLine!, SR.Xslt_CircularAttributeSet, attSet.Name!.QualifiedName);
884ReportError(/*[XTSE1205]*/SR.Xslt_KeyCntUse);
974ReportError(/*[XT1300]*/SR.Xslt_DecimalFormatSignsNotDistinct, _decimalFormatAttributes[3 + i].name, _decimalFormatAttributes[3 + j].name);
985CheckError(infinity != format.InfinitySymbol, /*[XT1290]*/SR.Xslt_DecimalFormatRedefined, "infinity", infinity);
987CheckError(nan != format.NanSymbol, /*[XT1290]*/SR.Xslt_DecimalFormatRedefined, "NaN", nan);
991CheckError(characters[idx] != format.Characters[idx], /*[XT1290]*/SR.Xslt_DecimalFormatRedefined, _decimalFormatAttributes[3 + idx].name, char.ToString(characters[idx]));
1021ReportError(/*[XT_005]*/SR.Xslt_EmptyNsAlias, "stylesheet-prefix");
1033ReportError(/*[XT_005]*/SR.Xslt_EmptyNsAlias, "result-prefix");
1053ReportWarning(/*[XT0810]*/SR.Xslt_DupNsAlias, stylesheetNsUri);
1104ReportError(/*[XT_006]*/SR.Xslt_UnexpectedElement, _input.QualifiedName, parentName);
1113ReportError(/*[XT_006]*/SR.Xslt_TextNodesNotAllowed, parentName);
1128CheckError(!_curStylesheet!.AddVarPar(var), /*[XT0630]*/SR.Xslt_DupGlobalVariable, var.Name!.QualifiedName);
1153ReportError(/*[XT0530]*/SR.Xslt_InvalidAttrValue, "priority", _input.Value);
1160CheckError(!_input.AttributeExists(1, "name"), /*[XT_007]*/SR.Xslt_BothMatchNameAbsent);
1161CheckError(_input.AttributeExists(3, "mode"), /*[XT_008]*/SR.Xslt_ModeWithoutMatch);
1167ReportWarning(/*[XT_008]*/SR.Xslt_PriorityWithoutMatch);
1171ReportError(/*[XT_008]*/SR.Xslt_PriorityWithoutMatch);
1192ReportError(/*[XT0660]*/SR.Xslt_DupTemplateName, _curTemplate.Name!.QualifiedName);
1296ReportError(/*[XT_009]*/SR.Xslt_EmptyAttrValue, "implements-prefix", _input.Value);
1303ReportError(/*[XT_036]*/SR.Xslt_ScriptXsltNamespace);
1319throw new PlatformNotSupportedException(SR.CompilingScriptsNotSupported); // Not adding any scripts as script compilation is not available
1366throw XslLoadException.Create(SR.Xslt_InputTooComplex);
1393(flags & instrFlag) == 0 ? /*[XT_013]*/SR.Xslt_UnexpectedElement :
1394!atTop ? /*[XT_014]*/SR.Xslt_NotAtTop :
1495ReportError(/*[XT_016]*/SR.Xslt_UnexpectedElement, _input.QualifiedName, parentName);
1504ReportError(/*[XT_016]*/SR.Xslt_TextNodesNotAllowed, parentName);
1518ReportError(/*[XT_015]*/SR.Xslt_InvalidApplyImports);
1534_compiler.ReportError(contentInfo, /*[XT0260]*/SR.Xslt_NotEmptyContents, _atoms.ApplyImports);
1538return SetInfo(F.Error(XslLoadException.CreateMessage(contentInfo, /*[XT0260]*/SR.Xslt_NotEmptyContents, _atoms.ApplyImports)), null, ctxInfo);
1679ReportError(/*[XT_018]*/SR.Xslt_WhenAfterOtherwise);
1693ReportError(/*[XT_019]*/SR.Xslt_DupOtherwise);
1706ReportError(/*[XT_020]*/SR.Xslt_UnexpectedElement, _input.QualifiedName, parentName);
1717ReportError(/*[XT_020]*/SR.Xslt_TextNodesNotAllowed, parentName);
1722CheckError(!when, /*[XT_021]*/SR.Xslt_NoWhen);
1809ReportError(/*[XT_022]*/SR.Xslt_InvalidAttrValue, "level", _input.Value);
1863return SetInfo(F.Error(XslLoadException.CreateMessage(ctxInfo.lineInfo, SR.Xslt_MissingAttribute, "select")), null, ctxInfo);
1870CheckError(select == null && content.Count == 0, /*[???]*/SR.Xslt_NoSelectNoContent, _input.ElementName);
1946ReportError(/*[???]*/SR.Xslt_NonTemplateTunnel, name!.ToString());
1956CheckError((required == TriState.True) && (select != null || content.Count != 0), /*[???]*/SR.Xslt_RequiredAndSelect, name!.ToString());
1981CheckError(hasSelect && content.Count != 0, /*[XT0620]*/SR.Xslt_ElementCntSel, parentName);
2035ReportError(/*[XT_023]*/SR.Xslt_UnexpectedElement, _input.QualifiedName, parentName);
2062CheckError(ns == XmlReservedNs.NsXmlNs, /*[XT_024]*/SR.Xslt_ReservedNS, ns);
2096CheckError(ns == XmlReservedNs.NsXmlNs, /*[XT_024]*/SR.Xslt_ReservedNS, ns);
2134CheckError(sortNumber != 0, SR.Xslt_SortStable);
2529ReportError(/*[XT0670]*/SR.Xslt_DuplicateWithParam, withParam.Name!.QualifiedName);
2559ReportError(/*[XT_026]*/SR.Xslt_UnexpectedElement, _input.QualifiedName, parentName);
2597F.Error(XslLoadException.CreateMessage(extElmLineInfo, SR.Xslt_UnknownExtensionElement, instrName))
2631ReportError(SR.Xslt_ModeListAll);
2670ReportError(SR.Xslt_ModeListEmpty);
2688ReportError(SR.Xslt_ModeListAll);
2702ReportError(SR.Xslt_ModeListDup, qname);
2873ReportError(/*[XT1570]*/SR.Xslt_InvalidAttrValue, nameof(method), attValue);
2881ReportWarning(/*[XT1570]*/SR.Xslt_InvalidMethod, attValue);
2944ReportError(/*[XT_029]*/SR.Xslt_CharAttribute, attName);
2964ReportError(/*[XT_028]*/SR.Xslt_BistateAttribute, attName, "yes", "no");
2977CheckError(true, /*[???]*/SR.Xslt_SchemaAttribute, "type");
2998ReportError(/*[???]*/SR.Xslt_SchemaAttributeValue, attributeName, value);
3002ReportError(/*[???]*/SR.Xslt_InvalidAttrValue, attributeName, value);
3025CheckError(_compiler.inputTypeAnnotations != value, /*[XTSE0265]*/SR.Xslt_InputTypeAnnotations);
3031ReportError(/*[???]*/SR.Xslt_InvalidAttrValue, "input-type-annotations", value);
3046_compiler.ReportError(errorLineInfo, /*[XT0260]*/SR.Xslt_NotEmptyContents, parentName);
3154ReportError(SR.Xslt_NotYetImplemented, arg);
System\Xml\Xsl\XsltOld\Compiler.cs (19)
343throw XsltException.Create(SR.Xslt_DupVarName, variable.NameStr);
365throw XsltException.Create(SR.Xslt_DupVarName, variable.NameStr);
474throw XsltException.Create(SR.Xslt_InvalidAttrValue, Input.LocalName, value);
500throw XsltException.Create(SR.Xslt_InvalidAttribute, name, element);
510throw XsltException.Create(SR.Xslt_MissingAttribute, attributeAtom);
573throw XsltException.Create(SR.Xslt_CantResolve, relativeUri);
599throw XsltException.Create(SR.Xslt_CantResolve, resolved);
727throw XsltException.Create(SR.Xslt_InvalidXPath, new string[] { xpathQuery }, e);
761throw new PlatformNotSupportedException(SR.CompilingScriptsNotSupported);
765throw XsltException.Create(SR.Xslt_ScriptMixedLanguages, ns);
774throw XsltException.Create(SR.Xslt_InvalidExtensionNamespace);
794throw XsltException.Create(SR.Xslt_InvalidAttrValue, _input.LocalName, prefix);
831throw XsltException.Create(SR.Xslt_SingleRightAvt, avt);
859throw XsltException.Create(SR.Xslt_NestedAvt, avt);
864throw XsltException.Create(SR.Xslt_EmptyAvtExpr, avt);
893throw XsltException.Create(state == InExp ? SR.Xslt_OpenBracesAvt : SR.Xslt_OpenLiteralAvt, avt);
1156return XsltException.Create(SR.Xslt_UnexpectedKeyword, thisName, parentName);
1174throw new XsltException(SR.Xslt_InvalidXPath, new string[] { Expression }, _baseUri, _lineNumber, _linePosition, null);
System\Xml\Xsl\XsltOld\ContainerAction.cs (21)
75throw XsltException.Create(SR.Xslt_InvalidAttrValue, "version", version);
103throw XsltException.Create(SR.Xslt_MissingAttribute, "version");
108throw XsltException.Create(SR.Xslt_InvalidAttribute, badAttribute, element);
144throw XsltException.Create(SR.Xslt_WdXslNamespace);
146throw XsltException.Create(SR.Xslt_WrongStylesheetElement);
164throw XsltException.Create(SR.Xslt_WrongStylesheetElement);
176throw XsltException.Create(SR.Xslt_WrongStylesheetElement);
244throw XsltException.Create(SR.Xslt_CircularInclude, resolved);
298throw XsltException.Create(SR.Xslt_InvalidAttribute, name, element);
348throw XsltException.Create(SR.Xslt_InvalidAttribute, name, element);
449throw XsltException.Create(SR.Xslt_InvalidAttrValue, compiler.Input.LocalName, compiler.Input.Value);
479throw XsltException.Create(SR.Xslt_InvalidAttrValue, "elements", name);
516throw XsltException.Create(SR.Xslt_NotFirstImport);
524throw XsltException.Create(SR.Xslt_CircularInclude, resolved);
604throw XsltException.Create(SR.Xslt_NullNsAtTopLevel, input.Name);
617throw XsltException.Create(SR.Xslt_InvalidContents, "stylesheet");
924throw XsltException.Create(SR.Xslt_ScriptInvalidLanguage, langName);
931throw XsltException.Create(SR.Xslt_InvalidAttrValue, input.LocalName, input.Value);
941throw XsltException.Create(SR.Xslt_MissingAttribute, input.Atoms.ImplementsPrefix);
945throw XsltException.Create(SR.Xslt_ScriptEmpty);
1002throw XsltException.Create(SR.Xslt_DuplicateWithParam, name.ToString());
System\Xml\Xsl\XsltOld\XsltCompileContext.cs (11)
74throw XsltException.Create(SR.Xslt_InvalidVariable, qname.ToString());
93throw XsltException.Create(SR.Xslt_InvalidVariable, variable.Name!.ToString());
235throw XsltException.Create(SR.Xslt_ScriptInvalidPrefix, prefix); // BugBug: It's better to say that method 'name' not found
241throw XsltException.Create(SR.Xslt_UnknownXsltFunction, name);
245throw XsltException.Create(SR.Xslt_WrongNumberArgs, name, argTypes.Length.ToString(CultureInfo.InvariantCulture));
364throw XsltException.Create(SR.Xslt_InvalidPattern, matchStr);
398throw XsltException.Create(SR.Xslt_NoDecimalFormat, formatName);
536throw XsltException.Create(SR.Xslt_InvalidPrefix, prefix);
639throw XsltException.Create(SR.Xslt_NoNodeSetConversion);
649throw XsltException.Create(SR.Xslt_NoNavigatorConversion);
756throw XsltException.Create(SR.Xslt_UnsuppFunction, "unparsed-entity-uri");