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

  1. <!-- 
  2. TEI XSLT stylesheet family version 1.2
  3. RCS: $Date: 2002/10/21 13:44:15 $, $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. <xsl:template match="teiCorpus.2">
  24.  <xsl:for-each select="TEI.2">
  25.  <xsl:if test="$verbose">
  26.    <xsl:message>Process <xsl:value-of select="teiHeader/fileDesc/titleStmt/title"/></xsl:message>
  27.  </xsl:if>
  28.    <xsl:apply-templates select="." mode="split"/>
  29.  </xsl:for-each>
  30.  <html><xsl:call-template name="addLangAtt"/> 
  31.  <head>
  32.  <title><xsl:apply-templates select="teiHeader/fileDesc/titleStmt/title/text()"/></title>
  33.  <link rel="stylesheet" type="text/css" href="{$cssFile}"/>
  34.  </head>
  35.  <body>
  36.  <xsl:call-template name="bodyHook"/>
  37.  <xsl:call-template name="bodyJavaScript"/>
  38.  <xsl:call-template name="stdheader">
  39.   <xsl:with-param name="title">
  40.    <xsl:apply-templates select="teiHeader/fileDesc/titleStmt/title"/>
  41.   </xsl:with-param>
  42.  </xsl:call-template>
  43.  
  44.  <xsl:call-template name="corpusBody"/>
  45.  
  46.  <xsl:call-template name="stdfooter">
  47.        <xsl:with-param name="date">
  48.          <xsl:choose>
  49.           <xsl:when test="teiHeader/revisionDesc//date[1]">
  50.             <xsl:value-of select="teiHeader/revisionDesc//date[1]"/>
  51.           </xsl:when>
  52.           <xsl:otherwise>
  53.            <xsl:text>(undated)</xsl:text>
  54.           </xsl:otherwise>    
  55.          </xsl:choose>
  56.        </xsl:with-param>
  57.        <xsl:with-param name="author"/>
  58.    </xsl:call-template>
  59.  </body>
  60.  </html>
  61. </xsl:template>
  62.  
  63.  
  64. <xsl:template name="corpusBody">
  65. <ul>
  66.  <xsl:for-each select="TEI.2">
  67.  <li>
  68.     <a> <xsl:attribute name="href">
  69.      <xsl:apply-templates mode="xrefheader" select="."/>
  70.      </xsl:attribute>
  71.      <xsl:call-template name="header">
  72.      <xsl:with-param name="minimal"/>
  73.      </xsl:call-template>
  74.      </a>  
  75.  </li>
  76.  </xsl:for-each>
  77. </ul>
  78. </xsl:template>
  79.  
  80. <xsl:template match="catRef">
  81.   <xsl:if test="preceding-sibling::catRef"><xsl:text> </xsl:text></xsl:if>
  82.   <em><xsl:value-of select="@scheme"/></em>:
  83.   <xsl:apply-templates select="key('IDS',@target)/catDesc"/>
  84. </xsl:template>
  85.  
  86. </xsl:stylesheet>
  87.