241 references to XmlSchemaForm
dotnet-svcutil-lib (241)
FrameworkFork\Microsoft.Xml\Xml\schema\Inference\infer.cs (8)
360xs.AttributeFormDefault = XmlSchemaForm.Unqualified; 361xs.ElementFormDefault = XmlSchemaForm.Qualified; 446if (xs.AttributeFormDefault != XmlSchemaForm.Unqualified) 448xsa.Form = XmlSchemaForm.Unqualified; 504xs.AttributeFormDefault = XmlSchemaForm.Unqualified; 505xs.ElementFormDefault = XmlSchemaForm.Qualified; 532if (xs.ElementFormDefault != XmlSchemaForm.Qualified && addLocation != null) 534xse.Form = XmlSchemaForm.Qualified;
FrameworkFork\Microsoft.Xml\Xml\schema\Preprocessor.cs (16)
48private XmlSchemaForm _elementFormDefault; 49private XmlSchemaForm _attributeFormDefault; 1057if (_elementFormDefault == XmlSchemaForm.None) 1059_elementFormDefault = XmlSchemaForm.Unqualified; 1062if (_attributeFormDefault == XmlSchemaForm.None) 1064_attributeFormDefault = XmlSchemaForm.Unqualified; 1195if (attribute.Form != XmlSchemaForm.None) 1209attribute.SetQualifiedName(new XmlQualifiedName(attribute.Name, (attribute.Form == XmlSchemaForm.Qualified || (attribute.Form == XmlSchemaForm.None && _attributeFormDefault == XmlSchemaForm.Qualified)) ? _targetNamespace : null)); 1224attribute.Form != XmlSchemaForm.None /*|| 1328if (element.Form != XmlSchemaForm.None) 1353element.SetQualifiedName(new XmlQualifiedName(element.Name, (element.Form == XmlSchemaForm.Qualified || (element.Form == XmlSchemaForm.None && _elementFormDefault == XmlSchemaForm.Qualified)) ? _targetNamespace : null)); 1372element.Form != XmlSchemaForm.None ||
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaCollectionPreprocessor.cs (16)
30private XmlSchemaForm _elementFormDefault; 31private XmlSchemaForm _attributeFormDefault; 472if (_elementFormDefault == XmlSchemaForm.None) 474_elementFormDefault = XmlSchemaForm.Unqualified; 477if (_attributeFormDefault == XmlSchemaForm.None) 479_attributeFormDefault = XmlSchemaForm.Unqualified; 844if (attribute.Form != XmlSchemaForm.None) 858attribute.SetQualifiedName(new XmlQualifiedName(attribute.Name, (attribute.Form == XmlSchemaForm.Qualified || (attribute.Form == XmlSchemaForm.None && _attributeFormDefault == XmlSchemaForm.Qualified)) ? _targetNamespace : null)); 873attribute.Form != XmlSchemaForm.None /*|| 975if (element.Form != XmlSchemaForm.None) 1000element.SetQualifiedName(new XmlQualifiedName(element.Name, (element.Form == XmlSchemaForm.Qualified || (element.Form == XmlSchemaForm.None && _elementFormDefault == XmlSchemaForm.Qualified)) ? _targetNamespace : null)); 1019element.Form != XmlSchemaForm.None ||
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchema.cs (8)
35private XmlSchemaForm _attributeFormDefault = XmlSchemaForm.None; 36private XmlSchemaForm _elementFormDefault = XmlSchemaForm.None; 282[XmlAttribute("attributeFormDefault"), DefaultValue(XmlSchemaForm.None)] 283public XmlSchemaForm AttributeFormDefault 315[XmlAttribute("elementFormDefault"), DefaultValue(XmlSchemaForm.None)] 316public XmlSchemaForm ElementFormDefault
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaAttribute.cs (4)
25private XmlSchemaForm _form = XmlSchemaForm.None; 65[XmlAttribute("form"), DefaultValue(XmlSchemaForm.None)] 66public XmlSchemaForm Form
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaComplexType.cs (4)
570GetResolvedElementForm(parentSchema, oldElem) == XmlSchemaForm.Qualified)) 585private static XmlSchemaForm GetResolvedElementForm(XmlSchema parentSchema, XmlSchemaElement element) 587if (element.Form == XmlSchemaForm.None && parentSchema != null) 619GetResolvedElementForm(parentSchema, elem) == XmlSchemaForm.Qualified))
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaElement.cs (4)
30private XmlSchemaForm _form = XmlSchemaForm.None; 113[XmlAttribute("form"), DefaultValue(XmlSchemaForm.None)] 114public XmlSchemaForm Form
FrameworkFork\Microsoft.Xml\Xml\schema\XsdBuilder.cs (4)
1130builder._schema.AttributeFormDefault = (XmlSchemaForm)builder.ParseEnum(value, "attributeFormDefault", s_formStringValues); 1135builder._schema.ElementFormDefault = (XmlSchemaForm)builder.ParseEnum(value, "elementFormDefault", s_formStringValues); 1278builder._attribute.Form = (XmlSchemaForm)builder.ParseEnum(value, "form", s_formStringValues); 1362builder._element.Form = (XmlSchemaForm)builder.ParseEnum(value, "form", s_formStringValues);
FrameworkFork\Microsoft.Xml\Xml\Serialization\Mappings.cs (4)
31private XmlSchemaForm _form = XmlSchemaForm.None; 76internal XmlSchemaForm Form 255Form = XmlSchemaForm.Qualified;
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (8)
118element.Form = XmlSchemaForm.Qualified; 165element.Form = XmlSchemaForm.Qualified; 645MemberMapping mapping = ImportMemberMapping(member, ns, xmlReflectionMembers, hasWrapperElement ? XmlSchemaForm.Unqualified : XmlSchemaForm.Qualified, limiter); 675private MemberMapping ImportMemberMapping(XmlReflectionMember xmlReflectionMember, string ns, XmlReflectionMember[] xmlReflectionMembers, XmlSchemaForm form, RecursionLimiter limiter) 705ImportAccessorMapping(member, model, a, ns, XmlSchemaForm.Unqualified, limiter); 709private void ImportAccessorMapping(MemberMapping accessor, FieldModel model, SoapAttributes a, string ns, XmlSchemaForm form, RecursionLimiter limiter) 731attribute.Form = XmlSchemaForm.Qualified; // attributes are always qualified since they're only used for encoded soap headers
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapSchemaExporter.cs (5)
17internal const XmlSchemaForm elementFormDefault = XmlSchemaForm.Qualified; 123schema.ElementFormDefault = elementFormDefault == XmlSchemaForm.Unqualified ? XmlSchemaForm.None : elementFormDefault; 301element.Form = XmlSchemaForm.Unqualified;
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapSchemaImporter.cs (7)
72accessor.Form = XmlSchemaForm.Qualified; 98accessor.Form = XmlSchemaForm.Qualified; 160accessor.Form = XmlSchemaForm.Qualified; 184accessor.Form = XmlSchemaForm.None; 440arrayAccessor.Form = XmlSchemaForm.None; 458itemAccessor.Form = XmlSchemaForm.None; 519itemAccessor.Form = XmlSchemaForm.None;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlArrayAttribute.cs (3)
20private XmlSchemaForm _form = XmlSchemaForm.None; 74public XmlSchemaForm Form
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlArrayItemAttribute.cs (3)
23private XmlSchemaForm _form = XmlSchemaForm.None; 128public XmlSchemaForm Form
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlAttributeAttribute.cs (3)
21private XmlSchemaForm _form = XmlSchemaForm.None; 103public XmlSchemaForm Form
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlCodeExporter.cs (20)
693bool sameElementNs = arrayElement.Form == XmlSchemaForm.Unqualified || arrayElement.Namespace == ns; 695bool defaultForm = arrayElement.Form != XmlSchemaForm.Unqualified; 697ExportArrayItem(metadata, sameName ? null : elementName, sameElementNs ? null : arrayElement.Namespace, sameElementType ? null : elementMapping.TypeDesc, elementMapping.TypeDesc, arrayElement.IsNullable, defaultForm ? XmlSchemaForm.None : arrayElement.Form, nestingLevel); 723bool defaultForm = attribute.Form != XmlSchemaForm.Qualified; 729defaultForm ? XmlSchemaForm.None : attribute.Form); 751bool defaultForm = element.Form != XmlSchemaForm.Unqualified; 760ExportArray(metadata, sameName ? null : elemName, sameNs ? null : element.Namespace, element.IsNullable, defaultForm ? XmlSchemaForm.None : element.Form, member.SequenceId); 765ExportArray(metadata, null, null, false, XmlSchemaForm.None, member.SequenceId); 775ExportElement(metadata, sameName ? null : elemName, sameNs ? null : element.Namespace, sameType ? null : mapping.TypeDesc, mapping.TypeDesc, element.IsNullable, defaultForm ? XmlSchemaForm.None : element.Form, member.SequenceId); 790bool defaultForm = element.Form != XmlSchemaForm.Unqualified; 791ExportElement(metadata, elemName, sameNs ? null : element.Namespace, ((TypeMapping)element.Mapping).TypeDesc, ((TypeMapping)element.Mapping).TypeDesc, element.IsNullable, defaultForm ? XmlSchemaForm.None : element.Form, member.SequenceId); 871private void ExportAttribute(CodeAttributeDeclarationCollection metadata, string name, string ns, TypeDesc typeDesc, TypeDesc dataTypeDesc, XmlSchemaForm form) 876private void ExportArrayItem(CodeAttributeDeclarationCollection metadata, string name, string ns, TypeDesc typeDesc, TypeDesc dataTypeDesc, bool isNullable, XmlSchemaForm form, int nestingLevel) 881private void ExportElement(CodeAttributeDeclarationCollection metadata, string name, string ns, TypeDesc typeDesc, TypeDesc dataTypeDesc, bool isNullable, XmlSchemaForm form, int sequenceId) 886private void ExportArray(CodeAttributeDeclarationCollection metadata, string name, string ns, bool isNullable, XmlSchemaForm form, int sequenceId) 891private void ExportMetadata(CodeAttributeDeclarationCollection metadata, Type attributeType, string name, string ns, TypeDesc typeDesc, TypeDesc dataTypeDesc, object isNullable, XmlSchemaForm form, int nestingLevel, int sequenceId) 910if (form != XmlSchemaForm.None) 912attribute.Arguments.Add(new CodeAttributeArgument("Form", new CodeFieldReferenceExpression(new CodeTypeReferenceExpression(typeof(XmlSchemaForm).FullName), Enum.Format(typeof(XmlSchemaForm), form, "G")))); 914if (form == XmlSchemaForm.Unqualified && ns != null && ns.Length == 0)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlElementAttribute.cs (3)
23private XmlSchemaForm _form = XmlSchemaForm.None; 125public XmlSchemaForm Form
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (26)
219element.Form = XmlSchemaForm.Qualified; // elements within soap:body are always qualified 286element.Form = XmlSchemaForm.Qualified; 1321XmlSchemaForm form = rpc ? XmlSchemaForm.Unqualified : XmlSchemaForm.Qualified; 1507arrayItemElement.Form = xmlArrayItem.Form == XmlSchemaForm.None ? XmlSchemaForm.Qualified : xmlArrayItem.Form; 1517XmlSchemaForm elementFormDefault = XmlSchemaForm.Qualified; 1589if (attribute.Form == XmlSchemaForm.None && ns != attribute.Namespace) 1591attribute.Form = XmlSchemaForm.Qualified; 1599if (attribute.Form == XmlSchemaForm.Qualified && attribute.Namespace != ns) 1650element.Form = rpc ? XmlSchemaForm.Unqualified : xmlElement.Form == XmlSchemaForm.None ? elementFormDefault : xmlElement.Form; 1737arrayElement.Form = rpc ? XmlSchemaForm.Unqualified : a.XmlArray.Form == XmlSchemaForm.None ? elementFormDefault : a.XmlArray.Form; 1770if (attribute.Form == XmlSchemaForm.None && ns != attribute.Namespace) 1772attribute.Form = XmlSchemaForm.Qualified; 1779if (attribute.Form == XmlSchemaForm.Qualified && attribute.Namespace != ns) 1825element.Form = rpc ? XmlSchemaForm.Unqualified : xmlElement.Form == XmlSchemaForm.None ? elementFormDefault : xmlElement.Form; 1893element.Form = rpc ? XmlSchemaForm.Unqualified : xmlElement.Form == XmlSchemaForm.None ? elementFormDefault : xmlElement.Form; 2003if ((element.Form == XmlSchemaForm.Unqualified && string.IsNullOrEmpty(choiceNs)) || element.Namespace == choiceNs) 2213private static void CheckForm(XmlSchemaForm form, bool isQualified) 2215if (isQualified && form == XmlSchemaForm.Unqualified) throw new InvalidOperationException(ResXml.XmlInvalidFormUnqualified);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaExporter.cs (16)
23internal const XmlSchemaForm elementFormDefault = XmlSchemaForm.Qualified; 24internal const XmlSchemaForm attributeFormDefault = XmlSchemaForm.Unqualified; 299schema.ElementFormDefault = elementFormDefault == XmlSchemaForm.Unqualified ? XmlSchemaForm.None : elementFormDefault; 300schema.AttributeFormDefault = attributeFormDefault == XmlSchemaForm.Unqualified ? XmlSchemaForm.None : attributeFormDefault; 318if (e.Form == XmlSchemaForm.Unqualified) 320e.Form = XmlSchemaForm.None; 325if (a.Form == XmlSchemaForm.Unqualified) 327a.Form = XmlSchemaForm.None; 778attribute.Form = accessor.Form == attributeFormDefault ? XmlSchemaForm.None : accessor.Form; 781attribute.Form = accessor.Form == schema.AttributeFormDefault ? XmlSchemaForm.None : accessor.Form; 880element.Form = accessor.Form == elementFormDefault ? XmlSchemaForm.None : accessor.Form; 883element.Form = accessor.Form == schema.ElementFormDefault ? XmlSchemaForm.None : accessor.Form;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaImporter.cs (20)
153accessor.Form = XmlSchemaForm.Qualified; 227accessor.Form = schema.ElementFormDefault == XmlSchemaForm.None ? XmlSchemaForm.Unqualified : schema.ElementFormDefault; 294accessor.Form = XmlSchemaForm.Qualified; 362accessor.Form = XmlSchemaForm.Qualified; 997if (item.Form != XmlSchemaForm.None && item.Form != XmlSchemaExporter.elementFormDefault) 2070private XmlSchemaForm ElementForm(string ns, XmlSchemaElement element) 2072if (element.Form == XmlSchemaForm.None) 2085return schema.ElementFormDefault == XmlSchemaForm.None ? XmlSchemaForm.Unqualified : schema.ElementFormDefault; 2090return element.QualifiedName.Namespace == null || element.QualifiedName.Namespace.Length == 0 ? XmlSchemaForm.Unqualified : XmlSchemaForm.Qualified; 2093return XmlSchemaForm.Qualified; 2143private XmlSchemaForm AttributeForm(string ns, XmlSchemaAttribute attribute) 2145if (attribute.Form == XmlSchemaForm.None) 2157return schema.AttributeFormDefault == XmlSchemaForm.None ? XmlSchemaForm.Unqualified : schema.AttributeFormDefault; 2162return attribute.QualifiedName.Namespace == null || attribute.QualifiedName.Namespace.Length == 0 ? XmlSchemaForm.Unqualified : XmlSchemaForm.Qualified; 2165return XmlSchemaForm.Unqualified;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (11)
1898WriteStartElement(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""), mapping.IsSoap); 2097WriteEncodedNullTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 2099WriteLiteralNullTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 2102WriteEmptyTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 2573string ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : String.Empty; 2697string ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : String.Empty; 2743WritePrimitive("WriteAttribute", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : "", attribute.Default, source, attribute.Mapping, false, false, false); 3172string ns = element.Any && element.Name.Length == 0 ? null : (element.Form == XmlSchemaForm.Qualified ? (writeAccessor ? element.Namespace : element.Mapping.Namespace) : ""); 3192WriteLiteralNullTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 3509WriteLiteralNullTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 3685if ((element.Form == XmlSchemaForm.Unqualified && string.IsNullOrEmpty(choiceNs)) || element.Namespace == choiceNs)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (10)
401WriteStartElement(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""), false); 581WriteLiteralNullTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 584WriteEmptyTag(element.Name, (element.Form == XmlSchemaForm.Qualified ? element.Namespace : "")); 1228string ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : String.Empty; 1398string ns = attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : String.Empty; 1465WritePrimitive("WriteAttribute", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : "", GetConvertedDefaultValue(source.Type, attribute.Default), source, attribute.Mapping, false, false, false); 2011string ns = element.Any && element.Name.Length == 0 ? null : (element.Form == XmlSchemaForm.Qualified ? (writeAccessor ? element.Namespace : element.Mapping.Namespace) : ""); 2041WriteLiteralNullTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 2320WriteLiteralNullTag(element.Name, element.Form == XmlSchemaForm.Qualified ? element.Namespace : ""); 2399if ((element.Form == XmlSchemaForm.Unqualified && string.IsNullOrEmpty(choiceNs)) || element.Namespace == choiceNs)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaImporter.cs (6)
976XmlSchemaForm? elementForm = (element.Form == XmlSchemaForm.None) ? SchemaHelper.GetSchemaWithType(SchemaObjects, _schemaSet, typeName)?.ElementFormDefault : element.Form; 977if (elementForm != XmlSchemaForm.Qualified) 1074XmlSchemaForm? elementForm = (element.Form == XmlSchemaForm.None) ? SchemaHelper.GetSchemaWithType(SchemaObjects, _schemaSet, typeName)?.ElementFormDefault : element.Form; 1075if (elementForm != XmlSchemaForm.Qualified)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MessageContractImporter.cs (10)
651XmlSchemaForm elementFormDefault; 679XmlSchemaForm elementFormDefault; 1163private static string GetLocalElementNamespace(string ns, XmlSchemaElement element, XmlSchemaForm elementFormDefault) 1165XmlSchemaForm elementForm = (element.Form != XmlSchemaForm.None) ? element.Form : elementFormDefault; 1166if (elementForm != XmlSchemaForm.Qualified) 1244private static XmlSchemaComplexType GetElementComplexType(XmlQualifiedName elementName, XmlSchemaSet schemaSet, out string ns, out XmlSchemaForm elementFormDefault) 1591XmlSchemaForm elementFormDefault; 1642XmlSchemaForm elementFormDefault; 1970XmlSchemaForm elementFormDefault;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\SchemaHelper.cs (3)
18if (schema.ElementFormDefault != XmlSchemaForm.Qualified) 19element.Form = XmlSchemaForm.Qualified; 86schema.ElementFormDefault = XmlSchemaForm.Qualified;
FrameworkFork\System.Web.Services\Services\Description\ServiceDescriptionSerializer.cs (19)
2315if (((Microsoft.Xml.Schema.XmlSchemaForm)o.@AttributeFormDefault) != Microsoft.Xml.Schema.XmlSchemaForm.@None) 2317WriteAttribute(@"attributeFormDefault", @"", Write6_XmlSchemaForm(((Microsoft.Xml.Schema.XmlSchemaForm)o.@AttributeFormDefault))); 2327if (((Microsoft.Xml.Schema.XmlSchemaForm)o.@ElementFormDefault) != Microsoft.Xml.Schema.XmlSchemaForm.@None) 2329WriteAttribute(@"elementFormDefault", @"", Write6_XmlSchemaForm(((Microsoft.Xml.Schema.XmlSchemaForm)o.@ElementFormDefault))); 2857if (((Microsoft.Xml.Schema.XmlSchemaForm)o.@Form) != Microsoft.Xml.Schema.XmlSchemaForm.@None) 2859WriteAttribute(@"form", @"", Write6_XmlSchemaForm(((Microsoft.Xml.Schema.XmlSchemaForm)o.@Form))); 4120if (((Microsoft.Xml.Schema.XmlSchemaForm)o.@Form) != Microsoft.Xml.Schema.XmlSchemaForm.@None) 4122WriteAttribute(@"form", @"", Write6_XmlSchemaForm(((Microsoft.Xml.Schema.XmlSchemaForm)o.@Form))); 4149private string Write6_XmlSchemaForm(Microsoft.Xml.Schema.XmlSchemaForm v) 4154case Microsoft.Xml.Schema.XmlSchemaForm.@Qualified: s = @"qualified"; break; 4155case Microsoft.Xml.Schema.XmlSchemaForm.@Unqualified: s = @"unqualified"; break; 10752private Microsoft.Xml.Schema.XmlSchemaForm Read6_XmlSchemaForm(string s) 10756case @"qualified": return Microsoft.Xml.Schema.XmlSchemaForm.@Qualified; 10757case @"unqualified": return Microsoft.Xml.Schema.XmlSchemaForm.@Unqualified; 10758default: throw CreateUnknownConstantException(s, typeof(Microsoft.Xml.Schema.XmlSchemaForm));