[Playlist] Schema files and element order

Matthias Friedrich matt at mafr.de
Wed Feb 14 18:07:24 UTC 2007


On Wednesday, 2007-02-14, Sebastian Pipping wrote:
> Lucas Gonze wrote:

>> The XSD problem is totally stupid and annoying, since it pushes the
>> validator's maldesign into the underlying spec.  That said, there
>> isn't a lot to be done about it, except I suppose to deemphasize XML
>> Schema validation relative to Relax NG.  That was the reason why
>> Matthias created the improved 2nd generation RNG code.  Or should we
>> be more draconian and declare XML Schema to be unable to do the job at
>> all?

The order of elements in XML matters, that's nothing unusual and it
has always been like that. If you want to allow an arbitrary order of
elements in the schema, then there are ways to do it. It works both
in XML Schema and in RelaxNG because they are functionally equivalent
(mostly, but the exceptions are irrelevant here). In fact you can
convert schemas from one format to another automatically.

BTW: One problem with arbitrary element order is that validators can't
generate proper order messages.

According to the schemas, only a subset of the playlists permitted
by the spec are valid. This is no problem, the schemas are intended
for application developers to check if their generated playlists are
valid. If they pass the schema test, they are and other XSPF-compliant
applications have to support them. If they are not, then applications
may still be able to read them (Postel's principle here).

Unfortunately, this doesn't necessarily mean they are invalid according
to the spec. I would have preferred the spec to be stricter with element
ordering, but there was no consensus on this, IIRC.

Cheers,
	Matthias



More information about the Playlist mailing list