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
let $parameter1 := "one" | |
let $parameter2 := "two" | |
let $parameter3 := "three" | |
let $boundary := current-dateTime() => util:hash("md5") => substring(0,17) | |
let $request := | |
<hc:request method="POST" href="{ $webauthUrl }" http-version="1.0"> | |
<hc:header name="Connection" value="close" /> | |
<hc:multipart media-type="multipart/form-data" boundary="------------------------{$boundary}"> | |
<hc:header name="Content-Disposition" value='form-data; name="parameter1"'/> | |
<hc:body media-type="text/plain">{$parameter1}</hc:body> |
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 $content := | |
<httpclient:fields> | |
<httpclient:field name="data" value="" type="string"/> | |
<httpclient:field name="in" value="guess" type="string"/> | |
<httpclient:field name="out" value="rdfxml" type="string"/> | |
<httpclient:field name="raw" value="1" type="string"/> | |
<httpclient:field name="uri" value="http://njh.me/" type="string"/> | |
</httpclient:fields> |
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"; | |
import module namespace functx="http://www.functx.com"; | |
declare namespace tei="http://www.tei-c.org/ns/1.0"; | |
let $path := "......../dlina/GerDraCor and Wikidata.csv" | |
let $rows := | |
(file:read-binary($path) | |
=> util:binary-to-string() | |
=> tokenize("\n"))[position() gt 1] |
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"; | |
import module namespace functx="http://www.functx.com"; | |
declare namespace tei="http://www.tei-c.org/ns/1.0"; | |
let $path := "......../dlina/GerDraCor and Wikidata.csv" | |
let $rows := | |
(file:read-binary($path) | |
=> util:binary-to-string() | |
=> tokenize("\n"))[position() gt 1] |
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 dta="http://www.dspin.de/data/textcorpus"; | |
declare function local:load-dta($source, $target) { | |
let $collection-uri := $target, | |
$directory := $source, | |
$pattern := "**/*", | |
$mime-type := "application/xml", | |
$preserve-structure := true() |
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:do($path-external as xs:string, $path-internal as xs:string) { | |
let $list := file:list( $path-external ) | |
return ( | |
for $dir in $list/file:directory | |
let $name := replace(string( $dir/@name ), "\s", "_") | |
return( |
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.0"; | |
declare namespace tei="http://www.tei-c.org/ns/1.0"; | |
(: TextGrid CRUD | |
: Store nodes in the TextGrid Repository | |
: https://textgridlab.org/doc/services/submodules/tg-crud/docs/index.html#create | |
: :) | |
(: ESX-2 = productive :) |
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.0"; | |
declare namespace ore="http://www.openarchives.org/ore/terms/"; | |
declare namespace rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; | |
declare namespace tgmd="http://textgrid.info/namespaces/metadata/core/2010"; | |
let $seq:= ("textgrid:jfsm.0", | |
"textgrid:jg0m.0", | |
"textgrid:jk7p.0", | |
"textgrid:jkhw.0", |
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.0"; | |
declare namespace tei="http://www.tei-c.org/ns/1.0"; | |
declare function local:magic($nodes as node()*) { | |
(:let $test:= console:log($nodes/local-name()):) | |
(:return:) | |
for $node in $nodes return | |
typeswitch($node) | |
case element(*) |
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.0"; | |
declare namespace tei="http://www.tei-c.org/ns/1.0"; | |
declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes"; | |
declare function local:recurse($node as node()*) as xs:string* { | |
for $n in $node | |
return( | |
'{' || | |
string-join( | |
('"name": "', $n/local-name(), '"', | |
if( not($n/*) ) |
NewerOlder