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