Commit ac82a71c authored by MRodz's avatar MRodz Committed by mrodzis
Browse files

Fix #23

parent b582bb5f
......@@ -37,8 +37,8 @@ declare function fontane-simple:main($file as xs:string) as xs:string? {
(console:log("It was not possible to open the requested file " || $file))
}
let $front-covers := $doc//tei:sourceDoc/tei:surface[contains(@n, "front_cover")]/*
let $back-covers := $doc//tei:sourceDoc/tei:surface[contains(@n, "back_cover")]/*
let $front-covers := $doc//tei:sourceDoc/tei:surface[contains(@n, "front_cover")]
let $back-covers := $doc//tei:sourceDoc/tei:surface[contains(@n, "back_cover")]
let $content := $doc//tei:sourceDoc/tei:surface[not(contains(@n, "cover")
or matches(@n, "spine"))]
......@@ -213,7 +213,7 @@ declare function fontane-simple:transform($nodes as node()*) as node()* {
case element(tei:surface) return
if(matches($node/@n, "cover")) then
(if(not($node/@n = "outer_front_cover"))
((if(not($node/@n = "outer_front_cover"))
then
element tei:pb {
if($node/@n = "inner_front_cover"
......@@ -224,13 +224,12 @@ declare function fontane-simple:transform($nodes as node()*) as node()* {
attribute type {"cover"}
}
else
(),
()),
element tei:div {
attribute type {$node/@n},
$node/(@* except (@facs, @n)),
fontane-simple:transform($node/node())
})
else if(matches($node/@n, "[0-9IVXMCD]{1,7}[rv]{1}")
and $node/@type = "clipping") then
(local:make-pb($node),
......@@ -239,20 +238,16 @@ declare function fontane-simple:transform($nodes as node()*) as node()* {
local:make-div($node)
else
()))
else if(matches($node/@n, "[0-9IVXMCD]{1,7}[rv]{1}")
and $node/@type = "fragment") then
(local:make-pb($node),
local:make-div($node))
else if(matches($node/@n, "[0-9IVXMCD]{1,7}[rv]{1}")
and $node/@type = "pocket") then
local:make-pb($node)
else if(matches($node/@n, "[0-9IVXMCD]{1,7}[rv]{1}")
and $node/@type = "label" and $node/@subtype = "Oblate") then
()
else if(matches($node/@n, "[0-9IVXMCD]{1,7}[rv]{1}")) then
(local:make-pb($node),
element tei:div{
......@@ -260,13 +255,11 @@ declare function fontane-simple:transform($nodes as node()*) as node()* {
$node/(@* except (@facs, @n)),
fontane-simple:transform($node/node())
})
else if($node/@type = "label" and
(contains($node/@subtype, "Fontane")
or contains($node/@subtype, "Hersteller"))
) then
local:make-div($node)
else
()
......@@ -568,7 +561,7 @@ declare function local:make-heading($node as node()) as element(tei:head) {
declare function local:make-div($node as node()) as element(tei:div) {
element tei:div{
$node/(@* except (@facs, @n, @attachment, @subtype, @ulx, @uly, @lrx, @lry)),
$node/(@* except (@facs, @n, @attachment, @subtype, @ulx, @uly, @lrx, @lry, @points)),
fontane-simple:transform($node/node())
}
};
......
......@@ -528,7 +528,10 @@
</teiHeader>
<text>
<front>
<tei:div xmlns:tei="http://www.tei-c.org/ns/1.0" type="label" xml:id="a4" points="1.5,4.7 1.8,9.1 8.7,8.8 8.5,4.5">
<tei:div xmlns:tei="http://www.tei-c.org/ns/1.0" type="outer_front_cover" xml:id="a5">
<tei:div type="label" xml:id="a4">
......@@ -586,12 +589,19 @@
</tei:div>
</tei:div>
<tei:pb xmlns:tei="http://www.tei-c.org/ns/1.0" type="flyleaf"/>
<tei:div xmlns:tei="http://www.tei-c.org/ns/1.0" type="inner_front_cover">
<handShift new="#Fontane"/>
</front>
</tei:div>
</front>
<body>
<pb n="1r"/>
<tei:div xmlns:tei="http://www.tei-c.org/ns/1.0" type="page">
......@@ -3287,6 +3297,16 @@
</tei:head>
</tei:div>
</body>
<back/>
<back>
<tei:pb xmlns:tei="http://www.tei-c.org/ns/1.0" type="cover"/>
<tei:div xmlns:tei="http://www.tei-c.org/ns/1.0" type="inner_back_cover">
</tei:div>
<tei:pb xmlns:tei="http://www.tei-c.org/ns/1.0" type="flyleaf"/>
<tei:div xmlns:tei="http://www.tei-c.org/ns/1.0" type="outer_back_cover">
</tei:div>
</back>
</text>
</TEI>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment