Statistics
| Revision:

root / tmp / org.txm.core / src / groovy / org / txm / importer / graal / xsl / mdv_dipl.xsl @ 187

History | View | Annotate | Download (9.6 kB)

1
<?xml version="1.0" encoding="UTF-8"?>
2

    
3
<!-- This is a stylesheet that gives a "diplomatic" presentation of old French manuscript transcriptions
4
	- abbreviations are resolved and rendered in italics;
5
	- agglutinations and deglutinations are not marked (word limits 
6
	  are "normalized");
7
                                                          - Strong punctuation is marked with a dot followed by a capital letter;
8
                                                             weak punctuation is marked with a comma.
9
	- direct speech is marked with darkblue color;
10
	- uncertain readings are marked with grey background color;
11
	- text deleted in the original is not visualized;
12
	- text corrected in the normalized version is marked with darkred
13
                                                             color and followed by "(sic!)" note;
14
                                                          - notes are rendered with [*] sign in the text body; the text of the note
15
                                                            appears on "mouse-over" and is reproduced in the end.
16
-->
17

    
18
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:me="http://www.menota.org/ns/1.0" xmlns:bfm="http://bfm.ens-lsh.fr/ns/1.0">
19
                <xsl:include href="mdv_common.xsl"/>
20

    
21
                <xsl:param name="form">diplomatique</xsl:param>
22

    
23
                <xsl:variable name="mode">dipl</xsl:variable>
24

    
25
                <xsl:output method="html" encoding="UTF-8" version="4.0" indent="yes"/>
26

    
27
                <xsl:strip-space elements="*"/>
28

    
29
                <!--                <xsl:variable name="title-formal" select="//fileDesc/titleStmt/title[@type='formal']"/>
30
                                
31
                                <xsl:variable name="title-normal" select="//fileDesc/titleStmt/title[@type='normal']"/>
32
                                
33
                                <xsl:variable name="title-ref" select="//fileDesc/titleStmt/title[@type='reference']"/>
34
                                
35
                                <xsl:variable name="author" select="//titleStmt/author"/>
36
                -->
37

    
38
                <xsl:template match="//tei:p|//tei:head">
39
                                <p>
40
                                                <xsl:if test="@n"> [ § <xsl:value-of select="@n"
41
                                                  />]&#xa0; </xsl:if>
42
                                                <xsl:apply-templates mode="dipl"/>
43
                                </p>
44
                </xsl:template>
45

    
46
                <xsl:template match="tei:pb" mode="dipl">
47
                                <xsl:call-template name="pb_common"/>
48
                </xsl:template>
49

    
50
                <xsl:template match="tei:cb" mode="dipl">
51
                                <xsl:call-template name="cb_common"/>
52
                </xsl:template>
53

    
54
                <xsl:template match="tei:note" mode="dipl">
55
                                <xsl:call-template name="note_common"/>
56
                </xsl:template>
57

    
58
                <xsl:template match="tei:q" mode="dipl">
59
                                <span style="background-color:khaki">
60
                                                <xsl:apply-templates mode="dipl"/>
61
                                </span>
62
                </xsl:template>
63

    
64
                <xsl:template match="tei:gap" mode="dipl">
65
                                <xsl:call-template name="gap_common"/>
66
                </xsl:template>
67

    
68

    
69
                <xsl:template match="//tei:lb[@ed='norm']" mode="dipl"> </xsl:template>
70

    
71
                <xsl:template match="//tei:lb[not(@ed)]" mode="dipl">
72
                                <xsl:choose>
73
                                                <xsl:when
74
                                                  test="position()=1 and not(ancestor::tei:seg)"/>
75
                                                <xsl:when
76
                                                  test="preceding::tei:w[1][descendant::bfm:headlb]"/>
77
                                                <xsl:when
78
                                                  test="preceding::tei:w[1][descendant::tei:lb]"/>
79
                                                <xsl:otherwise>
80
                                                  <br/>
81
                                                </xsl:otherwise>
82
                                </xsl:choose>
83
                </xsl:template>
84

    
85
                <xsl:template match="//tei:lb[@ed='facs']" mode="dipl">
