Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fontane-notizbuecher
SADE
Commits
025cddb8
Commit
025cddb8
authored
Jul 25, 2018
by
MRodz
Committed by
mrodzis
Feb 05, 2019
Browse files
Fix bug in lists (
50fe0366
)
parent
abc13a9a
Changes
4
Hide whitespace changes
Inline
Side-by-side
modules/fontane/teisimpleprint/tei2teisimple.xqm
View file @
025cddb8
...
...
@@ -213,8 +213,9 @@ declare function fontaneSimple:transform($nodes as node()*) as node()* {
(simpleHelpers:start-line($node),
fontaneSimple:transform($node/node()))
else if($node/@type = "item"
and not($node/@xml:id)
) then
else if($node/@type = "item") then
element tei:item {
$node/(@* except (@rend, @type, @style)),
if($node/@rend) then
attribute rendition {$node/@rend}
else
...
...
@@ -222,10 +223,6 @@ declare function fontaneSimple:transform($nodes as node()*) as node()* {
fontaneSimple:transform($node/node())
}
else if($node/@type = "item"
and simpleHelpers:is-transposed($node)) then
()
else
(simpleHelpers:start-line($node),
fontaneSimple:transform($node/node()))
...
...
modules/fontane/teisimpleprint/tests/teisimple-test.xql
View file @
025cddb8
...
...
@@ -233,8 +233,8 @@ declare
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""19r""><zone xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C06_19r_1"" next=""#C06_20r_1"" type=""list""><line xmlns=""http://www.tei-c.org/ns/1.0"" type=""item"" rend=""indent"">c. Das Grumbach⸗Beil</line><zone xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C06_19r_2"" next=""#C06_20r_2"" type=""item""><line xmlns=""http://www.tei-c.org/ns/1.0"" rend=""indent"">d. Das 101 Richtſchwert;</line></zone></zone></surface><surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""19v""/><surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""20r""><zone xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C06_20r_1"" prev=""#C06_19r_1"" type=""list""><zone xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C06_20r_2"" prev=""C06_19r_2"" type=""item""><line xmlns=""http://www.tei-c.org/ns/1.0"">Theils weil Raum und</line></zone></zone></surface></zone>")
%test:assertEquals("<pb xmlns=""http://www.tei-c.org/ns/1.0"" n=""19r""/>", "<list xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C06_19r_1"" next=""#C06_20r_1""><item xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""indent"">c. Das Grumbach⸗Beil</item><item xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C06_19r_2"" next=""#C06_20r_2""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line"" rendition=""indent""/>d. Das 101 Richtschwert;</item></list>", "<pb xmlns=""http://www.tei-c.org/ns/1.0"" n=""19v""/>", "<pb xmlns=""http://www.tei-c.org/ns/1.0"" n=""20r""/>", "<list xmlns=""http://www.tei-c.org/ns/1.0"" prev=""#C06_19r_1"" xml:id=""C06_20r_1""><item xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C06_20r_2"" prev=""C06_19r_2""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>Theils weil Raum und</item></list>")
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""toc"" subtype=""Fontane""><line xmlns=""http://www.tei-c.org/ns/1.0""
type=""item
""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#xpath(//surface[@n='13r'])"">Groſsbeeren</ref></line><line xmlns=""http://www.tei-c.org/ns/1.0"" type=""item""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#xpath(//surface[@n='25r'])"">Blankenfelde</ref></line></zone>")
%test:assertEquals("<list xmlns=""http://www.tei-c.org/ns/1.0"" type=""toc"" subtype=""Fontane""><item xmlns=""http://www.tei-c.org/ns/1.0""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#xpath(//surface[@n='13r'])"">Grossbeeren</ref></item><item xmlns=""http://www.tei-c.org/ns/1.0""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#xpath(//surface[@n='25r'])"">Blankenfelde</ref></item></list>")
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""toc"" subtype=""Fontane""><line xmlns=""http://www.tei-c.org/ns/1.0""
style=""margin-left:1.5cm"" type=""item"" xml:id=""C07_1r_q"" next=""#C07_1r_13
""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#xpath(//surface[@n='13r'])"">Groſsbeeren</ref></line><line xmlns=""http://www.tei-c.org/ns/1.0"" type=""item""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#xpath(//surface[@n='25r'])"">Blankenfelde</ref></line></zone>")
%test:assertEquals("<list xmlns=""http://www.tei-c.org/ns/1.0"" type=""toc"" subtype=""Fontane""><item xmlns=""http://www.tei-c.org/ns/1.0""
xml:id=""C07_1r_q"" next=""#C07_1r_13""
><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#xpath(//surface[@n='13r'])"">Grossbeeren</ref></item><item xmlns=""http://www.tei-c.org/ns/1.0""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#xpath(//surface[@n='25r'])"">Blankenfelde</ref></item></list>")
function teisimple-test:analyze-lists($node as element(*)) {
fontaneSimple:transform($node)
...
...
resources/xml/tei-simple-pre.xml
View file @
025cddb8
...
...
@@ -598,10 +598,11 @@
<tei:milestone
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
unit=
"line"
/>
<rs
xml:id=
"C07_1v_j"
prev=
"#C07_1v_i"
type=
"direct"
ref=
"plc:Eisenach"
>
nach
</rs>
) sein Vorläufer. †
<date
when=
"1496"
type=
"asynchronous"
>
1496
</date>
</item>
<tei:milestone
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
unit=
"line"
/>
2.
<rs
type=
"direct"
ref=
"psn:Luther"
>
Luther
</rs>
,
<rs
type=
"direct"
ref=
"plc:Eisleben"
>
<hi>
Eisleben
</hi>
</rs>
<date
when=
"1483"
type=
"asynchronous"
>
1483
</date>
<tei:item
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
xml:id=
"C07_1r_q"
next=
"#C07_1r_13"
>
2.
<rs
type=
"direct"
ref=
"psn:Luther"
>
Luther
</rs>
,
<rs
type=
"direct"
ref=
"plc:Eisleben"
>
<hi>
Eisleben
</hi>
</rs>
<date
when=
"1483"
type=
"asynchronous"
>
1483
</date>
</tei:item>
<tei:seg
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
xml:id=
"C07_1r_8"
prev=
"#C07_1r_14"
>
<item>
<tei:milestone
unit=
"line"
/>
3. Schulbesuch in
<rs
type=
"direct"
ref=
"plc:Eisenach"
>
...
...
resources/xml/tei-simple-tmp.xml
View file @
025cddb8
...
...
@@ -62,10 +62,11 @@
<tei:milestone
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
unit=
"line"
/>
<rs
xml:id=
"C07_1v_j"
prev=
"#C07_1v_i"
type=
"direct"
ref=
"plc:Eisenach"
>
nach
</rs>
) sein Vorläufer. †
<date
when=
"1496"
type=
"asynchronous"
>
1496
</date>
</item>
<tei:milestone
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
unit=
"line"
/>
2.
<rs
type=
"direct"
ref=
"psn:Luther"
>
Luther
</rs>
,
<rs
type=
"direct"
ref=
"plc:Eisleben"
>
<hi>
Eisleben
</hi>
</rs>
<date
when=
"1483"
type=
"asynchronous"
>
1483
</date>
<tei:item
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
xml:id=
"C07_1r_q"
next=
"#C07_1r_13"
>
2.
<rs
type=
"direct"
ref=
"psn:Luther"
>
Luther
</rs>
,
<rs
type=
"direct"
ref=
"plc:Eisleben"
>
<hi>
Eisleben
</hi>
</rs>
<date
when=
"1483"
type=
"asynchronous"
>
1483
</date>
</tei:item>
<tei:seg
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
xml:id=
"C07_1r_8"
prev=
"#C07_1r_14"
>
<item>
<tei:milestone
unit=
"line"
/>
3. Schulbesuch in
<rs
type=
"direct"
ref=
"plc:Eisenach"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment