[xiph-commits] r2938 - liboggplay/trunk/plugin/test

shans at svn.annodex.net shans at svn.annodex.net
Thu Jun 14 17:45:09 PDT 2007


Author: shans
Date: 2007-06-14 17:45:02 -0700 (Thu, 14 Jun 2007)
New Revision: 2938

Modified:
   liboggplay/trunk/plugin/test/test.html
Log:
Added description handling CMML callback for test.html



Modified: liboggplay/trunk/plugin/test/test.html
===================================================================
--- liboggplay/trunk/plugin/test/test.html	2007-06-15 00:40:14 UTC (rev 2937)
+++ liboggplay/trunk/plugin/test/test.html	2007-06-15 00:45:02 UTC (rev 2938)
@@ -71,6 +71,17 @@
     document.implementation.createDocument("", "clip", null);
     xmlDoc = (new DOMParser()).parseFromString(data, "application/xml");
 
+    /* extract the description */
+    descs = xmlDoc.getElementsByTagName("desc");
+    if (descs.length > 0)
+    {
+      desc = descs.item(0);
+      desc.normalize();
+      newpar = document.createElement("p");
+      newpar.appendChild(desc.cloneNode(true));
+      element.appendChild(newpar);
+    }
+
     /* extract the link tag and convert it to an HTML href */
     links = xmlDoc.getElementsByTagName("a");
     if (links.length > 0)
@@ -80,8 +91,11 @@
       newlink = document.createElement("a");
       newlink.setAttribute("href", link.getAttribute("href"));
       newlink.appendChild(link.firstChild.cloneNode(true));
-      element.appendChild(newlink);
+      newpar = document.createElement("p");
+      newpar.appendChild(newlink);
+      element.appendChild(newpar);
     }
+
     return true;
 }
 



More information about the commits mailing list