Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XmlSchemaSet.cs
Go to the documentation of this file.
5
6namespace System.Xml.Schema;
7
8public class XmlSchemaSet
9{
10 private readonly XmlNameTable _nameTable;
11
13
14 private readonly SortedList _schemas;
15
16 private readonly ValidationEventHandler _internalEventHandler;
17
18 private ValidationEventHandler _eventHandler;
19
20 private bool _isCompiled;
21
22 private readonly Hashtable _schemaLocations;
23
24 private readonly Hashtable _chameleonSchemas;
25
26 private readonly Hashtable _targetNamespaces;
27
28 private bool _compileAll;
29
31
33
35
37
39
41
43
45
47
48 private object _internalSyncObject;
49
50 internal object InternalSyncObject
51 {
52 get
53 {
54 if (_internalSyncObject == null)
55 {
56 object value = new object();
58 }
60 }
61 }
62
64
65 public bool IsCompiled => _isCompiled;
66
68 {
69 set
70 {
72 }
73 }
74
76 {
77 get
78 {
80 }
81 set
82 {
84 }
85 }
86
87 public int Count => _schemas.Count;
88
90 {
91 get
92 {
93 if (elements == null)
94 {
96 }
97 return elements;
98 }
99 }
100
102 {
103 get
104 {
105 if (attributes == null)
106 {
108 }
109 return attributes;
110 }
111 }
112
114 {
115 get
116 {
117 if (schemaTypes == null)
118 {
120 }
121 return schemaTypes;
122 }
123 }
124
126 {
127 get
128 {
129 if (substitutionGroups == null)
130 {
132 }
133 return substitutionGroups;
134 }
135 }
136
138
139 internal XmlSchemaObjectTable TypeExtensions
140 {
141 get
142 {
143 if (_typeExtensions == null)
144 {
146 }
147 return _typeExtensions;
148 }
149 }
150
152
154
156
157 public event ValidationEventHandler ValidationEventHandler
158 {
159 add
160 {
163 if (_eventHandler == null)
164 {
166 }
167 }
168 remove
169 {
171 if (_eventHandler == null)
172 {
174 }
175 }
176 }
177
179 : this(new NameTable())
180 {
181 }
182
208
209 public XmlSchema? Add(string? targetNamespace, string schemaUri)
210 {
211 if (schemaUri == null || schemaUri.Length == 0)
212 {
213 throw new ArgumentNullException("schemaUri");
214 }
215 if (targetNamespace != null)
216 {
218 }
219 XmlSchema schema = null;
221 {
223 if (xmlResolver == null)
224 {
226 }
227 Uri schemaUri2 = xmlResolver.ResolveUri(null, schemaUri);
229 {
230 return schema;
231 }
233 try
234 {
236 while (xmlReader.Read())
237 {
238 }
239 return schema;
240 }
241 finally
242 {
243 xmlReader.Close();
244 }
245 }
246 }
247
273
274 public void Add(XmlSchemaSet schemas)
275 {
276 if (schemas == null)
277 {
278 throw new ArgumentNullException("schemas");
279 }
280 if (this == schemas)
281 {
282 return;
283 }
284 bool lockTaken = false;
285 bool lockTaken2 = false;
286 try
287 {
288 SpinWait spinWait = default(SpinWait);
289 while (true)
290 {
292 if (lockTaken)
293 {
295 if (lockTaken2)
296 {
297 break;
298 }
300 lockTaken = false;
301 spinWait.SpinOnce();
302 }
303 }
304 if (schemas.IsCompiled)
305 {
306 CopyFromCompiledSet(schemas);
307 return;
308 }
309 bool flag = false;
310 string text = null;
311 foreach (XmlSchema value in schemas.SortedSchemas.Values)
312 {
313 text = value.TargetNamespace;
314 if (text == null)
315 {
316 text = string.Empty;
317 }
318 if (!_schemas.ContainsKey(value.SchemaId) && FindSchemaByNSAndUrl(value.BaseUri, text, null) == null)
319 {
320 XmlSchema xmlSchema2 = Add(value.TargetNamespace, value);
321 if (xmlSchema2 == null)
322 {
323 flag = true;
324 break;
325 }
326 }
327 }
328 if (!flag)
329 {
330 return;
331 }
332 foreach (XmlSchema value2 in schemas.SortedSchemas.Values)
333 {
334 _schemas.Remove(value2.SchemaId);
336 }
337 }
338 finally
339 {
340 if (lockTaken)
341 {
343 }
344 if (lockTaken2)
345 {
347 }
348 }
349 }
350
352 {
353 if (schema == null)
354 {
355 throw new ArgumentNullException("schema");
356 }
358 {
359 if (_schemas.ContainsKey(schema.SchemaId))
360 {
361 return schema;
362 }
363 return Add(schema.TargetNamespace, schema);
364 }
365 }
366
368 {
369 return Remove(schema, forceCompile: true);
370 }
371
373 {
374 if (schemaToRemove == null)
375 {
376 throw new ArgumentNullException("schemaToRemove");
377 }
378 if (!_schemas.ContainsKey(schemaToRemove.SchemaId))
379 {
380 return false;
381 }
383 {
384 if (_schemas.ContainsKey(schemaToRemove.SchemaId))
385 {
386 Hashtable hashtable = new Hashtable();
388 for (int i = 0; i < schemaToRemove.ImportedNamespaces.Count; i++)
389 {
390 string text = (string)schemaToRemove.ImportedNamespaces[i];
391 if (hashtable[text] == null)
392 {
393 hashtable.Add(text, text);
394 }
395 }
398 for (int j = 0; j < _schemas.Count; j++)
399 {
401 if (xmlSchema != schemaToRemove && !schemaToRemove.ImportedSchemas.Contains(xmlSchema))
402 {
404 }
405 }
406 xmlSchema = null;
407 for (int k = 0; k < arrayList.Count; k++)
408 {
410 if (xmlSchema.ImportedNamespaces.Count <= 0)
411 {
412 continue;
413 }
414 foreach (string key in hashtable.Keys)
415 {
416 if (xmlSchema.ImportedNamespaces.Contains(key))
417 {
419 return false;
420 }
421 }
422 }
424 for (int l = 0; l < schemaToRemove.ImportedSchemas.Count; l++)
425 {
426 XmlSchema schema = (XmlSchema)schemaToRemove.ImportedSchemas[l];
427 Remove(schema, forceCompile: true);
428 }
429 return true;
430 }
431 }
432 return false;
433 }
434
435 public bool Contains(string? targetNamespace)
436 {
437 if (targetNamespace == null)
438 {
439 targetNamespace = string.Empty;
440 }
441 return _targetNamespaces[targetNamespace] != null;
442 }
443
445 {
446 if (schema == null)
447 {
448 throw new ArgumentNullException("schema");
449 }
451 }
452
453 public void Compile()
454 {
455 if (_isCompiled)
456 {
457 return;
458 }
459 if (_schemas.Count == 0)
460 {
461 ClearTables();
463 _isCompiled = true;
464 _compileAll = false;
465 return;
466 }
468 {
469 if (_isCompiled)
470 {
471 return;
472 }
474 SchemaInfo schemaInfo = new SchemaInfo();
475 int i = 0;
476 if (!_compileAll)
477 {
478 compiler.ImportAllCompiledSchemas(this);
479 }
480 try
481 {
483 for (i = 0; i < _schemas.Count; i++)
484 {
487 if (!xmlSchema.IsPreprocessed)
488 {
490 _isCompiled = false;
491 return;
492 }
493 if (xmlSchema.IsCompiledBySet)
494 {
495 if (!_compileAll)
496 {
497 continue;
498 }
500 {
501 compiler.Prepare(xmlSchema, cleanup: false);
502 continue;
503 }
504 }
505 compiler.Prepare(xmlSchema, cleanup: true);
506 }
507 _isCompiled = compiler.Execute(this, schemaInfo);
508 if (_isCompiled)
509 {
510 if (!_compileAll)
511 {
513 }
514 _compileAll = false;
515 _cachedCompiledInfo = schemaInfo;
516 }
517 }
518 finally
519 {
520 if (i == _schemas.Count)
521 {
522 i--;
523 }
524 for (int num = i; num >= 0; num--)
525 {
528 {
530 }
531 else
532 {
535 }
536 }
537 }
538 }
539 }
540
542 {
543 if (schema == null)
544 {
545 throw new ArgumentNullException("schema");
546 }
547 if (!_schemas.ContainsKey(schema.SchemaId))
548 {
550 }
551 XmlSchema result = schema;
553 {
556 if (schema.BaseUri != null)
557 {
559 }
561 if (Schemas(targetNamespace).Count == 0)
562 {
564 }
565 _isCompiled = false;
566 _compileAll = true;
567 if (schema.ErrorCount != 0)
568 {
569 return result;
570 }
571 if (PreprocessSchema(ref schema, schema.TargetNamespace))
572 {
574 {
576 }
577 if (_schemaForSchema == null && targetNamespace == "http://www.w3.org/2001/XMLSchema" && schema.SchemaTypes[DatatypeImplementation.QnAnyType] != null)
578 {
580 }
581 for (int i = 0; i < schema.ImportedSchemas.Count; i++)
582 {
583 XmlSchema xmlSchema = (XmlSchema)schema.ImportedSchemas[i];
584 if (!_schemas.ContainsKey(xmlSchema.SchemaId))
585 {
586 _schemas.Add(xmlSchema.SchemaId, xmlSchema);
587 }
590 {
592 }
593 if (_schemaForSchema == null && targetNamespace == "http://www.w3.org/2001/XMLSchema" && schema.SchemaTypes[DatatypeImplementation.QnAnyType] != null)
594 {
596 }
597 }
598 return schema;
599 }
600 return result;
601 }
602 }
603
604 public void CopyTo(XmlSchema[] schemas, int index)
605 {
606 if (schemas == null)
607 {
608 throw new ArgumentNullException("schemas");
609 }
610 if (index < 0 || index > schemas.Length - 1)
611 {
612 throw new ArgumentOutOfRangeException("index");
613 }
614 _schemas.Values.CopyTo(schemas, index);
615 }
616
618 {
619 return _schemas.Values;
620 }
621
623 {
625 if (targetNamespace == null)
626 {
627 targetNamespace = string.Empty;
628 }
629 for (int i = 0; i < _schemas.Count; i++)
630 {
633 {
635 }
636 }
637 return arrayList;
638 }
639
641 {
642 if (schema == null || schema.ErrorCount != 0)
643 {
644 return null;
645 }
647 {
649 _isCompiled = false;
650 return schema;
651 }
652 return null;
653 }
654
656 {
657 if (reader == null)
658 {
659 throw new ArgumentNullException("reader");
660 }
661 if (targetNamespace == null)
662 {
663 targetNamespace = string.Empty;
664 }
666 {
667 if (FindSchemaByNSAndUrl(new Uri(reader.BaseURI, UriKind.RelativeOrAbsolute), targetNamespace, null) == null)
668 {
670 }
671 }
672 else
673 {
674 if (IsSchemaLoaded(new Uri(reader.BaseURI, UriKind.RelativeOrAbsolute), targetNamespace, out var schema))
675 {
676 return;
677 }
682 if (schema.ImportedSchemas.Count <= 0)
683 {
684 return;
685 }
686 for (int i = 0; i < schema.ImportedSchemas.Count; i++)
687 {
688 XmlSchema xmlSchema = (XmlSchema)schema.ImportedSchemas[i];
689 string text = xmlSchema.TargetNamespace;
690 if (text == null)
691 {
692 text = string.Empty;
693 }
694 if (validatedNamespaces[text] != null && FindSchemaByNSAndUrl(xmlSchema.BaseUri, text, array) == null)
695 {
698 }
699 }
700 }
701 }
702
704 {
705 if (schemaUri == null || schemaUri.OriginalString.Length == 0)
706 {
707 return null;
708 }
709 XmlSchema xmlSchema = null;
710 if (locationsTable == null)
711 {
713 }
714 else
715 {
716 for (int i = 0; i < locationsTable.Length; i++)
717 {
718 if (schemaUri.Equals(locationsTable[i].Key))
719 {
721 break;
722 }
723 }
724 }
725 if (xmlSchema != null)
726 {
727 string text = ((xmlSchema.TargetNamespace == null) ? string.Empty : xmlSchema.TargetNamespace);
728 if (text == ns)
729 {
730 return xmlSchema;
731 }
732 if (text.Length == 0)
733 {
736 }
737 else
738 {
739 xmlSchema = null;
740 }
741 }
742 return xmlSchema;
743 }
744
745 private void SetDtdProcessing(XmlReader reader)
746 {
747 if (reader.Settings != null)
748 {
749 _readerSettings.DtdProcessing = reader.Settings.DtdProcessing;
750 }
751 else if (reader is XmlTextReader xmlTextReader)
752 {
754 }
755 }
756
758 {
759 _schemas.Add(schema.SchemaId, schema);
762 {
764 }
765 if (_schemaForSchema == null && targetNamespace == "http://www.w3.org/2001/XMLSchema" && schema.SchemaTypes[DatatypeImplementation.QnAnyType] != null)
766 {
768 }
769 for (int i = 0; i < schema.ImportedSchemas.Count; i++)
770 {
771 XmlSchema xmlSchema = (XmlSchema)schema.ImportedSchemas[i];
772 if (!_schemas.ContainsKey(xmlSchema.SchemaId))
773 {
774 _schemas.Add(xmlSchema.SchemaId, xmlSchema);
775 }
778 {
780 }
781 if (_schemaForSchema == null && targetNamespace == "http://www.w3.org/2001/XMLSchema" && schema.SchemaTypes[DatatypeImplementation.QnAnyType] != null)
782 {
784 }
785 }
786 }
787
789 {
791 {
792 if (resolve)
793 {
795 }
798 if (xmlSchemaSubstitutionGroup2 != null)
799 {
800 for (int i = 0; i < value.Members.Count; i++)
801 {
802 if (!xmlSchemaSubstitutionGroup2.Members.Contains(value.Members[i]))
803 {
804 xmlSchemaSubstitutionGroup2.Members.Add(value.Members[i]);
805 }
806 }
807 }
808 else
809 {
811 }
812 }
813 }
814
816 {
820 {
821 return;
822 }
823 for (int i = 0; i < substitutionGroup.Members.Count; i++)
824 {
827 if (xmlSchemaSubstitutionGroup == null)
828 {
829 continue;
830 }
832 for (int j = 0; j < xmlSchemaSubstitutionGroup.Members.Count; j++)
833 {
836 {
837 if (list == null)
838 {
840 }
842 }
843 }
844 }
845 if (list != null)
846 {
847 for (int k = 0; k < list.Count; k++)
848 {
849 substitutionGroup.Members.Add(list[k]);
850 }
851 }
853 }
854
856 {
857 if (schema == null)
858 {
859 throw new ArgumentNullException("schema");
860 }
862 {
863 if (_schemas.ContainsKey(schema.SchemaId))
864 {
865 if (forceCompile)
866 {
869 }
870 _schemas.Remove(schema.SchemaId);
871 if (schema.BaseUri != null)
872 {
874 }
876 if (Schemas(targetNamespace).Count == 0)
877 {
879 }
880 if (forceCompile)
881 {
882 _isCompiled = false;
883 _compileAll = true;
884 }
885 return schema;
886 }
887 }
888 return null;
889 }
890
891 private void ClearTables()
892 {
897 TypeExtensions.Clear();
898 }
899
911
913 {
918 try
919 {
920 SchemaType schemaType = parser.Parse(reader, targetNamespace);
921 }
922 catch (XmlSchemaException e)
923 {
925 return null;
926 }
927 return parser.XmlSchema;
928 }
929
931 {
932 SortedList sortedSchemas = otherSet.SortedSchemas;
933 bool flag = _schemas.Count == 0;
935 SchemaInfo schemaInfo = new SchemaInfo();
936 for (int i = 0; i < sortedSchemas.Count; i++)
937 {
939 Uri baseUri = xmlSchema.BaseUri;
940 if (_schemas.ContainsKey(xmlSchema.SchemaId) || (baseUri != null && baseUri.OriginalString.Length != 0 && _schemaLocations[baseUri] != null))
941 {
943 continue;
944 }
945 _schemas.Add(xmlSchema.SchemaId, xmlSchema);
946 if (baseUri != null && baseUri.OriginalString.Length != 0)
947 {
949 }
952 {
954 }
955 }
956 VerifyTables();
957 foreach (XmlSchemaElement value in otherSet.GlobalElements.Values)
958 {
959 if (AddToTable(elements, value.QualifiedName, value))
960 {
961 continue;
962 }
963 goto IL_026e;
964 }
965 foreach (XmlSchemaAttribute value2 in otherSet.GlobalAttributes.Values)
966 {
967 if (AddToTable(attributes, value2.QualifiedName, value2))
968 {
969 continue;
970 }
971 goto IL_026e;
972 }
973 foreach (XmlSchemaType value3 in otherSet.GlobalTypes.Values)
974 {
975 if (AddToTable(schemaTypes, value3.QualifiedName, value3))
976 {
977 continue;
978 }
979 goto IL_026e;
980 }
981 ProcessNewSubstitutionGroups(otherSet.SubstitutionGroups, resolve: false);
983 schemaInfo.Add(otherSet.CompiledInfo, _eventHandler);
984 _cachedCompiledInfo = schemaInfo;
985 if (flag)
986 {
987 _isCompiled = true;
988 _compileAll = false;
989 }
990 return;
991 IL_026e:
993 {
995 {
996 Remove(value4, forceCompile: false);
997 }
998 }
999 foreach (XmlSchemaElement value5 in otherSet.GlobalElements.Values)
1000 {
1001 if (!arrayList.Contains((XmlSchema)value5.Parent))
1002 {
1003 elements.Remove(value5.QualifiedName);
1004 }
1005 }
1006 foreach (XmlSchemaAttribute value6 in otherSet.GlobalAttributes.Values)
1007 {
1008 if (!arrayList.Contains((XmlSchema)value6.Parent))
1009 {
1010 attributes.Remove(value6.QualifiedName);
1011 }
1012 }
1013 foreach (XmlSchemaType value7 in otherSet.GlobalTypes.Values)
1014 {
1015 if (!arrayList.Contains((XmlSchema)value7.Parent))
1016 {
1017 schemaTypes.Remove(value7.QualifiedName);
1018 }
1019 }
1020 }
1021
1026
1027 internal ValidationEventHandler GetEventHandler()
1028 {
1029 return _eventHandler;
1030 }
1031
1033 {
1034 if (_nameTable != nt)
1035 {
1036 return new SchemaNames(nt);
1037 }
1038 if (_schemaNames == null)
1039 {
1041 }
1042 return _schemaNames;
1043 }
1044
1046 {
1047 schema = null;
1048 if (targetNamespace == null)
1049 {
1050 targetNamespace = string.Empty;
1051 }
1053 {
1054 if (!_schemas.ContainsKey(schema.SchemaId) || (targetNamespace.Length != 0 && !(targetNamespace == schema.TargetNamespace)))
1055 {
1056 if (schema.TargetNamespace == null)
1057 {
1059 if (xmlSchema != null && _schemas.ContainsKey(xmlSchema.SchemaId))
1060 {
1061 schema = xmlSchema;
1062 }
1063 else
1064 {
1066 }
1067 }
1068 else if (targetNamespace.Length != 0 && targetNamespace != schema.TargetNamespace)
1069 {
1070 SendValidationEvent(new XmlSchemaException(System.SR.Sch_MismatchTargetNamespaceEx, new string[2] { targetNamespace, schema.TargetNamespace }), XmlSeverityType.Error);
1071 schema = null;
1072 }
1073 else
1074 {
1076 }
1077 }
1078 return true;
1079 }
1080 return false;
1081 }
1082
1084 {
1085 schema = null;
1086 if (schemaUri == null || schemaUri.OriginalString.Length == 0)
1087 {
1088 return false;
1089 }
1091 if (schema != null)
1092 {
1093 return true;
1094 }
1095 return false;
1096 }
1097
1099 {
1100 if (schema.TargetNamespace != null)
1101 {
1102 return schema.TargetNamespace;
1103 }
1104 return string.Empty;
1105 }
1106
1108 {
1110 schema.GetExternalSchemasList(list, schema);
1111 for (int i = 0; i < list.Count; i++)
1112 {
1113 if (list[i].BaseUri != null && list[i].BaseUri.OriginalString.Length != 0)
1114 {
1115 _schemaLocations.Remove(list[i].BaseUri);
1116 }
1119 foreach (ChameleonKey item in keys)
1120 {
1121 if (item.chameleonLocation.Equals(list[i].BaseUri) && (item.originalSchema == null || item.originalSchema == list[i]))
1122 {
1124 }
1125 }
1126 for (int j = 0; j < arrayList.Count; j++)
1127 {
1129 }
1130 }
1131 }
1132
1134 {
1135 if (_schemas.Count == 0)
1136 {
1137 return;
1138 }
1139 VerifyTables();
1140 foreach (XmlSchemaElement value in schema.Elements.Values)
1141 {
1143 if (xmlSchemaElement2 == value)
1144 {
1145 elements.Remove(value.QualifiedName);
1146 }
1147 }
1148 foreach (XmlSchemaAttribute value2 in schema.Attributes.Values)
1149 {
1152 {
1153 attributes.Remove(value2.QualifiedName);
1154 }
1155 }
1156 foreach (XmlSchemaType value3 in schema.SchemaTypes.Values)
1157 {
1159 if (xmlSchemaType2 == value3)
1160 {
1161 schemaTypes.Remove(value3.QualifiedName);
1162 }
1163 }
1164 }
1165
1167 {
1168 if (qname.Name.Length == 0)
1169 {
1170 return true;
1171 }
1172 XmlSchemaObject xmlSchemaObject = table[qname];
1173 if (xmlSchemaObject != null)
1174 {
1175 if (xmlSchemaObject == item || xmlSchemaObject.SourceUri == item.SourceUri)
1176 {
1177 return true;
1178 }
1179 string res = string.Empty;
1181 {
1183 }
1184 else if (item is XmlSchemaSimpleType)
1185 {
1187 }
1188 else if (item is XmlSchemaElement)
1189 {
1191 }
1192 else if (item is XmlSchemaAttribute)
1193 {
1194 if (qname.Namespace == "http://www.w3.org/XML/1998/namespace")
1195 {
1199 {
1200 table.Insert(qname, item);
1201 return true;
1202 }
1203 if (item == xmlSchemaObject2)
1204 {
1205 return true;
1206 }
1207 }
1209 }
1211 return false;
1212 }
1213 table.Add(qname, item);
1214 return true;
1215 }
1216
1217 private void VerifyTables()
1218 {
1219 if (elements == null)
1220 {
1222 }
1223 if (attributes == null)
1224 {
1226 }
1227 if (schemaTypes == null)
1228 {
1230 }
1231 if (substitutionGroups == null)
1232 {
1234 }
1235 }
1236
1238 {
1239 if (e.Severity == XmlSeverityType.Error)
1240 {
1241 throw e.Exception;
1242 }
1243 }
1244
1246 {
1247 if (_eventHandler != null)
1248 {
1250 return;
1251 }
1252 throw e;
1253 }
1254}
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)
void Add(TKey key, TValue value)
virtual void CopyTo(Array array, int arrayIndex)
Definition Hashtable.cs:811
virtual void Remove(object key)
virtual ICollection Keys
Definition Hashtable.cs:532
virtual void Add(object key, object? value)
Definition Hashtable.cs:676
virtual ? object GetByIndex(int index)
virtual void Add(object key, object? value)
virtual bool ContainsValue(object? value)
virtual void Remove(object key)
virtual bool ContainsKey(object key)
virtual ICollection Values
static ? Delegate Remove(Delegate? source, Delegate? value)
Definition Delegate.cs:463
static ? Delegate Combine(Delegate? a, Delegate? b)
Definition Delegate.cs:379
static string Sch_DupComplexType
Definition SR.cs:528
static string Sch_SchemaNotPreprocessed
Definition SR.cs:1160
static string Sch_ComponentAlreadySeenForNS
Definition SR.cs:1164
static string Sch_DupGlobalAttribute
Definition SR.cs:524
static string Sch_DupSimpleType
Definition SR.cs:526
static string Sch_DupGlobalElement
Definition SR.cs:522
static string Sch_SchemaNotRemoved
Definition SR.cs:1162
static string Sch_MismatchTargetNamespaceEx
Definition SR.cs:600
static string Sch_SchemaDoesNotExist
Definition SR.cs:1170
Definition SR.cs:7
static int CompareExchange(ref int location1, int value, int comparand)
static void Exit(object obj)
static bool TryEnter(object obj)
Definition Monitor.cs:36
static void Enter(object obj)
string OriginalString
Definition Uri.cs:516
static XmlSchema GetBuildInSchema()
void Add(SchemaInfo sinfo, ValidationEventHandler eventhandler)
void Insert(XmlQualifiedName name, XmlSchemaObject value)
void Add(XmlQualifiedName name, XmlSchemaObject value)
XmlSchema? Add(string? targetNamespace, XmlReader schemaDocument)
readonly XmlReaderSettings _readerSettings
XmlSchema Add(string targetNamespace, XmlSchema schema)
void RemoveSchemaFromGlobalTables(XmlSchema schema)
bool Contains(XmlSchema schema)
XmlSchema Reprocess(XmlSchema schema)
ValidationEventHandler GetEventHandler()
XmlSchema ParseSchema(string targetNamespace, XmlReader reader)
readonly XmlNameTable _nameTable
void CopyTo(XmlSchema[] schemas, int index)
SchemaNames GetSchemaNames(XmlNameTable nt)
XmlSchemaCompilationSettings CompilationSettings
ValidationEventHandler ValidationEventHandler
void SetDtdProcessing(XmlReader reader)
void ResolveSubstitutionGroup(XmlSchemaSubstitutionGroup substitutionGroup, XmlSchemaObjectTable substTable)
string GetTargetNamespace(XmlSchema schema)
bool RemoveRecursive(XmlSchema schemaToRemove)
readonly Hashtable _targetNamespaces
bool PreprocessSchema(ref XmlSchema schema, string targetNamespace)
bool IsSchemaLoaded(Uri schemaUri, string targetNamespace, out XmlSchema schema)
readonly Hashtable _chameleonSchemas
XmlSchemaSet(XmlNameTable nameTable)
bool AddToTable(XmlSchemaObjectTable table, XmlQualifiedName qname, XmlSchemaObject item)
void InternalValidationCallback(object sender, ValidationEventArgs e)
XmlSchemaObjectTable GlobalElements
XmlSchemaCompilationSettings _compilationSettings
XmlSchema? Remove(XmlSchema schema)
bool Contains(string? targetNamespace)
ICollection Schemas(string? targetNamespace)
XmlSchemaObjectTable elements
readonly ValidationEventHandler _internalEventHandler
void RemoveSchemaFromCaches(XmlSchema schema)
XmlSchema? Add(string? targetNamespace, string schemaUri)
XmlSchemaObjectTable attributes
XmlReaderSettings ReaderSettings
XmlSchema Remove(XmlSchema schema, bool forceCompile)
XmlSchema FindSchemaByNSAndUrl(Uri schemaUri, string ns, DictionaryEntry[] locationsTable)
void ProcessNewSubstitutionGroups(XmlSchemaObjectTable substitutionGroupsTable, bool resolve)
void AddSchemaToSet(XmlSchema schema)
XmlSchemaObjectTable SubstitutionGroups
XmlSchemaObjectTable _typeExtensions
readonly Hashtable _schemaLocations
readonly SortedList _schemas
bool GetSchemaByUri(Uri schemaUri, [NotNullWhen(true)] out XmlSchema schema)
XmlSchemaObjectTable schemaTypes
void Add(string targetNamespace, XmlReader reader, Hashtable validatedNamespaces)
ValidationEventHandler _eventHandler
XmlSchema? Add(XmlSchema schema)
void Add(XmlSchemaSet schemas)
void CopyFromCompiledSet(XmlSchemaSet otherSet)
XmlSchemaObjectTable substitutionGroups
XmlSchemaObjectTable GlobalAttributes
XmlSchemaObjectTable GlobalTypes
void SendValidationEvent(XmlSchemaException e, XmlSeverityType severity)
static string CDataNormalize(string value)
virtual ? XmlReaderSettings Settings
Definition XmlReader.cs:60
XmlNameTable NameTable
Definition XmlReader.cs:116
static XmlReader Create(string inputUri)
UriKind
Definition UriKind.cs:4