Skip to content

Commit

Permalink
clef pour les introduction
Browse files Browse the repository at this point in the history
  • Loading branch information
emchateau committed May 17, 2022
1 parent fc60d5a commit 2ca9ee5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions models/tei.xqm
Expand Up @@ -290,6 +290,7 @@ declare function getCorpusById($queryParams as map(*)) as map(*) {
let $content :=
for $text in $corpus/tei:TEI
let $uuid := $text/tei:teiHeader/tei:fileDesc/tei:sourceDesc/@xml:id
let $introduction := fn:contains($uuid, 'ntroduction')
let $ref := getRef($text)
return map {
'title' : getTitles($text, $lang), (: @todo sequence or main and sub :)
Expand All @@ -303,6 +304,7 @@ declare function getCorpusById($queryParams as map(*)) as map(*) {
'description' : getDescription($text , $lang),
'itemsQuantity' : getQuantity(fn:count($text//tei:div), 'item', 'items'), (: @todo bug :)
'weight' : getQuantity(getExtent($text), 'mot', 'mots'), (: @todo bug :)
'type' : if ($introduction) then 'text' else 'introduction',
'uuid' : $uuid,
'path' : '/texts/',
'url' : $gdp.globals:root || '/texts/' || $uuid
Expand Down

0 comments on commit 2ca9ee5

Please sign in to comment.