-
-
Save AdamSteffanick/5f68cbe3e10ce367c0461c21013cfe8c to your computer and use it in GitHub Desktop.
Music constituents published after 1900
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare namespace tei = "http://www.tei-c.org/ns/1.0"; | |
declare function local:w3cdtf-to-xsdate($d as xs:string) as xs:date | |
{ | |
let $dstring := | |
if ($d castable as xs:gYear) then $d || "-01-01" | |
else if ($d castable as xs:gYearMonth) then $d || "-01" | |
else if ($d castable as xs:date) then $d | |
else error($d, "not valid w3cdtf") | |
return xs:date($dstring) | |
}; | |
let $issuesOfInterest := collection('/db/bmtn-data/transcriptions')//tei:date[./@when > "1900-01-01"]/ancestor::tei:TEI | |
let $AllMusicSections := $issuesOfInterest//tei:classCode[.='Music']/ancestor::tei:relatedItem[@type='constituent'] | |
return $AllMusicSections |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment