Skip to content

Commit

Permalink
add transformation for the mark element in full-text search
Browse files Browse the repository at this point in the history
  • Loading branch information
emchateau committed Aug 22, 2019
1 parent 558dd83 commit be50808
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions mappings/tei2html.xqm
Expand Up @@ -33,9 +33,10 @@ declare boundary-space strip ;
(:~
: this function
:)
declare function entry($node as node()*, $options as map(*)) as item()* {
for $i in $node return
dispatch($i, $options)
declare
%output:indent('no')
function entry($node as node()*, $options as map(*)) as item()* {
for $i in $node return dispatch($i, $options)
};

(:~
Expand Down Expand Up @@ -79,13 +80,14 @@ declare function dispatch($node as node()*, $options as map(*)) as item()* {
case element(tei:teiHeader) return ''
case element(tei:TEI) return passthru($node, $options)
case element(tei:said) return said($node, $options)
case element(tei:mark) return mark($node, $options)
default return passthru($node, $options)
};

(:~
: This function pass through child nodes (xsl:apply-templates)
:)
declare function passthru($nodes as node(), $options as map(*)) as item()* {
declare %output:indent('no') function passthru($nodes as node(), $options as map(*)) as item()* {
for $node in $nodes/node()
return dispatch($node, $options)
};
Expand Down Expand Up @@ -229,6 +231,10 @@ declare function graphic($node as element(tei:graphic), $options as map(*)) {
else ()
};

declare function mark($node as element(tei:mark), $options as map(*)) {
<code>{ passthru($node, $options) }</code>
};

(:~
: ~:~:~:~:~:~:~:~:~
: tei biblio
Expand Down

0 comments on commit be50808

Please sign in to comment.