Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ProcessAttributes()

void System.Xml.Schema.XmlSchemaInference.ProcessAttributes ( ref XmlSchemaElement xse,
XmlSchemaType effectiveSchemaType,
bool bCreatingNewType,
XmlSchema parentSchema )
inlinepackage

Definition at line 1019 of file XmlSchemaInference.cs.

1020 {
1021 XmlSchemaObjectCollection xmlSchemaObjectCollection = new XmlSchemaObjectCollection();
1022 XmlSchemaComplexType xmlSchemaComplexType = effectiveSchemaType as XmlSchemaComplexType;
1023 do
1024 {
1025 if (_xtr.NamespaceURI == "http://www.w3.org/2001/XMLSchema")
1026 {
1027 throw new XmlSchemaInferenceException(System.SR.SchInf_schema, 0, 0);
1028 }
1029 if (_xtr.NamespaceURI == "http://www.w3.org/2000/xmlns/")
1030 {
1031 if (_xtr.Prefix == "xmlns")
1032 {
1034 }
1035 continue;
1036 }
1037 if (_xtr.NamespaceURI == "http://www.w3.org/2001/XMLSchema-instance")
1038 {
1039 string localName = _xtr.LocalName;
1040 if (localName == "nil")
1041 {
1042 xse.IsNillable = true;
1043 }
1044 else if (localName != "type" && localName != "schemaLocation" && localName != "noNamespaceSchemaLocation")
1045 {
1046 throw new XmlSchemaInferenceException(System.SR.Sch_NotXsiAttribute, localName);
1047 }
1048 continue;
1049 }
1050 if (xmlSchemaComplexType == null || xmlSchemaComplexType == XmlSchemaComplexType.AnyType)
1051 {
1052 xmlSchemaComplexType = new XmlSchemaComplexType();
1054 }
1055 XmlSchemaAttribute xmlSchemaAttribute = null;
1056 if (effectiveSchemaType != null && effectiveSchemaType.Datatype != null && !xse.SchemaTypeName.IsEmpty)
1057 {
1058 XmlSchemaSimpleContent xmlSchemaSimpleContent = (XmlSchemaSimpleContent)(xmlSchemaComplexType.ContentModel = new XmlSchemaSimpleContent());
1059 XmlSchemaSimpleContentExtension xmlSchemaSimpleContentExtension = (XmlSchemaSimpleContentExtension)(xmlSchemaSimpleContent.Content = new XmlSchemaSimpleContentExtension());
1062 xse.LineNumber = 0;
1063 xse.SchemaTypeName = XmlQualifiedName.Empty;
1064 }
1065 if (xmlSchemaComplexType.ContentModel != null)
1066 {
1069 }
1070 else
1071 {
1073 }
1074 if (xmlSchemaAttribute != null)
1075 {
1077 }
1078 }
1079 while (_xtr.MoveToNextAttribute());
1080 if (!bCreatingNewType && xmlSchemaComplexType != null)
1081 {
1083 }
1084 }
static string Sch_NotXsiAttribute
Definition SR.cs:1168
static string SchInf_schema
Definition SR.cs:1208
Definition SR.cs:7
XmlSchemaAttribute AddAttribute(string localName, string prefix, string childURI, string attrValue, bool bCreatingNewType, XmlSchema parentSchema, XmlSchemaObjectCollection addLocation, XmlSchemaObjectTable compiledAttributes)
void MakeExistingAttributesOptional(XmlSchemaComplexType ct, XmlSchemaObjectCollection attributesInInstance)
readonly XmlNamespaceManager _namespaceManager
XmlSchemaSimpleContentExtension CheckSimpleContentExtension(XmlSchemaComplexType ct)
virtual void AddNamespace(string prefix, string uri)

References System.Xml.Schema.XmlSchemaObjectCollection.Add(), System.Xml.Schema.XmlSchemaComplexType.AnyType, System.Xml.Schema.XmlSchemaComplexType.Attributes, System.Xml.Schema.XmlSchemaSimpleContentExtension.Attributes, System.Xml.Schema.XmlSchemaComplexType.AttributeUses, System.Xml.Schema.XmlSchemaSimpleContent.Content, System.Xml.Schema.XmlSchemaComplexType.ContentModel, System.Xml.Schema.XmlSchemaType.Datatype, System.Xml.XmlQualifiedName.Empty, System.Xml.Schema.XmlSchemaObject.LineNumber, System.Xml.XmlReader.LocalName, System.Xml.XmlReader.MoveToNextAttribute(), System.Xml.XmlReader.NamespaceURI, System.Xml.XmlReader.Prefix, System.SR.Sch_NotXsiAttribute, System.SR.SchInf_schema, and System.Xml.XmlReader.Value.