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

◆ PreprocessComplexType()

void System.Xml.Schema.SchemaCollectionPreprocessor.PreprocessComplexType ( XmlSchemaComplexType complexType,
bool local )
inlineprivate

Definition at line 1215 of file SchemaCollectionPreprocessor.cs.

1216 {
1217 if (local)
1218 {
1219 if (complexType.Name != null)
1220 {
1222 }
1223 }
1224 else
1225 {
1226 if (complexType.Name != null)
1227 {
1229 complexType.SetQualifiedName(new XmlQualifiedName(complexType.Name, _targetNamespace));
1230 }
1231 else
1232 {
1234 }
1235 if (complexType.Block == XmlSchemaDerivationMethod.All)
1236 {
1237 complexType.SetBlockResolved(XmlSchemaDerivationMethod.All);
1238 }
1239 else if (complexType.Block == XmlSchemaDerivationMethod.None)
1240 {
1241 complexType.SetBlockResolved(_blockDefault & (XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.Restriction));
1242 }
1243 else
1244 {
1245 if (((uint)complexType.Block & 0xFFFFFFF9u) != 0)
1246 {
1248 }
1249 complexType.SetBlockResolved(complexType.Block & (XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.Restriction));
1250 }
1251 if (complexType.Final == XmlSchemaDerivationMethod.All)
1252 {
1253 complexType.SetFinalResolved(XmlSchemaDerivationMethod.All);
1254 }
1255 else if (complexType.Final == XmlSchemaDerivationMethod.None)
1256 {
1257 if (_finalDefault == XmlSchemaDerivationMethod.All)
1258 {
1259 complexType.SetFinalResolved(XmlSchemaDerivationMethod.All);
1260 }
1261 else
1262 {
1263 complexType.SetFinalResolved(_finalDefault & (XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.Restriction));
1264 }
1265 }
1266 else
1267 {
1268 if (((uint)complexType.Final & 0xFFFFFFF9u) != 0)
1269 {
1271 }
1272 complexType.SetFinalResolved(complexType.Final & (XmlSchemaDerivationMethod.Extension | XmlSchemaDerivationMethod.Restriction));
1273 }
1274 }
1275 if (complexType.ContentModel != null)
1276 {
1277 SetParent(complexType.ContentModel, complexType);
1278 PreprocessAnnotation(complexType.ContentModel);
1279 if (complexType.Particle == null)
1280 {
1281 _ = complexType.Attributes;
1282 }
1283 if (complexType.ContentModel is XmlSchemaSimpleContent)
1284 {
1285 XmlSchemaSimpleContent xmlSchemaSimpleContent = (XmlSchemaSimpleContent)complexType.ContentModel;
1286 if (xmlSchemaSimpleContent.Content == null)
1287 {
1288 if (complexType.QualifiedName == XmlQualifiedName.Empty)
1289 {
1291 }
1292 else
1293 {
1294 SendValidationEvent(System.SR.Sch_NoRestOrExtQName, complexType.QualifiedName.Name, complexType.QualifiedName.Namespace, complexType);
1295 }
1296 }
1297 else
1298 {
1301 if (xmlSchemaSimpleContent.Content is XmlSchemaSimpleContentExtension)
1302 {
1303 XmlSchemaSimpleContentExtension xmlSchemaSimpleContentExtension = (XmlSchemaSimpleContentExtension)xmlSchemaSimpleContent.Content;
1304 if (xmlSchemaSimpleContentExtension.BaseTypeName.IsEmpty)
1305 {
1307 }
1308 else
1309 {
1311 }
1314 }
1315 else
1316 {
1317 XmlSchemaSimpleContentRestriction xmlSchemaSimpleContentRestriction = (XmlSchemaSimpleContentRestriction)xmlSchemaSimpleContent.Content;
1318 if (xmlSchemaSimpleContentRestriction.BaseTypeName.IsEmpty)
1319 {
1321 }
1322 else
1323 {
1325 }
1326 if (xmlSchemaSimpleContentRestriction.BaseType != null)
1327 {
1330 }
1333 }
1334 }
1336 }
1337 else
1338 {
1339 XmlSchemaComplexContent xmlSchemaComplexContent = (XmlSchemaComplexContent)complexType.ContentModel;
1340 if (xmlSchemaComplexContent.Content == null)
1341 {
1342 if (complexType.QualifiedName == XmlQualifiedName.Empty)
1343 {
1345 }
1346 else
1347 {
1348 SendValidationEvent(System.SR.Sch_NoRestOrExtQName, complexType.QualifiedName.Name, complexType.QualifiedName.Namespace, complexType);
1349 }
1350 }
1351 else
1352 {
1353 if (!xmlSchemaComplexContent.HasMixedAttribute && complexType.IsMixed)
1354 {
1356 }
1359 if (xmlSchemaComplexContent.Content is XmlSchemaComplexContentExtension)
1360 {
1361 XmlSchemaComplexContentExtension xmlSchemaComplexContentExtension = (XmlSchemaComplexContentExtension)xmlSchemaComplexContent.Content;
1362 if (xmlSchemaComplexContentExtension.BaseTypeName.IsEmpty)
1363 {
1365 }
1366 else
1367 {
1369 }
1370 if (xmlSchemaComplexContentExtension.Particle != null)
1371 {
1374 }
1377 }
1378 else
1379 {
1380 XmlSchemaComplexContentRestriction xmlSchemaComplexContentRestriction = (XmlSchemaComplexContentRestriction)xmlSchemaComplexContent.Content;
1381 if (xmlSchemaComplexContentRestriction.BaseTypeName.IsEmpty)
1382 {
1384 }
1385 else
1386 {
1388 }
1389 if (xmlSchemaComplexContentRestriction.Particle != null)
1390 {
1393 }
1396 }
1398 }
1399 }
1400 }
1401 else
1402 {
1403 if (complexType.Particle != null)
1404 {
1407 }
1408 PreprocessAttributes(complexType.Attributes, complexType.AnyAttribute, complexType);
1409 }
1411 }
static string Sch_InvalidComplexTypeBlockValue
Definition SR.cs:516
static string Sch_InvalidComplexTypeFinalValue
Definition SR.cs:518
static string Sch_NoRestOrExtQName
Definition SR.cs:858
static string Sch_MissAttribute
Definition SR.cs:428
static string Sch_NoRestOrExt
Definition SR.cs:860
static string Sch_ForbiddenAttribute
Definition SR.cs:544
static string Sch_MissRequiredAttribute
Definition SR.cs:490
Definition SR.cs:7
void SendValidationEvent(string code, XmlSchemaObject source)
void PreprocessAttributes(XmlSchemaObjectCollection attributes, XmlSchemaAnyAttribute anyAttribute, XmlSchemaObject parent)
void SetParent(XmlSchemaObject child, XmlSchemaObject parent)
void PreprocessSimpleType(XmlSchemaSimpleType simpleType, bool local)
void ValidateQNameAttribute(XmlSchemaObject xso, string attributeName, XmlQualifiedName value)

