[Matroska-devel] [RFC] EBML Schema

Dean Scarff dos at scarff.id.au
Wed Dec 8 11:06:13 CET 2004

Hash: SHA1

I've put together a schema (tentatively termed "EBML Schema") for a
schema for describing EBML[1] documents (whew!).  A quick search of
matroska.devel suggested this was under consideration but hasn't been
discussed since May.

Please bear with me, the rest of this message may be as confusing as
the opening sentence.  The EBML Schema schema is written in RELAX
NG[2].  It can be easily converted into an XML Schema[3].

EBML Schema instances can be made valid RELAX NG instances by using a
namespace prefix for EBML specific elements.  This allows the
*structure* of EBML files to be represented in an XML format, and
therefore existing tools for validating XML against a schema (eg
libxml2) can be leveraged.  It's also nice to provide a human-readable
alternative representation that stays reasonably true to the EBML
format.  The biggest problem that I can see is EBML's support of
multiple root elements (segments) which requires an extra root element
to wrap them all up.  I kludged the issue by using the ebml signature
(0x1a45dfa3) as a root element and nesting all segments under that.
This should be fair, since a new signature really indicates a new

The EBML Schema schema is available at:
or in XML Schema:

An EBML Schema instance for Matroska is available at:

Just in case it's still not clear: I've discussed 3 levels of XML
here.  The EBML Schema schema; instances of EBML Schema; and an XML
presentation-layer for EBML, which can be validated against instances
of EBML Schema.

As yet, I have not written a specification for EBML Schema; but the
semantics of elements are inherited from [1] and [2], with behaviour
as one expects.  However, if I receive positive feedback, I can
certainly knock up a DocBook spec.

- --

   _EBML Principles_.  Matroska Project.
   <http://www.matroska.org/technical/specs/> [accessed 08 Dec 2004].

   James CLARK, Makoto MURATA, (ed).  _RELAX NG Specificiation_.
   OASIS, 2001.

   Henry THOMPSON et al., (ed).  _XML Schema Part 1_, 2nd ed.
   W3C, 2004.

- -- 
Version: GnuPG v1.2.5 (GNU/Linux)


More information about the Matroska-devel mailing list