[xsd-users] Mpeg-7 schema support? Problem:

Boris Kolpackov boris at codesynthesis.com
Wed Nov 8 06:27:33 EST 2006


Hi Mattis,

On Tue, Nov 07, 2006 at 07:14:07PM -0800, Mattis Fjallstrom wrote:

> bash:~/downloads/Mpeg-7 Schema Files$ xsd cxx-tree Mpeg7-2001.xsd
> :0:0: error: Complex type 'ShotEditingTemporalDecompositionType' violates
> the Unique Particle Attribution rule in its components
> 'CompositionTransition' and 'CompositionTransition'
> 
> ---
> 
> So ... two questions, I guess - has anyone made XSD parse Mpeg-7 schemas?
> And second, does anyone know what this error really means?

The error says that the schema violates the Unique Particle Attribution
rule (UPA for short). The UPA rule requires that there is only one way
to associate, e.g., an element in an XML instance to an element
declaration in a schema. For instance, consider the following XML Schema
fragment:

<sequence>
  <element name="foo" type="string" minOccurs="0"/>
  <element name="foo" type="string" maxOccurs="unbounded"/>
</sequence>

And this instance:

<foo>foo</foo>
<foo>bar</foo>

Here the parser can associate both elements to the second declaration
in the schema or it can associate the first element to the first
declaration (the one with minOccurs="0") and the second element to the 
second declaration. Thus this schema violates the UPA rule.

I won't be able to try your schema with XSD until Monday. I will let you
know about my results.

hth,
-boris




More information about the xsd-users mailing list