Unique Particle Attribution

The Unique Particle Attribution (UPA) rule is a mechanism to prevent ambiguity in W3C XML Schema version 1.0. Due to the UPA rule the XML schema fragment given below is prohibited:

<xsd:sequence>
<xsd:element name="x" type="xsd:integer" minOccurs="0"/>
<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
</xsd:sequence>

Given the XML instance fragment:

<x>42</x>

it is ambiguous whether <x> should be associated with the element declaration (xsd:element name="x"), or the wildcard (xsd:any). This ambiguity violates the UPA rule and the corresponding XML schema therefore needs to be rejected by XML schema processors compliant to W3C XML Schema version 1.0.

This particular example no longer violates the Unique Particle Attribute constraint in XML Schema version 1.1, which disambiguates it by saying that when an element matches both an element particle and a wildcard, the element particle wins. However, the UPA constraint itself remains in version 1.1.

## External links

* Article "UPA in plain English"
* Article "Understanding the Unique Particle Attribution Constraint"
* XML Schema 1.0: Schema Component Constraint: Unique Particle Attribution
* An Approach for Evolving XML Vocabularies Using XML Schema
* XML Schema 1.1 Part 1: Structures
* XML Schema 1.1 Part 2: Datatypes

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Unique Particle Attribution. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Unique_Particle_Attribution&oldid=258522"