11 writes to TargetNamespace
System.Private.DataContractSerialization (2)
System\Runtime\Serialization\SchemaHelper.cs (1)
137schema.TargetNamespace = ns;
System\Runtime\Serialization\SchemaImporter.cs (1)
141xsdSchema.TargetNamespace = XmlSchema.Namespace;
System.Private.Xml (9)
System\Xml\Schema\Inference\Infer.cs (2)
341xs.TargetNamespace = childURI; 487xs.TargetNamespace = targetNS;
System\Xml\Schema\Preprocessor.cs (3)
426tempSchema.TargetNamespace = XmlReservedNs.NsXml; 529schema.TargetNamespace = tns = NameTable.Add(tns); 2145chameleonSchema.TargetNamespace = targetNamespace;
System\Xml\Schema\SchemaCollectionpreProcessor.cs (1)
297schema.TargetNamespace = tns = NameTable.Add(tns);
System\Xml\Schema\XsdBuilder.cs (1)
1132builder._schema.TargetNamespace = value;
System\Xml\Serialization\XmlSchemaExporter.cs (1)
269schema.TargetNamespace = string.IsNullOrEmpty(targetNamespace) ? null : targetNamespace;
System\Xml\Serialization\XmlSchemas.cs (1)
737schema.TargetNamespace = ns;
107 references to TargetNamespace
System.Data.Common (2)
System\Data\XMLSchema.cs (2)
676string? ns = schemaRoot.TargetNamespace; 854ds.Namespace = schemaRoot.TargetNamespace;
System.Private.DataContractSerialization (18)
System\Runtime\Serialization\SchemaExporter.cs (4)
570qname = new XmlQualifiedName(((XmlSchemaElement)item).Name, schema.TargetNamespace); 575qname = new XmlQualifiedName(((XmlSchemaType)item).Name, schema.TargetNamespace); 674typeNs = schema.TargetNamespace ?? string.Empty; 794any.Namespace = datasetSchema.TargetNamespace ?? string.Empty;
System\Runtime\Serialization\SchemaHelper.cs (7)
68if (NamespacesEqual(ns, schema.TargetNamespace)) 100if (NamespacesEqual(ns, schema.TargetNamespace)) 122if ((schema.TargetNamespace == null && ns.Length == 0) || ns.Equals(schema.TargetNamespace)) 156if (SchemaHelper.NamespacesEqual(ns, schema.TargetNamespace) || SchemaHelper.NamespacesEqual(ns, Globals.SchemaNamespace) || SchemaHelper.NamespacesEqual(ns, Globals.SchemaInstanceNamespace)) 186if (NamespacesEqual(ns, schema.TargetNamespace)) 221return new XmlQualifiedName(schemaElement.Name, schema.TargetNamespace);
System\Runtime\Serialization\SchemaImporter.cs (7)
78if (schema.TargetNamespace != Globals.SerializationNamespace 79&& schema.TargetNamespace != Globals.SchemaNamespace) 88ImportAnonymousGlobalElement(element, element.QualifiedName, schema.TargetNamespace); 121elementNameList.Add(ImportAnonymousGlobalElement(element, element.QualifiedName, schema.TargetNamespace).XmlName); 250if (schema.TargetNamespace != Globals.SerializationNamespace) 258XmlQualifiedName currentTypeName = new XmlQualifiedName(schemaType.Name, schema.TargetNamespace); 291XmlQualifiedName currentElementName = new XmlQualifiedName(schemaElement.Name, schema.TargetNamespace);
System.Private.Xml (87)
System\Xml\Schema\Inference\Infer.cs (8)
448if (add && childURI != parentSchema.TargetNamespace) 509if (parentSchema != null && childURI == parentSchema.TargetNamespace) 551if (childURI != parentSchema!.TargetNamespace) 580if (childURI == parentSchema.TargetNamespace) 1064if ((el.Name == xtr.LocalName) && (parentSchema!.TargetNamespace == childURI)) 1092if (el.Name == xtr.LocalName && parentSchema!.TargetNamespace == childURI) 1122if (el.Name == xtr.LocalName && parentSchema!.TargetNamespace == childURI) 1156if (parentSchema!.TargetNamespace == childURI)
System\Xml\Schema\Preprocessor.cs (18)
105if (_rootSchema.TargetNamespace != null) 109targetNamespace = _rootSchema.TargetNamespace; 111else if (targetNamespace != _rootSchema.TargetNamespace) 113SendValidationEvent(SR.Sch_MismatchTargetNamespaceEx, targetNamespace, _rootSchema.TargetNamespace, _rootSchema); 498string tns = schema.TargetNamespace ?? string.Empty; 526string? tns = schema.TargetNamespace; 578if (importNS == schema.TargetNamespace) 584if (importNS != externalSchema.TargetNamespace) 586SendValidationEvent(SR.Sch_MismatchTargetNamespaceImport, importNS, externalSchema.TargetNamespace, import); 628if (externalSchema!.TargetNamespace != null) 630if (schema.TargetNamespace != externalSchema.TargetNamespace) 632SendValidationEvent(SR.Sch_MismatchTargetNamespaceInclude, externalSchema.TargetNamespace, schema.TargetNamespace, include); 640Preprocess(externalSchema, schema.TargetNamespace, imports); 836string targetNS = schemaToUpdate.TargetNamespace ?? string.Empty; 1207if (Ref.Equal(_currentSchema!.TargetNamespace, _nsXsi)) 2105value.SetNamespace(_currentSchema.TargetNamespace); //chameleon schemas are clones that have correct targetNamespace set
System\Xml\Schema\SchemaCollectionpreProcessor.cs (21)
283if (schema.TargetNamespace != null && _referenceNamespaces[schema.TargetNamespace] == null) 284_referenceNamespaces.Add(schema.TargetNamespace, schema.TargetNamespace); 294string? tns = schema.TargetNamespace; 310SendValidationEvent(SR.Sch_InvalidNamespace, schema.TargetNamespace, schema); 329if (targetNamespace == null && schema.TargetNamespace != null) 331targetNamespace = schema.TargetNamespace; 333else if (schema.TargetNamespace == null && targetNamespace != null && targetNamespace.Length == 0) 337if (targetNamespace != schema.TargetNamespace) 339SendValidationEvent(SR.Sch_MismatchTargetNamespaceEx, targetNamespace, schema.TargetNamespace, schema); 343if (targetNamespace != schema.TargetNamespace) 345SendValidationEvent(SR.Sch_MismatchTargetNamespaceImport, targetNamespace, schema.TargetNamespace, schema); 349if (schema.TargetNamespace != null) 351if (targetNamespace != schema.TargetNamespace) 353SendValidationEvent(SR.Sch_MismatchTargetNamespaceInclude, targetNamespace, schema.TargetNamespace, schema); 385Preprocess(include.Schema, schema.TargetNamespace, Compositor.Include); 389if (((XmlSchemaImport)include).Namespace == null && schema.TargetNamespace == null) 393else if (((XmlSchemaImport)include).Namespace == schema.TargetNamespace) 401Preprocess(include.Schema, schema.TargetNamespace, Compositor.Include); 880if (_schema!.TargetNamespace == XmlReservedNs.NsXsi)
System\Xml\Schema\SchemaSetCompiler.cs (2)
146tns = schema!.TargetNamespace ?? string.Empty; 668if (parentSchema.TargetNamespace != XmlSchema.Namespace)
System\Xml\Schema\XmlSchemaCollection.cs (3)
168return Add(schema.TargetNamespace, schemaInfo, schema, true, resolver); 206return this[schema.TargetNamespace] != null; 305ns = schema.TargetNamespace ?? string.Empty;
System\Xml\Schema\XmlSchemaSet.cs (11)
341tns = schema!.TargetNamespace ?? string.Empty; 346currentSchema = Add(schema.TargetNamespace, schema); 388return Add(schema.TargetNamespace, schema); 622if (PreprocessSchema(ref schema, schema.TargetNamespace)) 832tns = impSchema.TargetNamespace ?? string.Empty; 870string tns = schema.TargetNamespace ?? string.Empty; 1243if (_schemas.ContainsKey(schema.SchemaId) && (targetNamespace.Length == 0 || targetNamespace == schema.TargetNamespace)) 1247else if (schema.TargetNamespace == null) 1259else if (targetNamespace.Length != 0 && targetNamespace != schema.TargetNamespace) 1261SendValidationEvent(new XmlSchemaException(SR.Sch_MismatchTargetNamespaceEx, new string[] { targetNamespace, schema.TargetNamespace }), XmlSeverityType.Error); 1296return schema.TargetNamespace ?? string.Empty;
System\Xml\Schema\XmlSchemaValidator.cs (2)
327string? tns = schema.TargetNamespace ?? string.Empty; 352tns = impSchema.TargetNamespace ?? string.Empty;
System\Xml\Schema\XsdValidator.cs (1)
152inlineNS = schema.TargetNamespace ?? string.Empty;
System\Xml\Serialization\ImportContext.cs (1)
232string? ns = parent.TargetNamespace;
System\Xml\Serialization\Mappings.cs (4)
1115if (s.TargetNamespace != null && s.TargetNamespace.Length > 0) 1119anyNamespaces.Append(s.TargetNamespace); 1221if (Schema != null && Schema.TargetNamespace == elementNs)
System\Xml\Serialization\SchemaObjectWriter.cs (1)
145return o == null ? "" : ((XmlSchema)o).TargetNamespace;
System\Xml\Serialization\XmlSchemaExporter.cs (6)
457if (schema.TargetNamespace != XmlSchema.Namespace) 460AddSchemaImport(schema.TargetNamespace, ns); 476if (schema.TargetNamespace != XmlSchema.Namespace) 479AddSchemaImport(schema.TargetNamespace, ns); 480if (!serializableMapping.XsiType!.IsEmpty && serializableMapping.XsiType.Namespace == schema.TargetNamespace) 502string? anyNs = serializableMapping.Schema.TargetNamespace;
System\Xml\Serialization\XmlSchemaImporter.cs (2)
404if (type.DerivedFrom == baseName && TypesInUse[type.Name, schema.TargetNamespace] == null) 1079equivalentElement.SubstitutionGroup.Namespace == schema.TargetNamespace &&
System\Xml\Serialization\XmlSchemas.cs (7)
187string? ns = schema.TargetNamespace; 290prep.Execute(schema, schema.TargetNamespace, false); 327IList originals = (IList)SchemaSet.Schemas(schema.TargetNamespace); 417throw new InvalidOperationException(MergeFailedMessage(o, dest, schema.TargetNamespace)); 503ns = ((XmlSchema)tmp).TargetNamespace; 681prep.Execute(schema, schema.TargetNamespace, true); 709ns = ((XmlSchema)source).TargetNamespace;