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
xquery version "3.1"; | |
(:~ | |
: A query to retrieve interesting data about | |
: music publication in the Blue Mountain | |
: data set. | |
: | |
: @author Cliff Wulfman | |
: @version 1.0 | |
: April 21, 2017 | |
:) |
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") |
NewerOlder