[cvs-annodex] commit (/annodex): libcmml/trunk/Win32/config.h libcmml/trunk/configure.ac libcmml/trunk/doc/Makefile.am libcmml/trunk/examples/cmml-write.c libcmml/trunk/src/cmml.c libcmml/trunk/src/cmml.h libcmml/trunk/src/cmml_element.c libcmml/trunk/src/cmml_private.c libcmml/trunk/src/cmml_private.h libcmml/trunk/tests/Makefile.am libcmml/trunk/tests/error1.cmml libcmml/trunk/tests/error1.cmml.correct libcmml/trunk/tests/error10.cmml libcmml/trunk/tests/error10.cmml.correct libcmml/trunk/tests/error11.cmml libcmml/trunk/tests/error12.cmml libcmml/trunk/tests/error13.cmml libcmml/trunk/tests/error14.cmml libcmml/trunk/tests/error15.cmml libcmml/trunk/tests/error15.cmml.correct libcmml/trunk/tests/error2.cmml libcmml/trunk/tests/error2.cmml.correct libcmml/trunk/tests/error3.cmml libcmml/trunk/tests/error3.cmml.correct libcmml/trunk/tests/error4.cmml libcmml/trunk/tests/error4.cmml.correct libcmml/trunk/tests/error5.cmml libcmml/trunk/tests/error6.cmml libcmml/trunk/tests/error6.cmml.correct libcmml/trunk/tests/error7.cmml libcmml/trunk/tests/error9.cmml libcmml/trunk/tests/error9.cmml.correct libcmml/trunk/tests/i18n.cmml libcmml/trunk/tests/i18n.cmml.correct libcmml/trunk/tests/simple.cmml libcmml/trunk/tests/simple.cmml.correct libcmml/trunk/tests/special1.cmml libcmml/trunk/tests/special2.cmml libcmml/trunk/tools/cmml-fortune.c

silvia nobody at lists.annodex.net
Mon Apr 11 23:38:04 EST 2005


Update of /annodex (new revision 1237)

Modified files:
   libcmml/trunk/Win32/config.h
   libcmml/trunk/configure.ac
   libcmml/trunk/doc/Makefile.am
   libcmml/trunk/examples/cmml-write.c
   libcmml/trunk/src/cmml.c
   libcmml/trunk/src/cmml.h
   libcmml/trunk/src/cmml_element.c
   libcmml/trunk/src/cmml_private.c
   libcmml/trunk/src/cmml_private.h
   libcmml/trunk/tests/Makefile.am
   libcmml/trunk/tests/error1.cmml
   libcmml/trunk/tests/error1.cmml.correct
   libcmml/trunk/tests/error10.cmml
   libcmml/trunk/tests/error10.cmml.correct
   libcmml/trunk/tests/error11.cmml
   libcmml/trunk/tests/error12.cmml
   libcmml/trunk/tests/error13.cmml
   libcmml/trunk/tests/error14.cmml
   libcmml/trunk/tests/error15.cmml
   libcmml/trunk/tests/error15.cmml.correct
   libcmml/trunk/tests/error2.cmml
   libcmml/trunk/tests/error2.cmml.correct
   libcmml/trunk/tests/error3.cmml
   libcmml/trunk/tests/error3.cmml.correct
   libcmml/trunk/tests/error4.cmml
   libcmml/trunk/tests/error4.cmml.correct
   libcmml/trunk/tests/error5.cmml
   libcmml/trunk/tests/error6.cmml
   libcmml/trunk/tests/error6.cmml.correct
   libcmml/trunk/tests/error7.cmml
   libcmml/trunk/tests/error9.cmml
   libcmml/trunk/tests/error9.cmml.correct
   libcmml/trunk/tests/i18n.cmml
   libcmml/trunk/tests/i18n.cmml.correct
   libcmml/trunk/tests/simple.cmml
   libcmml/trunk/tests/simple.cmml.correct
   libcmml/trunk/tests/special1.cmml
   libcmml/trunk/tests/special2.cmml
   libcmml/trunk/tools/cmml-fortune.c

Log Message:
Put CMML 2.1 support back in.
This is necessary for supporting the link tag.



Modified: libcmml/trunk/Win32/config.h
===================================================================
--- libcmml/trunk/Win32/config.h	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/Win32/config.h	2005-04-11 13:37:59 UTC (rev 1237)
@@ -74,7 +74,7 @@
 #define STDC_HEADERS 1
 
 /* Version number of package */
-#define VERSION "0.8.3"
+#define VERSION "0.9.0"
 
 /* Define to 1 if your processor stores words with the most significant byte
    first (like Motorola and SPARC, unlike Intel and VAX). */

Modified: libcmml/trunk/configure.ac
===================================================================
--- libcmml/trunk/configure.ac	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/configure.ac	2005-04-11 13:37:59 UTC (rev 1237)
@@ -5,10 +5,10 @@
 AC_PREREQ(2.53)
 AC_CANONICAL_TARGET
 
-AM_INIT_AUTOMAKE(libcmml,0.8.3)
+AM_INIT_AUTOMAKE(libcmml,0.9.0)
 AM_CONFIG_HEADER(config.h)
 
-SHARED_VERSION_INFO="0:8:0"
+SHARED_VERSION_INFO="0:9:0"
 SHLIB_VERSION_ARG=""
 
 # Checks for programs.
@@ -209,7 +209,6 @@
 **
 **  Type 'make check' to test $PACKAGE on the files *.cmml 
 **  contained in the tests directory.
-**
 **  ${TESTS_INFO}
 **
 ------------------------------------------------------------------------

Modified: libcmml/trunk/doc/Makefile.am
===================================================================
--- libcmml/trunk/doc/Makefile.am	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/doc/Makefile.am	2005-04-11 13:37:59 UTC (rev 1237)
@@ -35,7 +35,7 @@
 CLEANFILES = doxygen-build.stamp
 
 EXTRA_DIST = Doxyfile.in cmml.dtd \
-             cmml_dox.h \
+             cmml_dox.h cmml_2_0.dtd cmml_2_1.dtd \
              cmml-validate.1.sgml.in cmml-validate.1 \
              cmml-fix.1.sgml.in cmml-fix.1 \
              cmml-fortune.6.sgml.in cmml-fortune.6

Modified: libcmml/trunk/examples/cmml-write.c
===================================================================
--- libcmml/trunk/examples/cmml-write.c	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/examples/cmml-write.c	2005-04-11 13:37:59 UTC (rev 1237)
@@ -56,7 +56,7 @@
   char buf[BUFSIZE];
 
   /* write preamble */
-  pre = cmml_preamble_new("UTF-8", NULL, NULL, NULL);
+  pre = cmml_preamble_new("UTF-8", NULL, NULL, NULL, NULL);
   cmml_preamble_snprint (buf, BUFSIZE, pre);
   puts(buf);
   cmml_preamble_destroy(pre);

Modified: libcmml/trunk/src/cmml.c
===================================================================
--- libcmml/trunk/src/cmml.c	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/src/cmml.c	2005-04-11 13:37:59 UTC (rev 1237)
@@ -251,7 +251,8 @@
   i = cmml_preamble_new(context->status->info->xml_encoding,
 	  context->status->info->cmml_id,
 	  context->status->info->cmml_lang,
-	  context->status->info->cmml_dir);
+	  context->status->info->cmml_dir,
+	  context->status->info->cmml_granulerate);
   if (context->status->info->xml_version != NULL) {
 	  i->xml_version    = context->status->info->xml_version;
   }
@@ -376,8 +377,8 @@
   }
 
   /* if seek time is in past, return error */
