216 references to XmlSchemaForm
netstandard (1)
netstandard.cs (1)
2328[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Schema.XmlSchemaForm))]
ScenarioTests.Common.Tests (4)
ScenarioTestTypes.cs (4)
1240[System.Xml.Serialization.XmlElement(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] 1244[System.Xml.Serialization.XmlElement(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] 1248[System.Xml.Serialization.XmlElement(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] 1267[System.Xml.Serialization.XmlElement(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
System.Data.Common (3)
System\Data\XMLSchema.cs (3)
2506if (elem.Form == XmlSchemaForm.Unqualified) 2510else if (elem.Form == XmlSchemaForm.None) 2517if (((XmlSchema)e).ElementFormDefault == XmlSchemaForm.Unqualified)
System.Private.DataContractSerialization (9)
System\Runtime\Serialization\SchemaHelper.cs (3)
134schema.ElementFormDefault = XmlSchemaForm.Qualified; 148if (schema.ElementFormDefault != XmlSchemaForm.Qualified) 150element.Form = XmlSchemaForm.Qualified;
System\Runtime\Serialization\SchemaImporter.cs (6)
960XmlSchemaForm elementForm = element.Form; 961if (elementForm == XmlSchemaForm.None) 967if (elementForm != XmlSchemaForm.Qualified) 1065XmlSchemaForm elementForm = element.Form; 1066if (elementForm == XmlSchemaForm.None) 1072if (elementForm != XmlSchemaForm.Qualified)
System.Private.Xml (197)
System\Xml\Schema\Inference\Infer.cs (8)
338xs.AttributeFormDefault = XmlSchemaForm.Unqualified; 339xs.ElementFormDefault = XmlSchemaForm.Qualified; 425if (xs!.AttributeFormDefault != XmlSchemaForm.Unqualified) 427xsa.Form = XmlSchemaForm.Unqualified; 485xs.AttributeFormDefault = XmlSchemaForm.Unqualified; 486xs.ElementFormDefault = XmlSchemaForm.Qualified; 514if (xs.ElementFormDefault != XmlSchemaForm.Qualified && addLocation != null) 516xse.Form = XmlSchemaForm.Qualified;
System\Xml\Schema\Preprocessor.cs (16)
43private XmlSchemaForm _elementFormDefault; 44private XmlSchemaForm _attributeFormDefault; 1022if (_elementFormDefault == XmlSchemaForm.None) 1024_elementFormDefault = XmlSchemaForm.Unqualified; 1027if (_attributeFormDefault == XmlSchemaForm.None) 1029_attributeFormDefault = XmlSchemaForm.Unqualified; 1162if (attribute.Form != XmlSchemaForm.None) 1176attribute.SetQualifiedName(new XmlQualifiedName(attribute.Name, (attribute.Form == XmlSchemaForm.Qualified || (attribute.Form == XmlSchemaForm.None && _attributeFormDefault == XmlSchemaForm.Qualified)) ? _targetNamespace : null)); 1191attribute.Form != XmlSchemaForm.None /*|| 1295if (element.Form != XmlSchemaForm.None) 1320element.SetQualifiedName(new XmlQualifiedName(element.Name, (element.Form == XmlSchemaForm.Qualified || (element.Form == XmlSchemaForm.None && _elementFormDefault == XmlSchemaForm.Qualified)) ? _targetNamespace : null)); 1339element.Form != XmlSchemaForm.None ||
System\Xml\Schema\SchemaCollectionpreProcessor.cs (16)
25private XmlSchemaForm _elementFormDefault; 26private XmlSchemaForm _attributeFormDefault; 467if (_elementFormDefault == XmlSchemaForm.None) 469_elementFormDefault = XmlSchemaForm.Unqualified; 472if (_attributeFormDefault == XmlSchemaForm.None) 474_attributeFormDefault = XmlSchemaForm.Unqualified; 836if (attribute.Form != XmlSchemaForm.None) 850attribute.SetQualifiedName(new XmlQualifiedName(attribute.Name, (attribute.Form == XmlSchemaForm.Qualified || (attribute.Form == XmlSchemaForm.None && _attributeFormDefault == XmlSchemaForm.Qualified)) ? _targetNamespace : null)); 865attribute.Form != XmlSchemaForm.None /*|| 968if (element.Form != XmlSchemaForm.None) 993element.SetQualifiedName(new XmlQualifiedName(element.Name, (element.Form == XmlSchemaForm.Qualified || (element.Form == XmlSchemaForm.None && _elementFormDefault == XmlSchemaForm.Qualified)) ? _targetNamespace : null)); 1012element.Form != XmlSchemaForm.None ||
System\Xml\Schema\XmlSchema.cs (8)
21private XmlSchemaForm _attributeFormDefault = XmlSchemaForm.None; 22private XmlSchemaForm _elementFormDefault = XmlSchemaForm.None; 238[XmlAttribute("attributeFormDefault"), DefaultValue(XmlSchemaForm.None)] 239public XmlSchemaForm AttributeFormDefault 259[XmlAttribute("elementFormDefault"), DefaultValue(XmlSchemaForm.None)] 260public XmlSchemaForm ElementFormDefault
System\Xml\Schema\XmlSchemaAttribute.cs (4)
17private XmlSchemaForm _form = XmlSchemaForm.None; 45[XmlAttribute("form"), DefaultValue(XmlSchemaForm.None)] 46public XmlSchemaForm Form
System\Xml\Schema\XmlSchemaComplexType.cs (4)
483GetResolvedElementForm(parentSchema, oldElem) == XmlSchemaForm.Qualified)) 498private static XmlSchemaForm GetResolvedElementForm(XmlSchema? parentSchema, XmlSchemaElement element) 500if (element.Form == XmlSchemaForm.None && parentSchema != null) 532GetResolvedElementForm(parentSchema, elem) == XmlSchemaForm.Qualified))
System\Xml\Schema\XmlSchemaElement.cs (4)
21private XmlSchemaForm _form = XmlSchemaForm.None; 80[XmlAttribute("form"), DefaultValue(XmlSchemaForm.None)] 81public XmlSchemaForm Form
System\Xml\Schema\XsdBuilder.cs (4)
1122builder._schema.AttributeFormDefault = (XmlSchemaForm)builder.ParseEnum(value, "attributeFormDefault", s_formStringValues); 1127builder._schema.ElementFormDefault = (XmlSchemaForm)builder.ParseEnum(value, "elementFormDefault", s_formStringValues); 1271builder._attribute!.Form = (XmlSchemaForm)builder.ParseEnum(value, "form", s_formStringValues); 1355builder._element!.Form = (XmlSchemaForm)builder.ParseEnum(value, "form", s_formStringValues);
System\Xml\Serialization\Mappings.cs (4)
33private XmlSchemaForm _form = XmlSchemaForm.None; 79internal XmlSchemaForm Form 261Form = XmlSchemaForm.Qualified;
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (6)
103string elementNs = element.Form == XmlSchemaForm.Qualified ? element.Namespace! : string.Empty; 338string? ns = element.Form == XmlSchemaForm.Qualified ? element.Namespace : string.Empty; 763string? ns = ele.Form == XmlSchemaForm.Qualified ? ele.Namespace : string.Empty; 813string? ns = e!.Form == XmlSchemaForm.Qualified ? e.Namespace : string.Empty; 830string? ns = element.Form == XmlSchemaForm.Qualified ? element.Namespace : string.Empty; 1861memberFound = XmlNodeEqual(Reader, attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : string.Empty);
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (7)
84string? ns = (element.Form == XmlSchemaForm.Qualified ? element.Namespace : string.Empty); 319string? ns = element.Any && element.Name.Length == 0 ? null : (element.Form == XmlSchemaForm.Qualified ? (writeAccessor ? element.Namespace : element.Mapping!.Namespace) : string.Empty); 339WriteNullTagLiteral(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : string.Empty); 774Writer.WriteStartAttribute(null, attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : string.Empty); 850string? ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : string.Empty; 888string? ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : string.Empty; 1199WriteStartElement(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : string.Empty), mapping.IsSoap);
System\Xml\Serialization\SoapReflectionImporter.cs (8)
90element.Form = XmlSchemaForm.Qualified; 130element.Form = XmlSchemaForm.Qualified; 616MemberMapping? mapping = ImportMemberMapping(member, ns, xmlReflectionMembers, hasWrapperElement ? XmlSchemaForm.Unqualified : XmlSchemaForm.Qualified, limiter); 647private MemberMapping? ImportMemberMapping(XmlReflectionMember xmlReflectionMember, string? ns, XmlReflectionMember[] xmlReflectionMembers, XmlSchemaForm form, RecursionLimiter limiter) 678ImportAccessorMapping(member, model, a, ns, XmlSchemaForm.Unqualified, limiter); 683private void ImportAccessorMapping(MemberMapping accessor, FieldModel model, SoapAttributes a, string? ns, XmlSchemaForm form, RecursionLimiter limiter) 705attribute.Form = XmlSchemaForm.Qualified; // attributes are always qualified since they're only used for encoded soap headers
System\Xml\Serialization\XmlArrayAttribute.cs (3)
19private XmlSchemaForm _form = XmlSchemaForm.None; 68public XmlSchemaForm Form
System\Xml\Serialization\XmlArrayItemAttribute.cs (3)
22private XmlSchemaForm _form = XmlSchemaForm.None; 123public XmlSchemaForm Form
System\Xml\Serialization\XmlAttributeAttribute.cs (3)
20private XmlSchemaForm _form = XmlSchemaForm.None; 95public XmlSchemaForm Form
System\Xml\Serialization\XmlElementAttribute.cs (3)
22private XmlSchemaForm _form = XmlSchemaForm.None; 121public XmlSchemaForm Form
System\Xml\Serialization\XmlReflectionImporter.cs (26)
227element.Form = XmlSchemaForm.Qualified; // elements within soap:body are always qualified 292element.Form = XmlSchemaForm.Qualified; 1328XmlSchemaForm form = rpc ? XmlSchemaForm.Unqualified : XmlSchemaForm.Qualified; 1519arrayItemElement.Form = xmlArrayItem.Form == XmlSchemaForm.None ? XmlSchemaForm.Qualified : xmlArrayItem.Form; 1531XmlSchemaForm elementFormDefault = XmlSchemaForm.Qualified; 1603if (attribute.Form == XmlSchemaForm.None && ns != attribute.Namespace) 1605attribute.Form = XmlSchemaForm.Qualified; 1613if (attribute.Form == XmlSchemaForm.Qualified && attribute.Namespace != ns) 1663element.Form = rpc ? XmlSchemaForm.Unqualified : xmlElement.Form == XmlSchemaForm.None ? elementFormDefault : xmlElement.Form; 1749arrayElement.Form = rpc ? XmlSchemaForm.Unqualified : a.XmlArray.Form == XmlSchemaForm.None ? elementFormDefault : a.XmlArray.Form; 1782if (attribute.Form == XmlSchemaForm.None && ns != attribute.Namespace) 1784attribute.Form = XmlSchemaForm.Qualified; 1791if (attribute.Form == XmlSchemaForm.Qualified && attribute.Namespace != ns) 1836element.Form = rpc ? XmlSchemaForm.Unqualified : xmlElement.Form == XmlSchemaForm.None ? elementFormDefault : xmlElement.Form; 1904element.Form = rpc ? XmlSchemaForm.Unqualified : xmlElement.Form == XmlSchemaForm.None ? elementFormDefault : xmlElement.Form; 2014if ((element.Form == XmlSchemaForm.Unqualified && string.IsNullOrEmpty(choiceNs)) || element.Namespace == choiceNs) 2224private static void CheckForm(XmlSchemaForm form, bool isQualified) 2226if (isQualified && form == XmlSchemaForm.Unqualified) throw new InvalidOperationException(SR.XmlInvalidFormUnqualified);
System\Xml\Serialization\XmlSchemaExporter.cs (16)
16internal const XmlSchemaForm elementFormDefault = XmlSchemaForm.Qualified; 17internal const XmlSchemaForm attributeFormDefault = XmlSchemaForm.Unqualified; 272schema.ElementFormDefault = elementFormDefault == XmlSchemaForm.Unqualified ? XmlSchemaForm.None : elementFormDefault; 273schema.AttributeFormDefault = attributeFormDefault == XmlSchemaForm.Unqualified ? XmlSchemaForm.None : attributeFormDefault; 286if (e.Form == XmlSchemaForm.Unqualified) 288e.Form = XmlSchemaForm.None; 292if (a.Form == XmlSchemaForm.Unqualified) 294a.Form = XmlSchemaForm.None; 738attribute.Form = accessor.Form == attributeFormDefault ? XmlSchemaForm.None : accessor.Form; 741attribute.Form = accessor.Form == schema.AttributeFormDefault ? XmlSchemaForm.None : accessor.Form; 839element.Form = accessor.Form == elementFormDefault ? XmlSchemaForm.None : accessor.Form; 842element.Form = accessor.Form == schema.ElementFormDefault ? XmlSchemaForm.None : accessor.Form;
System\Xml\Serialization\XmlSchemaImporter.cs (20)
107accessor.Form = XmlSchemaForm.Qualified; 178accessor.Form = schema.ElementFormDefault == XmlSchemaForm.None ? XmlSchemaForm.Unqualified : schema.ElementFormDefault; 243accessor.Form = XmlSchemaForm.Qualified; 315accessor.Form = XmlSchemaForm.Qualified; 892if (item.Form != XmlSchemaForm.None && item.Form != XmlSchemaExporter.elementFormDefault) 1979private static XmlSchemaForm ElementForm(string? ns, XmlSchemaElement element) 1981if (element.Form == XmlSchemaForm.None) 1994return schema.ElementFormDefault == XmlSchemaForm.None ? XmlSchemaForm.Unqualified : schema.ElementFormDefault; 1999return string.IsNullOrEmpty(element.QualifiedName.Namespace) ? XmlSchemaForm.Unqualified : XmlSchemaForm.Qualified; 2002return XmlSchemaForm.Qualified; 2007private static XmlSchemaForm AttributeForm(string? ns, XmlSchemaAttribute attribute) 2009if (attribute.Form == XmlSchemaForm.None) 2021return schema.AttributeFormDefault == XmlSchemaForm.None ? XmlSchemaForm.Unqualified : schema.AttributeFormDefault; 2026return string.IsNullOrEmpty(attribute.QualifiedName.Namespace) ? XmlSchemaForm.Unqualified : XmlSchemaForm.Qualified; 2029return XmlSchemaForm.Unqualified;
System\Xml\Serialization\XmlSerializationReader.cs (7)
2364string? expectedElement = e.Form == XmlSchemaForm.Qualified ? e.Namespace : ""; 2495WriteIsStartTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 2678WriteXmlNodeEqual("Reader", element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 3715WriteXmlNodeEqual("Reader", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : ""); 3780qnames += attribute.IsSpecialXmlNamespace ? XmlReservedNs.NsXml : $"{(attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : "")}:{attribute.Name}"; 3992string? ns = e.Form == XmlSchemaForm.Qualified ? e.Namespace : ""; 4211string? ns = e.Form == XmlSchemaForm.Qualified ? e.Namespace : "";
System\Xml\Serialization\XmlSerializationReaderILGen.cs (6)
323string? expectedElement = e.Form == XmlSchemaForm.Qualified ? e.Namespace : ""; 422WriteIsStartTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 1855WriteXmlNodeEqual("Reader", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : ""); 2006qnames += attribute.IsSpecialXmlNamespace ? XmlReservedNs.NsXml : $"{(attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : "")}:{attribute.Name}"; 2215string? ns = e.Form == XmlSchemaForm.Qualified ? e.Namespace : ""; 2474string? ns = e.Form == XmlSchemaForm.Qualified ? e.Namespace : "";
System\Xml\Serialization\XmlSerializationWriter.cs (11)
2630WriteStartElement(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""), mapping.IsSoap); 2830WriteEncodedNullTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 2832WriteLiteralNullTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 2835WriteEmptyTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 3309string? ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : string.Empty; 3433string? ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : string.Empty; 3479WritePrimitive("WriteAttribute", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : "", attribute.Default, source, attribute.Mapping, false, false, false); 3913string? ns = element.Any && element.Name.Length == 0 ? null : (element.Form == XmlSchemaForm.Qualified ? (writeAccessor ? element.Namespace : element.Mapping!.Namespace) : ""); 3933WriteLiteralNullTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 4251WriteLiteralNullTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 4471if ((element.Form == XmlSchemaForm.Unqualified && choiceNs.IsEmpty) || choiceNs.SequenceEqual(element.Namespace))
System\Xml\Serialization\XmlSerializationWriterILGen.cs (10)
391WriteStartElement(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""), false); 567WriteLiteralNullTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 570WriteEmptyTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 1173string? ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : string.Empty; 1319string? ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : string.Empty; 1381WritePrimitive("WriteAttribute", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : "", GetConvertedDefaultValue(source.Type, attribute.Default), source, attribute.Mapping, false, false, false); 1899string? ns = element.Any && element.Name.Length == 0 ? null : (element.Form == XmlSchemaForm.Qualified ? (writeAccessor ? element.Namespace : element.Mapping!.Namespace) : ""); 1926WriteLiteralNullTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 2188WriteLiteralNullTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 2264if ((element.Form == XmlSchemaForm.Unqualified && string.IsNullOrEmpty(choiceNs)) || element.Namespace == choiceNs)
System.Xml (1)
System.Xml.cs (1)
53[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Schema.XmlSchemaForm))]
System.Xml.ReaderWriter (1)
artifacts\obj\System.Xml.ReaderWriter\Debug\net10.0\System.Xml.ReaderWriter.Forwards.cs (1)
52[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Schema.XmlSchemaForm))]