[Playlist] Schema files and element order

Sebastian Pipping webmaster at hartwork.org
Wed Feb 14 18:40:01 UTC 2007


Matthias Friedrich wrote:
> 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.

-------------------------------------------------------------------------
>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.

I understood that this conversions is not always possible and that XSD
is inferior to RNG in general. I read that here:

   Impossible, except for James Clark
   http://xmlhack.com/read.php?item=1847
-------------------------------------------------------------------------



> 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).

-------------------------------------------------------------------------
I disagree: In my eyes any validator should accept what's valid and
reject what's invalid. I don't see any use of a validator that
says "Your XSPF might be valid but my schema is not precise enough".
Yes, my online validator still has a problem with URIs but that will
be fixed later so my goal really is 100%.
-------------------------------------------------------------------------



> 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.

-------------------------------------------------------------------------
It is hard enough to produce valid XSPF so I think we should really
take the order off the users shoulders. Lucas had the idea of an
errata document for the spec. I think this is one of the things
that best fits on that page.

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.

Is that okay?



Sebastian




More information about the Playlist mailing list