-  if (ctxt->status->stream != NULL && ctxt->status->stream->timebase != NULL) {
-    if (seconds <  ctxt->status->stream->timebase->t.sec) {
+  if (ctxt->status->stream != NULL && ctxt->status->stream->basetime != NULL) {
+    if (seconds <  ctxt->status->stream->basetime->t.sec) {
       /* stream starts beyond that time */
       return -1;
     }
@@ -427,7 +428,7 @@
   if (ctxt->status->seek_type == _CMML_SEEK_FOUND && 
       ctxt->status->seek_secs < 0.0) {
     ctxt->status->seek_type = _CMML_SEEK_NONE;
-    return ctxt->status->stream->timebase->t.sec;
+    return ctxt->status->stream->basetime->t.sec;
   }
   
   ctxt->status->seek_type = _CMML_SEEK_NONE;
@@ -464,7 +465,7 @@
   fprintf(stderr, "Seeking %s\n", bufutc);
 #endif
 
-  /* if necessary, parse stream tag to get utc timebase */
+  /* if necessary, parse stream tag to get utc basetime */
   if (cmml_parse_to_head(ctxt)!=0) {
     return -1;
   }
@@ -480,14 +481,14 @@
 #ifdef DEBUG
   fprintf(stderr, "difference between: %s and %s\n", utcstr, ctxt->status->stream->utc->tstr);
   fprintf(stderr, "time difference seeking: %f and offset %f\n", difference,
-	  ctxt->status->stream->timebase->t.sec);
+	  ctxt->status->stream->basetime->t.sec);
 #endif
   if (difference < 0) {
     /* utc time is before start of file's utc time */
     return -1.0;
   }
   /* calculate corresponding offset in seconds into the file */
-  difference += ctxt->status->stream->timebase->t.sec;
+  difference += ctxt->status->stream->basetime->t.sec;
 #ifdef DEBUG
   fprintf(stderr, "time difference seeking: %f\n", difference);
 #endif

Modified: libcmml/trunk/src/cmml.h
===================================================================
--- libcmml/trunk/src/cmml.h	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/src/cmml.h	2005-04-11 13:37:59 UTC (rev 1237)
@@ -142,6 +142,7 @@
   char *cmml_dir;         /**< dir attribute of cmml tag */
   char *cmml_id;          /**< id attribute of cmml tag */
   char *cmml_xmlns;       /**< xmlns attribute of cmml tag */
+  char *cmml_granulerate; /**< granulerate attribute of cmml tag */
 } CMML_Preamble;
 
 
@@ -180,7 +181,7 @@
  */
 typedef struct {
   char *id;             /**< id attribute of stream element */
-  CMML_Time * timebase; /**< timebase attribute of stream element */
+  CMML_Time * basetime; /**< basetime attribute of stream element */
   CMML_Time * utc;      /**< utc attribute of stream element */
   CMML_List * import;   /**< list of import elements */
 } CMML_Stream;
@@ -200,6 +201,23 @@
 } CMML_MetaElement;
 
 /**
+ * CMML_LinkElement: a struct to keep the details of the link tag in
+ * either a head or a clip
+ */
+typedef struct {
+  char *id;      /**< id attribute of link */
+  char *class;   /**< class attribute of link */
+  char *title;   /**< title attribute of link */
+  char *lang;    /**< language code of link */
+  char *dir;     /**< directionality of lang (ltr/rtl) */
+  char *href;    /**< href attribute of link */
+  char *type;    /**< type attribute of link */
+  char *rel;     /**< rel attribute of link */
+  char *rev;     /**< rev attribute of link */
+  char *media;   /**< media attribute of link */
+} CMML_LinkElement;
+
+/**
  * CMML_Head: a head element as presented in the CMML document.
  */
 typedef struct {
@@ -214,6 +232,7 @@
   char *base_id;    /**< id attribute of base element */
   char *base_href;  /**< href attribute of base element */
   CMML_List * meta; /**< list of meta elements */
+  CMML_List * link; /**< list of link elements */
 } CMML_Head;
 
 
@@ -222,6 +241,8 @@
  */
 typedef struct {
   char *clip_id;         /**< id attribute of clip */
+  char *class;           /**< class attribute of clip */
+  char *title;           /**< title attribute of clip */
   char *lang;            /**< language attribute of desc element */
   char *dir;             /**< directionality of lang */
   char *track;           /**< track attribute of clip */
@@ -230,16 +251,21 @@
   CMML_List * meta;      /**< list of meta elements */
   char *anchor_id;       /**< id attribute of anchor */
   char *anchor_class;    /**< class attribute of clip */
+  char *anchor_title;    /**< title attribute of clip */
   char *anchor_lang;     /**< language of anchor */
   char *anchor_dir;      /**< directionality of lang */
   char *anchor_href;     /**< href out of clip */
   char *anchor_text;     /**< anchor text */
   char *img_id;          /**< id attribute of image */
+  char *img_class;       /**< class attribute of image */
+  char *img_title;       /**< title attribute of image */
   char *img_lang;        /**< language of img */
   char *img_dir;         /**< directionality of lang */
   char *img_src;         /**< keyframe image of clip */
   char *img_alt;         /**< alternate text for image */
   char *desc_id;         /**< id attribute of desc */
+  char *desc_class;      /**< class attribute of desc */
+  char *desc_title;      /**< title attribute of desc */
   char *desc_lang;       /**< language attribute of desc element */
   char *desc_dir;        /**< directionality of lang */
   char *desc_text;       /**< the description itself */
@@ -594,10 +620,11 @@
  * \param id the id attribute of the cmml tag; not used if NULL
  * \param lang the lang attribute of the cmml tag; not used if NULL
  * \param dir the dir attribute of the cmml tag; not used if NULL
+ * \param granulerate the granulerate attribute of the cmml tag; not used if NULL
  *
  * \returns a CMML preamble
  */
-CMML_Preamble * cmml_preamble_new (char *encoding, char *id, char *lang, char *dir);
+CMML_Preamble * cmml_preamble_new (char *encoding, char *id, char *lang, char *dir, char *granulerate);
 
 /**
  * cmml_element_new: Create a new CMML_Element.
@@ -1053,7 +1080,7 @@
  *
  * \param s the string that contains the time spec
  * \param ref the reference utc time if given in the stream tag
- * \param base the timebase in seconds as given in the stream tag
+ * \param base the basetime in seconds as given in the stream tag
  *
  * \returns a time structure in seconds
  */
@@ -1061,11 +1088,11 @@
 
 /**
  * cmml_time_utc_to_sec: Convert a time from utc to seconds with
- * reference to a timebase
+ * reference to a basetime
  *
  * \param t the given time struct
  * \param ref the reference utc time if given in the stream tag
- * \param base the timebase in seconds as given in the stream tag
+ * \param base the basetime in seconds as given in the stream tag
  *
  * \returns a time structure in seconds
  */

Modified: libcmml/trunk/src/cmml_element.c
===================================================================
--- libcmml/trunk/src/cmml_element.c	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/src/cmml_element.c	2005-04-11 13:37:59 UTC (rev 1237)
@@ -54,7 +54,7 @@
  * cmml_preamble_new: Create a new CMML_Preamble.
  */
 CMML_Preamble * 
-cmml_preamble_new (char *encoding, char *id, char *lang, char *dir)
+cmml_preamble_new (char *encoding, char *id, char *lang, char *dir, char *granulerate)
 {
   CMML_Preamble * p;
   p = (CMML_Preamble *) cmml_malloc(sizeof(CMML_Preamble));
@@ -81,6 +81,11 @@
   } else {
     p->cmml_id = NULL;
   }
+  if (granulerate) {
+    p->cmml_granulerate = cmml_strdup(granulerate);
+  } else {
+    p->cmml_granulerate = NULL;
+  }
   p->cmml_xmlns = cmml_strdup("http://www.annodex.net/cmml");
   return p;
 }
@@ -119,7 +124,7 @@
   CMML_Stream * s;
   s = (CMML_Stream *) cmml_malloc(sizeof(CMML_Stream));
   s->id = NULL;
-  s->timebase = NULL;
+  s->basetime = NULL;
   s->utc = NULL;
   s->import = cmml_list_new();
   return s;
@@ -141,6 +146,7 @@
   h->base_id = NULL;
   h->base_href = NULL;
   h->meta = cmml_list_new();
+  h->link = cmml_list_new();
   return h;
 }
 
@@ -150,6 +156,8 @@
   CMML_Clip * a;
   a = (CMML_Clip *) cmml_malloc(sizeof(CMML_Clip));
   a->clip_id      = NULL;
+  a->class        = NULL;
+  a->title        = NULL;
   a->lang         = NULL;
   a->dir          = NULL;
   a->track        = NULL;
@@ -158,16 +166,21 @@
   a->meta         = cmml_list_new();
   a->anchor_id    = NULL;
   a->anchor_class = NULL;
