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

◆ ProcessXsiAttributes()

void System.Xml.Schema.XsdValidator.ProcessXsiAttributes ( out XmlQualifiedName xsiType,
out string xsiNil )
inlineprivate

Definition at line 264 of file XsdValidator.cs.

265 {
266 string[] array = null;
267 string text = null;
268 xsiType = XmlQualifiedName.Empty;
269 xsiNil = null;
270 if (reader.Depth == 0)
271 {
272 LoadSchema(string.Empty, null);
273 foreach (string value in _nsManager.GetNamespacesInScope(XmlNamespaceScope.ExcludeXml).Values)
274 {
275 LoadSchema(value, null);
276 }
277 }
279 {
280 do
281 {
283 string localName = reader.LocalName;
284 if (Ref.Equal(namespaceURI, _nsXmlNs))
285 {
286 LoadSchema(reader.Value, null);
288 {
289 _nsManager.AddNamespace((reader.Prefix.Length == 0) ? string.Empty : reader.LocalName, reader.Value);
290 }
291 }
292 else if (Ref.Equal(namespaceURI, _nsXsi))
293 {
294 if (Ref.Equal(localName, _xsiSchemaLocation))
295 {
296 array = (string[])s_dtStringArray.ParseValue(reader.Value, base.NameTable, _nsManager);
297 }
298 else if (Ref.Equal(localName, _xsiNoNamespaceSchemaLocation))
299 {
300 text = reader.Value;
301 }
302 else if (Ref.Equal(localName, _xsiType))
303 {
304 xsiType = (XmlQualifiedName)s_dtQName.ParseValue(reader.Value, base.NameTable, _nsManager);
305 }
306 else if (Ref.Equal(localName, _xsiNil))
307 {
309 }
310 }
311 }
312 while (reader.MoveToNextAttribute());
314 }
315 if (text != null)
316 {
317 LoadSchema(string.Empty, text);
318 }
319 if (array != null)
320 {
321 for (int i = 0; i < array.Length - 1; i += 2)
322 {
323 LoadSchema(array[i], array[i + 1]);
324 }
325 }
326 }
XmlValidatingReaderImpl reader
static readonly XmlSchemaDatatype s_dtStringArray
static readonly XmlSchemaDatatype s_dtQName
XmlNamespaceManager _nsManager
void LoadSchema(string uri, string url)
virtual IDictionary< string, string > GetNamespacesInScope(XmlNamespaceScope scope)
virtual void AddNamespace(string prefix, string uri)

References System.Xml.Schema.XsdValidator._bManageNamespaces, System.Xml.Schema.XsdValidator._nsManager, System.Xml.Schema.XsdValidator._nsXmlNs, System.Xml.Schema.XsdValidator._nsXsi, System.Xml.Schema.XsdValidator._xsiNil, System.Xml.Schema.XsdValidator._xsiNoNamespaceSchemaLocation, System.Xml.Schema.XsdValidator._xsiSchemaLocation, System.Xml.Schema.XsdValidator._xsiType, System.Xml.XmlNamespaceManager.AddNamespace(), System.array, System.Xml.XmlValidatingReaderImpl.Depth, System.Xml.Dictionary, System.Xml.XmlQualifiedName.Empty, System.Xml.Ref.Equal(), System.Xml.XmlNamespaceManager.GetNamespacesInScope(), System.Xml.Schema.XsdValidator.LoadSchema(), System.Xml.XmlValidatingReaderImpl.LocalName, System.Xml.XmlValidatingReaderImpl.MoveToElement(), System.Xml.XmlValidatingReaderImpl.MoveToFirstAttribute(), System.Xml.XmlValidatingReaderImpl.MoveToNextAttribute(), System.Xml.XmlValidatingReaderImpl.NamespaceURI, System.Xml.XmlValidatingReaderImpl.Prefix, System.Xml.Schema.BaseValidator.reader, System.Xml.Schema.XsdValidator.s_dtQName, System.Xml.Schema.XsdValidator.s_dtStringArray, System.text, System.value, System.Xml.XmlValidatingReaderImpl.Value, and System.Collections.IDictionary.Values.

Referenced by System.Xml.Schema.XsdValidator.ProcessElement().