Export (0) Print
Expand All

XmlSchemaCompilationSettings.EnableUpaCheck Property

Gets or sets a value indicating whether the XmlSchemaSet should check for Unique Particle Attribution (UPA) violations.

Namespace:  System.Xml.Schema
Assembly:  System.Xml (in System.Xml.dll)

public bool EnableUpaCheck { get; set; }

Property Value

Type: System.Boolean
true if the XmlSchemaSet should check for Unique Particle Attribution (UPA) violations; otherwise, false. The default is true.

When the EnableUpaCheck property is set to false, validation will be performed based on the following rules.

  1. If there is a choice between a strong type and a wildcard, the XmlSchemaSet will pick the strongly typed particle as illustrated in the following schema and Xml examples.

<xs:sequence>

    <xs:any namespace="##any"/>

    <xs:element name="A" type="xs:string" minOccurs="0"/>

</xs:sequence>

In the following Xml, the A element will be associated with <xs:element name="A" type="xs:string" minOccurs="0"/> in the schema.

<A>some text</A>

  1. If there is a choice between two strongly typed elements, the XmlSchemaSet will pick the first one.

<xs:sequence>

    <xs:element name="A" type="xs:string"/>

    <xs:element name="B" type="xs:string" minOccurs="0"/>

    <xs:element name="B" type="xs:string"/>

</xs:sequence>

In the following Xml, the B element will be associated with <xs:element name="B" type="xs:string" minOccurs="0"/> in the schema.

<A/>

<B/>

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft