-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusx2tei-char-sigla.xspec
84 lines (74 loc) · 4.9 KB
/
usx2tei-char-sigla.xspec
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
<?xml version="1.0" encoding="UTF-8"?>
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="http://www.tei-c.org/ns/1.0"
stylesheet="usx2tei-char-sigla.xsl" run-as="external">
<x:param name="witnesses" as="xs:string*" select="'A','S','C','M','E','l','𝔠','𝔟','𝔳'"/>
<!-- all tests in usx2tei.xspec must still work -->
<x:import href="usx2tei.xspec"/>
<x:scenario label="general structure">
<x:context select="$ezr.4.11"/>
<x:expect label="has witnesses"
test="exists(/t:TEI/t:teiHeader/t:fileDesc/t:sourceDesc/t:listWit//t:witness)"/>
<x:expect label="as many witnesses as given in parameter"
test="count(/t:TEI/t:teiHeader/t:fileDesc/t:sourceDesc/t:listWit//t:witness)"
select="count($witnesses)"/>
<x:expect label="tells about its variant encoding method"
test="t:TEI/t:teiHeader/t:encodingDesc/t:variantEncoding/@method ! string(.)"
select="'location-referenced'"/>
<x:expect label="tells about its variant encoding location"
test="t:TEI/t:teiHeader/t:encodingDesc/t:variantEncoding/@location ! string(.)"
select="'internal'"/>
</x:scenario>
<x:scenario label="apparatus on 4.11">
<x:context select="$ezr.4.11"/>
<x:expect label="has app" test="exists(/t:TEI/t:text//t:app)"/>
<x:expect label="has app/lem" test="exists(/t:TEI/t:text//t:app/t:lem)"/>
<x:expect label="has app/rdg" test="exists(/t:TEI/t:text//t:app/t:rdg)"/>
<x:expect label="every rdg has an @wit"
test="every $r in //t:rdg satisfies exists($r/@wit) "/>
<x:expect label="every rdg has an wit child"
test="every $r in //t:rdg satisfies exists($r//t:wit) "/>
<x:expect label="every note is an apparatus" test="count(/t:TEI/t:text//t:app)"
select="count($ezr.4.11//note)"/>
</x:scenario>
<x:variable name="ezr.3.7-OFF">
<usx version="3.0">
<!-- this is a verse that overlaps paragraph boundaries -->
<chapter number="4" style="c" sid="2ES 4"/>
<para style="p">
<verse number="7" style="v" sid="2ES 3:7"/>Et huic<note caller="+" style="f"><char
style="fr" closed="false">3,7 </char><char style="ft" closed="false">huic]
ad hunc 𝔳.; adhuc CME</char></note> mandasti diligentiam<note caller="+"
style="f"><char style="fr" closed="false">3,7 </char><char style="ft"
closed="false">diligere S<char style="add">2</char> 𝔠</char></note> unam
tuam<note caller="+" style="f"><char style="fr" closed="false">3,7 </char><char
style="ft" closed="false">∼ tuam unam CME; uiam tuam S<char style="add"
>2</char> 𝔠</char></note>, et praeterivit eam, et statim instituisti in
eum<note caller="+" style="f"><char style="fr" closed="false">3,7 </char><char
style="ft" closed="false">in eo CME 𝔠</char></note> mortem et in nationibus
eius. Et natae<note caller="+" style="f"><char style="fr" closed="false">3,7
</char><char style="ft" closed="false">natae] nati A</char></note> sunt ex
eo<note caller="+" style="f"><char style="fr" closed="false">3,7 </char><char
style="ft" closed="false">ex eo <char style="it">om.</char> 𝔠</char></note>
gentes et tribus, populi<note caller="+" style="f"><char style="fr" closed="false"
>3,7 </char><char style="ft" closed="false">populique et ME; populi ubique
et C; et populi et 𝔠</char></note> et cognationes, quorum<note caller="+"
style="f"><char style="fr" closed="false">3,7 </char><char style="ft"
closed="false">quarum CME 𝔠</char></note> non est numerus. <verse
eid="2ES 3:7"/>
</para>
</usx>
</x:variable>
<x:scenario label="verse 3.7">
<x:context select="$ezr.3.7"/>
<x:expect label="app2: has one reading" test="count(//id('_2ES.3.7')/t:app[2]/t:rdg)" select="1"/>
<x:expect label="app2: 2 wit elements" test="count(//id('_2ES.3.7')/t:app[2]/t:rdg/t:wit)"
select="2"/>
<x:expect label="app2: has one formatting" test="count(//id('_2ES.3.7')/t:app[2]//t:hi)" select="1"/>
<x:expect label="app2: formatting as superscript"
test="//id('_2ES.3.7')/t:app[2]//t:hi/@rendition ! string(.)" select="'#add'"/>
<x:expect label="app2: content of formatted text"
test="//id('_2ES.3.7')/t:app[2]//t:hi[@rendition eq '#add'] => string-join()" select="'2'"/>
<!--x:expect label="result" test="//id('_2ES.3.7')/t:app[2]/t:rdg" select="''"/-->
</x:scenario>
</x:description>