+  a->anchor_title = NULL;
   a->anchor_lang  = NULL;
   a->anchor_dir   = NULL;
   a->anchor_href  = NULL;
   a->anchor_text  = NULL;
   a->img_id       = NULL;
+  a->img_class    = NULL;
+  a->img_title    = NULL;
   a->img_lang     = NULL;
   a->img_dir      = NULL;
   a->img_src      = NULL;
   a->img_alt      = NULL;
   a->desc_id      = NULL;
+  a->desc_class   = NULL;
+  a->desc_title   = NULL;
   a->desc_lang    = NULL;
   a->desc_dir     = NULL;
   a->desc_text    = NULL;
@@ -248,7 +261,30 @@
   return new_meta;
 }
 
+static CMML_LinkElement *
+cmml_link_element_clone (CMML_LinkElement * link)
+{
+  CMML_LinkElement * new_link;
 
+  if (link == NULL) return NULL;
+
+  new_link = (CMML_LinkElement* ) cmml_malloc (sizeof(CMML_LinkElement));
+  /* maybe consider memcpy for speedup and introduce reference counting!
+     memcpy (new_link, link, sizeof (*new_link));
+  */
+  new_link->id      = cmml_strdup (link->id);
+  new_link->class   = cmml_strdup (link->class);
+  new_link->title   = cmml_strdup (link->title);
+  new_link->lang    = cmml_strdup (link->lang);
+  new_link->dir     = cmml_strdup (link->dir);
+  new_link->href    = cmml_strdup (link->href);
+  new_link->type    = cmml_strdup (link->type);
+  new_link->rel     = cmml_strdup (link->rel);
+  new_link->rev     = cmml_strdup (link->rev);
+  new_link->media   = cmml_strdup (link->media);
+  return new_link;
+}
+
 CMML_Preamble * 
 cmml_preamble_clone (CMML_Preamble * src)
 {
@@ -263,6 +299,7 @@
   p->cmml_dir         = cmml_strdup(src->cmml_dir);
   p->cmml_id          = cmml_strdup(src->cmml_id);
   p->cmml_xmlns       = cmml_strdup(src->cmml_xmlns);
+  p->cmml_granulerate = cmml_strdup(src->cmml_granulerate);
   return p;
 }
 
@@ -303,7 +340,7 @@
   memcpy (s, src, sizeof (*s));
   */
   s->id       = cmml_strdup(src->id);
-  s->timebase = cmml_time_clone(src->timebase);
+  s->basetime = cmml_time_clone(src->basetime);
   if (src->utc != NULL) {
     s->utc      = cmml_time_clone(src->utc);
   } else {
@@ -336,6 +373,8 @@
   new_head->base_href  = cmml_strdup(head->base_href);
   new_head->meta =
     cmml_list_clone_with (head->meta, (CMML_CloneFunc)cmml_meta_element_clone);
+  new_head->link =
+    cmml_list_clone_with (head->link, (CMML_CloneFunc)cmml_link_element_clone);
   return new_head;
 }
 
@@ -349,6 +388,8 @@
   memcpy (a, src, sizeof (*a));
   */
   a->clip_id    = cmml_strdup(src->clip_id);
+  a->class      = cmml_strdup(src->class);
+  a->title      = cmml_strdup(src->title);
   a->lang       = cmml_strdup(src->lang);
   a->dir        = cmml_strdup(src->dir);
   a->track      = cmml_strdup(src->track);
@@ -358,16 +399,21 @@
     cmml_list_clone_with (src->meta, (CMML_CloneFunc)cmml_meta_element_clone);
   a->anchor_id       = cmml_strdup(src->anchor_id);
   a->anchor_class    = cmml_strdup(src->anchor_class);
+  a->anchor_title    = cmml_strdup(src->anchor_title);
   a->anchor_lang     = cmml_strdup(src->anchor_lang);
   a->anchor_dir      = cmml_strdup(src->anchor_dir);
   a->anchor_href     = cmml_strdup(src->anchor_href);
   a->anchor_text     = cmml_strdup(src->anchor_text);
   a->img_id       = cmml_strdup(src->img_id);
+  a->img_class    = cmml_strdup(src->img_class);
+  a->img_title    = cmml_strdup(src->img_title);
   a->img_lang     = cmml_strdup(src->img_lang);
   a->img_dir      = cmml_strdup(src->img_dir);
   a->img_src      = cmml_strdup(src->img_src);
   a->img_alt      = cmml_strdup(src->img_alt);
   a->desc_id      = cmml_strdup(src->desc_id);
+  a->desc_class   = cmml_strdup(src->desc_class);
+  a->desc_title   = cmml_strdup(src->desc_title);
   a->desc_lang    = cmml_strdup(src->desc_lang);
   a->desc_dir     = cmml_strdup(src->desc_dir);
   a->desc_text    = cmml_strdup(src->desc_text);
@@ -420,6 +466,23 @@
   return NULL;
 }
 
+CMML_LinkElement *
+cmml_link_element_destroy (CMML_LinkElement * link)
+{
+  if (link == NULL) return NULL;
+  cmml_free (link->id);
+  cmml_free (link->class);
+  cmml_free (link->title);
+  cmml_free (link->lang);
+  cmml_free (link->dir);
+  cmml_free (link->href);
+  cmml_free (link->type);
+  cmml_free (link->rel);
+  cmml_free (link->rev);
+  cmml_free (link->media);
+  return NULL;
+}
+
 void
 cmml_preamble_destroy(CMML_Preamble * info)
 {
@@ -430,6 +493,7 @@
   cmml_free(info->cmml_dir);
   cmml_free(info->cmml_id);
   cmml_free(info->cmml_xmlns);
+  cmml_free(info->cmml_granulerate);
   cmml_free(info);
   return;
 }
@@ -465,7 +529,7 @@
 {
   if (s == NULL) return;
   cmml_free(s->id);
-  cmml_time_free(s->timebase);
+  cmml_time_free(s->basetime);
   cmml_time_free(s->utc);
   cmml_list_free_with(s->import, (CMML_FreeFunc) cmml_import_element_destroy);
   cmml_free(s);
@@ -490,6 +554,7 @@
   cmml_free(h->base_id);
   cmml_free(h->base_href);
   cmml_list_free_with(h->meta, (CMML_FreeFunc) cmml_meta_element_destroy);
+  cmml_list_free_with(h->link, (CMML_FreeFunc) cmml_link_element_destroy);
   cmml_free(h);
   return;
 }
@@ -502,6 +567,8 @@
 {
   if (a == NULL) return;
   cmml_free(a->clip_id);
+  cmml_free(a->class);
+  cmml_free(a->title);
   cmml_free(a->lang);
   cmml_free(a->dir);
   cmml_free(a->track);
@@ -510,16 +577,21 @@
   cmml_list_free_with(a->meta, (CMML_FreeFunc) cmml_meta_element_destroy);
   cmml_free(a->anchor_id);
   cmml_free(a->anchor_class);
+  cmml_free(a->anchor_title);
   cmml_free(a->anchor_lang);
   cmml_free(a->anchor_dir);
   cmml_free(a->anchor_href);
   cmml_free(a->anchor_text);
   cmml_free(a->img_id);
+  cmml_free(a->img_class);
+  cmml_free(a->img_title);
   cmml_free(a->img_lang);
   cmml_free(a->img_dir);
   cmml_free(a->img_src);
   cmml_free(a->img_alt);
   cmml_free(a->desc_id);
+  cmml_free(a->desc_class);
+  cmml_free(a->desc_title);
   cmml_free(a->desc_lang);
   cmml_free(a->desc_dir);
   cmml_free(a->desc_text);
@@ -652,6 +724,43 @@
   return 0;
 }
 
