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

  1. <?xml version='1.0' encoding="windows-1250" ?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  3.  
  4.  
  5. <xsl:template match="/">
  6.     <xsl:for-each select="report">
  7.         <xsl:apply-templates select="."/>
  8.         <xsl:if test="context()[not(end())]"><p class="page"></p></xsl:if>
  9.     </xsl:for-each>
  10. </xsl:template>
  11.  
  12.  
  13. <xsl:template match="report">
  14. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  15.   <tr>
  16.     <td><h1>Protokol o p°edßnφ</h1></td>
  17.     <td align="right">╚φslo:<br/>
  18.         <b><font size="+2"><xsl:value-of select="number"/></font></b>
  19.     </td>
  20.   </tr>
  21. </table>
  22.  
  23. <br/>
  24.  
  25. P°edm∞t:<br/>
  26. <xsl:apply-templates select="device/node"/>
  27. <br/>
  28.  
  29. <xsl:if test="text">
  30. <table border="0" cellpadding="3" cellspacing="0" width="100%" class="Frame">
  31.   <tr>
  32.     <td class="Frame"><xsl:value-of select="text"/></td>
  33.   </tr>
  34. </table>
  35. <br/>
  36. </xsl:if>
  37.  
  38. <table border="0" cellpadding="3" cellspacing="0" width="100%" class="Frame">
  39.   <tr bgColor="silver">
  40.     <td width="50%" align="center" class="Frame"><b>P°edßvajφcφ</b></td>
  41.     <td width="50%" align="center" class="Frame"><b>P°φjemce</b></td>
  42.   </tr>
  43.   <tr>
  44.     <td class="Frame"><xsl:apply-templates select="originator"/></td>
  45.     <td class="Frame"><xsl:apply-templates select="receiver"/></td>
  46.   </tr>
  47.   <tr>
  48.     <td colspan="2" class="Frame">Datum p°edßnφ: <xsl:value-of select="transferdate"/></td>
  49.   </tr>
  50.   <tr>
  51.     <td class="Frame">podpis:<br/><br/><br/></td>
  52.     <td class="Frame">podpis:<br/><br/><br/></td>
  53.   </tr>
  54.   <tr>
  55.     <td valign="top" class="Frame">Protokol vystavil:<br/>
  56.       <br/>
  57.       <br/>
  58.       Datum vystavenφ: <xsl:value-of select="date"/></td>
  59.     <td class="Frame"> </td>
  60.   </tr>
  61. </table>
  62. </xsl:template>
  63.  
  64.  
  65. <xsl:template match="originator | receiver">
  66.     <xsl:choose>
  67.     <xsl:when test="address">
  68.         <xsl:for-each select="address">
  69.             <xsl:value-of /><br/>
  70.         </xsl:for-each>
  71.     </xsl:when>
  72.     <xsl:otherwise>
  73.         <br/><br/><br/><br/><br/>
  74.     </xsl:otherwise>
  75.     </xsl:choose>
  76. </xsl:template>
  77.  
  78.  
  79. <xsl:template match="node">
  80.   <tr>
  81.     <td class="Frame"><xsl:value-of select="proplist/prop[kind='Druh']/value"/></td>
  82.     <td class="Frame">
  83.       <table border="0" cellspacing="0" cellpadding="0">
  84.         <tr>
  85.           <td><xsl:value-of select="name"/></td>
  86.           <xsl:if test="proplist/prop[kind='Inventßrnφ Φφslo']">
  87.             <td>  </td>
  88.             <td>Inv.Φ:<xsl:value-of select="proplist/prop[kind='Inventßrnφ Φφslo']/value"/></td>
  89.           </xsl:if>
  90.           <xsl:if test="proplist/prop[kind='SΘriovΘ Φφslo']">
  91.             <td>  </td>
  92.             <td>SΘriovΘ Φ:<xsl:value-of select="proplist/prop[kind='SΘriovΘ Φφslo']/value"/></td>
  93.           </xsl:if>
  94.         </tr>
  95.       </table>
  96.     </td>
  97.   </tr>
  98. </xsl:template>
  99.  
  100.  
  101. <xsl:template match="node[proplist/prop[kind='Druh' and value='Procesor']]">
  102.   <tr>
  103.     <td class="Frame">Procesor</td>
  104.     <td class="Frame">
  105.       <table border="0" cellspacing="0" cellpadding="0">
  106.         <tr>
  107.           <td><b><xsl:value-of select="name"/></b></td>
  108.           <td>    </td>
  109.           <td>SΘriovΘ Φ: <xsl:value-of select="proplist/prop[kind='SΘriovΘ Φφslo']/value"/></td>
  110.         </tr>
  111.       </table>
  112.     </td>
  113.   </tr>
  114. </xsl:template>
  115.  
  116.  
  117. <xsl:template match="node[proplist/prop[kind='Druh' and value='Pam∞¥ RAM']]">
  118.   <tr>
  119.     <td class="Frame">Pam∞¥ RAM</td>
  120.     <td class="Frame">
  121.       <table border="0" cellspacing="0" cellpadding="0">
  122.         <tr>
  123.           <td><b><xsl:value-of select="proplist/prop[kind='Velikost']/value"/></b></td>
  124.           <xsl:if test="nodelist/node[proplist/prop[kind='Druh' and value='RAM chip']]">
  125.             <td> 
  126.             (<xsl:for-each select="nodelist/node[proplist/prop[kind='Druh' and value='RAM chip']]">
  127.               <xsl:value-of select="proplist/prop[kind='Velikost']/value"/><xsl:if test="context()[not(end())]">, </xsl:if>
  128.             </xsl:for-each>)
  129.             </td>
  130.           </xsl:if>
  131.         </tr>
  132.       </table>
  133.     </td>
  134.   </tr>
  135. </xsl:template>
  136.  
  137.  
  138. <xsl:template match="node[proplist/prop[kind='Druh' and value='Pevn² disk']]">
  139.   <tr>
  140.     <td class="Frame">Pevn² disk</td>
  141.     <td class="Frame"><b><xsl:value-of select="proplist/prop[kind='Velikost']/value"/></b>, <xsl:value-of select="proplist/prop[kind='Nßzev']/value"/></td>
  142.   </tr>
  143. </xsl:template>
  144.  
  145.  
  146. <xsl:template match="node[proplist/prop[kind='Druh' and value='Grafickß karta']]">
  147.   <tr>
  148.     <td class="Frame">Grafickß karta</td>
  149.     <td class="Frame">
  150.       <xsl:value-of select="proplist/prop[kind='Nßzev']/value"/>, <xsl:value-of select="proplist/prop[kind='Velikost RAM']/value"/>
  151.     </td>
  152.   </tr>
  153. </xsl:template>
  154.  
  155.  
  156. <xsl:template match="node[proplist/prop[kind='Druh' and value='Sφ¥ovß karta']]">
  157.   <tr>
  158.     <td class="Frame">Sφ¥ovß karta</td>
  159.     <td class="Frame">
  160.       <table border="0" cellspacing="0" cellpadding="0">
  161.         <tr>
  162.           <td><xsl:value-of select="proplist/prop[kind='Nßzev']/value"/></td>
  163.           <td>  </td>
  164.           <td>IP: <xsl:value-of select="proplist/prop[kind='IP adresa']/value"/></td>
  165.           <td>  </td>
  166.           <td>MAC: <xsl:value-of select="proplist/prop[kind='MAC adresa']/value"/></td>
  167.         </tr>
  168.       </table>
  169.     </td>
  170.   </tr>
  171. </xsl:template>
  172.  
  173.  
  174. <xsl:template match="node[proplist/prop[kind='Druh' and value='Monitor']]">
  175.   <tr>
  176.     <td class="Frame"><xsl:value-of select="proplist/prop[kind='Druh']/value"/></td>
  177.     <td class="Frame">
  178.       <table border="0" cellspacing="0" cellpadding="0">
  179.         <tr>
  180.           <td><xsl:value-of select="name"/><xsl:if test="proplist/prop[kind='┌hlop°φΦka']">, <xsl:value-of select="proplist/prop[kind='┌hlop°φΦka']/value"/></xsl:if></td>
  181.           <xsl:if test="proplist/prop[kind='Inventßrnφ Φφslo']">
  182.             <td>  </td>
  183.             <td>Inv.Φ:<xsl:value-of select="proplist/prop[kind='Inventßrnφ Φφslo']/value"/></td>
  184.           </xsl:if>
  185.           <xsl:if test="proplist/prop[kind='SΘriovΘ Φφslo']">
  186.             <td>  </td>
  187.             <td>SΘriovΘ Φ:<xsl:value-of select="proplist/prop[kind='SΘriovΘ Φφslo']/value"/></td>
  188.           </xsl:if>
  189.         </tr>
  190.       </table>
  191.     </td>
  192.   </tr>
  193. </xsl:template>
  194.  
  195.  
  196. <xsl:template match="swlist">
  197.   <table id="Detail" width="100%" border="0" class="Frame">
  198.     <tr bgColor="silver">
  199.       <td><b>Software</b></td>
  200.       <td align="right">
  201.         <img id="CloseDetails" onclick="OnToggleDetails()" style="cursor:hand" alt="skr²t detaily"/>
  202.       </td>
  203.     </tr>
  204.     <tr>
  205.       <td colspan="2">
  206.         <table border="0" cellspacing="0" cellpadding="2">
  207.           <tr>
  208.             <td><b>OperaΦnφ systΘm:</b> <xsl:value-of select="./sw[@cat='1']"/></td>
  209.           </tr>
  210.           <tr>
  211.             <td><b>Aplikace:</b>
  212.               <xsl:for-each select="./sw[@cat!='1']">
  213.                 <xsl:value-of select="."/><xsl:if test="context()[not(end())]">, </xsl:if>
  214.               </xsl:for-each>
  215.             </td>
  216.           </tr>
  217.         </table>
  218.       </td>
  219.     </tr>
  220.   </table>
  221. </xsl:template>
  222.  
  223.  
  224. <xsl:template match="node[proplist/prop[kind='Druh' and value='Sestava']]/nodelist">
  225.   <table width="100%" border="0" class="Frame">
  226.     <tr>
  227.       <td colspan="2" class="Frame" bgColor="silver"><b>P°φsluÜenstvφ</b></td>
  228.     </tr>
  229.     <xsl:apply-templates select="node[proplist/prop[kind='Druh' and value='Monitor']]"/>
  230.     <xsl:apply-templates select="node[proplist/prop[kind='Druh' and value='Klßvesnice']]"/>
  231.     <xsl:apply-templates select="node[proplist/prop[kind='Druh' and value='MyÜ']]"/>
  232.     <xsl:apply-templates select="node[proplist/prop[kind='Druh' and value!='PoΦφtaΦ' and value!='Monitor' and
  233.      value!='Klßvesnice' and value!='MyÜ']]"/>
  234.   </table>
  235. </xsl:template>
  236.  
  237.  
  238. <xsl:template match="device/node">
  239. <table width="100%" border="0" class="Frame">
  240.   <tr bgColor="silver">
  241.     <td colspan="3" class="Frame"><b><xsl:value-of select="proplist/prop[kind='Druh']/value"/></b></td>
  242.   </tr>
  243.   <tr>
  244.     <td class="Frame">Nßzev: <b><xsl:value-of select="name"/></b></td>
  245.     <td class="Frame">Inv.Φ: <b><xsl:value-of select="proplist/prop[kind='Inventßrnφ Φφslo']/value"/></b></td>
  246.     <td class="Frame">SΘriovΘ Φ: <b><xsl:value-of select="proplist/prop[kind='SΘriovΘ Φφslo']/value"/></b></td>
  247.   </tr>
  248. </table>
  249. </xsl:template>
  250.  
  251.  
  252. <xsl:template match="device/node[proplist/prop[kind='Druh' and value='Sestava']]">
  253.   <xsl:apply-templates select="nodelist/node[proplist/prop[kind='Druh' and value='PoΦφtaΦ']]"/>
  254. </xsl:template>
  255.  
  256.  
  257. <xsl:template match="node[proplist/prop[kind='Druh' and value='PoΦφtaΦ']]">
  258. <table width="100%" border="0" class="Frame">
  259.   <tr bgColor="silver">
  260.     <td colspan="3"><b>PoΦφtaΦ</b></td>
  261.     <td align="right">
  262.       <img id="ToggleDetails" onclick="OnToggleDetails()" style="cursor:hand" alt="zobrazit/skr²t detaily"/>
  263.     </td>
  264.   </tr>
  265.   <tr>
  266.     <td colspan="2" class="Frame" width="50%">Inventßrnφ Φφslo: <b><xsl:value-of select="proplist/prop[kind='Inventßrnφ Φφslo']/value"/></b></td>
  267.     <td colspan="2" class="Frame">SΘriovΘ Φφslo: <b><xsl:value-of select="proplist/prop[kind='SΘriovΘ Φφslo']/value"/></b></td>
  268.   </tr>
  269.   <tr>
  270.     <td colspan="2" class="Frame">Typ: <xsl:value-of select="proplist/prop[kind='Typ']/value"/></td>
  271.     <td colspan="2" class="Frame">TypovΘ oznaΦenφ: <xsl:value-of select="proplist/prop[kind='TypovΘ oznaΦenφ']/value"/></td>
  272.   </tr>
  273.   <tr id="NakupInfo">
  274.     <td colspan="1" class="Frame" width="33%">Dodavatel: <xsl:value-of select="proplist/prop[kind='Dodavatel']/value"/></td>
  275.     <td colspan="2" class="Frame" width="33%">Datum nßkupu: <xsl:value-of select="proplist/prop[kind='Datum nßkupu']/value"/></td>
  276.     <td class="Frame">Zßruka: <xsl:value-of select="proplist/prop[kind='Zßruka']/value"/></td>
  277.   </tr>
  278. </table>
  279. <table id="Detail" width="100%" border="0" class="Frame">
  280.   <tr bgColor="silver">
  281.     <td colspan="2">
  282.       <table border="0" cellpadding="0" cellspacing="0" width="100%">
  283.         <tr>
  284.           <td><b>TechnickΘ parametry</b></td>
  285.           <td align="right"><img id="CloseDetails" onclick="OnToggleDetails()" style="cursor:hand" alt="skr²t detaily"/></td>
  286.         </tr>
  287.       </table>
  288.     </td>
  289.   </tr>
  290.   <xsl:apply-templates select="nodelist/node[proplist/prop[kind='Druh' and value='Procesor']]"/>
  291.   <xsl:apply-templates select="nodelist/node[proplist/prop[kind='Druh' and value='Pam∞¥ RAM']]"/>
  292.   <xsl:apply-templates select="nodelist/node[proplist/prop[kind='Druh' and value='Pevn² disk']]"/>
  293.   <xsl:apply-templates select="nodelist/node[proplist/prop[kind='Druh' and value='Grafickß karta']]"/>
  294.   <xsl:apply-templates select="nodelist/node[proplist/prop[kind='Druh' and value='Sφ¥ovß karta']]"/>
  295.   <xsl:apply-templates select="nodelist/node[proplist/prop[kind='Druh' and value='CD mechanika']]"/>
  296.   <xsl:apply-templates select="nodelist/node[proplist/prop[kind='Druh' and value='Disketovß mechanika']]"/>
  297.   <xsl:apply-templates select="nodelist/node[proplist/prop[kind='Druh' and value='Zvukovß karta']]"/>
  298.   <xsl:apply-templates select="nodelist/node[proplist/prop[kind='Druh' and value='Modem']]"/>
  299.   <xsl:apply-templates select="nodelist/node[proplist/prop[kind='Druh' and value!='Procesor' and
  300.    value!='Pam∞¥ RAM' and value!='Pevn² disk' and value!='Grafickß karta' and value!='Sφ¥ovß karta' and
  301.    value!='CD mechanika' and value!='Disketovß mechanika' and value!='Zvukovß karta' and value!='Modem' and
  302.    value!='Seznam instalovanΘho software']]"/>
  303. </table>
  304. <xsl:apply-templates select="ancestor(node[proplist/prop[kind='Druh' and value='Sestava']])/nodelist"/>
  305. <xsl:apply-templates select=".//swlist"/>
  306. </xsl:template>
  307.  
  308.  
  309.  
  310. <xsl:script><![CDATA[
  311.  
  312. function MakePatternString(s) {
  313.     var st;
  314.     st=s;
  315.     st=st.replace("&","&");
  316.     st=st.replace("\"",""");
  317.     st=st.replace("<",">");
  318.     st=st.replace(">","<");
  319.     st=st.replace("'","\\'");
  320.     return st;
  321. }
  322.  
  323. ]]></xsl:script>
  324.  
  325. </xsl:stylesheet>