The DTD for CMML is quite short and produces flat hierarchies. It follows an intention to create the minimal necessary markup and although tags were copied from HTML, attributes and elements were selected carefully. The inclusion of further tags is possible, but only when there is a proven need for it. Incompatible changes will result in a change of the major version number of CMML, while compatible changes, such as optional extensions, only change the minor version number.
To get a better understanding of the components in libcmml it is recommended to read the DTD:
<!--
Continuous Media Markup Language
CMML version 2.0 DTD
Authoring language for ANNODEX(TM) media.
Namespace = http:
Copyright (c) 2001
Commonwealth Scientific and Industrial Research Organisation
(CSIRO), Australia.
All Rights Reserved.
This DTD module is identified by the PUBLIC and SYSTEM identifiers:
PUBLIC "-
SYSTEM "http:
$Revision: 1.2 $
$Date: 2004/01/01 05:25:33 $
-->
<!-- **************************** -->
<!-- Definition of Imported Names -->
<!-- **************************** -->
<!-- media type, as per [RFC2045] -->
<!ENTITY % ContentType "CDATA">
<!-- a Uniform Resource Identifier, see [RFC2396] -->
<!ENTITY % URI "CDATA">
<!-- a language code, as per [RFC1766] -->
<!ENTITY % LanguageCode "NMTOKEN">
<!-- internationalization attributes
xml:lang language code (as per XML 1.0 spec)
dir direction for weak/neutral text
-->
<!ENTITY % i18n
"lang %LanguageCode; #IMPLIED
dir (ltr|rtl) #IMPLIED"
>
<!-- timestamps similar to [RFC2326]
"smpte-24:" SMPTE time with a 24 fps basis
"smpte-24-drop:" SMPTE time with a 24/1.001 fps basis
"smpte-25:" SMPTE time with a 25 fps basis
"smpte-30:" SMPTE time with a 30 fps basis
"smpte-30-drop:" SMPTE time with a 30/1.001 fps basis
"smpte-50:" SMPTE time with a 50 fps basis
"smpte-60:" SMPTE time with a 60 fps basis
"smpte-60-drop:" SMPTE time with a 60/1.001 fps basis
"npt:" npt-time
"clock:" utc-time
Playbacktime is specified as a smpte-time
or npt-time only.
UTCtime is specified as in [RFC2326], but
without the "clock" identifier
-->
<!ENTITY % Timestamp "CDATA">
<!ENTITY % Playbacktime "CDATA">
<!ENTITY % UTCtime "CDATA">
<!-- **************************** -->
<!-- Document Structure -->
<!-- **************************** -->
<!-- ROOT ELEMENT: -->
<!-- cmml tag containing sequence of head and a tags -->
<!-- =============================================== -->
<!-- i18n = the default language for the whole document including
the id tag of the cmml element -->
<!-- xmlns = namespace of the cmml tags -->
<!ELEMENT cmml (stream?, head, clip*)>
<!ATTLIST cmml
%i18n;
id ID #IMPLIED
xmlns %URI; #FIXED 'http://www.annodex.net/cmml'
>
<!-- **************************** -->
<!-- Definition of stream element -->
<!-- **************************** -->
<!-- STREAM tag providing timing information for the ANNODEX file -->
<!-- (will be stored in the binary headers of the ANX bitstreams) -->
<!-- ============================================================ -->
<!-- (has no text attributes and thus no i18n; id tag follows default
language specified in cmml tag) -->
<!-- timebase = base time associated with the first frame of the media
document from which subsequent time references (such as
in clip tags) will be taken relative to -->
<!-- utc = a mapping of the first frame to clock time;
specifications of utc time offsets into the document as
in a URI will be taken relative to this -->
<!ELEMENT stream (import*)>
<!ATTLIST stream
id ID #IMPLIED
timebase %Playbacktime; "0"
utc %UTCtime; #IMPLIED
>
<!-- IMPORT tag giving descriptions on an input bitstream (empty content) -->
<!-- ==================================================================== -->
<!-- i18n = the language of the import tag's and the contained param
tags' attribute values -->
<!-- granulerate = the base temporal resolution of the bitstream (e.g.
its framerate for video or samplerate for audio) -->
<!-- contenttype = encoding format of the input document (a MIME type and
a character encoding separated by semicolon) -->
<!-- src = URI to the media document -->
<!-- start = the start time of the media bitstream specified
in src -->
<!-- end = the end time of the media bitstream specified
in src -->
<!-- title = human readable comment on the import bitstream -->
<!ELEMENT import (param*)>
<!ATTLIST import
%i18n;
id ID #IMPLIED
granulerate CDATA #IMPLIED
contenttype %ContentType; #IMPLIED
src %URI; #REQUIRED
start %Timestamp; "0"
end %Timestamp; #IMPLIED
title CDATA #IMPLIED
>
<!-- PARAM description tags of an input bitstream (empty content) -->
<!-- (name-value pairs e.g. comments on recording quality or so) -->
<!-- ============================================================== -->
<!-- (internationalisation inherited from the parent import tag) -->
<!-- name = identifies a property name; does not list legal values for this
attribute -->
<!-- value = specifies a property's value; does not list legal values for
this attribute -->
<!ELEMENT param EMPTY>
<!ATTLIST param
id ID #IMPLIED
name CDATA #REQUIRED
value CDATA #REQUIRED
>
<!-- **************************** -->
<!-- Definition of document head -->
<!-- **************************** -->
<!-- head tag containing description of a specific media document -->
<!-- ============================================================ -->
<!-- i18n = the base language of the head's attribute values and text
content -->
<!-- profile = space-separated list of URIs to locate meta tag schemes -->
<!ELEMENT head (meta*,
((title, meta*, (base, meta*)?) |
(base, meta*, (title, meta*)?)))>
<!ATTLIST head
%i18n;
id ID #IMPLIED
profile %URI; #IMPLIED
>
<!-- TITLE tag giving descriptive title of the media document -->
<!-- ========================================================= -->
<!-- i18n = the language of the title text -->
<!ELEMENT title (#PCDATA)>
<!ATTLIST title
%i18n;
id ID #IMPLIED
>
<!-- BASE URI of the document (empty content) -->
<!-- ======================================== -->
<!-- (internationalisation inherited from the parent head tag) -->
<!-- href = URI associated with the document; all relative URI references
get interpreted relative to this base -->
<!ELEMENT base EMPTY>
<!ATTLIST base
id ID #IMPLIED
href %URI; #REQUIRED
>
<!-- META description tags of the document (empty content) -->
<!-- ===================================================== -->
<!-- i18n = the language of the meta attributes -->
<!-- name = identifies a property name; does not list legal values for this
attribute -->
<!-- content = specifies a property's value; does not list legal values for
this attribute -->
<!-- scheme = names a scheme to be used to interpret the property's value
(see the profiles tag in the head element for locating these) -->
<!ELEMENT meta EMPTY>
<!ATTLIST meta
%i18n;
id ID #IMPLIED
name NMTOKEN #IMPLIED
content CDATA #REQUIRED
scheme CDATA #IMPLIED
>
<!-- ************************** -->
<!-- Definition of clip tags -->
<!-- ************************** -->
<!-- Clip tag containing information for a specific fragment -->
<!-- ======================================================= -->
<!-- though meta, a, img and desc are given in specific order
here, their order is acutally random -->
<!-- i18n = the base language of the clip's attribute values and
of its content elements -->
<!-- id = name of the clip used in URI clip references -->
<!-- track = defines different sets of clip tags; clip tags of same
type cannot overlap temporally -->
<!-- start = specifies the start time of the clip; specified in
time relative to the timebase of the header
[NOT INCLUDED IN ANNODEX DOCUMENT] -->
<!-- end = specifies the end time of the clip; specified in
time relative to the timebase of the header
[NOT INCLUDED IN ANNODEX DOCUMENT] -->
<!ELEMENT clip (meta*, a?, img?, desc?)>
<!ATTLIST clip
%i18n;
id ID #IMPLIED
track CDATA "default"
start %Timestamp; #REQUIRED
end %Timestamp; #IMPLIED
>
<!-- A tag containing information for a specific clip -->
<!-- ================================================ -->
<!-- a tag contains anchor text being a textual description of the link
between the current element (the source anchor) and the destination
anchor given by the href attribute -->
<!-- i18n = language of the anchor's attribute values and anchor text -->
<!-- class = overriding style sheet defaults for this instance -->
<!-- href = specifies the location of a Web resource, thus defining a
link between the current element (the source anchor) and the
destination anchor given by this attribute -->
<!ELEMENT a (#PCDATA)>
<!ATTLIST a
%i18n;
id ID #IMPLIED
class CDATA #IMPLIED
href %URI; #REQUIRED
>
<!-- IMG tag to include a representative image for the clip -->
<!-- ====================================================== -->
<!-- i18n = language of the image's attribute values -->
<!-- src = reference to the image -->
<!-- alt = alternative text for the image (accessibility) -->
<!ELEMENT img EMPTY>
<!ATTLIST img
%i18n;
id ID #IMPLIED
src %URI; #REQUIRED
alt CDATA #IMPLIED
>
<!-- DESC human-readable, textual description of the clip (annotation) -->
<!-- ================================================================= -->
<!-- i18n = language of the data in the description -->
<!ELEMENT desc (#PCDATA)>
<!ATTLIST desc
%i18n;
id ID #IMPLIED
>