home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 April / PCWorld_2008-04_cd.bin / multimedia / mediacoder / MediaCoder-0.6.0.3905.exe / extensions / _include / launcher.xsl < prev    next >
Extensible Markup Language  |  2007-09-19  |  4KB  |  87 lines

  1. <?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="extensions.xml" --><!DOCTYPE xsl:stylesheet  [
  2.     <!ENTITY nbsp   " ">
  3.     <!ENTITY copy   "©">
  4.     <!ENTITY reg    "®">
  5.     <!ENTITY trade  "™">
  6.     <!ENTITY mdash  "—">
  7.     <!ENTITY ldquo  "“">
  8.     <!ENTITY rdquo  "”"> 
  9.     <!ENTITY pound  "£">
  10.     <!ENTITY yen    "¥">
  11.     <!ENTITY euro   "€">
  12. ]>
  13. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  14. <xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  15. <xsl:template match="/extensions">
  16.  
  17. <html xmlns="http://www.w3.org/1999/xhtml">
  18. <head>
  19. <title>MediaCoder Extensions</title>
  20. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  21. <link rel="stylesheet" href="_css/style.css" />
  22. <script language="JavaScript" src="_include/extension.js" type="text/javascript"></script>
  23. <script langauge="javascript">
  24. window.innerWidth = 680;
  25. window.innerHeight = 300;
  26.  
  27. function OpenWindow(url, opt)
  28. {
  29.     window.open(url, "", opt);
  30. }
  31. </script>
  32. </head>
  33. <body>
  34. <div class="extension" style="position:fixed;width: 100%; height: 100%; background:url('/img/back.png');" align="center">
  35. <table width="100%" border="0">
  36. <tr valign="top">
  37. <td align="center" width="16%"><div><img src="_images/devnav-phone.png"/></div>
  38. <xsl:call-template name="ListExtensions"><xsl:with-param name="node" select="category[@id='phone']"/></xsl:call-template></td>
  39. <td align="center" width="16%"><div><img src="_images/devnav-pmp.png"/></div>
  40. <xsl:call-template name="ListExtensions"><xsl:with-param name="node" select="category[@id='pmp']"/></xsl:call-template></td>
  41. <td align="center" width="16%"><div><img src="_images/devnav-game.png"/></div>
  42. <xsl:call-template name="ListExtensions"><xsl:with-param name="node" select="category[@id='game']"/></xsl:call-template></td>
  43. <td align="center" width="16%"><div><img src="_images/devnav-pda.png"/></div>
  44. <xsl:call-template name="ListExtensions"><xsl:with-param name="node" select="category[@id='pda']"/></xsl:call-template></td>
  45. <td align="center" width="16%"><div><img src="_images/devnav-home.png"/></div>
  46. <xsl:call-template name="ListExtensions"><xsl:with-param name="node" select="category[@id='home']"/></xsl:call-template></td>
  47. <td align="center"><div><img src="_images/devnav-other.png"/></div>
  48. <xsl:call-template name="ListExtensions"><xsl:with-param name="node" select="category[@id='other']"/></xsl:call-template>
  49. <div style="font-weight:bold"><a href="javascript:OpenWindow('/prefs/main.xul','width=600,height=360,resizable=yes')">Preferences</a></div>
  50. </td>
  51. </tr>
  52. </table>
  53. <br/>
  54. <div align="center">
  55. <iframe src="http://www.mediacoder.cn/info/extlauncher.html" width="100%" height="80" scrolling="no" frameborder="0" marginwidth="0" marginheight="0"></iframe>
  56. </div>
  57. </div>
  58. </body>
  59. </html>
  60.  
  61. </xsl:template>
  62.  
  63. <xsl:template name="ListExtensions">
  64.     <xsl:param name="node"/>
  65.     <xsl:choose>
  66.     <xsl:when test="$node">
  67.     <xsl:for-each select="$node/extension">
  68.     <div><a><xsl:attribute name="href">
  69.     <xsl:choose>
  70.     <!--Load Binary Extension-->
  71.     <xsl:when test="@plugin">javascript:SendCommand('load_plugin <xsl:value-of select="@plugin"/>');</xsl:when>
  72.     <!--Load Script Extension-->
  73.     <xsl:otherwise>javascript:OpenWindow('<xsl:value-of select="@id"/>/extension.xml','width=<xsl:value-of select="@width"/>,height=<xsl:value-of select="@height"/>,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=<xsl:choose><xsl:when test="@resizable='true'">yes</xsl:when><xsl:otherwise>no</xsl:otherwise></xsl:choose>');</xsl:otherwise>
  74.     </xsl:choose>
  75.  
  76.     </xsl:attribute>
  77.     <span>
  78.     <xsl:if test="@zipped"><xsl:attribute name="style">color:#000066</xsl:attribute></xsl:if>
  79.     <xsl:value-of select="@name"/>
  80.     </span></a></div>
  81.     </xsl:for-each>
  82.     </xsl:when>
  83.     <xsl:otherwise><div>No extension<br/>available yet</div></xsl:otherwise>
  84.     </xsl:choose>
  85. </xsl:template>
  86.  
  87. </xsl:stylesheet>