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

  1. <!-- 
  2. TEI XSLT stylesheet family version 1.2
  3. RCS: $Date: 2002/10/21 13:44:19 $, $Revision: 1.1.2.1 $, $Author: jdj $
  4.  
  5. XSL stylesheet to format TEI XML documents to HTML or XSL FO
  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. <xsl:stylesheet
  21.   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  22.  
  23.  
  24.  
  25. <!-- top-level stuff -->
  26.  
  27. <xsl:template match="docImprint"/>
  28.  
  29.  
  30. <xsl:template match="front|titlePart">
  31.   <xsl:apply-templates/>
  32. </xsl:template>
  33.  
  34. <xsl:template match="titlePage">
  35.   <hr/>
  36.   <table>
  37.     <tr><td><b><xsl:apply-templates mode="print" select="docTitle"/></b></td></tr>
  38.     <tr><td><i><xsl:apply-templates mode="print" select="docAuthor"/></i></td></tr>
  39.     <tr><td><xsl:apply-templates mode="print" select="docDate"/></td></tr>
  40.   </table>
  41.   <hr/>
  42. </xsl:template>
  43.  
  44. <xsl:template match="body|back" mode="split">
  45.   <xsl:for-each select="*">
  46.    <xsl:choose>
  47.     <xsl:when test="starts-with(name(.),'div')">
  48.        <xsl:apply-templates select="." mode="split"/>
  49.     </xsl:when>
  50.     <xsl:otherwise>
  51.        <xsl:apply-templates select="."/>
  52.     </xsl:otherwise>
  53.    </xsl:choose>
  54.   </xsl:for-each>
  55. </xsl:template>
  56.  
  57. <xsl:template match="teiHeader"/>
  58.  
  59. <xsl:template match="text">
  60.  <xsl:apply-templates/>
  61. </xsl:template>
  62.  
  63. <!-- author and title -->
  64. <xsl:template match="docTitle"/>
  65. <xsl:template match="docAuthor"/>
  66. <xsl:template match="docDate"/>
  67.  
  68. <xsl:template match="docDate" mode="print">
  69.     <xsl:apply-templates/>
  70. </xsl:template>
  71.  
  72. <xsl:template match="docAuthor" mode="author">
  73.      <xsl:if test="preceding-sibling::docAuthor">
  74.     <xsl:text>, </xsl:text>
  75.      </xsl:if>
  76.     <xsl:apply-templates/>
  77. </xsl:template>
  78.  
  79.  
  80.  
  81. </xsl:stylesheet>
  82.