textfiles-politics/xquery/net_to_tsv.xquery

10 lines
469 B
Plaintext
Raw Normal View History

2023-04-30 18:35:36 -04:00
xquery version "3.1";
let $letStringJoin := string-join(
let $conspiracyList := collection('../src-xml')//xml
for $c in $conspiracyList
let $names := $c//ent[@type='person']/text() => distinct-values()
let $file := $c ! base-uri() ! tokenize(. , "/")[last()]
for $n in $names
return concat($n, "	", "person", "	", $file, "	", "file"),"
"
)
return $letStringJoin