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" encoding "UTF-8"; | |
(:~ | |
: A public function to return the frequency of a string. | |
: | |
: @author Adam Steffanick | |
: @see https://www.steffanick.com/adam/ | |
: @version v1.0.0 | |
: | |
: @param $parameter is a string |
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
{ | |
"@context": "https://schema.org/", | |
"@id": "https://orcid.org/0000-0003-4365-3135", | |
"@type": "Person", | |
"name": [ | |
"Steven J. Baskauf", | |
"Steve Baskauf", | |
"Steven James Baskauf" | |
], | |
"familyName": "Baskauf", |
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
xquery version "3.1"; | |
declare namespace tei = "http://www.tei-c.org/ns/1.0"; | |
let $old := fn:doc("/bluemountain-transcriptions/periodicals/bmtnaab/issues/1920/02_01/bmtnaab_1920-02_01.tei.xml") | |
return | |
copy $new := $old | |
modify ( | |
delete node $new/tei:TEI/tei:facsimile, | |
delete node $new//@facs, |
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") |
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"; | |
declare namespace tei = "http://www.tei-c.org/ns/1.0"; | |
fn:collection("bluemountain-transcriptions")/tei:TEI |
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"; | |
declare function local:lookup-word($word as xs:string, $request as xs:string, $id as xs:string, $key as xs:string) { | |
let $request := | |
<http:request href="https://od-api.oxforddictionaries.com/api/v1/entries/en/{$word}/{$request}" method="get"> | |
<http:header name="app_key" value="{$key}"/> | |
<http:header name="app_id" value="{$id}"/> | |
</http:request> | |
return http:send-request($request) | |
}; |
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"; | |
declare function local:lookup-word($word as xs:string, $id as xs:string, $key as xs:string) { | |
let $request := | |
<http:request href="https://od-api.oxforddictionaries.com/api/v1/entries/en/{$word}" method="get"> | |
<http:header name="app_key" value="{$key}"/> | |
<http:header name="app_id" value="{$id}"/> | |
</http:request> | |
return http:send-request($request) | |
}; |
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"; | |
let $word := "betake" | |
let $request := | |
<http:request href="https://od-api.oxforddictionaries.com/api/v1/entries/en/{$word}" method="get"> | |
<http:header name="app_key" value="###"/> | |
<http:header name="app_id" value="###"/> | |
</http:request> | |
return http:send-request($request) |
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"; | |
declare namespace tei = "http://www.tei-c.org/ns/1.0"; | |
for $p in fn:collection("vwwp_tei")//tei:p | |
where fn:contains($p, "church") | |
return $p |
NewerOlder