4 writes to Namespace
System.Private.Xml (4)
System\Xml\XmlQualifiedName.cs (4)
35Namespace = ns ?? string.Empty; 124Namespace = ns ?? string.Empty; 130Namespace = ns ?? string.Empty; // Not changing hash since ns is not used to compute hashcode 145Namespace = nameTable.Add(Namespace);
499 references to Namespace
PresentationFramework (14)
MS\Internal\Annotations\Anchoring\DataIdProcessor.cs (2)
202throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), "locatorPart"); 211throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), "locatorPart");
MS\Internal\Annotations\Anchoring\FixedPageProcessor.cs (2)
178throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), "locatorPart"); 189throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), "locatorPart");
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (1)
505throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), "locatorPart");
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (1)
203throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), "locatorPart");
System\Windows\Annotations\Annotation.cs (3)
101if (String.IsNullOrEmpty(annotationType.Namespace)) 137if (String.IsNullOrEmpty(annotationType.Namespace)) 217writer.WriteQualifiedName(_typeName.Name, _typeName.Namespace);
System\Windows\Annotations\LocatorPart.cs (3)
55if (String.IsNullOrEmpty(partType.Namespace)) 366string prefix = namespaceManager.LookupPrefix(this.PartType.Namespace); 393string prefix = namespaceManager.LookupPrefix(this.PartType.Namespace);
System\Windows\Annotations\LocatorPartList.cs (2)
177prefix = writer.LookupPrefix(part.PartType.Namespace); 187writer.WriteStartElement(prefix, part.PartType.Name, part.PartType.Namespace);
System.Data.Common (36)
System\Data\SimpleType.cs (3)
41_ns = (node.QualifiedName != null) ? node.QualifiedName.Namespace : ""; 59if ((ancestor != null) && (ancestor.QualifiedName.Namespace != Keywords.XSDNS)) 66if (content.BaseTypeName.Namespace == Keywords.XSDNS)
System\Data\xmlsaver.cs (5)
1394string tgNamespace = table.TypeName.IsEmpty ? table.Namespace : table.TypeName.Namespace; 1511if ((col.Namespace != (col.Table!.TypeName.IsEmpty ? col.Table.Namespace : col.Table.TypeName.Namespace)) && (col.Namespace.Length != 0)) 1839XmlElement typeSchema = GetSchema(table.TypeName.Namespace); 1840if (string.IsNullOrEmpty(table.TypeName.Namespace)) 1861root.SetAttribute(Keywords.TYPE, NewDiffgramGen.QualifiedName((string)_prefixes[table.TypeName.Namespace]!, table.TypeName.Name));
System\Data\XMLSchema.cs (28)
416DataTable? table = _ds!.Tables.GetTable(XmlConvert.DecodeName(typeName), element.QualifiedName.Namespace); 785if (_refTables.Contains(element.QualifiedName.Namespace + ":" + typeName)) 917if (((el.Name == null) && (el.RefName.Name == table.EncodedTableName && el.RefName.Namespace == table.Namespace)) || 1022if (attributeGroup.RedefinedAttributeGroup != null && attributeGroupRef.RefName == new XmlQualifiedName(attributeGroup.Name, attributeGroupRef.RefName.Namespace)) 1073if (ccExtension.BaseTypeName.Namespace != Keywords.XSDNS) 1448_TableUri = node.QualifiedName.Namespace; 1564_TableUri = node.QualifiedName.Namespace; 1937string _typeNs = isAttr ? attr!.SchemaTypeName.Namespace : el!.SchemaTypeName.Namespace; 1968if (!string.IsNullOrEmpty(typeNode.QualifiedName.Name) && typeNode.QualifiedName.Namespace != Keywords.XSDNS) 1977if ((ancestor != null) && (ancestor.QualifiedName.Namespace != Keywords.XSDNS)) 2216if (attr.SchemaTypeName.Namespace != Keywords.XSDNS) // it is UD Simple Type, can it be? 2226if (!string.IsNullOrEmpty(node.QualifiedName.Name) && node.QualifiedName.Namespace != Keywords.XSDNS) 2272if ((string.IsNullOrEmpty(attrib.QualifiedName.Namespace) && string.IsNullOrEmpty(column._columnUri)) || // backward compatibility :SQL BU DT 310912 2273(string.Equals(attrib.QualifiedName.Namespace, column.Namespace, StringComparison.Ordinal))) 2311column.Namespace = attrib.QualifiedName.Namespace; 2391if (!string.IsNullOrEmpty(((XmlSchemaSimpleType)typeNode).Name) && ((XmlSchemaSimpleType)typeNode).QualifiedName.Namespace != Keywords.XSDNS) 2398simpleTypeNode = (xsdType.XmlBaseType != null && xsdType.XmlBaseType.Namespace != Keywords.XSDNS) ? 2404simpleTypeNode = (xsdType.XmlBaseType != null && xsdType.XmlBaseType.Namespace != Keywords.XSDNS) ? 2458if ((string.IsNullOrEmpty(elem.QualifiedName.Namespace) && string.IsNullOrEmpty(column._columnUri)) || // backward compatibility :SQL BU DT 310912 2459(string.Equals(elem.QualifiedName.Namespace, column.Namespace, StringComparison.Ordinal))) 2499if (!elem.RefName.IsEmpty || elem.QualifiedName.Namespace != table.Namespace) 2501column.Namespace = elem.QualifiedName.Namespace; 2524column.Namespace = elem.QualifiedName.Namespace; 2565string dsNamespace = node.QualifiedName.Namespace; 2644DataTable? tempTable = _ds.Tables.GetTable(XmlConvert.DecodeName(GetInstanceName((XmlSchemaElement)el)), node.QualifiedName.Namespace); 2749if (qualifiedNames[i].Namespace == ns) 2766return qualifiedNames[i].Namespace;
System.Private.DataContractSerialization (164)
System\Runtime\Serialization\ClassDataContract.cs (8)
281string ns = DataContract.GetXmlName(childType).Namespace; 628Namespace = dictionary.Add(XmlName.Namespace); 685Namespace = dictionary.Add(XmlName.Namespace); 982membersInHierarchy.Add(new Member(member, XmlName!.Namespace, baseTypeIndex)); 991membersInHierarchy.Add(new Member(member, currContract.XmlName!.Namespace, baseTypeIndex)); 1151ThrowInvalidDataContractException(SR.Format(SR.ValueTypeCannotHaveBaseType, XmlName!.Name, XmlName.Namespace, _baseContract.XmlName!.Name, _baseContract.XmlName.Namespace)); 1365boundClassContract.XmlName = CreateQualifiedName(DataContract.ExpandGenericParameters(XmlConvert.DecodeName(xmlName.Name), new GenericNameProvider(DataContract.GetClrTypeFullName(UnderlyingType), genericParams)), xmlName.Namespace);
System\Runtime\Serialization\CollectionDataContract.cs (4)
483Namespace = dictionary.Add(XmlName.Namespace); 533XmlName = CreateQualifiedName(Globals.ArrayPrefix + itemContract.XmlName.Name, itemContract.XmlName.Namespace); 1406IsCollectionDataContract(UnderlyingType) ? XmlName.Namespace : DataContract.GetCollectionNamespace(boundCollectionContract.ItemContract.XmlName.Namespace));
System\Runtime\Serialization\DataContract.cs (13)
1067Namespace = dictionary.Add(xmlName.Namespace); 1403ns = GetCollectionNamespace(elementXmlName.Namespace); 1444string ns = GetCollectionNamespace(itemName.Namespace); 1497namespaces.Append(' ').Append(qname.Namespace); 1499parametersFromBuiltInNamespaces = IsBuiltInNamespace(qname.Namespace); 1605ns = dataContract.XmlName.Namespace; 2061throw new InvalidOperationException(SR.Format(SR.DupContractInKnownTypes, type, alreadyExistingContract.UnderlyingType, dataContract.XmlName.Namespace, dataContract.XmlName.Name)); 2079return (XmlName.Name == dataContract.XmlName.Name && XmlName.Namespace == dataContract.XmlName.Namespace && IsReference == dataContract.IsReference); 2313namespaces.Append(' ').Append(GetXmlName(j).Namespace); 2332parametersFromBuiltInNamespaces = DataContract.IsBuiltInNamespace(GetXmlName(j).Namespace); 2379return new XmlQualifiedName(DataContract.EncodeLocalName(DataContract.ExpandGenericParameters(XmlConvert.DecodeName(_xmlName.Name), this)), _xmlName.Namespace); 2407return _xmlName.Namespace;
System\Runtime\Serialization\DataContractSet.cs (7)
112throw new InvalidOperationException(SR.Format(SR.DupContractInDataContractSet, dataContract.XmlName.Name, dataContract.XmlName.Namespace)); 116throw new InvalidOperationException(SR.Format(SR.DupTypeContractInDataContractSet, (typeNamesEqual ? dataContract.UnderlyingType.AssemblyQualifiedName : DataContract.GetClrTypeFullName(dataContract.UnderlyingType)), (typeNamesEqual ? dataContractInSet.UnderlyingType.AssemblyQualifiedName : DataContract.GetClrTypeFullName(dataContractInSet.UnderlyingType)), dataContract.XmlName.Name, dataContract.XmlName.Namespace)); 253DataContract? dataContract = DataContract.GetBuiltInDataContract(key.Name, key.Namespace); 304if (DataContract.GetBuiltInDataContract(key.Name, key.Namespace) != null) 451throw new InvalidDataContractException(SR.Format(SR.GenericTypeNameMismatch, dataContract.XmlName.Name, dataContract.XmlName.Namespace, genericXmlName.Name, genericXmlName.Namespace)); 613xmlName.Namespace,
System\Runtime\Serialization\EnumDataContract.cs (5)
131_baseContract = DataContract.GetBuiltInDataContract(baseTypeName.Name, baseTypeName.Namespace)!; 140Namespace = dictionary.Add(XmlName.Namespace); 171SR.Format(SR.InvalidEnumBaseType, value.Name, value.Namespace, XmlName.Name, XmlName.Namespace)); 173_baseContract = DataContract.GetBuiltInDataContract(value.Name, value.Namespace)!;
System\Runtime\Serialization\Json\JsonWriterDelegator.cs (1)
45writer.WriteString(value.Namespace);
System\Runtime\Serialization\Json\XmlObjectSerializerReadContextComplexJson.cs (1)
159string serverTypeNamespace = qualifiedTypeName.Namespace;
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (1)
275throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.DcTypeNotFoundOnSerialize, DataContract.GetClrTypeFullName(dataContract.UnderlyingType), dataContract.XmlName.Name, dataContract.XmlName.Namespace));
System\Runtime\Serialization\ReflectionReader.cs (1)
239var value = ReflectionReadValue(xmlReader, context, dataMember, classContract.XmlName.Namespace);
System\Runtime\Serialization\ReflectionXmlFormatReader.cs (2)
109return classContract.XmlName!.Namespace; 119return collectionContract.XmlName.Namespace;
System\Runtime\Serialization\ReflectionXmlFormatWriter.cs (2)
238string? ns = classContract.XmlName.Namespace; 242if (ns == currentContract.XmlName.Namespace)
System\Runtime\Serialization\SchemaExporter.cs (20)
86XmlSchema schema = GetSchema(dataContract.XmlName.Namespace); 106if (schema == null || dataContract.XmlName.Namespace != dataContract.TopLevelElementNamespace!.Value) 141SchemaHelper.AddSchemaImport(memberTypeContract.XmlName.Namespace, schema); 194if (element.SchemaTypeName.Namespace.Equals(Globals.SerializationNamespace)) 197SchemaHelper.AddSchemaImport(dataContract.XmlName.Namespace, schema); 221XmlElement defaultValueElement = XmlDoc.CreateElement(DefaultValueAnnotation.Name, DefaultValueAnnotation.Namespace); 235XmlElement actualTypeElement = xmlDoc.CreateElement(ActualTypeAnnotationName.Name, ActualTypeAnnotationName.Namespace); 242nsAttribute.Value = typeName.Namespace; 292dcqname = new XmlQualifiedName(collectionName, DataContract.GetCollectionNamespace(dcqname.Namespace)); 302nsAttribute.Value = dcqname.Namespace; 351SurrogateDataAnnotationName.Name, SurrogateDataAnnotationName.Namespace, knownTypes, 416XmlElement isDictionaryElement = XmlDoc.CreateElement(IsDictionaryAnnotationName.Name, IsDictionaryAnnotationName.Namespace); 433SchemaHelper.AddSchemaImport(enumDataContract.BaseContractName.Namespace, schema); 484SchemaHelper.AddSchemaImport(ISerializableFactoryTypeAttribute.RefName.Namespace, schema); 493SchemaHelper.AddSchemaImport(baseTypeName.Namespace, schema); 535if (anonymousType == null && xsdType == null && typeQName.Namespace != XmlSchema.Namespace) 702AddDefaultDatasetType(schemas, xmlName.Name, xmlName.Namespace); 708AddDefaultTypedDatasetType(schemas, schema, xmlName.Name, xmlName.Namespace); 836XmlElement annotationElement = XmlDoc.CreateElement(annotationQualifiedName.Name, annotationQualifiedName.Namespace); 837SchemaHelper.AddSchemaImport(annotationQualifiedName.Namespace, schema);
System\Runtime\Serialization\SchemaHelper.cs (3)
65string ns = typeQName.Namespace; 97string ns = elementQName.Namespace; 183string ns = typeName.Namespace;
System\Runtime\Serialization\SchemaImporter.cs (78)
369typeQName = new XmlQualifiedName(typeQName.Name + i.ToString(NumberFormatInfo.InvariantInfo), typeQName.Namespace); 386DataContract? dataContract = DataContract.GetBuiltInDataContract(typeName.Name, typeName.Namespace); 391throw new InvalidDataContractException(SR.Format(SR.SpecifiedTypeNotFoundInSchema, typeName.Name, typeName.Namespace)); 421ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.RedefineNotSupported)); 428ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.SimpleTypeUnionNotSupported)); 458ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.SimpleContentNotSupported)); 462ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.MixedContentNotSupported)); 474ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ComplexTypeRestrictionNotSupported)); 481ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, string.Empty); 597element.RefName.Namespace == Globals.SerializationNamespace && 635ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.RootSequenceMustBeRequired)); 637ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.RootSequenceMaxOccursMustBe)); 647ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.RootParticleMustBeSequence)); 670ThrowTypeCannotBeImportedException(dataContract.XmlName.Name, dataContract.XmlName.Namespace, SR.Format(SR.DerivedTypeNotISerializable, baseTypeName.Name, baseTypeName.Namespace)); 686ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.MustContainOnlyLocalElements)); 815ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.IsValueTypeFormattedIncorrectly, isValueTypeInnerText, fe.Message)); 838ThrowISerializableTypeCannotBeImportedException(dataContract.XmlName.Name, dataContract.XmlName.Namespace, SR.Format(SR.BaseTypeNotISerializable, baseTypeName.Name, baseTypeName.Namespace)); 840ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableDerivedContainsOneOrMoreItems)); 849ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableDoesNotContainAny)); 852ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableDoesNotContainAny)); 854ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableContainsMoreThanOneItems)); 858ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableDoesNotContainAny)); 863ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableWildcardMinOccursMustBe, iSerializableWildcardElement.MinOccurs)); 865ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableWildcardMaxOccursMustBe, iSerializableWildcardElement.MaxOccursString)); 867ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableWildcardNamespaceInvalid, iSerializableWildcardElement.Namespace)); 869ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableWildcardProcessContentsInvalid, iSerializableWildcardElement.ProcessContents)); 889ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableMustRefFactoryTypeAttribute, factoryTypeAttributeRefName.Name, factoryTypeAttributeRefName.Namespace)); 903ThrowTypeCannotBeImportedException(dataContract.XmlName.Name, dataContract.XmlName.Namespace, SR.Format(dataContract.IsISerializable ? SR.InvalidISerializableDerivation : SR.InvalidClassDerivation, baseTypeName.Name, baseTypeName.Namespace)); 932ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.AnonymousTypeNotSupported, typeName.Name, typeName.Namespace)); 937ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.TopLevelElementRepresentsDifferentType, topLevelElement.SchemaTypeName.Name, topLevelElement.SchemaTypeName.Namespace)); 949ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ElementMinOccursMustBe, element.Name)); 951ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ElementMaxOccursMustBe, element.Name)); 968ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.FormMustBeQualified, element.Name)); 974memberTypeContract = ImportAnonymousElement(element, new XmlQualifiedName(string.Format(CultureInfo.InvariantCulture, "{0}.{1}Type", typeName.Name, element.Name), typeName.Namespace)); 976ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ElementRefOnLocalElementNotSupported, element.RefName.Name, element.RefName.Namespace)); 991throw new InvalidDataContractException(SR.Format(SR.InvalidEmitDefaultAnnotation, memberName, typeName.Name, typeName.Namespace)); 1009ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.CannotHaveDuplicateElementNames, memberName)); 1016_dataContractSet.SetSurrogateData(dataMember, ImportSurrogateData(ImportAnnotation(element.Annotation, surrogateDataAnnotationName), surrogateDataAnnotationName.Name, surrogateDataAnnotationName.Namespace)); 1028throw new InvalidDataContractException(SR.Format(SR.AnnotationAttributeNotFound, SchemaExporter.DefaultValueAnnotation.Name, typeName.Name, typeName.Namespace, Globals.EmitDefaultValueAttribute)); 1040throw new InvalidDataContractException(SR.Format(SR.AnnotationAttributeNotFound, SchemaExporter.ActualTypeAnnotationName.Name, typeName.Name, typeName.Namespace, Globals.ActualTypeNameAttribute)); 1043throw new InvalidDataContractException(SR.Format(SR.AnnotationAttributeNotFound, SchemaExporter.ActualTypeAnnotationName.Name, typeName.Name, typeName.Namespace, Globals.ActualTypeNamespaceAttribute)); 1073ThrowArrayTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ArrayItemFormMustBe, element.Name)); 1080XmlQualifiedName shortName = new XmlQualifiedName(element.Name, typeName.Namespace); 1088XmlQualifiedName fullName = new XmlQualifiedName(string.Format(CultureInfo.InvariantCulture, "{0}.{1}Type", typeName.Name, element.Name), typeName.Namespace); 1093ThrowArrayTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ElementRefOnLocalElementNotSupported, element.RefName.Name, element.RefName.Namespace)); 1109ThrowArrayTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.InvalidKeyValueType, element.Name)); 1113ThrowArrayTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.InvalidKeyValueTypeNamespace, element.Name, keyValueContract.Namespace)); 1126dataContract.ItemContract.XmlName = new XmlQualifiedName(genericInfo.GetExpandedXmlName().Name, typeName.Namespace); 1162ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.IsDictionaryFormattedIncorrectly, isDictionaryInnerText, fe.Message)); 1174ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.EnumListMustContainAnonymousType)); 1178ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.EnumUnionInAnonymousTypeNotSupported)); 1180ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.EnumListInAnonymousTypeNotSupported)); 1186ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.EnumRestrictionInvalid)); 1208ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.EnumOnlyEnumerationFacetsSupported)); 1210ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.EnumEnumerationFacetsMustHaveValue)); 1233ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.SimpleTypeRestrictionDoesNotSpecifyBase)); 1252if (typeElement != null && typeElement.NamespaceURI == surrogateDataAnnotationName.Namespace && typeElement.LocalName == surrogateDataAnnotationName.Name) 1254object? surrogateData = ImportSurrogateData(typeElement, surrogateDataAnnotationName.Name, surrogateDataAnnotationName.Namespace); 1348ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.AbstractTypeNotSupported)); 1350ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.MixedContentNotSupported)); 1356ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.AbstractElementNotSupported, element.Name)); 1358ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.DefaultOnElementNotSupported, element.Name)); 1360ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.FixedOnElementNotSupported, element.Name)); 1362ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.SubstitutionGroupOnElementNotSupported, element.Name)); 1368ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.AnyAttributeNotSupported)); 1385if (attribute.RefName.IsEmpty || attribute.RefName.Namespace != Globals.SerializationNamespace || attribute.Use == XmlSchemaUse.Required) 1386ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.TypeShouldNotContainAttributes, Globals.SerializationNamespace)); 1398ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.CannotHaveDuplicateAttributeNames, refName.Name)); 1418ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.InvalidAnnotationExpectingText, xmlElement.LocalName, xmlElement.NamespaceURI, child.LocalName, child.NamespaceURI)); 1436if (markup[i] is XmlElement annotationElement && annotationElement.LocalName == annotationQualifiedName.Name && annotationElement.NamespaceURI == annotationQualifiedName.Namespace)
System\Runtime\Serialization\XmlDataContract.cs (5)
153Namespace = dictionary.Add(XmlName.Namespace); 160_topLevelElementNamespace = (this.XmlName.Namespace == Globals.SchemaNamespace) ? DictionaryGlobals.EmptyString : Namespace; 265TopLevelElementNamespace = dictionary.Add(elementName.Namespace); 401return (XmlName.Name == dataContract.XmlName.Name && XmlName.Namespace == dataContract.XmlName.Namespace);
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (4)
446ReadValue(memberType, dataMember.Name, classContract.XmlName.Namespace); 451value = ReadValue(memberType, dataMember.Name, classContract.XmlName.Namespace); 665string itemNs = collectionContract.XmlName.Namespace; 781string itemNs = collectionContract.XmlName.Namespace;
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (2)
798string ns = classContract.XmlName.Namespace; 802if (ns == currentContract.XmlName.Namespace)
System\Runtime\Serialization\XmlObjectSerializerContext.cs (2)
230DataContract? knownContract = ResolveDataContractFromKnownTypes(dataContract.XmlName.Name, dataContract.XmlName.Namespace, null /*memberTypeContract*/, declaredType); 245PrimitiveDataContract.GetPrimitiveDataContract(typeName.Name, typeName.Namespace) ??
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (2)
245DataContract? knownContract = ResolveDataContractFromKnownTypes(dataContract.XmlName.Name, dataContract.XmlName.Namespace, null /*memberTypeContract*/, declaredType); 248throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.DcTypeNotFoundOnSerialize, DataContract.GetClrTypeFullName(dataContract.UnderlyingType), dataContract.XmlName.Name, dataContract.XmlName.Namespace));
System\Runtime\Serialization\XmlSerializableServices.cs (1)
71SchemaExporter.AddDefaultXmlType(schemas, typeQName.Name, typeQName.Namespace);
System\Runtime\Serialization\XmlWriterDelegator.cs (2)
658WriteXmlnsAttribute(value.Namespace); 659WriteQualifiedName(value.Name, value.Namespace);
System.Private.Xml (242)
System\Xml\Cache\XPathDocumentBuilder.cs (1)
317_pageSibling[_idxSibling].Prefix == _idAttrName.Namespace)
System\Xml\Core\XmlTextReaderImpl.cs (1)
9240string ns = _nameTable.Add(attrDef.Name.Namespace);
System\Xml\Core\XmlValidatingReaderImpl.cs (1)
848if (schemaTypeObj != null && schemaTypeObj.QualifiedName.Namespace == XmlReservedNs.NsXs)
System\Xml\Core\XmlWriterSettings.cs (1)
630writer.Write(qName.Namespace);
System\Xml\Dom\DocumentSchemaValidator.cs (2)
422attr = _document.CreateDefaultAttribute(GetDefaultPrefix(attrQName.Namespace), attrQName.Name, attrQName.Namespace);
System\Xml\Dom\XmlDocument.cs (4)
678attrPrefix = attdef.Name.Namespace; 683attrNamespaceURI = attdef.Name.Namespace; 1680if ((schInfo!.SchemaType == SchemaType.DTD && attdef.Name.Namespace == attrPrefix) || 1681(schInfo.SchemaType != SchemaType.DTD && attdef.Name.Namespace == attrNamespaceURI))
System\Xml\Schema\AutoValidator.cs (1)
99else if (Ref.Equal(objectNs, SchemaNames.QnDtDt.Namespace) && Ref.Equal(objectName, SchemaNames.QnDtDt.Name))
System\Xml\Schema\BaseProcessor.cs (2)
72string ns = _nameTable.Add(qname.Namespace); 95string ns = _nameTable.Add(qname.Namespace);
System\Xml\Schema\ContentValidator.cs (1)
176if (_wildcards != null && _wildcards.TryGetValue(name.Namespace, out int lookup))
System\Xml\Schema\DtdParser.cs (3)
658elementDecl = new SchemaElementDecl(elementName, elementName.Namespace); 670attrDef = new SchemaAttDef(attrName, attrName.Namespace); 955elementDecl = new SchemaElementDecl(name, name.Namespace);
System\Xml\Schema\DtdParserAsync.cs (3)
302elementDecl = new SchemaElementDecl(elementName, elementName.Namespace); 314attrDef = new SchemaAttDef(attrName, attrName.Namespace); 599elementDecl = new SchemaElementDecl(name, name.Namespace);
System\Xml\Schema\DtdValidator.cs (1)
509context.Namespace = elementName.Namespace;
System\Xml\Schema\Inference\Infer.cs (7)
200if (elem!.Name == _xtr.LocalName && elem.QualifiedName.Namespace == _xtr.NamespaceURI) 1070else if ((el.RefName.Name == xtr.LocalName) && (el.RefName.Namespace == xtr.NamespaceURI)) 1101else if (el.RefName.Name == xtr.LocalName && el.RefName.Namespace == xtr.NamespaceURI) 1133else if (el.RefName.Name == xtr.LocalName && el.RefName.Namespace == xtr.NamespaceURI) 1370if (schemaAttribute.RefName.Name == attributeName && schemaAttribute.RefName.Namespace == nsURI) 1387if (xse.RefName.Name == elementName && xse.RefName.Namespace == nsURI) 1432if (null == FindAttributeRef(attributesInInstance, attr.RefName.Name, attr.RefName.Namespace))
System\Xml\Schema\NamespaceList.cs (1)
118return Allows(qname.Namespace);
System\Xml\Schema\Preprocessor.cs (5)
1716SendValidationEvent(SR.Sch_NoRestOrExtQName, complexType.QualifiedName.Name, complexType.QualifiedName.Namespace, complexType); 1770SendValidationEvent(SR.Sch_NoRestOrExtQName, complexType.QualifiedName.Name, complexType.QualifiedName.Namespace, complexType); 2103if (_currentSchema!.IsChameleon && value.Namespace.Length == 0) 2107if (_referenceNamespaces[value.Namespace] == null) 2109SendValidationEvent(SR.Sch_UnrefNS, value.Namespace, xso, XmlSeverityType.Warning);
System\Xml\Schema\SchemaCollectionCompiler.cs (4)
283schemaInfo.TargetNamespaces[element!.QualifiedName.Namespace] = true; 289schemaInfo.TargetNamespaces[attribute!.QualifiedName.Namespace] = true; 295schemaInfo.TargetNamespaces[type!.QualifiedName.Namespace] = true; 304schemaInfo.TargetNamespaces[notation!.QualifiedName.Namespace] = true;
System\Xml\Schema\SchemaCollectionpreProcessor.cs (4)
1381SendValidationEvent(SR.Sch_NoRestOrExtQName, complexType.QualifiedName.Name, complexType.QualifiedName.Namespace, complexType); 1435SendValidationEvent(SR.Sch_NoRestOrExtQName, complexType.QualifiedName.Name, complexType.QualifiedName.Namespace, complexType); 1762if (_referenceNamespaces![value.Namespace] == null) 1764SendValidationEvent(SR.Sch_UnrefNS, value.Namespace, xso, XmlSeverityType.Warning);
System\Xml\Schema\SchemaInfo.cs (2)
161if (!ed.ContentValidator!.IsOpen || qname.Namespace.Length == 0) 165if (!_attributeDecls.TryGetValue(qname, out attdef) && _targetNamespaces.ContainsKey(qname.Namespace))
System\Xml\Schema\XdrBuilder.cs (3)
676if (gname.Namespace.Length == 0) 1506string ns = qname.Namespace; 1520string ns = qname.Namespace;
System\Xml\Schema\XdrValidator.cs (3)
95if (SchemaNames.IsXDRRoot(elementName.Name, elementName.Namespace) && reader.Depth > 0) 217Ref.Equal(objectNs, SchemaNames.QnDtDt.Namespace) && 661context.Namespace = elementName.Namespace;
System\Xml\Schema\XmlAtomicValue.cs (1)
170string ns = qname.Namespace;
System\Xml\Schema\XmlSchemaAny.cs (1)
113return _namespaceList!.Allows(qname.Namespace);
System\Xml\Schema\XmlSchemaAnyAttribute.cs (1)
69return _namespaceList!.Allows(qname.Namespace);
System\Xml\Schema\XmlSchemaAttribute.cs (1)
102if (_attributeType.QualifiedName.Namespace == XmlReservedNs.NsXs)
System\Xml\Schema\XmlSchemaElement.cs (1)
166if (_elementType.QualifiedName.Namespace == XmlReservedNs.NsXs)
System\Xml\Schema\XmlSchemaSet.cs (1)
1411if (qname.Namespace == XmlReservedNs.NsXml)
System\Xml\Schema\XmlSchemaType.cs (1)
130if (_baseSchemaType.QualifiedName.Namespace == XmlReservedNs.NsXs)
System\Xml\Schema\XmlSchemaValidator.cs (16)
538&& attQName.Namespace.Length != 0 539&& _compiledSchemaInfo.Contains(attQName.Namespace) 646AttributeIdentityConstraints(attQName.Name, attQName.Namespace, typedVal!, attValue!.ToString()!, datatype); 1035string attributeNS = _nameTable.Add(attdef.Name.Namespace); 1089AttributeIdentityConstraints(attdef.Name.Name, attdef.Name.Namespace, attdef.DefaultValueTyped, attdef.DefaultValueRaw, datatype); 1531_context.Namespace = elementName.Namespace; 1692if (elementDeclXsi == null && xsiTypeName.Namespace == _nsXs) 1782if (Ref.Equal(attQName.Namespace, _nsXml) && (_validationFlags & XmlSchemaValidationFlags.AllowXmlAttributes) != 0) 2629if (currentQName.Namespace != nextParticle.GetQualifiedName().Namespace) 2679EnumerateAny(builder, name.Namespace); 2683if (name.Namespace.Length != 0) 2685builder.Append(SR.Format(SR.Sch_ElementNameAndNamespace, name.Name, name.Namespace)); 2723if (name.Namespace.Length != 0) 2725builder.Append(SR.Format(SR.Sch_ElementNameAndNamespace, subBuilder, name.Namespace)); 2763return BuildElementName(qname.Name, qname.Namespace);
System\Xml\Schema\XmlValueConverter.cs (7)
490if (name.Namespace.Length == 0) 494else if (name.Namespace == XmlReservedNs.NsXs) 498else if (name.Namespace == XmlReservedNs.NsXQueryDataType) 504return $"{{{name.Namespace}}}{name.Name}"; 766return $"{{{qname.Namespace}}}{qname.Name}"; 768prefix = nsResolver.LookupPrefix(qname.Namespace); 770throw new InvalidCastException(SR.Format(SR.XmlConvert_TypeNoPrefix, qname, qname.Namespace));
System\Xml\Schema\XsdValidator.cs (6)
175if (IsXSDRoot(elementName.Name, elementName.Namespace) && reader.Depth > 0) 400if (!schemaInfo!.ElementDeclsByType.TryGetValue(xsiType, out elementDeclXsi) && xsiType.Namespace == _nsXs) 511&& attQName.Namespace.Length != 0 512&& schemaInfo.Contains(attQName.Namespace) 544AttributeIdentityConstraints(attdef.Name.Name, attdef.Name.Namespace, UnWrapUnion(attdef.DefaultValueTyped), attdef.DefaultValueRaw, attdef); 784context.Namespace = elementName.Namespace;
System\Xml\Serialization\ImportContext.cs (3)
94Warnings.Add(SR.Format(SR.XmlMismatchSchemaObjects, item.GetType().Name, qname.Name, qname.Namespace)); 344if (baseType == null && !baseName.IsEmpty && baseName.Namespace != XmlSchema.Namespace) 368if (el.SubstitutionGroup.Namespace != XmlSchema.Namespace)
System\Xml\Serialization\Mappings.cs (8)
1070this.Namespace = xsiType.Namespace; 1236if (e.Name == element.Name && e.QualifiedName.Namespace == elementNs) 1317if (_xsiType.Namespace != XmlSchema.Namespace) 1319ArrayList srcSchemas = (ArrayList)_schemas.Schemas(_xsiType.Namespace); 1323throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, _xsiType.Namespace)); 1327throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaInclude, _xsiType.Namespace, _getSchemaMethod.DeclaringType!.FullName, _getSchemaMethod.Name)); 1332throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, _xsiType.Namespace)); 1337throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaTypeMissing, _getSchemaMethod.DeclaringType!.FullName, _getSchemaMethod.Name, _xsiType.Name, _xsiType.Namespace));
System\Xml\Serialization\NameTable.cs (3)
45Add(qname.Name, qname.Namespace, value); 59return _table.TryGetValue(new NameKey(qname.Name, qname.Namespace), out obj) ? obj : null; 63_table[new NameKey(qname.Name, qname.Namespace)] = value;
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (1)
2010return xsiType.Name == name && string.Equals(xsiType.Namespace, defaultNamespace);
System\Xml\Serialization\SchemaImporter.cs (2)
144if (name.Namespace == XmlSchema.Namespace) 148throw new InvalidOperationException(string.Format(error, name.Name, name.Namespace));
System\Xml\Serialization\SchemaObjectWriter.cs (4)
47int ns = string.Compare(qn1.Namespace, qn2.Namespace, StringComparison.Ordinal); 307if (o.QualifiedName != null && !o.QualifiedName.IsEmpty && !string.IsNullOrEmpty(o.QualifiedName.Namespace)) 985if (o.QualifiedName != null && !o.QualifiedName.IsEmpty && !string.IsNullOrEmpty(o.QualifiedName.Namespace))
System\Xml\Serialization\XmlReflectionImporter.cs (5)
559serializableMapping.Namespace = qname.Namespace; 588if (baseQname.Namespace == XmlSchema.Namespace) return; 590ArrayList srcSchemas = (ArrayList)schemas.Schemas(baseQname.Namespace); 594throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, baseQname.Namespace)); 598throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaInclude, baseQname.Namespace, nameof(IXmlSerializable), "GetSchema"));
System\Xml\Serialization\XmlSchemaExporter.cs (1)
480if (!serializableMapping.XsiType!.IsEmpty && serializableMapping.XsiType.Namespace == schema.TargetNamespace)
System\Xml\Serialization\XmlSchemaImporter.cs (28)
71throw new InvalidOperationException(SR.Format(SR.XmlBadBaseElement, name.Name, name.Namespace, baseType.FullName)); 101accessor.Namespace = typeName.Namespace; 124throw new InvalidOperationException(SR.Format(SR.XmlBadBaseType, typeName.Name, typeName.Namespace, baseType.FullName)); 160mapping = ImportMembersType(type, typeName.Namespace, elementName); 168accessor.Namespace = typeName.Namespace; 254accessor = ImportElement(element, string.Empty, desiredMappingType, baseType, name.Namespace, true); 285throw new InvalidOperationException(SR.Format(SR.XmlElementHasNoName, parentType.Name, parentType.Namespace)); 417if (name.Name == Soap.UrType && name.Namespace == XmlSchema.Namespace) 429mapping = ImportType((XmlSchemaComplexType)type, name.Namespace, name.Name, desiredMappingType, baseType); 432mapping = ImportDataType((XmlSchemaSimpleType)type, name.Namespace, name.Name, baseType, flags, false); 436if (addref && name.Namespace != XmlSchema.Namespace) 544throw new InvalidOperationException(SR.Format(SR.XmlTypeUsedTwice, type.QualifiedName.Name, type.QualifiedName.Namespace)); 673ImportAttributeGroupMembers(FindAttributeGroup(groupName), identifier, members, membersScope, groupName.Namespace); 922if (GatherGroupChoices(FindGroup(refGroup.RefName), choiceElements, identifier, refGroup.RefName.Namespace, ref needExplicitOrder, allowDuplicates)) 963AddScopeElement(choiceElements, ImportElement(elements[j], identifier, typeof(TypeMapping), null, elements[j].QualifiedName.Namespace, true), ref duplicateElements, allowDuplicates); 967AddScopeElement(choiceElements, ImportElement(element, identifier, typeof(TypeMapping), null, element.QualifiedName.Namespace, false), ref duplicateElements, allowDuplicates); 1024ImportGroupMembers(FindGroup(refGroup.RefName).Particle, identifier, members, membersScope, elementsScope, refGroup.RefName.Namespace, groupRepeats | refGroup.IsMultipleOccurrence, ref mixed, ref needExplicitOrder, allowDuplicates, allowUnboundedElements); 1079equivalentElement.SubstitutionGroup.Namespace == schema.TargetNamespace && 1608if (attribute.RefName.Namespace == XmlReservedNs.NsXml) 1611return ImportAttribute(FindAttribute(attribute.RefName), identifier, attribute.RefName.Namespace, defaultValueProvider); 1688mapping = ImportDataType(FindDataType(restriction.BaseTypeName, flags)!, restriction.BaseTypeName.Namespace, identifier, null, flags, false); 1689if (restriction.BaseTypeName.Namespace != XmlSchema.Namespace) 1904if (qname.Namespace != XmlSchema.Namespace) 1918TypeDesc? typeDesc = TypeScope.GetTypeDesc(name.Name, name.Namespace, flags); 1928if (name.Namespace == XmlSchema.Namespace) 1934if (name.Name == Soap.Array && name.Namespace == Soap.Encoding) 1999return string.IsNullOrEmpty(element.QualifiedName.Namespace) ? XmlSchemaForm.Unqualified : XmlSchemaForm.Qualified; 2026return string.IsNullOrEmpty(attribute.QualifiedName.Namespace) ? XmlSchemaForm.Unqualified : XmlSchemaForm.Qualified;
System\Xml\Serialization\XmlSchemas.cs (4)
222IList values = (IList)SchemaSet.Schemas(name.Namespace); 521item = SR.Format(SR.XmlSchemaElementReference, e.RefName.ToString(), parentName.Name, parentName.Namespace); 542return SR.Format(SR.XmlSchemaAttributeReference, a.RefName.ToString(), parentName.Name, parentName.Namespace); 553item = SR.Format(SR.XmlSchemaContentDef, parentName.Name, parentName.Namespace, null);
System\Xml\Serialization\XmlSerializationReader.cs (32)
274if ((object)typeName.Namespace == (object)_schemaNsID || (object)typeName.Namespace == (object)_soapNsID || (object)typeName.Namespace == (object)_soap12NsID) 342else if ((object)typeName.Namespace == (object)_schemaNs2000ID || (object)typeName.Namespace == (object)_schemaNs1999ID) 406else if ((object)typeName.Namespace == (object)_schemaNonXsdTypesNsID) 524if (!IsPrimitiveNamespace(type.Namespace) || (object)type.Name == (object)_urTypeID) 527if ((object)type.Namespace == (object)_schemaNsID || (object)type.Namespace == (object)_soapNsID || (object)type.Namespace == (object)_soap12NsID) 593else if ((object)type.Name == (object)_base64ID && ((object)type.Namespace == (object)_soapNsID || (object)type.Namespace == (object)_soap12NsID)) 598else if ((object)type.Namespace == (object)_schemaNs2000ID || (object)type.Namespace == (object)_schemaNs1999ID) 664else if ((object)type.Namespace == (object)_schemaNonXsdTypesNsID) 686if (!IsPrimitiveNamespace(type.Namespace) || (object)type.Name == (object)_urTypeID) 691if ((object)type.Namespace == (object)_schemaNsID || (object)type.Namespace == (object)_soapNsID || (object)type.Namespace == (object)_soap12NsID) 758else if ((object)type.Name == (object)_base64ID && ((object)type.Namespace == (object)_soapNsID || (object)type.Namespace == (object)_soap12NsID)) 763else if ((object)type.Namespace == (object)_schemaNonXsdTypesNsID) 951if (qname.Namespace != ns) throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayTypeNamespace, qname.Namespace, ns, CurrentTag())); 1285return new InvalidOperationException(SR.Format(SR.XmlUnknownType, type.Name, type.Namespace, CurrentTag())); 1673array.SetValue(ReadReferencedElement(qname.Name, qname.Namespace), arrayLength); 1702typens = qname.Namespace; 4827WriteQNameEqual("tser", sm.XsiType!.Name, sm.XsiType.Namespace); 4892WriteQNameEqual("tser", derived.XsiType!.Name, derived.XsiType.Namespace); 4919WriteQuotedCSharpString(derived.XsiType.Namespace); 4923WriteQuotedCSharpString(head.XsiType.Namespace); 4937WriteQuotedCSharpString(derived.XsiType.Namespace);
System\Xml\Serialization\XmlSerializationReaderILGen.cs (5)
3213WriteQNameEqual("tser", sm.XsiType!.Name, sm.XsiType.Namespace); 3281WriteQNameEqual("tser", derived.XsiType!.Name, derived.XsiType.Namespace); 3320ilg.Ldstr(GetCSharpString(derived.XsiType.Namespace)); 3322ilg.Ldstr(GetCSharpString(head.XsiType.Namespace)); 3338ilg.Ldstr(GetCSharpString(derived.XsiType.Namespace));
System\Xml\Serialization\XmlSerializationWriter.cs (10)
468return GetQualifiedName(EscapeName ? XmlConvert.EncodeLocalName(xmlQualifiedName.Name) : xmlQualifiedName.Name, xmlQualifiedName.Namespace); 540string? aliasNs = qname.Namespace; 1076WriteXsiType(xsiType.Name, xsiType.Namespace); 1117WriteXsiType(xsiType.Name, xsiType.Namespace); 1127WriteXsiType(xsiType.Name, xsiType.Namespace); 1162if (string.IsNullOrEmpty(value.Namespace)) 1170WriteXsiType(xsiType.Name, xsiType.Namespace); 1221typeNs = qualName.Namespace; 1248typeNs = qualName.Namespace; 1442string? ns = qname.Namespace;
System\Xml\Serialization\XmlSerializerNamespaces.cs (2)
125if (!string.IsNullOrEmpty(nsPair.Key) && nsPair.Value.Namespace == ns) 143ns = qName.Namespace;
System\Xml\XmlQualifiedName.cs (10)
62public bool IsEmpty => Name.Length == 0 && Namespace.Length == 0; 68return Namespace.Length == 0 ? Name : $"{Namespace}:{Name}"; 81return other is XmlQualifiedName qName && Equals(qName.Name, qName.Namespace); 84internal bool Equals(string name, string ns) => Name == name && Namespace == ns; 101return a.Name == b.Name && a.Namespace == b.Namespace; 136if (Namespace.Length != 0) 138XmlConvert.ToUri(Namespace); 145Namespace = nameTable.Add(Namespace);
System\Xml\Xsl\IlGen\XmlILConstructAnalyzer.cs (2)
874if ((object)qnameDup.Name == (object)qname.Name && (object)qnameDup.Namespace == (object)qname.Namespace)
System\Xml\Xsl\Runtime\XmlQueryOutput.cs (5)
1508prefix = (name.Namespace.Length != 0) ? RemapPrefix(string.Empty, name.Namespace, nodeType == XPathNodeType.Element) : string.Empty; 1509prefix = EnsureValidName(prefix, name.Name, name.Namespace, nodeType); 1512WriteStartElement(prefix, name.Name, name.Namespace); 1514WriteStartAttribute(prefix, name.Name, name.Namespace);
System\Xml\Xsl\Runtime\XsltFunctions.cs (2)
216if (name.Namespace == XmlReservedNs.NsXslt) 226else if (name.Namespace == XmlReservedNs.NsMsxsl && name.Name == "version")
System\Xml\Xsl\Runtime\XsltLibrary.cs (5)
142if (QilGenerator.IsFunctionAvailable(name.Name, name.Namespace)) 148if (name.Namespace.Length == 0 || name.Namespace == XmlReservedNs.NsXslt) 154if (_runtime.ExternalContext.LateBoundFunctionExists(name.Name, name.Namespace)) 160return _runtime.EarlyBoundFunctionExists(name.Name, name.Namespace);
System\Xml\Xsl\XmlQualifiedNameTest.cs (9)
82get { return (object)this.Namespace == (object)wildcard; } 94|| (_exclude == other._exclude && this.Namespace == other.Namespace) 95|| (other._exclude && !_exclude && this.Namespace != other.Namespace); 125if (this.Namespace.Length == 0) 129else if ((object)this.Namespace == (object)wildcard) 135return $"{{~{this.Namespace}}}:{this.Name}"; 139return $"{{{this.Namespace}}}:{this.Name}";
System\Xml\Xsl\XmlQueryType.cs (4)
646else if (name.Namespace.Length == 0) 650else if (name.Namespace == XmlReservedNs.NsXs) 654else if (name.Namespace == XmlReservedNs.NsXQueryDataType) 660return $"{{{name.Namespace}}}{name.Name}";
System\Xml\Xsl\Xslt\QilGeneratorEnv.cs (8)
348if (name.Namespace == XmlReservedNs.NsXslt) 611QilNode name = _f.QName(resolvedName.Name, resolvedName.Namespace); 671name = _f.QName(qname.Name, qname.Namespace); 690name = _f.QName(qname.Name, qname.Namespace); 708if (qname.Namespace.Length == 0 || qname.Namespace == XmlReservedNs.NsXslt) 710return _f.Boolean(QilGenerator.IsFunctionAvailable(qname.Name, qname.Namespace)); 714name = _f.QName(qname.Name, qname.Namespace);
System\Xml\Xsl\Xslt\XsltQilFactory.cs (1)
144QName(format.Name.Name, format.Name.Namespace),
System\Xml\Xsl\XsltOld\Processor.cs (1)
220object? parameter = _args.GetParam(qname.Name, qname.Namespace);
System\Xml\Xsl\XsltOld\XsltOutput.cs (1)
225if (method.Namespace.Length != 0)
System.Private.Xml.Linq (1)
System\Xml\Schema\XNodeValidator.cs (1)
288a = new XAttribute(XNamespace.Get(sa.QualifiedName.Namespace).GetName(sa.QualifiedName.Name), GetDefaultValue(sa)!);
System.Runtime.Serialization.Schema (37)
System\Runtime\Serialization\Schema\CodeExporter.cs (30)
62_clrNamespaces.Add(clrNamespace, dataContract.XmlName.Namespace); 63_namespaces.Add(dataContract.XmlName.Namespace, clrNamespace); 265throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.TypeCannotBeImported, typeName.Name, typeName.Namespace, SR.Format(SR.CircularTypeReference, classContract.XmlName.Name, classContract.XmlName.Namespace)))); 424CodeNamespace ns = GetCodeNamespace(clrNamespace, dataContract.XmlName.Namespace, contractCodeDomInfo); 478DataContract? containingDataContract = _dataContractSet.GetDataContract(new XmlQualifiedName(containingTypeName, dataContract.XmlName.Namespace)); 551throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.ReferencedTypeDoesNotMatch, type.AssemblyQualifiedName, dataContract.XmlName.Name, dataContract.XmlName.Namespace))); 560throw ExceptionUtil.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.TypeMustBeIXmlSerializable, GetClrTypeFullName(type), GetClrTypeFullName(typeof(IXmlSerializable)), dataContract.XmlName.Name, dataContract.XmlName.Namespace))); 569throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.ReferencedTypeDoesNotMatch, type.AssemblyQualifiedName, dataContract.XmlName.Name, dataContract.XmlName.Namespace))); 582referencedContract.XmlName.Namespace))); 643return (collectionContract.XmlName.Name == expectedType.Name && collectionContract.XmlName.Namespace == expectedType.Namespace); 716if (DataContract.GetBuiltInDataContract(dataContract.XmlName.Name, dataContract.XmlName.Namespace) == null) 717type = surrogateProvider.GetReferencedTypeOnImport(dataContract.XmlName.Name, dataContract.XmlName.Namespace, _dataContractSet.SurrogateData[dataContract]); 800dataContractAttribute.Arguments.Add(new CodeAttributeArgument(ImportGlobals.NamespaceProperty, new CodePrimitiveExpression(classDataContract.XmlName.Namespace))); 1054throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.CannotDeriveFromSealedReferenceType, dataContract.XmlName.Name, dataContract.XmlName.Namespace, GetClrTypeFullName(baseType)))); 1083dataContractAttribute.Arguments.Add(new CodeAttributeArgument(ImportGlobals.NamespaceProperty, new CodePrimitiveExpression(enumDataContract.XmlName.Namespace))); 1115if (SchemaImportHelper.GetDefaultXmlNamespace(contractCodeDomInfo.ClrNamespace) != classDataContract.XmlName.Namespace) 1116throw ExceptionUtil.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.InvalidClrNamespaceGeneratedForISerializable, classDataContract.XmlName.Name, classDataContract.XmlName.Namespace, SchemaImportHelper.GetDataContractNamespaceFromUri(classDataContract.XmlName.Namespace), contractCodeDomInfo.ClrNamespace))); 1126throw ExceptionUtil.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.InvalidClrNameGeneratedForISerializable, classDataContract.XmlName.Name, classDataContract.XmlName.Namespace, contractCodeDomInfo.TypeDeclaration.Name))); 1203collectionContract.XmlName.Namespace))); 1228string expectedTypeNs = SchemaImportHelper.GetCollectionNamespace(itemContract.XmlName.Namespace); 1230dataContractName, collectionContract.XmlName.Namespace, 1243collectionContractAttribute.Arguments.Add(new CodeAttributeArgument(ImportGlobals.NamespaceProperty, new CodePrimitiveExpression(collectionContract.XmlName.Namespace))); 1309typeNameField.InitExpression = new CodeObjectCreateExpression(ImportGlobals.TypeOfXmlQualifiedName, new CodePrimitiveExpression(typeName.Name), new CodePrimitiveExpression(typeName.Namespace)); 1316(xmlDataContract.TopLevelElementNamespace != null && xmlDataContract.TopLevelElementNamespace.Value != xmlDataContract.XmlName.Namespace); 1455if (!Namespaces.TryGetValue(dataContract.XmlName.Namespace, out clrNamespace)) 1463clrNamespace = GetClrNamespace(dataContract.XmlName.Namespace); 1477AddNamespacePair(dataContract.XmlName.Namespace, clrNamespace);
System\Runtime\Serialization\Schema\XsdDataContractImporter.cs (7)
250DataContract? dataContract = DataContract.GetBuiltInDataContract(typeName.Name, typeName.Namespace); 255throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.TypeHasNotBeenImported, typeName.Name, typeName.Namespace))); 271DataContract? dataContract = DataContract.GetBuiltInDataContract(typeName.Name, typeName.Namespace); 276throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.TypeHasNotBeenImported, typeName.Name, typeName.Namespace))); 372throw ExceptionUtil.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.AnnotationAttributeNotFound, ActualTypeAnnotationName.Name, typeName.Name, typeName.Namespace, ImportGlobals.ActualTypeNameAttribute))); 375throw ExceptionUtil.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.AnnotationAttributeNotFound, ActualTypeAnnotationName.Name, typeName.Name, typeName.Namespace, ImportGlobals.ActualTypeNamespaceAttribute))); 390if (annotationElement != null && annotationElement.LocalName == annotationQualifiedName.Name && annotationElement.NamespaceURI == annotationQualifiedName.Namespace)
System.ServiceModel.Syndication (5)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (1)
594Debug.Assert(!FeedUtils.IsXmlns(attr.Name, attr.Namespace), "XML namespace attributes should not be added to the list.");
System\ServiceModel\Syndication\ExtensibleSyndicationObject.cs (1)
100writer.WriteAttributeString(qname.Name, qname.Namespace, value);
System\ServiceModel\Syndication\SyndicationContent.cs (2)
88if (key.Name == Atom10Constants.TypeTag && key.Namespace == string.Empty) 93writer.WriteAttributeString(key.Name, key.Namespace, _attributeExtensions[key]);
System\ServiceModel\Syndication\SyndicationElementExtension.cs (1)
279ns = qName.Namespace;