Skip to content
Permalink
Browse files

add transformation for the mark element in full-text search

  • Loading branch information
emchateau committed Aug 22, 2019
1 parent 558dd83 commit be50808d1329f203b4a023e67fd5f1c377d40e5c
Showing with 10 additions and 4 deletions.
  1. +10 −4 mappings/tei2html.xqm
@@ -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)
};

(:~
@@ -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)
};
@@ -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

0 comments on commit be50808

Please sign in to comment.
You can’t perform that action at this time.