Statistics
| Revision:

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

History | View | Annotate | Download (6.1 kB)

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

    
3
<!-- This is a stylesheet that gives a "normalized" presentation of old French manuscript transcriptions
4
	- abbreviations are resolved;
5
	- agglutinations and deglutinations are not marked (word limits 
6
	  are "normalized");
7
                                                           - punctuation is normalized as it is in the edition; 
8
	- direct speech is marked with quotation marks and darkblue color;
9
	- uncertain readings are not marked;
10
	- text deleted in the original is not visualized;
11
	- corrections are marked with darkred color;
12
                                                           - notes are rendered with [*] sign in the text body; the text of the note
13
                                                             appears on "mouse-over" and is reproduced in the end.
14
-->
15

    
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:param name="form">normalisée</xsl:param>
20

    
21
                <xsl:variable name="mode">facs</xsl:variable>
22

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

    
25
                <xsl:strip-space elements="*"/>
26

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

    
36
                <xsl:include href="mdv_common.xsl"/>
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="norm"/>
43
                                </p>
44
                </xsl:template>
45

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

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

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

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

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

    
68
                <xsl:template match="//tei:lb" mode="norm">
69
                                <xsl:choose>
70
                                                <xsl:when
71
                                                  test="position()=1 and not(ancestor::tei:seg)"/>
72
                                                <xsl:otherwise>
73
                                                  <br/>
74
                                                </xsl:otherwise>
75
                                </xsl:choose>
76
                </xsl:template>
77

    
78
                <xsl:template match="//tei:w" mode="norm">
79
                                <span class="word" id="{@xml:id}" title="{@type}">
80
                                                <xsl:if
81
                                                  test="starts-with(.,':') or starts-with(.,'!') or starts-with(.,'?') or starts-with(.,';')"
82
                                                  >&#xa0;</xsl:if>
83
                                                <xsl:apply-templates select="descendant::me:norm"
84
                                                  mode="norm"/>
85
                                                <xsl:choose>
86
                                                  <xsl:when
87
                                                  test="following::*[1][self::bfm:punct][starts-with(., ',') or starts-with(., '.') or starts-with(., ']') or starts-with(., ')') or starts-with(.,':') or starts-with(.,'!') or starts-with(.,'?') or starts-with(.,';')]"/>
88
                                                  <xsl:when
89
                                                  test="child::me:norm[string-length(.) = 0]"/>
90
                                                  <xsl:when test="@bfm:aggl='elision'">'</xsl:when>
91
                                                  <xsl:otherwise>
92
                                                  <xsl:text> </xsl:text>
93
                                                  </xsl:otherwise>
94
                                                </xsl:choose>
95
                                </span>
96
                </xsl:template>
97

    
98
                <xsl:template match="tei:sic" mode="norm">
99
                                <span style="text-decoration:line-through;color:red">
100
                                                <xsl:apply-templates mode="norm"/>
101
                                </span>
102
                </xsl:template>
103

    
104
                <xsl:template match="tei:del" mode="norm"> </xsl:template>
105

    
106

    
107
                <xsl:template match="//tei:hi[@rend='sup']" mode="norm">
108
                                <sup>
109
                                                <xsl:apply-templates mode="norm"/>
110
                                </sup>
111
                </xsl:template>
112

    
113

    
114

    
115
                <!-- 
116

    
117

    
118
<xsl:template match="del">
119

    
120
</xsl:template>
121

    
122

    
123

    
124
<xsl:template match="name">
125
	<xsl:value-of select="@reg"/>
126
</xsl:template>
127

    
128
                -->
129
</xsl:stylesheet>