home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 2010 Software/Programs / PCGuia_programas.iso / Software / Utils / SPlayer / SPlayerSetup.exe / csfcodec / mpc_mtcontrol.dll / XSL / 102
Encoding:
Extensible Markup Language  |  2006-11-26  |  8.1 KB  |  384 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  3.     <xsl:template match="/">
  4.         <html>
  5.             <head>
  6.                 <style>
  7.                 BODY
  8.                 {
  9.                     font-family:Verdana;
  10.                     cursor:default;
  11.                     font-size:12px;
  12.                 }
  13.  
  14.                 TD
  15.                 {
  16.                     font-family:Verdana;
  17.                     cursor:default;
  18.                     font-size:12px;
  19.                 }
  20.  
  21.                 .tree
  22.                 {
  23.                     padding:4px 2px 0px 2px;
  24.                 }
  25.  
  26.                 span
  27.                 {
  28.                     padding:2px 3px 2px 3px;
  29.                     position:relative;
  30.                     display:inline; 
  31.                     top:-2px;
  32.                     height:17px;
  33.                     border: solid 1px #ECEEF5;
  34.                 }
  35.  
  36.                 span.clsLabel
  37.                 {
  38.  
  39.                 }
  40.  
  41.                 SPAN.clsSpace
  42.                 {
  43.                     font-family:verdana;
  44.                     position:relative;
  45.                     padding:3px 2px;
  46.                     top:0px;
  47.                     width:17px;
  48.                     margin:0px;
  49.                     cursor:hand;
  50.                     overflow:hidden;
  51.                 }
  52.  
  53.                 span.clsSpace span
  54.                 {
  55.                     position:relative;
  56.                     width:11px;
  57.                     height:11px;
  58.                     border:solid 1px black;
  59.                     background-color:#ffffff;
  60.                 }
  61.  
  62.                 SPAN.clsCollapse
  63.                 {
  64.                     line-height:6px;
  65.                     font-size:9px;
  66.                     overflow:hidden;
  67.                     padding:1px 1px 1px 1px;
  68.                 }
  69.  
  70.                 SPAN.clsExpand
  71.                 {
  72.                     padding: 3px 0px 0px 1px;
  73.                     overflow:hidden;
  74.                     line-height:3px;
  75.                     font-size:13px;
  76.                 }
  77.  
  78.                 SPAN.clsLeaf
  79.                 {
  80.                     overflow:visible;
  81.                     font-size:9px;
  82.                     line-height:3px;
  83.                     padding: 1px 0px 0px 3px;
  84.                 }
  85.  
  86.                 SPAN.clsSelected
  87.                 {
  88.                 }
  89.  
  90.                 A
  91.                 {
  92.                     color:black;
  93.                     text-decoration:none;
  94.                     height:1em;
  95.                 }
  96.  
  97.                 SPAN.clsSelected A
  98.                 {
  99.                     color:#0071DB;
  100.                     text-decoration:none;
  101.                     height:1em;
  102.                 }
  103.  
  104.                 .hide
  105.                 {
  106.                     display:none;
  107.                 }
  108.  
  109.                 .shown
  110.                 {
  111.                     display:block;
  112.                     margin-left:15px;
  113.                 }
  114.  
  115.                 .tree IMG
  116.                 {
  117.                     position:relative;
  118.                     cursor:hand;
  119.                     top:-2px;
  120.                     margin:0px;
  121.                     padding:0px;
  122.                 }
  123.  
  124.                 .treelabel
  125.                 {
  126.                     font-family:verdana;
  127.                     font-size:12px;
  128.                     color:white;
  129.                 }
  130.                 </style>
  131.                 <script>
  132.                 function Toggle(objLI)
  133.                 {
  134.                     window.event.cancelBubble = true;
  135.                     window.event.returnValue = false;
  136.                     window.document.body.focus();
  137.                     if (objLI.type == "parent")
  138.                     {
  139.                         if (objLI.state == "shown")
  140.                         {
  141.                             Collapse(objLI);
  142.                         }
  143.                         else
  144.                         {
  145.                             Expand(objLI);
  146.                         }
  147.                     }
  148.                 }
  149.                 function Collapse(objLI)
  150.                 {
  151.                     var i = 0;
  152.                     var objUL;
  153.                     var objIMG;
  154.  
  155.                     objUL = objLI.children[objLI.children.length - 1];
  156.  
  157.                     if (objUL != null)
  158.                     {
  159.                         objIMG = objLI.children[0];
  160.                         if (objUL != null)
  161.                         {
  162.                             objLI.state = "hidden";
  163.                             objUL.className = "hide";
  164.                             objIMG.innerHTML = '<span class="clsCollapse">+</span>';
  165.                         }
  166.                     }
  167.                 }
  168.  
  169.                 function Expand( objLI)
  170.                 {
  171.                     var i = 0;
  172.                     var objUL;
  173.                     var objIMG;
  174.                     var objSPAN;
  175.  
  176.                     objUL = objLI.children[objLI.children.length - 1];
  177.                     
  178.                     if (objUL != null)
  179.                     {
  180.                         objIMG = objLI.children[0];
  181.  
  182.                         if (objIMG != null)
  183.                         {
  184.                             objUL.className = "shown";
  185.                             objIMG.innerHTML = '<span class="clsExpand">-</span>';
  186.                             objLI.state = "shown";
  187.                         }
  188.                     }
  189.                 }
  190.                 
  191.                 var objPrevItem = null;
  192.                 
  193.                 function Select( objLI )
  194.                 {
  195.                     window.document.body.focus();
  196.                     
  197.                     if (objPrevItem != null)
  198.                     {
  199.                         objPrevItem.className = "clsLabel";
  200.                     }
  201.                     objPrevItem = objLI;
  202.                     
  203.                     Expand(objLI.parentElement);
  204.                     
  205.                     objLI.className = "clsSelected";
  206.                 }
  207.                 
  208.                 function Location( strTime )
  209.                 {
  210.                     var nodes = document.all.item("indexnode");
  211.                     var selectedNode = null;
  212.  
  213.                     if (nodes != null){
  214.                         if (nodes.length != null)
  215.                         {
  216.                             for (i = 0;  ; i++)
  217.                             {
  218.                                 if (i == nodes.length)
  219.                                     break;
  220.                                 if (nodes[i].begin == strTime)
  221.                                 {
  222.                                     selectedNode = nodes[i];
  223.                                     Select(nodes[i]);
  224.                                     break;
  225.                                 }
  226.                             }
  227.                         }
  228.                         else
  229.                         {
  230.                             if (nodes.begin == strTime)
  231.                             {
  232.                                 selectedNode = nodes;
  233.                                 Select(nodes);
  234.                             }
  235.                         }
  236.  
  237.                         if (selectedNode != null)
  238.                         {
  239.                             node = selectedNode;
  240.                             while (true)
  241.                             {
  242.                                 if (node.type == 'root')
  243.                                 {
  244.                                     break;
  245.                                 }
  246.  
  247.                                 node = node.parentElement;
  248.  
  249.                                 if (node.state != 'shown')
  250.                                 {
  251.                                     Expand(node);
  252.                                 }
  253.  
  254.                                 node = node.parentElement;
  255.                             }
  256.                         }
  257.                     } 
  258.                 }
  259.                 
  260.                 function Goto(time)
  261.                 {
  262.                     window.location.href = "goto://" + time;
  263.                 }
  264.                 
  265.                 </script>
  266.             </head>
  267.             <body scroll="no" bgcolor="#ECEEF5" onselectstart="javascript:event.returnValue=false;return false;" oncontextmenu="javascript:event.returnValue=false;return false;" leftmargin="0" topmargin="0">
  268.                 <div style="width:100%;height:100%;overflow:auto;">
  269.                     <xsl:apply-templates />
  270.                 </div>
  271.             </body>
  272.         </html>
  273.     </xsl:template>
  274.     <xsl:template match="/CSX">
  275.         <xsl:apply-templates />
  276.     </xsl:template>
  277.     <xsl:template match="/CSX/ENTRY">
  278.         <xsl:apply-templates />
  279.     </xsl:template>
  280.     <xsl:template match="/CSX/ENTRY/DESCRIPTION">
  281.         <xsl:apply-templates />
  282.     </xsl:template>
  283.     <xsl:template match="/CSX/ENTRY/INDEXES">
  284.         <nobr>
  285.             <div id="indextree" class="tree" type="root">
  286.                 <xsl:apply-templates />
  287.             </div>
  288.         </nobr>
  289.     </xsl:template>
  290.     <xsl:template match="/CSX/ENTRY/DESCRIPTION">
  291.         <table cellspacing="0" cellpadding="3">
  292.             <xsl:apply-templates />
  293.         </table>
  294.         <table cellspacing="0" cellpadding="0" width="100%">
  295.             <tr><td height="1" bgcolor="#D0D4E2"></td></tr>
  296.             <tr><td height="1" bgcolor="#FFFFFF"></td></tr>
  297.         </table>
  298.     </xsl:template>
  299.     <xsl:template match="PARAM">
  300.         <tr>
  301.             <td valign="top">
  302.                 <xsl:value-of select="@name" />:
  303.             </td>
  304.             <td valign="top">
  305.                 <xsl:value-of select="@value" />
  306.             </td>
  307.         </tr>
  308.     </xsl:template>
  309.     <xsl:template match="INDEX">
  310.         <div class="clsItem" type="leaf">
  311.             <span class="clsSpace" type="img"><span class="clsLeaf">.</span></span>
  312.             <span class="clsLabel" type="label" onclick="Select(this)" id="indexnode">
  313.                 <xsl:attribute name="title">
  314.                     <xsl:value-of select="@name" />
  315.                 </xsl:attribute>
  316.                 <xsl:attribute name="begin">
  317.                     <xsl:choose>
  318.                     <xsl:when test="@begin">
  319.                         <xsl:value-of select="@begin" />
  320.                     </xsl:when>
  321.                     <xsl:otherwise>
  322.                     </xsl:otherwise>
  323.                     </xsl:choose>
  324.                 </xsl:attribute>
  325.                 <a>
  326.                     <xsl:attribute name="tabindex">-1</xsl:attribute>
  327.                     <xsl:attribute name="href">javascript:;</xsl:attribute>    
  328.                     <xsl:choose>
  329.                         <xsl:when test="@begin">
  330.                             <xsl:attribute name="onmousedown">javascript:Goto('<xsl:value-of select="@begin" />');</xsl:attribute>
  331.                         </xsl:when>
  332.                         <xsl:otherwise>
  333.                         </xsl:otherwise>
  334.                     </xsl:choose>
  335.                     <xsl:value-of select="@name" />
  336.                 </a>
  337.             </span>
  338.         </div>
  339.     </xsl:template>
  340.     <xsl:template match="INDEX[*]">
  341.         <div class="clsItem" type="parent">
  342.             <span class="clsSpace" type="img" onclick="Toggle(this.parentElement)"><span class="clsCollapse">+</span></span>
  343.             <span class="clsLabel" type="label" onclick="Select(this)" id="indexnode">
  344.                 <xsl:attribute name="title">
  345.                     <xsl:value-of select="@name" />
  346.                 </xsl:attribute>
  347.                 <xsl:attribute name="begin">
  348.                     <xsl:choose>
  349.                     <xsl:when test="@begin">
  350.                         <xsl:value-of select="@begin" />
  351.                     </xsl:when>
  352.                     <xsl:otherwise>
  353.                     </xsl:otherwise>
  354.                     </xsl:choose>
  355.                 </xsl:attribute>
  356.                 <a>
  357.                     <xsl:attribute name="tabindex">-1</xsl:attribute>
  358.                     <xsl:attribute name="href">javascript:;</xsl:attribute>    
  359.                     <xsl:choose>
  360.                         <xsl:when test="@begin">
  361.                             <xsl:attribute name="onmousedown">javascript:Goto('<xsl:value-of select="@begin" />');</xsl:attribute>
  362.                         </xsl:when>
  363.                         <xsl:otherwise>
  364.                         </xsl:otherwise>
  365.                     </xsl:choose>
  366.                     <xsl:value-of select="@name" />
  367.                 </a>
  368.             </span>
  369.             <div class="hide" type="container">
  370.                 <xsl:apply-templates />
  371.             </div>
  372.         </div>
  373.     </xsl:template>
  374.     <xsl:template match="/INDEX">
  375.         <xsl:apply-templates />
  376.     </xsl:template>
  377.     <xsl:template match="INDEXES/ENTRY/CSX">
  378.         <xsl:apply-templates />
  379.     </xsl:template>
  380.     <xsl:template match="ENTRY/CSX">
  381.         <xsl:apply-templates />
  382.     </xsl:template>
  383. </xsl:stylesheet>
  384.