Loading modules/config.xqm +2 −0 Original line number Diff line number Diff line Loading @@ -251,6 +251,8 @@ declare variable $config:app-root := ; declare variable $config:data-root :=$config:app-root || "/data"; declare variable $config:translations-root :=$config:app-root || "/translations"; declare variable $config:data-exclude := "taxonomy.xml"; Loading modules/map.xql +8 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ module namespace mapping="http://www.tei-c.org/tei-simple/components/map"; import module namespace nav="http://www.tei-c.org/tei-simple/navigation/tei" at "navigation-tei.xql"; import module namespace config="http://www.tei-c.org/tei-simple/config" at "config.xqm"; declare namespace tei="http://www.tei-c.org/ns/1.0"; Loading @@ -20,6 +21,13 @@ declare function mapping:vg-translation($root as element()) { $node }; declare function mapping:dodis-translation($root as element()) { (: let $id := ``[pb-trans-`{$root/@f}`-`{$root/@n}`]``:) let $file := substring-before(util:document-name($root), '.xml') return doc($config:translations-root || '/' || $file || '-en.xml')//tei:text }; declare function mapping:cortez-translation($root as element()) { let $first := (($root/following-sibling::text()/ancestor::*[@xml:id])[last()], $root/following-sibling::*[@xml:id], ($root/ancestor::*[@xml:id])[last()])[1] let $last := $root/following::tei:pb[1] Loading resources/odd/dodis.odd +28 −0 Original line number Diff line number Diff line Loading @@ -161,6 +161,9 @@ margin-top: 10px; </elementSpec> <elementSpec ident="note" mode="change"> <model output="web" predicate="$parameters?header='short'" behaviour="omit"/> <model output="web" predicate="@type="merged"" behaviour="section" cssClass="tei-note-merged"/> <model behaviour="note" cssClass="tei-note"> <param name="label" value="@n"/> Loading Loading @@ -366,6 +369,31 @@ color: red; <elementSpec ident="div" mode="change"> <model behaviour="block" cssClass="tei-div"/> </elementSpec> <elementSpec ident="titleStmt" mode="change"> <model output="latex" behaviour="meta"> <param name="content" value="."/> </model> <model output="fo" behaviour="heading"/> <model predicate="$parameters?mode='title'" behaviour="heading"> <param name="content" value="title[not(@type)]"/> <param name="level" value="5"/> </model> <modelSequence output="web" predicate="$parameters?header='short'"> <model behaviour="link"> <param name="content" value="root(.)//div[@type='doc']/head/title[@type='sub']"/> <param name="uri" value="$parameters?doc"/> </model> <model behaviour="block"> <param name="content" value="title"/> </model> <model behaviour="block"> <param name="content" value="author"/> </model> </modelSequence> <model output="web" behaviour="block"/> </elementSpec> </schemaSpec> <elementSpec ident="body" mode="change"> <modelSequence> Loading templates/pages/dodis.html +3 −0 Original line number Diff line number Diff line Loading @@ -130,6 +130,9 @@ <pb-grid-action grid="#grid" slot="toolbar" action="remove"> <paper-icon-button icon="icons:close"/> </pb-grid-action> <template title="Translation"> <pb-view src="document1" map="dodis-translation" xpath="//text" subscribe="transcription"/> </template> <template title="Facsimile"> <pb-facsimile subscribe="transcription" base-uri="https://apps.existsolutions.com/cantaloupe/iiif/2/" default-zoom-level="0"> Loading transform/docx-tei.xql +5 −5 Original line number Diff line number Diff line Loading @@ -178,11 +178,11 @@ declare function model:apply($config as map(*), $input as node()*) { let $content := model:template-cp_coreProperties($config, ., $params) return tei:metadata(map:merge(($config, map:entry("template", true()))), ., ("tei-cp:coreProperties"), $content) tei:metadata(map:merge(($config, map:entry("template", true()))), ., ("tei-cp_coreProperties"), $content) case element(dc:title) return tei:inline($config, ., ("tei-dc:title"), ., map {}) tei:inline($config, ., ("tei-dc_title"), ., map {}) case element(dc:creator) return tei:inline($config, ., ("tei-dc:creator"), ., map {"tei_element": 'author'}) tei:inline($config, ., ("tei-dc_creator"), ., map {"tei_element": 'author'}) case element(tbl) return tei:table($config, ., ("tei-tbl"), tr) case element(tr) return Loading @@ -192,13 +192,13 @@ declare function model:apply($config as map(*), $input as node()*) { case element(t) return tei:text($config, ., ("tei-t"), .) case element(pic:pic) return tei:graphic($config, ., ("tei-pic:pic"), ., let $id := .//a:blip/@r:embed let $mediaColl := $parameters?filename || ".media/" let $target := $parameters?rels/rel:Relationship[@Id=$id]/@Target return $mediaColl || substring-after($target, "media/"), (), (), (), ()) tei:graphic($config, ., ("tei-pic_pic"), ., let $id := .//a:blip/@r:embed let $mediaColl := $parameters?filename || ".media/" let $target := $parameters?rels/rel:Relationship[@Id=$id]/@Target return $mediaColl || substring-after($target, "media/"), (), (), (), ()) case element(smartTag) return tei:inline($config, ., ("tei-smartTag"), ., map {}) case element(pict) return tei:inline($config, ., ("tei-pict"), .//v:imagedata, map {}) case element(v:imagedata) return tei:graphic($config, ., ("tei-v:imagedata"), ., let $id := @r:id let $mediaColl := $parameters?filename || ".media/" let $relationship := $parameters?rels/rel:Relationship[@Id=$id] let $target := $relationship/@Target return if ($relationship/@TargetMode = "External") then $target else $mediaColl || substring-after($target, "media/"), (), (), (), ()) tei:graphic($config, ., ("tei-v_imagedata"), ., let $id := @r:id let $mediaColl := $parameters?filename || ".media/" let $relationship := $parameters?rels/rel:Relationship[@Id=$id] let $target := $relationship/@Target return if ($relationship/@TargetMode = "External") then $target else $mediaColl || substring-after($target, "media/"), (), (), (), ()) case element() return tei:omit($config, ., ("tei--element"), .) case text() | xs:anyAtomicType return Loading Loading
modules/config.xqm +2 −0 Original line number Diff line number Diff line Loading @@ -251,6 +251,8 @@ declare variable $config:app-root := ; declare variable $config:data-root :=$config:app-root || "/data"; declare variable $config:translations-root :=$config:app-root || "/translations"; declare variable $config:data-exclude := "taxonomy.xml"; Loading
modules/map.xql +8 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ module namespace mapping="http://www.tei-c.org/tei-simple/components/map"; import module namespace nav="http://www.tei-c.org/tei-simple/navigation/tei" at "navigation-tei.xql"; import module namespace config="http://www.tei-c.org/tei-simple/config" at "config.xqm"; declare namespace tei="http://www.tei-c.org/ns/1.0"; Loading @@ -20,6 +21,13 @@ declare function mapping:vg-translation($root as element()) { $node }; declare function mapping:dodis-translation($root as element()) { (: let $id := ``[pb-trans-`{$root/@f}`-`{$root/@n}`]``:) let $file := substring-before(util:document-name($root), '.xml') return doc($config:translations-root || '/' || $file || '-en.xml')//tei:text }; declare function mapping:cortez-translation($root as element()) { let $first := (($root/following-sibling::text()/ancestor::*[@xml:id])[last()], $root/following-sibling::*[@xml:id], ($root/ancestor::*[@xml:id])[last()])[1] let $last := $root/following::tei:pb[1] Loading
resources/odd/dodis.odd +28 −0 Original line number Diff line number Diff line Loading @@ -161,6 +161,9 @@ margin-top: 10px; </elementSpec> <elementSpec ident="note" mode="change"> <model output="web" predicate="$parameters?header='short'" behaviour="omit"/> <model output="web" predicate="@type="merged"" behaviour="section" cssClass="tei-note-merged"/> <model behaviour="note" cssClass="tei-note"> <param name="label" value="@n"/> Loading Loading @@ -366,6 +369,31 @@ color: red; <elementSpec ident="div" mode="change"> <model behaviour="block" cssClass="tei-div"/> </elementSpec> <elementSpec ident="titleStmt" mode="change"> <model output="latex" behaviour="meta"> <param name="content" value="."/> </model> <model output="fo" behaviour="heading"/> <model predicate="$parameters?mode='title'" behaviour="heading"> <param name="content" value="title[not(@type)]"/> <param name="level" value="5"/> </model> <modelSequence output="web" predicate="$parameters?header='short'"> <model behaviour="link"> <param name="content" value="root(.)//div[@type='doc']/head/title[@type='sub']"/> <param name="uri" value="$parameters?doc"/> </model> <model behaviour="block"> <param name="content" value="title"/> </model> <model behaviour="block"> <param name="content" value="author"/> </model> </modelSequence> <model output="web" behaviour="block"/> </elementSpec> </schemaSpec> <elementSpec ident="body" mode="change"> <modelSequence> Loading
templates/pages/dodis.html +3 −0 Original line number Diff line number Diff line Loading @@ -130,6 +130,9 @@ <pb-grid-action grid="#grid" slot="toolbar" action="remove"> <paper-icon-button icon="icons:close"/> </pb-grid-action> <template title="Translation"> <pb-view src="document1" map="dodis-translation" xpath="//text" subscribe="transcription"/> </template> <template title="Facsimile"> <pb-facsimile subscribe="transcription" base-uri="https://apps.existsolutions.com/cantaloupe/iiif/2/" default-zoom-level="0"> Loading
transform/docx-tei.xql +5 −5 Original line number Diff line number Diff line Loading @@ -178,11 +178,11 @@ declare function model:apply($config as map(*), $input as node()*) { let $content := model:template-cp_coreProperties($config, ., $params) return tei:metadata(map:merge(($config, map:entry("template", true()))), ., ("tei-cp:coreProperties"), $content) tei:metadata(map:merge(($config, map:entry("template", true()))), ., ("tei-cp_coreProperties"), $content) case element(dc:title) return tei:inline($config, ., ("tei-dc:title"), ., map {}) tei:inline($config, ., ("tei-dc_title"), ., map {}) case element(dc:creator) return tei:inline($config, ., ("tei-dc:creator"), ., map {"tei_element": 'author'}) tei:inline($config, ., ("tei-dc_creator"), ., map {"tei_element": 'author'}) case element(tbl) return tei:table($config, ., ("tei-tbl"), tr) case element(tr) return Loading @@ -192,13 +192,13 @@ declare function model:apply($config as map(*), $input as node()*) { case element(t) return tei:text($config, ., ("tei-t"), .) case element(pic:pic) return tei:graphic($config, ., ("tei-pic:pic"), ., let $id := .//a:blip/@r:embed let $mediaColl := $parameters?filename || ".media/" let $target := $parameters?rels/rel:Relationship[@Id=$id]/@Target return $mediaColl || substring-after($target, "media/"), (), (), (), ()) tei:graphic($config, ., ("tei-pic_pic"), ., let $id := .//a:blip/@r:embed let $mediaColl := $parameters?filename || ".media/" let $target := $parameters?rels/rel:Relationship[@Id=$id]/@Target return $mediaColl || substring-after($target, "media/"), (), (), (), ()) case element(smartTag) return tei:inline($config, ., ("tei-smartTag"), ., map {}) case element(pict) return tei:inline($config, ., ("tei-pict"), .//v:imagedata, map {}) case element(v:imagedata) return tei:graphic($config, ., ("tei-v:imagedata"), ., let $id := @r:id let $mediaColl := $parameters?filename || ".media/" let $relationship := $parameters?rels/rel:Relationship[@Id=$id] let $target := $relationship/@Target return if ($relationship/@TargetMode = "External") then $target else $mediaColl || substring-after($target, "media/"), (), (), (), ()) tei:graphic($config, ., ("tei-v_imagedata"), ., let $id := @r:id let $mediaColl := $parameters?filename || ".media/" let $relationship := $parameters?rels/rel:Relationship[@Id=$id] let $target := $relationship/@Target return if ($relationship/@TargetMode = "External") then $target else $mediaColl || substring-after($target, "media/"), (), (), (), ()) case element() return tei:omit($config, ., ("tei--element"), .) case text() | xs:anyAtomicType return Loading