[xsd-users] W3C SMIL Schema

Boris Kolpackov boris at codesynthesis.com
Thu Feb 1 07:54:27 EST 2007


Hi Mark,

Mark Watson <mark at digitalfountain.com> writes:

> Aside from a few minor bugs, these Schemas seem to have the property that
> there are mutual cross-references between namespaces. Specifically, when
> compiling the root file (smil.xsd), there are first a number of included
> files which define symbols in the smil20 namespace. Some of these use
> symbols from the smil20lang namespace, in which nothing has yet been
> defined. There are no import statements for smil20lang in these included
> files, which cause xsd to generate errors and it¹s not possible to add an
> import for smil20lang, because the definition of most things in this
> namespace relies on the smil20 stuff we are trying to define.

I've already met this same problem in GML (Geography Markup Language)
schemas. They use stripped-down (and fixed up) version of SMIL 2.0
which was fairly trivial to fix to get rid of the circular dependency
as described on this page:

http://wiki.codesynthesis.com/Schemas/GML

The full SMIL schemas requires quite a bit more splitting but I managed
to get it compiled with XSD 3.2.1. Instructions and modified schema can
be obtained from this page:

http://wiki.codesynthesis.com/Schemas/SMIL


> I am not an expert in XML, and one question I have is whether this kind of
> referencing ­ which seems not to respect any kind of compilation order ­ is
> valid in XML but just not supported by xsd, or whether it is not allowed in
> XML at all.

It is valid per XML Schema spec (though it is arguably poor design) but
not yet supported by XSD. XSD uses so-called "one source files per
schema file" compilation model where every schema file is compiled
separately and XML Schema import/include statements are mapped to
preprocessor #include directives. This results in a requirement that
every schema file be valid by itself (i.e., has all the necessary
schemas included or imported). This is not the case for SMIL.

We are planning to introduce an option in the next version of XSD
that will allow you to "collapse" all includes and imports into a
single generated source file. This should work fairly well for
schemas like SMIL.


hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20070201/665ec4dd/attachment.pgp


More information about the xsd-users mailing list