Skip to content

Instantly share code, notes, and snippets.

View dizzzz's full-sized avatar

Dannes Wessels dizzzz

View GitHub Profile
@dizzzz
dizzzz / duplicates_in_sequence.xq
Last active March 18, 2024 17:33
xquery find duplicates in sequence
(: wolfgang :)
for $i in (1, 5, 2, 4, 5)
group by $j := $i
return
    $j || ": " || count($i)
(: adam :)
let $seq := (1, 5, 2, 4, 5)
return
    distinct-values(
@dizzzz
dizzzz / functionSignatureTests.xquery
Last active October 23, 2020 19:39
A script to generate function-signature-tests for xquery functions in eXist-db
xquery version "3.1";
module namespace xqfunctions="http://exist-db.org/xquery/test/xqfunctions";
import module namespace inspect="http://exist-db.org/xquery/inspection" at "java:org.exist.xquery.functions.inspect.InspectionModule";
declare namespace test="http://exist-db.org/xquery/xqsuite";
declare function xqfunctions:cardinality($cardinality as xs:string) as xs:string {
@dizzzz
dizzzz / log4j.xml
Created November 20, 2016 10:19
eXist-db v2.2: set messaging/replication loglevel to debug
<!-- messaging -->
<category name="com.exist.jms" additivity="false">
<priority value="debug"/>
<appender-ref ref="exist.core"/>
</category>