+/* return number of characters written */
+static
+int cmml_link_list_snprint (char *buf, int *_len, int *_n, int *_n_written, 
+			    CMML_List * link)
+{
+  int len = *_len;
+  int n = *_n;
+  int n_written = *_n_written;
+  
+  if (!cmml_list_is_empty(link)) {
+    CMML_List * link_node;
+      
+    for (link_node = link;
+	 link_node != NULL;
+	 link_node = link_node->next) {
+      CMML_LinkElement * l = (CMML_LinkElement *) link_node->data;
+	
+      BEGIN_TAG("link");
+      APPEND_ATTRIBUTE("id", l->id);
+      APPEND_ATTRIBUTE("class", l->class);
+      APPEND_ATTRIBUTE("title", l->title);
+      APPEND_ATTRIBUTE("lang", l->lang);
+      APPEND_ATTRIBUTE("dir", l->dir);
+      APPEND_ATTRIBUTE("href", l->href);
+      APPEND_ATTRIBUTE("type", l->type);
+      APPEND_ATTRIBUTE("rel", l->rel);
+      APPEND_ATTRIBUTE("rev", l->rev);
+      APPEND_ATTRIBUTE("media", l->media);
+      END_EMPTY_TAG();
+      NEWLINE;
+    }
+  }
+  *_len = len;
+  *_n = n;
+  *_n_written = n_written;
+  return 0;
+}
 
 int
 cmml_preamble_snprint(char *buf, int n, CMML_Preamble *pre)
@@ -698,6 +807,7 @@
   /* to print or not to print?
   APPEND_ATTRIBUTE("xmlns", pre->cmml_xmlns);
   */
+  APPEND_ATTRIBUTE("granulerate", pre->cmml_granulerate);
   END_TAG();
   NEWLINE;
 
@@ -750,8 +860,8 @@
   
   BEGIN_TAG("stream");
   APPEND_ATTRIBUTE("id", m->id);
-  if (m->timebase) {
-    APPEND_ATTRIBUTE("timebase", m->timebase->tstr);
+  if (m->basetime) {
+    APPEND_ATTRIBUTE("basetime", m->basetime->tstr);
   }
   if (m->utc) {
     APPEND_ATTRIBUTE("utc", m->utc->tstr);
@@ -775,8 +885,8 @@
   
   BEGIN_TAG("stream");
   APPEND_ATTRIBUTE("id", m->id);
-  if (m->timebase) {
-    APPEND_ATTRIBUTE("timebase", m->timebase->tstr);
+  if (m->basetime) {
+    APPEND_ATTRIBUTE("basetime", m->basetime->tstr);
   }
   if (m->utc) {
     APPEND_ATTRIBUTE("utc", m->utc->tstr);
@@ -868,6 +978,8 @@
 
   if (cmml_meta_list_snprint(buf, &len, &n, &n_written, h->meta) < 0)
     return -1;
+  if (cmml_link_list_snprint(buf, &len, &n, &n_written, h->link) < 0)
+    return -1;
   CLOSE_TAG("head");
   NEWLINE;
 
@@ -883,6 +995,8 @@
   
   BEGIN_TAG("clip");
   APPEND_ATTRIBUTE("id", a->clip_id);
+  APPEND_ATTRIBUTE("class", a->class);
+  APPEND_ATTRIBUTE("title", a->title);
   APPEND_ATTRIBUTE("lang", a->lang);
   APPEND_ATTRIBUTE("dir", a->dir);
   APPEND_ATTRIBUTE("track", a->track);
@@ -898,7 +1012,8 @@
   if (a->anchor_id || a->anchor_text || a->anchor_href) {
     BEGIN_TAG("a");
     APPEND_ATTRIBUTE("id",    a->anchor_id);
-    APPEND_ATTRIBUTE("class", a->anchor_class);
+    APPEND_ATTRIBUTE("class",  a->anchor_class);
+    APPEND_ATTRIBUTE("title",   a->anchor_title);
     APPEND_ATTRIBUTE("lang",  a->anchor_lang);
     APPEND_ATTRIBUTE("dir",   a->anchor_dir);
     APPEND_ATTRIBUTE("href",  a->anchor_href);
@@ -911,6 +1026,8 @@
   if (a->img_id || a->img_src || a->img_alt) {
     BEGIN_TAG("img");
     APPEND_ATTRIBUTE("id",   a->img_id);
+    APPEND_ATTRIBUTE("class", a->img_class);
+    APPEND_ATTRIBUTE("title",  a->img_title);
     APPEND_ATTRIBUTE("lang", a->img_lang);
     APPEND_ATTRIBUTE("dir",  a->img_dir);
     APPEND_ATTRIBUTE("src",  a->img_src);
@@ -922,6 +1039,8 @@
   if (a->desc_id || a->desc_text) {
     BEGIN_TAG("desc");
     APPEND_ATTRIBUTE("id",   a->desc_id);
+    APPEND_ATTRIBUTE("class", a->desc_class);
+    APPEND_ATTRIBUTE("title",  a->desc_title);
     APPEND_ATTRIBUTE("lang", a->desc_lang);
     APPEND_ATTRIBUTE("dir",  a->desc_dir);
     END_TAG();
@@ -942,6 +1061,8 @@
   
   BEGIN_TAG("clip");
   APPEND_ATTRIBUTE("id", a->clip_id);
+  APPEND_ATTRIBUTE("class", a->class);
+  APPEND_ATTRIBUTE("title", a->title);
   APPEND_ATTRIBUTE("lang", a->lang);
   APPEND_ATTRIBUTE("dir", a->dir);
   APPEND_ATTRIBUTE("track", a->track);
@@ -959,6 +1080,7 @@
     BEGIN_TAG("a");
     APPEND_ATTRIBUTE("id", a->anchor_id);
     APPEND_ATTRIBUTE("class", a->anchor_class);
+    APPEND_ATTRIBUTE("title", a->anchor_title);
     APPEND_ATTRIBUTE("lang", a->anchor_lang);
     APPEND_ATTRIBUTE("dir", a->anchor_dir);
     APPEND_ATTRIBUTE("href", a->anchor_href);
@@ -972,6 +1094,8 @@
   if (a->img_id || a->img_src || a->img_alt) {
     BEGIN_TAG("img");
     APPEND_ATTRIBUTE("id", a->img_id);
+    APPEND_ATTRIBUTE("class", a->img_class);
+    APPEND_ATTRIBUTE("title", a->img_title);
     APPEND_ATTRIBUTE("lang", a->img_lang);
     APPEND_ATTRIBUTE("dir", a->img_dir);
     APPEND_ATTRIBUTE("src", a->img_src);
@@ -984,6 +1108,8 @@
   if (a->desc_id || a->desc_text) {
     BEGIN_TAG("desc");
     APPEND_ATTRIBUTE("id", a->desc_id);
+    APPEND_ATTRIBUTE("class", a->desc_class);
+    APPEND_ATTRIBUTE("title", a->desc_title);
     APPEND_ATTRIBUTE("lang", a->desc_lang);
     APPEND_ATTRIBUTE("dir", a->desc_dir);
     END_TAG();

Modified: libcmml/trunk/src/cmml_private.c
===================================================================
--- libcmml/trunk/src/cmml_private.c	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/src/cmml_private.c	2005-04-11 13:37:59 UTC (rev 1237)
@@ -48,7 +48,7 @@
 
 /*
  * cmml_parse_to_head: parse the top bit of the cmml file until it
- * reaches the head tag to get all the timebase etc. information
+ * reaches the head tag to get all the basetime etc. information
  */
 int
 cmml_parse_to_head (CMML_Context * ctxt)
@@ -58,10 +58,10 @@
   long bytes, nread = 0;
 
   /* if stream tag had not previously been read, read until you've got it by */
-  /* checking for timebase as this is a stream attribute that is obligatory */
+  /* checking for basetime as this is a stream attribute that is obligatory */
   /* or until you have a head tag */
   while (ctxt->status->stream == NULL || 
-	 ctxt->status->stream->timebase == NULL) {
+	 ctxt->status->stream->basetime == NULL) {
 	  if ((bytes = (long)fread(buf, 1, READ_BUF_SIZE, ctxt->file)) == -1) {
       cmml_set_error((CMML*)ctxt, CMML_READ_ERROR);
       return -1;
@@ -153,6 +153,7 @@
 insert_stream_attrs(CMML_Stream * stream, const XML_Char **attr, CMML_Context *ctxt)
 {
   int i;
+  CMML_Time * timebase = NULL; /* backwards compatibility for CMML 2.1 */
 
   if (!stream) return 0;
 
@@ -162,8 +163,10 @@
 #endif
     if (cmml_strcmp(attr[i], "id") == 0) {
       stream->id = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "basetime") == 0) {
+      stream->basetime = cmml_time_new (attr[i+1]);
     } else if (cmml_strcmp(attr[i], "timebase") == 0) {
-      stream->timebase = cmml_time_new (attr[i+1]);
+      timebase = cmml_time_new(attr[i+1]);
     } else if (cmml_strcmp(attr[i], "utc") == 0) {
       stream->utc = cmml_utc_new (attr[i+1]);
       if (!stream->utc->t.utc) { /* just ignoring tag */
@@ -174,12 +177,20 @@
     }
   }
   /* adapt timebase */
-  if (stream->timebase == NULL) {
-    /* default value */
-    stream->timebase = cmml_time_new("0");
+  if (stream->basetime == NULL) {
+    if (timebase != NULL) {
+      stream->basetime = timebase;
+    } else {
+      /* default value */
+      stream->basetime = cmml_time_new("0");
+    }
+  } else { /* timebase is not being used */
+    if (timebase != NULL) {
+      cmml_time_free (timebase);
+    }
   }
-  /* check parsed timebase as it is used later in library */
-  if (stream->timebase->t.sec < 0.0) {
+  /* check parsed basetime as it is used later in library */
+  if (stream->basetime->t.sec < 0.0) {
     cmml_set_error((CMML*)ctxt, CMML_TIME_ERROR);
     return -1; /* stream to be destroyed */
   }
@@ -229,12 +240,12 @@
       m->start_time = 
 	cmml_time_new_in_sec (attr[i+1],
 			      ctxt->status->stream->utc,
-			      ctxt->status->stream->timebase->t.sec);
+			      ctxt->status->stream->basetime->t.sec);
     } else if (cmml_strcmp(attr[i], "end") == 0) {
       m->end_time = 
 	cmml_time_new_in_sec (attr[i+1],
 			      ctxt->status->stream->utc,
-			      ctxt->status->stream->timebase->t.sec);
+			      ctxt->status->stream->basetime->t.sec);
     } else if (cmml_strcmp(attr[i], "title") == 0) {
       m->title = cmml_strdup(attr[i+1]);
     }
@@ -453,6 +464,65 @@
 
 
 /*
+ * insert_link_tag: Make a new CMML_LinkElement and add it to the list
+ * of CMML_LinkElements contained within the clip or head
+ * CMML_Element.
+ */
+static CMML_List * 
+insert_link_tag(CMML_List * link_list, const XML_Char **attr, CMML_Context *ctxt)
+{
+  int i;
+  CMML_LinkElement * l;
+
+  if (attr[0] == NULL) { /* no attributes present */
+    return NULL;
+  } 
+  
+  if ((l = (CMML_LinkElement *) cmml_malloc(sizeof(CMML_LinkElement)))
+      == NULL) return NULL;
+  l->id = NULL;
+  l->class = NULL;
+  l->title = NULL;
+  l->lang = NULL;
+  l->dir = NULL;
+  l->href = NULL;
+  l->type = NULL;
+  l->rel = NULL;
+  l->rev = NULL;
+  l->media = NULL;
+
+  for (i = 0; attr[i] != NULL; i += 2) {
+#ifdef DEBUG
+    fprintf(stderr, "Inserting link attribute %s=%s\n", attr[i], attr[i+1]);
+#endif
+    if (cmml_strcmp(attr[i], "id") == 0) {
+      l->id = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "class") == 0) {
+      l->class = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "title") == 0) {
+      l->title = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "lang") == 0) {
+      l->lang = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "dir") == 0) {
+      l->dir = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "href") == 0) {
+      l->href = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "type") == 0) {
+      l->type = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "rel") == 0) {
+      l->rel = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "rev") == 0) {
+      l->rev = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "media") == 0) {
+      l->media = cmml_strdup(attr[i+1]);
+    }
+  }
+  link_list = cmml_list_append(link_list, l);
+  return link_list;
+}
+
+
+/*
  * insert_clip_attrs: insert attributes from an "a" element into a
  * CMML_Element of type CMML_CLIP.
  */
@@ -465,7 +535,7 @@
   if (!ctxt->status->stream) {
     /* the document has no stream tag before this clip tag */
     ctxt->status->stream = cmml_stream_new();
-    ctxt->status->stream->timebase = cmml_time_new("0");
+    ctxt->status->stream->basetime = cmml_time_new("0");
   }
   for (i = 0; attr[i] != NULL; i += 2) {
 #ifdef DEBUG
@@ -473,6 +543,10 @@
 #endif
     if (cmml_strcmp(attr[i], "id") == 0) {
       a->clip_id = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "class") == 0) {
+      a->class = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "title") == 0) {
+      a->title = cmml_strdup(attr[i+1]);
     } else if (cmml_strcmp(attr[i], "lang") == 0) {
       a->lang = cmml_strdup(attr[i+1]);
     } else if (cmml_strcmp(attr[i], "dir") == 0) {
@@ -483,12 +557,12 @@
       a->start_time = 
 	cmml_time_new_in_sec (attr[i+1], 
 			      ctxt->status->stream->utc,
-			      ctxt->status->stream->timebase->t.sec);
+			      ctxt->status->stream->basetime->t.sec);
     } else if (cmml_strcmp(attr[i], "end") == 0) {
       a->end_time = 
 	cmml_time_new_in_sec (attr[i+1],
 			      ctxt->status->stream->utc,
-			      ctxt->status->stream->timebase->t.sec);
+			      ctxt->status->stream->basetime->t.sec);
     }
   }
   /* set default track  */
