Skip to content

Commit

Permalink
some more ordering: drafts to come first
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Apr 24, 2018
1 parent f3c4c32 commit f4842d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/wdt.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,10 @@ declare function wdt:writings($item as item()*) as map(*) {
let $jg := functx:pad-integer-to-length(number($source//tei:biblScope[@unit='jg'][1]), 6)
let $nr := functx:pad-integer-to-length(number($source//tei:biblScope[@unit='nr'][1]), 6)
let $pp := functx:pad-integer-to-length(number(functx:substring-before-if-contains($source//tei:biblScope[@unit='pp'][1], '-')), 6)
(: draft versions shall appear before the manuscript or print version :)
let $draft := if ($source/@rend='draft') then 'd' else 'x'
return
(if(exists($normDate)) then $normDate else 'xxxx-xx-xx') || $journal || $jg || $nr || $pp
(if(exists($normDate)) then $normDate else 'xxxx-xx-xx') || $journal || $jg || $nr || $pp || $draft
}, ())
},
'title' := function($serialization as xs:string) as item()? {
Expand Down

0 comments on commit f4842d0

Please sign in to comment.