References System.Xml.Schema.SchemaCollectionPreprocessor._blockDefault, System.Xml.Schema.SchemaCollectionPreprocessor._finalDefault, System.Xml.Schema.SchemaCollectionPreprocessor._targetNamespace, System.Xml.Dictionary, System.Xml.XmlQualifiedName.Empty, System.Xml.Schema.SchemaCollectionPreprocessor.PreprocessAnnotation(), System.Xml.Schema.SchemaCollectionPreprocessor.PreprocessAttributes(), System.Xml.Schema.SchemaCollectionPreprocessor.PreprocessParticle(), System.Xml.Schema.SchemaCollectionPreprocessor.PreprocessSimpleType(), System.SR.Sch_ForbiddenAttribute, System.SR.Sch_InvalidComplexTypeBlockValue, System.SR.Sch_InvalidComplexTypeFinalValue, System.SR.Sch_MissAttribute, System.SR.Sch_MissRequiredAttribute, System.SR.Sch_NoRestOrExt, System.SR.Sch_NoRestOrExtQName, System.Xml.Schema.BaseProcessor.SendValidationEvent(), System.Xml.Schema.SchemaCollectionPreprocessor.SetParent(), System.Xml.Schema.SchemaCollectionPreprocessor.ValidateIdAttribute(), System.Xml.Schema.SchemaCollectionPreprocessor.ValidateNameAttribute(), and System.Xml.Schema.SchemaCollectionPreprocessor.ValidateQNameAttribute().

Referenced by System.Xml.Schema.SchemaCollectionPreprocessor.Preprocess(), System.Xml.Schema.SchemaCollectionPreprocessor.PreprocessElementContent(), and System.Xml.Schema.SchemaCollectionPreprocessor.PreprocessRedefine().