home *** CD-ROM | disk | FTP | other *** search
/ PC World 2003 December / PCWorld_2003-12_cd.bin / Software / komercni / alc / ep2sr51csy.msi / Ep.CAB / repx4 < prev    next >
Extensible Markup Language  |  2002-08-26  |  6KB  |  200 lines

  1. <?xml version='1.0' encoding="windows-1250" ?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  3.  
  4. <xsl:template match="sw">
  5.     <xsl:if expr="StartLine()">
  6.         <xsl:element name="tr"/>
  7.     </xsl:if>
  8.     <td class="Frame" width="50%">
  9.         <xsl:value-of select="."/>
  10.     </td>
  11.     <xsl:if expr="EndLine()">
  12.         <xsl:element name="/tr"/>
  13.     </xsl:if>
  14. </xsl:template>
  15.  
  16. <xsl:template match="prop">
  17.     <xsl:value-of select="kind"/>: <xsl:value-of select="value"/><br/>
  18. </xsl:template>
  19.  
  20. <xsl:template match="prop[kind='U₧ivatel']">
  21.     <xsl:value-of select="kind"/>: <b><xsl:value-of select="value"/></b><br/>
  22. </xsl:template>
  23.  
  24. <xsl:template match="node[proplist/prop[kind='Druh']/value='Sestava']">
  25.     <table width="100%">
  26.         <tr>
  27.           <td><h1>Nainstalovan² software</h1></td>
  28.           <td>Nßzev sestavy:<br/>
  29.             <font size="+2"><b><xsl:value-of select="proplist/prop[kind='Nßzev sestavy']/value"/></b></font>
  30.           </td>
  31.           <xsl:if test="proplist/prop[kind='Inventßrnφ Φφslo']/value">
  32.             <td>Inv.Φφslo sestavy:<br/>
  33.               <font size="+2"><b><xsl:value-of select="proplist/prop[kind='Inventßrnφ Φφslo']/value"/></b></font><br/>
  34.             </td>
  35.           </xsl:if>
  36.           <xsl:if test=".//node[proplist/prop[kind='Druh']/value='PoΦφtaΦ']/proplist/prop[kind='Inventßrnφ Φφslo']/value">
  37.             <td>Inv.Φφslo poΦφtaΦe:<br/>
  38.               <font size="+2"><b><xsl:value-of select=".//node[proplist/prop[kind='Druh']/value='PoΦφtaΦ']/proplist/prop[kind='Inventßrnφ Φφslo']/value"/></b></font><br/>
  39.             </td>
  40.           </xsl:if>
  41.         </tr>
  42.     </table>
  43.     <table width="100%" class="Frame">
  44.         <tr>
  45.           <td class="Frame" valign="top" bgcolor="#d8e4d8">
  46.             <xsl:apply-templates select="proplist/prop[kind='U₧ivatel']"/>
  47.             <xsl:apply-templates select="proplist/prop[kind='Osobnφ Φφslo']"/>
  48.             <xsl:apply-templates select="proplist/prop[kind='Nßzev organizace']"/>
  49.             <xsl:apply-templates select="proplist/prop[kind='Zßvod']"/>
  50.             <xsl:apply-templates select="proplist/prop[kind='Zßvod1']"/>
  51.             <xsl:apply-templates select="proplist/prop[kind='Zßvod2']"/>
  52.             <xsl:apply-templates select="proplist/prop[kind='Zßvod3']"/>
  53.             <xsl:apply-templates select="proplist/prop[kind='┌sek']"/>
  54.             <xsl:apply-templates select="proplist/prop[kind='┌sek1']"/>
  55.             <xsl:apply-templates select="proplist/prop[kind='┌sek2']"/>
  56.             <xsl:apply-templates select="proplist/prop[kind='┌sek3']"/>
  57.             <xsl:apply-templates select="proplist/prop[kind='St°edisko']"/>
  58.             <xsl:apply-templates select="proplist/prop[kind='St°edisko1']"/>
  59.             <xsl:apply-templates select="proplist/prop[kind='St°edisko2']"/>
  60.             <xsl:apply-templates select="proplist/prop[kind='St°edisko3']"/>
  61.             <xsl:apply-templates select="proplist/prop[kind='┌tvar']"/>
  62.             <xsl:apply-templates select="proplist/prop[kind='┌tvar1']"/>
  63.             <xsl:apply-templates select="proplist/prop[kind='┌tvar2']"/>
  64.             <xsl:apply-templates select="proplist/prop[kind='┌tvar3']"/>
  65.             <xsl:apply-templates select="proplist/prop[kind='Odd∞lenφ']"/>
  66.           </td>
  67.           <td class="Frame" valign="top" bgcolor="#d8e4d8">
  68.             <xsl:apply-templates select="proplist/prop[kind='Budova']"/>
  69.             <xsl:apply-templates select="proplist/prop[kind='Poschodφ']"/>
  70.             <xsl:apply-templates select="proplist/prop[kind='Mφstnost']"/>
  71.             <xsl:apply-templates select="proplist/prop[kind='Umφst∞nφ']"/>
  72.           </td>
  73.           <xsl:if test="proplist/prop[kind='Nßzev sφt∞' or kind='Nßzev podsφt∞' or kind='Nßzev v∞tve sφt∞']">
  74.             <td class="Frame" valign="top" bgcolor="#d8e4d8">
  75.               <xsl:apply-templates select="proplist/prop[kind='Nßzev sφt∞']"/>
  76.               <xsl:apply-templates select="proplist/prop[kind='Nßzev podsφt∞']"/>
  77.               <xsl:apply-templates select="proplist/prop[kind='Nßzev v∞tve sφt∞']"/>
  78.             </td>
  79.           </xsl:if>
  80.         </tr>
  81.     </table>
  82.  
  83.     <xsl:if test=".//swlist/sw[@cat='1']">
  84.         <h3>OperaΦnφ systΘm</h3>
  85.         <xsl:for-each select=".//swlist/sw[@cat='1']">
  86.             <xsl:value-of/><br/>
  87.         </xsl:for-each>
  88.     </xsl:if>
  89.  
  90.     <xsl:if test=".//swlist/sw[@cat='0' and @type='1']">
  91.         <h3>KomerΦnφ software</h3>
  92.         <table width="100%" class="Frame">
  93.             <xsl:eval>InitLine()</xsl:eval>
  94.             <xsl:apply-templates select=".//swlist/sw[@cat='0' and @type='1']"/>
  95.         </table>
  96.     </xsl:if>
  97.  
  98.     <xsl:if test=".//swlist/sw[@cat='0' and @type='3']">
  99.         <h3>Shareware/Trial</h3>
  100.         <table width="100%" class="Frame">
  101.             <xsl:eval>InitLine()</xsl:eval>
  102.             <xsl:apply-templates select=".//swlist/sw[@cat='0' and @type='3']"/>
  103.         </table>
  104.     </xsl:if>
  105.  
  106.     <xsl:if test=".//swlist/sw[@cat='0' and @type='2']">
  107.         <h3>Freeware</h3>
  108.         <table width="100%" class="Frame">
  109.             <xsl:eval>InitLine()</xsl:eval>
  110.             <xsl:apply-templates select=".//swlist/sw[@cat='0' and @type='2']"/>
  111.         </table>
  112.     </xsl:if>
  113.  
  114. </xsl:template>
  115.  
  116. <xsl:template match="/">
  117.     <xsl:choose>
  118.         <xsl:when test=".//node[proplist/prop[kind='Druh']/value='Sestava']">
  119.             <xsl:for-each select=".//node[proplist/prop[kind='Druh']/value='Sestava']">
  120.                 <xsl:apply-templates select="."/>
  121.                 <xsl:if test="context()[not(end())]"><p class="page"></p></xsl:if>
  122.             </xsl:for-each>
  123.         </xsl:when>
  124.         <xsl:otherwise>
  125.             Vybran² objekt neobsahuje ₧ßdou poΦφtaΦovou Sestavu.
  126.         </xsl:otherwise>
  127.     </xsl:choose>
  128. </xsl:template>
  129.  
  130. <xsl:template match="swlist">
  131.   <table id="Detail" width="100%" border="0" class="Frame">
  132.     <tr bgColor="silver">
  133.       <td><b>Software</b></td>
  134.       <td align="right">
  135.         <img id="CloseDetails" onclick="OnToggleDetails()" style="cursor:hand" alt="skr²t detaily"/>
  136.       </td>
  137.     </tr>
  138.     <tr>
  139.       <td colspan="2">
  140.         <table border="0" cellspacing="0" cellpadding="2">
  141.           <tr>
  142.             <td><b>OperaΦnφ systΘm:</b> <xsl:value-of select="./sw[@cat='1']"/></td>
  143.           </tr>
  144.           <tr>
  145.             <td><b>Aplikace:</b>
  146.               <xsl:for-each select="./sw[@cat!='1']">
  147.                 <xsl:value-of select="."/><xsl:if test="context()[not(end())]">, </xsl:if>
  148.               </xsl:for-each>
  149.             </td>
  150.           </tr>
  151.         </table>
  152.       </td>
  153.     </tr>
  154.   </table>
  155. </xsl:template>
  156.  
  157.  
  158. <xsl:script><![CDATA[
  159.  
  160. var g_ColumnCount=2;
  161. var g_Column;
  162.  
  163. function InitLine()
  164. {
  165.     g_Column=g_ColumnCount;
  166. }
  167.  
  168. function StartLine()
  169. {
  170.     if ( g_Column >= g_ColumnCount ) {
  171.         g_Column=0;
  172.         return true;
  173.     }
  174.  
  175.     return false;
  176. }
  177.  
  178. function EndLine()
  179. {
  180.     if ( ++g_Column >= g_ColumnCount )
  181.         return true;
  182.  
  183.     return false;
  184. }
  185.  
  186. function MakePatternString(s)
  187. {
  188.     var st;
  189.     st=s;
  190.     st=st.replace("&","&");
  191.     st=st.replace("\"",""");
  192.     st=st.replace("<",">");
  193.     st=st.replace(">","<");
  194.     st=st.replace("'","\\'");
  195.     return st;
  196. }
  197.  
  198. ]]></xsl:script>
  199.  
  200. </xsl:stylesheet>