Last active
March 9, 2016 18:53
-
-
Save mathias-goebel/1904d32cce00d68cce86 to your computer and use it in GitHub Desktop.
DHd2016.XQuery
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"; | |
let $url := xs:anyURI('https://www.conftool.pro/dhd2016/sessions.php'), | |
$persist:= false(), | |
$request-headers := (), | |
$node as node() := httpclient:get($url, $persist, $request-headers)//httpclient:body/*, | |
$origList := tokenize( | |
string-join( | |
$node//*[contains(@class, 'paper_author')]/ | |
string-join( | |
replace(., '\d', '') | |
) | |
, ',') | |
, ',') | |
return | |
for $i in distinct-values($origList) | |
where count( $origList[. = $i] ) eq 4 | |
return | |
$i |
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"; | |
let $url := xs:anyURI('https://www.conftool.pro/dhd2016/sessions.php'), | |
$persist:= false(), | |
$request-headers := (), | |
$node as node() := httpclient:get($url, $persist, $request-headers)//httpclient:body/*, | |
$origList := tokenize( | |
string-join( | |
$node//*[contains(@class, 'paper_organisation')]/ | |
string-join( | |
replace(., '\d|:|Germany|Schweiz|Deutschland|Österreich', '') | |
) | |
, ',') | |
, ',') | |
return | |
for $i in distinct-values($origList) | |
where count( $origList[. = $i] ) eq 5 | |
return | |
$i |
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"; | |
let $url := xs:anyURI('https://www.conftool.pro/dhd2016/sessions.php'), | |
$persist:= false(), | |
$request-headers := (), | |
$node as node() := httpclient:get($url, $persist, $request-headers)//httpclient:body/*, | |
$origList := $node//span[starts-with(., 'Ort:')]/following::*[1]/text() | |
return | |
for $i in distinct-values($origList) | |
where count( $origList[. = $i] ) gt 6 | |
return | |
$i || ': ' || count( $origList[. = $i] ) |
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"; | |
let $url := xs:anyURI('https://www.conftool.pro/dhd2016/sessions.php'), | |
$persist:= false(), | |
$request-headers := (), | |
$node as node() := httpclient:get($url, $persist, $request-headers)//httpclient:body/*, | |
$origList := tokenize( | |
lower-case( | |
replace( | |
string-join( | |
$node//text() | |
) | |
, '\.|,|:|\(|\)|<|>|!|/|-|;|#|=|\}|\{|\-', '') | |
) | |
, ' ') | |
return | |
for $i in distinct-values($origList)[. != ''][. != ' '] | |
let $test := count( $origList[. = $i] ) | |
where $test gt 10 | |
return | |
$i || ': ' || $test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment