Skip to content

Instantly share code, notes, and snippets.

@davidamichelson
Created June 21, 2016 19:03
Show Gist options
  • Save davidamichelson/985fccd6bb82ec338d3c2a48d16abee0 to your computer and use it in GitHub Desktop.
Save davidamichelson/985fccd6bb82ec338d3c2a48d16abee0 to your computer and use it in GitHub Desktop.
xquery version "3.0";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
for $doc in fn:collection("/db/apps/incomplete-saints")//tei:TEI
let $abstract := $doc//tei:note[@type='abstract']
let $uri := $doc//tei:publicationStmt//tei:idno[@type="URI"]
let $name := $doc//tei:persName[@xml:lang="en"]
return
<tei:div>
{$uri}
{$name}
{$abstract}
</tei:div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment