Definition at line 498 of file XmlSchema.cs.
499 {
502 if (namespaceManager != null)
503 {
505 bool flag = false;
506 if (
base.Namespaces !=
null)
507 {
508 flag =
base.Namespaces.TryLookupPrefix(
"xs",
out var _) ||
base.Namespaces.TryLookupNamespace(
"http://www.w3.org/2001/XMLSchema",
out var _);
509 }
510 if (!flag && namespaceManager.LookupPrefix("http://www.w3.org/2001/XMLSchema") == null && namespaceManager.LookupNamespace("xs") == null)
511 {
513 }
514 foreach (
string item in namespaceManager)
515 {
516 if (
item !=
"xml" &&
item !=
"xmlns")
517 {
519 }
520 }
521 }
522 else if (
base.Namespaces !=
null &&
base.Namespaces.Count > 0)
523 {
524 if (!
base.Namespaces.TryLookupPrefix(
"xs",
out var _) && !
base.Namespaces.TryLookupNamespace(
"http://www.w3.org/2001/XMLSchema",
out var _))
525 {
526 base.Namespaces.Add(
"xs",
"http://www.w3.org/2001/XMLSchema");
527 }
529 }
530 else
531 {
535 {
537 }
538 }
540 }
References System.Xml.Schema.XmlSchema._targetNs, System.Xml.Dictionary, System.item, System.Xml.XmlNamespaceManager.LookupNamespace(), System.Xml.XmlNamespaceManager.LookupPrefix(), and System.writer.