86
                                <xsl:text>-</xsl:text>
87
                                <br/>
88
                </xsl:template>
89

    
90
                <xsl:template match="//tei:w|//bfm:punct" mode="dipl">
91
                                <span class="word" id="{@xml:id}" title="{@type}">
92
                                                <xsl:apply-templates select="descendant::me:dipl"
93
                                                  mode="dipl"/>
94
                                                <xsl:if
95
                                                  test="descendant::tei:sic and not(following-sibling::tei:w[1][descendant::tei:sic])">
96
                                                  <i>
97
                                                  <xsl:text> (sic !)</xsl:text>
98
                                                  </i>
99
                                                </xsl:if>
100
                                                <xsl:choose>
101
                                                  <xsl:when
102
                                                  test="following::*[1][self::bfm:punct][contains(., ',') or contains(., '.') or contains(., ']')or contains(., ')')]"/>
103
                                                  <xsl:when test="@bfm:aggl='elision'">'</xsl:when>
104
                                                  <xsl:otherwise>
105
                                                  <xsl:text> </xsl:text>
106
                                                  </xsl:otherwise>
107
                                                </xsl:choose>
108
                                </span>
109
                </xsl:template>
110

    
111
                <xsl:template match="tei:ex" mode="dipl">
112
                                <xsl:choose>
113
                                                <xsl:when test="@cert='high'">
114
                                                  <span style="color:darkgreen;font-style:italic">
115
                                                  <xsl:apply-templates mode="dipl"/>
116
                                                  </span>
117
                                                </xsl:when>
118
                                                <xsl:otherwise>
119
                                                  <span style="color:darkred;font-style:italic">
120
                                                  <xsl:apply-templates mode="dipl"/>
121
                                                  </span>
122
                                                </xsl:otherwise>
123
                                </xsl:choose>
124
                </xsl:template>
125

    
126
                <xsl:template match="tei:sic" mode="dipl">
127
                                <span style="color:darkred" title="sic!">
128
                                                <xsl:apply-templates mode="dipl"/>
129
                                </span>
130
                </xsl:template>
131

    
132
                <xsl:template match="tei:subst" mode="dipl">[<xsl:apply-templates mode="dipl"
133
                                />]</xsl:template>
134

    
135
                <xsl:template match="tei:del" mode="dipl">
136
                                <span style="color:red;text-decoration:line-through">
137
                                                <xsl:apply-templates mode="dipl"/>
138
                                </span>
139
                </xsl:template>
140

    
141
                <xsl:template match="tei:add[not(@seq)]" mode="dipl">
142
                                <span style="color:blue;text-decoration:underline">
143
                                                <xsl:apply-templates mode="dipl"/>
144
                                </span>
145
                </xsl:template>
146

    
147
                <xsl:template match="tei:add[@seq]" mode="dipl">
148
                                <span style="color:blue">
149
                                                <sup>&lt;<xsl:value-of select="@seq"/></sup>
150
                                                <xsl:apply-templates mode="dipl"/>
151
                                                <sup><xsl:value-of select="@seq"/>&gt;</sup>
152
                                </span>
153
                </xsl:template>
154

    
155
                <xsl:template match="tei:unclear" mode="dipl">
156
                                <span style="background-color:lightgrey">
157
                                                <xsl:apply-templates mode="dipl"/>
158
                                </span>
159
                </xsl:template>
160

    
161
                <xsl:template match="tei:hi[@rend='initiale']" mode="dipl">
162
                                <span style="font-weight:bold;font-size:xx-large">
163
                                                <xsl:apply-templates mode="dipl"/>
164
                                </span>
165
                </xsl:template>
166

    
167
                <xsl:template match="//tei:hi[@rend='sup']" mode="dipl">
168
                                <sup>
169
                                                <xsl:apply-templates mode="dipl"/>
170
                                </sup>
171
                </xsl:template>
172

    
173

    
174

    
175
                <!-- 
176

    
177

    
178
<xsl:template match="tei:name">
179
	<xsl:value-of select="@reg"/>
180
</xsl:template>
181

    
182
                -->
183
</xsl:stylesheet>