home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 October / INTERNET108.ISO / pc / software / windows / building / xmlspy / xmlspyentcomplete5.exe / Data1.cab / _45F8F32870224425A17816FC5D35E9B4 < prev    next >
Encoding:
Text File  |  2002-10-21  |  3.3 KB  |  127 lines

  1. <!-- $Date: 
  2. TEI XSLT stylesheet family version 1.2
  3. RCS: 2001/10/01 $, $Revision: 1.1.2.1 $, $Author: jdj $
  4.  
  5. XSL HTML stylesheet to format TEI XML documents 
  6.  
  7.  Copyright 1999-2002 Sebastian Rahtz/Oxford University  <sebastian.rahtz@oucs.ox.ac.uk>
  8.  
  9.  Permission is hereby granted, free of charge, to any person obtaining
  10.  a copy of this software and any associated documentation files (the
  11.  ``Software''), to deal in the Software without restriction, including
  12.  without limitation the rights to use, copy, modify, merge, publish,
  13.  distribute, sublicense, and/or sell copies of the Software, and to
  14.  permit persons to whom the Software is furnished to do so, subject to
  15.  the following conditions:
  16.  
  17.  The above copyright notice and this permission notice shall be included
  18.  in all copies or substantial portions of the Software.
  19.  
  20. -->
  21.  
  22. <xsl:stylesheet
  23.   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
  24.   xmlns:fo="http://www.w3.org/1999/XSL/Format"
  25.   >
  26.  
  27. <xsl:template match="div[@type='frontispiece']">
  28.  <xsl:apply-templates/>
  29. </xsl:template>
  30.  
  31. <xsl:template match="div[@type='epistle']">
  32.  <xsl:apply-templates/>
  33. </xsl:template>
  34.  
  35. <xsl:template match="div[@type='illustration']">
  36.  <xsl:apply-templates/>
  37. </xsl:template>
  38.  
  39. <!--
  40. <xsl:template match="div[@type='canto']">
  41.   <xsl:variable name="divlevel" select="count(ancestor::div)"/>
  42.   <xsl:call-template name="NumberedHeading">
  43.     <xsl:with-param name="level"><xsl:value-of select="$divlevel"/></xsl:with-param>
  44.   </xsl:call-template>
  45.   <xsl:apply-templates/>
  46. </xsl:template>
  47.  
  48. -->
  49.  
  50. <xsl:template match="byline">
  51.  <p align="center">
  52.    <xsl:apply-templates/>
  53.  </p>
  54. </xsl:template>
  55.  
  56. <xsl:template match="epigraph">
  57.  <p         align="center">
  58.    <xsl:apply-templates/>
  59.  </p>
  60. </xsl:template>
  61.  
  62. <xsl:template match="closer">
  63.  <p     
  64.     space-before.optimum="4pt"
  65.     space-after.optimum="4pt">
  66.    <xsl:apply-templates/>
  67.  </p>
  68. </xsl:template>
  69.  
  70. <xsl:template match="salute">
  71.  <p  align="left">
  72.    <xsl:apply-templates/>
  73.  </p>
  74. </xsl:template>
  75.  
  76. <xsl:template match="signed">
  77.  <p  align="left">
  78.    <xsl:apply-templates/>
  79.  </p>
  80. </xsl:template>
  81.  
  82. <xsl:template match="epigraph/lg">
  83.     <table>
  84.       <xsl:apply-templates/>
  85.     </table>
  86. </xsl:template>
  87.  
  88.  
  89. <xsl:template match="l">
  90.   <tr><td>
  91.   <xsl:choose>
  92.     <xsl:when test="@rend='Alignr'">
  93.       <xsl:attribute name="align">right</xsl:attribute>
  94.     </xsl:when>
  95.     <xsl:when test="@rend='Alignc'">
  96.      <xsl:attribute name="align">center</xsl:attribute>
  97.     </xsl:when>
  98.     <xsl:when test="@rend='Alignl'">
  99.       <xsl:attribute name="align">left</xsl:attribute>
  100.       <xsl:text>  </xsl:text>
  101.     </xsl:when>
  102.     <xsl:otherwise>
  103.       <xsl:attribute name="align"><xsl:value-of select="$cellAlign"/></xsl:attribute>
  104.      <xsl:choose>
  105.      <xsl:when test="starts-with(@rend,'indent(')">
  106.     <xsl:attribute name="text-indent">
  107.       <xsl:value-of select="concat(substring-before(substring-after(@rend,'('),')'),'em')"/>
  108.     </xsl:attribute>
  109.   </xsl:when>
  110.   <xsl:when test="starts-with(@rend,'indent')">
  111.     <xsl:attribute name="text-indent">1em</xsl:attribute>
  112.   </xsl:when>
  113.   </xsl:choose>
  114. </xsl:otherwise>
  115. </xsl:choose>
  116.   <xsl:apply-templates/>
  117. </td></tr> 
  118. </xsl:template>
  119.  
  120. <xsl:template match="lg">
  121.     <table>
  122.       <xsl:apply-templates/>
  123.     </table>
  124. </xsl:template>
  125.  
  126. </xsl:stylesheet>
  127.