-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTEI.xsl
More file actions
95 lines (94 loc) · 3.7 KB
/
TEI.xsl
File metadata and controls
95 lines (94 loc) · 3.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<!-- solo per l'edizione critica -->
<teiHeader>
<fileDesc>
<!-- si fa per l'opera -->
<titleStmt>
<title>I promessi sposi</title>
<author>Alessandro Manzoni</author>
</titleStmt>
<editionStmt>
<edition>Edizione collaborativa</edition>
<!-- un respStmt per ogni contributo. E' corretto? boh chi lo sa™. respStmt in un template-->
$resp
<!--LISTA DI ISTANZE (?) DEL TEMPLATE
<respStmt xml:id=$id>
<resp>$resp</resp>
<name>$name</name>
</respStmt>
!-->
</editionStmt>
<publicationStmt>
<publisher>$publisher</publisher>
<pubPlace>$pubplace</pubPlace>
<date>$date</date>
<availability>
<licence>$URL</licence>
</availability>
</publicationStmt>
<sourceDesc> <!--NON CHIARO-->
<listWit>
<witness xml:id="v1827">Alessandro Manzoni, "I promessi sposi, storia milanese del sec. XVII, scoperta e rifatta da Alessandro Manzoni", 1827</witness>
<witness xml:id="v1840">Alessandro Manzoni, "I promessi sposi", 1840</witness>
</listWit>
</sourceDesc>
</fileDesc>
<encodingDesc>
<p>$encoding</p>
</encodingDesc><!--COSA CI DEVE ANDARE? CODIFICA DEI CARATTERI? LO CHIEDO NEL FORM?-->
<revisionDesc>
$change
</revisionDesc>
</teiHeader>
<text>
<body>
<div type="chapter" xml:id="$cap">
<xsl:for-each select=".//p">
<p>
<xsl:attribute name="xml:id">p<xsl:number/></xsl:attribute>
<xsl:for-each select="./span">
<xsl:choose>
<xsl:when test="contains(@class,'nochange')">
<xsl:value-of select="."/>
</xsl:when>
<xsl:when test="contains(@class,'replace')">
<app>
<xsl:attribute name="type"><xsl:value-of select="replace(./@class,' ','-')"/></xsl:attribute>
<rdg wit="#v1827">
<xsl:choose>
<xsl:when test="./@data-responsible">
<xsl:attribute name="resp">#<xsl:value-of select="./@data-responsible"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="resp">#void</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="./span[@class='oldVersion']"/>
</rdg>
<rdg wit="#v1840">
<xsl:choose>
<xsl:when test="./@data-responsible">
<xsl:attribute name="resp">#<xsl:value-of select="./@data-responsible"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="resp">#void</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="./span[contains(@class,'newVersion')]"/>
</rdg>
</app>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</p>
</xsl:for-each>
</div>
</body>
</text>
</TEI>
</xsl:template>
</xsl:stylesheet>