[Matroska-devel] [RFC] EBML Schema

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


-----BEGIN PGP SIGNED MESSAGE-----
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
document.

The EBML Schema schema is available at:
<http://scarff.id.au/ns/EBMLschema/0.2RFC/ebml-schema.rng>
or in XML Schema:
<http://scarff.id.au/ns/EBMLschema/0.2RFC/ebml-schema.xsd>

An EBML Schema instance for Matroska is available at:
<http://scarff.id.au/ns/EBML/Matroska%200.2RFC/matroska.xml>

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.

- --
References:

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

 [2]
   James CLARK, Makoto MURATA, (ed).  _RELAX NG Specificiation_.
   OASIS, 2001.
   <http://relaxng.org/spec-20011203.html>.

 [3]
   Henry THOMPSON et al., (ed).  _XML Schema Part 1_, 2nd ed.
   W3C, 2004.
   <http://www.w3.org/TR/xmlschema-1/>.

- -- 
Dean
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBttIXPs40JFRfzR0RAmsFAKC6WbjMc8p3bQNEIZxVE0bgpcHh9gCeL2Dc
MXwj+rHIn5k2XJ6U+9EwtMo=
=cPij
-----END PGP SIGNATURE-----




More information about the Matroska-devel mailing list