Unique Particle Attribution
From Wikipedia, the free encyclopedia
| This article is an orphan, as few or no other articles link to it. Please introduce links to this page from related articles; suggestions may be available. (February 2009) |
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.
The W3C XML Schema workgroup is considering so called "weak wildcards" for XML Schema version 1.1. Using weak wildcards, the explicit element declaration would always take precedence over the wildcard, thus removing the ambiguity.