12 private SchemaNames schemaNames;
20 private bool isCompiled;
28 private bool compileAll;
30 private SchemaInfo cachedCompiledInfo;
48 private object internalSyncObject;
50 internal object InternalSyncObject
54 if (internalSyncObject ==
null)
56 object value =
new object();
59 return internalSyncObject;
88 return compilationSettings;
92 compilationSettings = value;
106 if (elements ==
null)
120 if (attributes ==
null)
134 if (schemaTypes ==
null)
146 if (substitutionGroups ==
null)
150 return substitutionGroups;
154 internal Hashtable SchemaLocations => schemaLocations;
156 internal XmlSchemaObjectTable TypeExtensions
160 if (typeExtensions ==
null)
162 typeExtensions =
new XmlSchemaObjectTable();
164 return typeExtensions;
168 internal SchemaInfo CompiledInfo => cachedCompiledInfo;
170 internal XmlReaderSettings ReaderSettings => readerSettings;
174 internal bool CompileAll => compileAll;
183 if (eventHandler ==
null)
185 eventHandler = internalEventHandler;
191 if (eventHandler ==
null)
193 eventHandler = internalEventHandler;
209 if (nameTable ==
null)
213 this.nameTable = nameTable;
218 internalEventHandler = InternalValidationCallback;
219 eventHandler = internalEventHandler;
221 if (readerSettings.GetXmlResolver() ==
null)
224 readerSettings.IsXmlResolverSet =
false;
229 cachedCompiledInfo =
new SchemaInfo();
241 if (schemaUri ==
null || schemaUri.Length == 0)
245 if (targetNamespace !=
null)
247 targetNamespace = XmlComplianceUtil.CDataNormalize(targetNamespace);
250 lock (InternalSyncObject)
252 XmlResolver xmlResolver = readerSettings.GetXmlResolver();
253 if (xmlResolver ==
null)
258 if (!IsSchemaLoaded(schemaUri2, targetNamespace, out schema))
263 schema =
Add(targetNamespace, ParseSchema(targetNamespace, xmlReader));
264 while (xmlReader.
Read())
286 if (schemaDocument ==
null)
290 if (targetNamespace !=
null)
292 targetNamespace = XmlComplianceUtil.CDataNormalize(targetNamespace);
294 lock (InternalSyncObject)
298 if (IsSchemaLoaded(schemaUri, targetNamespace, out schema))
303 SetDtdProcessing(schemaDocument);
304 schema =
Add(targetNamespace, ParseSchema(targetNamespace, schemaDocument));
322 bool lockTaken =
false;
323 bool lockTaken2 =
false;
343 CopyFromCompiledSet(schemas);
351 text = value.TargetNamespace;
356 if (!this.schemas.ContainsKey(value.SchemaId) && FindSchemaByNSAndUrl(value.BaseUri, text,
null) ==
null)
358 XmlSchema xmlSchema2 =
Add(value.TargetNamespace, value);
359 if (xmlSchema2 ==
null)
370 this.schemas.
Remove(value2.SchemaId);
371 schemaLocations.
Remove(value2.BaseUri);
401 lock (InternalSyncObject)
418 return Remove(schema, forceCompile:
true);
428 if (schemaToRemove ==
null)
436 lock (InternalSyncObject)
441 hashtable.
Add(GetTargetNamespace(schemaToRemove), schemaToRemove);
442 for (
int i = 0; i < schemaToRemove.ImportedNamespaces.
Count; i++)
444 string text = (string)schemaToRemove.ImportedNamespaces[i];
445 if (hashtable[text] ==
null)
447 hashtable.
Add(text, text);
452 for (
int j = 0; j < schemas.
Count; j++)
455 if (xmlSchema != schemaToRemove && !schemaToRemove.ImportedSchemas.
Contains(xmlSchema))
457 arrayList.
Add(xmlSchema);
461 for (
int k = 0; k < arrayList.
Count; k++)
464 if (xmlSchema.ImportedNamespaces.
Count > 0)
466 foreach (
string key
in hashtable.
Keys)
468 if (xmlSchema.ImportedNamespaces.
Contains(key))
476 Remove(schemaToRemove, forceCompile:
true);
477 for (
int l = 0; l < schemaToRemove.ImportedSchemas.
Count; l++)
480 Remove(schema, forceCompile:
true);
494 if (targetNamespace ==
null)
496 targetNamespace =
string.Empty;
498 return targetNamespaces[targetNamespace] !=
null;
521 if (schemas.
Count == 0)
524 cachedCompiledInfo =
new SchemaInfo();
530 lock (InternalSyncObject)
534 Compiler compiler =
new Compiler(nameTable, eventHandler, schemaForSchema, compilationSettings);
535 SchemaInfo schemaInfo =
new SchemaInfo();
539 compiler.ImportAllCompiledSchemas(
this);
543 XmlSchema buildInSchema = Preprocessor.GetBuildInSchema();
544 for (i = 0; i < schemas.
Count; i++)
548 if (!xmlSchema.IsPreprocessed)
554 if (xmlSchema.IsCompiledBySet)
560 if (xmlSchema == buildInSchema)
562 compiler.Prepare(xmlSchema, cleanup:
false);
566 compiler.Prepare(xmlSchema, cleanup:
true);
568 isCompiled = compiler.Execute(
this, schemaInfo);
573 schemaInfo.Add(cachedCompiledInfo, eventHandler);
576 cachedCompiledInfo = schemaInfo;
581 if (i == schemas.
Count)
585 for (
int num = i; num >= 0; num--)
588 if (xmlSchema2 == Preprocessor.GetBuildInSchema())
594 xmlSchema2.IsCompiledBySet = isCompiled;
622 lock (InternalSyncObject)
624 RemoveSchemaFromGlobalTables(schema);
625 RemoveSchemaFromCaches(schema);
626 if (schema.BaseUri !=
null)
628 schemaLocations.
Remove(schema.BaseUri);
630 string targetNamespace = GetTargetNamespace(schema);
633 targetNamespaces.
Remove(targetNamespace);
637 if (schema.ErrorCount != 0)
643 if (targetNamespaces[targetNamespace] ==
null)
645 targetNamespaces.
Add(targetNamespace, targetNamespace);
647 if (schemaForSchema ==
null && targetNamespace ==
"http://www.w3.org/2001/XMLSchema" && schema.
SchemaTypes[DatatypeImplementation.QnAnyType] !=
null)
649 schemaForSchema = schema;
651 for (
int i = 0; i < schema.ImportedSchemas.Count; i++)
656 schemas.
Add(xmlSchema.SchemaId, xmlSchema);
658 targetNamespace = GetTargetNamespace(xmlSchema);
659 if (targetNamespaces[targetNamespace] ==
null)
661 targetNamespaces.
Add(targetNamespace, targetNamespace);
663 if (schemaForSchema ==
null && targetNamespace ==
"http://www.w3.org/2001/XMLSchema" && schema.
SchemaTypes[DatatypeImplementation.QnAnyType] !=
null)
665 schemaForSchema = schema;
683 if (index < 0 || index > schemas.Length - 1)
687 this.schemas.Values.CopyTo(schemas, index);
703 if (targetNamespace ==
null)
705 targetNamespace =
string.Empty;
707 for (
int i = 0; i < schemas.
Count; i++)
710 if (GetTargetNamespace(xmlSchema) == targetNamespace)
712 arrayList.
Add(xmlSchema);
720 if (schema ==
null || schema.ErrorCount != 0)
724 if (PreprocessSchema(ref schema, targetNamespace))
726 AddSchemaToSet(schema);
733 internal void Add(
string targetNamespace, XmlReader reader,
Hashtable validatedNamespaces)
737 throw new ArgumentNullException(
"reader");
739 if (targetNamespace ==
null)
741 targetNamespace =
string.Empty;
743 if (validatedNamespaces[targetNamespace] !=
null)
745 if (FindSchemaByNSAndUrl(
new Uri(reader.BaseURI,
UriKind.RelativeOrAbsolute), targetNamespace,
null) ==
null)
747 throw new XmlSchemaException(
"Sch_ComponentAlreadySeenForNS", targetNamespace);
752 if (IsSchemaLoaded(
new Uri(reader.BaseURI,
UriKind.RelativeOrAbsolute), targetNamespace, out XmlSchema schema))
756 schema = ParseSchema(targetNamespace, reader);
758 schemaLocations.
CopyTo(array, 0);
759 Add(targetNamespace, schema);
760 if (schema.ImportedSchemas.Count <= 0)
768 if (num < schema.ImportedSchemas.Count)
770 XmlSchema xmlSchema = (XmlSchema)schema.ImportedSchemas[num];
771 text = xmlSchema.TargetNamespace;
776 if (validatedNamespaces[text] !=
null && FindSchemaByNSAndUrl(xmlSchema.BaseUri, text, array) ==
null)
786 throw new XmlSchemaException(
"Sch_ComponentAlreadySeenForNS", text);
790 internal XmlSchema FindSchemaByNSAndUrl(Uri schemaUri,
string ns,
DictionaryEntry[] locationsTable)
792 if (schemaUri ==
null || schemaUri.OriginalString.Length == 0)
796 XmlSchema xmlSchema =
null;
797 if (locationsTable ==
null)
799 xmlSchema = (XmlSchema)schemaLocations[schemaUri];
803 for (
int i = 0; i < locationsTable.Length; i++)
805 if (schemaUri.Equals(locationsTable[i].Key))
807 xmlSchema = (XmlSchema)locationsTable[i].Value;
812 if (xmlSchema !=
null)
814 string a = (xmlSchema.TargetNamespace ==
null) ?
string.
Empty : xmlSchema.TargetNamespace;
819 if (a ==
string.
Empty)
821 ChameleonKey key =
new ChameleonKey(ns, xmlSchema);
822 xmlSchema = (XmlSchema)chameleonSchemas[key];
832 private void SetDtdProcessing(XmlReader reader)
834 if (reader.Settings !=
null)
836 readerSettings.
DtdProcessing = reader.Settings.DtdProcessing;
839 XmlTextReader xmlTextReader = reader as XmlTextReader;
840 if (xmlTextReader !=
null)
846 private void AddSchemaToSet(XmlSchema schema)
848 schemas.
Add(schema.SchemaId, schema);
849 string targetNamespace = GetTargetNamespace(schema);
850 if (targetNamespaces[targetNamespace] ==
null)
852 targetNamespaces.
Add(targetNamespace, targetNamespace);
854 if (schemaForSchema ==
null && targetNamespace ==
"http://www.w3.org/2001/XMLSchema" && schema.SchemaTypes[DatatypeImplementation.QnAnyType] !=
null)
856 schemaForSchema = schema;
858 for (
int i = 0; i < schema.ImportedSchemas.Count; i++)
860 XmlSchema xmlSchema = (XmlSchema)schema.ImportedSchemas[i];
863 schemas.
Add(xmlSchema.SchemaId, xmlSchema);
865 targetNamespace = GetTargetNamespace(xmlSchema);
866 if (targetNamespaces[targetNamespace] ==
null)
868 targetNamespaces.
Add(targetNamespace, targetNamespace);
870 if (schemaForSchema ==
null && targetNamespace ==
"http://www.w3.org/2001/XMLSchema" && schema.SchemaTypes[DatatypeImplementation.QnAnyType] !=
null)
872 schemaForSchema = schema;
877 private void ProcessNewSubstitutionGroups(XmlSchemaObjectTable substitutionGroupsTable,
bool resolve)
879 foreach (XmlSchemaSubstitutionGroup value
in substitutionGroupsTable.Values)
883 ResolveSubstitutionGroup(value, substitutionGroupsTable);
885 XmlQualifiedName examplar = value.Examplar;
886 XmlSchemaSubstitutionGroup xmlSchemaSubstitutionGroup2 = (XmlSchemaSubstitutionGroup)substitutionGroups[examplar];
887 if (xmlSchemaSubstitutionGroup2 !=
null)
889 for (
int i = 0; i < value.Members.Count; i++)
891 if (!xmlSchemaSubstitutionGroup2.Members.Contains(value.Members[i]))
893 xmlSchemaSubstitutionGroup2.Members.Add(value.Members[i]);
899 AddToTable(substitutionGroups, examplar, value);
904 private void ResolveSubstitutionGroup(XmlSchemaSubstitutionGroup substitutionGroup, XmlSchemaObjectTable substTable)
907 XmlSchemaElement xmlSchemaElement = (XmlSchemaElement)elements[substitutionGroup.Examplar];
908 if (substitutionGroup.Members.Contains(xmlSchemaElement))
912 for (
int i = 0; i < substitutionGroup.Members.Count; i++)
914 XmlSchemaElement xmlSchemaElement2 = (XmlSchemaElement)substitutionGroup.Members[i];
915 XmlSchemaSubstitutionGroup xmlSchemaSubstitutionGroup = (XmlSchemaSubstitutionGroup)substTable[xmlSchemaElement2.QualifiedName];
916 if (xmlSchemaSubstitutionGroup ==
null)
920 ResolveSubstitutionGroup(xmlSchemaSubstitutionGroup, substTable);
921 for (
int j = 0; j < xmlSchemaSubstitutionGroup.Members.Count; j++)
923 XmlSchemaElement xmlSchemaElement3 = (XmlSchemaElement)xmlSchemaSubstitutionGroup.Members[j];
924 if (xmlSchemaElement3 != xmlSchemaElement2)
930 list.Add(xmlSchemaElement3);
936 for (
int k = 0; k < list.Count; k++)
938 substitutionGroup.Members.Add(list[k]);
941 substitutionGroup.Members.Add(xmlSchemaElement);
944 internal XmlSchema
Remove(XmlSchema schema,
bool forceCompile)
948 throw new ArgumentNullException(
"schema");
950 lock (InternalSyncObject)
956 RemoveSchemaFromGlobalTables(schema);
957 RemoveSchemaFromCaches(schema);
959 schemas.
Remove(schema.SchemaId);
960 if (schema.BaseUri !=
null)
962 schemaLocations.
Remove(schema.BaseUri);
964 string targetNamespace = GetTargetNamespace(schema);
967 targetNamespaces.
Remove(targetNamespace);
980 private void ClearTables()
985 SubstitutionGroups.Clear();
986 TypeExtensions.Clear();
989 internal bool PreprocessSchema(ref XmlSchema schema,
string targetNamespace)
991 Preprocessor preprocessor =
new Preprocessor(nameTable, GetSchemaNames(nameTable), eventHandler, compilationSettings);
992 preprocessor.XmlResolver = readerSettings.GetXmlResolver_CheckConfig();
993 preprocessor.ReaderSettings = readerSettings;
994 preprocessor.SchemaLocations = schemaLocations;
995 preprocessor.ChameleonSchemas = chameleonSchemas;
996 bool result = preprocessor.Execute(schema, targetNamespace, loadExternals:
true);
997 schema = preprocessor.RootSchema;
1001 internal XmlSchema ParseSchema(
string targetNamespace, XmlReader reader)
1003 XmlNameTable nt = reader.NameTable;
1004 SchemaNames schemaNames = GetSchemaNames(nt);
1005 Parser parser =
new Parser(SchemaType.XSD, nt, schemaNames, eventHandler);
1006 parser.XmlResolver = readerSettings.GetXmlResolver_CheckConfig();
1009 SchemaType schemaType = parser.Parse(reader, targetNamespace);
1011 catch (XmlSchemaException e)
1016 return parser.XmlSchema;
1019 internal void CopyFromCompiledSet(
XmlSchemaSet otherSet)
1021 SortedList sortedSchemas = otherSet.SortedSchemas;
1022 bool flag = (schemas.
Count == 0) ?
true :
false;
1024 SchemaInfo schemaInfo =
new SchemaInfo();
1025 for (
int i = 0; i < sortedSchemas.
Count; i++)
1027 XmlSchema xmlSchema = (XmlSchema)sortedSchemas.
GetByIndex(i);
1028 Uri baseUri = xmlSchema.BaseUri;
1029 if (schemas.
ContainsKey(xmlSchema.SchemaId) || (baseUri !=
null && baseUri.OriginalString.Length != 0 && schemaLocations[baseUri] !=
null))
1031 arrayList.
Add(xmlSchema);
1034 schemas.
Add(xmlSchema.SchemaId, xmlSchema);
1035 if (baseUri !=
null && baseUri.OriginalString.Length != 0)
1037 schemaLocations.
Add(baseUri, xmlSchema);
1039 string targetNamespace = GetTargetNamespace(xmlSchema);
1040 if (targetNamespaces[targetNamespace] ==
null)
1042 targetNamespaces.
Add(targetNamespace, targetNamespace);
1046 foreach (XmlSchemaElement value
in otherSet.GlobalElements.Values)
1048 if (AddToTable(elements, value.QualifiedName, value))
1054 foreach (XmlSchemaAttribute value2
in otherSet.GlobalAttributes.Values)
1056 if (AddToTable(attributes, value2.QualifiedName, value2))
1062 foreach (XmlSchemaType value3
in otherSet.GlobalTypes.Values)
1064 if (AddToTable(schemaTypes, value3.QualifiedName, value3))
1070 ProcessNewSubstitutionGroups(otherSet.SubstitutionGroups, resolve:
false);
1071 schemaInfo.Add(cachedCompiledInfo, eventHandler);
1072 schemaInfo.Add(otherSet.CompiledInfo, eventHandler);
1073 cachedCompiledInfo = schemaInfo;
1081 foreach (XmlSchema value4
in sortedSchemas.
Values)
1085 Remove(value4, forceCompile:
false);
1088 foreach (XmlSchemaElement value5
in otherSet.GlobalElements.Values)
1090 if (!arrayList.
Contains((XmlSchema)value5.Parent))
1092 elements.Remove(value5.QualifiedName);
1095 foreach (XmlSchemaAttribute value6
in otherSet.GlobalAttributes.Values)
1097 if (!arrayList.
Contains((XmlSchema)value6.Parent))
1099 attributes.Remove(value6.QualifiedName);
1102 foreach (XmlSchemaType value7
in otherSet.GlobalTypes.Values)
1104 if (!arrayList.
Contains((XmlSchema)value7.Parent))
1106 schemaTypes.Remove(value7.QualifiedName);
1113 return readerSettings.GetXmlResolver_CheckConfig();
1118 return eventHandler;
1121 internal SchemaNames GetSchemaNames(XmlNameTable nt)
1123 if (nameTable != nt)
1125 return new SchemaNames(nt);
1127 if (schemaNames ==
null)
1129 schemaNames =
new SchemaNames(nameTable);
1134 internal bool IsSchemaLoaded(Uri schemaUri,
string targetNamespace, out XmlSchema schema)
1137 if (targetNamespace ==
null)
1139 targetNamespace =
string.Empty;
1141 if (GetSchemaByUri(schemaUri, out schema))
1143 if (!schemas.
ContainsKey(schema.SchemaId) || (targetNamespace.Length != 0 && !(targetNamespace == schema.TargetNamespace)))
1145 if (schema.TargetNamespace ==
null)
1147 XmlSchema xmlSchema = FindSchemaByNSAndUrl(schemaUri, targetNamespace,
null);
1148 if (xmlSchema !=
null && schemas.
ContainsKey(xmlSchema.SchemaId))
1154 schema =
Add(targetNamespace, schema);
1157 else if (targetNamespace.Length != 0 && targetNamespace != schema.TargetNamespace)
1159 SendValidationEvent(
new XmlSchemaException(
"Sch_MismatchTargetNamespaceEx",
new string[2]
1162 schema.TargetNamespace
1168 AddSchemaToSet(schema);
1176 internal bool GetSchemaByUri(Uri schemaUri, out XmlSchema schema)
1179 if (schemaUri ==
null || schemaUri.OriginalString.Length == 0)
1183 schema = (XmlSchema)schemaLocations[schemaUri];
1191 internal string GetTargetNamespace(XmlSchema schema)
1193 if (schema.TargetNamespace !=
null)
1195 return schema.TargetNamespace;
1197 return string.Empty;
1200 private void RemoveSchemaFromCaches(XmlSchema schema)
1203 schema.GetExternalSchemasList(list, schema);
1204 for (
int i = 0; i < list.Count; i++)
1206 if (list[i].BaseUri !=
null && list[i].BaseUri.OriginalString.Length != 0)
1208 schemaLocations.
Remove(list[i].BaseUri);
1212 foreach (ChameleonKey item
in keys)
1214 if (item.chameleonLocation.Equals(list[i].BaseUri) && (item.originalSchema ==
null || item.originalSchema == list[i]))
1216 arrayList.
Add(item);
1219 for (
int j = 0; j < arrayList.
Count; j++)
1221 chameleonSchemas.
Remove(arrayList[j]);
1226 private void RemoveSchemaFromGlobalTables(XmlSchema schema)
1228 if (schemas.
Count != 0)
1231 foreach (XmlSchemaElement value
in schema.Elements.Values)
1233 XmlSchemaElement xmlSchemaElement2 = (XmlSchemaElement)elements[value.QualifiedName];
1234 if (xmlSchemaElement2 == value)
1236 elements.Remove(value.QualifiedName);
1239 foreach (XmlSchemaAttribute value2
in schema.Attributes.Values)
1241 XmlSchemaAttribute xmlSchemaAttribute2 = (XmlSchemaAttribute)attributes[value2.QualifiedName];
1242 if (xmlSchemaAttribute2 == value2)
1244 attributes.Remove(value2.QualifiedName);
1247 foreach (XmlSchemaType value3
in schema.SchemaTypes.Values)
1249 XmlSchemaType xmlSchemaType2 = (XmlSchemaType)schemaTypes[value3.QualifiedName];
1250 if (xmlSchemaType2 == value3)
1252 schemaTypes.Remove(value3.QualifiedName);
1258 private bool AddToTable(XmlSchemaObjectTable table, XmlQualifiedName qname, XmlSchemaObject item)
1260 if (qname.Name.Length == 0)
1264 XmlSchemaObject xmlSchemaObject = table[qname];
1265 if (xmlSchemaObject !=
null)
1267 if (xmlSchemaObject == item || xmlSchemaObject.SourceUri == item.SourceUri)
1271 string res =
string.Empty;
1272 if (item is XmlSchemaComplexType)
1274 res =
"Sch_DupComplexType";
1276 else if (item is XmlSchemaSimpleType)
1278 res =
"Sch_DupSimpleType";
1280 else if (item is XmlSchemaElement)
1282 res =
"Sch_DupGlobalElement";
1284 else if (item is XmlSchemaAttribute)
1286 if (qname.Namespace ==
"http://www.w3.org/XML/1998/namespace")
1288 XmlSchema buildInSchema = Preprocessor.GetBuildInSchema();
1289 XmlSchemaObject xmlSchemaObject2 = buildInSchema.Attributes[qname];
1290 if (xmlSchemaObject == xmlSchemaObject2)
1292 table.Insert(qname, item);
1295 if (item == xmlSchemaObject2)
1300 res =
"Sch_DupGlobalAttribute";
1302 SendValidationEvent(
new XmlSchemaException(res, qname.ToString()),
XmlSeverityType.Error);
1305 table.Add(qname, item);
1309 private void VerifyTables()
1311 if (elements ==
null)
1313 elements =
new XmlSchemaObjectTable();
1315 if (attributes ==
null)
1317 attributes =
new XmlSchemaObjectTable();
1319 if (schemaTypes ==
null)
1321 schemaTypes =
new XmlSchemaObjectTable();
1323 if (substitutionGroups ==
null)
1325 substitutionGroups =
new XmlSchemaObjectTable();
1329 private void InternalValidationCallback(
object sender, ValidationEventArgs e)
1337 private void SendValidationEvent(XmlSchemaException e,
XmlSeverityType severity)
1339 if (eventHandler !=
null)
1341 eventHandler(
this,
new ValidationEventArgs(e, severity));
UriKind
Defines the kinds of T:System.Uris for the M:System.Uri.IsWellFormedUriString(System....
abstract string BaseURI
When overridden in a derived class, gets the base URI of the current node.
XmlSchemaSet()
Initializes a new instance of the T:System.Xml.Schema.XmlSchemaSet class.
virtual ICollection Values
Gets the values in a T:System.Collections.SortedList object.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
virtual void Add(object key, object value)
Adds an element with the specified key and value into the T:System.Collections.Hashtable.
virtual int Count
Gets the number of elements contained in a T:System.Collections.SortedList object.
bool RemoveRecursive(XmlSchema schemaToRemove)
Removes the specified XML Schema definition language (XSD) schema and all the schemas it imports from...
string TargetNamespace
Gets or sets the Uniform Resource Identifier (URI) of the schema target namespace.
static bool TryEnter(object obj)
Attempts to acquire an exclusive lock on the specified object.
XmlSeverityType
Represents the severity of the validation event.
virtual int Count
Gets the number of elements actually contained in the T:System.Collections.ArrayList.
The exception that is thrown when the value of an argument is outside the allowable range of values a...
Provides a mechanism that synchronizes access to objects.
void Add(XmlSchemaSet schemas)
Adds all the XML Schema definition language (XSD) schemas in the given T:System.Xml....
Resolves external XML resources named by a Uniform Resource Identifier (URI).
int Count
Gets the number of logical XML Schema definition language (XSD) schemas in the T:System....
XmlSchema Add(string targetNamespace, XmlReader schemaDocument)
Adds the XML Schema definition language (XSD) schema contained in the T:System.Xml....
bool Contains(XmlSchema schema)
Indicates whether the specified XML Schema definition language (XSD) T:System.Xml....
Specifies a set of features to support on the T:System.Xml.XmlReader object created by the Overload:S...
ICollection Schemas()
Returns a collection of all the XML Schema definition language (XSD) schemas in the T:System....
bool Contains(string targetNamespace)
Indicates whether an XML Schema definition language (XSD) schema with the specified target namespace ...
XmlSchemaObjectTable GlobalElements
Gets all the global elements in all the XML Schema definition language (XSD) schemas in the T:System....
static Delegate Remove(Delegate source, Delegate value)
Removes the last occurrence of the invocation list of a delegate from the invocation list of another ...
static Delegate Combine(Delegate a, Delegate b)
Concatenates the invocation lists of two delegates.
DtdProcessing DtdProcessing
Gets or sets a value that determines the processing of DTDs.
Provides schema compilation options for the T:System.Xml.Schema.XmlSchemaSet class This class cannot ...
virtual void Add(object key, object value)
Adds an element with the specified key and value to a T:System.Collections.SortedList object.
virtual void Remove(object key)
Removes the element with the specified key from a T:System.Collections.SortedList object.
Represents a reader that provides fast, noncached, forward-only access to XML data....
void Compile()
Compiles the XML Schema definition language (XSD) schemas added to the T:System.Xml....
static void Enter(object obj)
Acquires an exclusive lock on the specified object.
virtual object GetByIndex(int index)
Gets the value at the specified index of a T:System.Collections.SortedList object.
Implements a single-threaded T:System.Xml.XmlNameTable.
virtual void CopyTo(Array array, int arrayIndex)
Copies the T:System.Collections.Hashtable elements to a one-dimensional T:System.Array instance at th...
virtual bool Contains(object item)
Determines whether an element is in the T:System.Collections.ArrayList.
XmlSchema Reprocess(XmlSchema schema)
Reprocesses an XML Schema definition language (XSD) schema that already exists in the T:System....
static int CompareExchange(ref int location1, int value, int comparand)
Compares two 32-bit signed integers for equality and, if they are equal, replaces the first value.
XmlSchema Remove(XmlSchema schema)
Removes the specified XML Schema definition language (XSD) schema from the T:System....
Represents a collection of key/value pairs that are organized based on the hash code of the key....
virtual ICollection Keys
Gets an T:System.Collections.ICollection containing the keys in the T:System.Collections....
Resolves external XML resources named by a Uniform Resource Identifier (URI).
XmlNameTable NameTable
Gets or sets the T:System.Xml.XmlNameTable used for atomized string comparisons.
virtual bool ContainsKey(object key)
Determines whether a T:System.Collections.SortedList object contains a specific key.
Provides the collections for contained elements in the T:System.Xml.Schema.XmlSchema class (for examp...
Represents a collection of key/value pairs that are sorted by the keys and are accessible by key and ...
static void Exit(object obj)
Releases an exclusive lock on the specified object.
Represents a delegate, which is a data structure that refers to a static method or to a class instanc...
virtual Uri ResolveUri(Uri baseUri, string relativeUri)
When overridden in a derived class, resolves the absolute URI from the base and relative URIs.
Table of atomized string objects.
virtual int Add(object value)
Adds an object to the end of the T:System.Collections.ArrayList.
XmlSchemaObjectTable GlobalAttributes
Gets all the global attributes in all the XML Schema definition language (XSD) schemas in the T:Syste...
The exception that is thrown when one of the arguments provided to a method is not valid.
abstract bool Read()
When overridden in a derived class, reads the next node from the stream.
XmlSchema Add(XmlSchema schema)
Adds the given T:System.Xml.Schema.XmlSchema to the T:System.Xml.Schema.XmlSchemaSet.
bool IsCompiled
Gets a value that indicates whether the XML Schema definition language (XSD) schemas in the T:System....
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
XmlSchemaSet(XmlNameTable nameTable)
Initializes a new instance of the T:System.Xml.Schema.XmlSchemaSet class with the specified T:System....
XmlSchemaObjectTable SchemaTypes
Gets the post-schema-compilation value of all schema types in the schema.
XmlResolver XmlResolver
Sets the T:System.Xml.XmlResolver used to resolve namespaces or locations referenced in include and i...
virtual void Remove(object key)
Removes the element with the specified key from the T:System.Collections.Hashtable.
An in-memory representation of an XML Schema, as specified in the World Wide Web Consortium (W3C) XML...
void CopyTo(XmlSchema[] schemas, int index)
Copies all the T:System.Xml.Schema.XmlSchema objects from the T:System.Xml.Schema....
XmlResolver XmlResolver
Sets the T:System.Xml.XmlResolver used to access external documents.
ValidationEventHandler ValidationEventHandler
Specifies an event handler for receiving information about XML Schema definition language (XSD) schem...
ICollection Schemas(string targetNamespace)
Returns a collection of all the XML Schema definition language (XSD) schemas in the T:System....
DtdProcessing
Specifies the options for processing DTDs. The T:System.Xml.DtdProcessing enumeration is used by the ...
Returns detailed information about the schema exception.
Defines size, enumerators, and synchronization methods for all nongeneric collections.
Provides an object representation of a uniform resource identifier (URI) and easy access to the parts...
XmlSchemaCompilationSettings CompilationSettings
Gets or sets the T:System.Xml.Schema.XmlSchemaCompilationSettings for the T:System....
Defines a dictionary key/value pair that can be set or retrieved.
XmlSchemaObjectTable GlobalTypes
Gets all of the global simple and complex types in all the XML Schema definition language (XSD) schem...
Provides atomic operations for variables that are shared by multiple threads.
static XmlReader Create(string inputUri)
Creates a new T:System.Xml.XmlReader instance with specified URI.
virtual bool ContainsValue(object value)
Determines whether a T:System.Collections.SortedList object contains a specific value.
virtual void Close()
When overridden in a derived class, changes the P:System.Xml.XmlReader.ReadState to F:System....
virtual int Count
Gets the number of key/value pairs contained in the T:System.Collections.Hashtable.
static bool Yield()
Causes the calling thread to yield execution to another thread that is ready to run on the current pr...
XmlSchema Add(string targetNamespace, string schemaUri)
Adds the XML Schema definition language (XSD) schema at the URL specified to the T:System....
Implements the T:System.Collections.IList interface using an array whose size is dynamically increase...
Contains a cache of XML Schema definition language (XSD) schemas.
Creates and controls a thread, sets its priority, and gets its status.