FrameworkFork\Microsoft.Xml\Xml\schema\XsdBuilder.cs (295)
95public State CurrentState;
96public State[] NextStates; // possible next states
103State state,
104State[] nextStates,
150private static readonly State[] s_schemaElement = {
151State.Schema};
152private static readonly State[] s_schemaSubelements = {
153State.Annotation, State.Include, State.Import, State.Redefine,
154State.ComplexType, State.SimpleType, State.Element, State.Attribute,
155State.AttributeGroup, State.Group, State.Notation};
156private static readonly State[] s_attributeSubelements = {
157State.Annotation, State.SimpleType};
158private static readonly State[] s_elementSubelements = {
159State.Annotation, State.SimpleType, State.ComplexType,
160State.Unique, State.Key, State.KeyRef};
161private static readonly State[] s_complexTypeSubelements = {
162State.Annotation, State.SimpleContent, State.ComplexContent,
163State.GroupRef, State.All, State.Choice, State.Sequence,
164State.Attribute, State.AttributeGroupRef, State.AnyAttribute};
165private static readonly State[] s_simpleContentSubelements = {
166State.Annotation, State.SimpleContentRestriction, State.SimpleContentExtension };
167private static readonly State[] s_simpleContentExtensionSubelements = {
168State.Annotation, State.Attribute, State.AttributeGroupRef, State.AnyAttribute};
169private static readonly State[] s_simpleContentRestrictionSubelements = {
170State.Annotation, State.SimpleType,
171State.Enumeration, State.Length, State.MaxExclusive, State.MaxInclusive, State.MaxLength, State.MinExclusive,
172State.MinInclusive, State.MinLength, State.Pattern, State.TotalDigits, State.FractionDigits, State.WhiteSpace,
173State.Attribute, State.AttributeGroupRef, State.AnyAttribute};
174private static readonly State[] s_complexContentSubelements = {
175State.Annotation, State.ComplexContentRestriction, State.ComplexContentExtension };
176private static readonly State[] s_complexContentExtensionSubelements = {
177State.Annotation, State.GroupRef, State.All, State.Choice, State.Sequence,
178State.Attribute, State.AttributeGroupRef, State.AnyAttribute};
179private static readonly State[] s_complexContentRestrictionSubelements = {
180State.Annotation, State.GroupRef, State.All, State.Choice, State.Sequence,
181State.Attribute, State.AttributeGroupRef, State.AnyAttribute};
182private static readonly State[] s_simpleTypeSubelements = {
183State.Annotation, State.SimpleTypeList, State.SimpleTypeRestriction, State.SimpleTypeUnion};
184private static readonly State[] s_simpleTypeRestrictionSubelements = {
185State.Annotation, State.SimpleType,
186State.Enumeration, State.Length, State.MaxExclusive, State.MaxInclusive, State.MaxLength, State.MinExclusive,
187State.MinInclusive, State.MinLength, State.Pattern, State.TotalDigits, State.FractionDigits, State.WhiteSpace};
188private static readonly State[] s_simpleTypeListSubelements = {
189State.Annotation, State.SimpleType};
190private static readonly State[] s_simpleTypeUnionSubelements = {
191State.Annotation, State.SimpleType};
192private static readonly State[] s_redefineSubelements = {
193State.Annotation, State.AttributeGroup, State.ComplexType, State.Group, State.SimpleType };
194private static readonly State[] s_attributeGroupSubelements = {
195State.Annotation, State.Attribute, State.AttributeGroupRef, State.AnyAttribute};
196private static readonly State[] s_groupSubelements = {
197State.Annotation, State.All, State.Choice, State.Sequence};
198private static readonly State[] s_allSubelements = {
199State.Annotation, State.Element};
200private static readonly State[] s_choiceSequenceSubelements = {
201State.Annotation, State.Element, State.GroupRef, State.Choice, State.Sequence, State.Any};
202private static readonly State[] s_identityConstraintSubelements = {
203State.Annotation, State.Selector, State.Field};
204private static readonly State[] s_annotationSubelements = {
205State.AppInfo, State.Documentation};
206private static readonly State[] s_annotatedSubelements = {
207State.Annotation};
415/* Root */ new XsdEntry( SchemaNames.Token.Empty, State.Root, s_schemaElement, null,
419/* Schema */ new XsdEntry( SchemaNames.Token.XsdSchema, State.Schema, s_schemaSubelements, s_schemaAttributes,
423/* Annotation */ new XsdEntry( SchemaNames.Token.XsdAnnotation, State.Annotation, s_annotationSubelements, s_annotationAttributes,
427/* Include */ new XsdEntry( SchemaNames.Token.XsdInclude, State.Include, s_annotatedSubelements, s_includeAttributes,
431/* Import */ new XsdEntry( SchemaNames.Token.XsdImport, State.Import, s_annotatedSubelements, s_importAttributes,
435/* Element */ new XsdEntry( SchemaNames.Token.XsdElement, State.Element, s_elementSubelements, s_elementAttributes,
439/* Attribute */ new XsdEntry( SchemaNames.Token.XsdAttribute, State.Attribute, s_attributeSubelements, s_attributeAttributes,
443/* AttributeGroup */ new XsdEntry( SchemaNames.Token.xsdAttributeGroup, State.AttributeGroup, s_attributeGroupSubelements, s_attributeGroupAttributes,
447/* AttributeGroupRef */ new XsdEntry( SchemaNames.Token.xsdAttributeGroup, State.AttributeGroupRef, s_annotatedSubelements, s_attributeGroupRefAttributes,
451/* AnyAttribute */ new XsdEntry( SchemaNames.Token.XsdAnyAttribute, State.AnyAttribute, s_annotatedSubelements, s_anyAttributeAttributes,
455/* Group */ new XsdEntry( SchemaNames.Token.XsdGroup, State.Group, s_groupSubelements, s_groupAttributes,
459/* GroupRef */ new XsdEntry( SchemaNames.Token.XsdGroup, State.GroupRef, s_annotatedSubelements, s_groupRefAttributes,
463/* All */ new XsdEntry( SchemaNames.Token.XsdAll, State.All, s_allSubelements, s_particleAttributes,
467/* Choice */ new XsdEntry( SchemaNames.Token.XsdChoice, State.Choice, s_choiceSequenceSubelements, s_particleAttributes,
471/* Sequence */ new XsdEntry( SchemaNames.Token.XsdSequence, State.Sequence, s_choiceSequenceSubelements, s_particleAttributes,
475/* Any */ new XsdEntry( SchemaNames.Token.XsdAny, State.Any, s_annotatedSubelements, s_anyAttributes,
479/* Notation */ new XsdEntry( SchemaNames.Token.XsdNotation, State.Notation, s_annotatedSubelements, s_notationAttributes,
483/* SimpleType */ new XsdEntry( SchemaNames.Token.XsdSimpleType, State.SimpleType, s_simpleTypeSubelements, s_simpleTypeAttributes,
487/* ComplexType */ new XsdEntry( SchemaNames.Token.XsdComplexType, State.ComplexType, s_complexTypeSubelements, s_complexTypeAttributes,
491/* ComplexContent */ new XsdEntry( SchemaNames.Token.XsdComplexContent, State.ComplexContent, s_complexContentSubelements, s_complexContentAttributes,
495/* ComplexContentRestriction */ new XsdEntry( SchemaNames.Token.XsdComplexContentRestriction, State.ComplexContentRestriction, s_complexContentRestrictionSubelements, s_complexContentRestrictionAttributes,
499/* ComplexContentExtension */ new XsdEntry( SchemaNames.Token.XsdComplexContentExtension, State.ComplexContentExtension, s_complexContentExtensionSubelements, s_complexContentExtensionAttributes,
503/* SimpleContent */ new XsdEntry( SchemaNames.Token.XsdSimpleContent, State.SimpleContent, s_simpleContentSubelements, s_simpleContentAttributes,
507/* SimpleContentExtension */ new XsdEntry( SchemaNames.Token.XsdSimpleContentExtension, State.SimpleContentExtension, s_simpleContentExtensionSubelements, s_simpleContentExtensionAttributes,
511/* SimpleContentRestriction */ new XsdEntry( SchemaNames.Token.XsdSimpleContentRestriction, State.SimpleContentRestriction, s_simpleContentRestrictionSubelements, s_simpleContentRestrictionAttributes,
515/* SimpleTypeUnion */ new XsdEntry( SchemaNames.Token.XsdSimpleTypeUnion, State.SimpleTypeUnion, s_simpleTypeUnionSubelements, s_simpleTypeUnionAttributes,
519/* SimpleTypeList */ new XsdEntry( SchemaNames.Token.XsdSimpleTypeList, State.SimpleTypeList, s_simpleTypeListSubelements, s_simpleTypeListAttributes,
523/* SimpleTypeRestriction */ new XsdEntry( SchemaNames.Token.XsdSimpleTypeRestriction, State.SimpleTypeRestriction, s_simpleTypeRestrictionSubelements, s_simpleTypeRestrictionAttributes,
527/* Unique */ new XsdEntry( SchemaNames.Token.XsdUnique, State.Unique, s_identityConstraintSubelements, s_identityConstraintAttributes,
531/* Key */ new XsdEntry( SchemaNames.Token.XsdKey, State.Key, s_identityConstraintSubelements, s_identityConstraintAttributes,
535/* KeyRef */ new XsdEntry( SchemaNames.Token.XsdKeyref, State.KeyRef, s_identityConstraintSubelements, s_identityConstraintAttributes,
539/* Selector */ new XsdEntry( SchemaNames.Token.XsdSelector, State.Selector, s_annotatedSubelements, s_selectorAttributes,
543/* Field */ new XsdEntry( SchemaNames.Token.XsdField, State.Field, s_annotatedSubelements, s_fieldAttributes,
547/* MinExclusive */ new XsdEntry( SchemaNames.Token.XsdMinExclusive, State.MinExclusive, s_annotatedSubelements, s_facetAttributes,
551/* MinInclusive */ new XsdEntry( SchemaNames.Token.XsdMinInclusive, State.MinInclusive, s_annotatedSubelements, s_facetAttributes,
555/* MaxExclusive */ new XsdEntry( SchemaNames.Token.XsdMaxExclusive, State.MaxExclusive, s_annotatedSubelements, s_facetAttributes,
559/* MaxInclusive */ new XsdEntry( SchemaNames.Token.XsdMaxInclusive, State.MaxInclusive, s_annotatedSubelements, s_facetAttributes,
563/* TotalDigits */ new XsdEntry( SchemaNames.Token.XsdTotalDigits, State.TotalDigits, s_annotatedSubelements, s_facetAttributes,
567/* FractionDigits */ new XsdEntry( SchemaNames.Token.XsdFractionDigits, State.FractionDigits, s_annotatedSubelements, s_facetAttributes,
571/* Length */ new XsdEntry( SchemaNames.Token.XsdLength, State.Length, s_annotatedSubelements, s_facetAttributes,
575/* MinLength */ new XsdEntry( SchemaNames.Token.XsdMinLength, State.MinLength, s_annotatedSubelements, s_facetAttributes,
579/* MaxLength */ new XsdEntry( SchemaNames.Token.XsdMaxLength, State.MaxLength, s_annotatedSubelements, s_facetAttributes,
583/* Enumeration */ new XsdEntry( SchemaNames.Token.XsdEnumeration, State.Enumeration, s_annotatedSubelements, s_facetAttributes,
587/* Pattern */ new XsdEntry( SchemaNames.Token.XsdPattern, State.Pattern, s_annotatedSubelements, s_facetAttributes,
591/* WhiteSpace */ new XsdEntry( SchemaNames.Token.XsdWhitespace, State.WhiteSpace, s_annotatedSubelements, s_facetAttributes,
595/* AppInfo */ new XsdEntry( SchemaNames.Token.XsdAppInfo, State.AppInfo, null, s_appinfoAttributes,
599/* Documentation */ new XsdEntry( SchemaNames.Token.XsdDocumentation, State.Documentation, null, s_documentationAttributes,
603/* Redefine */ new XsdEntry( SchemaNames.Token.XsdRedefine, State.Redefine, s_redefineSubelements, s_redefineAttributes,
854private XmlSchemaObject GetContainer(State state)
859case State.Root:
861case State.Schema:
864case State.Annotation:
867case State.Include:
870case State.Import:
873case State.Element:
876case State.Attribute:
879case State.AttributeGroup:
882case State.AttributeGroupRef:
885case State.AnyAttribute:
888case State.Group:
891case State.GroupRef:
894case State.All:
897case State.Choice:
900case State.Sequence:
903case State.Any:
906case State.Notation:
909case State.SimpleType:
912case State.ComplexType:
915case State.ComplexContent:
918case State.ComplexContentExtension:
921case State.ComplexContentRestriction:
924case State.SimpleContent:
927case State.SimpleContentExtension:
930case State.SimpleContentRestriction:
933case State.SimpleTypeUnion:
936case State.SimpleTypeList:
939case State.SimpleTypeRestriction:
942case State.Unique:
943case State.Key:
944case State.KeyRef:
947case State.Selector:
948case State.Field:
951case State.MinExclusive:
952case State.MinInclusive:
953case State.MaxExclusive:
954case State.MaxInclusive:
955case State.TotalDigits:
956case State.FractionDigits:
957case State.Length:
958case State.MinLength:
959case State.MaxLength:
960case State.Enumeration:
961case State.Pattern:
962case State.WhiteSpace:
965case State.AppInfo:
968case State.Documentation:
971case State.Redefine:
981private void SetContainer(State state, object container)
985case State.Root:
987case State.Schema:
989case State.Annotation:
992case State.Include:
995case State.Import:
998case State.Element:
1001case State.Attribute:
1004case State.AttributeGroup:
1007case State.AttributeGroupRef:
1010case State.AnyAttribute:
1013case State.Group:
1016case State.GroupRef:
1019case State.All:
1022case State.Choice:
1025case State.Sequence:
1028case State.Any:
1031case State.Notation:
1034case State.SimpleType:
1037case State.ComplexType:
1040case State.ComplexContent:
1043case State.ComplexContentExtension:
1046case State.ComplexContentRestriction:
1049case State.SimpleContent:
1052case State.SimpleContentExtension:
1055case State.SimpleContentRestriction:
1058case State.SimpleTypeUnion:
1061case State.SimpleTypeList:
1064case State.SimpleTypeRestriction:
1067case State.Unique:
1068case State.Key:
1069case State.KeyRef:
1072case State.Selector:
1073case State.Field:
1076case State.MinExclusive:
1077case State.MinInclusive:
1078case State.MaxExclusive:
1079case State.MaxInclusive:
1080case State.TotalDigits:
1081case State.FractionDigits:
1082case State.Length:
1083case State.MinLength:
1084case State.MaxLength:
1085case State.Enumeration:
1086case State.Pattern:
1087case State.WhiteSpace:
1090case State.AppInfo:
1093case State.Documentation:
1096case State.Redefine: