diff --git a/RA-sec-titles.xq b/RA-sec-titles.xq new file mode 100644 index 0000000..736349a --- /dev/null +++ b/RA-sec-titles.xq @@ -0,0 +1,2 @@ +distinct-values(for $x in collection('articles')//*:article[(descendant::*:subject[text() = ('Research Article', 'Short Report', 'Tools and Resources', 'Research Advance', 'Registered Report', 'Replication Study', 'Research Communication')])]/*:body/*:sec/*:title +return normalize-space($x)) \ No newline at end of file diff --git a/acceptance-summaries.xq b/acceptance-summaries.xq new file mode 100644 index 0000000..45bd62f --- /dev/null +++ b/acceptance-summaries.xq @@ -0,0 +1,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 () + \ No newline at end of file diff --git a/add-ids-to-support.xq b/add-ids-to-support.xq new file mode 100644 index 0000000..1828cbe --- /dev/null +++ b/add-ids-to-support.xq @@ -0,0 +1,18 @@ +let $x := doc('/Users/fredatherden/Documents/GitHub/jats-support/src/support.sch') + +return copy $copy := $x +modify( + + for $x in $copy//(*:assert|*:report) + let $r := $x/ancestor::*:pattern/@id + let $pos := count($x/ancestor::*:pattern//*[local-name() = $x/local-name()]) - count($x/following::*[(local-name() = $x/local-name()) and (ancestor::*:pattern/@id = $r)]) + return + insert node attribute id {concat($x/ancestor::*:pattern/@id,'-',$x/local-name(),'-',$pos)} as last into $x + + + +) + +return + +file:write('/Users/fredatherden/Desktop/support.sch',$copy, map{'indent':'no'}) \ No newline at end of file diff --git a/add-org-name-tests.xq b/add-org-name-tests.xq new file mode 100644 index 0000000..2780af3 --- /dev/null +++ b/add-org-name-tests.xq @@ -0,0 +1,59 @@ +declare variable $sch := doc('/Users/fredatherden/Documents/GitHub/eLife-JATS-schematron/schematron.sch'); +declare variable $base-uri := substring-before(base-uri($sch),'/schematron.sch'); + +for $x in $sch//*:pattern[@id="org-pattern"]//(*:report|*:assert) +let $org-name := substring-before(substring-after($x,"an organism - '"),"' - but there is n") +let $rule-id := $x/parent::*:rule/@id +let $path := concat($base-uri,'/tests/',$rule-id,'/',$x/@id,'/') +let $pass := concat($path,'pass.xml') +let $fail := concat($path,'fail.xml') +let $pass-element := if ($rule-id = 'org-ref-article-book-title') then + + test {$org-name} test + + else + + + test {$org-name} test + + + +let $fail-element := if ($rule-id = 'org-ref-article-book-title') then + + {concat(' test ',lower-case($org-name),' test ')} + + else + + + {concat(' test ',lower-case($org-name),' test ')} + + + +let $pi-content := ('SCHSchema="'||$x/@id||'.sch'||'"') +let $comment := comment{concat('Context: ',$x/parent::*:rule/@context/string(),' +Test: ',normalize-space($x/@test/string()))} + +let $pass-new := +(processing-instruction {'oxygen'}{$pi-content}, +$comment, + +
+ {$pass-element} +
+
) + +let $fail-new := +(processing-instruction {'oxygen'}{$pi-content}, +$comment, + +
+ {$fail-element} +
+
+) +return +( + file:write($pass,$pass-new), + file:write($fail,$fail-new) +) + diff --git a/aff-edit-test.xq b/aff-edit-test.xq new file mode 100644 index 0000000..3ee597e --- /dev/null +++ b/aff-edit-test.xq @@ -0,0 +1,16 @@ +let $xml := doc('/Users/fredatherden/Desktop/elife-49920-vor-r2/elife-49920.xml') + +let $new-xml := copy $copy := $xml +modify( + for $x in $copy//*:contrib-group[not(@content-type)]//*:aff + let $dept := $x/*:institution[@content-type="dept"] + let $inst := $x/*:institution[not(@content-type)] + return if ($inst = 'University of Kentucky') then ( + replace node $inst with {concat($dept,', ',$inst)}, + delete node $dept + ) + else () +) +return $copy + +return file:write('Desktop/elife-49920.xml',$new-xml,map{'indent':'no'}) \ No newline at end of file diff --git a/aff-tests.xq b/aff-tests.xq new file mode 100644 index 0000000..926b5be --- /dev/null +++ b/aff-tests.xq @@ -0,0 +1,12 @@ +for $x in collection('articles')//*:contrib-group[not(@content-type)] +let $list := +{ + for $aff in $x/*:aff + let $i := $aff/*:institution[not(@content-type)] + return + if ($i=$aff/preceding-sibling::*:aff/institution[not(@content-type)]) then {$aff} + else () +} +return +if (count($list//*:item)>4) then $x/base-uri() +else () \ No newline at end of file diff --git a/alt-group-markup.xq b/alt-group-markup.xq new file mode 100644 index 0000000..21dbadb --- /dev/null +++ b/alt-group-markup.xq @@ -0,0 +1,24 @@ +let $xml := doc('/Users/fredatherden/Desktop/elife-42463-v1.xml') + +let $copy := copy $copy1 := $xml +modify( + for $x in $copy1//*:contrib-group[@content-type="collab-list"]//*:aff + let $id := generate-id($x) + return insert node attribute id {$id} as first into $x +) + + +return copy $copy2 := $copy1 +modify( + for $x in $copy2//*:contrib-group[@content-type="collab-list"]//*:contrib + return replace value of node $x/@contrib-type with 'collaborator', + + for $y in $copy2//*:contrib-group[@content-type="collab-list"]//*:contrib//*:aff + return + (replace node $y with , + insert node $y as last into $y/ancestor::*:contrib-group[@content-type="collab-list"]) + +) +return $copy2 + +return $copy \ No newline at end of file diff --git a/article.xq b/article.xq new file mode 100644 index 0000000..db3af97 --- /dev/null +++ b/article.xq @@ -0,0 +1,2 @@ +for $x in collection('articles')//*:article[(descendant::*:article-id[@pub-id-type="publisher-id"]= '42955') and descendant::*:body] +return $x \ No newline at end of file diff --git a/award-ids.xq b/award-ids.xq new file mode 100644 index 0000000..a6db566 --- /dev/null +++ b/award-ids.xq @@ -0,0 +1,28 @@ +declare function local:get-doi($a){ + let $id := $a/ancestor::*:article/descendant::*:article-id[@pub-id-type="publisher-id"][1] + let $version := substring-before(substring-after($a/base-uri(),concat($id,'-')),'.xml') + let $url := concat('https://elifesciences.org/articles/',$id,$version) + return copy $copy := $a + modify( + for $x in $copy/descendant-or-self::*:award-group + return insert node attribute {'url'}{$url} as last into $x + ) + return $copy +}; + + + + +{ +for $x in collection('articles')//*:article//*:funding-group//*:award-group[*:award-id] +let $id := $x/*:award-id +let $y := replace($id,'[\p{P}\p{N}]|[Gg]rant','') +let $new-x := local:get-doi($x) +return +if (matches($id,'\p{Ll}')) then ( + if (string-length($y) < 10) then () + else $new-x) +else () +} + + diff --git a/batch-biorxiv-tranformation-2.xq b/batch-biorxiv-tranformation-2.xq new file mode 100644 index 0000000..2a3f833 --- /dev/null +++ b/batch-biorxiv-tranformation-2.xq @@ -0,0 +1,78 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; +declare namespace mml="http://www.w3.org/1998/Math/MathML"; + + +declare variable $dir := '/Users/fredatherden/Desktop/biorxiv-tranformed/'; +declare variable $xsl := doc('/Users/fredatherden/Documents/xsl/biorxiv.xsl'); + + +for $x in collection('biorxiv-xml')//*:article[not(descendant::*:media[@mimetype="video"]) and not(descendant::mml:math) and not(descendant::table) and not(descendant::fig-group) and not(descendant::disp-quote) and (count(descendant::*:mixed-citation[@publication-type!='journal']) le 3)] +let $filename := concat(substring-after($x//*:article-meta/*:article-id[@pub-id-type="doi"],'10.1101/'),'.xml') +let $file := xslt:transform($x, $xsl) + +let $file2 := +copy $copy := $file +modify( + + for $x in $copy//*:fig + let $label := if (ends-with($x/*:label,'.')) then concat($x/*:label/text(),' ') + else if (ends-with($x/*:label,'.')) then concat($x/*:label/text(),' ') + else concat($x/*:label,'. ') + return + replace node $x with + + + {$label, + $x/*:caption/*:p/(*|text())} + + + , + + for $x in $copy//*:table-wrap + let $label := if (ends-with($x/*:label,'.')) then $x/*:label/text() + else concat($x/*:label,'. ') + return + replace node $x with + + + {$label, + $x/*:caption/*:p/(*|text())} + + + , + + for $x in $copy//*:sec[(@sec-type="supplementary-material") and not(child::*[local-name()!='title' and local-name()!='supplementary-material'])] + return + delete node $x, + + for $x in $copy//*:article-meta//*:contrib//*:xref[@ref-type="aff"] + let $a := $x/ancestor::*:article-meta//*:aff[@id = $x/@rid] + let $aff := { + for $y in $a/(*|text()) + return + if ($y/local-name()='label') then () + else $y/data() + } + return + replace node $x with $aff, + + for $x in $copy//*:article-meta//*:aff + return delete node $x, + + for $x in $copy//*:back/*:ack + return + if ($x/*:title) then (delete node $x, + insert node {$x/*} as last into $x/preceding::body[1]) + else (delete node $x, + insert node Acknowledgements{$x/*} as last into $x/preceding::body[1]), + + for $x in $copy//*:abstract + return + (delete node $x, + insert node {$x/*} as first into $x/following::body[1]) + +) +return $copy + +return file:write(concat($dir,$filename),$file2, map {'indent':'no'}) + diff --git a/batch-biorxiv-transform.xq b/batch-biorxiv-transform.xq new file mode 100644 index 0000000..704a5da --- /dev/null +++ b/batch-biorxiv-transform.xq @@ -0,0 +1,14 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; +declare namespace mml="http://www.w3.org/1998/Math/MathML"; + + +declare variable $dir := '/Users/fredatherden/Desktop/biorxiv-tranformed/'; +declare variable $xsl := doc('/Users/fredatherden/Documents/xsl/mixed-2-element-citation.xsl'); + + + +for $x in collection('biorxiv-xml')//*:article +let $filename := concat(substring-after($x//*:article-meta/*:article-id[@pub-id-type="doi"],'10.1101/'),'.xml') +let $file := xslt:transform($x, $xsl) +return file:write(concat($dir,$filename),$file, map {'indent':'no'}) + diff --git a/batch-normalise-test.xq b/batch-normalise-test.xq new file mode 100644 index 0000000..c44eaf7 --- /dev/null +++ b/batch-normalise-test.xq @@ -0,0 +1,8 @@ +let $xsl := doc('/Users/fredatherden/Documents/xsl/normalise.xsl') + +for $x in collection('ijm-xml')//*:article +let $t := xslt:transform($x,$xsl) +let $name := for $y in tokenize($x/base-uri(),'/')[last()] + return $y + +return file:write(concat('/Users/fredatherden/Desktop/output/',$name),$t) diff --git a/batch-rdf-test.xq b/batch-rdf-test.xq new file mode 100644 index 0000000..6d0436c --- /dev/null +++ b/batch-rdf-test.xq @@ -0,0 +1,8 @@ +let $xsl := doc('/Users/fredatherden/Documents/xsl/jats2rdf.xsl') + +for $x in collection('ijm-xml')//*:article +let $t := xslt:transform($x,$xsl) +let $name := for $y in tokenize($x/base-uri(),'/')[last()] + return $y + +return file:write(concat('/Users/fredatherden/Desktop/output/',$name),$t) \ No newline at end of file diff --git a/batch-validate-test.xq b/batch-validate-test.xq new file mode 100644 index 0000000..7e7121d --- /dev/null +++ b/batch-validate-test.xq @@ -0,0 +1,15 @@ +import module namespace schematron = "http://github.com/Schematron/schematron-basex"; + +declare variable $sch := schematron:compile(doc('/Users/fredatherden/Documents/GitHub/eLife-JATS-schematron/src/final-JATS-schematron.sch')); + +for $x in collection('articles')//*:article[matches(descendant::*:article-id[@pub-id-type="publisher-id"],'^4222')] +let $article-id := $x//*:article-id[@pub-id-type="publisher-id"]/text() +let $folder := concat('/articles/elife-',$article-id,'-v') +let $v-no := number(substring-before(substring-after($x/base-uri(),$folder),'.xml')) +let $count := count(collection('articles')//*:article[descendant::*:article-id[@pub-id-type="publisher-id"]/text() = $article-id]) +return if ($count != $v-no) then () +else + +let $svrl := schematron:validate($x, $sch) +return if ($svrl//*:successful-report[@id="unlinked-url-2"]) then $x/base-uri() +else () diff --git a/batch-validate.xq b/batch-validate.xq new file mode 100644 index 0000000..2e3b8d2 --- /dev/null +++ b/batch-validate.xq @@ -0,0 +1,32 @@ +import module namespace schematron = "http://github.com/Schematron/schematron-basex"; + +(: Compile schematron - need to account for gen-country-test which basex is unable to resolve :) +let $s := doc('/Users/fredatherden/Documents/github/elife-JATS-schematron/src/final-JATS-schematron.sch') +let $s2 := copy $copy:=$s +modify( + for $x in $copy//*:assert[@id='gen-country-test'] + return delete node $x +) +return $copy +let $sch := schematron:compile($s2) + +for $x in collection('articles')//*:article +let $article-id := $x//*:article-id[@pub-id-type="publisher-id"]/text() +let $folder := concat('/articles/elife-',$article-id,'-v') +let $v-no := number(substring-before(substring-after($x/base-uri(),$folder),'.xml')) +let $count := count(collection('articles')//*:article[descendant::*:article-id[@pub-id-type="publisher-id"]/text() = $article-id]) + +return +(: Define a subset of articles based on regex against tracking number :) +if (not(matches($article-id,'^444'))) then () +(: Only pick out latest version :) +else if ($count != $v-no) then () +else + + let $svrl := schematron:validate($x, $sch) + return + (: Only return invalid articles :) + if (schematron:is-valid($svrl) = true()) then () + else $x/base-uri() + + diff --git a/biorxiv-edits.xq b/biorxiv-edits.xq new file mode 100644 index 0000000..3b25e22 --- /dev/null +++ b/biorxiv-edits.xq @@ -0,0 +1,76 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; +declare namespace mml="http://www.w3.org/1998/Math/MathML"; + + +declare variable $dir := '/Users/fredatherden/Desktop/biorxiv-tranformed/'; + + + +for $x in collection('biorxiv-xml')//*:article[not(descendant::*:media[@mimetype="video"]) and not(descendant::mml:math) and not(descendant::table) and not(descendant::fig-group) and not(descendant::disp-quote) and (count(descendant::*:mixed-citation[@publication-type!='journal']) le 3)] +let $filename := concat(substring-after($x//*:article-meta/*:article-id[@pub-id-type="doi"],'10.1101/'),'.xml') +let $file2 := +copy $copy := $x +modify( + + for $x in $copy//*:fig + let $label := if (ends-with($x/*:label,'.')) then concat($x/*:label/text(),' ') + else if (ends-with($x/*:label,'.')) then concat($x/*:label/text(),' ') + else concat($x/*:label,'. ') + return + replace node $x with + + + {$label, + $x/*:caption/*:p/(*|text())} + + + , + + for $x in $copy//*:table-wrap + let $label := if (ends-with($x/*:label,'.')) then $x/*:label/text() + else concat($x/*:label,'. ') + return + replace node $x with + + + {$label, + $x/*:caption/*:p/(*|text())} + + + , + + for $x in $copy//*:sec[(@sec-type="supplementary-material") and not(child::*[local-name()!='title' and local-name()!='supplementary-material'])] + return + delete node $x, + + for $x in $copy//*:article-meta//*:contrib//*:xref[@ref-type="aff"] + let $a := $x/ancestor::*:article-meta//*:aff[@id = $x/@rid] + let $aff := { + for $y in $a/(*|text()) + return + if ($y/local-name()='label') then () + else $y/data() + } + return + replace node $x with $aff, + + for $x in $copy//*:article-meta//*:aff + return delete node $x, + + for $x in $copy//*:back/*:ack + return + if ($x/*:title) then (delete node $x, + insert node {$x/*} as last into $x/preceding::body[1]) + else (delete node $x, + insert node Acknowledgements{$x/*} as last into $x/preceding::body[1]), + + for $x in $copy//*:abstract + return + (delete node $x, + insert node {$x/*} as first into $x/following::body[1]) + +) +return $copy + +return file:write(concat($dir,$filename),$file2, map {'indent':'no'}) + diff --git a/biorxiv-mixed-2-element-citation.xq b/biorxiv-mixed-2-element-citation.xq new file mode 100644 index 0000000..73541fd --- /dev/null +++ b/biorxiv-mixed-2-element-citation.xq @@ -0,0 +1,13 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; +declare namespace mml="http://www.w3.org/1998/Math/MathML"; + +declare variable $filename := 'xsl-test.xml'; +declare variable $dir := '/Users/fredatherden/Desktop/'; +declare variable $xsl := doc('/Users/fredatherden/Documents/xsl/mixed-2-element-citation.xsl'); + + + +for $x in collection('biorxiv-xml')//*:article[base-uri() = '/biorxiv-xml/686329.xml'] +let $file := xslt:transform($x, $xsl) +return file:write(concat($dir,$filename),$file, map {'indent':'no'}) + diff --git a/collab1.xq b/collab1.xq new file mode 100644 index 0000000..6adefd9 --- /dev/null +++ b/collab1.xq @@ -0,0 +1,5 @@ +for $x in //*:article-meta//*:collab//*:contrib[*:aff] +let $n := (count($x/parent::*:contrib-group/*:contrib) - count($x/following-sibling::*:contrib)) + 1 +let $aff := $x/*:aff +return (insert node {$n} as last into $x, + insert node attribute id {('aff'||$n)} as first into $aff) \ No newline at end of file diff --git a/collab2.xq b/collab2.xq new file mode 100644 index 0000000..84ca1ba --- /dev/null +++ b/collab2.xq @@ -0,0 +1,3 @@ +for $x in //*:article-meta//*:collab//*:contrib/*:aff +let $d := $x/ancestor::article-meta/*:contrib-group +return insert node $x as last into $d \ No newline at end of file diff --git a/collab3.xq b/collab3.xq new file mode 100644 index 0000000..1ac4be6 --- /dev/null +++ b/collab3.xq @@ -0,0 +1,3 @@ +for $x in //*:article-meta/*:contrib-group/*:aff[not(child::*:label)] +let $n := substring-after($x/@id,'aff') +return insert node as first into $x diff --git a/collab4.xq b/collab4.xq new file mode 100644 index 0000000..746c400 --- /dev/null +++ b/collab4.xq @@ -0,0 +1,2 @@ +for $x in //*:article-meta//*:collab//*:contrib/*:aff +return delete node $x \ No newline at end of file diff --git a/colour-check.xq b/colour-check.xq new file mode 100644 index 0000000..f4bc499 --- /dev/null +++ b/colour-check.xq @@ -0,0 +1,2 @@ +distinct-values(for $x in collection('articles')//*:article[((descendant::*:named-content[starts-with(@content-type,'author-callout')]) or (descendant::*:td[starts-with(@style,'author-callout')]) or (descendant::*:th[starts-with(@style,'author-callout')]) )] +return $x//article-id[@pub-id-type="publisher-id"]/text()) \ No newline at end of file diff --git a/component-dois.xq b/component-dois.xq new file mode 100644 index 0000000..89f8740 --- /dev/null +++ b/component-dois.xq @@ -0,0 +1,11 @@ +let $c := + +{for $x in collection('articles')//*:article[@article-type="research-article"][descendant::*:body] +let $id := $x/descendant::*:article-id[@pub-id-type="publisher-id"]/text() +let $type := normalize-space($x/descendant::*:article-categories/*:subj-group[@subj-group-type="display-channel"]/data()) +let $count := count($x//*:object-id[@pub-id-type="doi"]) +return +{$id}{$type}{$count} +} + +return file:write('/Users/fredatherden/Desktop/component-dois.csv',$c, map { "method": "csv", "item-separator": "," }) \ No newline at end of file diff --git a/copy-edit-test.xq b/copy-edit-test.xq new file mode 100644 index 0000000..acc2b51 --- /dev/null +++ b/copy-edit-test.xq @@ -0,0 +1,36 @@ +declare variable $us-uk-list := doc('/Users/fredatherden/Documents/GitHub/eLife-JATS-schematron/src/us-uk-list.xml'); + + +for $xml in collection('articles')//*:article[*:body] +let $article-id := $xml//*:article-id[@pub-id-type="publisher-id"]/text() +return +if (matches($article-id,'^44')) then + ( +let $text := replace(string-join( + for $x in $xml/(*:front/*:article-meta//(*:article-title|*:abstract//*:p|*:custom-meta/*:meta-value)| + *:body//(*:p|*:title|*:th|*:td)| + *:back//(*:ack//*:p|*:app//*:p|*:title|*:th|*:td) + ) + return $x/data() + ,' '),'[^\p{L}\s]','') + +let $tokens := tokenize($text,' ') + +let $style-list := { + for $x in $tokens + return + if ($x = $us-uk-list//*:item/@us/string()) then {$x} + else if ($x = $us-uk-list//*:item/@uk/string()) then {$x} + else () + } + +let $us := count($style-list//*:us) +let $uk := count($style-list//*:uk) + + return + if (($us gt 0) and ($uk gt 0)) then $xml/base-uri() + else () + +) + +else () \ No newline at end of file diff --git a/count-dois.xq b/count-dois.xq new file mode 100644 index 0000000..e3bca05 --- /dev/null +++ b/count-dois.xq @@ -0,0 +1,4 @@ +count(for $x in collection('articles')//*:element-citation +return +if ($x//pub-id[@pub-id-type="doi"]) then $x +else ()) div count(collection('articles')//*:element-citation) * 100 \ No newline at end of file diff --git a/display-subject.xq b/display-subject.xq new file mode 100644 index 0000000..b541541 --- /dev/null +++ b/display-subject.xq @@ -0,0 +1,2 @@ +distinct-values(for $x in collection('articles')//*:article[(descendant::*:subject[text() = 'Replication Study']) and descendant::*:body] +return $x//*:article-id[@pub-id-type="publisher-id"]/text()) \ No newline at end of file diff --git a/element-and-atribute-construct.xq b/element-and-atribute-construct.xq new file mode 100644 index 0000000..c9a14c7 --- /dev/null +++ b/element-and-atribute-construct.xq @@ -0,0 +1,10 @@ +declare namespace x="http://www.jenitennison.com/xslt/xspec"; + + +{let $x := doc('/Users/fredatherden/xspec/jats-support/support.sch') + +for $y in $x//*:pattern//(*:report|*:assert) +let $name := concat('x:expect-not-',$y/local-name()) +return element {$name} {attribute {'id'} {$y/@id}, attribute {'role'} {$y/@role}}} + + diff --git a/encoda-check.xq b/encoda-check.xq new file mode 100644 index 0000000..7876852 --- /dev/null +++ b/encoda-check.xq @@ -0,0 +1,6 @@ + for $x in collection('articles')//*:article[*:body and descendant::*:article-meta/*:contrib-group//*:collab] + let $base := $x/base-uri() + let $version := replace(substring-before(substring-after($base,'/articles/elife-'),'.xml'),'-','') + let $cmd := ('encoda convert https://elifesciences.org/articles/'||$version||' encoda-test/'||$version||'.xml --to jats') + return + $cmd \ No newline at end of file diff --git a/ext-link-test.xq b/ext-link-test.xq new file mode 100644 index 0000000..336761b --- /dev/null +++ b/ext-link-test.xq @@ -0,0 +1,9 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; + +let $list := +{for $x in collection('articles')//*:ext-link +return if (matches($x/@xlink:href,'^ftp|^http')) then () +else $x} + + +return file:write('/Users/fredatherden/Desktop/link-list.xml',$list, map {'indent':'yes'}) \ No newline at end of file diff --git a/feature-kwd-sub.xq b/feature-kwd-sub.xq new file mode 100644 index 0000000..4727de3 --- /dev/null +++ b/feature-kwd-sub.xq @@ -0,0 +1,14 @@ +for $x in collection('articles')//*:article +let $type := $x//*:subj-group[@subj-group-type="display-channel"]/*:subject/lower-case(.) +let $sub := $x//*:subj-group[@subj-group-type="sub-display-channel"]/*:subject/lower-case(.) +let $kwds := $x//*:kwd-group[@kwd-group-type="author-keywords"] +return +if ($type = ('feature article', 'insight')) then ( + let $match := for $x in $kwds/*:kwd + return if (lower-case($x) = $sub) then $x + else () + return + if (matches($match,'[a-z]')) then concat($x/base-uri(),' ------ ',$match) + else () + ) +else () \ No newline at end of file diff --git a/fetch-xml.xq b/fetch-xml.xq new file mode 100644 index 0000000..80ffd65 --- /dev/null +++ b/fetch-xml.xq @@ -0,0 +1,690 @@ +let $list := + https://wellcomeopenresearch.org/articles/1-1/v1/xml + https://wellcomeopenresearch.org/articles/1-1/v2/xml + https://wellcomeopenresearch.org/articles/1-10/v1/xml + https://wellcomeopenresearch.org/articles/1-10/v2/xml + https://wellcomeopenresearch.org/articles/1-11/v1/xml + https://wellcomeopenresearch.org/articles/1-12/v1/xml + https://wellcomeopenresearch.org/articles/1-13/v1/xml + https://wellcomeopenresearch.org/articles/1-14/v1/xml + https://wellcomeopenresearch.org/articles/1-15/v1/xml + https://wellcomeopenresearch.org/articles/1-16/v1/xml + https://wellcomeopenresearch.org/articles/1-16/v2/xml + https://wellcomeopenresearch.org/articles/1-17/v1/xml + https://wellcomeopenresearch.org/articles/1-18/v1/xml + https://wellcomeopenresearch.org/articles/1-18/v2/xml + https://wellcomeopenresearch.org/articles/1-19/v1/xml + https://wellcomeopenresearch.org/articles/1-19/v2/xml + https://wellcomeopenresearch.org/articles/1-19/v3/xml + https://wellcomeopenresearch.org/articles/1-2/v1/xml + https://wellcomeopenresearch.org/articles/1-2/v2/xml + https://wellcomeopenresearch.org/articles/1-20/v1/xml + https://wellcomeopenresearch.org/articles/1-21/v1/xml + https://wellcomeopenresearch.org/articles/1-22/v1/xml + https://wellcomeopenresearch.org/articles/1-22/v2/xml + https://wellcomeopenresearch.org/articles/1-23/v1/xml + https://wellcomeopenresearch.org/articles/1-23/v2/xml + https://wellcomeopenresearch.org/articles/1-24/v1/xml + https://wellcomeopenresearch.org/articles/1-25/v1/xml + https://wellcomeopenresearch.org/articles/1-25/v2/xml + https://wellcomeopenresearch.org/articles/1-26/v1/xml + https://wellcomeopenresearch.org/articles/1-27/v1/xml + https://wellcomeopenresearch.org/articles/1-27/v2/xml + https://wellcomeopenresearch.org/articles/1-28/v1/xml + https://wellcomeopenresearch.org/articles/1-28/v2/xml + https://wellcomeopenresearch.org/articles/1-29/v1/xml + https://wellcomeopenresearch.org/articles/1-3/v1/xml + https://wellcomeopenresearch.org/articles/1-3/v2/xml + https://wellcomeopenresearch.org/articles/1-30/v1/xml + https://wellcomeopenresearch.org/articles/1-30/v2/xml + https://wellcomeopenresearch.org/articles/1-31/v1/xml + https://wellcomeopenresearch.org/articles/1-32/v1/xml + https://wellcomeopenresearch.org/articles/1-32/v2/xml + https://wellcomeopenresearch.org/articles/1-32/v3/xml + https://wellcomeopenresearch.org/articles/1-33/v1/xml + https://wellcomeopenresearch.org/articles/1-4/v1/xml + https://wellcomeopenresearch.org/articles/1-5/v1/xml + https://wellcomeopenresearch.org/articles/1-6/v1/xml + https://wellcomeopenresearch.org/articles/1-6/v2/xml + https://wellcomeopenresearch.org/articles/1-7/v1/xml + https://wellcomeopenresearch.org/articles/1-7/v2/xml + https://wellcomeopenresearch.org/articles/1-8/v1/xml + https://wellcomeopenresearch.org/articles/1-9/v1/xml + https://wellcomeopenresearch.org/articles/2-1/v1/xml + https://wellcomeopenresearch.org/articles/2-10/v1/xml + https://wellcomeopenresearch.org/articles/2-10/v2/xml + https://wellcomeopenresearch.org/articles/2-100/v1/xml + https://wellcomeopenresearch.org/articles/2-100/v2/xml + https://wellcomeopenresearch.org/articles/2-101/v1/xml + https://wellcomeopenresearch.org/articles/2-102/v1/xml + https://wellcomeopenresearch.org/articles/2-103/v1/xml + https://wellcomeopenresearch.org/articles/2-104/v1/xml + https://wellcomeopenresearch.org/articles/2-105/v1/xml + https://wellcomeopenresearch.org/articles/2-105/v2/xml + https://wellcomeopenresearch.org/articles/2-105/v3/xml + https://wellcomeopenresearch.org/articles/2-106/v1/xml + https://wellcomeopenresearch.org/articles/2-107/v1/xml + https://wellcomeopenresearch.org/articles/2-107/v2/xml + https://wellcomeopenresearch.org/articles/2-108/v1/xml + https://wellcomeopenresearch.org/articles/2-109/v1/xml + https://wellcomeopenresearch.org/articles/2-109/v2/xml + https://wellcomeopenresearch.org/articles/2-11/v1/xml + https://wellcomeopenresearch.org/articles/2-110/v1/xml + https://wellcomeopenresearch.org/articles/2-110/v2/xml + https://wellcomeopenresearch.org/articles/2-111/v1/xml + https://wellcomeopenresearch.org/articles/2-112/v1/xml + https://wellcomeopenresearch.org/articles/2-113/v1/xml + https://wellcomeopenresearch.org/articles/2-114/v1/xml + https://wellcomeopenresearch.org/articles/2-114/v2/xml + https://wellcomeopenresearch.org/articles/2-114/v3/xml + https://wellcomeopenresearch.org/articles/2-115/v1/xml + https://wellcomeopenresearch.org/articles/2-115/v2/xml + https://wellcomeopenresearch.org/articles/2-116/v1/xml + https://wellcomeopenresearch.org/articles/2-116/v2/xml + https://wellcomeopenresearch.org/articles/2-117/v1/xml + https://wellcomeopenresearch.org/articles/2-117/v2/xml + https://wellcomeopenresearch.org/articles/2-117/v3/xml + https://wellcomeopenresearch.org/articles/2-118/v1/xml + https://wellcomeopenresearch.org/articles/2-118/v2/xml + https://wellcomeopenresearch.org/articles/2-119/v1/xml + https://wellcomeopenresearch.org/articles/2-119/v2/xml + https://wellcomeopenresearch.org/articles/2-12/v1/xml + https://wellcomeopenresearch.org/articles/2-120/v1/xml + https://wellcomeopenresearch.org/articles/2-120/v2/xml + https://wellcomeopenresearch.org/articles/2-120/v3/xml + https://wellcomeopenresearch.org/articles/2-121/v1/xml + https://wellcomeopenresearch.org/articles/2-121/v2/xml + https://wellcomeopenresearch.org/articles/2-121/v3/xml + https://wellcomeopenresearch.org/articles/2-13/v1/xml + https://wellcomeopenresearch.org/articles/2-13/v2/xml + https://wellcomeopenresearch.org/articles/2-14/v2/xml + https://wellcomeopenresearch.org/articles/2-15/v1/xml + https://wellcomeopenresearch.org/articles/2-16/v1/xml + https://wellcomeopenresearch.org/articles/2-16/v2/xml + https://wellcomeopenresearch.org/articles/2-17/v1/xml + https://wellcomeopenresearch.org/articles/2-17/v2/xml + https://wellcomeopenresearch.org/articles/2-18/v1/xml + https://wellcomeopenresearch.org/articles/2-19/v1/xml + https://wellcomeopenresearch.org/articles/2-2/v1/xml + https://wellcomeopenresearch.org/articles/2-2/v2/xml + https://wellcomeopenresearch.org/articles/2-20/v1/xml + https://wellcomeopenresearch.org/articles/2-20/v2/xml + https://wellcomeopenresearch.org/articles/2-21/v1/xml + https://wellcomeopenresearch.org/articles/2-21/v2/xml + https://wellcomeopenresearch.org/articles/2-22/v1/xml + https://wellcomeopenresearch.org/articles/2-22/v2/xml + https://wellcomeopenresearch.org/articles/2-22/v3/xml + https://wellcomeopenresearch.org/articles/2-22/v4/xml + https://wellcomeopenresearch.org/articles/2-23/v1/xml + https://wellcomeopenresearch.org/articles/2-23/v2/xml + https://wellcomeopenresearch.org/articles/2-23/v3/xml + https://wellcomeopenresearch.org/articles/2-24/v1/xml + https://wellcomeopenresearch.org/articles/2-25/v1/xml + https://wellcomeopenresearch.org/articles/2-25/v2/xml + https://wellcomeopenresearch.org/articles/2-26/v1/xml + https://wellcomeopenresearch.org/articles/2-27/v1/xml + https://wellcomeopenresearch.org/articles/2-28/v1/xml + https://wellcomeopenresearch.org/articles/2-28/v2/xml + https://wellcomeopenresearch.org/articles/2-28/v3/xml + https://wellcomeopenresearch.org/articles/2-29/v1/xml + https://wellcomeopenresearch.org/articles/2-29/v2/xml + https://wellcomeopenresearch.org/articles/2-3/v1/xml + https://wellcomeopenresearch.org/articles/2-3/v2/xml + https://wellcomeopenresearch.org/articles/2-30/v1/xml + https://wellcomeopenresearch.org/articles/2-31/v1/xml + https://wellcomeopenresearch.org/articles/2-31/v2/xml + https://wellcomeopenresearch.org/articles/2-32/v1/xml + https://wellcomeopenresearch.org/articles/2-32/v2/xml + https://wellcomeopenresearch.org/articles/2-33/v1/xml + https://wellcomeopenresearch.org/articles/2-34/v1/xml + https://wellcomeopenresearch.org/articles/2-34/v2/xml + https://wellcomeopenresearch.org/articles/2-35/v1/xml + https://wellcomeopenresearch.org/articles/2-36/v1/xml + https://wellcomeopenresearch.org/articles/2-36/v2/xml + https://wellcomeopenresearch.org/articles/2-37/v1/xml + https://wellcomeopenresearch.org/articles/2-37/v2/xml + https://wellcomeopenresearch.org/articles/2-38/v1/xml + https://wellcomeopenresearch.org/articles/2-39/v1/xml + https://wellcomeopenresearch.org/articles/2-39/v2/xml + https://wellcomeopenresearch.org/articles/2-4/v1/xml + https://wellcomeopenresearch.org/articles/2-4/v2/xml + https://wellcomeopenresearch.org/articles/2-40/v1/xml + https://wellcomeopenresearch.org/articles/2-40/v2/xml + https://wellcomeopenresearch.org/articles/2-41/v1/xml + https://wellcomeopenresearch.org/articles/2-41/v2/xml + https://wellcomeopenresearch.org/articles/2-42/v1/xml + https://wellcomeopenresearch.org/articles/2-43/v1/xml + https://wellcomeopenresearch.org/articles/2-43/v2/xml + https://wellcomeopenresearch.org/articles/2-44/v1/xml + https://wellcomeopenresearch.org/articles/2-44/v2/xml + https://wellcomeopenresearch.org/articles/2-45/v1/xml + https://wellcomeopenresearch.org/articles/2-45/v2/xml + https://wellcomeopenresearch.org/articles/2-46/v1/xml + https://wellcomeopenresearch.org/articles/2-47/v1/xml + https://wellcomeopenresearch.org/articles/2-47/v2/xml + https://wellcomeopenresearch.org/articles/2-48/v1/xml + https://wellcomeopenresearch.org/articles/2-48/v2/xml + https://wellcomeopenresearch.org/articles/2-49/v1/xml + https://wellcomeopenresearch.org/articles/2-5/v1/xml + https://wellcomeopenresearch.org/articles/2-50/v1/xml + https://wellcomeopenresearch.org/articles/2-50/v2/xml + https://wellcomeopenresearch.org/articles/2-51/v1/xml + https://wellcomeopenresearch.org/articles/2-52/v1/xml + https://wellcomeopenresearch.org/articles/2-52/v2/xml + https://wellcomeopenresearch.org/articles/2-53/v1/xml + https://wellcomeopenresearch.org/articles/2-53/v2/xml + https://wellcomeopenresearch.org/articles/2-54/v1/xml + https://wellcomeopenresearch.org/articles/2-55/v1/xml + https://wellcomeopenresearch.org/articles/2-55/v2/xml + https://wellcomeopenresearch.org/articles/2-56/v1/xml + https://wellcomeopenresearch.org/articles/2-57/v1/xml + https://wellcomeopenresearch.org/articles/2-58/v1/xml + https://wellcomeopenresearch.org/articles/2-59/v1/xml + https://wellcomeopenresearch.org/articles/2-6/v1/xml + https://wellcomeopenresearch.org/articles/2-6/v2/xml + https://wellcomeopenresearch.org/articles/2-60/v1/xml + https://wellcomeopenresearch.org/articles/2-60/v2/xml + https://wellcomeopenresearch.org/articles/2-61/v1/xml + https://wellcomeopenresearch.org/articles/2-62/v1/xml + https://wellcomeopenresearch.org/articles/2-63/v1/xml + https://wellcomeopenresearch.org/articles/2-64/v1/xml + https://wellcomeopenresearch.org/articles/2-64/v2/xml + https://wellcomeopenresearch.org/articles/2-65/v1/xml + https://wellcomeopenresearch.org/articles/2-66/v1/xml + https://wellcomeopenresearch.org/articles/2-66/v2/xml + https://wellcomeopenresearch.org/articles/2-66/v3/xml + https://wellcomeopenresearch.org/articles/2-67/v1/xml + https://wellcomeopenresearch.org/articles/2-68/v1/xml + https://wellcomeopenresearch.org/articles/2-69/v1/xml + https://wellcomeopenresearch.org/articles/2-69/v2/xml + https://wellcomeopenresearch.org/articles/2-7/v1/xml + https://wellcomeopenresearch.org/articles/2-70/v1/xml + https://wellcomeopenresearch.org/articles/2-71/v1/xml + https://wellcomeopenresearch.org/articles/2-72/v1/xml + https://wellcomeopenresearch.org/articles/2-72/v2/xml + https://wellcomeopenresearch.org/articles/2-73/v1/xml + https://wellcomeopenresearch.org/articles/2-73/v2/xml + https://wellcomeopenresearch.org/articles/2-74/v1/xml + https://wellcomeopenresearch.org/articles/2-75/v1/xml + https://wellcomeopenresearch.org/articles/2-76/v1/xml + https://wellcomeopenresearch.org/articles/2-76/v2/xml + https://wellcomeopenresearch.org/articles/2-77/v1/xml + https://wellcomeopenresearch.org/articles/2-77/v2/xml + https://wellcomeopenresearch.org/articles/2-78/v1/xml + https://wellcomeopenresearch.org/articles/2-78/v2/xml + https://wellcomeopenresearch.org/articles/2-79/v1/xml + https://wellcomeopenresearch.org/articles/2-8/v1/xml + https://wellcomeopenresearch.org/articles/2-80/v1/xml + https://wellcomeopenresearch.org/articles/2-80/v2/xml + https://wellcomeopenresearch.org/articles/2-81/v1/xml + https://wellcomeopenresearch.org/articles/2-82/v1/xml + https://wellcomeopenresearch.org/articles/2-83/v1/xml + https://wellcomeopenresearch.org/articles/2-83/v2/xml + https://wellcomeopenresearch.org/articles/2-84/v1/xml + https://wellcomeopenresearch.org/articles/2-84/v2/xml + https://wellcomeopenresearch.org/articles/2-85/v1/xml + https://wellcomeopenresearch.org/articles/2-86/v1/xml + https://wellcomeopenresearch.org/articles/2-87/v1/xml + https://wellcomeopenresearch.org/articles/2-87/v2/xml + https://wellcomeopenresearch.org/articles/2-88/v1/xml + https://wellcomeopenresearch.org/articles/2-89/v1/xml + https://wellcomeopenresearch.org/articles/2-89/v2/xml + https://wellcomeopenresearch.org/articles/2-9/v1/xml + https://wellcomeopenresearch.org/articles/2-90/v1/xml + https://wellcomeopenresearch.org/articles/2-91/v1/xml + https://wellcomeopenresearch.org/articles/2-92/v1/xml + https://wellcomeopenresearch.org/articles/2-93/v1/xml + https://wellcomeopenresearch.org/articles/2-93/v2/xml + https://wellcomeopenresearch.org/articles/2-93/v3/xml + https://wellcomeopenresearch.org/articles/2-94/v1/xml + https://wellcomeopenresearch.org/articles/2-95/v1/xml + https://wellcomeopenresearch.org/articles/2-95/v2/xml + https://wellcomeopenresearch.org/articles/2-96/v1/xml + https://wellcomeopenresearch.org/articles/2-97/v1/xml + https://wellcomeopenresearch.org/articles/2-97/v2/xml + https://wellcomeopenresearch.org/articles/2-98/v1/xml + https://wellcomeopenresearch.org/articles/2-98/v2/xml + https://wellcomeopenresearch.org/articles/2-99/v1/xml + https://wellcomeopenresearch.org/articles/3-1/v1/xml + https://wellcomeopenresearch.org/articles/3-10/v1/xml + https://wellcomeopenresearch.org/articles/3-10/v2/xml + https://wellcomeopenresearch.org/articles/3-100/v1/xml + https://wellcomeopenresearch.org/articles/3-101/v1/xml + https://wellcomeopenresearch.org/articles/3-102/v1/xml + https://wellcomeopenresearch.org/articles/3-103/v1/xml + https://wellcomeopenresearch.org/articles/3-103/v2/xml + https://wellcomeopenresearch.org/articles/3-104/v1/xml + https://wellcomeopenresearch.org/articles/3-104/v2/xml + https://wellcomeopenresearch.org/articles/3-105/v1/xml + https://wellcomeopenresearch.org/articles/3-105/v2/xml + https://wellcomeopenresearch.org/articles/3-106/v1/xml + https://wellcomeopenresearch.org/articles/3-107/v1/xml + https://wellcomeopenresearch.org/articles/3-108/v1/xml + https://wellcomeopenresearch.org/articles/3-108/v2/xml + https://wellcomeopenresearch.org/articles/3-109/v1/xml + https://wellcomeopenresearch.org/articles/3-109/v2/xml + https://wellcomeopenresearch.org/articles/3-109/v3/xml + https://wellcomeopenresearch.org/articles/3-109/v4/xml + https://wellcomeopenresearch.org/articles/3-11/v1/xml + https://wellcomeopenresearch.org/articles/3-11/v2/xml + https://wellcomeopenresearch.org/articles/3-110/v1/xml + https://wellcomeopenresearch.org/articles/3-110/v2/xml + https://wellcomeopenresearch.org/articles/3-111/v1/xml + https://wellcomeopenresearch.org/articles/3-111/v2/xml + https://wellcomeopenresearch.org/articles/3-112/v1/xml + https://wellcomeopenresearch.org/articles/3-113/v1/xml + https://wellcomeopenresearch.org/articles/3-113/v2/xml + https://wellcomeopenresearch.org/articles/3-114/v1/xml + https://wellcomeopenresearch.org/articles/3-114/v2/xml + https://wellcomeopenresearch.org/articles/3-115/v1/xml + https://wellcomeopenresearch.org/articles/3-115/v2/xml + https://wellcomeopenresearch.org/articles/3-116/v1/xml + https://wellcomeopenresearch.org/articles/3-116/v2/xml + https://wellcomeopenresearch.org/articles/3-117/v1/xml + https://wellcomeopenresearch.org/articles/3-118/v1/xml + https://wellcomeopenresearch.org/articles/3-118/v2/xml + https://wellcomeopenresearch.org/articles/3-119/v1/xml + https://wellcomeopenresearch.org/articles/3-12/v1/xml + https://wellcomeopenresearch.org/articles/3-120/v1/xml + https://wellcomeopenresearch.org/articles/3-120/v2/xml + https://wellcomeopenresearch.org/articles/3-121/v1/xml + https://wellcomeopenresearch.org/articles/3-122/v1/xml + https://wellcomeopenresearch.org/articles/3-123/v1/xml + https://wellcomeopenresearch.org/articles/3-124/v1/xml + https://wellcomeopenresearch.org/articles/3-125/v1/xml + https://wellcomeopenresearch.org/articles/3-126/v1/xml + https://wellcomeopenresearch.org/articles/3-127/v1/xml + https://wellcomeopenresearch.org/articles/3-128/v1/xml + https://wellcomeopenresearch.org/articles/3-128/v2/xml + https://wellcomeopenresearch.org/articles/3-129/v1/xml + https://wellcomeopenresearch.org/articles/3-13/v1/xml + https://wellcomeopenresearch.org/articles/3-13/v2/xml + https://wellcomeopenresearch.org/articles/3-130/v1/xml + https://wellcomeopenresearch.org/articles/3-130/v2/xml + https://wellcomeopenresearch.org/articles/3-131/v1/xml + https://wellcomeopenresearch.org/articles/3-132/v1/xml + https://wellcomeopenresearch.org/articles/3-132/v2/xml + https://wellcomeopenresearch.org/articles/3-133/v1/xml + https://wellcomeopenresearch.org/articles/3-134/v1/xml + https://wellcomeopenresearch.org/articles/3-134/v2/xml + https://wellcomeopenresearch.org/articles/3-135/v1/xml + https://wellcomeopenresearch.org/articles/3-135/v2/xml + https://wellcomeopenresearch.org/articles/3-136/v1/xml + https://wellcomeopenresearch.org/articles/3-137/v1/xml + https://wellcomeopenresearch.org/articles/3-137/v2/xml + https://wellcomeopenresearch.org/articles/3-138/v1/xml + https://wellcomeopenresearch.org/articles/3-139/v1/xml + https://wellcomeopenresearch.org/articles/3-139/v2/xml + https://wellcomeopenresearch.org/articles/3-139/v3/xml + https://wellcomeopenresearch.org/articles/3-14/v1/xml + https://wellcomeopenresearch.org/articles/3-14/v2/xml + https://wellcomeopenresearch.org/articles/3-140/v1/xml + https://wellcomeopenresearch.org/articles/3-140/v2/xml + https://wellcomeopenresearch.org/articles/3-141/v1/xml + https://wellcomeopenresearch.org/articles/3-141/v2/xml + https://wellcomeopenresearch.org/articles/3-142/v1/xml + https://wellcomeopenresearch.org/articles/3-142/v2/xml + https://wellcomeopenresearch.org/articles/3-143/v1/xml + https://wellcomeopenresearch.org/articles/3-143/v2/xml + https://wellcomeopenresearch.org/articles/3-144/v1/xml + https://wellcomeopenresearch.org/articles/3-145/v1/xml + https://wellcomeopenresearch.org/articles/3-146/v1/xml + https://wellcomeopenresearch.org/articles/3-147/v1/xml + https://wellcomeopenresearch.org/articles/3-148/v1/xml + https://wellcomeopenresearch.org/articles/3-149/v1/xml + https://wellcomeopenresearch.org/articles/3-149/v2/xml + https://wellcomeopenresearch.org/articles/3-149/v3/xml + https://wellcomeopenresearch.org/articles/3-15/v1/xml + https://wellcomeopenresearch.org/articles/3-15/v2/xml + https://wellcomeopenresearch.org/articles/3-150/v1/xml + https://wellcomeopenresearch.org/articles/3-150/v2/xml + https://wellcomeopenresearch.org/articles/3-151/v1/xml + https://wellcomeopenresearch.org/articles/3-151/v2/xml + https://wellcomeopenresearch.org/articles/3-152/v1/xml + https://wellcomeopenresearch.org/articles/3-153/v1/xml + https://wellcomeopenresearch.org/articles/3-154/v1/xml + https://wellcomeopenresearch.org/articles/3-155/v1/xml + https://wellcomeopenresearch.org/articles/3-156/v1/xml + https://wellcomeopenresearch.org/articles/3-156/v2/xml + https://wellcomeopenresearch.org/articles/3-157/v1/xml + https://wellcomeopenresearch.org/articles/3-157/v2/xml + https://wellcomeopenresearch.org/articles/3-157/v3/xml + https://wellcomeopenresearch.org/articles/3-158/v1/xml + https://wellcomeopenresearch.org/articles/3-159/v1/xml + https://wellcomeopenresearch.org/articles/3-159/v2/xml + https://wellcomeopenresearch.org/articles/3-16/v1/xml + https://wellcomeopenresearch.org/articles/3-160/v1/xml + https://wellcomeopenresearch.org/articles/3-161/v1/xml + https://wellcomeopenresearch.org/articles/3-162/v1/xml + https://wellcomeopenresearch.org/articles/3-163/v1/xml + https://wellcomeopenresearch.org/articles/3-163/v2/xml + https://wellcomeopenresearch.org/articles/3-164/v1/xml + https://wellcomeopenresearch.org/articles/3-165/v1/xml + https://wellcomeopenresearch.org/articles/3-166/v1/xml + https://wellcomeopenresearch.org/articles/3-17/v1/xml + https://wellcomeopenresearch.org/articles/3-18/v1/xml + https://wellcomeopenresearch.org/articles/3-18/v2/xml + https://wellcomeopenresearch.org/articles/3-19/v1/xml + https://wellcomeopenresearch.org/articles/3-19/v2/xml + https://wellcomeopenresearch.org/articles/3-2/v1/xml + https://wellcomeopenresearch.org/articles/3-2/v2/xml + https://wellcomeopenresearch.org/articles/3-20/v1/xml + https://wellcomeopenresearch.org/articles/3-21/v1/xml + https://wellcomeopenresearch.org/articles/3-21/v2/xml + https://wellcomeopenresearch.org/articles/3-22/v1/xml + https://wellcomeopenresearch.org/articles/3-23/v1/xml + https://wellcomeopenresearch.org/articles/3-24/v1/xml + https://wellcomeopenresearch.org/articles/3-25/v1/xml + https://wellcomeopenresearch.org/articles/3-26/v1/xml + https://wellcomeopenresearch.org/articles/3-27/v1/xml + https://wellcomeopenresearch.org/articles/3-27/v2/xml + https://wellcomeopenresearch.org/articles/3-27/v3/xml + https://wellcomeopenresearch.org/articles/3-28/v1/xml + https://wellcomeopenresearch.org/articles/3-29/v1/xml + https://wellcomeopenresearch.org/articles/3-29/v2/xml + https://wellcomeopenresearch.org/articles/3-3/v1/xml + https://wellcomeopenresearch.org/articles/3-30/v1/xml + https://wellcomeopenresearch.org/articles/3-31/v1/xml + https://wellcomeopenresearch.org/articles/3-31/v2/xml + https://wellcomeopenresearch.org/articles/3-32/v1/xml + https://wellcomeopenresearch.org/articles/3-33/v1/xml + https://wellcomeopenresearch.org/articles/3-33/v2/xml + https://wellcomeopenresearch.org/articles/3-34/v1/xml + https://wellcomeopenresearch.org/articles/3-34/v2/xml + https://wellcomeopenresearch.org/articles/3-35/v1/xml + https://wellcomeopenresearch.org/articles/3-36/v1/xml + https://wellcomeopenresearch.org/articles/3-37/v1/xml + https://wellcomeopenresearch.org/articles/3-38/v1/xml + https://wellcomeopenresearch.org/articles/3-38/v2/xml + https://wellcomeopenresearch.org/articles/3-39/v1/xml + https://wellcomeopenresearch.org/articles/3-39/v2/xml + https://wellcomeopenresearch.org/articles/3-4/v1/xml + https://wellcomeopenresearch.org/articles/3-4/v2/xml + https://wellcomeopenresearch.org/articles/3-4/v3/xml + https://wellcomeopenresearch.org/articles/3-40/v1/xml + https://wellcomeopenresearch.org/articles/3-41/v1/xml + https://wellcomeopenresearch.org/articles/3-42/v1/xml + https://wellcomeopenresearch.org/articles/3-43/v1/xml + https://wellcomeopenresearch.org/articles/3-44/v1/xml + https://wellcomeopenresearch.org/articles/3-44/v2/xml + https://wellcomeopenresearch.org/articles/3-45/v1/xml + https://wellcomeopenresearch.org/articles/3-46/v1/xml + https://wellcomeopenresearch.org/articles/3-47/v1/xml + https://wellcomeopenresearch.org/articles/3-47/v2/xml + https://wellcomeopenresearch.org/articles/3-48/v1/xml + https://wellcomeopenresearch.org/articles/3-49/v1/xml + https://wellcomeopenresearch.org/articles/3-49/v2/xml + https://wellcomeopenresearch.org/articles/3-5/v1/xml + https://wellcomeopenresearch.org/articles/3-5/v2/xml + https://wellcomeopenresearch.org/articles/3-50/v1/xml + https://wellcomeopenresearch.org/articles/3-51/v1/xml + https://wellcomeopenresearch.org/articles/3-52/v1/xml + https://wellcomeopenresearch.org/articles/3-53/v1/xml + https://wellcomeopenresearch.org/articles/3-53/v2/xml + https://wellcomeopenresearch.org/articles/3-54/v1/xml + https://wellcomeopenresearch.org/articles/3-55/v1/xml + https://wellcomeopenresearch.org/articles/3-55/v2/xml + https://wellcomeopenresearch.org/articles/3-56/v1/xml + https://wellcomeopenresearch.org/articles/3-57/v1/xml + https://wellcomeopenresearch.org/articles/3-58/v1/xml + https://wellcomeopenresearch.org/articles/3-58/v2/xml + https://wellcomeopenresearch.org/articles/3-59/v1/xml + https://wellcomeopenresearch.org/articles/3-59/v2/xml + https://wellcomeopenresearch.org/articles/3-6/v1/xml + https://wellcomeopenresearch.org/articles/3-6/v2/xml + https://wellcomeopenresearch.org/articles/3-60/v1/xml + https://wellcomeopenresearch.org/articles/3-61/v1/xml + https://wellcomeopenresearch.org/articles/3-61/v2/xml + https://wellcomeopenresearch.org/articles/3-61/v3/xml + https://wellcomeopenresearch.org/articles/3-62/v1/xml + https://wellcomeopenresearch.org/articles/3-63/v1/xml + https://wellcomeopenresearch.org/articles/3-63/v2/xml + https://wellcomeopenresearch.org/articles/3-64/v1/xml + https://wellcomeopenresearch.org/articles/3-64/v2/xml + https://wellcomeopenresearch.org/articles/3-65/v1/xml + https://wellcomeopenresearch.org/articles/3-65/v2/xml + https://wellcomeopenresearch.org/articles/3-66/v1/xml + https://wellcomeopenresearch.org/articles/3-67/v1/xml + https://wellcomeopenresearch.org/articles/3-67/v2/xml + https://wellcomeopenresearch.org/articles/3-67/v3/xml + https://wellcomeopenresearch.org/articles/3-68/v1/xml + https://wellcomeopenresearch.org/articles/3-69/v1/xml + https://wellcomeopenresearch.org/articles/3-7/v1/xml + https://wellcomeopenresearch.org/articles/3-70/v1/xml + https://wellcomeopenresearch.org/articles/3-70/v2/xml + https://wellcomeopenresearch.org/articles/3-70/v3/xml + https://wellcomeopenresearch.org/articles/3-70/v4/xml + https://wellcomeopenresearch.org/articles/3-71/v1/xml + https://wellcomeopenresearch.org/articles/3-72/v1/xml + https://wellcomeopenresearch.org/articles/3-72/v2/xml + https://wellcomeopenresearch.org/articles/3-73/v1/xml + https://wellcomeopenresearch.org/articles/3-74/v1/xml + https://wellcomeopenresearch.org/articles/3-75/v1/xml + https://wellcomeopenresearch.org/articles/3-76/v1/xml + https://wellcomeopenresearch.org/articles/3-76/v2/xml + https://wellcomeopenresearch.org/articles/3-77/v1/xml + https://wellcomeopenresearch.org/articles/3-78/v1/xml + https://wellcomeopenresearch.org/articles/3-79/v1/xml + https://wellcomeopenresearch.org/articles/3-79/v2/xml + https://wellcomeopenresearch.org/articles/3-79/v3/xml + https://wellcomeopenresearch.org/articles/3-8/v1/xml + https://wellcomeopenresearch.org/articles/3-80/v1/xml + https://wellcomeopenresearch.org/articles/3-80/v2/xml + https://wellcomeopenresearch.org/articles/3-81/v1/xml + https://wellcomeopenresearch.org/articles/3-81/v2/xml + https://wellcomeopenresearch.org/articles/3-82/v1/xml + https://wellcomeopenresearch.org/articles/3-82/v2/xml + https://wellcomeopenresearch.org/articles/3-82/v3/xml + https://wellcomeopenresearch.org/articles/3-83/v1/xml + https://wellcomeopenresearch.org/articles/3-84/v1/xml + https://wellcomeopenresearch.org/articles/3-84/v2/xml + https://wellcomeopenresearch.org/articles/3-85/v1/xml + https://wellcomeopenresearch.org/articles/3-85/v2/xml + https://wellcomeopenresearch.org/articles/3-86/v1/xml + https://wellcomeopenresearch.org/articles/3-86/v2/xml + https://wellcomeopenresearch.org/articles/3-87/v1/xml + https://wellcomeopenresearch.org/articles/3-87/v2/xml + https://wellcomeopenresearch.org/articles/3-88/v1/xml + https://wellcomeopenresearch.org/articles/3-89/v1/xml + https://wellcomeopenresearch.org/articles/3-9/v1/xml + https://wellcomeopenresearch.org/articles/3-9/v2/xml + https://wellcomeopenresearch.org/articles/3-90/v1/xml + https://wellcomeopenresearch.org/articles/3-90/v2/xml + https://wellcomeopenresearch.org/articles/3-91/v1/xml + https://wellcomeopenresearch.org/articles/3-92/v1/xml + https://wellcomeopenresearch.org/articles/3-93/v1/xml + https://wellcomeopenresearch.org/articles/3-94/v1/xml + https://wellcomeopenresearch.org/articles/3-95/v1/xml + https://wellcomeopenresearch.org/articles/3-96/v1/xml + https://wellcomeopenresearch.org/articles/3-96/v2/xml + https://wellcomeopenresearch.org/articles/3-97/v1/xml + https://wellcomeopenresearch.org/articles/3-98/v1/xml + https://wellcomeopenresearch.org/articles/3-98/v2/xml + https://wellcomeopenresearch.org/articles/3-99/v1/xml + https://wellcomeopenresearch.org/articles/3-99/v2/xml + https://wellcomeopenresearch.org/articles/4-1/v1/xml + https://wellcomeopenresearch.org/articles/4-1/v2/xml + https://wellcomeopenresearch.org/articles/4-10/v1/xml + https://wellcomeopenresearch.org/articles/4-100/v1/xml + https://wellcomeopenresearch.org/articles/4-100/v2/xml + https://wellcomeopenresearch.org/articles/4-101/v1/xml + https://wellcomeopenresearch.org/articles/4-102/v1/xml + https://wellcomeopenresearch.org/articles/4-103/v1/xml + https://wellcomeopenresearch.org/articles/4-104/v1/xml + https://wellcomeopenresearch.org/articles/4-105/v1/xml + https://wellcomeopenresearch.org/articles/4-106/v1/xml + https://wellcomeopenresearch.org/articles/4-107/v1/xml + https://wellcomeopenresearch.org/articles/4-108/v1/xml + https://wellcomeopenresearch.org/articles/4-109/v1/xml + https://wellcomeopenresearch.org/articles/4-11/v1/xml + https://wellcomeopenresearch.org/articles/4-11/v2/xml + https://wellcomeopenresearch.org/articles/4-110/v1/xml + https://wellcomeopenresearch.org/articles/4-111/v1/xml + https://wellcomeopenresearch.org/articles/4-112/v1/xml + https://wellcomeopenresearch.org/articles/4-113/v1/xml + https://wellcomeopenresearch.org/articles/4-114/v1/xml + https://wellcomeopenresearch.org/articles/4-115/v1/xml + https://wellcomeopenresearch.org/articles/4-116/v1/xml + https://wellcomeopenresearch.org/articles/4-117/v1/xml + https://wellcomeopenresearch.org/articles/4-118/v1/xml + https://wellcomeopenresearch.org/articles/4-119/v1/xml + https://wellcomeopenresearch.org/articles/4-12/v1/xml + https://wellcomeopenresearch.org/articles/4-12/v2/xml + https://wellcomeopenresearch.org/articles/4-120/v1/xml + https://wellcomeopenresearch.org/articles/4-121/v1/xml + https://wellcomeopenresearch.org/articles/4-122/v1/xml + https://wellcomeopenresearch.org/articles/4-123/v1/xml + https://wellcomeopenresearch.org/articles/4-124/v1/xml + https://wellcomeopenresearch.org/articles/4-125/v1/xml + https://wellcomeopenresearch.org/articles/4-126/v1/xml + https://wellcomeopenresearch.org/articles/4-127/v1/xml + https://wellcomeopenresearch.org/articles/4-128/v1/xml + https://wellcomeopenresearch.org/articles/4-129/v1/xml + https://wellcomeopenresearch.org/articles/4-13/v1/xml + https://wellcomeopenresearch.org/articles/4-13/v2/xml + https://wellcomeopenresearch.org/articles/4-130/v1/xml + https://wellcomeopenresearch.org/articles/4-131/v1/xml + https://wellcomeopenresearch.org/articles/4-132/v1/xml + https://wellcomeopenresearch.org/articles/4-133/v1/xml + https://wellcomeopenresearch.org/articles/4-134/v1/xml + https://wellcomeopenresearch.org/articles/4-14/v1/xml + https://wellcomeopenresearch.org/articles/4-14/v2/xml + https://wellcomeopenresearch.org/articles/4-15/v1/xml + https://wellcomeopenresearch.org/articles/4-15/v2/xml + https://wellcomeopenresearch.org/articles/4-16/v1/xml + https://wellcomeopenresearch.org/articles/4-16/v2/xml + https://wellcomeopenresearch.org/articles/4-17/v1/xml + https://wellcomeopenresearch.org/articles/4-18/v1/xml + https://wellcomeopenresearch.org/articles/4-18/v2/xml + https://wellcomeopenresearch.org/articles/4-19/v1/xml + https://wellcomeopenresearch.org/articles/4-2/v1/xml + https://wellcomeopenresearch.org/articles/4-20/v1/xml + https://wellcomeopenresearch.org/articles/4-21/v1/xml + https://wellcomeopenresearch.org/articles/4-22/v1/xml + https://wellcomeopenresearch.org/articles/4-23/v1/xml + https://wellcomeopenresearch.org/articles/4-23/v2/xml + https://wellcomeopenresearch.org/articles/4-24/v1/xml + https://wellcomeopenresearch.org/articles/4-24/v2/xml + https://wellcomeopenresearch.org/articles/4-25/v1/xml + https://wellcomeopenresearch.org/articles/4-25/v2/xml + https://wellcomeopenresearch.org/articles/4-26/v1/xml + https://wellcomeopenresearch.org/articles/4-27/v1/xml + https://wellcomeopenresearch.org/articles/4-27/v2/xml + https://wellcomeopenresearch.org/articles/4-28/v1/xml + https://wellcomeopenresearch.org/articles/4-29/v1/xml + https://wellcomeopenresearch.org/articles/4-29/v2/xml + https://wellcomeopenresearch.org/articles/4-3/v1/xml + https://wellcomeopenresearch.org/articles/4-3/v2/xml + https://wellcomeopenresearch.org/articles/4-30/v1/xml + https://wellcomeopenresearch.org/articles/4-31/v1/xml + https://wellcomeopenresearch.org/articles/4-32/v1/xml + https://wellcomeopenresearch.org/articles/4-32/v2/xml + https://wellcomeopenresearch.org/articles/4-33/v1/xml + https://wellcomeopenresearch.org/articles/4-34/v1/xml + https://wellcomeopenresearch.org/articles/4-35/v1/xml + https://wellcomeopenresearch.org/articles/4-36/v1/xml + https://wellcomeopenresearch.org/articles/4-37/v1/xml + https://wellcomeopenresearch.org/articles/4-37/v2/xml + https://wellcomeopenresearch.org/articles/4-37/v3/xml + https://wellcomeopenresearch.org/articles/4-38/v1/xml + https://wellcomeopenresearch.org/articles/4-38/v2/xml + https://wellcomeopenresearch.org/articles/4-39/v1/xml + https://wellcomeopenresearch.org/articles/4-4/v1/xml + https://wellcomeopenresearch.org/articles/4-40/v1/xml + https://wellcomeopenresearch.org/articles/4-41/v1/xml + https://wellcomeopenresearch.org/articles/4-41/v2/xml + https://wellcomeopenresearch.org/articles/4-42/v1/xml + https://wellcomeopenresearch.org/articles/4-43/v1/xml + https://wellcomeopenresearch.org/articles/4-44/v1/xml + https://wellcomeopenresearch.org/articles/4-45/v1/xml + https://wellcomeopenresearch.org/articles/4-46/v1/xml + https://wellcomeopenresearch.org/articles/4-47/v1/xml + https://wellcomeopenresearch.org/articles/4-48/v1/xml + https://wellcomeopenresearch.org/articles/4-49/v1/xml + https://wellcomeopenresearch.org/articles/4-5/v1/xml + https://wellcomeopenresearch.org/articles/4-5/v2/xml + https://wellcomeopenresearch.org/articles/4-50/v1/xml + https://wellcomeopenresearch.org/articles/4-51/v1/xml + https://wellcomeopenresearch.org/articles/4-52/v1/xml + https://wellcomeopenresearch.org/articles/4-53/v1/xml + https://wellcomeopenresearch.org/articles/4-54/v1/xml + https://wellcomeopenresearch.org/articles/4-54/v2/xml + https://wellcomeopenresearch.org/articles/4-55/v1/xml + https://wellcomeopenresearch.org/articles/4-55/v2/xml + https://wellcomeopenresearch.org/articles/4-56/v1/xml + https://wellcomeopenresearch.org/articles/4-56/v2/xml + https://wellcomeopenresearch.org/articles/4-57/v1/xml + https://wellcomeopenresearch.org/articles/4-57/v2/xml + https://wellcomeopenresearch.org/articles/4-58/v1/xml + https://wellcomeopenresearch.org/articles/4-58/v2/xml + https://wellcomeopenresearch.org/articles/4-59/v1/xml + https://wellcomeopenresearch.org/articles/4-6/v1/xml + https://wellcomeopenresearch.org/articles/4-60/v1/xml + https://wellcomeopenresearch.org/articles/4-61/v1/xml + https://wellcomeopenresearch.org/articles/4-61/v2/xml + https://wellcomeopenresearch.org/articles/4-62/v1/xml + https://wellcomeopenresearch.org/articles/4-62/v2/xml + https://wellcomeopenresearch.org/articles/4-63/v1/xml + https://wellcomeopenresearch.org/articles/4-64/v1/xml + https://wellcomeopenresearch.org/articles/4-64/v2/xml + https://wellcomeopenresearch.org/articles/4-65/v1/xml + https://wellcomeopenresearch.org/articles/4-65/v2/xml + https://wellcomeopenresearch.org/articles/4-66/v1/xml + https://wellcomeopenresearch.org/articles/4-66/v2/xml + https://wellcomeopenresearch.org/articles/4-67/v1/xml + https://wellcomeopenresearch.org/articles/4-67/v2/xml + https://wellcomeopenresearch.org/articles/4-68/v1/xml + https://wellcomeopenresearch.org/articles/4-68/v2/xml + https://wellcomeopenresearch.org/articles/4-69/v1/xml + https://wellcomeopenresearch.org/articles/4-7/v1/xml + https://wellcomeopenresearch.org/articles/4-70/v1/xml + https://wellcomeopenresearch.org/articles/4-71/v1/xml + https://wellcomeopenresearch.org/articles/4-72/v1/xml + https://wellcomeopenresearch.org/articles/4-73/v1/xml + https://wellcomeopenresearch.org/articles/4-74/v1/xml + https://wellcomeopenresearch.org/articles/4-75/v1/xml + https://wellcomeopenresearch.org/articles/4-75/v2/xml + https://wellcomeopenresearch.org/articles/4-76/v1/xml + https://wellcomeopenresearch.org/articles/4-76/v2/xml + https://wellcomeopenresearch.org/articles/4-77/v1/xml + https://wellcomeopenresearch.org/articles/4-77/v2/xml + https://wellcomeopenresearch.org/articles/4-78/v1/xml + https://wellcomeopenresearch.org/articles/4-79/v1/xml + https://wellcomeopenresearch.org/articles/4-8/v1/xml + https://wellcomeopenresearch.org/articles/4-80/v1/xml + https://wellcomeopenresearch.org/articles/4-81/v1/xml + https://wellcomeopenresearch.org/articles/4-82/v1/xml + https://wellcomeopenresearch.org/articles/4-83/v1/xml + https://wellcomeopenresearch.org/articles/4-84/v1/xml + https://wellcomeopenresearch.org/articles/4-84/v2/xml + https://wellcomeopenresearch.org/articles/4-85/v1/xml + https://wellcomeopenresearch.org/articles/4-86/v1/xml + https://wellcomeopenresearch.org/articles/4-87/v1/xml + https://wellcomeopenresearch.org/articles/4-87/v2/xml + https://wellcomeopenresearch.org/articles/4-88/v1/xml + https://wellcomeopenresearch.org/articles/4-89/v1/xml + https://wellcomeopenresearch.org/articles/4-9/v1/xml + https://wellcomeopenresearch.org/articles/4-90/v1/xml + https://wellcomeopenresearch.org/articles/4-91/v1/xml + https://wellcomeopenresearch.org/articles/4-92/v1/xml + https://wellcomeopenresearch.org/articles/4-93/v1/xml + https://wellcomeopenresearch.org/articles/4-94/v1/xml + https://wellcomeopenresearch.org/articles/4-95/v1/xml + https://wellcomeopenresearch.org/articles/4-96/v1/xml + https://wellcomeopenresearch.org/articles/4-97/v1/xml + https://wellcomeopenresearch.org/articles/4-98/v1/xml + https://wellcomeopenresearch.org/articles/4-99/v1/xml + https://wellcomeopenresearch.org/articles/4-99/v2/xml + + +for $x in $list//*:item +let $txt := fetch:text($x/text()) +let $name := replace(concat('wellcomeopenresearch','-',substring-before(substring-after($x,'/articles/'),'/xml'),'.xml'),'/','-') +let $file-path := concat('/Users/fredatherden/Documents/f1000-xml/',$name) + +return +if ($txt = '') then () +else +let $xml := fetch:xml($x/text()) +return file:write($file-path,$xml) + diff --git a/find-articles-with-book-ref.xq b/find-articles-with-book-ref.xq new file mode 100644 index 0000000..0883108 --- /dev/null +++ b/find-articles-with-book-ref.xq @@ -0,0 +1,2 @@ +distinct-values(for $x in collection('articles')//*:article[descendant::*:element-citation[@publication-type="book"]] +return $x//*:article-id[@pub-id-type="publisher-id"]/text()) \ No newline at end of file diff --git a/find-equal-authors.xq b/find-equal-authors.xq new file mode 100644 index 0000000..470657a --- /dev/null +++ b/find-equal-authors.xq @@ -0,0 +1,14 @@ +distinct-values( + for $x in collection('articles')//*:article + let $authors := $x//*:article-meta//*:contrib-group[not(@*)] + let $count := count($authors/*:contrib) + let $eq-count := count($authors/*:contrib[@equal-contrib='yes']) + let $auth1 := $authors/*:contrib[1] + let $auth2 := $authors/*:contrib[2] + let $auth3 := $authors/*:contrib[3] + let $auth4 := $authors/*:contrib[4] + return + if ($count < 3) then () + else if ($auth1[@equal-contrib='yes'] and $auth2[@equal-contrib='yes'] and $auth3[@equal-contrib='yes']) then substring-before($x/base-uri(),'-v') + else () +) \ No newline at end of file diff --git a/find-fundref.xq b/find-fundref.xq new file mode 100644 index 0000000..9859aac --- /dev/null +++ b/find-fundref.xq @@ -0,0 +1,2 @@ +distinct-values(for $x in collection('articles')//*:article//*:funding-group//*:award-group[descendant::*:institution = 'Seventh Framework Programme'] +return $x//*:institution-id/text()) \ No newline at end of file diff --git a/find-numerous-versions.xq b/find-numerous-versions.xq new file mode 100644 index 0000000..ca14b45 --- /dev/null +++ b/find-numerous-versions.xq @@ -0,0 +1,13 @@ +let $list := +{ +for $x in collection('articles')//*:article +let $no := $x//*:article-meta/*:article-id[@pub-id-type="publisher-id"]/data() +let $doi := ('http://doi.org/'||$x//*:article-meta/*:article-id[@pub-id-type="doi"]/data()) +return {$x//*:article-meta//*:article-title} +} + +for $x in $list//*:item +let $no := $x/@no +order by $no +return if (count($x/preceding::*:item[@no=$no])>3) then $x +else () \ No newline at end of file diff --git a/find-unique-atts.xq b/find-unique-atts.xq new file mode 100644 index 0000000..1a8aa51 --- /dev/null +++ b/find-unique-atts.xq @@ -0,0 +1,19 @@ +let $base := '/Users/fredatherden/Desktop/lists/' +let $ijm := doc(concat($base,'ijm-att-list.xml'))/*:list + +let $elife := doc(concat($base,'elife-att-list.xml'))/*:list +let $biorxiv := doc(concat($base,'biorxiv-att-list.xml'))/*:list +let $wellcome := doc(concat($base,'wellcome-att-list.xml'))/*:list +let $gates := doc(concat($base,'gates-att-list.xml'))/*:list +let $f1000 := doc(concat($base,'f1000-att-list.xml'))/*:list + +for $x in $biorxiv//*:attribute +let $t := $x/text() +return +if ($t = $ijm//*:attribute/text()) then () +else if ($t = $wellcome//*:attribute/text()) then () +else if ($t = $gates//*:attribute/text()) then () +else if ($t = $f1000//*:attribute/text()) then () +else $x + + diff --git a/find-xml-from-urls.xq b/find-xml-from-urls.xq new file mode 100644 index 0000000..bfa4296 --- /dev/null +++ b/find-xml-from-urls.xq @@ -0,0 +1,12 @@ +let $list := doc('/Users/fredatherden/Desktop/list.xml') + +for $x in $list//*:item +let $url := concat('https://gatesopenresearch.org/articles/3-',$x/text(),'/v1/xml') +let $type := fetch:content-type($url) + +let $name := concat('gatesopenresearch','-',concat('3-',$x/text()),'.xml') +let $file-path := concat('/Users/fredatherden/Documents/gates-xml/',$name) + +return +if (substring-before($type,';') = 'application/xml') then $url +else () \ No newline at end of file diff --git a/first-author-check.xq b/first-author-check.xq new file mode 100644 index 0000000..835267a --- /dev/null +++ b/first-author-check.xq @@ -0,0 +1,5 @@ +distinct-values(for $x in collection('articles')//*:article +let $c := $x//*:article-meta/*:contrib-group[not(@*)][1]/*:contrib[1] +return +if (matches($c,'Seidel')) then $x//article-id[@pub-id-type="publisher-id"]/text() +else ()) \ No newline at end of file diff --git a/funders-not-in-author-list.xq b/funders-not-in-author-list.xq new file mode 100644 index 0000000..a2f633e --- /dev/null +++ b/funders-not-in-author-list.xq @@ -0,0 +1,28 @@ +declare function local:translate($input) +{ + replace(replace(translate($input,'àáâãäåçčèéêěëħìíîïłñňòóôõöőøřšśşùúûüýÿž','aaaaaacceeeeehiiiilnnooooooorsssuuuuyyz'),'æ','ae'),'ß','ss') + +}; + +for $x in collection('articles')//*:article + + +let $a-list := { + for $y in $x//*:article-meta//*:contrib[@contrib-type="author"] + return + for $c in $y//*:surname + return {local:translate(lower-case($c))} +} + + +let $f-list := { + for $f in $x//*:article-meta/*:funding-group//*:surname + return {local:translate(lower-case($f))} +} + +return + for $z in $f-list//*:item + return + if (not($a-list//*:item)) then () + else if ($z = $a-list//*:item) then () + else $x/base-uri() \ No newline at end of file diff --git a/gene-sequence.xq b/gene-sequence.xq new file mode 100644 index 0000000..5332b80 --- /dev/null +++ b/gene-sequence.xq @@ -0,0 +1,2 @@ +for $x in collection('articles')//*:article[descendant::*:p//named-content[@content-type="sequence"]] +return $x//article-id[@pub-id-type="publisher-id"] \ No newline at end of file diff --git a/generate-manifest.xq b/generate-manifest.xq new file mode 100644 index 0000000..c9d7c16 --- /dev/null +++ b/generate-manifest.xq @@ -0,0 +1,23 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; + +let $file-loc := '/Users/fredatherden/Desktop/elife-52628-vor-r1/elife-52628.xml' +let $filename := tokenize($file-loc,'/')[last()] +let $file := doc($file-loc) + +let $manifest := + + + + + {( + for $asset in $file//(*:fig|*:supplementary-material|*:media[@mimemtype="video"]) + let $name := $asset/name() + return + if ($name='fig') then + else if ($name='supplementary-material') then + else + )} + + + +return $manifest \ No newline at end of file diff --git a/get-all-ref-links.xq b/get-all-ref-links.xq new file mode 100644 index 0000000..d465fb1 --- /dev/null +++ b/get-all-ref-links.xq @@ -0,0 +1,32 @@ +let $xml := doc('/Users/fredatherden/Documents/GitHub/reference-manuscripts/manuscripts/00002/elife-00002.xml') + +for $x in $xml//*:ref +let $year := $x/descendant::*:year[1] +let $cite := + if ((count($year/ancestor::element-citation/person-group[1]/*) = 1) and $year/ancestor::element-citation/person-group[1]/name) + then concat($year/ancestor::element-citation/person-group[1]/name/surname,', ',$year) + +else if ((count($year/ancestor::element-citation/person-group[1]/*) = 1) and $year/ancestor::element-citation/person-group[1]/collab) + then concat($year/ancestor::element-citation/person-group[1]/collab,', ',$year) + +else if ((count($year/ancestor::element-citation/person-group[1]/*) = 2) and (count($year/ancestor::element-citation/person-group[1]/name) = 1) and $year/ancestor::element-citation/person-group[1]/*[1]/local-name() = 'collab') + then concat($year/ancestor::element-citation/person-group[1]/collab,' and ',$year/ancestor::element-citation/person-group[1]/name/surname,', ',$year) + +else if ((count($year/ancestor::element-citation/person-group[1]/*) = 2) and (count($year/ancestor::element-citation/person-group[1]/name) = 1) and $year/ancestor::element-citation/person-group[1]/*[1]/local-name() = 'name') + then concat($year/ancestor::element-citation/person-group[1]/name/surname,' and ',$year/ancestor::element-citation/person-group[1]/collab,', ',$year) + +else if ((count($year/ancestor::element-citation/person-group[1]/*) = 2) and (count($year/ancestor::element-citation/person-group[1]/name) = 2)) + then concat($year/ancestor::element-citation/person-group[1]/name[1]/surname,' and ',$year/ancestor::element-citation/person-group[1]/name[2]/surname,', ',$year) + +else if ((count($year/ancestor::element-citation/person-group[1]/*) = 2) and (count($year/ancestor::element-citation/person-group[1]/collab) = 2)) + then concat($year/ancestor::element-citation/person-group[1]/collab[1],' and ',$year/ancestor::element-citation/person-group[1]/collab[2],', ',$year) + +else if ((count($year/ancestor::element-citation/person-group[1]/*) ge 2) and $year/ancestor::element-citation/person-group[1]/*[1]/local-name() = 'collab') + then concat($year/ancestor::element-citation/person-group[1]/collab[1], ' et al., ',$year) + +else if ((count($year/ancestor::element-citation/person-group[1]/*) ge 2) and $year/ancestor::element-citation/person-group[1]/*[1]/local-name() = 'name') + then concat($year/ancestor::element-citation/person-group[1]/name[1]/surname, ' et al., ',$year) + + else () + + return {$cite} \ No newline at end of file diff --git a/get-formatting-elements.xq b/get-formatting-elements.xq new file mode 100644 index 0000000..dc610b7 --- /dev/null +++ b/get-formatting-elements.xq @@ -0,0 +1,9 @@ +let $formatting := ('bold','fixed-case','italic','monospace','overline','overline-start','overline-end','roman','sans-serif','sc','strike','underline','underline-start','underline-end','ruby','sub','sup') + +return distinct-values( + for $x in collection('f1000')//* + let $name := $x/name() + return + if ($name = $formatting) then $name + else () +) \ No newline at end of file diff --git a/group-authors.xq b/group-authors.xq new file mode 100644 index 0000000..b760ae4 --- /dev/null +++ b/group-authors.xq @@ -0,0 +1,11 @@ +distinct-values(for $x in collection('articles')//*:article + let $m := $x//*:article-meta + let $id:= $x//*:article-id[@pub-id-type="publisher-id"] + return + for $y in $m//*:contrib + return + if (matches($y,'[Rr]eproducibility [Pp]roject')) then () + else if ($y/*:collab) then $id + else if ($y//*:contrib) then $id + else () + ) \ No newline at end of file diff --git a/hindawi-manipulation.xq b/hindawi-manipulation.xq new file mode 100644 index 0000000..ac5879a --- /dev/null +++ b/hindawi-manipulation.xq @@ -0,0 +1,33 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; +declare namespace mml="http://www.w3.org/1998/Math/MathML"; + +declare variable $filename := '8093192.xml'; +declare variable $dir := '/Users/fredatherden/Desktop/'; +declare variable $file := doc(concat('/Users/fredatherden/Desktop/CRID_8093192_Final_1 copy/',$filename)); + + +for $x in $file//*:article +let $y := + +copy $copy := $x +modify( + + for $x in $copy//*:fig + let $label := if (ends-with($x/*:label,'.')) then $x/*:label/text() + else concat($x/*:label,'. ') + return + replace node $x with + + + {$label, + $x/*:caption/*:p/(*|text())} + + + + + +) +return $copy + + +return file:write(concat($dir,$filename),$y, map {'indent':'no'}) \ No newline at end of file diff --git a/hindawi-simple-content.xq b/hindawi-simple-content.xq new file mode 100644 index 0000000..5475ab5 --- /dev/null +++ b/hindawi-simple-content.xq @@ -0,0 +1,11 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; +declare namespace mml="http://www.w3.org/1998/Math/MathML"; + +for $x in collection('hindawi-xml')//*:article[not(descendant::table-wrap) and (count(descendant::*:fig-group) le 2)] +let $c := count($x//*:article-meta/*:contrib-group[not(@*)]/*:contrib) +let $a := count($x//*:article-meta/*:contrib-group[not(@*)]/*:aff) +return +if ($c ge 8) then () +else if ($a ge 3) then () +else if ($x//*:fig[descendant::*:supplementary-material]) then () +else $x//*:article-id[@pub-id-type="publisher-id"]/text() diff --git a/html2markdown.xq b/html2markdown.xq new file mode 100644 index 0000000..b8e6a25 --- /dev/null +++ b/html2markdown.xq @@ -0,0 +1,113 @@ +declare function local:ul-list($ul){ + { + for $x in $ul//*:li + let $c := count($x/ancestor::*:ul) + let $y := count($x/following-sibling::*:li) + return + if ($c = 1) then + if ($y=0) then concat('- ',$x/data()) + else concat('- ',$x/data(),' ') + else if ($c = 2) then concat(' - ',$x/data(),' ') + else if ($c = 3) then concat(' - ',$x/data(),' ') + else if ($c = 4) then concat(' - ',$x/data(),' ') + else concat(' - ',$x/data(),' +') + } + +}; + +declare function local:ol-list($ol){ + { + for $x in $ol//*:li + let $pos := string(count($x/preceding-sibling::*:li) + 1) + return + if ($x/following-sibling::*:li) then concat($pos,'. ',$x/data(),' ') + else concat ($pos,'. ',$x/data()) + } +}; + +declare function local:edit-issue($issue){ + copy $copy := $issue + modify( + for $x in $copy//*:div[@class="comment"] + let $c := count($x/preceding-sibling::*:div[@class="comment"]) + return + if ($c = 0) then () + else delete node $x, + + for $x in $copy//*:pre + return replace node $x with $x/(*|text()), + + for $x in $copy//*:div[@class="body"] + let $url := $x/ancestor::*:div[@class="container"]//*:header//*:span[@class="url"]//*:a/@href/string() + return insert node

{concat('Taken from: ',$url)}

as last into $x, + + for $x in $copy//*:h3[parent::*:li] + return + (delete node $x/parent::li, + insert node $x before $x/ancestor::*:ul) + ) + return copy $copy2 := $copy + modify( + for $x in $copy2/*:header + return delete node $x, + + for $x in $copy2//*:div[@class="meta"] + return delete node $x, + + for $x in $copy2//*:div[@class="body"]/*:ul + let $pos := count($x/preceding-sibling::*:ul) + return + if ($pos=0) then delete node $x + else replace node $x with local:ul-list($x), + + for $x in $copy2//*:div[@class="body"]/*:ol + return replace node $x with local:ol-list($x), + + for $x in $copy2//*:code + return + if ($x/@class="lang-xml") then replace node $x with {concat('```xml + ',$x/data(),' ```')} + else replace node $x with concat('`',$x/data(),'`'), + + for $x in $copy2//*:a + return replace node $x with {concat('[',$x/data(),']','(',$x/@href/string(),')')}, + + for $x in $copy2//*:h2 + return replace node $x with {concat('## ',$x/data())}, + + for $x in $copy2//*:h3 + return replace node $x with {concat('### ',$x/data())}, + + for $x in $copy2//*:h4 + return replace node $x with {concat('#### ',$x/data())}, + + for $x in $copy2//*:h5 + return replace node $x with {concat('##### ',$x/data())} + + ) + return copy $copy3 := $copy2 + modify( + + for $x in $copy3//*:div[@class="body"]/text()[1] + return delete node $x, + + for $x in $copy3//(*:p|*:placeholder) + return replace node $x with $x/text(), + + for $x in $copy3//*:div[@class="body"]/descendant::p[last()]/preceding-sibling::text()[1] + return replace node $x with ' ' + + ) + return $copy3//*:div[@class="body"]/text() +}; + + +for $x in collection('issue-test')/*:html//*:div[@class="container"] +let $name := $x/ancestor::body//*:h1/text() +let $filename := concat(substring-before(substring-after($x/base-uri(),'/issue-test/'),'html'),'md') +let $ticket := (concat($name,' '), + local:edit-issue($x)) +return +file:write(concat('/Users/fredatherden/Desktop/issue-test/',$filename),$ticket,map{'method':'text','indent':'no'}) + diff --git a/human-animal-ethics.xq b/human-animal-ethics.xq new file mode 100644 index 0000000..96a8ac6 --- /dev/null +++ b/human-animal-ethics.xq @@ -0,0 +1,6 @@ +distinct-values(for $x in collection('articles')//*:article[descendant::*:fn-group[@content-type="ethics-information"]] +let $fn := $x//*:fn-group[@content-type="ethics-information"] +let $d := $fn/data() +return if (contains($d,'Human subjects:') and contains($d,'Animal experimentation:') ) + then $x//article-id[@pub-id-type="publisher-id"]/text() + else ()) \ No newline at end of file diff --git a/ijm-batch-validate.xq b/ijm-batch-validate.xq new file mode 100644 index 0000000..7034c4d --- /dev/null +++ b/ijm-batch-validate.xq @@ -0,0 +1,12 @@ +import module namespace schematron = "http://github.com/Schematron/schematron-basex"; + +declare variable $sch := schematron:compile(doc('/Users/fredatherden/Documents/GitHub/jats-support-2/src/support.sch')); + +for $x in collection('ijm')//*:article +let $svrl := schematron:validate($x, $sch) +let $ids := ('table_parent-assert-1','table-assert-1','table-wrap-assert-1','tbody_parent-assert-1','td_child-assert-1','th_child-assert-1','thead_parent-assert-1','tr_parent-assert-1') +return +{ + if ($svrl//(*:successful-report[@id=$ids]|*:failed-assert[@id=$ids])) then $svrl//(*:successful-report[@id=$ids]|*:failed-assert[@id=$ids]) + else ()} + \ No newline at end of file diff --git a/ijm-simple-content.xq b/ijm-simple-content.xq new file mode 100644 index 0000000..69bea35 --- /dev/null +++ b/ijm-simple-content.xq @@ -0,0 +1,12 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; +declare namespace mml="http://www.w3.org/1998/Math/MathML"; + +for $x in collection('ijm-xml')//*:article[@article-type="research-article" and descendant::*:body and not(descendant::*:media[@mimetype="video"]) and not(descendant::mml:math) and not(descendant::table-wrap) and not(descendant::fig-group) and not(descendant::disp-quote)] +let $c := count($x//*:article-meta/*:contrib-group[not(@*)]/*:contrib) +let $a := count($x//*:article-meta/*:contrib-group[not(@*)]/*:aff) +return +if ($c ge 8) then () +else if ($a ge 3) then () +else if ($x//*:fig[descendant::*:supplementary-material]) then () +else if ($x//*:sec[child::*:label]) then () +else $x//*:article-id[@pub-id-type="publisher-id"]/text() diff --git a/ijm-v-elife-elems.xq b/ijm-v-elife-elems.xq new file mode 100644 index 0000000..557edd8 --- /dev/null +++ b/ijm-v-elife-elems.xq @@ -0,0 +1,278 @@ +let $e-list := + +front +journal-meta +journal-id +journal-title-group +journal-title +issn +publisher +publisher-name +article-meta +article-id +article-categories +subj-group +subject +title-group +article-title +contrib-group +contrib +name +surname +given-names +xref +contrib-id +email +aff +label +institution +addr-line +named-content +country +role +author-notes +fn +p +pub-date +day +month +year +volume +elocation-id +history +date +permissions +copyright-statement +copyright-year +copyright-holder +free_to_read +license +license_ref +license-p +ext-link +self-uri +abstract +object-id +bold +title +kwd-group +kwd +funding-group +award-group +funding-source +institution-wrap +institution-id +award-id +principal-award-recipient +funding-statement +custom-meta-group +custom-meta +meta-name +meta-value +body +sec +italic +fig-group +fig +caption +graphic +sup +table-wrap +table +thead +tr +th +tbody +td +table-wrap-foot +supplementary-material +media +break +sub +back +ack +fn-group +element-citation +person-group +data-title +source +pub-id +ref-list +ref +fpage +lpage +collab +sub-article +front-stub +boxed-text +disp-quote +corresp +comment +disp-formula +math +inline-formula +publisher-loc +edition +chapter-title +conf-name +conf-loc +bio +inline-graphic +suffix +sc +related-article +underline +date-in-citation +version +app-group +app +patent +monospace +list +list-item +code +related-object +styled-content +strike +attrib + +let $i-list := front +journal-meta +journal-id +journal-title-group +journal-title +issn +publisher +publisher-name +article-meta +article-id +article-categories +subj-group +subject +title-group +article-title +contrib-group +contrib +name +surname +given-names +email +xref +aff +label +institution +addr-line +country +pub-date +day +month +year +volume +issue +fpage +lpage +permissions +copyright-statement +copyright-year +copyright-holder +free_to_read +license +license_ref +license-p +ext-link +self-uri +body +sec +title +p +italic +fig +caption +graphic +back +ref-list +ref +element-citation +person-group +source +date-in-citation +publisher-loc +ack +author-notes +fn +target +sup +sub +fn-group +abstract +kwd-group +kwd +disp-formula +math +table-wrap +table +tbody +tr +td +thead +th +break +bold +string-name +string-date +comment +chapter-title +edition +collab +app-group +app +list +list-item +named-content +corresp +etal +version +suffix +elocation-id +disp-quote +series +conf-name +conf-loc +conf-date +table-wrap-foot +product +isbn +price +inline-formula +code +boxed-text +sc +monospace +x +season +role +fig-group +def-list +def-item +term +def +underline +conf-sponsor +phone +fax +uri +conf-data +subtitle +mixed-citation +pub-id +glossary +array +colgroup +col +statement +attrib +table-wrap-group + +for $x in $i-list//*:item +return if ($x = $e-list//*:item) then () +else $x \ No newline at end of file diff --git a/inline-tables.xq b/inline-tables.xq new file mode 100644 index 0000000..f83c5c2 --- /dev/null +++ b/inline-tables.xq @@ -0,0 +1,8 @@ + +{for $x in collection('articles')//*:article +let $id := $x//*:article-id[@pub-id-type="publisher-id"] +let $type := $x/@article-type +let $subj := $x//*:subj-group[@subj-group-type="display-channel"]/*:subject +return if ($x//*:table-wrap[not(child::*:label)]) then () +else () +} \ No newline at end of file diff --git a/insert-pmid-links.xq b/insert-pmid-links.xq new file mode 100644 index 0000000..6c1f444 --- /dev/null +++ b/insert-pmid-links.xq @@ -0,0 +1,18 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; + + +let $file := doc('/Users/fredatherden/Documents/GitHub/XML-mapping/elife-00666.xml') + +for $x in $file +let $c := copy $copy := $file +modify( + for $y in $copy//*:table-wrap[@id="keyresource"]//*:td[matches(.,'PMID:')] + let $id := substring-after($y,'PMID:') + let $url := concat('https://www.ncbi.nlm.nih.gov/pubmed/',$id) + return + replace node $y with PMID:{$id} + +) +return $copy + +return file:write('/Users/fredatherden/Desktop/elife-00666.xml',$c,map{'indent':'no'}) \ No newline at end of file diff --git a/latest-version.xq b/latest-version.xq new file mode 100644 index 0000000..015f774 --- /dev/null +++ b/latest-version.xq @@ -0,0 +1,14 @@ +let $list-1 := { + for $x in collection('articles')//*:article + let $b := $x/base-uri() + order by $b + return {$b} + } + +return ( + for $x in $list-1/*:item + let $id := substring-before(substring-after($x,'/articles/elife-'),'-v') + return + if (substring-before(substring-after($x/following-sibling::*:item[1],'/articles/elife-'),'-v') = $id) then () + else $x/string() +) \ No newline at end of file diff --git a/libero-edits.xq b/libero-edits.xq new file mode 100644 index 0000000..af2ee51 --- /dev/null +++ b/libero-edits.xq @@ -0,0 +1,20 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; +declare namespace mml="http://www.w3.org/1998/Math/MathML"; + +declare variable $dir := '/Users/fredatherden/Desktop/edits-done/'; + +for $x in collection('edits')//*:article +let $filename := substring-after($x/base-uri(),'/edits/') +let $y := + +copy $copy := $x +modify( + + for $y in $copy//*:article-meta//*:abstract + return (insert node Abstract{$y/*} as first into $y/following::body[1], + delete node $y) + +) +return $copy + +return file:write(concat($dir,$filename),$y, map {'indent':'no'}) \ No newline at end of file diff --git a/libero-manipulation.xq b/libero-manipulation.xq new file mode 100644 index 0000000..0d6fa14 --- /dev/null +++ b/libero-manipulation.xq @@ -0,0 +1,34 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; +declare namespace mml="http://www.w3.org/1998/Math/MathML"; + +declare variable $filename := 'elife-25480.xml'; +declare variable $dir := '/Users/fredatherden/Desktop/'; +declare variable $file := doc(concat('/Users/fredatherden/Desktop/elife-25480-vor-r1/',$filename)); + + +for $x in $file//*:article +let $y := + +copy $copy := $x +modify( + + for $x in $copy//*:ack + return (insert node {$x/*} as last into $x/preceding::body, + delete node $x), + + for $x in $copy//*:label + return + if ($x/parent::*:aff) then () + else if ($x/parent::*:fig) then + insert node concat($x/text(),' ') as first into $x/following-sibling::caption[1]/*:title + else if ($x/parent::*:sec) then + insert node concat($x/text(),' ') as first into $x/following-sibling::*:title[1] + else if ($x/parent::*:fn) then + insert node concat($x/text(),' ') as first into $x/following-sibling::p[1] + else () + +) +return $copy + + +return file:write(concat($dir,$filename),$y, map {'indent':'no'}) \ No newline at end of file diff --git a/libero-publisher/article-categories.xq b/libero-publisher/article-categories.xq new file mode 100644 index 0000000..7fe25c9 --- /dev/null +++ b/libero-publisher/article-categories.xq @@ -0,0 +1,4 @@ +count(for $x in (collection('pmc1')//*:article[descendant::*:article-categories[*:subj-group/child::*:subject[2]]], + collection('pmc2')//*:article[descendant::*:article-categories[*:subj-group/child::*:subject[2]]], + collection('pmc3')//*:article[descendant::*:article-categories[*:subj-group/child::*:subject[2]]]) +return $x) \ No newline at end of file diff --git a/libero-publisher/change-elife-article-categories.xq b/libero-publisher/change-elife-article-categories.xq new file mode 100644 index 0000000..1273372 --- /dev/null +++ b/libero-publisher/change-elife-article-categories.xq @@ -0,0 +1,18 @@ +declare variable $outputDir := '/Users/fredatherden/Desktop/categories/'; + +for $x in collection('articles')//*:article +let $filename := substring-after($x/base-uri(),'articles/') +let $new := +copy $copy := $x +modify( + for $y in $copy//*:article-meta//*:subj-group[@subj-group-type="heading"]/@subj-group-type + return + replace value of node $y with 'subject', + + for $d in $copy//*:article-meta//*:subj-group[@subj-group-type="display-channel"]/@subj-group-type + return + replace value of node $d with 'heading' +) +return $copy + +return file:write(concat($outputDir,$filename),$new,map{'indent':'no'}) diff --git a/list-all-report-refs.xq b/list-all-report-refs.xq new file mode 100644 index 0000000..1d16e68 --- /dev/null +++ b/list-all-report-refs.xq @@ -0,0 +1,2 @@ +{for $x in collection('articles')//*:article//*:element-citation[@publication-type="report"][*:ext-link] +return $x} \ No newline at end of file diff --git a/mathml2latex.xsl b/mathml2latex.xsl new file mode 100644 index 0000000..accab83 --- /dev/null +++ b/mathml2latex.xsl @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + Presentation MathML + + + + + + + + + + + + + + + +
+ +

+

status:

+ +

Reference image:

+ +
+
+

TeX Rendering:

+ +
+

MathML:

+
+  <![CDATA[
+  
+  ]]>
+ 
+
+
+
+ + +
+ + + bad bvar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/namespaces-in-use.xq b/namespaces-in-use.xq new file mode 100644 index 0000000..77c424d --- /dev/null +++ b/namespaces-in-use.xq @@ -0,0 +1,9 @@ +declare namespace functx = "http://www.functx.com"; +declare function functx:namespaces-in-use + ( $root as node()? ) as xs:anyURI* { + + distinct-values( + $root/descendant-or-self::*/(.|@*)/namespace-uri(.)) + } ; + +collection('ijm-xml')//*:article/functx:namespaces-in-use(.) \ No newline at end of file diff --git a/no-das-pub-date-check.xq b/no-das-pub-date-check.xq new file mode 100644 index 0000000..7a5299a --- /dev/null +++ b/no-das-pub-date-check.xq @@ -0,0 +1,16 @@ +for $x in collection('articles')//*:article[(@article-type="research-article") and *:body and not(descendant::*:sec[@sec-type="data-availability"])] +let $p := $x//*:article-meta//*:pub-date[(@date-type='pub') or (@date-type='publication')] +let $iso-date := concat($p/year,'-',$p/month,'-',$p/day) +let $subj := $x//*:article-meta//*:subj-group[@subj-group-type="display-channel"]/*:subject +order by $iso-date +return +(substring-after($x/base-uri(),'elife-') +|| +' --- ' +|| +$subj +|| +' --- ' +|| +$iso-date +) diff --git a/non-corr-email-2.xq b/non-corr-email-2.xq new file mode 100644 index 0000000..f1c782e --- /dev/null +++ b/non-corr-email-2.xq @@ -0,0 +1,19 @@ +let $list := +{ + for $x in collection('articles')//*:article +let $article-id := $x//*:article-id[@pub-id-type="publisher-id"]/text() +let $folder := concat('/articles/elife-',$article-id,'-v') +let $v-no := number(substring-before(substring-after($x/base-uri(),$folder),'.xml')) +let $count := count(collection('articles')//*:article[descendant::*:article-id[@pub-id-type="publisher-id"]/text() = $article-id]) +return if ($count = $v-no) then +else () +} + +for $x in collection('articles')//*:article +let $b := $x/base-uri() +let $c := count($x//*:contrib-group[not(@content-type="section")]/*:contrib) +return if ($b = $list//*:item/@id) then + if ($c = 1) then () + else if ($x//*:contrib[not(@corresp="yes")and not(descendant::*:xref[@ref-type="corresp"])]//*:email) then $x//article-id[@pub-id-type="publisher-id"]/text() + else () +else () \ No newline at end of file diff --git a/non-corr-email-as-csv.xq b/non-corr-email-as-csv.xq new file mode 100644 index 0000000..66b876f --- /dev/null +++ b/non-corr-email-as-csv.xq @@ -0,0 +1,1819 @@ +let $list := +09693 +12572 +12792 +13546 +15828 +17915 +20178 +21114 +21992 +22199 +22225 +22425 +22599 +22626 +22901 +23279 +23435 +23612 +23625 +23647 +23649 +23708 +23770 +24192 +24196 +24260 +24271 +24340 +24502 +24578 +24656 +24779 +24820 +24994 +25008 +25012 +25060 +25141 +25165 +25197 +25269 +25281 +25301 +25423 +25462 +25496 +25606 +25607 +25726 +25727 +25752 +25784 +25787 +25819 +25843 +25844 +25861 +25884 +25923 +25950 +26002 +26014 +26016 +26022 +26039 +26067 +26106 +26116 +26129 +26148 +26161 +26163 +26231 +26255 +26278 +26280 +26349 +26376 +26423 +26424 +26435 +26439 +26476 +26487 +26517 +26556 +26607 +26642 +26653 +26686 +26693 +26724 +26726 +26738 +26759 +26796 +26832 +26839 +26845 +26851 +26856 +26866 +26876 +26898 +26910 +26944 +26945 +26947 +26952 +26956 +26957 +26973 +26985 +26990 +27000 +27024 +27049 +27057 +27069 +27082 +27119 +27131 +27155 +27157 +27159 +27166 +27167 +27192 +27203 +27215 +27237 +27293 +27344 +27346 +27356 +27362 +27364 +27369 +27388 +27396 +27402 +27417 +27420 +27421 +27430 +27434 +27441 +27443 +27444 +27445 +27451 +27454 +27455 +27469 +27480 +27518 +27529 +27574 +27576 +27592 +27601 +27602 +27679 +27694 +27696 +27701 +27702 +27706 +27713 +27744 +27746 +27793 +27798 +27814 +27819 +27826 +27827 +27842 +27854 +27860 +27861 +27868 +27872 +27873 +27891 +27955 +27991 +27995 +28020 +28023 +28040 +28046 +28070 +28074 +28075 +28081 +28083 +28086 +28111 +28118 +28123 +28132 +28141 +28166 +28197 +28199 +28202 +28270 +28275 +28295 +28298 +28307 +28324 +28329 +28342 +28366 +28377 +28383 +28384 +28387 +28409 +28415 +28477 +28482 +28505 +28507 +28534 +28560 +28563 +28590 +28606 +28619 +28625 +28626 +28629 +28635 +28662 +28671 +28672 +28673 +28680 +28683 +28685 +28716 +28723 +28728 +28751 +28755 +28766 +28768 +28802 +28804 +28811 +28836 +28842 +28844 +28865 +28875 +28877 +28889 +28899 +28909 +28921 +28927 +28932 +28935 +28974 +29002 +29005 +29013 +29023 +29044 +29053 +29061 +29086 +29087 +29088 +29100 +29106 +29112 +29118 +29123 +29132 +29144 +29145 +29150 +29154 +29156 +29176 +29178 +29198 +29213 +29215 +29222 +29224 +29226 +29236 +29276 +29280 +29285 +29292 +29303 +29307 +29312 +29315 +29328 +29329 +29330 +29353 +29365 +29384 +29388 +29391 +29425 +29430 +29494 +29495 +29507 +29510 +29511 +29515 +29518 +29538 +29539 +29546 +29550 +29555 +29566 +29593 +29594 +29595 +29605 +29626 +29630 +29639 +29648 +29677 +29702 +29718 +29736 +29738 +29742 +29744 +29750 +29754 +29793 +29795 +29797 +29808 +29809 +29815 +29820 +29830 +29834 +29845 +29854 +29865 +29878 +29880 +29887 +29893 +29905 +29908 +29913 +29915 +29917 +29929 +29939 +29944 +29953 +29959 +29968 +29988 +29996 +30000 +30015 +30018 +30051 +30054 +30057 +30058 +30084 +30094 +30120 +30126 +30127 +30134 +30135 +30150 +30178 +30187 +30189 +30198 +30201 +30203 +30212 +30224 +30233 +30241 +30244 +30246 +30274 +30278 +30281 +30286 +30292 +30294 +30325 +30333 +30334 +30352 +30373 +30387 +30388 +30391 +30395 +30425 +30433 +30442 +30457 +30463 +30473 +30474 +30483 +30490 +30493 +30496 +30498 +30503 +30506 +30523 +30543 +30552 +30560 +30577 +30590 +30637 +30640 +30647 +30649 +30657 +30668 +30688 +30693 +30697 +30703 +30756 +30760 +30762 +30766 +30789 +30809 +30822 +30839 +30842 +30860 +30862 +30867 +30872 +30881 +30883 +30916 +30918 +30919 +30925 +30927 +30935 +30938 +30947 +30948 +30952 +30955 +30963 +31007 +31012 +31013 +31018 +31019 +31023 +31034 +31035 +31037 +31045 +31050 +31054 +31058 +31065 +31097 +31098 +31101 +31123 +31125 +31126 +31132 +31145 +31149 +31150 +31159 +31176 +31181 +31185 +31186 +31209 +31216 +31220 +31225 +31226 +31234 +31259 +31262 +31268 +31274 +31275 +31295 +31299 +31307 +31311 +31324 +31326 +31334 +31343 +31347 +31362 +31377 +31437 +31469 +31473 +31476 +31481 +31482 +31486 +31502 +31507 +31510 +31511 +31512 +31529 +31535 +31549 +31550 +31557 +31558 +31579 +31596 +31599 +31625 +31628 +31629 +31636 +31640 +31641 +31652 +31656 +31657 +31659 +31661 +31662 +31668 +31670 +31677 +31678 +31683 +31684 +31700 +31706 +31708 +31715 +31723 +31730 +31732 +31745 +31756 +31770 +31804 +31805 +31807 +31812 +31826 +31835 +31867 +31872 +31879 +31895 +31918 +31919 +31924 +31926 +31936 +31949 +31977 +31981 +31989 +31991 +31993 +32018 +32021 +32027 +32032 +32035 +32036 +32041 +32054 +32057 +32058 +32061 +32073 +32077 +32109 +32110 +32111 +32120 +32127 +32137 +32143 +32155 +32167 +32177 +32208 +32222 +32242 +32271 +32273 +32282 +32288 +32293 +32303 +32311 +32319 +32323 +32330 +32332 +32337 +32342 +32346 +32353 +32354 +32358 +32373 +32417 +32418 +32420 +32436 +32451 +32467 +32471 +32478 +32481 +32490 +32496 +32497 +32499 +32506 +32510 +32516 +32517 +32532 +32536 +32537 +32548 +32554 +32563 +32569 +32572 +32579 +32581 +32586 +32587 +32605 +32625 +32637 +32638 +32640 +32657 +32668 +32671 +32679 +32692 +32696 +32697 +32721 +32723 +32724 +32728 +32740 +32742 +32744 +32763 +32764 +32766 +32785 +32794 +32808 +32814 +32816 +32833 +32839 +32847 +32860 +32866 +32871 +32893 +32902 +32904 +32911 +32919 +32920 +32930 +32937 +32942 +32943 +32948 +32952 +32955 +32962 +32963 +32965 +32991 +32992 +33012 +33014 +33033 +33034 +33051 +33052 +33057 +33065 +33067 +33068 +33070 +33084 +33092 +33099 +33101 +33105 +33107 +33111 +33116 +33123 +33140 +33144 +33149 +33150 +33158 +33173 +33178 +33220 +33221 +33246 +33250 +33273 +33274 +33281 +33286 +33292 +33304 +33307 +33309 +33318 +33323 +33331 +33333 +33334 +33354 +33361 +33370 +33385 +33392 +33399 +33402 +33413 +33415 +33417 +33420 +33423 +33432 +33442 +33456 +33465 +33468 +33478 +33480 +33498 +33505 +33506 +33549 +33555 +33569 +33572 +33574 +33660 +33676 +33680 +33684 +33685 +33710 +33718 +33738 +33746 +33761 +33781 +33800 +33843 +33854 +33864 +33892 +33904 +33910 +33920 +33934 +33947 +33953 +33962 +33977 +34025 +34028 +34031 +34032 +34039 +34042 +34044 +34055 +34058 +34062 +34064 +34081 +34085 +34092 +34100 +34110 +34114 +34115 +34122 +34135 +34150 +34152 +34176 +34186 +34226 +34241 +34248 +34252 +34257 +34268 +34271 +34272 +34273 +34275 +34282 +34286 +34292 +34300 +34317 +34323 +34334 +34338 +34354 +34362 +34375 +34389 +34394 +34395 +34408 +34409 +34410 +34414 +34420 +34423 +34460 +34463 +34464 +34465 +34469 +34488 +34497 +34518 +34555 +34572 +34573 +34574 +34586 +34593 +34595 +34613 +34616 +34625 +34655 +34657 +34681 +34695 +34700 +34701 +34702 +34711 +34729 +34752 +34772 +34773 +34779 +34783 +34789 +34793 +34798 +34803 +34815 +34817 +34823 +34829 +34831 +34836 +34843 +34848 +34861 +34864 +34870 +34880 +34902 +34929 +34944 +34955 +34958 +34959 +34960 +34961 +34970 +34976 +34985 +34989 +34995 +34997 +35006 +35012 +35014 +35028 +35032 +35034 +35037 +35069 +35073 +35074 +35082 +35103 +35112 +35122 +35123 +35164 +35176 +35178 +35190 +35192 +35213 +35216 +35222 +35237 +35242 +35255 +35258 +35261 +35264 +35269 +35272 +35314 +35316 +35322 +35330 +35335 +35337 +35368 +35373 +35388 +35407 +35419 +35439 +35447 +35449 +35450 +35458 +35468 +35471 +35478 +35500 +35518 +35524 +35528 +35551 +35560 +35574 +35578 +35587 +35588 +35618 +35619 +35621 +35656 +35657 +35672 +35673 +35676 +35677 +35684 +35690 +35692 +35696 +35710 +35717 +35720 +35731 +35738 +35753 +35755 +35768 +35774 +35783 +35786 +35788 +35796 +35800 +35828 +35850 +35852 +35853 +35854 +35856 +35878 +35886 +35898 +35907 +35946 +35949 +35954 +35960 +35962 +35974 +35977 +35988 +35989 +36018 +36021 +36045 +36068 +36073 +36095 +36097 +36123 +36131 +36144 +36154 +36157 +36158 +36173 +36187 +36194 +36204 +36209 +36217 +36234 +36245 +36246 +36248 +36258 +36262 +36268 +36273 +36275 +36278 +36306 +36307 +36310 +36312 +36316 +36317 +36326 +36330 +36333 +36340 +36341 +36350 +36354 +36362 +36372 +36374 +36375 +36392 +36395 +36398 +36401 +36402 +36405 +36409 +36414 +36419 +36422 +36426 +36428 +36435 +36440 +36460 +36461 +36468 +36478 +36482 +36491 +36493 +36495 +36497 +36520 +36521 +36523 +36530 +36547 +36557 +36559 +36572 +36584 +36588 +36600 +36607 +36608 +36615 +36620 +36645 +36652 +36654 +36656 +36664 +36666 +36688 +36691 +36696 +36697 +36709 +36711 +36717 +36734 +36739 +36741 +36745 +36758 +36764 +36768 +36769 +36774 +36781 +36782 +36806 +36826 +36828 +36833 +36851 +36852 +36853 +36861 +36892 +36898 +36919 +36928 +36931 +36953 +36967 +36979 +36998 +37015 +37018 +37024 +37049 +37059 +37078 +37082 +37084 +37090 +37093 +37105 +37110 +37122 +37125 +37131 +37138 +37139 +37143 +37161 +37166 +37167 +37182 +37184 +37202 +37227 +37231 +37243 +37257 +37262 +37267 +37268 +37271 +37272 +37275 +37294 +37295 +37316 +37321 +37324 +37342 +37344 +37349 +37357 +37373 +37382 +37385 +37388 +37412 +37419 +37420 +37429 +37439 +37443 +37462 +37476 +37503 +37507 +37513 +37516 +37527 +37550 +37551 +37558 +37563 +37567 +37571 +37598 +37606 +37610 +37624 +37625 +37629 +37663 +37673 +37683 +37688 +37701 +37703 +37727 +37750 +37751 +37754 +37762 +37774 +37776 +37798 +37799 +37812 +37813 +37815 +37816 +37818 +37819 +37833 +37836 +37846 +37851 +37854 +37857 +37868 +37880 +37881 +37892 +37912 +37921 +37925 +37927 +37935 +37945 +37949 +37960 +37963 +37993 +38012 +38014 +38017 +38052 +38060 +38062 +38064 +38080 +38090 +38105 +38111 +38113 +38114 +38131 +38137 +38161 +38169 +38173 +38181 +38183 +38187 +38190 +38200 +38215 +38232 +38242 +38268 +38269 +38278 +38281 +38293 +38309 +38314 +38319 +38327 +38337 +38340 +38346 +38356 +38358 +38361 +38362 +38369 +38389 +38393 +38407 +38430 +38433 +38438 +38446 +38465 +38471 +38472 +38493 +38497 +38517 +38519 +38529 +38536 +38539 +38554 +38555 +38579 +38588 +38594 +38611 +38617 +38621 +38631 +38635 +38636 +38667 +38675 +38677 +38683 +38704 +38709 +38740 +38744 +38752 +38770 +38771 +38781 +38790 +38795 +38801 +38818 +38821 +38822 +38827 +38829 +38839 +38844 +38846 +38852 +38853 +38856 +38865 +38867 +38869 +38874 +38880 +38883 +38888 +38892 +38904 +38906 +38907 +38909 +38911 +38922 +38935 +38949 +38958 +38963 +38970 +38976 +38981 +38983 +38992 +39016 +39023 +39028 +39030 +39054 +39061 +39065 +39088 +39111 +39123 +39140 +39151 +39163 +39166 +39180 +39188 +39196 +39209 +39213 +39231 +39234 +39249 +39270 +39273 +39298 +39300 +39304 +39356 +39368 +39381 +39383 +39393 +39399 +39404 +39427 +39435 +39441 +39476 +39494 +39497 +39514 +39518 +39563 +39569 +39595 +39598 +39611 +39633 +39636 +39637 +39648 +39649 +39655 +39656 +39658 +39659 +39681 +39689 +39694 +39695 +39720 +39723 +39729 +39742 +39756 +39780 +39786 +39800 +39813 +39821 +39823 +39842 +39856 +39879 +39887 +39906 +39907 +39911 +39925 +39932 +39939 +39945 +39979 +39981 +39982 +40009 +40014 +40025 +40032 +40033 +40037 +40039 +40042 +40045 +40048 +40063 +40070 +40092 +40093 +40110 +40126 +40167 +40171 +40174 +40179 +40183 +40197 +40199 +40224 +40228 +40231 +40234 +40247 +40251 +40262 +40266 +40292 +40308 +40314 +40325 +40364 +40368 +40372 +40385 +40448 +40470 +40474 +40486 +40487 +40497 +40515 +40520 +40526 +40529 +40532 +40538 +40541 +40553 +40556 +40560 +40583 +40585 +40613 +40618 +40630 +40642 +40664 +40670 +40671 +40675 +40684 +40686 +40690 +40698 +40712 +40750 +40757 +40760 +40765 +40766 +40805 +40806 +40811 +40814 +40815 +40836 +40841 +40843 +40854 +40856 +40868 +40889 +40907 +40919 +40924 +40946 +40947 +40958 +40969 +40970 +40977 +40981 +40982 +40984 +40986 +40988 +41028 +41036 +41038 +41043 +41044 +41050 +41076 +41081 +41090 +41112 +41115 +41129 +41139 +41140 +41152 +41156 +41159 +41162 +41168 +41208 +41215 +41228 +41235 +41237 +41241 +41250 +41258 +41296 +41300 +41301 +41305 +41313 +41328 +41337 +41351 +41362 +41378 +41412 +41415 +41426 +41431 +41439 +41460 +41497 +41535 +41540 +41541 +41542 +41556 +41563 +41574 +41593 +41604 +41637 +41653 +41673 +41690 +41697 +41714 +41720 +41728 +41740 +41741 +41770 +41771 +41792 +41800 +41803 +41841 +41844 +41845 +41848 +41855 +41861 +41873 +41877 +41913 +41927 +41930 +41973 +42001 +42037 +42049 +42057 +42078 +42093 +42101 +42129 +42138 +42143 +42144 +42148 +42150 +42166 +42179 +42182 +42209 +42214 +42223 +42253 +42256 +42270 +42274 +42282 +42298 +42305 +42341 +42372 +42383 +42386 +42388 +42400 +42404 +42409 +42426 +42508 +42513 +42519 +42528 +42543 +42549 +42583 +42591 +42607 +42619 +42627 +42628 +42636 +42650 +42660 +42669 +42670 +42687 +42690 +42692 +42693 +42733 +42736 +42746 +42756 +42761 +42806 +42816 +42837 +42870 +42908 +42914 +42940 +42955 +42974 +42995 +43017 +43019 +43022 +43036 +43045 +43075 +43088 +43101 +43114 +43125 +43128 +43154 +43158 +43186 +43224 +43229 +43230 +43237 +43244 +43271 +43284 +43320 +43322 +43366 +43400 +43434 +43467 +43482 +43487 +43542 +43561 +43584 +43587 +43599 +43621 +43654 +43657 +43676 +43690 +43696 +43788 +43821 +43888 +43983 +44003 +44029 +44036 +44040 +44116 +44158 +44213 +44302 +44341 +44396 +44427 +44431 +44471 +44487 +44491 +44771 +44814 +44851 +45804 + + +let $csv := + +{for $x in collection('articles')//*:article[descendant::*:body] +let $id := $x//*:article-id[@pub-id-type="publisher-id"]/text() +let $d := string-join(for $y in $x//*:pub-date[@date-type="publication"]/* return $y,'-') +return +if (matches($d,'\d')) then + if ($id = $list//*:item/text()) then +{$id}{$d} + else () + else () +} + +let $csv2 := +copy $copy := $csv +modify( +for $x in $copy//*:record +let $id := $x/*:entry[1]/text() +return if ($x/following-sibling::*:record/*:entry[1] = $id) then delete node $x +else ()) +return $copy + +return file:write('/Users/fredatherden/Desktop/non-corr-email.csv',$csv2, map { "method": "csv", "item-separator": "," }) \ No newline at end of file diff --git a/non-corr-email.xq b/non-corr-email.xq new file mode 100644 index 0000000..8b75cee --- /dev/null +++ b/non-corr-email.xq @@ -0,0 +1,6 @@ +distinct-values(for $x in collection('articles')//*:article[descendant::*:body] +let $c := count($x//*:contrib-group[not(@content-type="section")]/*:contrib) +return +if ($c = 1) then () +else if ($x//*:contrib[not(@corresp="yes")and not(descendant::*:xref[@ref-type="corresp"])]//*:email) then $x//article-id[@pub-id-type="publisher-id"]/text() +else ()) \ No newline at end of file diff --git a/non-credit-contributions.xq b/non-credit-contributions.xq new file mode 100644 index 0000000..d35b4a5 --- /dev/null +++ b/non-credit-contributions.xq @@ -0,0 +1,15 @@ +distinct-values(let $regex := 'conceptualization[;,]?|data curation[;,]?|formal analysis[;,]?|funding acquisition[;,]?|investigation[;,]?|methodology[;,]?|project administration[;,]?|resources[;,]?|software[;,]?|supervision[;,]?|validation[;,]?|visualization[;,]?|writing—review and editing[;,]?|writing—original draft[;,]?' + + +for $x in collection('articles')//*:article//*:contrib[@contrib-type="author"] +let $name := concat($x/*:name/*:given-names,' ',$x/*:name/*:surname) +let $doi := $x/ancestor::*:article//*:article-meta//*:article-id[@pub-id-type="doi"]/text() +let $y := $x/*:xref[matches(@rid,'^con[\d]{1,2}$')]/@rid/string() +let $list := {for $z in $x/ancestor::article/descendant::*:fn[@id/string() = $y]/*:p[1] return $z} +return +if ($list = '') then () +else if (matches(lower-case($list/*:p[1]),$regex)) then () +else concat($list/*:p[1]/data(),' ---- ',$name,' ---- ',$doi) + + +) \ No newline at end of file diff --git a/old-elife2dar.xq b/old-elife2dar.xq new file mode 100644 index 0000000..51d54da --- /dev/null +++ b/old-elife2dar.xq @@ -0,0 +1,417 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; +declare namespace mml="http://www.w3.org/1998/Math/MathML"; + +(: +Assumes that the local instance of Texture is running from files in the following directory '/Users/fredatherden/Documents/GitHub/texture/data/kitchen-sink'. +This currently runs on one file (currently 20178-v3), but could be adjusted to run/output numerous files with ease/processing power. + :) + +declare variable $outputDir := '/Users/fredatherden/Documents/GitHub/texture/data/kitchen-sink/manuscript.xml'; + +for $x in collection('articles')//*:article[base-uri() = '/articles/elife-10015-v2.xml'] +let $y := +copy $copy := $x +modify( + for $a in $copy//*:sub-article + return delete node $a, + + for $y in $copy//*:back/*:ack + return (delete node $y, + insert node {$y/*} as last into $y/preceding::*:body), + + for $z in $copy//*:article-meta/*:author-notes + return delete node $z, + + for $s in $copy//*:sec[@sec-type="additional-information"]/*:fn-group + return delete node $s, + + for $s in $copy//*:back/*:fn-group + return delete node $s, + + for $x in $copy//*:front//*:xref[@ref-type="fn"] + return delete node $x, + + for $e in $copy//*:object-id + return delete node $e, + + for $d in $copy//*:funding-group/*:funding-statement + return delete node $d, + + for $t in $copy//*:kwd-group/*:title + return delete node $t, + + for $r in $copy//*:ref-list[*:title = 'Acknowledgements'] + return delete node $r, + + for $f in $copy//*:collab[not(descendant::*)] + return delete node $f, + + for $x in $copy//*:article-meta + let $count := count($x/contrib-group[@content-type="section"]) + return if ($count > 1) then + (insert node {for $c in $x/*:contrib-group[@content-type="section"] return $c/*} after $x/*:contrib-group[not(@*)], + for $c in $x/*:contrib-group[@content-type="section"] return delete node $c) + else (), + +for $x in $copy//*:supplementary-material +let $m := $x/*:media +let $ms := $m/@mime-subtype +let $mt := $m/@mimetype +let $xl := $m/@xlink:href +return (insert node attribute mime-subtype {$ms} into $x, + insert node attribute mimetype {$mt} into $x, + insert node attribute xlink:href {$xl} into $x, + delete node $m), + + for $f in $copy//*:related-article + return delete node $f, + + for $f in $copy//*:related-object + return delete node $f, + + for $x in $copy//*:p//*:disp-formula + return + if ($x/ancestor::caption) then delete node $x + else if ($x/ancestor::list/ancestor::*:p) then + (insert node $x after $x/ancestor::*:list/ancestor::*:p, + delete node $x) + else if ($x/ancestor::list) then + (insert node $x after $x/ancestor::*:list[1], + delete node $x) + else (insert node $x after $x/ancestor::*:p[1], + delete node $x), + + for $o in $copy//*:abstract[@abstract-type="executive-summary"] + return delete node $o, + + for $x in $copy//*:element-citation//*:xref + return delete node $x, + + for $x in $copy//*:fig/*:attrib + return delete node $x, + + for $x in $copy//*:body + return + if ($x/following-sibling::*:back) then () + else insert node after $x, + + for $i in $copy//*:table-wrap[count(descendant::*:table)>1] + return (delete node $i, + for $t in $i//*:table + let $count := count($i/descendant::*:table) + let $pos := $count - count($t/following-sibling::*:table) + return + if ($pos = 1) then insert node {$i/*:label}{$t} after $i + else insert node {$t} after $i), + + for $x in $copy//*:fig/*:graphic + let $count := count($x/ancestor::*:article//*:fig) + let $pos := $count - count($x/following::*:fig) + return + if (($pos mod 4) = 0) then replace node $x with + else if (($pos mod 3) = 0) then replace node $x with + else if (($pos mod 2) = 0) then replace node $x with + else replace node $x with + +) +return +copy $copy2 := $copy +modify( +for $x in $copy2//*:addr-line[*:named-content] +return replace node $x with {$x/(*:named-content/*|*:named-content/text())}, + +for $x in $copy2//*:back/*:sec + return if ($x/@sec-type="additional-information" and $x/preceding::*:body) then (insert node $x as last into $x/preceding::*:body, delete node $x) + else if ($x/@sec-type="supplementary-material" and $x/preceding::*:body) then (insert node $x as last into $x/preceding::*:body, delete node $x) + else delete node $x, + + for $x in $copy2//*:underline/*:named-content[@content-type="sequence"] + return replace node $x with $x/(text()|*), + + for $x in $copy2//*:fn-group[@content-type="author-contribution"] + return delete node $x, + + for $x in $copy2//*:table-wrap-foot/*:fn + return replace node $x with {$x}, + + for $x in $copy2//*:styled-content + return delete node $x, + + for $x in $copy2//*:p//*:list + return (delete node $x, insert node $x after $x/ancestor::*:p[position() = last()]), + + for $x in $copy2//*:code + let $c := $x/data() + return + if (count($x/parent::*:p/child::*) = 1) then replace node $x/parent::*:p with {$c} + else replace node $x with {$c}, + + for $x in $copy2//*:article-meta/*:contrib-group[@content-type="section"]/following-sibling::*:contrib-group + return delete node $x, + + for $x in $copy2//*:app//*:sec[@sec-type="appendix"] + return delete node $x/@sec-type, + + for $x in $copy2//*:article-meta/*:contrib-group/*:contrib[not(child::*:name)] + return if ($x//*:contrib-group) then delete node $x + else insert node Placeholder as first into $x, + + for $x in $copy2//(*:td|*:th)/*:p + return replace node $x with $x/(*|text()) + ) +return +copy $copy3 := $copy2 +modify( + + for $x in $copy3//*:contrib-group[@content-type="section"]/*//*:aff + let $id := replace(generate-id($x),'id','aff') + return (replace node $x with , insert node {$x/*} after $x/ancestor::*:contrib-group), + + for $x in $copy3//*:contrib-group[not(@content-type="section")]/*:aff + return (insert node $x after $x/parent::*:contrib-group, delete node $x), + + for $x in $copy3//*:contrib-group[@content-type="section"]/*:aff + let $id := replace(generate-id($x),'id','aff') + return ( + delete node $x, + for $y in $x/preceding-sibling::*:contrib return insert node as last into $y, + insert node {$x/*} after $x/ancestor::*:contrib-group + ), + + for $x in $copy3//*:self-uri + return delete node $x, + + for $x in $copy3//*:custom-meta-group + return delete node $x, + + for $x in $copy3//*:ref//*:ext-link + return replace node $x with {$x/text()}, + + for $x in $copy3//*:xref[@ref-type="video"] + return delete node $x, + + for $x in $copy3//*:sec[@sec-type="data-availability"] + return delete node $x, + + for $x in $copy3//*:sec[@sec-type="datasets"] + return delete node $x, + + for $x in $copy3//*:app + return (delete node $x, insert node {$x/*[not(local-name() = 'object-id')]} as last into $x/preceding::*:body), + + for $x in $copy3//*:p//*:list + return (delete node $x, insert node $x after $x/ancestor::*:p[position() = last()]) + +) +return +copy $copy4 := $copy3 +modify( + + for $x in $copy4//*:article-meta/*:contrib-group[@content-type="section"] + return + (delete node $x, + insert node $x after $x/parent::*:article-meta/*:contrib-group[not(@*)][1]), + + for $x in $copy4//*:p//*:fig + return (delete node $x, insert node $x after $x/ancestor::*:p[position() = last()]), + + for $x in $copy4//*:p//*:fig-group + return (delete node $x, insert node $x after $x/ancestor::*:p[position() = last()]), + + for $x in $copy4//*:p//*:table-wrap + return (delete node $x, insert node $x after $x/ancestor::*:p[position() = last()]), + + for $x in $copy4//*:p/*:related-object + return delete node $x, + + for $x in $copy4//*:app-group + return delete node $x, + + for $x in $copy4//*:element-citation[@publication-type="web"] + return replace value of node $x/@publication-type with 'webpage', + + for $x in $copy4//*:element-citation[@publication-type="preprint"] + return replace value of node $x/@publication-type with 'journal', + + for $x in $copy4//*:element-citation[@publication-type="other"] + return replace value of node $x/@publication-type with 'software', + + for $x in $copy4//*:element-citation[@publication-type="journal" or @publication-type="book"] + return if (count($x/*:volume) > 1) then (for $y in $x/*:volume return delete node $y, + insert node $x/*:volume[1] after $x/*:source) + else () +) +return +copy $copy5 := $copy4 +modify( + + for $x in $copy5//*:ext-link + let $p := $x/parent::* + let $p-name := $p/local-name() + let $form := ('bold','fixed-case','italic','monospace','overline','overline-start','overline-end','roman','sans-serif','sc','strike','underline','underline-start','underline-end','ruby','sub','sup') + let $new-x := {$x/(*|text())} + return + if ($p-name = $form) then (delete node $p, insert node $new-x after $p) + else if ($x/@ext-link-type) then + if ($x/@ext-link-type='uri') then () + else replace value of node $x/@ext-link-type with 'uri' + else insert node attribute ext-link {'uri'} into $x, + + for $x in $copy5//(*:table[not(@id)]|*:td[not(@id)]|*:tr[not(@id)]|*:th[not(@id)]) + let $id := generate-id($x) + return insert node attribute id {$id} into $x, + + for $x in $copy5//*[*:inline-formula] + let $n := $x/local-name() + return + if ($n = ('sup','sub','italic','bold','underline')) then replace node $x with $x/(*|text()) + else (), + + for $x in $copy5//*:aff/*:institution + return if ($x/@content-type) then replace value of node $x/@content-type with 'orgdiv1' + else insert node attribute content-type {'orgname'} into $x, + + for $x in $copy5//*:p//*:list + return (delete node $x, insert node $x after $x/ancestor::*:p[position() = last()]) + +) +return +copy $copy6 := $copy5 +modify( + + for $m in $copy6//mml:math + return replace node $m with e=mc^2, + + for $x in $copy6//*:ext-link[child::*] + return replace node $x with {$x/data()}, + + for $x in $copy6//*:xref + let $form := ('bold','fixed-case','italic','monospace','overline','overline-start','overline-end','roman','sans-serif','sc','strike','underline','underline-start','underline-end','ruby','sub','sup') + return if ($x/ancestor::*[local-name() = $form]) then + (insert node $x after $x/ancestor::*[local-name() = $form][position() = last()], + delete node $x) + else if ($x/*[local-name() = $form]) then + replace node $x with {$x/data()} + else (), + + for $x in $copy6//*:collab/* + let $bad-children := ('bold','fixed-case','italic','monospace','overline','overline-start','overline-end','roman','sans-serif','sc','strike','underline','underline-start','underline-end','ruby','sub','sup') + return if ($x/local-name() = $bad-children) then + replace node $x with $x/(*|text()) + else () + +) +return +copy $copy7 := $copy6 +modify( + + for $x in $copy7//*:p//*:table-wrap + return (insert node $x after $x/ancestor::*:p, + delete node $x/ancestor::*:p), + + for $x in $copy7//*:fig/*:graphic[preceding-sibling::*:graphic] + return delete node $x + +) +return +copy $copy8 := $copy7 +modify( + + for $x in $copy8//*:table-wrap-foot[count(fn-group)>1] + return (for $c in $x/descendant::*:fn-group + let $count := count($c/ancestor::*:table-wrap-foot//*:fn-group) + let $pos := $count - count($c/following-sibling::*:fn-group) + return if ($pos > 1) then (for $y in $c/*:fn return insert node $y as last into $y/ancestor::table-wrap-foot/descendant::*:fn-group[1], delete node $c) + else ()), + + for $x in $copy8//*:inline-formula + let $form := ('bold','fixed-case','italic','monospace','overline','overline-start','overline-end','roman','sans-serif','sc','strike','underline','underline-start','underline-end','ruby','sub','sup') + return + if ($x//ancestor::*[local-name() = $form]) then + (insert node $x before $x//ancestor::*[local-name() = $form][position() = last()], + delete node $x) + else (), + + for $y in $copy8//*:conf-name/*:italic + return replace node $y with $y/data(), + + for $y in $copy8//*:element-citation/*:year[preceding-sibling::*:year] + return delete node $y, + + for $y in $copy8//*:element-citation/*:fpage[preceding-sibling::*:fpage] + return delete node $y, + + for $y in $copy8//*:element-citation/*:lpage[preceding-sibling::*:lpage] + return delete node $y, + + for $y in $copy8//*:element-citation/*:elocation-id[preceding-sibling::*:elocation-id] + return delete node $y, + + for $y in $copy8//*:element-citation/*:article-title[preceding-sibling::*:article-title] + return delete node $y, + + for $y in $copy8//*:element-citation/*:source[preceding-sibling::*:source] + return delete node $y, + + for $y in $copy8//*:element-citation/*:conf-date + return delete node $y, + + for $y in $copy8//*:volume//(*:sup|*:bold|*:italic) + return replace node $y with $x/text(), + + for $x in $copy8//*:uri/*:uri + return + if ($x/ancestor::*:ref) then + if ($x/parent::*:uri/@xlink:href) then replace node $x with $x/text() + else if ($x/@xlink:href) then replace node $x/parent::*:uri with $x + else delete node $x/parent::*:uri + else if ($x/parent::*:uri/@xlink:href) then replace node $x/parent::*:uri with {$x/text()} + else if ($x/@xlink:href) then replace node $x/parent::*:uri with {$x/text()} + else delete node $x/parent::*:uri, + + for $x in $copy8//*:uri[ancestor::*:body] + return replace node $x with {$x/text()}, + + for $y in $copy8//*:aff/*:label[preceding-sibling::*:label] + return delete node $y, + + for $x in $copy8//*:contrib/*:email[preceding-sibling::*:email] + return delete node $x, + + for $x in $copy8//*:fig/*:p + return + if ($x/parent::*:fig/*:caption) then + (delete node $x, + insert node $x as last into $x/parent::*:fig/*:caption[1]) + else if ($x/parent::*:fig/*:label) then + (delete node $x, + insert node {$x} after $x/parent::*:fig/*:label[1]) + else delete node $x, + + for $x in $copy8//*:media[@mimetype="video"] + return delete node $x, + + for $x in $copy8//*:break + return delete node $x, + + for $x in $copy8//*:named-content + return + if (starts-with($x/@content-type,'author-callout-style')) then delete node $x + else () + +) + +return +copy $copy9 := $copy8 +modify( + + + for $x in $copy9//*:boxed-text + return replace node $x with $x/*[local-name() = ('sec','p')], + + for $x in $copy9//*:contrib-group/*:on-behalf-of + return delete node $x + +) +return $copy9 +return file:write($outputDir,$y) \ No newline at end of file diff --git a/pmc-award-ids.xq b/pmc-award-ids.xq new file mode 100644 index 0000000..b116581 --- /dev/null +++ b/pmc-award-ids.xq @@ -0,0 +1,32 @@ +declare function local:get-doi($a){ + if ($a/ancestor::*:article/descendant::*:article-id[@pub-id-type="doi"][1]) + then ( + let $doi := $a/ancestor::*:article/descendant::*:article-id[@pub-id-type="doi"][1] + let $url := concat('http://doi.org/',$doi) + return copy $copy := $a + modify( + for $x in $copy/descendant-or-self::*:award-group + return insert node attribute {'url'}{$url} as last into $x + ) + return $copy) + + else $a +}; + + + + +{ +for $x in collection('pmc1')//*:article//*:funding-group//*:award-group[*:award-id] +let $id := $x/*:award-id[1] +let $y := replace($id,'[\p{P}\p{N}]|[Gg]rant','') +let $new-x := local:get-doi($x) +return +if (matches($id,'[Nn]o\. ')) then () +else if (matches($id,'\p{Ll}')) then ( + if (string-length($y) < 10) then () + else $new-x) +else () +} + + diff --git a/pmc-no-authors.xq b/pmc-no-authors.xq new file mode 100644 index 0000000..be0f7b7 --- /dev/null +++ b/pmc-no-authors.xq @@ -0,0 +1,15 @@ +let $list := { + + for $x in ( + collection('pmc1')//*:article-meta[not(descendant::*:contrib[@contrib-type="author"])], + collection('pmc2')//*:article-meta[not(descendant::*:contrib[@contrib-type="author"])], + collection('pmc3')//*:article-meta[not(descendant::*:contrib[@contrib-type="author"])] + ) + let $url := ('https://www.ncbi.nlm.nih.gov/pmc/articles/PMC'||$x/article-id[@pub-id-type="pmc"]||'/') + return {$url} + +} + +for $x in distinct-values($list//*:item/@publisher) +let $count := count($list//*:item[@publisher = $x]) +return ($x||' --- '||$count) \ No newline at end of file diff --git a/pmc-style-check.xq b/pmc-style-check.xq new file mode 100644 index 0000000..18acc1f --- /dev/null +++ b/pmc-style-check.xq @@ -0,0 +1,8 @@ +declare variable $xsl := doc('/Users/fredatherden/Documents/pmc-style-check/nlm-style-5.23/nlm-stylechecker.xsl'); + +for $x in collection('articles')//*:article[not(descendant::subj-group[@subj-group-type="heading"])] +let $output := xslt:transform($x,$xsl) +let $errors := {for $y in $output//*:error + return $y} + +return $errors \ No newline at end of file diff --git a/pmc-weird-ids.xq b/pmc-weird-ids.xq new file mode 100644 index 0000000..342ca11 --- /dev/null +++ b/pmc-weird-ids.xq @@ -0,0 +1,9 @@ +distinct-values(for $x in collection('pmc')//*:article//*:article-id +let $t := $x/@pub-id-type +return +if ($t = 'pmc') then () +else if ($t = 'pmid') then () +else if ($t = 'publisher-id') then () +else if ($t = 'doi') then () +else $t +) \ No newline at end of file diff --git a/ras-w-fig-sups.xq b/ras-w-fig-sups.xq new file mode 100644 index 0000000..fefd0ef --- /dev/null +++ b/ras-w-fig-sups.xq @@ -0,0 +1,2 @@ +distinct-values(for $x in collection('articles')//*:article[(descendant::*:subject[text() = 'Research Article']) and (descendant::*:body) and (descendant::*:fig[matches(*:label,'[Ss]upplement')])] +return $x//*:article-id[@pub-id-type="publisher-id"]/text()) \ No newline at end of file diff --git a/re-order-ref-list.xq b/re-order-ref-list.xq new file mode 100644 index 0000000..dc76aef --- /dev/null +++ b/re-order-ref-list.xq @@ -0,0 +1,459 @@ +declare namespace xlink = 'http://www.w3.org/1999/xlink'; + +let $ref-list := + References + + + + + Srinivasan + S + + + Kaplan + C Nadir + + + Mahadevan + L + + + 2019 + A multiphase theory for spreadingmicrobial swarms and films + eLife + 8 + e42697 + 10.7554/eLife.42697 + 31038122 + PMC12345 + + + + + + + Srinivasan + S + + + Kaplan + C Nadir + + + Mahadevan + L + + + 2019 + A multiphase theory for spreadingmicrobial swarms and films + eLife + 8 + e42697 + 10.7554/eLife.42697 + 31038122 + PMC12345 + + + + + + Berk V + Fong JC + Dempsey GT + Develioglu ON + Zhuang X + Liphardt J + Yildiz FH + Chu S + + 2012 + Molecular architecture and assembly principles of Vibrio cholerae biofilms + Science + 337 + 236 + 239 + + + + + + + Feyerabend + PK + + + 2010 + Against Method + 4th Edition + London + Verso + 978-1844674428 + + + + + + + Hogarth + KM + + + Jaroszz + J + + + Butler + P + + + 2012 + The skull and brain + + + Butler + P + + + Mitchell + A + + + Healy + JC + + + Applied Radiological Anatomy + 1 + 2nd Edition + Cambridge, United Kingdom + Cambridge University Press + 1 + 32 + 10.1017/CBO9780511977930.001 + 9780511977930 + + + + + + + Spangler + S + + + 2014 + Automated hypothesis generation based on mining scientific literature + Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining + 1877 + 1886 + 10.1145/2623330.2623667 + + + + + + + Miller + MA + + + Pfeiffer + W + + + Schwartz + T + + + 2011 + The CIPRES science gateway: a community resource for phylogenetic analyses + Proceedings of the 2011 TeraGrid Conference: Extreme Digital Discovery + Salt Lake City, Utah + New York, USA + ACM + 1 + 8 + https://dl.acm.org/citation.cfm?doid=2016741.2016785 + + + + + + + Gavrilov + S + + + Harvey + RP + + + Papaioannou + VE + + + 2014 + Mus musculus T-box 2 (Tbx2), mRNA + NCBI Nucleotide + NM_009324 + NM_009324.2 + + + + + + + Mulvihill + DP + + + 2010 + TORC2 dependent phosphorylation modulates calcium regulation of fission yeast myosin + Kent Data Repository + 60 + + + + + + + Read + K + + + Sizing the Problem of Improving Discovery and Access to NIH-funded Data: A Preliminary Study (Datasets) + Figshare + 2015 + https://doi.org/10.6084/m9.figshare.1285515 + + + + + + + Kok + K + + + Ay + A + + + Li + L + + + Genome-wide errant targeting by Hairy + Dryad Digital Repository + 2015 + https://doi.org/10.5061/dryad.cv323 + + + + + + + Wahls + WP + + + October 3, 2016 + Send my tax dollars to Mississippi + ASBMB Today + 15 + 24 + 25 + https://www.asbmb.org/asbmbtoday/201610/Essay/ + + + + + + + Schwartz + J + + + September 9, 1993 + Obesity affects economic, social status + The Washington Post + A1 + A4 + + + + + + + Murray + D + + ... + + 2019 + Gender and international diversity improves equity in peer review + bioRxiv + 400515 + 10.1101/400515 + + + + + + + Li H + + + 2013 + Aligning sequence reads clone sequences and assembly contigs with BWA-MEM + arXiv + https://arxiv.org/abs/1303.3997 + + + + + + World Health Organization + + 2015 + World Malaria Report 2015 + Geneva + World Health Organization + http://www.who.int/malaria/publications/world-malaria-report-2015/en/ + + + + + + + Foley B + + + Leitner T + + + Apetrei C + + + Hahn B + + + Mizrachi I + + + Mullins J + + + Rambaut A + + + Wolinsky S + + + Korber B + + + 2018 + Hiv Sequence Compendium 2018 + US Department of Energy + 10.2172/1458915 + + + + + + + Onoda T + + ... + + 2015 + Imidazopyridine Derivative + World Intellectual Property Organization + 2015087996 + https://patents.google.com/patent/WO2015087996A1/en + + + + + + + Linares D + + + 2019 + Data and Code for 'Decoupling Sensory From Decisional Choice Biases in Perceptual Decision Making' + 3e48e64 + GitHub + https://github.com/danilinares/2018LinaresAguilarLopezmoliner + + + + + + R Development Core Team + + 2014 + R: A Language and Environment for Statistical Computing + Vienna, Austria + R Foundation for Statistical Computing + http://www.R-project.org/ + + + + + + + Harmon A + + + 2019 + James Watson had a chance to salvage his reputation on race. He made things worse + The New York Times + https://www.nytimes.com/2019/01/01/science/watson-dna-genetics-race.html + January 1, 2019 + + + + + + Heissler SM + Sellers JR + + 2016a + Various Themes of Myosin Regulation + Journal of Molecular Biology + 428 + 1927 + 1946 + 10.1016/j.jmb.2016.01.022 + + + + + + Heissler SM + Sellers JR + + 2016b + Kinetic Adaptations of Myosins for Their Diverse Cellular Functions + Traffic + 17 + 839 + 859 + 10.1111/tra.12388 + + + + +return { + for $ref in $ref-list//*:ref + let $count := count($ref//*:person-group[@person-group-type=("author","inventor")]/*) + let $cite := + if ($ref//*:collab) then ($ref//*:collab||' , '||$ref//*:year) + else if ($count = 1) then ($ref//person-group[@person-group-type=("author","inventor")]/*:name[1]/*:surname||' , '||$ref//*:year) + else if ($count =2) then ($ref//person-group[@person-group-type=("author","inventor")]/*:name[1]/*:surname||' and '||$ref//person-group[@person-group-type=("author","inventor")]/*:name[2]/*:surname||' , '||$ref//*:year) + else (($ref//person-group[@person-group-type=("author","inventor")]/*:name[1]/*:surname||' et al., '||$ref//*:year)) + order by $cite + return $ref + } \ No newline at end of file diff --git a/ref-journal-children.xq b/ref-journal-children.xq new file mode 100644 index 0000000..12dd089 --- /dev/null +++ b/ref-journal-children.xq @@ -0,0 +1,2 @@ +distinct-values(for $x in collection('articles')//*:element-citation[@publication-type="journal"] +return $x/*/local-name()) \ No newline at end of file diff --git a/remove-old-versions.xq b/remove-old-versions.xq new file mode 100644 index 0000000..fd706d3 --- /dev/null +++ b/remove-old-versions.xq @@ -0,0 +1,8 @@ +for $x in collection('articles')//*:article +let $article-id := $x//*:article-id[@pub-id-type="publisher-id"]/text() +let $filename := substring-after($x/base-uri(),'/articles/') +let $folder := concat('/articles/elife-',$article-id,'-v') +let $v-no := number(substring-before(substring-after($x/base-uri(),$folder),'.xml')) +let $count := count(collection('articles')//*:article[descendant::*:article-id[@pub-id-type="publisher-id"]/text() = $article-id]) +return if ($count = $v-no) then () +else (db:delete('articles',$filename)) \ No newline at end of file diff --git a/replace-xrefs-with-afss.xq b/replace-xrefs-with-afss.xq new file mode 100644 index 0000000..f39b529 --- /dev/null +++ b/replace-xrefs-with-afss.xq @@ -0,0 +1,26 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; +declare namespace mml="http://www.w3.org/1998/Math/MathML"; + +declare variable $filename := 'elife-46962.xml'; +declare variable $dir := '/Users/fredatherden/Desktop/'; +declare variable $file := doc(concat('/Users/fredatherden/Desktop/elife-46962-vor-r1/',$filename)); + + +for $x in $file//*:article +let $y := + +copy $copy := $x +modify( + + for $x in $copy//*:contrib//*:xref[@ref-type="aff"] + let $aff := $x/ancestor::*:article-meta//*:aff[@id = $x/@rid] + return (replace node $x with {$aff/data()}), + + for $x in $copy//*:aff[not(parent::*:contrib)] + return delete node $x + +) +return $copy + + +return file:write(concat($dir,$filename),$y, map {'indent':'no'}) \ No newline at end of file diff --git a/rewrite-test-cases.xq b/rewrite-test-cases.xq new file mode 100644 index 0000000..9f04310 --- /dev/null +++ b/rewrite-test-cases.xq @@ -0,0 +1,39 @@ +import module namespace schematron = "http://github.com/Schematron/schematron-basex"; +declare namespace svrl = 'xmlns="http://purl.oclc.org/dsdl/schematron'; + +declare variable $dir := '/Users/fredatherden/Documents/GitHub/jats-support-2/tests/cases/'; +declare variable $sch := schematron:compile(doc('/Users/fredatherden/Desktop/backup/support.sch')); + + +let $list := +{ +for $x in file:list($dir) +return +if ($x='.DS_Store') then () +else if (ends-with($x,'/')) then for $y in file:list($dir||$x) return {doc($dir||$x||$y)} +else {doc($dir||$x)} +} + +for $x in $list//*:item +let $svrl := schematron:validate($x/descendant::*[1], $sch) +let $new := +copy $copy := $x +modify( + for $m in $copy//processing-instruction('expected-error') + return delete node $m, + + for $z in $svrl//(*:failed-assert|*:successful-report) + let $t := normalize-space($z/*:text) + return insert node + processing-instruction{'expected-error'}{('message="'||$t||'" node="'||$z/@location||'"')} + before $copy/descendant::*[1], + + for $n in $copy/descendant::*[1] + return insert node ' ' before $n +) +return $copy +return $new/(*|text()|processing-instruction()) + + + + diff --git a/run-test.xq b/run-test.xq new file mode 100644 index 0000000..06dfced --- /dev/null +++ b/run-test.xq @@ -0,0 +1,46 @@ +import module namespace schematron = "http://github.com/Schematron/schematron-basex"; +declare namespace svrl = 'xmlns="http://purl.oclc.org/dsdl/schematron'; + +declare variable $dir := '/Users/fredatherden/Documents/GitHub/jats-support-2/tests/cases/'; +declare variable $sch := schematron:compile(doc('/Users/fredatherden/Desktop/backup/support.sch')); + + +let $list := +{ +for $x in file:list($dir) +return +if ($x='.DS_Store') then () +else if (ends-with($x,'/')) then for $y in file:list($dir||$x) return {doc($dir||$x||$y)} +else {doc($dir||$x)} +} + +for $x in $list//*:item + +let $p-list := +{ + for $y in $x//processing-instruction('expected-error') + let $m := substring-before( + substring-after($y,'message="') + , '" node="' + ) + order by $m + return {$m} +} + +let $svrl := schematron:validate($x/descendant::*[1], $sch) + +let $svrl-list := +{ + for $y in $svrl//(*:failed-assert|*:successful-report) + let $t := normalize-space($y/*:text) + order by $t + return {$t} +} + +return +if ($p-list = $svrl-list) then () +else ({$svrl-list,$p-list}) + + + + diff --git a/same-award-multiple-funders.xq b/same-award-multiple-funders.xq new file mode 100644 index 0000000..6af7f73 --- /dev/null +++ b/same-award-multiple-funders.xq @@ -0,0 +1,16 @@ +distinct-values(for $x in collection('articles')//*:article[(descendant::*:body) and descendant::*:article-meta/*:funding-group] +let $article-id := $x//*:article-id[@pub-id-type="publisher-id"]/text() +let $f := $x//*:article-meta/*:funding-group + + +return + for $y in $f/*:award-group + let $i := $y//*:institution/data() + let $i-id := $y//*:institution-id/data() + let $a-id := $y/*:award-id/data() + return + if ($y/following-sibling::*:award-group[descendant::*:institution/data() != $i]//*:award-id/data() = $a-id) + + then $article-id + else () +) \ No newline at end of file diff --git a/same-funder-multiple-awards.xq b/same-funder-multiple-awards.xq new file mode 100644 index 0000000..671074d --- /dev/null +++ b/same-funder-multiple-awards.xq @@ -0,0 +1,16 @@ +distinct-values(for $x in collection('articles')//*:article[(descendant::*:body) and descendant::*:article-meta/*:funding-group] +let $article-id := $x//*:article-id[@pub-id-type="publisher-id"]/text() +let $f := $x//*:article-meta/*:funding-group + + +return + for $y in $f/*:award-group + let $i := $y//*:institution/data() + let $i-id := $y//*:institution-id/data() + let $a-id := $y/*:award-id/data() + return + if ($y/following-sibling::*:award-group[descendant::*:institution/data() = $i]//*:award-id/data() != $a-id) + + then $article-id + else () +) \ No newline at end of file diff --git a/schematron2xspex.xq b/schematron2xspex.xq new file mode 100644 index 0000000..8f68bdd --- /dev/null +++ b/schematron2xspex.xq @@ -0,0 +1,25 @@ +declare namespace x="http://www.jenitennison.com/xslt/xspec"; +declare namespace sch="http://purl.oclc.org/dsdl/schematron"; +declare variable $sch := doc('../xspec/schematron.sch'); + +declare function local:get-id($rule){ + if ($rule/@id) then $rule/@id + else if ($rule/parent::sch:pattern/@id) then + let $p := $rule/parent::sch:pattern[@id] + let $pos := count($p/sch:rule) - count($rule/following-sibling::sch:rule) + return concat($rule/parent::sch:pattern/@id,$pos) + else generate-id($rule) +}; + + + + { + for $x in $sch//sch:rule + let $id := local:get-id($x) + return + + + + } + + diff --git a/sec-id-non-conformity.xq b/sec-id-non-conformity.xq new file mode 100644 index 0000000..e76d2f4 --- /dev/null +++ b/sec-id-non-conformity.xq @@ -0,0 +1,9 @@ +distinct-values(for $x in collection('articles')//*:article/(*:body|*:back)/*:sec[@id] +let $c := $x/ancestor::*:article//*:article-id[@pub-id-type="publisher-id"] +let $pos := if ($x/parent::*/local-name() = 'body') then count($x/parent::*/*:sec) - count($x/following-sibling::*:sec) +else count($x/ancestor::*:article/*:body/*:sec) + count($x/parent::*:back/*:sec) - count($x/following-sibling::*:sec) +return +if ($x[@sec-type="data-availability"]) then () +else if (contains($x/@id,'-')) then ($c) +else if ($x/@id = ('s'||$pos)) then () +else ($c)) \ No newline at end of file diff --git a/simple-content-2.xq b/simple-content-2.xq new file mode 100644 index 0000000..644fcd7 --- /dev/null +++ b/simple-content-2.xq @@ -0,0 +1,13 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; +declare namespace mml="http://www.w3.org/1998/Math/MathML"; + +for $x in collection('articles')//*:article[descendant::*:body and not(descendant::*:media[@mimetype="video"]) and not(descendant::mml:math) and not(descendant::table-wrap) and not(descendant::fig-group)] +let $c := count($x//*:article-meta/*:contrib-group[not(@*)]/*:contrib) +let $a := count($x//*:article-meta/*:contrib-group[not(@*)]/*:aff) +return +if ($c ge 8) then () +else if ($a ge 3) then () +else if ($x//*:fig[descendant::*:supplementary-material]) then () +else if ($x//*:element-citation[not(@publication-type="journal")]) then () +else if ($x/@article-type != ('research-article')) then () +else concat('https://elifesciences.org/articles/',$x/base-uri()) diff --git a/simple-content.xq b/simple-content.xq new file mode 100644 index 0000000..dcb5f4e --- /dev/null +++ b/simple-content.xq @@ -0,0 +1,10 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; +declare namespace mml="http://www.w3.org/1998/Math/MathML"; + +for $x in collection('articles')//*:article[@article-type="research-article" and descendant::*:body and not(descendant::*:media[@mimetype="video"]) and not(descendant::mml:math) and not(descendant::table-wrap)] +let $c := count($x//*:article-meta/*:contrib-group[not(@*)]/*:contrib) +let $a := count($x//*:article-meta/*:contrib-group[not(@*)]/*:aff) +return +if ($c ge 8) then () +else if ($a ge 3) then () +else concat('https://elifesciences.org/articles/',$x//*:article-id[@pub-id-type="publisher-id"]/text()) diff --git a/special-issue-2.xq b/special-issue-2.xq new file mode 100644 index 0000000..fc604b1 --- /dev/null +++ b/special-issue-2.xq @@ -0,0 +1,152 @@ +let $list := + +/articles/elife-00065-v1.xml +/articles/elife-00286-v1.xml +/articles/elife-00306-v1.xml +/articles/elife-00515-v1.xml +/articles/elife-00518-v1.xml +/articles/elife-00537-v1.xml +/articles/elife-01098-v1.xml +/articles/elife-01730-v1.xml +/articles/elife-01883-v1.xml +/articles/elife-02077-v1.xml +/articles/elife-03504-v2.xml +/articles/elife-03706-v1.xml +/articles/elife-03790-v1.xml +/articles/elife-05505-v2.xml +/articles/elife-05949-v1.xml +/articles/elife-06003-v2.xml +/articles/elife-06184-v1.xml +/articles/elife-06197-v1.xml +/articles/elife-06259-v1.xml +/articles/elife-07836-v3.xml +/articles/elife-08186-v1.xml +/articles/elife-08527-v2.xml +/articles/elife-08833-v2.xml +/articles/elife-09221-v2.xml +/articles/elife-09594-v2.xml +/articles/elife-09709-v2.xml +/articles/elife-10161-v1.xml +/articles/elife-10181-v1.xml +/articles/elife-10956-v2.xml +/articles/elife-12010-v2.xml +/articles/elife-13943-v3.xml +/articles/elife-16351-v2.xml +/articles/elife-16843-v1.xml +/articles/elife-16923-v1.xml +/articles/elife-17185-v1.xml +/articles/elife-17214-v1.xml +/articles/elife-17915-v1.xml +/articles/elife-18459-v1.xml +/articles/elife-18648-v2.xml +/articles/elife-19130-v2.xml +/articles/elife-19264-v2.xml +/articles/elife-19358-v1.xml +/articles/elife-19484-v2.xml +/articles/elife-19493-v2.xml +/articles/elife-20340-v3.xml +/articles/elife-20851-v1.xml +/articles/elife-20914-v2.xml +/articles/elife-21491-v2.xml +/articles/elife-21690-v2.xml +/articles/elife-22978-v2.xml +/articles/elife-23493-v3.xml +/articles/elife-24059-v2.xml +/articles/elife-24506-v1.xml +/articles/elife-24662-v2.xml +/articles/elife-26424-v2.xml +/articles/elife-26464-v2.xml +/articles/elife-26652-v4.xml +/articles/elife-26952-v3.xml +/articles/elife-27014-v1.xml +/articles/elife-27345-v2.xml +/articles/elife-27692-v1.xml +/articles/elife-27842-v2.xml +/articles/elife-28129-v4.xml +/articles/elife-28329-v2.xml +/articles/elife-28877-v1.xml +/articles/elife-29815-v3.xml +/articles/elife-29908-v2.xml +/articles/elife-31126-v1.xml +/articles/elife-31157-v2.xml +/articles/elife-31268-v2.xml +/articles/elife-32018-v2.xml +/articles/elife-32127-v2.xml +/articles/elife-32421-v2.xml +/articles/elife-33670-v1.xml +/articles/elife-33781-v1.xml +/articles/elife-34081-v1.xml +/articles/elife-34427-v1.xml +/articles/elife-34701-v2.xml +/articles/elife-34836-v2.xml +/articles/elife-34970-v2.xml +/articles/elife-34985-v2.xml +/articles/elife-35330-v2.xml +/articles/elife-35368-v3.xml +/articles/elife-35551-v1.xml +/articles/elife-35685-v1.xml +/articles/elife-35878-v2.xml +/articles/elife-36095-v2.xml +/articles/elife-36157-v2.xml +/articles/elife-37316-v1.xml +/articles/elife-37344-v2.xml +/articles/elife-37462-v2.xml +/articles/elife-38635-v2.xml +/articles/elife-39856-v2.xml +/articles/elife-39911-v3.xml +/articles/elife-40314-v1.xml +/articles/elife-40675-v2.xml +/articles/elife-41046-v2.xml +/articles/elife-41258-v1.xml +/articles/elife-41548-v1.xml +/articles/elife-41792-v2.xml +/articles/elife-42650-v2.xml +/articles/elife-42976-v1.xml +/articles/elife-43059-v2.xml +/articles/elife-44219-v1.xml +/articles/elife-44425-v1.xml +/articles/elife-44745-v2.xml +/articles/elife-45415-v1.xml +/articles/elife-45974-v1.xml +/articles/elife-46174-v2.xml +/articles/elife-46413-v2.xml +/articles/elife-46418-v2.xml +/articles/elife-47047-v1.xml +/articles/elife-47156-v3.xml +/articles/elife-48186-v2.xml +/articles/elife-49154-v2.xml +/articles/elife-49158-v2.xml +/articles/elife-50140-v1.xml +/articles/elife-47156-v4.xml +/articles/elife-48240-v1.xml +/articles/elife-49132-v2.xml +/articles/elife-49874-v1.xml + + + +let $csv := +{ + for $x in collection('articles')//*:article[*:body] + let $subj1 := $x//*:article-meta/descendant::*:subj-group[@subj-group-type="heading"][1]/*:subject + let $subj2 := $x//*:article-meta/descendant::*:subj-group[@subj-group-type="heading"][2]/*:subject + let $base := $x/base-uri() + let $meta := $x/*:front/*:article-meta + let $title := $meta//*:article-title + let $kwds := $meta/*:kwd-group[@kwd-group-type="author-keywords"] + let $doi := ('http://doi.org/'||$meta/*:article-id[@pub-id-type="doi"]) + let $unallowed-subjs := ('neuroscience','plant biology','evolutionary biology') + return + if ($base = $list//*:item/string()) then + if ((lower-case($subj1)=$unallowed-subjs) and not($subj2)) then () + else ( + + {$doi} + {$title/data()} + {for $z in ($subj1|$subj2) return {$z/data()}} + {for $y in $kwds/*:kwd return {$y/data()}} + ) +} + + + + return $csv \ No newline at end of file diff --git a/special-issue-3.xq b/special-issue-3.xq new file mode 100644 index 0000000..0135b81 --- /dev/null +++ b/special-issue-3.xq @@ -0,0 +1,40 @@ +let $values := distinct-values( + for $x in collection('articles')//*:article[*:body]//*:article-meta//(*:article-title|*:kwd) + let $l := lower-case($x) + let $doi := $x/ancestor::*:article-meta/*:article-id[@pub-id-type="doi"] + return + if (matches($l,' aging| ageing| longevity| lifespan| geroscience|^aging|^ageing|^longevity|^lifespan|^geroscience')) then $x/base-uri() + else () +) + +let $list := +{for $y in $values +return {$y}} + + +let $csv := +{ + for $x in collection('articles')//*:article[*:body] + let $subj1 := $x//*:article-meta/descendant::*:subj-group[@subj-group-type="heading"][1]/*:subject + let $subj2 := $x//*:article-meta/descendant::*:subj-group[@subj-group-type="heading"][2]/*:subject + let $base := $x/base-uri() + let $meta := $x/*:front/*:article-meta + let $title := $meta//*:article-title + let $kwds := $meta/*:kwd-group[@kwd-group-type="author-keywords"] + let $doi := ('http://doi.org/'||$meta/*:article-id[@pub-id-type="doi"]) + let $unallowed-subjs := ('neuroscience','plant biology','evolutionary biology') + return + if ($base = $list//*:item/string()) then + if ((lower-case($subj1)=$unallowed-subjs) and not($subj2)) then () + else ( + + {$doi} + {$title/data()} + {for $z in ($subj1|$subj2) return {$z/data()}} + {for $y in $kwds/*:kwd return {$y/data()}} + ) +} + + + + return $csv \ No newline at end of file diff --git a/special-issue-4.xq b/special-issue-4.xq new file mode 100644 index 0000000..f2781c5 --- /dev/null +++ b/special-issue-4.xq @@ -0,0 +1,52 @@ +let $list-1 := +{ + for $x in collection('articles')//*:article + let $b := $x/base-uri() + order by $b + return {$b} +} + +let $latest-list := +{ + for $x in $list-1/*:item + let $id := substring-before(substring-after($x,'/articles/elife-'),'-v') + return + if (substring-before(substring-after($x/following-sibling::*:item[1],'/articles/elife-'),'-v') = $id) then () + else {$x} +} + + +let $values := distinct-values( + for $x in collection('articles')//*:article[base-uri()=$latest-list//*:item/data()]//*:article-meta//(*:article-title|*:kwd) + let $l := lower-case($x) + return + if (matches($l,' aging| ageing| longevity| lifespan| geroscience|^aging|^ageing|^longevity|^lifespan|^geroscience')) then $x/base-uri() + else () +) + +let $list-2 := +{for $y in $values +return {$y}} + +let $final-ids := +for $article in collection('articles')//*:article + let $base := $article/base-uri() + return + if ($base = $list-2//*:item/string()) then + let $subj1 := $article//*:article-meta/descendant::*:subj-group[@subj-group-type="heading"][1]/*:subject + let $subj2 := $article//*:article-meta/descendant::*:subj-group[@subj-group-type="heading"][2]/*:subject + let $id := $article/*:front/*:article-meta/*:article-id[@pub-id-type="publisher-id"] + let $unallowed-subjs := ('neuroscience','plant biology','evolutionary biology') + order by $id + return ( + if ((lower-case($subj1)=$unallowed-subjs) and not($subj2)) then () + else $id + ) + else () + + + + for $id in $final-ids + order by $id + return ('- '||$id) + \ No newline at end of file diff --git a/special-issue-as-csv.xq b/special-issue-as-csv.xq new file mode 100644 index 0000000..f4c0c36 --- /dev/null +++ b/special-issue-as-csv.xq @@ -0,0 +1,146 @@ +let $list := + +/articles/elife-00065-v1.xml +/articles/elife-00286-v1.xml +/articles/elife-00306-v1.xml +/articles/elife-00515-v1.xml +/articles/elife-00518-v1.xml +/articles/elife-00537-v1.xml +/articles/elife-01098-v1.xml +/articles/elife-01730-v1.xml +/articles/elife-01883-v1.xml +/articles/elife-02077-v1.xml +/articles/elife-03504-v2.xml +/articles/elife-03706-v1.xml +/articles/elife-03790-v1.xml +/articles/elife-05505-v2.xml +/articles/elife-05949-v1.xml +/articles/elife-06003-v2.xml +/articles/elife-06184-v1.xml +/articles/elife-06197-v1.xml +/articles/elife-06259-v1.xml +/articles/elife-07836-v3.xml +/articles/elife-08186-v1.xml +/articles/elife-08527-v2.xml +/articles/elife-08833-v2.xml +/articles/elife-09221-v2.xml +/articles/elife-09594-v2.xml +/articles/elife-09709-v2.xml +/articles/elife-10161-v1.xml +/articles/elife-10181-v1.xml +/articles/elife-10956-v2.xml +/articles/elife-12010-v2.xml +/articles/elife-13943-v3.xml +/articles/elife-16351-v2.xml +/articles/elife-16843-v1.xml +/articles/elife-16923-v1.xml +/articles/elife-17185-v1.xml +/articles/elife-17214-v1.xml +/articles/elife-17915-v1.xml +/articles/elife-18459-v1.xml +/articles/elife-18648-v2.xml +/articles/elife-19130-v2.xml +/articles/elife-19264-v2.xml +/articles/elife-19358-v1.xml +/articles/elife-19484-v2.xml +/articles/elife-19493-v2.xml +/articles/elife-20340-v3.xml +/articles/elife-20851-v1.xml +/articles/elife-20914-v2.xml +/articles/elife-21491-v2.xml +/articles/elife-21690-v2.xml +/articles/elife-22978-v2.xml +/articles/elife-23493-v3.xml +/articles/elife-24059-v2.xml +/articles/elife-24506-v1.xml +/articles/elife-24662-v2.xml +/articles/elife-26424-v2.xml +/articles/elife-26464-v2.xml +/articles/elife-26652-v4.xml +/articles/elife-26952-v3.xml +/articles/elife-27014-v1.xml +/articles/elife-27345-v2.xml +/articles/elife-27692-v1.xml +/articles/elife-27842-v2.xml +/articles/elife-28129-v4.xml +/articles/elife-28329-v2.xml +/articles/elife-28877-v1.xml +/articles/elife-29815-v3.xml +/articles/elife-29908-v2.xml +/articles/elife-31126-v1.xml +/articles/elife-31157-v2.xml +/articles/elife-31268-v2.xml +/articles/elife-32018-v2.xml +/articles/elife-32127-v2.xml +/articles/elife-32421-v2.xml +/articles/elife-33670-v1.xml +/articles/elife-33781-v1.xml +/articles/elife-34081-v1.xml +/articles/elife-34427-v1.xml +/articles/elife-34701-v2.xml +/articles/elife-34836-v2.xml +/articles/elife-34970-v2.xml +/articles/elife-34985-v2.xml +/articles/elife-35330-v2.xml +/articles/elife-35368-v3.xml +/articles/elife-35551-v1.xml +/articles/elife-35685-v1.xml +/articles/elife-35878-v2.xml +/articles/elife-36095-v2.xml +/articles/elife-36157-v2.xml +/articles/elife-37316-v1.xml +/articles/elife-37344-v2.xml +/articles/elife-37462-v2.xml +/articles/elife-38635-v2.xml +/articles/elife-39856-v2.xml +/articles/elife-39911-v3.xml +/articles/elife-40314-v1.xml +/articles/elife-40675-v2.xml +/articles/elife-41046-v2.xml +/articles/elife-41258-v1.xml +/articles/elife-41548-v1.xml +/articles/elife-41792-v2.xml +/articles/elife-42650-v2.xml +/articles/elife-42976-v1.xml +/articles/elife-43059-v2.xml +/articles/elife-44219-v1.xml +/articles/elife-44425-v1.xml +/articles/elife-44745-v2.xml +/articles/elife-45415-v1.xml +/articles/elife-45974-v1.xml +/articles/elife-46174-v2.xml +/articles/elife-46413-v2.xml +/articles/elife-46418-v2.xml +/articles/elife-47047-v1.xml +/articles/elife-47156-v3.xml +/articles/elife-48186-v2.xml +/articles/elife-49154-v2.xml +/articles/elife-49158-v2.xml +/articles/elife-50140-v1.xml +/articles/elife-47156-v4.xml +/articles/elife-48240-v1.xml +/articles/elife-49132-v2.xml +/articles/elife-49874-v1.xml + + + +let $csv := +{ + for $x in collection('articles')//*:article[*:body] + let $base := $x/base-uri() + let $meta := $x/*:front/*:article-meta + let $title := $meta//*:article-title + let $kwds := $meta/*:kwd-group[@kwd-group-type="author-keywords"] + let $doi := ('http://doi.org/'||$meta/*:article-id[@pub-id-type="doi"]) + return + if ($base = $list//*:item/string()) then + + {$doi} + {$title/data()} + {for $y in $kwds/*:kwd return {$y/data()}} + +} + + + + return file:write('/Users/fredatherden/Desktop/special-issue.csv',$csv, map{'method':'csv'}) \ No newline at end of file diff --git a/special-issue-check.xq b/special-issue-check.xq new file mode 100644 index 0000000..32847ac --- /dev/null +++ b/special-issue-check.xq @@ -0,0 +1,8 @@ +distinct-values( + for $x in collection('articles')//*:article[*:body]//*:article-meta//(*:article-title|*:kwd) + let $l := lower-case($x) + let $doi := $x/ancestor::*:article-meta/*:article-id[@pub-id-type="doi"] + return + if (matches($l,' aging| ageing| longevity| lifespan| geroscience|^aging|^ageing|^longevity|^lifespan|^geroscience')) then ('- http://doi.org/'||$doi) + else () +) \ No newline at end of file diff --git a/subject-change-across-version.xq b/subject-change-across-version.xq new file mode 100644 index 0000000..edb60b4 --- /dev/null +++ b/subject-change-across-version.xq @@ -0,0 +1,23 @@ +let $list := { +for $x in collection('articles')//*:article +let $article-id := $x//*:article-id[@pub-id-type="publisher-id"]/text() +let $b := $x/base-uri() +let $count := count(collection('articles')//*:article[descendant::*:article-id[@pub-id-type="publisher-id"]/text() = $article-id]) +let $subj := { + for $y in $x//*:article-categories//*:subj-group[@subj-group-type="heading"] + return + {$y/*:subject/data()} + } + +return if ($count = 1) then () +else if ($subj = '') then () +else {$subj} +} + +return { + for $x in $list//*:item + let $id := $x/@article-id + return + if ($list//*:item[@article-id = $id]/*:subjects != $x/*:subjects) then $x + else () +} \ No newline at end of file diff --git a/texture-article-check.xq b/texture-article-check.xq new file mode 100644 index 0000000..79ce026 --- /dev/null +++ b/texture-article-check.xq @@ -0,0 +1,190 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; +declare namespace mml="http://www.w3.org/1998/Math/MathML"; + +declare variable $outputDir := '/Users/fredatherden/Documents/GitHub/texture/data/kitchen-sink/manuscript.xml'; + +for $x in collection('articles')//*:article[(descendant::*:article-id[@pub-id-type="publisher-id"]= '42955') and descendant::*:body] +let $y := +copy $copy := $x +modify( + for $a in $copy//*:sub-article + return delete node $a, + + for $y in $copy//*:back/*:ack + return (delete node $y, + insert node {$y/*} as last into $y/preceding::*:body), + + for $z in $copy//*:article-meta/*:author-notes + return delete node $z, + + for $s in $copy//*:sec[@sec-type="additional-information"]/*:fn-group + return delete node $s, + + for $x in $copy//*:front//*:xref[@ref-type="fn"] + return delete node $x, + + for $e in $copy//*:object-id[ancestor::*:abstract or ancestor::*:supplementary-material] + return delete node $e, + + for $d in $copy//*:funding-group/*:funding-statement + return delete node $d, + + for $t in $copy//*:kwd-group/*:title + return delete node $t, + + for $f in $copy//*:collab[not(descendant::*)] + return delete node $f, + + for $x in $copy//*:contrib-group[@content-type="section"]//*:aff +let $id := if ($x/ancestor::contrib[@contrib-type="editor"]) then 'aff100' + else 'aff200' +return (replace node $x with , insert node {$x/*} after $x/ancestor::*:contrib-group), + +for $x in $copy//*:contrib-group/*:aff +return (insert node $x after $x/parent::*:contrib-group, delete node $x), + +for $x in $copy//*:supplementary-material +let $m := $x/*:media +let $ms := $m/@mime-subtype +let $mt := $m/@mimetype +let $xl := $m/@xlink:href +return (insert node attribute mime-subtype {$ms} into $x, + insert node attribute mimetype {$mt} into $x, + insert node attribute xlink:href {$xl} into $x, + delete node $m), + + for $f in $copy//*:related-article + return delete node $f, + + for $x in $copy//*:p//*:disp-formula + return (insert node $x after $x/ancestor::*:p, + delete node $x), + + for $o in $copy//*:abstract[@abstract-type="executive-summary"] + return delete node $o, + + for $x in $copy//*:fig/*:attrib + return delete node $x, + + for $x in $copy//*:body + return + if ($x/following-sibling::*:back) then () + else insert node after $x, + + for $i in $copy//*:table-wrap[count(descendant::*:table)>1] + return (delete node $i, + for $t in $i//*:table + let $count := count($i/descendant::*:table) + let $pos := $count - count($t/following-sibling::*:table) + return + if ($pos = 1) then insert node {$i/*:label}{$t} after $i + else insert node {$t} after $i), + + for $x in $copy//*:fig/*:graphic + let $count := count($x/ancestor::*:article//*:fig) + let $pos := $count - count($x/following::*:fig) + return + if (($pos mod 4) = 0) then replace node $x with + else if (($pos mod 3) = 0) then replace node $x with + else if (($pos mod 2) = 0) then replace node $x with + else replace node $x with + +) +return +copy $copy2 := $copy +modify( +for $x in $copy2//*:addr-line/*:named-content +return replace node $x with $x/(*|text()), + +for $x in $copy2//*:back/*:sec + return if ($x/@sec-type="additional-information") then (insert node $x as last into $x/preceding::*:body, delete node $x) + else if ($x/@sec-type="supplementary-material") then (insert node $x as last into $x/preceding::*:body, delete node $x) + else delete node $x, + + for $m in $copy2//mml:math + return delete node $m, + + for $x in $copy2//*:inline-formula + return insert node e=mc^2 as last into $x, + + for $x in $copy2//*:disp-formula + return insert node e=mc^2 as last into $x, + + for $x in $copy2//*:underline/*:named-content[@content-type="sequence"] + return replace node $x with $x/(text()|*), + + for $x in $copy2//*:fn-group[@content-type="author-contribution"] + return delete node $x +) +return +copy $copy3 := $copy2 +modify( + +for $v in $copy3//*:contrib-group[@content-type="section"] + return (delete node $v,insert node $v after $v/preceding-sibling::*:contrib-group), + + for $x in $copy3//*:self-uri + return delete node $x, + + for $x in $copy3//*:custom-meta-group + return delete node $x, + + for $x in $copy3//*:aff/*:institution + return if ($x/@content-type) then replace value of node $x/@content-type with 'orgdiv1' + else insert node attribute content-type {'orgname'} into $x, + + for $x in $copy3//*:ref//*:ext-link + return replace node $x with {$x/text()}, + + for $x in $copy3//*:table-wrap-foot/*:fn + return replace node $x with {$x}, + + for $x in $copy3//*:break + return delete node $x, + + for $x in $copy3//*:media[@mimetype="video"] + return delete node $x, + + for $x in $copy3//*:xref[@ref-type="video"] + return delete node $x, + + for $x in $copy3//*:sec[@sec-type="data-availability"] + return delete node $x, + + for $x in $copy3//*:app + return (delete node $x, insert node {$x/*[not(local-name() = 'object-id')]} as last into $x/preceding::*:body) + +) +return +copy $copy4 := $copy3 +modify( + for $x in $copy4//*:p/*:fig + return (delete node $x, insert node $x after $x/parent::*:p), + + for $x in $copy4//*:p/*:fig-group + return (delete node $x, insert node $x after $x/parent::*:p), + + for $x in $copy4//*:p/*:table-wrap + return (delete node $x, insert node $x after $x/parent::*:p), + + for $x in $copy4//*:p/*:related-object + return delete node $x, + + for $x in $copy4//*:app-group + return delete node $x, + + for $x in $copy4//*:table-wrap-foot[count(fn-group)>1] + return (for $c in $x/descendant::*:fn-group + let $count := count($c/ancestor::*:table-wrap-foot//*:fn-group) + let $pos := $count - count($c/following-sibling::*:fn-group) + return if ($pos > 1) then (for $y in $c/*:fn return insert node $y as last into $y/ancestor::table-wrap-foot/descendant::*:fn-group[1], delete node $c) + else ()), + + for $x in $copy4//*:boxed-text + return replace node $x with $x/*, + + for $x in $copy4//*:element-citation[@publication-type="web"] + return replace value of node $x/@publication-type with 'webpage' +) +return $copy4 +return file:write($outputDir,$y) \ No newline at end of file diff --git a/texture-manipulation-backup.xq b/texture-manipulation-backup.xq new file mode 100644 index 0000000..a69685c --- /dev/null +++ b/texture-manipulation-backup.xq @@ -0,0 +1,196 @@ +declare namespace xlink="http://www.w3.org/1999/xlink"; +declare namespace mml="http://www.w3.org/1998/Math/MathML"; + +declare variable $outputDir := '/Users/fredatherden/Documents/GitHub/texture/data/kitchen-sink/manuscript.xml'; + +for $x in collection('articles')//*:article[(descendant::*:article-id[@pub-id-type="publisher-id"]= '42955') and descendant::*:body] +let $y := +copy $copy := $x +modify( + for $a in $copy//*:sub-article + return delete node $a, + + for $y in $copy//*:back/*:ack + return (delete node $y, + insert node {$y/*} as last into $y/preceding::*:body), + + for $z in $copy//*:article-meta/*:author-notes + return delete node $z, + + for $s in $copy//*:sec[@sec-type="additional-information"]/*:fn-group + return delete node $s, + + for $x in $copy//*:front//*:xref[@ref-type="fn"] + return delete node $x, + + for $e in $copy//*:object-id[ancestor::*:abstract or ancestor::*:supplementary-material] + return delete node $e, + + for $d in $copy//*:funding-group/*:funding-statement + return delete node $d, + + for $t in $copy//*:kwd-group/*:title + return delete node $t, + + for $f in $copy//*:collab[not(descendant::*)] + return delete node $f, + + for $x in $copy//*:contrib-group[@content-type="section"]//*:aff +let $id := if ($x/ancestor::contrib[@contrib-type="editor"]) then 'aff100' + else 'aff200' +return (replace node $x with , insert node {$x/*} after $x/ancestor::*:contrib-group), + +for $x in $copy//*:contrib-group/*:aff +return (insert node $x after $x/parent::*:contrib-group, delete node $x), + +for $x in $copy//*:supplementary-material +let $m := $x/*:media +let $ms := $m/@mime-subtype +let $mt := $m/@mimetype +let $xl := $m/@xlink:href +return (insert node attribute mime-subtype {$ms} into $x, + insert node attribute mimetype {$mt} into $x, + insert node attribute xlink:href {$xl} into $x, + delete node $m), + + for $f in $copy//*:related-article + return delete node $f, + + for $x in $copy//*:p//*:disp-formula + return (insert node $x after $x/ancestor::*:p, + delete node $x), + + for $o in $copy//*:abstract[@abstract-type="executive-summary"] + return delete node $o, + + for $x in $copy//*:fig/*:attrib + return delete node $x, + + for $x in $copy//*:body + return + if ($x/following-sibling::*:back) then () + else insert node after $x, + + for $i in $copy//*:table-wrap[count(descendant::*:table)>1] + return (delete node $i, + for $t in $i//*:table + let $count := count($i/descendant::*:table) + let $pos := $count - count($t/following-sibling::*:table) + return + if ($pos = 1) then insert node {$i/*:label}{$t} after $i + else insert node {$t} after $i), + + for $x in $copy//*:fig/*:graphic + let $count := count($x/ancestor::*:article//*:fig) + let $pos := $count - count($x/following::*:fig) + return + if (($pos mod 4) = 0) then replace node $x with + else if (($pos mod 3) = 0) then replace node $x with + else if (($pos mod 2) = 0) then replace node $x with + else replace node $x with + +) +return +copy $copy2 := $copy +modify( +for $x in $copy2//*:addr-line/*:named-content +return replace node $x with $x/(*|text()), + +for $x in $copy2//*:back/*:sec + return if ($x/@sec-type="additional-information") then (insert node $x as last into $x/preceding::*:body, delete node $x) + else if ($x/@sec-type="supplementary-material") then (insert node $x as last into $x/preceding::*:body, delete node $x) + else delete node $x, + + for $m in $copy2//mml:math + return delete node $m, + + for $x in $copy2//*:inline-formula + return insert node e=mc^2 as last into $x, + + for $x in $copy2//*:disp-formula + return insert node e=mc^2 as last into $x, + + for $x in $copy2//*:underline/*:named-content[@content-type="sequence"] + return replace node $x with $x/(text()|*), + + for $x in $copy2//*:fn-group[@content-type="author-contribution"] + return delete node $x, + + for $x in $copy2//*:table-wrap-foot/*:fn + return replace node $x with {$x}, + + for $x in $copy2//*:break + return delete node $x, + + for $x in $copy2//*:code + let $c := $x/data() + return + if (count($x/parent::*:p/child::*) = 1) then replace node $x/parent::*:p with {$c} + else replace node $x with {$c} +) +return +copy $copy3 := $copy2 +modify( + +for $v in $copy3//*:contrib-group[@content-type="section"] + return (delete node $v,insert node $v after $v/preceding-sibling::*:contrib-group), + + for $x in $copy3//*:self-uri + return delete node $x, + + for $x in $copy3//*:custom-meta-group + return delete node $x, + + for $x in $copy3//*:aff/*:institution + return if ($x/@content-type) then replace value of node $x/@content-type with 'orgdiv1' + else insert node attribute content-type {'orgname'} into $x, + + for $x in $copy3//*:ref//*:ext-link + return replace node $x with {$x/text()}, + + for $x in $copy3//*:media[@mimetype="video"] + return delete node $x, + + for $x in $copy3//*:xref[@ref-type="video"] + return delete node $x, + + for $x in $copy3//*:sec[@sec-type="data-availability"] + return delete node $x, + + for $x in $copy3//*:app + return (delete node $x, insert node {$x/*[not(local-name() = 'object-id')]} as last into $x/preceding::*:body) + +) +return +copy $copy4 := $copy3 +modify( + for $x in $copy4//*:p/*:fig + return (delete node $x, insert node $x after $x/parent::*:p), + + for $x in $copy4//*:p/*:fig-group + return (delete node $x, insert node $x after $x/parent::*:p), + + for $x in $copy4//*:p/*:table-wrap + return (delete node $x, insert node $x after $x/parent::*:p), + + for $x in $copy4//*:p/*:related-object + return delete node $x, + + for $x in $copy4//*:app-group + return delete node $x, + + for $x in $copy4//*:table-wrap-foot[count(fn-group)>1] + return (for $c in $x/descendant::*:fn-group + let $count := count($c/ancestor::*:table-wrap-foot//*:fn-group) + let $pos := $count - count($c/following-sibling::*:fn-group) + return if ($pos > 1) then (for $y in $c/*:fn return insert node $y as last into $y/ancestor::table-wrap-foot/descendant::*:fn-group[1], delete node $c) + else ()), + + for $x in $copy4//*:boxed-text + return replace node $x with $x/*, + + for $x in $copy4//*:element-citation[@publication-type="web"] + return replace value of node $x/@publication-type with 'webpage' +) +return $copy4 +return file:write($outputDir,$y) \ No newline at end of file diff --git a/uk-us-spelling-generate.xq b/uk-us-spelling-generate.xq new file mode 100644 index 0000000..3e308e6 --- /dev/null +++ b/uk-us-spelling-generate.xq @@ -0,0 +1,3490 @@ +let $list1 := +accessorise +accessorised +accessorises +accessorising +acclimatisation +acclimatise +acclimatised +acclimatises +acclimatising +accoutrements +aeon +aeons +aerogramme +aerogrammes +aeroplane +aeroplanes +aesthete +aesthetes +aesthetic +aesthetically +aesthetics +aetiology +ageing +aggrandisement +agonise +agonised +agonises +agonising +agonisingly +almanack +almanacks +aluminium +amortisable +amortisation +amortisations +amortise +amortised +amortises +amortising +amphitheatre +amphitheatres +anaemia +anaemic +anaesthesia +anaesthetic +anaesthetics +anaesthetise +anaesthetised +anaesthetises +anaesthetising +anaesthetist +anaesthetists +anaesthetize +anaesthetized +anaesthetizes +anaesthetizing +analogue +analogues +analyse +analysed +analyses +analysing +anglicise +anglicised +anglicises +anglicising +annualised +antagonise +antagonised +antagonises +antagonising +apologise +apologised +apologises +apologising +appal +appals +appetiser +appetisers +appetising +appetisingly +arbour +arbours +archaeological +archaeologically +archaeologist +archaeologists +archaeology +ardour +armour +armoured +armourer +armourers +armouries +armoury +artefact +artefacts +authorise +authorised +authorises +authorising +axe +backpedalled +backpedalling +bannister +bannisters +baptise +baptised +baptises +baptising +bastardise +bastardised +bastardises +bastardising +battleaxe +baulk +baulked +baulking +baulks +bedevilled +bedevilling +behaviour +behavioural +behaviourism +behaviourist +behaviourists +behaviours +behove +behoved +behoves +bejewelled +belabour +belaboured +belabouring +belabours +bevelled +bevvies +bevvy +biassed +biassing +bingeing +bougainvillaea +bougainvillaeas +bowdlerise +bowdlerised +bowdlerises +bowdlerising +breathalyse +breathalysed +breathalyser +breathalysers +breathalyses +breathalysing +brutalise +brutalised +brutalises +brutalising +buses +busing +caesarean +caesareans +calibre +calibres +calliper +callipers +callisthenics +canalise +canalised +canalises +canalising +cancellation +cancellations +cancelled +cancelling +candour +cannibalise +cannibalised +cannibalises +cannibalising +canonise +canonised +canonises +canonising +capitalise +capitalised +capitalises +capitalising +caramelise +caramelised +caramelises +caramelising +carbonise +carbonised +carbonises +carbonising +carolled +carolling +catalogue +catalogued +catalogues +cataloguing +catalyse +catalysed +catalyses +catalysing +categorise +categorised +categorises +categorising +cauterise +cauterised +cauterises +cauterising +cavilled +cavilling +centigramme +centigrammes +centilitre +centilitres +centimetre +centimetres +centralise +centralised +centralises +centralising +centre +centred +centrefold +centrefolds +centrepiece +centrepieces +centres +channelled +channelling +characterise +characterised +characterises +characterising +cheque +chequebook +chequebooks +chequered +cheques +chilli +chimaera +chimaeras +chiselled +chiselling +circularise +circularised +circularises +circularising +civilise +civilised +civilises +civilising +clamour +clamoured +clamouring +clamours +clangour +clarinettist +clarinettists +collectivise +collectivised +collectivises +collectivising +colonisation +colonise +colonised +coloniser +colonisers +colonises +colonising +colour +colourant +colourants +coloured +coloureds +colourful +colourfully +colouring +colourize +colourized +colourizes +colourizing +colourless +colours +commercialise +commercialised +commercialises +commercialising +compartmentalise +compartmentalised +compartmentalises +compartmentalising +computerise +computerised +computerises +computerising +conceptualise +conceptualised +conceptualises +conceptualising +connexion +connexions +contextualise +contextualised +contextualises +contextualising +cosier +cosies +cosiest +cosily +cosiness +cosy +councillor +councillors +counselled +counselling +counsellor +counsellors +crenellated +criminalise +criminalised +criminalises +criminalising +criticise +criticised +criticises +criticising +crueller +cruellest +crystallisation +crystallise +crystallised +crystallises +crystallising +cudgelled +cudgelling +customise +customised +customises +customising +cypher +cyphers +decentralisation +decentralise +decentralised +decentralises +decentralising +decriminalisation +decriminalise +decriminalised +decriminalises +decriminalising +defence +defenceless +defences +dehumanisation +dehumanise +dehumanised +dehumanises +dehumanising +demeanour +demilitarisation +demilitarise +demilitarised +demilitarises +demilitarising +demobilisation +demobilise +demobilised +demobilises +demobilising +democratisation +democratise +democratised +democratises +democratising +demonise +demonised +demonises +demonising +demoralisation +demoralise +demoralised +demoralises +demoralising +denationalisation +denationalise +denationalised +denationalises +denationalising +deodorise +deodorised +deodorises +deodorising +depersonalise +depersonalised +depersonalises +depersonalising +deputise +deputised +deputises +deputising +desensitisation +desensitise +desensitised +desensitises +desensitising +destabilisation +destabilise +destabilised +destabilises +destabilising +dialled +dialling +dialogue +dialogues +diarrhoea +digitise +digitised +digitises +digitising +disc +discolour +discoloured +discolouring +discolours +discs +disembowelled +disembowelling +disfavour +dishevelled +dishonour +dishonourable +dishonourably +dishonoured +dishonouring +dishonours +disorganisation +disorganised +distil +distils +dramatisation +dramatisations +dramatise +dramatised +dramatises +dramatising +draught +draughtboard +draughtboards +draughtier +draughtiest +draughts +draughtsman +draughtsmanship +draughtsmen +draughtswoman +draughtswomen +draughty +drivelled +drivelling +duelled +duelling +economise +economised +economises +economising +edoema +editorialise +editorialised +editorialises +editorialising +empathise +empathised +empathises +empathising +emphasise +emphasised +emphasises +emphasising +enamelled +enamelling +enamoured +encyclopaedia +encyclopaedias +encyclopaedic +endeavour +endeavoured +endeavouring +endeavours +energise +energised +energises +energising +enrol +enrols +enthral +enthrals +epaulette +epaulettes +epicentre +epicentres +epilogue +epilogues +epitomise +epitomised +epitomises +epitomising +equalisation +equalise +equalised +equaliser +equalisers +equalises +equalising +eulogise +eulogised +eulogises +eulogising +evangelise +evangelised +evangelises +evangelising +exorcise +exorcised +exorcises +exorcising +extemporisation +extemporise +extemporised +extemporises +extemporising +externalisation +externalisations +externalise +externalised +externalises +externalising +factorise +factorised +factorises +factorising +faecal +faeces +familiarisation +familiarise +familiarised +familiarises +familiarising +fantasise +fantasised +fantasises +fantasising +favour +favourable +favourably +favoured +favouring +favourite +favourites +favouritism +favours +feminise +feminised +feminises +feminising +fertilisation +fertilise +fertilised +fertiliser +fertilisers +fertilises +fertilising +fervour +fibre +fibreglass +fibres +fictionalisation +fictionalisations +fictionalise +fictionalised +fictionalises +fictionalising +fillet +filleted +filleting +fillets +finalisation +finalise +finalised +finalises +finalising +flautist +flautists +flavour +flavoured +flavouring +flavourings +flavourless +flavours +flavoursome +flyer / flier +foetal +foetid +foetus +foetuses +formalisation +formalise +formalised +formalises +formalising +fossilisation +fossilise +fossilised +fossilises +fossilising +fraternisation +fraternise +fraternised +fraternises +fraternising +fulfil +fulfilment +fulfils +funnelled +funnelling +galvanise +galvanised +galvanises +galvanising +gambolled +gambolling +gaol +gaolbird +gaolbirds +gaolbreak +gaolbreaks +gaoled +gaoler +gaolers +gaoling +gaols +gases +gauge +gauged +gauges +gauging +generalisation +generalisations +generalise +generalised +generalises +generalising +ghettoise +ghettoised +ghettoises +ghettoising +gipsies +glamorise +glamorised +glamorises +glamorising +glamour +globalisation +globalise +globalised +globalises +globalising +glueing +goitre +goitres +gonorrhoea +gramme +grammes +gravelled +grey +greyed +greying +greyish +greyness +greys +grovelled +grovelling +groyne +groynes +gruelling +gruellingly +gryphon +gryphons +gynaecological +gynaecologist +gynaecologists +gynaecology +haematological +haematologist +haematologists +haematology +haemoglobin +haemophilia +haemophiliac +haemophiliacs +haemorrhage +haemorrhaged +haemorrhages +haemorrhaging +haemorrhoids +harbour +harboured +harbouring +harbours +harmonisation +harmonise +harmonised +harmonises +harmonising +homoeopath +homoeopathic +homoeopaths +homoeopathy +homogenise +homogenised +homogenises +homogenising +honour +honourable +honourably +honoured +honouring +honours +hospitalisation +hospitalise +hospitalised +hospitalises +hospitalising +humanise +humanised +humanises +humanising +humour +humoured +humouring +humourless +humours +hybridise +hybridised +hybridises +hybridising +hypnotise +hypnotised +hypnotises +hypnotising +hypothesise +hypothesised +hypothesises +hypothesising +idealisation +idealise +idealised +idealises +idealising +idolise +idolised +idolises +idolising +immobilisation +immobilise +immobilised +immobiliser +immobilisers +immobilises +immobilising +immortalise +immortalised +immortalises +immortalising +immunisation +immunise +immunised +immunises +immunising +impanelled +impanelling +imperilled +imperilling +individualise +individualised +individualises +individualising +industrialise +industrialised +industrialises +industrialising +inflexion +inflexions +initialise +initialised +initialises +initialising +initialled +initialling +instal +instalment +instalments +instals +instil +instils +institutionalisation +institutionalise +institutionalised +institutionalises +institutionalising +intellectualise +intellectualised +intellectualises +intellectualising +internalisation +internalise +internalised +internalises +internalising +internationalisation +internationalise +internationalised +internationalises +internationalising +ionisation +ionise +ionised +ioniser +ionisers +ionises +ionising +italicise +italicised +italicises +italicising +itemise +itemised +itemises +itemising +jeopardise +jeopardised +jeopardises +jeopardising +jewelled +jeweller +jewellers +jewellery +judgement +kilogramme +kilogrammes +kilometre +kilometres +labelled +labelling +labour +laboured +labourer +labourers +labouring +labours +lacklustre +legalisation +legalise +legalised +legalises +legalising +legitimise +legitimised +legitimises +legitimising +leukaemia +levelled +leveller +levellers +levelling +libelled +libelling +libellous +liberalisation +liberalise +liberalised +liberalises +liberalising +licence +licenced +licences +licencing +likeable +lionisation +lionise +lionised +lionises +lionising +liquidise +liquidised +liquidiser +liquidisers +liquidises +liquidising +litre +litres +localise +localised +localises +localising +louvre +louvred +louvres +lustre +magnetise +magnetised +magnetises +magnetising +manoeuvrability +manoeuvrable +manoeuvre +manoeuvred +manoeuvres +manoeuvring +manoeuvrings +marginalisation +marginalise +marginalised +marginalises +marginalising +marshalled +marshalling +marvelled +marvelling +marvellous +marvellously +materialisation +materialise +materialised +materialises +materialising +maximisation +maximise +maximised +maximises +maximising +meagre +mechanisation +mechanise +mechanised +mechanises +mechanising +mediaeval +memorialise +memorialised +memorialises +memorialising +memorise +memorised +memorises +memorising +mesmerise +mesmerised +mesmerises +mesmerising +metabolise +metabolised +metabolises +metabolising +metre +metres +micrometre +micrometres +militarise +militarised +militarises +militarising +milligramme +milligrammes +millilitre +millilitres +millimetre +millimetres +miniaturisation +miniaturise +miniaturised +miniaturises +miniaturising +minibuses +minimise +minimised +minimises +minimising +misbehaviour +misdemeanour +misdemeanours +misspelt +mitre +mitres +mobilisation +mobilise +mobilised +mobilises +mobilising +modelled +modeller +modellers +modelling +modernise +modernised +modernises +modernising +moisturise +moisturised +moisturiser +moisturisers +moisturises +moisturising +monologue +monologues +monopolisation +monopolise +monopolised +monopolises +monopolising +moralise +moralised +moralises +moralising +motorised +mould +moulded +moulder +mouldered +mouldering +moulders +mouldier +mouldiest +moulding +mouldings +moulds +mouldy +moult +moulted +moulting +moults +moustache +moustached +moustaches +moustachioed +multicoloured +nationalisation +nationalisations +nationalise +nationalised +nationalises +nationalising +naturalisation +naturalise +naturalised +naturalises +naturalising +neighbour +neighbourhood +neighbourhoods +neighbouring +neighbourliness +neighbourly +neighbours +neutralisation +neutralise +neutralised +neutralises +neutralising +normalisation +normalise +normalised +normalises +normalising +odour +odourless +odours +oesophagus +oesophaguses +oestrogen +offence +offences +omelette +omelettes +optimise +optimised +optimises +optimising +organisation +organisational +organisations +organise +organised +organiser +organisers +organises +organising +orthopaedic +orthopaedics +ostracise +ostracised +ostracises +ostracising +outmanoeuvre +outmanoeuvred +outmanoeuvres +outmanoeuvring +overemphasise +overemphasised +overemphasises +overemphasising +oxidisation +oxidise +oxidised +oxidises +oxidising +paederast +paederasts +paediatric +paediatrician +paediatricians +paediatrics +paedophile +paedophiles +paedophilia +palaeolithic +palaeontologist +palaeontologists +palaeontology +panelled +panelling +panellist +panellists +paralyse +paralysed +paralyses +paralysing +parcelled +parcelling +parlour +parlours +particularise +particularised +particularises +particularising +passivisation +passivise +passivised +passivises +passivising +pasteurisation +pasteurise +pasteurised +pasteurises +pasteurising +patronise +patronised +patronises +patronising +patronisingly +pedalled +pedalling +pedestrianisation +pedestrianise +pedestrianised +pedestrianises +pedestrianising +penalise +penalised +penalises +penalising +pencilled +pencilling +personalise +personalised +personalises +personalising +pharmacopoeia +pharmacopoeias +philosophise +philosophised +philosophises +philosophising +philtre +philtres +phoney +plagiarise +plagiarised +plagiarises +plagiarising +plough +ploughed +ploughing +ploughman +ploughmen +ploughs +ploughshare +ploughshares +polarisation +polarise +polarised +polarises +polarising +politicisation +politicise +politicised +politicises +politicising +popularisation +popularise +popularised +popularises +popularising +pouffe +pouffes +practise +practised +practises +practising +praesidium +praesidiums +pressurisation +pressurise +pressurised +pressurises +pressurising +pretence +pretences +primaeval +prioritisation +prioritise +prioritised +prioritises +prioritising +privatisation +privatisations +privatise +privatised +privatises +privatising +professionalisation +professionalise +professionalised +professionalises +professionalising +programme +programmes +prologue +prologues +propagandise +propagandised +propagandises +propagandising +proselytise +proselytised +proselytiser +proselytisers +proselytises +proselytising +psychoanalyse +psychoanalysed +psychoanalyses +psychoanalysing +publicise +publicised +publicises +publicising +pulverisation +pulverise +pulverised +pulverises +pulverising +pummelled +pummelling +pyjama +pyjamas +pzazz +quarrelled +quarrelling +radicalise +radicalised +radicalises +radicalising +rancour +randomise +randomised +randomises +randomising +rationalisation +rationalisations +rationalise +rationalised +rationalises +rationalising +ravelled +ravelling +realisable +realisation +realisations +realise +realised +realises +realising +recognisable +recognisably +recognisance +recognise +recognised +recognises +recognising +reconnoitre +reconnoitred +reconnoitres +reconnoitring +refuelled +refuelling +regularisation +regularise +regularised +regularises +regularising +remodelled +remodelling +remould +remoulded +remoulding +remoulds +reorganisation +reorganisations +reorganise +reorganised +reorganises +reorganising +revelled +reveller +revellers +revelling +revitalise +revitalised +revitalises +revitalising +revolutionise +revolutionised +revolutionises +revolutionising +rhapsodise +rhapsodised +rhapsodises +rhapsodising +rigour +rigours +ritualised +rivalled +rivalling +romanticise +romanticised +romanticises +romanticising +rumour +rumoured +rumours +sabre +sabres +saltpetre +sanitise +sanitised +sanitises +sanitising +satirise +satirised +satirises +satirising +saviour +saviours +savour +savoured +savouries +savouring +savours +savoury +scandalise +scandalised +scandalises +scandalising +sceptic +sceptical +sceptically +scepticism +sceptics +sceptre +sceptres +scrutinise +scrutinised +scrutinises +scrutinising +secularisation +secularise +secularised +secularises +secularising +sensationalise +sensationalised +sensationalises +sensationalising +sensitise +sensitised +sensitises +sensitising +sentimentalise +sentimentalised +sentimentalises +sentimentalising +sepulchre +sepulchres +serialisation +serialisations +serialise +serialised +serialises +serialising +sermonise +sermonised +sermonises +sermonising +sheikh +shovelled +shovelling +shrivelled +shrivelling +signalise +signalised +signalises +signalising +signalled +signalling +smoulder +smouldered +smouldering +smoulders +snivelled +snivelling +snorkelled +snorkelling +snowplough +snowploughs +socialisation +socialise +socialised +socialises +socialising +sodomise +sodomised +sodomises +sodomising +solemnise +solemnised +solemnises +solemnising +sombre +specialisation +specialisations +specialise +specialised +specialises +specialising +spectre +spectres +spiralled +spiralling +splendour +splendours +squirrelled +squirrelling +stabilisation +stabilise +stabilised +stabiliser +stabilisers +stabilises +stabilising +standardisation +standardise +standardised +standardises +standardising +stencilled +stencilling +sterilisation +sterilisations +sterilise +sterilised +steriliser +sterilisers +sterilises +sterilising +stigmatisation +stigmatise +stigmatised +stigmatises +stigmatising +storey +storeys +subsidisation +subsidise +subsidised +subsidiser +subsidisers +subsidises +subsidising +succour +succoured +succouring +succours +sulphate +sulphates +sulphide +sulphides +sulphur +sulphurous +summarise +summarised +summarises +summarising +swivelled +swivelling +symbolise +symbolised +symbolises +symbolising +sympathise +sympathised +sympathiser +sympathisers +sympathises +sympathising +synchronisation +synchronise +synchronised +synchronises +synchronising +synthesise +synthesised +synthesiser +synthesisers +synthesises +synthesising +syphon +syphoned +syphoning +syphons +systematisation +systematise +systematised +systematises +systematising +tantalise +tantalised +tantalises +tantalising +tantalisingly +tasselled +technicolour +temporise +temporised +temporises +temporising +tenderise +tenderised +tenderises +tenderising +terrorise +terrorised +terrorises +terrorising +theatre +theatregoer +theatregoers +theatres +theorise +theorised +theorises +theorising +tonne +tonnes +towelled +towelling +toxaemia +tranquillise +tranquillised +tranquilliser +tranquillisers +tranquillises +tranquillising +tranquillity +tranquillize +tranquillized +tranquillizer +tranquillizers +tranquillizes +tranquillizing +tranquilly +transistorised +traumatise +traumatised +traumatises +traumatising +travelled +traveller +travellers +travelling +travelogue +travelogues +trialled +trialling +tricolour +tricolours +trivialise +trivialised +trivialises +trivialising +tumour +tumours +tunnelled +tunnelling +tyrannise +tyrannised +tyrannises +tyrannising +tyre +tyres +unauthorised +uncivilised +underutilised +unequalled +unfavourable +unfavourably +unionisation +unionise +unionised +unionises +unionising +unorganised +unravelled +unravelling +unrecognisable +unrecognised +unrivalled +unsavoury +untrammelled +urbanisation +urbanise +urbanised +urbanises +urbanising +utilisable +utilisation +utilise +utilised +utilises +utilising +valour +vandalise +vandalised +vandalises +vandalising +vaporisation +vaporise +vaporised +vaporises +vaporising +vapour +vapours +verbalise +verbalised +verbalises +verbalising +victimisation +victimise +victimised +victimises +victimising +videodisc +videodiscs +vigour +visualisation +visualisations +visualise +visualised +visualises +visualising +vocalisation +vocalisations +vocalise +vocalised +vocalises +vocalising +vulcanised +vulgarisation +vulgarise +vulgarised +vulgarises +vulgarising +waggon +waggons +watercolour +watercolours +weaselled +weaselling +westernisation +westernise +westernised +westernises +westernising +womanise +womanised +womaniser +womanisers +womanises +womanising +woollen +woollens +woollies +woolly +worshipped +worshipping +worshipper +yodelled +yodelling +yoghourt +yoghourts +yoghurt +yoghurts + + +let $list2 := + +accessorize +accessorized +accessorizes +accessorizing +acclimatization +acclimatize +acclimatized +acclimatizes +acclimatizing +accouterments +eon +eons +aerogram +aerograms +airplane +airplanes +esthete +esthetes +esthetic +esthetically +esthetics +etiology +aging +aggrandizement +agonize +agonized +agonizes +agonizing +agonizingly +almanac +almanacs +aluminum +amortizable +amortization +amortizations +amortize +amortized +amortizes +amortizing +amphitheater +amphitheaters +anemia +anemic +anesthesia +anesthetic +anesthetics +anesthetize +anesthetized +anesthetizes +anesthetizing +anesthetist +anesthetists +anesthetize +anesthetized +anesthetizes +anesthetizing +analog +analogs +analyze +analyzed +analyzes +analyzing +anglicize +anglicized +anglicizes +anglicizing +annualized +antagonize +antagonized +antagonizes +antagonizing +apologize +apologized +apologizes +apologizing +appall +appalls +appetizer +appetizers +appetizing +appetizingly +arbor +arbors +archeological +archeologically +archeologist +archeologists +archeology +ardor +armor +armored +armorer +armorers +armories +armory +artifact +artifacts +authorize +authorized +authorizes +authorizing +ax +backpedaled +backpedaling +banister +banisters +baptize +baptized +baptizes +baptizing +bastardize +bastardized +bastardizes +bastardizing +battleax +balk +balked +balking +balks +bedeviled +bedeviling +behavior +behavioral +behaviorism +behaviorist +behaviorists +behaviors +behoove +behooved +behooves +bejeweled +belabor +belabored +belaboring +belabors +beveled +bevies +bevy +biased +biasing +binging +bougainvillea +bougainvilleas +bowdlerize +bowdlerized +bowdlerizes +bowdlerizing +breathalyze +breathalyzed +breathalyzer +breathalyzers +breathalyzes +breathalyzing +brutalize +brutalized +brutalizes +brutalizing +busses +bussing +cesarean +cesareans +caliber +calibers +caliper +calipers +calisthenics +canalize +canalized +canalizes +canalizing +cancelation +cancelations +canceled +canceling +candor +cannibalize +cannibalized +cannibalizes +cannibalizing +canonize +canonized +canonizes +canonizing +capitalize +capitalized +capitalizes +capitalizing +caramelize +caramelized +caramelizes +caramelizing +carbonize +carbonized +carbonizes +carbonizing +caroled +caroling +catalog +cataloged +catalogs +cataloging +catalyze +catalyzed +catalyzes +catalyzing +categorize +categorized +categorizes +categorizing +cauterize +cauterized +cauterizes +cauterizing +caviled +caviling +centigram +centigrams +centiliter +centiliters +centimeter +centimeters +centralize +centralized +centralizes +centralizing +center +centered +centerfold +centerfolds +centerpiece +centerpieces +centers +channeled +channeling +characterize +characterized +characterizes +characterizing +check +checkbook +checkbooks +checkered +checks +chili +chimera +chimeras +chiseled +chiseling +circularize +circularized +circularizes +circularizing +civilize +civilized +civilizes +civilizing +clamor +clamored +clamoring +clamors +clangor +clarinetist +clarinetists +collectivize +collectivized +collectivizes +collectivizing +colonization +colonize +colonized +colonizer +colonizers +colonizes +colonizing +color +colorant +colorants +colored +coloreds +colorful +colorfully +coloring +colorize +colorized +colorizes +colorizing +colorless +colors +commercialize +commercialized +commercializes +commercializing +compartmentalize +compartmentalized +compartmentalizes +compartmentalizing +computerize +computerized +computerizes +computerizing +conceptualize +conceptualized +conceptualizes +conceptualizing +connection +connections +contextualize +contextualized +contextualizes +contextualizing +cozier +cozies +coziest +cozily +coziness +cozy +councilor +councilors +counseled +counseling +counselor +counselors +crenelated +criminalize +criminalized +criminalizes +criminalizing +criticize +criticized +criticizes +criticizing +crueler +cruelest +crystallization +crystallize +crystallized +crystallizes +crystallizing +cudgeled +cudgeling +customize +customized +customizes +customizing +cipher +ciphers +decentralization +decentralize +decentralized +decentralizes +decentralizing +decriminalization +decriminalize +decriminalized +decriminalizes +decriminalizing +defense +defenseless +defenses +dehumanization +dehumanize +dehumanized +dehumanizes +dehumanizing +demeanor +demilitarization +demilitarize +demilitarized +demilitarizes +demilitarizing +demobilization +demobilize +demobilized +demobilizes +demobilizing +democratization +democratize +democratized +democratizes +democratizing +demonize +demonized +demonizes +demonizing +demoralization +demoralize +demoralized +demoralizes +demoralizing +denationalization +denationalize +denationalized +denationalizes +denationalizing +deodorize +deodorized +deodorizes +deodorizing +depersonalize +depersonalized +depersonalizes +depersonalizing +deputize +deputized +deputizes +deputizing +desensitization +desensitize +desensitized +desensitizes +desensitizing +destabilization +destabilize +destabilized +destabilizes +destabilizing +dialed +dialing +dialog +dialogs +diarrhea +digitize +digitized +digitizes +digitizing +disk +discolor +discolored +discoloring +discolors +disks +disemboweled +disemboweling +disfavor +disheveled +dishonor +dishonorable +dishonorably +dishonored +dishonoring +dishonors +disorganization +disorganized +distill +distills +dramatization +dramatizations +dramatize +dramatized +dramatizes +dramatizing +draft +draftboard +draftboards +draftier +draftiest +drafts +draftsman +draftsmanship +draftsmen +draftswoman +draftswomen +drafty +driveled +driveling +dueled +dueling +economize +economized +economizes +economizing +edema +editorialize +editorialized +editorializes +editorializing +empathize +empathized +empathizes +empathizing +emphasize +emphasized +emphasizes +emphasizing +enameled +enameling +enamored +encyclopedia +encyclopedias +encyclopedic +endeavor +endeavored +endeavoring +endeavors +energize +energized +energizes +energizing +enroll +enrolls +enthrall +enthralls +epaulet +epaulets +epicenter +epicenters +epilog +epilogs +epitomize +epitomized +epitomizes +epitomizing +equalization +equalize +equalized +equalizer +equalizers +equalizes +equalizing +eulogize +eulogized +eulogizes +eulogizing +evangelize +evangelized +evangelizes +evangelizing +exorcize +exorcized +exorcizes +exorcizing +extemporization +extemporize +extemporized +extemporizes +extemporizing +externalization +externalizations +externalize +externalized +externalizes +externalizing +factorize +factorized +factorizes +factorizing +fecal +feces +familiarization +familiarize +familiarized +familiarizes +familiarizing +fantasize +fantasized +fantasizes +fantasizing +favor +favorable +favorably +favored +favoring +favorite +favorites +favoritism +favors +feminize +feminized +feminizes +feminizing +fertilization +fertilize +fertilized +fertilizer +fertilizers +fertilizes +fertilizing +fervor +fiber +fiberglass +fibers +fictionalization +fictionalizations +fictionalize +fictionalized +fictionalizes +fictionalizing +filet +fileted +fileting +filets +finalization +finalize +finalized +finalizes +finalizing +flutist +flutists +flavor +flavored +flavoring +flavorings +flavorless +flavors +flavorsome +flier / flyer +fetal +fetid +fetus +fetuses +formalization +formalize +formalized +formalizes +formalizing +fossilization +fossilize +fossilized +fossilizes +fossilizing +fraternization +fraternize +fraternized +fraternizes +fraternizing +fulfill +fulfillment +fulfills +funneled +funneling +galvanize +galvanized +galvanizes +galvanizing +gamboled +gamboling +jail +jailbird +jailbirds +jailbreak +jailbreaks +jailed +jailer +jailers +jailing +jails +gasses +gage +gaged +gages +gaging +generalization +generalizations +generalize +generalized +generalizes +generalizing +ghettoize +ghettoized +ghettoizes +ghettoizing +gypsies +glamorize +glamorized +glamorizes +glamorizing +glamor +globalization +globalize +globalized +globalizes +globalizing +gluing +goiter +goiters +gonorrhea +gram +grams +graveled +gray +grayed +graying +grayish +grayness +grays +groveled +groveling +groin +groins +grueling +gruelingly +griffin +griffins +gynecological +gynecologist +gynecologists +gynecology +hematological +hematologist +hematologists +hematology +hemoglobin +hemophilia +hemophiliac +hemophiliacs +hemorrhage +hemorrhaged +hemorrhages +hemorrhaging +hemorrhoids +harbor +harbored +harboring +harbors +harmonization +harmonize +harmonized +harmonizes +harmonizing +homeopath +homeopathic +homeopaths +homeopathy +homogenize +homogenized +homogenizes +homogenizing +honor +honorable +honorably +honored +honoring +honors +hospitalization +hospitalize +hospitalized +hospitalizes +hospitalizing +humanize +humanized +humanizes +humanizing +humor +humored +humoring +humorless +humors +hybridize +hybridized +hybridizes +hybridizing +hypnotize +hypnotized +hypnotizes +hypnotizing +hypothesize +hypothesized +hypothesizes +hypothesizing +idealization +idealize +idealized +idealizes +idealizing +idolize +idolized +idolizes +idolizing +immobilization +immobilize +immobilized +immobilizer +immobilizers +immobilizes +immobilizing +immortalize +immortalized +immortalizes +immortalizing +immunization +immunize +immunized +immunizes +immunizing +impaneled +impaneling +imperiled +imperiling +individualize +individualized +individualizes +individualizing +industrialize +industrialized +industrializes +industrializing +inflection +inflections +initialize +initialized +initializes +initializing +initialed +initialing +install +installment +installments +installs +instill +instills +institutionalization +institutionalize +institutionalized +institutionalizes +institutionalizing +intellectualize +intellectualized +intellectualizes +intellectualizing +internalization +internalize +internalized +internalizes +internalizing +internationalization +internationalize +internationalized +internationalizes +internationalizing +ionization +ionize +ionized +ionizer +ionizers +ionizes +ionizing +italicize +italicized +italicizes +italicizing +itemize +itemized +itemizes +itemizing +jeopardize +jeopardized +jeopardizes +jeopardizing +jeweled +jeweler +jewelers +jewelry +judgment +kilogram +kilograms +kilometer +kilometers +labeled +labeling +labor +labored +laborer +laborers +laboring +labors +lackluster +legalization +legalize +legalized +legalizes +legalizing +legitimize +legitimized +legitimizes +legitimizing +leukemia +leveled +leveler +levelers +leveling +libeled +libeling +libelous +liberalization +liberalize +liberalized +liberalizes +liberalizing +license +licensed +licenses +licensing +likable +lionization +lionize +lionized +lionizes +lionizing +liquidize +liquidized +liquidizer +liquidizers +liquidizes +liquidizing +liter +liters +localize +localized +localizes +localizing +louver +louvered +louvers +luster +magnetize +magnetized +magnetizes +magnetizing +maneuverability +maneuverable +maneuver +maneuvered +maneuvers +maneuvering +maneuverings +marginalization +marginalize +marginalized +marginalizes +marginalizing +marshaled +marshaling +marveled +marveling +marvelous +marvelously +materialization +materialize +materialized +materializes +materializing +maximization +maximize +maximized +maximizes +maximizing +meager +mechanization +mechanize +mechanized +mechanizes +mechanizing +medieval +memorialize +memorialized +memorializes +memorializing +memorize +memorized +memorizes +memorizing +mesmerize +mesmerized +mesmerizes +mesmerizing +metabolize +metabolized +metabolizes +metabolizing +meter +meters +micrometer +micrometers +militarize +militarized +militarizes +militarizing +milligram +milligrams +milliliter +milliliters +millimeter +millimeters +miniaturization +miniaturize +miniaturized +miniaturizes +miniaturizing +minibusses +minimize +minimized +minimizes +minimizing +misbehavior +misdemeanor +misdemeanors +misspelled +miter +miters +mobilization +mobilize +mobilized +mobilizes +mobilizing +modeled +modeler +modelers +modeling +modernize +modernized +modernizes +modernizing +moisturize +moisturized +moisturizer +moisturizers +moisturizes +moisturizing +monolog +monologs +monopolization +monopolize +monopolized +monopolizes +monopolizing +moralize +moralized +moralizes +moralizing +motorized +mold +molded +molder +moldered +moldering +molders +moldier +moldiest +molding +moldings +molds +moldy +molt +molted +molting +molts +mustache +mustached +mustaches +mustachioed +multicolored +nationalization +nationalizations +nationalize +nationalized +nationalizes +nationalizing +naturalization +naturalize +naturalized +naturalizes +naturalizing +neighbor +neighborhood +neighborhoods +neighboring +neighborliness +neighborly +neighbors +neutralization +neutralize +neutralized +neutralizes +neutralizing +normalization +normalize +normalized +normalizes +normalizing +odor +odorless +odors +esophagus +esophaguses +estrogen +offense +offenses +omelet +omelets +optimize +optimized +optimizes +optimizing +organization +organizational +organizations +organize +organized +organizer +organizers +organizes +organizing +orthopedic +orthopedics +ostracize +ostracized +ostracizes +ostracizing +outmaneuver +outmaneuvered +outmaneuvers +outmaneuvering +overemphasize +overemphasized +overemphasizes +overemphasizing +oxidization +oxidize +oxidized +oxidizes +oxidizing +pederast +pederasts +pediatric +pediatrician +pediatricians +pediatrics +pedophile +pedophiles +pedophilia +paleolithic +paleontologist +paleontologists +paleontology +paneled +paneling +panelist +panelists +paralyze +paralyzed +paralyzes +paralyzing +parceled +parceling +parlor +parlors +particularize +particularized +particularizes +particularizing +passivization +passivize +passivized +passivizes +passivizing +pasteurization +pasteurize +pasteurized +pasteurizes +pasteurizing +patronize +patronized +patronizes +patronizing +patronizingly +pedaled +pedaling +pedestrianization +pedestrianize +pedestrianized +pedestrianizes +pedestrianizing +penalize +penalized +penalizes +penalizing +penciled +penciling +personalize +personalized +personalizes +personalizing +pharmacopeia +pharmacopeias +philosophize +philosophized +philosophizes +philosophizing +filter +filters +phony +plagiarize +plagiarized +plagiarizes +plagiarizing +plow +plowed +plowing +plowman +plowmen +plows +plowshare +plowshares +polarization +polarize +polarized +polarizes +polarizing +politicization +politicize +politicized +politicizes +politicizing +popularization +popularize +popularized +popularizes +popularizing +pouf +poufs +practice +practiced +practices +practicing +presidium +presidiums +pressurization +pressurize +pressurized +pressurizes +pressurizing +pretense +pretenses +primeval +prioritization +prioritize +prioritized +prioritizes +prioritizing +privatization +privatizations +privatize +privatized +privatizes +privatizing +professionalization +professionalize +professionalized +professionalizes +professionalizing +program +programs +prolog +prologs +propagandize +propagandized +propagandizes +propagandizing +proselytize +proselytized +proselytizer +proselytizers +proselytizes +proselytizing +psychoanalyze +psychoanalyzed +psychoanalyzes +psychoanalyzing +publicize +publicized +publicizes +publicizing +pulverization +pulverize +pulverized +pulverizes +pulverizing +pummel +pummeled +pajama +pajamas +pizzazz +quarreled +quarreling +radicalize +radicalized +radicalizes +radicalizing +rancor +randomize +randomized +randomizes +randomizing +rationalization +rationalizations +rationalize +rationalized +rationalizes +rationalizing +raveled +raveling +realizable +realization +realizations +realize +realized +realizes +realizing +recognizable +recognizably +recognizance +recognize +recognized +recognizes +recognizing +reconnoiter +reconnoitered +reconnoiters +reconnoitering +refueled +refueling +regularization +regularize +regularized +regularizes +regularizing +remodeled +remodeling +remold +remolded +remolding +remolds +reorganization +reorganizations +reorganize +reorganized +reorganizes +reorganizing +reveled +reveler +revelers +reveling +revitalize +revitalized +revitalizes +revitalizing +revolutionize +revolutionized +revolutionizes +revolutionizing +rhapsodize +rhapsodized +rhapsodizes +rhapsodizing +rigor +rigors +ritualized +rivaled +rivaling +romanticize +romanticized +romanticizes +romanticizing +rumor +rumored +rumors +saber +sabers +saltpeter +sanitize +sanitized +sanitizes +sanitizing +satirize +satirized +satirizes +satirizing +savior +saviors +savor +savored +savories +savoring +savors +savory +scandalize +scandalized +scandalizes +scandalizing +skeptic +skeptical +skeptically +skepticism +skeptics +scepter +scepters +scrutinize +scrutinized +scrutinizes +scrutinizing +secularization +secularize +secularized +secularizes +secularizing +sensationalize +sensationalized +sensationalizes +sensationalizing +sensitize +sensitized +sensitizes +sensitizing +sentimentalize +sentimentalized +sentimentalizes +sentimentalizing +sepulcher +sepulchers +serialization +serializations +serialize +serialized +serializes +serializing +sermonize +sermonized +sermonizes +sermonizing +sheik +shoveled +shoveling +shriveled +shriveling +signalize +signalized +signalizes +signalizing +signaled +signaling +smolder +smoldered +smoldering +smolders +sniveled +sniveling +snorkeled +snorkeling +snowplow +snowplow +socialization +socialize +socialized +socializes +socializing +sodomize +sodomized +sodomizes +sodomizing +solemnize +solemnized +solemnizes +solemnizing +somber +specialization +specializations +specialize +specialized +specializes +specializing +specter +specters +spiraled +spiraling +splendor +splendors +squirreled +squirreling +stabilization +stabilize +stabilized +stabilizer +stabilizers +stabilizes +stabilizing +standardization +standardize +standardized +standardizes +standardizing +stenciled +stenciling +sterilization +sterilizations +sterilize +sterilized +sterilizer +sterilizers +sterilizes +sterilizing +stigmatization +stigmatize +stigmatized +stigmatizes +stigmatizing +story +stories +subsidization +subsidize +subsidized +subsidizer +subsidizers +subsidizes +subsidizing +succor +succored +succoring +succors +sulfate +sulfates +sulfide +sulfides +sulfur +sulfurous +summarize +summarized +summarizes +summarizing +swiveled +swiveling +symbolize +symbolized +symbolizes +symbolizing +sympathize +sympathized +sympathizer +sympathizers +sympathizes +sympathizing +synchronization +synchronize +synchronized +synchronizes +synchronizing +synthesize +synthesized +synthesizer +synthesizers +synthesizes +synthesizing +siphon +siphoned +siphoning +siphons +systematization +systematize +systematized +systematizes +systematizing +tantalize +tantalized +tantalizes +tantalizing +tantalizingly +tasseled +technicolor +temporize +temporized +temporizes +temporizing +tenderize +tenderized +tenderizes +tenderizing +terrorize +terrorized +terrorizes +terrorizing +theater +theatergoer +theatergoers +theaters +theorize +theorized +theorizes +theorizing +ton +tons +toweled +toweling +toxemia +tranquilize +tranquilized +tranquilizer +tranquilizers +tranquilizes +tranquilizing +tranquility +tranquilize +tranquilized +tranquilizer +tranquilizers +tranquilizes +tranquilizing +tranquility +transistorized +traumatize +traumatized +traumatizes +traumatizing +traveled +traveler +travelers +traveling +travelog +travelogs +trialed +trialing +tricolor +tricolors +trivialize +trivialized +trivializes +trivializing +tumor +tumors +tunneled +tunneling +tyrannize +tyrannized +tyrannizes +tyrannizing +tire +tires +unauthorized +uncivilized +underutilized +unequaled +unfavorable +unfavorably +unionization +unionize +unionized +unionizes +unionizing +unorganized +unraveled +unraveling +unrecognizable +unrecognized +unrivaled +unsavory +untrammeled +urbanization +urbanize +urbanized +urbanizes +urbanizing +utilizable +utilization +utilize +utilized +utilizes +utilizing +valor +vandalize +vandalized +vandalizes +vandalizing +vaporization +vaporize +vaporized +vaporizes +vaporizing +vapor +vapors +verbalize +verbalized +verbalizes +verbalizing +victimization +victimize +victimized +victimizes +victimizing +videodisk +videodisks +vigor +visualization +visualizations +visualize +visualized +visualizes +visualizing +vocalization +vocalizations +vocalize +vocalized +vocalizes +vocalizing +vulcanized +vulgarization +vulgarize +vulgarized +vulgarizes +vulgarizing +wagon +wagons +watercolor +watercolors +weaseled +weaseling +westernization +westernize +westernized +westernizes +westernizing +womanize +womanized +womanizer +womanizers +womanizes +womanizing +woolen +woolens +woolies +wooly +worshiped +worshiping +worshiper +yodeled +yodeling +yogurt +yogurts +yogurt +yogurts + + +for $x in $list1//*:uk +let $count-uk := count($list1/*:uk) +let $pos := ($count-uk - count($x/following-sibling::*:uk)) +let $us := $list2/*:us[position() = $pos] +return if ($us/@class) then () +else + + + diff --git a/unlink-refs.xq b/unlink-refs.xq new file mode 100644 index 0000000..f78440c --- /dev/null +++ b/unlink-refs.xq @@ -0,0 +1,9 @@ +for $x in collection('plos-xml')//*:article +let $r := count(for $y in $x//*:ref + let $id := $y/@id + return if ($y/ancestor::*:article//*:xref[@rid = $id]) then () + else $x + ) +return +if ($r = 0) then () +else $r \ No newline at end of file diff --git a/update-articles-db.xq b/update-articles-db.xq new file mode 100644 index 0000000..8af2057 --- /dev/null +++ b/update-articles-db.xq @@ -0,0 +1,14 @@ +let $db := 'articles' +let $article-store := '/Users/fredatherden/Documents/GitHub/elife-article-xml/articles' +let $list := { + for $x in collection($db)//*:article + return {$x/base-uri()} +} + +for $x in file:list($article-store) +let $uri := ('/'||$db||'/'||$x) +let $xml := doc(concat($article-store,'/',$x)) +return +if (not(matches($x,'\.xml$'))) then () +else if ($uri = $list//*:item/text()) then () +else db:replace($db,$x,$xml) \ No newline at end of file diff --git a/update-biorxiv-db.xq b/update-biorxiv-db.xq new file mode 100644 index 0000000..7734d45 --- /dev/null +++ b/update-biorxiv-db.xq @@ -0,0 +1,6 @@ +let $db := 'biorxiv' +let $dir := '/Users/fredatherden/Documents/biorxiv-xml/xml/' + +for $file in file:list($dir) +let $xml := doc($dir||$file) +return db:replace($db,$file,$xml) \ No newline at end of file diff --git a/update-jats-support-tests.xq b/update-jats-support-tests.xq new file mode 100644 index 0000000..27eb46b --- /dev/null +++ b/update-jats-support-tests.xq @@ -0,0 +1,13 @@ +let $path := '/Users/fredatherden/Documents/GitHub/jats-support-2/tests/cases/contrib-group' + +for $x in file:list($path) +let $doc := doc($path||'/'||$x) +let $new-doc := copy $copy := $doc +modify( + for $root in $copy/*[1] + return + insert node (processing-instruction {'expected-error'}{('message="'||' in <> is ignored."'||' node="'||'/contrib-group"')},' ',' ') before $root +) +return $copy + +return file:write(($path||'/'||$x),$new-doc) \ No newline at end of file diff --git a/validate.xq b/validate.xq new file mode 100644 index 0000000..8db4031 --- /dev/null +++ b/validate.xq @@ -0,0 +1,28 @@ +(: In order for this query to functino you have to installed the schematron module: +'repo:install('https://github.com/Schematron/schematron-basex/raw/master/dist/schematron-basex-1.2.xar')' +:) + +import module namespace schematron = "http://github.com/Schematron/schematron-basex"; + +let $xml := doc('/Users/fredatherden/desktop/elife51101.xml') + +let $sch := schematron:compile(doc('/Users/fredatherden/Documents/GitHub/eLife-JATS-schematron/src/pre-JATS-schematron.sch')) + +let $svrl := schematron:validate($xml, $sch) + +let $report-1 := {$svrl//(*:failed-assert|*:successful-report)} + +let $report-2 := copy $copy := $report-1 +modify( + for $x in $copy//*:failed-assert[@id="gen-country-test"] + return delete node $x, + + for $y in $copy//(*:failed-assert|*:successful-report) + return delete node $y/@test +) +return $copy + +return $report-2 + + + diff --git a/validate2-example.xq b/validate2-example.xq new file mode 100644 index 0000000..85bf845 --- /dev/null +++ b/validate2-example.xq @@ -0,0 +1,15 @@ +(: In order for this query to functino you have to installed the schematron module: +'repo:install('https://github.com/Schematron/schematron-basex/raw/master/dist/schematron-basex-1.2.xar')' +:) + +import module namespace schematron = "http://github.com/Schematron/schematron-basex"; + +let $xsl := schematron:compile(doc('/Users/fredatherden/Desktop/test2.sch')) +let $dir := '/Users/fredatherden/Desktop/test2/' + +for $x in collection('articles')//*:article[*:body] +let $output := xslt:transform($x,$xsl) +let $name := substring-after($x/base-uri(),'articles/') +return +if ($output//*:failed-assert[not(contains(@location,'object-id'))]) then file:write(($dir||$name),$output) +else () \ No newline at end of file