home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2002 December / INTERNET97.ISO / pc / software / windows / building / xmlspy / setup44.exe / Data1.cab / F1746_datasheet.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2001-07-16  |  7.2 KB  |  299 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  3.     <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="no" indent="no" media-type="text/html"/>
  4.     <!--XSL Stylesheet for generating Datasheet-->
  5.     <xsl:template match="datasheet">
  6.         <html>
  7.             <head>
  8.                 <title>
  9.                     <xsl:value-of select="manufacturer"/>
  10.                     <xsl:value-of select="productline"/>
  11.                     Product Line - Data Sheet
  12.                 </title>
  13.             </head>
  14.             <body>
  15.                 <p align="right">
  16.                     <img src="Altova_right_300.gif" alt="Altova logo"/>
  17.                 </p>
  18.                 <h1>
  19.                     <xsl:value-of select="manufacturer"/>
  20.                     <xsl:value-of select="productline"/>
  21.                     Product Line - Data Sheet
  22.                 </h1>
  23.                 <!--
  24.                 <h2>Document Information</h2>
  25.                 <table border="1" cellpadding="4">
  26.                     <tr>
  27.                         <td>ID</td>
  28.                         <td>
  29.                             <input>
  30.                                 <xsl:attribute name="value"><xsl:value-of select="documentid"/></xsl:attribute>
  31.                             </input>
  32.                         </td>
  33.                     </tr>
  34.                     <tr>
  35.                         <td>Company</td>
  36.                         <td>
  37.                             <input>
  38.                                 <xsl:attribute name="value"><xsl:value-of select="manufacturer"/></xsl:attribute>
  39.                             </input>
  40.                         </td>
  41.                     </tr>
  42.                     <tr>
  43.                         <td>Line</td>
  44.                         <td>
  45.                             <input>
  46.                                 <xsl:attribute name="value"><xsl:value-of select="productline"/></xsl:attribute>
  47.                             </input>
  48.                         </td>
  49.                     </tr>
  50.                     <tr>
  51.                         <td>Security</td>
  52.                         <td>
  53.                             <table>
  54.                                 <tr>
  55.                                     <td>Classification</td>
  56.                                     <td>
  57.                                         <input>
  58.                                             <xsl:attribute name="value"><xsl:value-of select="security/classification"/></xsl:attribute>
  59.                                         </input>
  60.                                     </td>
  61.                                 </tr>
  62.                                 <tr>
  63.                                     <td>Level</td>
  64.                                     <td>
  65.                                         <input>
  66.                                             <xsl:attribute name="value"><xsl:value-of select="security/level"/></xsl:attribute>
  67.                                         </input>
  68.                                     </td>
  69.                                 </tr>
  70.                                 <tr>
  71.                                     <td>Effective</td>
  72.                                     <td>
  73.                                         <input>
  74.                                             <xsl:attribute name="value"><xsl:value-of select="security/effective"/></xsl:attribute>
  75.                                         </input>
  76.                                     </td>
  77.                                 </tr>
  78.                             </table>
  79.                         </td>
  80.                     </tr>
  81.                     <tr>
  82.                         <td>Tracking</td>
  83.                         <td>
  84.                             <xsl:for-each select="tracking">
  85.                                 <table>
  86.                                     <tr>
  87.                                         <td>Operation</td>
  88.                                         <td>Date</td>
  89.                                         <td>Time</td>
  90.                                         <td>By</td>
  91.                                         <td>Dpt.</td>
  92.                                         <td>Status</td>
  93.                                         <td>Changes</td>
  94.                                     </tr>
  95.                                     <xsl:for-each select="modification">
  96.                                         <xsl:apply-templates select="."/>
  97.                                     </xsl:for-each>
  98.                                 </table>
  99.                             </xsl:for-each>
  100.                         </td>
  101.                     </tr>
  102.                 </table>
  103.                 <h2>Document Contents</h2>
  104.                 -->
  105.                 <table width="100%">
  106.                     <tr valign="top">
  107.                         <td>
  108.                             <xsl:for-each select="description">
  109.                                 <xsl:apply-templates select="."/>
  110.                             </xsl:for-each>
  111.                         </td>
  112.                         <td>
  113.                             <table width="100%" cellspacing="10">
  114.                                 <xsl:for-each select="diagrams">
  115.                                     <tr>
  116.                                         <xsl:apply-templates select="."/>
  117.                                     </tr>
  118.                                 </xsl:for-each>
  119.                                 <tr>
  120.                                     <td colspan="2">
  121.                                         <xsl:apply-templates select="models"/>
  122.                                     </td>
  123.                                 </tr>
  124.                                 <xsl:for-each select="copyright">
  125.                                     <tr>
  126.                                         <td colspan="2" align="right">
  127.                                             <br/>
  128.                                             <br/>
  129.                                             <xsl:for-each select="para">
  130.                                                 <small>
  131.                                                     <xsl:apply-templates/>
  132.                                                     <br/>
  133.                                                 </small>
  134.                                             </xsl:for-each>
  135.                                         </td>
  136.                                     </tr>
  137.                                 </xsl:for-each>
  138.                             </table>
  139.                         </td>
  140.                     </tr>
  141.                 </table>
  142.             </body>
  143.         </html>
  144.     </xsl:template>
  145.     <xsl:template match="modification">
  146.         <tr>
  147.             <td>
  148.                 <input size="8">
  149.                     <xsl:attribute name="value"><xsl:value-of select="@operation"/></xsl:attribute>
  150.                 </input>
  151.             </td>
  152.             <td>
  153.                 <input size="8">
  154.                     <xsl:attribute name="value"><xsl:value-of select="date"/></xsl:attribute>
  155.                 </input>
  156.             </td>
  157.             <td>
  158.                 <input size="8">
  159.                     <xsl:attribute name="value"><xsl:value-of select="time"/></xsl:attribute>
  160.                 </input>
  161.             </td>
  162.             <td>
  163.                 <input size="10">
  164.                     <xsl:attribute name="value"><xsl:value-of select="by"/></xsl:attribute>
  165.                 </input>
  166.             </td>
  167.             <td>
  168.                 <input size="10">
  169.                     <xsl:attribute name="value"><xsl:value-of select="department"/></xsl:attribute>
  170.                 </input>
  171.             </td>
  172.             <td>
  173.                 <input size="8">
  174.                     <xsl:attribute name="value"><xsl:value-of select="status"/></xsl:attribute>
  175.                 </input>
  176.             </td>
  177.             <td>
  178.                 <input size="30">
  179.                     <xsl:attribute name="value"><xsl:value-of select="changes"/></xsl:attribute>
  180.                 </input>
  181.             </td>
  182.         </tr>
  183.     </xsl:template>
  184.     <xsl:template match="models">
  185.         <table width="100%">
  186.             <tr>
  187.                 <td>Principal Characteristics</td>
  188.                 <xsl:for-each select="model">
  189.                     <td bgcolor="808080">
  190.                         <b>
  191.                             <xsl:value-of select="Name"/>
  192.                         </b>
  193.                     </td>
  194.                 </xsl:for-each>
  195.             </tr>
  196.             <tr bgcolor="C0C0C0">
  197.                 <td>Max. Takeoff Weight</td>
  198.                 <xsl:for-each select="model">
  199.                     <td>
  200.                         <xsl:value-of select="MaxTakeoffWeight"/>
  201.                     </td>
  202.                 </xsl:for-each>
  203.             </tr>
  204.             <tr bgcolor="C0C0C0">
  205.                 <td>Max. Landing Weight</td>
  206.                 <xsl:for-each select="model">
  207.                     <td>
  208.                         <xsl:value-of select="MaxLandingWeight"/>
  209.                     </td>
  210.                 </xsl:for-each>
  211.             </tr>
  212.             <tr bgcolor="C0C0C0">
  213.                 <td>Engines</td>
  214.                 <xsl:for-each select="model">
  215.                     <td>
  216.                         <xsl:value-of select="EngineOfferings"/>
  217.                     </td>
  218.                 </xsl:for-each>
  219.             </tr>
  220.             <tr bgcolor="C0C0C0">
  221.                 <td>Fuel Capacity</td>
  222.                 <xsl:for-each select="model">
  223.                     <td>
  224.                         <xsl:value-of select="FuelCapacity"/>
  225.                     </td>
  226.                 </xsl:for-each>
  227.             </tr>
  228.             <tr bgcolor="C0C0C0">
  229.                 <td>Cruise Mach</td>
  230.                 <xsl:for-each select="model">
  231.                     <td>
  232.                         <xsl:value-of select="CruiseMach"/>
  233.                     </td>
  234.                 </xsl:for-each>
  235.             </tr>
  236.             <tr bgcolor="C0C0C0">
  237.                 <td>Passengers</td>
  238.                 <xsl:for-each select="model">
  239.                     <td>
  240.                         <xsl:value-of select="Passengers"/>
  241.                     </td>
  242.                 </xsl:for-each>
  243.             </tr>
  244.             <tr bgcolor="C0C0C0">
  245.                 <td>DesignRange</td>
  246.                 <xsl:for-each select="model">
  247.                     <td>
  248.                         <xsl:value-of select="DesignRange"/>
  249.                     </td>
  250.                 </xsl:for-each>
  251.             </tr>
  252.             <tr bgcolor="C0C0C0">
  253.                 <td>Pallets</td>
  254.                 <xsl:for-each select="model">
  255.                     <td>
  256.                         <xsl:value-of select="Pallets"/>
  257.                     </td>
  258.                 </xsl:for-each>
  259.             </tr>
  260.         </table>
  261.     </xsl:template>
  262.     <xsl:template match="diagram">
  263.         <td>
  264.             <h3>
  265.                 <xsl:value-of select="title"/>
  266.             </h3>
  267.             <img alt="Diagram">
  268.                 <xsl:attribute name="src"><xsl:value-of select="source"/></xsl:attribute>
  269.             </img>
  270.             <xsl:for-each select="description">
  271.                 <xsl:for-each select="para">
  272.                     <p>
  273.                         <small>
  274.                             <xsl:apply-templates/>
  275.                         </small>
  276.                     </p>
  277.                 </xsl:for-each>
  278.             </xsl:for-each>
  279.         </td>
  280.     </xsl:template>
  281.     <xsl:template match="description">
  282.         <xsl:for-each select="para">
  283.             <p>
  284.                 <xsl:apply-templates/>
  285.             </p>
  286.         </xsl:for-each>
  287.     </xsl:template>
  288.     <xsl:template match="bold">
  289.         <b>
  290.             <xsl:apply-templates/>
  291.         </b>
  292.     </xsl:template>
  293.     <xsl:template match="italic">
  294.         <i>
  295.             <xsl:apply-templates/>
  296.         </i>
  297.     </xsl:template>
  298. </xsl:stylesheet>
  299.