Statistics
| Revision:

root / tmp / org.txm.core / res / org / txm / xml / xsl / tei / xhtml2 / tei.xsl @ 187

History | View | Annotate | Download (5.8 kB)

1
<?xml version="1.0" encoding="utf-8"?>
2
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml"                  
3
                xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
4
		xmlns:teidocx="http://www.tei-c.org/ns/teidocx/1.0"
5
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
6
                xmlns:rng="http://relaxng.org/ns/structure/1.0"
7
                xmlns:tei="http://www.tei-c.org/ns/1.0"
8
                xmlns:teix="http://www.tei-c.org/ns/Examples"
9
                xmlns:html="http://www.w3.org/1999/xhtml"
10
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
11
                exclude-result-prefixes="html a fo rng tei teix teidocx"
12
                version="2.0">
13
  <xsl:import href="../common2/tei.xsl"/>
14
  <xsl:import href="tei-param.xsl"/>
15
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" scope="stylesheet" type="stylesheet">
16
      <desc>
17
         <p>
18
    TEI stylesheet for making HTML output.
19
      </p>
20
         <p>This software is dual-licensed:
21

    
22
1. Distributed under a Creative Commons Attribution-ShareAlike 3.0
23
Unported License http://creativecommons.org/licenses/by-sa/3.0/ 
24

    
25
2. http://www.opensource.org/licenses/BSD-2-Clause
26
		
27
All rights reserved.
28

    
29
Redistribution and use in source and binary forms, with or without
30
modification, are permitted provided that the following conditions are
31
met:
32

    
33
* Redistributions of source code must retain the above copyright
34
notice, this list of conditions and the following disclaimer.
35

    
36
* Redistributions in binary form must reproduce the above copyright
37
notice, this list of conditions and the following disclaimer in the
38
documentation and/or other materials provided with the distribution.
39

    
40
This software is provided by the copyright holders and contributors
41
"as is" and any express or implied warranties, including, but not
42
limited to, the implied warranties of merchantability and fitness for
43
a particular purpose are disclaimed. In no event shall the copyright
44
holder or contributors be liable for any direct, indirect, incidental,
45
special, exemplary, or consequential damages (including, but not
46
limited to, procurement of substitute goods or services; loss of use,
47
data, or profits; or business interruption) however caused and on any
48
theory of liability, whether in contract, strict liability, or tort
49
(including negligence or otherwise) arising in any way out of the use
50
of this software, even if advised of the possibility of such damage.
51
</p>
52
         <p>Author: See AUTHORS</p>
53
         <p>Id: $Id: tei.xsl 9669 2011-11-07 19:17:54Z rahtz $</p>
54
         <p>Copyright: 2011, TEI Consortium</p>
55
      </desc>
56
   </doc>
57
  <xsl:include href="core.xsl"/>
58
  <xsl:include href="corpus.xsl"/>
59
  <xsl:include href="dictionaries.xsl"/>
60
  <xsl:include href="drama.xsl"/>
61
  <xsl:include href="figures.xsl"/>
62
  <xsl:include href="header.xsl"/>
63
  <xsl:include href="linking.xsl"/>
64
  <xsl:include href="namesdates.xsl"/>
65
  <xsl:include href="tagdocs.xsl"/>
66
  <xsl:include href="textstructure.xsl"/>
67
  <xsl:include href="textcrit.xsl"/>
68
  <xsl:include href="transcr.xsl"/>
69
  <xsl:include href="verse.xsl"/>
70
  <xsl:include href="../common2/verbatim.xsl"/>
71

    
72

    
73
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" type="string">
74
      <desc>
75
Stylesheet constant setting the name of the main output file.
76
</desc>
77
   </doc>
78
  <xsl:variable name="top" select="/"/>
79
  <xsl:variable name="masterFile">
80
      <xsl:choose>
81
         <xsl:when test="not($outputName ='')">
82
            <xsl:choose>
83
               <xsl:when test="$STDOUT='true'">
84
                  <xsl:value-of select="$outputName"/>
85
               </xsl:when>
86
               <xsl:when test="contains($outputName,'.xml')">
87
                  <xsl:value-of select="substring-before($outputName,'.xml')"/>
88
               </xsl:when>
89
               <xsl:otherwise>
90
                  <xsl:value-of select="$outputName"/>
91
               </xsl:otherwise>
92
            </xsl:choose>
93
         </xsl:when>
94
         <xsl:when test="contains($REQUEST,'.ID=')">
95
            <xsl:call-template name="get-basename">
96
               <xsl:with-param name="file">
97
                  <xsl:value-of select="substring-before($REQUEST,'.ID=')"/>
98
               </xsl:with-param>
99
            </xsl:call-template>
100
         </xsl:when>
101
         <xsl:when test="not($REQUEST='')">
102
            <xsl:call-template name="get-basename">
103
               <xsl:with-param name="file">
104
                  <xsl:value-of select="$REQUEST"/>
105
               </xsl:with-param>
106
            </xsl:call-template>
107
         </xsl:when>
108
         <xsl:when test="$STDOUT='true'">
109
            <xsl:text>index.xml</xsl:text>
110
         </xsl:when>
111
         <xsl:otherwise>
112
            <xsl:text>index</xsl:text>
113
         </xsl:otherwise>
114
      </xsl:choose>
115
  </xsl:variable>
116
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
117
      <desc>[html] How to work out the filename component of a path<param name="file">filename</param>
118
      </desc>
119
   </doc>
120
  <xsl:template name="get-basename">
121
      <xsl:param name="file"/>
122
      <xsl:choose>
123
         <xsl:when test="contains($file,'/')">
124
            <xsl:call-template name="get-basename">
125
               <xsl:with-param name="file">
126
                  <xsl:value-of select="substring-after($file,'/')"/>
127
               </xsl:with-param>
128
            </xsl:call-template>
129
         </xsl:when>
130
         <xsl:otherwise>
131
            <xsl:choose>
132
               <xsl:when test="$STDOUT='true'">
133
                  <xsl:value-of select="$file"/>
134
               </xsl:when>
135
               <xsl:when test="contains($file,'.xml')">
136
                  <xsl:value-of select="substring-before($file,'.xml')"/>
137
               </xsl:when>
138
               <xsl:otherwise>
139
                  <xsl:value-of select="$file"/>
140
               </xsl:otherwise>
141
            </xsl:choose>
142
         </xsl:otherwise>
143
      </xsl:choose>
144
  </xsl:template>
145

    
146
  <xsl:template name="bodyMicroData"/>
147
</xsl:stylesheet>