142 State.AttributeGroup,
167 State.ComplexContent,
173 State.AttributeGroupRef,
180 State.SimpleContentRestriction,
188 State.AttributeGroupRef,
206 State.FractionDigits,
209 State.AttributeGroupRef,
216 State.ComplexContentRestriction,
228 State.AttributeGroupRef,
240 State.AttributeGroupRef,
247 State.SimpleTypeList,
248 State.SimpleTypeRestriction,
266 State.FractionDigits,
285 State.AttributeGroup,
295 State.AttributeGroupRef,
621 private static readonly
string[]
s_derivationMethodStrings =
new string[6] {
"substitution",
"extension",
"restriction",
"list",
"union",
"#all" };
625 private static readonly
string[]
s_useStringValues =
new string[3] {
"optional",
"prohibited",
"required" };
881 case State.Annotation:
893 case State.Attribute:
896 case State.AttributeGroup:
899 case State.AttributeGroupRef:
902 case State.AnyAttribute:
926 case State.SimpleType:
929 case State.ComplexType:
932 case State.ComplexContent:
935 case State.ComplexContentExtension:
938 case State.ComplexContentRestriction:
941 case State.SimpleContent:
944 case State.SimpleContentExtension:
947 case State.SimpleContentRestriction:
950 case State.SimpleTypeUnion:
953 case State.SimpleTypeList:
956 case State.SimpleTypeRestriction:
968 case State.MinExclusive:
969 case State.MinInclusive:
970 case State.MaxExclusive:
971 case State.MaxInclusive:
972 case State.TotalDigits:
973 case State.FractionDigits:
975 case State.MinLength:
976 case State.MaxLength:
977 case State.Enumeration:
979 case State.WhiteSpace:
985 case State.Documentation:
999 case State.Annotation:
1011 case State.Attribute:
1014 case State.AttributeGroup:
1017 case State.AttributeGroupRef:
1020 case State.AnyAttribute:
1026 case State.GroupRef:
1035 case State.Sequence:
1041 case State.Notation:
1044 case State.SimpleType:
1047 case State.ComplexType:
1050 case State.ComplexContent:
1053 case State.ComplexContentExtension:
1056 case State.ComplexContentRestriction:
1059 case State.SimpleContent:
1062 case State.SimpleContentExtension:
1065 case State.SimpleContentRestriction:
1068 case State.SimpleTypeUnion:
1071 case State.SimpleTypeList:
1074 case State.SimpleTypeRestriction:
1082 case State.Selector:
1086 case State.MinExclusive:
1087 case State.MinInclusive:
1088 case State.MaxExclusive:
1089 case State.MaxInclusive:
1090 case State.TotalDigits:
1091 case State.FractionDigits:
1093 case State.MinLength:
1094 case State.MaxLength:
1095 case State.Enumeration:
1097 case State.WhiteSpace:
1103 case State.Documentation:
1106 case State.Redefine:
1158 if (!
builder._canIncludeImport)
1173 if (!
builder._canIncludeImport)
1193 if (!
builder._canIncludeImport)
1264 switch (
builder.ParentElement)
1349 switch (
builder.ParentElement)
1359 if (
builder._attribute.SchemaType !=
null)
1366 if (
builder._element.SchemaType !=
null)
1377 if (
builder._simpleTypeList.ItemType !=
null)
1384 if (
builder._simpleTypeRestriction.BaseType !=
null)
1391 if (
builder._simpleContentRestriction.BaseType !=
null)
1395 if (
builder._simpleContentRestriction.Attributes.
Count != 0 ||
builder._simpleContentRestriction.AnyAttribute !=
null ||
builder._simpleContentRestriction.Facets.
Count != 0)
1419 if (
builder._simpleType.Content !=
null)
1443 if (
builder._simpleType.Content !=
null)
1458 if (
builder._simpleType.Content !=
null)
1474 switch (
builder.ParentElement)
1484 if (
builder._element.SchemaType !=
null)
1524 if (
builder._complexType.ContentModel !=
null ||
builder._complexType.Particle !=
null ||
builder._complexType.Attributes.
Count != 0 ||
builder._complexType.AnyAttribute !=
null)
1539 if (
builder._complexContent.Content !=
null)
1565 if (
builder._complexType.ContentModel !=
null ||
builder._complexType.Particle !=
null ||
builder._complexType.Attributes.
Count != 0 ||
builder._complexType.AnyAttribute !=
null)
1575 if (
builder._simpleContent.Content !=
null)
1590 if (
builder._simpleContent.Content !=
null)
1607 switch (
builder.ParentElement)
1637 switch (
builder.ParentElement)
1640 if (
builder._complexType.ContentModel !=
null)
1644 if (
builder._complexType.AnyAttribute !=
null)
1651 if (
builder._simpleContentRestriction.AnyAttribute !=
null)
1658 if (
builder._simpleContentExtension.AnyAttribute !=
null)
1665 if (
builder._complexContentExtension.AnyAttribute !=
null)
1672 if (
builder._complexContentRestriction.AnyAttribute !=
null)
1679 if (
builder._attributeGroup.AnyAttribute !=
null)
1702 switch (
builder.ParentElement)
1797 switch (
builder.CurrentElement)
1842 if (
builder._simpleContentRestriction.Attributes.
Count != 0 ||
builder._simpleContentRestriction.AnyAttribute !=
null)
1861 if (!
builder._element.RefName.IsEmpty)
1865 switch (
builder.CurrentElement)
1900 if (
builder._identityConstraint.Selector ==
null)
1918 if (
builder._identityConstraint.Selector ==
null)
2145 for (
int i = 0; i <
values.Length; i++)
2175 for (
int i = 0; i <
array.Length; i++)
2197 if (num == 255 &&
value.Length > 4)
void Add(TKey key, TValue value)
static string Sch_UnsupportedAttribute
static string Sch_InvalidXsdAttributeValue
static string Sch_UnsupportedElement
static string Sch_AttributeMutuallyExclusive
static string Sch_TextNotAllowed
static string Sch_ElementRef
static string Sch_InvalidXsdAttributeDatatypeValue
static string Sch_DupSelector
static string Sch_ComplexTypeContentModel
static string Sch_AnnotationLocation
static string Sch_ComplexContentContentModel
static string Sch_SelectorBeforeFields
static string Sch_DupGroupParticle
static string Sch_AnyAttributeLastChild
static string Sch_IncludeLocation
static string Sch_DupElement
static string Sch_MaxOccursInvalidXsd
static string Sch_DupXsdElement
static string Sch_RedefineLocation
static string Sch_TypeAfterConstraints
static string Sch_ImportLocation
static string Sch_InvalidFacetPosition
static string Sch_MinOccursInvalidXsd
static string Sch_DupSimpleTypeChild
static string Sch_SimpleTypeRestriction
static PositionInfo GetPositionInfo(object o)
XmlQualifiedName[] TokenToQName
XmlSchemaAnyAttribute? AnyAttribute
XmlSchemaObjectCollection Attributes
XmlSchemaAnyAttribute? AnyAttribute
XmlSchemaObjectCollection Attributes
XmlSchemaParticle? Particle
XmlSchemaParticle? Particle
XmlSchemaObjectCollection Attributes
XmlSchemaAnyAttribute? AnyAttribute
XmlSchemaContentModel? ContentModel
XmlSchemaObjectCollection Attributes
XmlSchemaParticle? Particle
XmlSchemaAnyAttribute? AnyAttribute
static XmlSchemaDatatype FromXmlTokenizedTypeXsd(XmlTokenizedType token)
void SetSchemaObject(XmlSchemaObject source)
XmlSchemaGroupBase? Particle
int Add(XmlSchemaObject item)
virtual void SetUnhandledAttributes(XmlAttribute[] moreAttributes)
XmlSchemaObjectCollection Attributes
XmlSchemaAnyAttribute? AnyAttribute
XmlSchemaAnyAttribute? AnyAttribute
XmlSchemaObjectCollection Attributes
BuilderNamespaceManager(XmlNamespaceManager nsMgr, XmlReader reader)
readonly XmlNamespaceManager _nsMgr
readonly XmlReader _reader
override string LookupNamespace(string prefix)
SchemaNames.Token Attribute
XsdBuildFunction BuildFunc
XsdAttributeEntry(SchemaNames.Token a, XsdBuildFunction build)
XsdAttributeEntry[] Attributes
XsdEndChildFunction EndChildFunc
XsdEntry(SchemaNames.Token n, State state, State[] nextStates, XsdAttributeEntry[] attributes, XsdInitFunction init, XsdEndChildFunction end, bool parseContent)
static void BuildFacet_Value(XsdBuilder builder, string value)
static readonly XsdAttributeEntry[] s_annotationAttributes
static void InitChoice(XsdBuilder builder, string value)
static readonly State[] s_elementSubelements
static void InitSimpleTypeRestriction(XsdBuilder builder, string value)
static readonly string[] s_formStringValues
static readonly State[] s_schemaElement
static readonly State[] s_simpleTypeListSubelements
readonly XmlNamespaceManager _namespaceManager
XmlSchemaAnnotation _annotation
void SetContainer(State state, object container)
static readonly XsdEntry[] s_schemaEntries
static void BuildImport_SchemaLocation(XsdBuilder builder, string value)
static readonly XsdAttributeEntry[] s_groupRefAttributes
XmlSchemaObject GetContainer(State state)
static void BuildElement_Block(XsdBuilder builder, string value)
static void BuildSchema_ElementFormDefault(XsdBuilder builder, string value)
static readonly XsdAttributeEntry[] s_schemaAttributes
static readonly XsdAttributeEntry[] s_importAttributes
static void InitComplexType(XsdBuilder builder, string value)
static void EndAppinfo(XsdBuilder builder)
static readonly State[] s_attributeGroupSubelements
XmlSchemaRedefine _redefine
static void InitGroup(XsdBuilder builder, string value)
override void ProcessCData(string value)
static void InitImport(XsdBuilder builder, string value)
static void InitComplexContent(XsdBuilder builder, string value)
static void BuildSimpleTypeUnion_MemberTypes(XsdBuilder builder, string value)
static void BuildSimpleContentRestriction_Base(XsdBuilder builder, string value)
static void InitDocumentation(XsdBuilder builder, string value)
static void BuildParticle_MaxOccurs(XsdBuilder builder, string value)
XmlSchemaSimpleContentExtension _simpleContentExtension
static void BuildNotation_Name(XsdBuilder builder, string value)
void SendValidationEvent(XmlSchemaException e)
XmlSchemaAttribute _attribute
static readonly string[] s_useStringValues
XmlQualifiedName ParseQName(string value, string attributeName)
void SendValidationEvent(string code, string arg0, string arg1, string arg2)
static readonly XsdAttributeEntry[] s_simpleContentRestrictionAttributes
static void InitSimpleType(XsdBuilder builder, string value)
static void InitSimpleContentExtension(XsdBuilder builder, string value)
static void BuildAttribute_Type(XsdBuilder builder, string value)
static void InitAny(XsdBuilder builder, string value)
static void BuildSchema_TargetNamespace(XsdBuilder builder, string value)
static void BuildElement_Abstract(XsdBuilder builder, string value)
static void InitSchema(XsdBuilder builder, string value)
static void BuildSchema_BlockDefault(XsdBuilder builder, string value)
static readonly XsdAttributeEntry[] s_complexContentAttributes
static readonly State[] s_complexContentRestrictionSubelements
XmlSchemaAnyAttribute _anyAttribute
override bool IsContentParsed()
static void InitElement(XsdBuilder builder, string value)
XmlSchemaSimpleTypeList _simpleTypeList
XmlSchemaObject ParentContainer
readonly XmlSchema _schema
bool GetNextState(XmlQualifiedName qname)
static void BuildFacet_Fixed(XsdBuilder builder, string value)
static void BuildAttribute_Use(XsdBuilder builder, string value)
delegate void XsdEndChildFunction(XsdBuilder builder)
static void BuildAttribute_Ref(XsdBuilder builder, string value)
static void BuildAppinfo_Source(XsdBuilder builder, string value)
static readonly State[] s_simpleContentExtensionSubelements
XmlSchemaAppInfo _appInfo
delegate void XsdInitFunction(XsdBuilder builder, string value)
static void InitAll(XsdBuilder builder, string value)
static void BuildAttributeGroup_Name(XsdBuilder builder, string value)
static void BuildAttribute_Name(XsdBuilder builder, string value)
static readonly State[] s_simpleContentSubelements
static void BuildElement_Form(XsdBuilder builder, string value)
void SetMinOccurs(XmlSchemaParticle particle, string value)
static readonly XsdAttributeEntry[] s_identityConstraintAttributes
static readonly XsdAttributeEntry[] s_attributeGroupAttributes
static void EndRedefine(XsdBuilder builder)
static readonly State[] s_choiceSequenceSubelements
static void BuildElement_SubstitutionGroup(XsdBuilder builder, string value)
static readonly XsdAttributeEntry[] s_simpleTypeRestrictionAttributes
readonly Stack< XmlSchemaObject > _containerStack
static readonly State[] s_allSubelements
readonly SchemaNames _schemaNames
override void ProcessAttribute(string prefix, string name, string ns, string value)
XmlSchemaComplexContent _complexContent
static void BuildGroupRef_Ref(XsdBuilder builder, string value)
static void EndDocumentation(XsdBuilder builder)
static void BuildIdentityConstraint_Refer(XsdBuilder builder, string value)
static void BuildDocumentation_XmlLang(XsdBuilder builder, string value)
static void BuildComplexType_Mixed(XsdBuilder builder, string value)
static void BuildNotation_System(XsdBuilder builder, string value)
static void BuildComplexContentExtension_Base(XsdBuilder builder, string value)
static void BuildRedefine_SchemaLocation(XsdBuilder builder, string value)
XmlSchemaComplexContentExtension _complexContentExtension
static void BuildInclude_SchemaLocation(XsdBuilder builder, string value)
XmlSchemaParticle _particle
static void BuildSchema_AttributeFormDefault(XsdBuilder builder, string value)
static void InitSimpleContent(XsdBuilder builder, string value)
XmlSchemaAttributeGroup _attributeGroup
static readonly State[] s_simpleTypeUnionSubelements
static readonly State[] s_complexContentSubelements
int ParseBlockFinalEnum(string value, string attributeName)
static void InitRedefine(XsdBuilder builder, string value)
static void InitSimpleContentRestriction(XsdBuilder builder, string value)
static void BuildImport_Namespace(XsdBuilder builder, string value)
static void BuildGroup_Name(XsdBuilder builder, string value)
static void InitSimpleTypeUnion(XsdBuilder builder, string value)
override void EndChildren()
static void BuildDocumentation_Source(XsdBuilder builder, string value)
static void BuildElement_Ref(XsdBuilder builder, string value)
static readonly XsdAttributeEntry[] s_simpleTypeAttributes
static void BuildSimpleType_Final(XsdBuilder builder, string value)
static readonly State[] s_attributeSubelements
static void BuildAttribute_Fixed(XsdBuilder builder, string value)
void SendValidationEvent(string code, string[] args, XmlSeverityType severity)
List< XmlQualifiedName > _namespaces
readonly List< XmlAttribute > _unhandledAttributes
readonly XmlNameTable _nameTable
readonly HWStack _stateHistory
readonly XmlReader _reader
static void BuildElement_Nillable(XsdBuilder builder, string value)
static void BuildAttribute_Form(XsdBuilder builder, string value)
XmlSchemaSimpleContentRestriction _simpleContentRestriction
static void BuildElement_Default(XsdBuilder builder, string value)
static void InitComplexContentExtension(XsdBuilder builder, string value)
static readonly XsdAttributeEntry[] s_notationAttributes
static void InitAnyAttribute(XsdBuilder builder, string value)
static void InitGroupRef(XsdBuilder builder, string value)
void SendValidationEvent(string code, string msg)
static readonly XsdAttributeEntry[] s_attributeAttributes
static readonly XsdAttributeEntry[] s_simpleTypeUnionAttributes
@ SimpleContentRestriction
@ ComplexContentExtension
@ ComplexContentRestriction
static void BuildAnnotated_Id(XsdBuilder builder, string value)
static readonly XsdAttributeEntry[] s_anyAttributes
static readonly State[] s_simpleTypeSubelements
static void BuildSchema_FinalDefault(XsdBuilder builder, string value)
static string ParseUriReference(string s)
XmlSchemaNotation _notation
static void BuildAttributeGroupRef_Ref(XsdBuilder builder, string value)
static readonly XsdAttributeEntry[] s_particleAttributes
static void InitSelector(XsdBuilder builder, string value)
static void InitAppinfo(XsdBuilder builder, string value)
static void BuildElement_Type(XsdBuilder builder, string value)
static void BuildElement_MinOccurs(XsdBuilder builder, string value)
static void BuildSimpleType_Name(XsdBuilder builder, string value)
static void InitIdentityConstraint(XsdBuilder builder, string value)
static void BuildSimpleTypeList_ItemType(XsdBuilder builder, string value)
XmlSchemaSimpleTypeRestriction _simpleTypeRestriction
static void BuildSimpleTypeRestriction_Base(XsdBuilder builder, string value)
XmlSchemaSimpleTypeUnion _simpleTypeUnion
static void InitSimpleTypeList(XsdBuilder builder, string value)
static void BuildAny_ProcessContents(XsdBuilder builder, string value)
delegate void XsdBuildFunction(XsdBuilder builder, string value)
static void BuildIdentityConstraint_Name(XsdBuilder builder, string value)
static void InitAttribute(XsdBuilder builder, string value)
static void BuildElement_Fixed(XsdBuilder builder, string value)
static void BuildAnyAttribute_ProcessContents(XsdBuilder builder, string value)
static void InitField(XsdBuilder builder, string value)
static void BuildElement_Final(XsdBuilder builder, string value)
static void BuildElement_MaxOccurs(XsdBuilder builder, string value)
static readonly XsdAttributeEntry[] s_simpleContentExtensionAttributes
static void BuildAnyAttribute_Namespace(XsdBuilder builder, string value)
XmlSchemaSimpleContent _simpleContent
bool IsSkipableElement(XmlQualifiedName qname)
static readonly XsdAttributeEntry[] s_selectorAttributes
static readonly int[] s_derivationMethodValues
static readonly State[] s_complexTypeSubelements
static readonly XsdAttributeEntry[] s_anyAttributeAttributes
static void BuildComplexType_Abstract(XsdBuilder builder, string value)
static void BuildComplexType_Name(XsdBuilder builder, string value)
XmlSchemaIdentityConstraint _identityConstraint
static void BuildField_XPath(XsdBuilder builder, string value)
static readonly State[] s_simpleContentRestrictionSubelements
static readonly XsdAttributeEntry[] s_redefineAttributes
static readonly XsdAttributeEntry[] s_documentationAttributes
override void StartChildren()
static readonly XsdAttributeEntry[] s_complexContentRestrictionAttributes
static readonly XsdAttributeEntry[] s_groupAttributes
static void InitInclude(XsdBuilder builder, string value)
static readonly State[] s_annotationSubelements
static void InitAnnotation(XsdBuilder builder, string value)
static void InitAttributeGroup(XsdBuilder builder, string value)
static void BuildParticle_MinOccurs(XsdBuilder builder, string value)
readonly PositionInfo _positionInfo
static readonly XsdAttributeEntry[] s_complexTypeAttributes
static void BuildAny_Namespace(XsdBuilder builder, string value)
XmlSchemaElement _element
static void BuildAttribute_Default(XsdBuilder builder, string value)
static readonly XsdAttributeEntry[] s_fieldAttributes
static void BuildComplexType_Final(XsdBuilder builder, string value)
XmlSchemaInclude _include
static void InitAttributeGroupRef(XsdBuilder builder, string value)
static void BuildNotation_Public(XsdBuilder builder, string value)
static readonly XsdAttributeEntry[] s_complexContentExtensionAttributes
static readonly XsdAttributeEntry[] s_simpleTypeListAttributes
SchemaNames.Token CurrentElement
static readonly State[] s_redefineSubelements
override void ProcessMarkup(XmlNode[] markup)
XmlSchemaAttributeGroupRef _attributeGroupRef
static readonly State[] s_annotatedSubelements
override bool ProcessElement(string prefix, string name, string ns)
static readonly State[] s_complexContentExtensionSubelements
static readonly State[] s_schemaSubelements
static void InitComplexContentRestriction(XsdBuilder builder, string value)
XmlSchemaDocumentation _documentation
void SendValidationEvent(XmlSchemaException e, XmlSeverityType severity)
static void BuildSelector_XPath(XsdBuilder builder, string value)
static readonly XsdAttributeEntry[] s_appinfoAttributes
static void BuildElement_Name(XsdBuilder builder, string value)
void AddAttribute(XmlSchemaObject value)
static void BuildComplexContentRestriction_Base(XsdBuilder builder, string value)
static void InitNotation(XsdBuilder builder, string value)
XmlSchemaComplexType _complexType
static readonly string[] s_derivationMethodStrings
static readonly XsdAttributeEntry[] s_elementAttributes
static readonly XsdAttributeEntry[] s_attributeGroupRefAttributes
void SetMaxOccurs(XmlSchemaParticle particle, string value)
static void InitFacet(XsdBuilder builder, string value)
static void BuildSimpleContentExtension_Base(XsdBuilder builder, string value)
XmlSchemaSequence _sequence
static void BuildComplexContent_Mixed(XsdBuilder builder, string value)
static void BuildSchema_Version(XsdBuilder builder, string value)
static readonly XsdAttributeEntry[] s_facetAttributes
static readonly XsdAttributeEntry[] s_includeAttributes
readonly ValidationEventHandler _validationEventHandler
static readonly State[] s_identityConstraintSubelements
static readonly State[] s_groupSubelements
XmlSchemaGroupRef _groupRef
XmlSchemaSimpleType _simpleType
XmlSchemaComplexContentRestriction _complexContentRestriction
static void BuildComplexType_Block(XsdBuilder builder, string value)
bool ParseBoolean(string value, string attributeName)
static readonly State[] s_simpleTypeRestrictionSubelements
SchemaNames.Token ParentElement
XsdBuilder(XmlReader reader, XmlNamespaceManager curmgr, XmlSchema schema, XmlNameTable nameTable, SchemaNames schemaNames, ValidationEventHandler eventhandler)
static readonly XsdAttributeEntry[] s_simpleContentAttributes
static void InitSequence(XsdBuilder builder, string value)
void AddParticle(XmlSchemaParticle particle)
static readonly string[] s_processContentsStringValues
int ParseEnum(string value, string attributeName, string[] values)
static string NonCDataNormalize(string value)
static bool ToBoolean(string s)
static string[] SplitString(string value)
virtual ? string LookupNamespace(string prefix)
static XmlQualifiedName Parse(string s, IXmlNamespaceResolver nsmgr, out string prefix)
override bool Equals([NotNullWhen(true)] object? other)
static readonly XmlQualifiedName Empty
string? LookupNamespace(string prefix)
XmlSchemaContentProcessing
XmlSchemaDerivationMethod