-
Notifications
You must be signed in to change notification settings - Fork 0
/
acceptance-summaries.xq
87 lines (85 loc) · 3.43 KB
/
acceptance-summaries.xq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
for $x in collection('articles')//*:article/*:sub-article[1]//*:p
let $no := substring-before(substring-after($x/base-uri(),'/articles/elife-'),'-v')
return
if (matches($x,'^[Aa]cceptance summary[:]?$')) then
if (matches($x/following-sibling::*:p[2],'^Decision letter after peer review[:]?$'))
then (
($no||' - '||('https://elifesciences.org/articles/'||$no||'#'||$x/ancestor::*:sub-article/@id)),
'
',
$x/following-sibling::*:p[1]/data(),
'
',
' ---- ',
'
'
)
else if (matches($x/following-sibling::*:p[3],'^Decision letter after peer review[:]?$'))
then (
($no||' - '||('https://elifesciences.org/articles/'||$no||'#'||$x/ancestor::*:sub-article/@id)),
'
',
$x/following-sibling::*:p[1]/data(),
$x/following-sibling::*:p[2]/data(),
'
',
' ---- ',
'
'
)
else if (matches($x/following-sibling::*:p[4],'^Decision letter after peer review[:]?$'))
then (
($no||' - '||('https://elifesciences.org/articles/'||$no||'#'||$x/ancestor::*:sub-article/@id)),
'
',
$x/following-sibling::*:p[1]/data(),
$x/following-sibling::*:p[2]/data(),
$x/following-sibling::*:p[3]/data(),
'
',
' ---- ',
'
'
)
else if (matches($x/following-sibling::*:p[5],'^Decision letter after peer review[:]?$'))
then (
($no||' - '||('https://elifesciences.org/articles/'||$no||'#'||$x/ancestor::*:sub-article/@id)),
'
',
$x/following-sibling::*:p[1]/data(),
$x/following-sibling::*:p[2]/data(),
$x/following-sibling::*:p[3]/data(),
$x/following-sibling::*:p[4]/data(),
'
',
' ---- ',
'
'
)
else if (matches($x/following-sibling::*:p[6],'^Decision letter after peer review[:]?$'))
then (
($no||' - '||('https://elifesciences.org/articles/'||$no||'#'||$x/ancestor::*:sub-article/@id)),
'
',
$x/following-sibling::*:p[1]/data(),
$x/following-sibling::*:p[2]/data(),
$x/following-sibling::*:p[3]/data(),
$x/following-sibling::*:p[4]/data(),
$x/following-sibling::*:p[5]/data(),
'
',
' ---- ',
'
'
)
else if (matches($x/following-sibling::*:p[7],'^Decision letter after peer review[:]?$'))
then (
($no||' - '||('https://elifesciences.org/articles/'||$no||'#'||$x/ancestor::*:sub-article/@id)),
'
',
$x/following-sibling::*:p[1]/data(),
$x/following-sibling::*:p[2]/data(),
$x/following-sibling::*:p[3]/data(),
$x/following-sibling::*:p[4]/data(),
$x/following-sibling::*:p[5]/data(),
$x/following-sibling::*:p[6]/data(),
'
',
' ---- ',
'
'
)
else if (count($x/following-sibling::*:p)lt 3)
then (
($no||' - '||('https://elifesciences.org/articles/'||$no||'#'||$x/ancestor::*:sub-article/@id)),
'
',
for $y in $x/following-sibling::*:p
return $y/data(),
'
',
' ---- ',
'
'
)
else (($no||' - '||'ERROR'))
else ()