Skip to content

Instantly share code, notes, and snippets.

@CliffordAnderson
Created February 10, 2014 22:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CliffordAnderson/8925915 to your computer and use it in GitHub Desktop.
Save CliffordAnderson/8925915 to your computer and use it in GitHub Desktop.
Here's the query we started in class today.
xquery version "3.0";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
let $tei := fn:doc("db/test/tei.xml")
let $title := $tei/tei:TEI/tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title/text()
let $author := $tei/tei:TEI/tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:author/text()
return ($author, $title)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment