Statistics
| Revision:

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

History | View | Annotate | Download (6.9 kB)

1
<?xml version="1.0" encoding="utf-8"?>
2
<xsl:stylesheet xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
3
                xmlns:rng="http://relaxng.org/ns/structure/1.0"
4
                xmlns:tei="http://www.tei-c.org/ns/1.0"
5
                xmlns:teix="http://www.tei-c.org/ns/Examples"
6
                
7
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8
                exclude-result-prefixes="a rng tei teix"
9
                version="2.0">
10
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" scope="stylesheet" type="stylesheet">
11
      <desc>
12
         <p> TEI stylesheet dealing with elements from the drama module,
13
      making LaTeX output. </p>
14
         <p>This software is dual-licensed:
15

    
16
1. Distributed under a Creative Commons Attribution-ShareAlike 3.0
17
Unported License http://creativecommons.org/licenses/by-sa/3.0/ 
18

    
19
2. http://www.opensource.org/licenses/BSD-2-Clause
20
		
21
All rights reserved.
22

    
23
Redistribution and use in source and binary forms, with or without
24
modification, are permitted provided that the following conditions are
25
met:
26

    
27
* Redistributions of source code must retain the above copyright
28
notice, this list of conditions and the following disclaimer.
29

    
30
* Redistributions in binary form must reproduce the above copyright
31
notice, this list of conditions and the following disclaimer in the
32
documentation and/or other materials provided with the distribution.
33

    
34
This software is provided by the copyright holders and contributors
35
"as is" and any express or implied warranties, including, but not
36
limited to, the implied warranties of merchantability and fitness for
37
a particular purpose are disclaimed. In no event shall the copyright
38
holder or contributors be liable for any direct, indirect, incidental,
39
special, exemplary, or consequential damages (including, but not
40
limited to, procurement of substitute goods or services; loss of use,
41
data, or profits; or business interruption) however caused and on any
42
theory of liability, whether in contract, strict liability, or tort
43
(including negligence or otherwise) arising in any way out of the use
44
of this software, even if advised of the possibility of such damage.
45
</p>
46
         <p>Author: See AUTHORS</p>
47
         <p>Id: $Id: drama.xsl 9646 2011-11-05 23:39:08Z rahtz $</p>
48
         <p>Copyright: 2011, TEI Consortium</p>
49
      </desc>
50
   </doc>
51
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
52
      <desc>Process element actor</desc>
53
   </doc>
54
  <xsl:template match="tei:actor">
55
      <xsl:text>\textit{</xsl:text>
56
      <xsl:apply-templates/>
57
      <xsl:text>}</xsl:text>
58
  </xsl:template>
59
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
60
      <desc>Process element camera</desc>
61
   </doc>
62
  <xsl:template match="tei:camera">
63
      <xsl:text>\textit{</xsl:text>
64
      <xsl:apply-templates/>
65
      <xsl:text>}</xsl:text>
66
  </xsl:template>
67
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
68
      <desc>Process element caption</desc>
69
   </doc>
70
  <xsl:template match="tei:caption">
71
      <xsl:text>\textit{</xsl:text>
72
      <xsl:apply-templates/>
73
      <xsl:text>}</xsl:text>
74
  </xsl:template>
75
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
76
      <desc>Process element castGroup</desc>
77
   </doc>
78
  <xsl:template match="tei:castGroup"> 
79
      <xsl:text>\begin{itemize} </xsl:text>
80
      <xsl:apply-templates/>
81
      <xsl:text>&#10;\end{itemize}</xsl:text>
82
  </xsl:template>
83
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
84
      <desc>Process element castItem</desc>
85
   </doc>
86
  <xsl:template match="tei:castItem">
87
    <xsl:text>&#10;\item </xsl:text>
88
    <xsl:apply-templates/>
89
  </xsl:template>
90
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
91
      <desc>Process element castList</desc>
92
   </doc>
93
  <xsl:template match="tei:castList">
94
      <xsl:if test="tei:head">
