[Playlist] Schema files and element order
Sebastian Pipping
webmaster at hartwork.org
Wed Feb 14 19:17:26 UTC 2007
Tim Mccune wrote:
>> From what I read on the net today it seems XML Schema is quite limited
>> when it comes to arbitrary order. If you find a way to do this with XSD
>> please do.
>
> Given your example, it's trivial to modify the schema so that it allows
> an arbitrary ordering. All you have to do is wrap an xsd:sequence
> element inside of
> <xsd:choice minOccurs="0" maxOccurs="unbounded">
--------------------------------------------------------------------------
I'm not sure if <choice> is the solution.
Let's look at this one:
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="abc" minOccurs="0" maxOccurs="1"/>
<xsd:element name="def" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
Doesn't this allow more than one <abc> tag in the end?
We would need <abc> at any place between <def> but maximum once.
--------------------------------------------------------------------------
>> The schema files:
>> If Matthias finds a way to fix the XSD schema - fine.
>> Otherwise I suggest we stick with Relax RNG, introduce <interleave>
>> to make the order arbitrary and generate a new XSD using Trang
>> which will probably come up with some kind of power set.
> Please don't throw out the schema simply because of your ignorance of
> the technology.
--------------------------------------------------------------------------
I am not ignorant of the technology. It just seems to me XSD
is not powerful enough. Would be great if I were wrong.
Sebastian
More information about the Playlist
mailing list