home *** CD-ROM | disk | FTP | other *** search
/ 11 Top Anwendungen / CD_ROM_MAGAZIN.iso / MoneyMethod-Demo / Beispiel / source / XML / cardbody.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2000-05-29  |  6.0 KB  |  144 lines

  1. <xsl:stylesheet
  2.   version="1.0"
  3.   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4.   xmlns:xt="http://www.jclark.com/xt">
  5. <xsl:output method="html"/>
  6.  
  7. <xsl:template name="cardbody">
  8. <!-- execution context - row -->
  9. <p align="center">
  10.     <table border="0" width="725" align="center">
  11.     <tr>
  12.     <td width="148" valign="top" height="263">
  13.     <!-- image -->
  14.     <br/> 
  15.     <xsl:variable name="imgpath">
  16.       <xsl:value-of select="cell[position()=$imagecol]"/>
  17.     </xsl:variable>
  18.     <xsl:if test="$imgpath!=""">
  19.        <img src="{concat($respath,"Images/",$imgpath)}" border="0"/>
  20.     </xsl:if>
  21.     </td>
  22.     <td width="245" valign="top" height="263">
  23.         <xsl:variable name="props"
  24.     select="document("styles.xml")//paramgroup[@name="title"]"/>
  25.     <xsl:call-template name="apply-font-styles-using-path">
  26.     <xsl:with-param name="path" select="$props"/>
  27.     <xsl:with-param name="content">
  28.         <xsl:element name="font" use-attribute-sets="title-font-style">
  29.         <xsl:value-of select="cell[position()=$titlecol]"/> <!-- title -->
  30.         </xsl:element>
  31.     </xsl:with-param>
  32.     </xsl:call-template>
  33.  
  34.     <xsl:element name="p" use-attribute-sets="author-align">
  35.     <xsl:variable name="props"
  36.     select="document("styles.xml")//paramgroup[@name="author"]"/>
  37.     <xsl:call-template name="apply-font-styles-using-path">
  38.     <xsl:with-param name="path" select="$props"/>
  39.     <xsl:with-param name="content">
  40.         <xsl:element name="font" use-attribute-sets="author-font-style">
  41.         <xsl:value-of select="cell[position()=$authorcol]"/>
  42.         </xsl:element>
  43.     </xsl:with-param>
  44.     </xsl:call-template>
  45.     </xsl:element> <!-- p -->
  46.  
  47.     <table border="0" width="200" vspace="10">
  48.       <tr>
  49.              <td width="67">   <!-- ISBN label  -->
  50.              <br/>
  51.              <xsl:variable name="props"
  52.                select="document("styles.xml")//paramgroup[@name="pilab"]"/>
  53.              <xsl:call-template name="apply-font-styles-using-path">
  54.                 <xsl:with-param name="path" select="$props"/>
  55.                 <xsl:with-param name="content">
  56.                     <xsl:element name="p" use-attribute-sets="pilab-align">
  57.                     <xsl:element name="font" use-attribute-sets="pilab-font-style">
  58.                     <xsl:value-of select="//colname[position()=$isbncol]"/>
  59.                     </xsl:element>
  60.                     </xsl:element>
  61.                 </xsl:with-param>
  62.              </xsl:call-template>
  63.             </td>
  64.  
  65.             <td width="133">  <!-- ISBN value  -->
  66.              <br/>
  67.              <xsl:variable name="props"
  68.                select="document("styles.xml")//paramgroup[@name="pival"]"/>
  69.              <xsl:call-template name="apply-font-styles-using-path">
  70.                 <xsl:with-param name="path" select="$props"/>
  71.                 <xsl:with-param name="content">
  72.                     <xsl:element name="p" use-attribute-sets="pival-align">
  73.                     <xsl:element name="font" use-attribute-sets="pival-font-style">
  74.                     <xsl:value-of select="cell[position()=$isbncol]"/>
  75.                     </xsl:element>
  76.                     </xsl:element>
  77.                 </xsl:with-param>
  78.              </xsl:call-template>
  79.             </td>
  80.       </tr>
  81.       <tr>
  82.         <td width="67">
  83.             <xsl:variable name="props"
  84.             select="document("styles.xml")//paramgroup[@name="pilab"]"/>
  85.             <xsl:call-template name="apply-font-styles-using-path">
  86.             <xsl:with-param name="path" select="$props"/>
  87.             <xsl:with-param name="content">
  88.                 <xsl:element name="p" use-attribute-sets="pilab-align">
  89.                 <xsl:element name="font" use-attribute-sets="pilab-font-style">
  90.                 <xsl:value-of select="//colname[position()=$pricecol]"/>
  91.                 </xsl:element>
  92.                 </xsl:element>
  93.             </xsl:with-param>
  94.             </xsl:call-template>
  95.         </td>
  96.         <td width="133">
  97.             <xsl:variable name="props"
  98.             select="document("styles.xml")//paramgroup[@name="pival"]"/>
  99.             <xsl:call-template name="apply-font-styles-using-path">
  100.             <xsl:with-param name="path" select="$props"/>
  101.             <xsl:with-param name="content">
  102.                 <xsl:element name="p" use-attribute-sets="pival-align">
  103.                 <xsl:element name="font" use-attribute-sets="pival-font-style">
  104.                 <xsl:value-of select="cell[position()=$pricecol]"/><xsl:text> </xsl:text><xsl:value-of select="$currency"/>
  105.                 </xsl:element>
  106.                 </xsl:element>
  107.             </xsl:with-param>
  108.             </xsl:call-template>
  109.         </td>
  110.       </tr>
  111.     </table>
  112.     </td>
  113.     <td width="360" height="263" valign="top"> <p align="center">
  114.         <xsl:variable name="props"
  115.         select="document("styles.xml")//paramgroup[@name="desclab"]"/>
  116.         <xsl:call-template name="apply-font-styles-using-path">
  117.         <xsl:with-param name="path" select="$props"/>
  118.         <xsl:with-param name="content">
  119.             <xsl:element name="font" use-attribute-sets="desclab-font-style">
  120.             <xsl:value-of select="//colname[position()=$desccol]"/>
  121.             </xsl:element>
  122.         </xsl:with-param>
  123.         </xsl:call-template>
  124.       </p>
  125.       <p>
  126.         <xsl:variable name="props"
  127.         select="document("styles.xml")//paramgroup[@name="desctext"]"/>
  128.         <xsl:call-template name="apply-font-styles-using-path">
  129.         <xsl:with-param name="path" select="$props"/>
  130.         <xsl:with-param name="content">
  131.             <xsl:element name="font" use-attribute-sets="desctext-font-style">
  132.             <xsl:value-of select="cell[position()=$desccol]"/>
  133.             </xsl:element>
  134.         </xsl:with-param>
  135.         </xsl:call-template>
  136.       </p>
  137.     </td>
  138.   </tr>
  139.   </table>
  140. </p>
  141. </xsl:template>
  142.  
  143. </xsl:stylesheet>
  144.