95
         <xsl:text> \par\textit{</xsl:text>
96
         <xsl:for-each select="tei:head">
97
            <xsl:apply-templates/>
98
         </xsl:for-each>
99
         <xsl:text>}&#10;</xsl:text>
100
      </xsl:if> 
101
      <xsl:text>\begin{itemize} </xsl:text>
102
      <xsl:apply-templates/> 
103
      <xsl:text>\end{itemize} </xsl:text>
104
  </xsl:template>
105
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
106
      <desc>Process elementp/tei:stage</desc>
107
   </doc>
108
  <xsl:template match="tei:p/tei:stage">
109
      <xsl:text>\textit{</xsl:text>
110
      <xsl:apply-templates/>
111
      <xsl:text>}</xsl:text>
112
  </xsl:template>
113
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
114
      <desc>Process element role</desc>
115
   </doc>
116
  <xsl:template match="tei:role">
117
      <xsl:text>\textbf{</xsl:text>
118
      <xsl:apply-templates/>
119
      <xsl:text>}</xsl:text>
120
  </xsl:template>
121
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
122
      <desc>Process element roleDesc</desc>
123
   </doc>
124
  <xsl:template match="tei:roleDesc">
125
      <xsl:text>\begin{quote}</xsl:text>
126
      <xsl:apply-templates/>
127
      <xsl:text>\end{quote}</xsl:text>
128
  </xsl:template>
129
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
130
      <desc>Process element set</desc>
131
   </doc>
132
  <xsl:template match="tei:set">
133
      <xsl:text>\textit{</xsl:text>
134
      <xsl:apply-templates/>
135
      <xsl:text>}</xsl:text>
136
  </xsl:template>
137
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
138
      <desc>Process element sound</desc>
139
   </doc>
140
  <xsl:template match="tei:sound">
141
      <xsl:text>\textit{</xsl:text>
142
      <xsl:apply-templates/>
143
      <xsl:text>}</xsl:text>
144
  </xsl:template>
145
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
146
      <desc>Process element sp</desc>
147
   </doc>
148
  <xsl:template match="tei:sp"> \begin{description} \item[<xsl:apply-templates select="tei:speaker"/>] <xsl:apply-templates select="tei:p | tei:l | tei:lg | tei:seg |      tei:ab | tei:stage"/>
149
      <xsl:text>\end{description}
150
</xsl:text>
151
  </xsl:template>
152
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
153
      <desc>Process element sp/tei:p</desc>
154
   </doc>
155
  <xsl:template match="tei:sp/tei:p">
156
    <xsl:text>&#10;&#10;</xsl:text>
157
      <xsl:apply-templates/>
158
  </xsl:template>
159
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
160
      <desc>Process element stage</desc>
161
   </doc>
162
  <xsl:template match="tei:stage">
163
      <xsl:text>&#10;\par&#10;</xsl:text>
164
      <xsl:text>\textit{</xsl:text>
165
      <xsl:apply-templates/>
166
      <xsl:text>}\par </xsl:text>
167
  </xsl:template>
168
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
169
      <desc>Process element sp/tei:stage</desc>
170
   </doc>
171
  <xsl:template match="tei:sp/tei:stage">
172
      <xsl:text/>
173
      <xsl:text>\textit{</xsl:text>
174
      <xsl:apply-templates/>
175
      <xsl:text>} </xsl:text>
176
  </xsl:template>
177
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
178
      <desc>Process element tech</desc>
179
   </doc>
180
  <xsl:template match="tei:tech">
181
      <xsl:text>\textit{</xsl:text>
182
      <xsl:apply-templates/>
183
      <xsl:text>}</xsl:text>
184
  </xsl:template>
185
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl">
186
      <desc>Process element view</desc>
187
   </doc>
188
  <xsl:template match="tei:view">
189
      <xsl:text>\textit{</xsl:text>
190
      <xsl:apply-templates/>
191
      <xsl:text>}</xsl:text>
192
  </xsl:template>
193
</xsl:stylesheet>