Skip to content

Instantly share code, notes, and snippets.

@kschlottmann
Created September 26, 2018 16:51
Show Gist options
  • Select an option

  • Save kschlottmann/d022243016d094a9eb30215dd06a42ce to your computer and use it in GitHub Desktop.

Select an option

Save kschlottmann/d022243016d094a9eb30215dd06a42ce to your computer and use it in GitHub Desktop.
xquery version "3.0";
for $resource in /json/_
(: let $label := $resource/notes/_/label[contains(., 'Summary')]
let $type := $resource/notes/_/type[contains(., 'scopecontent')] :)
(: let $label := $resource/notes/_/label[contains(., 'Scope')]:)
let $type := $resource/notes/_/type[../label[contains(., 'Scope') or contains(., 'Summary')]]
let $title := $resource/title
let $bib := $resource/user__defined/integer__1
return
<r>
<p>{data($type)}</p>
<i>{data($title)}</i>
<b>{data($bib)}</b>
<repo>Burke</repo>
</r>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment