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