@@ -507,16 +581,16 @@
     cmml_set_error((CMML*)ctxt, CMML_FORMAT_ERROR);
     cmml_time_free (a->end_time);
   }
-  /* check if new clip comes after timebase and after previous clip */
-  if (a->start_time->t.sec < ctxt->status->stream->timebase->t.sec ||
+  /* check if new clip comes after basetime and after previous clip */
+  if (a->start_time->t.sec < ctxt->status->stream->basetime->t.sec ||
       (ctxt->status->clip && 
        (a->start_time->t.sec < ctxt->status->clip->start_time->t.sec))) {
       cmml_set_error((CMML*)ctxt, CMML_NONSEQUENTIAL_CLIP);
 #ifdef DEBUG
       fprintf(stderr, 
-	      "nonsequential: clip=%f(%s), timebase=%f, prev_clip=%f\n",
+	      "nonsequential: clip=%f(%s), basetime=%f, prev_clip=%f\n",
 	      a->start_time->t.sec, a->start_time->tstr,
-	      ctxt->status->stream->timebase->t.sec,
+	      ctxt->status->stream->basetime->t.sec,
 	      ctxt->status->prev_clip->start_time->t.sec);
 #endif
       return -1;
@@ -548,6 +622,8 @@
       clip->anchor_id = cmml_strdup(attr[i+1]);
     } else if (cmml_strcmp(attr[i], "class") == 0) {
       clip->anchor_class = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "title") == 0) {
+      clip->anchor_title = cmml_strdup(attr[i+1]);
     } else if (cmml_strcmp(attr[i], "lang") == 0) {
       clip->anchor_lang = cmml_strdup(attr[i+1]);
     } else if (cmml_strcmp(attr[i], "dir") == 0) {
@@ -591,6 +667,10 @@
 #endif
     if (cmml_strcmp(attr[i], "id") == 0) {
       clip->img_id = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "class") == 0) {
+      clip->img_class = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "title") == 0) {
+      clip->img_title = cmml_strdup(attr[i+1]);
     } else if (cmml_strcmp(attr[i], "lang") == 0) {
       clip->img_lang = cmml_strdup(attr[i+1]);
     } else if (cmml_strcmp(attr[i], "dir") == 0) {
@@ -636,6 +716,10 @@
 #endif
     if (cmml_strcmp(attr[i], "id") == 0) {
       clip->desc_id = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "class") == 0) {
+      clip->desc_class = cmml_strdup(attr[i+1]);
+    } else if (cmml_strcmp(attr[i], "title") == 0) {
+      clip->desc_title = cmml_strdup(attr[i+1]);
     } else if (cmml_strcmp(attr[i], "lang") == 0) {
       clip->desc_lang = cmml_strdup(attr[i+1]);
     } else if (cmml_strcmp(attr[i], "dir") == 0) {
@@ -710,6 +794,9 @@
  * If the tag name is "meta" then the CMML_Element at the tail of the
  * list can be either a head or an clip.
  *
+ * If the tag name is "link" then the CMML_Element at the tail of the
+ * list can be either a head or an clip.
+ *
  * The above arrangement takes advantage of the "shallowness" of the
  * CMML DTD, that is, whenever "title", "stream", "base", "desc",
  * "param" or "meta" is encountered, then its parent element is
@@ -768,10 +855,10 @@
     /* save stream tag */
     context->status->stream = stream;
     /* if in the middle of seeking for a time offset,
-       and seektime is before timebase, stop seeking and report error */
+       and seektime is before basetime, stop seeking and report error */
     if (context->status->seek_type == _CMML_SEEK_TIME) {
       if (context->status->seek_secs <= 
-	  context->status->stream->timebase->t.sec) {
+	  context->status->stream->basetime->t.sec) {
 	context->status->seek_secs = _CMML_SEEK_FOUND;
 	context->status->seek_secs = -1.0;
       }
@@ -816,7 +903,7 @@
     /* if there has been no stream tag, fix it up */
     if (!context->status->stream) {
       context->status->stream = cmml_stream_new();
-      context->status->stream->timebase = cmml_time_new("0");
+      context->status->stream->basetime = cmml_time_new("0");
     }
     context->status->type = CMML_HEAD;
     /* there musn't be a head tag after a clip tag */
@@ -890,6 +977,34 @@
     }
     return;
 
+  } else if (cmml_strcmp(name, "link") == 0) {
+    if (context->status->type != CMML_HEAD
+/* this is in preparation for CMML 3.0
+        && context->status->type != CMML_CLIP
+ */
+      ) {
+      cmml_set_error(cmml, CMML_PARSE_ERROR);
+      return;
+    }
+    if (context->status->type == CMML_HEAD) {
+      if (context->status->head == NULL) {
+	cmml_set_error(cmml, CMML_PARSE_ERROR);
+	return;
+      }
+      context->status->head->link =
+	insert_link_tag(context->status->head->link, attrs, cmml);
+    } else { /* CMML_CLIP */
+/* this is in preparation for CMM 3.0
+      if (context->status->clip == NULL) {
+	cmml_set_error(cmml, CMML_PARSE_ERROR);
+	return;
+      }
+      context->status->clip->link =
+	insert_link_tag(context->status->clip->link, attrs, cmml);
+ */
+    }
+    return;
+
   /* ----- the "clip" tag ----- */
   } else if (cmml_strcmp(name, "clip") == 0) {
     /* has to be after cmml and head */
@@ -990,7 +1105,7 @@
       ctxt->status->t_start = 
 	cmml_time_utc_to_sec (ctxt->status->t_start,
 			      ctxt->status->stream->utc,
-			      ctxt->status->stream->timebase->t.sec);
+			      ctxt->status->stream->basetime->t.sec);
       if (ctxt->status->t_start->t.sec < 0) {
 	cmml_time_free(ctxt->status->t_start);
 	ctxt->status->t_start = NULL;
@@ -1012,7 +1127,7 @@
       ctxt->status->t_end = 
 	cmml_time_utc_to_sec (ctxt->status->t_end,
 			      ctxt->status->stream->utc,
-			      ctxt->status->stream->timebase->t.sec);
+			      ctxt->status->stream->basetime->t.sec);
       if (ctxt->status->t_end->t.sec < 0) {
 	cmml_time_free(ctxt->status->t_end);
 	ctxt->status->t_end = NULL;
@@ -1146,6 +1261,9 @@
   } else if (cmml_strcmp(name, "meta") == 0) {
     /* empty tag: no action */
     return;
+  } else if (cmml_strcmp(name, "link") == 0) {
+    /* empty tag: no action */
+    return;
 
   /* ----- the "clip" tag ----- */
   } else if (cmml_strcmp(name, "clip") == 0) {
@@ -1253,6 +1371,7 @@
   context->status->info->cmml_dir         = NULL;
   context->status->info->cmml_id          = NULL;
   context->status->info->cmml_xmlns       = NULL;
+  context->status->info->cmml_granulerate = NULL;
   context->status->type = CMML_NONE;
   context->status->stream = NULL;
   context->status->import_cnt = -1;

Modified: libcmml/trunk/src/cmml_private.h
===================================================================
--- libcmml/trunk/src/cmml_private.h	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/src/cmml_private.h	2005-04-11 13:37:59 UTC (rev 1237)
@@ -152,6 +152,8 @@
                cmml_import_element_destroy (CMML_ImportElement * import);
 CMML_MetaElement *
                cmml_meta_element_destroy (CMML_MetaElement * meta);
+CMML_LinkElement *
+               cmml_link_element_destroy (CMML_LinkElement * link);
 
 
 /* set the encountered error in the context */

Modified: libcmml/trunk/tests/Makefile.am
===================================================================
--- libcmml/trunk/tests/Makefile.am	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/Makefile.am	2005-04-11 13:37:59 UTC (rev 1237)
@@ -29,7 +29,7 @@
 
 ## Process this file with automake to produce Makefile.in
 
-#TOOLSDIR = ${top_srcdir}/tools
+TOOLSDIR = ${top_builddir}/tools
 TESTSDIR = ${top_srcdir}/tests
 
 SPC_CMML = special1.cmml special2.cmml write.cmml
@@ -60,7 +60,7 @@
 	@echo "---------------------------------------------------------------"; \
 	for i in $(SRC_CMML) ; do \
 	if test ${TESTSDIR}/$$i ; then \
-	../tools/cmml-validate -b ${TESTSDIR}/$$i 2>&1 | diff -b - ${TESTSDIR}/$${i}.correct; \
+	${TOOLSDIR}/cmml-validate -b ${TESTSDIR}/$$i 2>&1 | diff -b - ${TESTSDIR}/$${i}.correct; \
 	if test $$? -ne 0 ; then \
 		echo "---------------------------------------------------------------"; \
 		echo "  libcmml: error in $$i"; \

Modified: libcmml/trunk/tests/error1.cmml
===================================================================
--- libcmml/trunk/tests/error1.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error1.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,7 +3,7 @@
 
 <cmml lang="en">
 
-<stream timebase="npt:0">
+<stream basetime="npt:0">
   <import contenttype="video/x-theora" src="series1Air_t.ogg" start="npt:0"/>
   <import contenttype="audio/x-vorbis" src="series1Air_v.ogg" start="npt:0"/>
   <import contenttype="audio/x-speex" src="series1Air.spx" start="npt:7"/>

Modified: libcmml/trunk/tests/error1.cmml.correct
===================================================================
--- libcmml/trunk/tests/error1.cmml.correct	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error1.cmml.correct	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,7 +3,7 @@
 
 <cmml lang="en">
 
-<stream timebase="npt:0.000">
+<stream basetime="npt:0.000">
 <import contenttype="video/x-theora" src="series1Air_t.ogg" start="npt:0.000"/>
 <import contenttype="audio/x-vorbis" src="series1Air_v.ogg" start="npt:0.000"/>
 <import contenttype="audio/x-speex" src="series1Air.spx" start="npt:7.000"/>

Modified: libcmml/trunk/tests/error10.cmml
===================================================================
--- libcmml/trunk/tests/error10.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error10.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,7 +3,7 @@
 
 <cmml lang="pl">
 
-<stream timebase="npt:0">
+<stream basetime="npt:0">
   <import contenttype="video/mpeg" src="fish.mpg" start="npt:0"/>
 </stream>
 

Modified: libcmml/trunk/tests/error10.cmml.correct
===================================================================
--- libcmml/trunk/tests/error10.cmml.correct	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error10.cmml.correct	2005-04-11 13:37:59 UTC (rev 1237)
@@ -4,7 +4,7 @@
 
 <cmml lang="pl">
 
-<stream timebase="npt:0.000">
+<stream basetime="npt:0.000">
 <import contenttype="video/mpeg" src="fish.mpg" start="npt:0.000"/>
 </stream>
 

Modified: libcmml/trunk/tests/error11.cmml
===================================================================
--- libcmml/trunk/tests/error11.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error11.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,7 +3,7 @@
 
 <cmml>
 
-<stream id="a1" timebase="0" utc="today">
+<stream id="a1" basetime="0" utc="today">
 <import contenttype="audio/x-wav" src="00-3-18.wav" start="npt:0"/>
 </stream>
 

Modified: libcmml/trunk/tests/error12.cmml
===================================================================
--- libcmml/trunk/tests/error12.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error12.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,7 +3,7 @@
 
 <cmml>
 
-<stream id="a1" timebase="0">
+<stream id="a1" basetime="0">
 <media contenttype="audio/x-wav" src="00-3-18.wav" start="npt:0"/>
 </stream>
 

Modified: libcmml/trunk/tests/error13.cmml
===================================================================
--- libcmml/trunk/tests/error13.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error13.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,7 +3,7 @@
 
 <cmml>
 
-<stream id="a1" timebase="0">
+<stream id="a1" basetime="0">
 <import contenttype="audio/x-wav"/>
 </stream>
 

Modified: libcmml/trunk/tests/error14.cmml
===================================================================
--- libcmml/trunk/tests/error14.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error14.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,7 +3,7 @@
 
 <cmml xmlns="test">
 
-<stream id="a1" timebase="0">
+<stream id="a1" basetime="0">
 <import contenttype="audio/x-wav" src="00-3-18.wav" start="npt:0"/>
 </stream>
 

Modified: libcmml/trunk/tests/error15.cmml
===================================================================
--- libcmml/trunk/tests/error15.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error15.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,7 +3,7 @@
 
 <cmml>
 
-<stream id="a1" timebase="0">
+<stream id="a1" basetime="0">
 <import contenttype="audio/x-wav" src="00-3-18.wav" start="npt:0"/>
 </stream>
 

Modified: libcmml/trunk/tests/error15.cmml.correct
===================================================================
--- libcmml/trunk/tests/error15.cmml.correct	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error15.cmml.correct	2005-04-11 13:37:59 UTC (rev 1237)
@@ -4,7 +4,7 @@
 
 <cmml>
 
-<stream id="a1" timebase="0.000">
+<stream id="a1" basetime="0.000">
 <import contenttype="audio/x-wav" src="00-3-18.wav" start="npt:0.000"/>
 </stream>
 

Modified: libcmml/trunk/tests/error2.cmml
===================================================================
--- libcmml/trunk/tests/error2.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error2.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,7 +3,7 @@
 
 <cmml>
 
-<stream id="a1" timebase="npt:100.3" utc="20021222T221005Z">
+<stream id="a1" basetime="npt:100.3" utc="20021222T221005Z">
 <import id="a2" granulerate="1000" contenttype="audio/x-wav" src="00-3-10.wav" start="npt:100.3"/>
 </stream>
 

Modified: libcmml/trunk/tests/error2.cmml.correct
===================================================================
--- libcmml/trunk/tests/error2.cmml.correct	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error2.cmml.correct	2005-04-11 13:37:59 UTC (rev 1237)
@@ -4,7 +4,7 @@
 
 <cmml>
 
-<stream id="a1" timebase="npt:100.300" utc="20021222T221005Z">
+<stream id="a1" basetime="npt:100.300" utc="20021222T221005Z">
 <import id="a2" granulerate="1000" contenttype="audio/x-wav" src="00-3-10.wav" start="npt:100.300"/>
 </stream>
 

Modified: libcmml/trunk/tests/error3.cmml
===================================================================
--- libcmml/trunk/tests/error3.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error3.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,7 +3,7 @@
 
 <cmml>
 
-<stream id="a1" timebase="0">
+<stream id="a1" timebase="5">
 <import contenttype="audio/x-wav" src="00-3-18.wav" start="npt:0"/>
 </stream>
 

Modified: libcmml/trunk/tests/error3.cmml.correct
===================================================================
--- libcmml/trunk/tests/error3.cmml.correct	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error3.cmml.correct	2005-04-11 13:37:59 UTC (rev 1237)
@@ -4,7 +4,7 @@
 
 <cmml>
 
-<stream id="a1" timebase="0.000">
+<stream id="a1" basetime="5.000">
 <import contenttype="audio/x-wav" src="00-3-18.wav" start="npt:0.000"/>
 </stream>
 

Modified: libcmml/trunk/tests/error4.cmml
===================================================================
--- libcmml/trunk/tests/error4.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error4.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,8 +3,8 @@
 
 <cmml>
 
-<stream timebase="npt:0.000">
-<import id="a1" contenttype="video/mpeg" src="cleaner.mpg" start="npt:0.000"/>
+<stream basetime="npt:0">
+<import id="a1" contenttype="video/mpeg" src="cleaner.mpg" start="npt:0"/>
 </stream>
 
 <head>
@@ -16,7 +16,7 @@
 </head>
 <meta name="TYPE" content="video"/>
 
-<clip id="intro" start="npt:0.000">
+<clip id="intro" start="npt:0">
 <a href="http://www.csiro.au/promos/ozadvances/">
 http://www.csiro.au/promos/ozadvances/</a>
 <desc>
@@ -24,7 +24,7 @@
 </desc>
 </clip>
 
-<clip id="startspeech" start="npt:10.000">
+<clip id="startspeech" start="npt:10">
 <a href="00-5-4.anx#startspeech">
 A way in which scientists are finding out the effects of these fumes is through this box simulation</a>
 <desc>

Modified: libcmml/trunk/tests/error4.cmml.correct
===================================================================
--- libcmml/trunk/tests/error4.cmml.correct	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error4.cmml.correct	2005-04-11 13:37:59 UTC (rev 1237)
@@ -4,7 +4,7 @@
 
 <cmml>
 
-<stream timebase="npt:0.000">
+<stream basetime="npt:0.000">
 <import id="a1" contenttype="video/mpeg" src="cleaner.mpg" start="npt:0.000"/>
 </stream>
 

Modified: libcmml/trunk/tests/error5.cmml
===================================================================
--- libcmml/trunk/tests/error5.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error5.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <!DOCTYPE cmml SYSTEM "cmml.dtd">
 
-<stream id="a" timebase="npt:29.69" utc="20030517T155030.000Z">
+<stream id="a" basetime="npt:29.69" utc="20030517T155030.000Z">
 <import id="flim" contenttype="video/quicktime" src="rtsp://my.location.com/flim.anx#@npt=20-30" start="npt:12"/>
 <import id="flim2" contenttype="video/mpeg" src="http://www.flim.com/flam.anx" start="npt:0" end="npt:12"/>
 </stream>

Modified: libcmml/trunk/tests/error6.cmml
===================================================================
--- libcmml/trunk/tests/error6.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error6.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,7 +3,7 @@
 
 <cmml lang="en">
 
-<stream timebase="npt:0">
+<stream basetime="npt:0">
 <import src="matrix.mpg" start="npt:0"/>
 </stream>
 

Modified: libcmml/trunk/tests/error6.cmml.correct
===================================================================
--- libcmml/trunk/tests/error6.cmml.correct	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error6.cmml.correct	2005-04-11 13:37:59 UTC (rev 1237)
@@ -4,7 +4,7 @@
 
 <cmml lang="en">
 
-<stream timebase="npt:0.000">
+<stream basetime="npt:0.000">
 <import src="matrix.mpg" start="npt:0.000"/>
 </stream>
 

Modified: libcmml/trunk/tests/error7.cmml
===================================================================
--- libcmml/trunk/tests/error7.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error7.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -20,7 +20,7 @@
 </desc>
 </clip>
 
-<stream timebase="npt:0">
+<stream basetime="npt:0">
 <import contenttype="video/mpeg" src="GrimNewsOnOzoneB.mpg" start="npt:0"/>
 </stream>
 

Modified: libcmml/trunk/tests/error9.cmml
===================================================================
--- libcmml/trunk/tests/error9.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error9.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,11 +3,11 @@
 
 <cmml lang="en">
 
-<stream timebase="npt:0">
+<stream basetime="npt:0">
   <import contenttype="video/mpeg" src="fish.mpg" start="npt:0"/>
 </stream>
 
-<stream timebase="npt:0">
+<stream basetime="npt:0">
   <import contenttype="video/x-theora" src="fish.ogg" start="npt:0"/>
 </stream>
 

Modified: libcmml/trunk/tests/error9.cmml.correct
===================================================================
--- libcmml/trunk/tests/error9.cmml.correct	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/error9.cmml.correct	2005-04-11 13:37:59 UTC (rev 1237)
@@ -4,7 +4,7 @@
 
 <cmml lang="en">
 
-<stream timebase="npt:0.000">
+<stream basetime="npt:0.000">
 <import contenttype="video/mpeg" src="fish.mpg" start="npt:0.000"/>
 </stream>
 

Modified: libcmml/trunk/tests/i18n.cmml
===================================================================
--- libcmml/trunk/tests/i18n.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/i18n.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,14 +3,20 @@
 
 <cmml lang="pl">
 
-<stream timebase="npt:0">
+<stream basetime="npt:0">
   <import contenttype="video/mpeg" src="fish.mpg" start="npt:0"/>
 </stream>
 
-<head lang="en">
-  <title>Types of fish</title>
+<head lang="en" dir="ltr" profile="http://www.annodex.net/profile.tst">
+  <title lang="en" dir="ltr" id="fishtitle">Types of fish</title>
+  <base id="base" href="http://www.annodex.net/"/>
   <meta name="Producer" content="Joe Ordinary"/>
   <meta name="DC.Author" content="Joe's friend"/>
+  <meta id="dc" lang="en" dir="ltr" name="DC.DESCRIPTION" 
+        content="A composition of fish" scheme="Dublin Core"/>
+  <link id="linktest" lang="en" dir="ltr" title="test the link tag"
+        class="head.link" href="i18n.css" type="stylesheet"
+        rel="stylesheet" rev="dunno" media="screen"/>
 </head>
 
 <clip lang="de" id="intro" start="npt:0">
@@ -19,9 +25,10 @@
 </clip>
 
 <clip lang="en" id="goldfish" start="npt:5:5.9">
-  <a href="http://www.blah.au/morefish.anx?id=goldfish">More video clips on goldfish.</a>
-  <img src="http://www.blah.au/goldfish.jpg"/>
-  <desc>Joe has a fishtank at home with many colourful fish. The common goldfish is one of them and Joe's favourite. Here are some fabulous pictures he has taken of them.</desc>
+  <a class="clip.a" title="there's always more fish"
+     href="http://www.blah.au/morefish.anx?id=goldfish">More video clips on goldfish.</a>
+  <img class="clip.img" title="sweety" src="http://www.blah.au/goldfish.jpg"/>
+  <desc class="clip.desc" title="tanked fish">Joe has a fishtank at home with many colourful fish. The common goldfish is one of them and Joe's favourite. Here are some fabulous pictures he has taken of them.</desc>
   <meta name="Location" content="Joe's fishtank"/>
   <meta name="Subject" content="goldfish"/>
   <meta lang="fr" name="sujet" content="poisson d'or"/>

Modified: libcmml/trunk/tests/i18n.cmml.correct
===================================================================
--- libcmml/trunk/tests/i18n.cmml.correct	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/i18n.cmml.correct	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,14 +3,17 @@
 
 <cmml lang="pl">
 
-<stream timebase="npt:0.000">
+<stream basetime="npt:0.000">
 <import contenttype="video/mpeg" src="fish.mpg" start="npt:0.000"/>
 </stream>
 
-<head lang="en">
-<title>Types of fish</title>
+<head lang="en" dir="ltr" profile="http://www.annodex.net/profile.tst">
+<title id="fishtitle" lang="en" dir="ltr">Types of fish</title>
+<base id="base" href="http://www.annodex.net/"/>
 <meta name="Producer" content="Joe Ordinary"/>
 <meta name="DC.Author" content="Joe's friend"/>
+<meta id="dc" lang="en" dir="ltr" name="DC.DESCRIPTION" content="A composition of fish" scheme="Dublin Core"/>
+<link id="linktest" class="head.link" title="test the link tag" lang="en" dir="ltr" href="i18n.css" type="stylesheet" rel="stylesheet" rev="dunno" media="screen"/>
 </head>
 
 <clip id="intro" lang="de" track="default" start="npt:0.000">
@@ -22,9 +25,9 @@
 <meta name="Location" content="Joe's fishtank"/>
 <meta name="Subject" content="goldfish"/>
 <meta lang="fr" name="sujet" content="poisson d'or"/>
-<a href="http://www.blah.au/morefish.anx?id=goldfish">More video clips on goldfish.</a>
-<img src="http://www.blah.au/goldfish.jpg"/>
-<desc>Joe has a fishtank at home with many colourful fish. The common goldfish is one of them and Joe's favourite. Here are some fabulous pictures he has taken of them.</desc>
+<a class="clip.a" title="there's always more fish" href="http://www.blah.au/morefish.anx?id=goldfish">More video clips on goldfish.</a>
+<img class="clip.img" title="sweety" src="http://www.blah.au/goldfish.jpg"/>
+<desc class="clip.desc" title="tanked fish">Joe has a fishtank at home with many colourful fish. The common goldfish is one of them and Joe's favourite. Here are some fabulous pictures he has taken of them.</desc>
 </clip>
 
 </cmml>

Modified: libcmml/trunk/tests/simple.cmml
===================================================================
--- libcmml/trunk/tests/simple.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/simple.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -1,10 +1,15 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <!DOCTYPE cmml SYSTEM "cmml.dtd">
 
-<cmml lang="en">
+<cmml lang="en" dir="ltr" id="simple" granulerate="1000/1">
 
-<stream timebase="0">
-  <import contenttype="video/mpeg" src="fish.mpg" start="0"/>
+<stream id="fish" basetime="0">
+  <import id="videosrc" lang="en" dir="ltr" title="Video fish" 
+          granulerate="25/1" contenttype="video/mpeg" 
+          src="fish.mpg" start="0" end="360">
+    <param id="vheight" name="video.height" value="250"/>
+    <param id="vwidth"  name="video.width"  value="180"/>
+  </import>
 </stream>
 
 <head>

Modified: libcmml/trunk/tests/simple.cmml.correct
===================================================================
--- libcmml/trunk/tests/simple.cmml.correct	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/simple.cmml.correct	2005-04-11 13:37:59 UTC (rev 1237)
@@ -1,10 +1,13 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <!DOCTYPE cmml SYSTEM "cmml.dtd">
 
-<cmml lang="en">
+<cmml id="simple" lang="en" dir="ltr">
 
-<stream timebase="0.000">
-<import contenttype="video/mpeg" src="fish.mpg" start="0.000"/>
+<stream id="fish" basetime="0.000">
+<import id="videosrc" lang="en" dir="ltr" granulerate="25/1" contenttype="video/mpeg" src="fish.mpg" start="0.000" end="360.000" title="Video fish">
+<param id="vheight" name="video.height" value="250"/>
+<param id="vwidth" name="video.width" value="180"/>
+</import>
 </stream>
 
 <head>

Modified: libcmml/trunk/tests/special1.cmml
===================================================================
--- libcmml/trunk/tests/special1.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/special1.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,7 +3,7 @@
 
 <cmml>
 
-<stream timebase="npt:0">
+<stream basetime="npt:0">
 <import id="a1" contenttype="video/mpeg" src="series1Air.mpg" start="npt:0"/>
 </stream>
 

Modified: libcmml/trunk/tests/special2.cmml
===================================================================
--- libcmml/trunk/tests/special2.cmml	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tests/special2.cmml	2005-04-11 13:37:59 UTC (rev 1237)
@@ -3,7 +3,7 @@
 
 <cmml>
 
-<stream id="a1" timebase="npt:100.3" utc="20021222T221005Z">
+<stream id="a1" basetime="npt:100.3" utc="20021222T221005Z">
 <import id="a2" granulerate="1000" contenttype="audio/x-wav" src="00-3-10.wav" start="npt:100.3"/>
 </stream>
 

Modified: libcmml/trunk/tools/cmml-fortune.c
===================================================================
--- libcmml/trunk/tools/cmml-fortune.c	2005-04-11 13:36:35 UTC (rev 1236)
+++ libcmml/trunk/tools/cmml-fortune.c	2005-04-11 13:37:59 UTC (rev 1237)
@@ -279,7 +279,7 @@
   }
 
   /* write preamble */
-  pre = cmml_preamble_new(encoding, NULL, NULL, NULL);
+  pre = cmml_preamble_new(encoding, NULL, NULL, NULL, NULL);
   cmml_preamble_snprint (buf, BUFSIZE, pre);
   fputs (buf, outfile);
   cmml_preamble_destroy(pre);


-- 
silvia



More information about the cvs-annodex mailing list