Skip to content

Commit 90f84fa

Browse files
committed
fix: assets regenerated after previous ODD change
1 parent 3215186 commit 90f84fa

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

resources/odd/compiled/frus-web-module.xql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
module namespace pml='http://www.tei-c.org/pm/models/frus/web/module';
22

3-
import module namespace m='http://www.tei-c.org/pm/models/frus/web/module' at '/db/apps/hsg-shell/resources/odd/compiled/frus-web.xql';
3+
import module namespace m='http://www.tei-c.org/pm/models/frus/web' at '/db/apps/hsg-shell/transform/frus-web.xql';
44

55
(: Generated library module to be directly imported into code which
66
: needs to transform TEI nodes using the ODD this module is based on.
77
:)
88
declare function pml:transform($xml as node()*, $parameters as map(*)?) {
99

1010
let $options := map {
11-
"styles": ["/db/apps/hsg-shell/resources/odd/compiled/frus.css"],
12-
"collection": "/db/apps/hsg-shell/resources/odd/compiled",
11+
"styles": ["../transform/frus.css"],
12+
"collection": "/db/apps/hsg-shell/transform",
1313
"parameters": if (exists($parameters)) then $parameters else map {}
1414
}
1515
return m:transform($options, $xml)

resources/odd/compiled/frus-web.xql

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ declare function model:apply($config as map(*), $input as node()*) {
363363
if ($parameters?document-list and div[@type='question']) then
364364
ext-html:document-list($config, ., ("tei-div1", css:map-rend-to-class(.)))
365365
else
366-
if ($parameters?document-list and @type = ('compilation', 'chapter', 'subchapter', 'section', 'part') and exists(div[@type and not(@type = 'online-supplement')])) then
366+
if ($parameters?document-list and @type = ('compilation', 'chapter', 'chapter-pending', 'subchapter', 'section', 'section-pending', 'part') and exists(div[@type and not(@type = 'online-supplement')])) then
367367
ext-html:document-list($config, ., ("tei-div2", css:map-rend-to-class(.)))
368368
else
369369
html:block($config, ., ("tei-div3", css:map-rend-to-class(.)), .)
@@ -482,7 +482,10 @@ declare function model:apply($config as map(*), $input as node()*) {
482482
(: If it is inside a paragraph then it is inline, otherwise it is block level :)
483483
html:block($config, ., css:get-rendition(., ("tei-quote2", css:map-rend-to-class(.))), .)
484484
case element(gap) return
485-
html:omit($config, ., ("tei-gap", css:map-rend-to-class(.)), .)
485+
if (exists(@unit) and @quantity castable as xs:integer) then
486+
ext-html:gap($config, ., ("tei-gap1", css:map-rend-to-class(.)), ., @unit, @quantity cast as xs:integer)
487+
else
488+
html:omit($config, ., ("tei-gap2", css:map-rend-to-class(.)), .)
486489
case element(addrLine) return
487490
html:block($config, ., ("tei-addrLine", css:map-rend-to-class(.)), .)
488491
case element(row) return
@@ -498,7 +501,7 @@ declare function model:apply($config as map(*), $input as node()*) {
498501
html:block($config, ., ("tei-byline", css:map-rend-to-class(.)), .)
499502
case element(titleStmt) return
500503
(
501-
html:heading($config, ., ("tei-titleStmt1", css:map-rend-to-class(.)), title[@type="complete"], ()),
504+
html:heading($config, ., ("tei-titleStmt1", css:map-rend-to-class(.)), title[@type="complete"], 1),
502505
if (count(editor[@role = 'primary']) gt 1) then
503506
html:block($config, ., ("tei-titleStmt2", css:map-rend-to-class(.)), "Editors:")
504507
else

transform/frus-epub.xql

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ declare function model:apply($config as map(*), $input as node()*) {
364364
(: No function found for behavior: document-list :)
365365
$config?apply($config, ./node())
366366
else
367-
if ($parameters?document-list and @type = ('compilation', 'chapter', 'subchapter', 'section', 'part') and exists(div[@type and not(@type = 'online-supplement')])) then
367+
if ($parameters?document-list and @type = ('compilation', 'chapter', 'chapter-pending', 'subchapter', 'section', 'section-pending', 'part') and exists(div[@type and not(@type = 'online-supplement')])) then
368368
(: No function found for behavior: document-list :)
369369
$config?apply($config, ./node())
370370
else
@@ -485,7 +485,11 @@ declare function model:apply($config as map(*), $input as node()*) {
485485
(: If it is inside a paragraph then it is inline, otherwise it is block level :)
486486
epub:block($config, ., css:get-rendition(., ("tei-quote2", css:map-rend-to-class(.))), .)
487487
case element(gap) return
488-
html:omit($config, ., ("tei-gap", css:map-rend-to-class(.)), .)
488+
if (exists(@unit) and @quantity castable as xs:integer) then
489+
(: No function found for behavior: gap :)
490+
$config?apply($config, ./node())
491+
else
492+
html:omit($config, ., ("tei-gap2", css:map-rend-to-class(.)), .)
489493
case element(addrLine) return
490494
epub:block($config, ., ("tei-addrLine", css:map-rend-to-class(.)), .)
491495
case element(row) return
@@ -501,7 +505,7 @@ declare function model:apply($config as map(*), $input as node()*) {
501505
epub:block($config, ., ("tei-byline", css:map-rend-to-class(.)), .)
502506
case element(titleStmt) return
503507
(
504-
html:heading($config, ., ("tei-titleStmt1", css:map-rend-to-class(.)), title[@type="complete"], ()),
508+
html:heading($config, ., ("tei-titleStmt1", css:map-rend-to-class(.)), title[@type="complete"], 1),
505509
if (count(editor[@role = 'primary']) gt 1) then
506510
epub:block($config, ., ("tei-titleStmt2", css:map-rend-to-class(.)), "Editors:")
507511
else

transform/frus-web.xql

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ declare function model:apply($config as map(*), $input as node()*) {
363363
if ($parameters?document-list and div[@type='question']) then
364364
ext-html:document-list($config, ., ("tei-div1", css:map-rend-to-class(.)))
365365
else
366-
if ($parameters?document-list and @type = ('compilation', 'chapter', 'subchapter', 'section', 'part') and exists(div[@type and not(@type = 'online-supplement')])) then
366+
if ($parameters?document-list and @type = ('compilation', 'chapter', 'chapter-pending', 'subchapter', 'section', 'section-pending', 'part') and exists(div[@type and not(@type = 'online-supplement')])) then
367367
ext-html:document-list($config, ., ("tei-div2", css:map-rend-to-class(.)))
368368
else
369369
html:block($config, ., ("tei-div3", css:map-rend-to-class(.)), .)
@@ -482,7 +482,10 @@ declare function model:apply($config as map(*), $input as node()*) {
482482
(: If it is inside a paragraph then it is inline, otherwise it is block level :)
483483
html:block($config, ., css:get-rendition(., ("tei-quote2", css:map-rend-to-class(.))), .)
484484
case element(gap) return
485-
html:omit($config, ., ("tei-gap", css:map-rend-to-class(.)), .)
485+
if (exists(@unit) and @quantity castable as xs:integer) then
486+
ext-html:gap($config, ., ("tei-gap1", css:map-rend-to-class(.)), ., @unit, @quantity cast as xs:integer)
487+
else
488+
html:omit($config, ., ("tei-gap2", css:map-rend-to-class(.)), .)
486489
case element(addrLine) return
487490
html:block($config, ., ("tei-addrLine", css:map-rend-to-class(.)), .)
488491
case element(row) return
@@ -498,7 +501,7 @@ declare function model:apply($config as map(*), $input as node()*) {
498501
html:block($config, ., ("tei-byline", css:map-rend-to-class(.)), .)
499502
case element(titleStmt) return
500503
(
501-
html:heading($config, ., ("tei-titleStmt1", css:map-rend-to-class(.)), title[@type="complete"], ()),
504+
html:heading($config, ., ("tei-titleStmt1", css:map-rend-to-class(.)), title[@type="complete"], 1),
502505
if (count(editor[@role = 'primary']) gt 1) then
503506
html:block($config, ., ("tei-titleStmt2", css:map-rend-to-class(.)), "Editors:")
504507
else

0 commit comments

Comments
 (0)