Skip to content

Instantly share code, notes, and snippets.


Joe Wicentowski joewiz

  • Arlington, Virginia
View GitHub Profile
ubermichael / build.xml
Last active May 13, 2022
Example of an ant build.xml file for uploading files to eXistDb with credentials stored in a properties file
View build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project default="xar" name="wilde" xmlns:xdb="">
<description>Wilde Trials International News Archive</description>
<property name="host" value="localhost"/>
<property file="${host}.properties"/>
<path id="classpath.core">
<fileset dir="${local.dir}/lib">
<include name="*.jar"/>
wsalesky / xformsRepeats.xhtml
Created Feb 1, 2022
XForms repeats following XML document order.
View xformsRepeats.xhtml
<html xmlns="" xmlns:ev="" xmlns:xsd="" xmlns:xf="" xmlns:xsi="">
<title>Insert with Origin</title>
<style type="text/css">
@namespace xf url("");
body {font-family:Helvetica, sans-serif}
<xf:instance id="i-rec">
<TEI xmlns="">
line-o / dicey.xq
Last active May 5, 2021
dicey - use randomness with comfort
View dicey.xq
xquery version "3.1";
declare namespace dicey="";
declare function dicey:sequence ($n as xs:integer,
$generator as map(xs:string, item())) as item()* {
1 to $n,
map { "sequence": (), "generator": $generator},
View create-stats.xq
xquery version "3.1";
map {
"date" : current-dateTime(),
"packages" : array {
for $get-package-event in collection("/db/apps/public-repo-data/logs")//type[.="get-package"]/..
group by $name := $get-package-event/package-name/string()
let $event-count := count($get-package-event)
order by $event-count descending
View eXide-customCSS.css
#toolbar-current-app {
color:red !important;
border-radius: 5px;
padding-left: 5px;
padding-right: 5px;
border: 1px solid #f1c871;
line-o / fib-exist.xq
Last active Oct 12, 2020 — forked from joewiz/fib-exist.xq
XQuery Fibonacci reducer function, with timing, for eXist-db
View fib-exist.xq
xquery version "3.1";
(: adapted from :)
declare function local:fib-reducer ($r, $n) { $r[1] + $r[2], $r[1] };
declare function local:fib($n as xs:integer) {
fold-left((1 to $n), (0,1), local:fib-reducer#2)[1]
let $results :=
apb2006 / fib.xq
Created Oct 9, 2020
XQuery tail recursive Fibonacci function
View fib.xq
declare function local:fib($n as xs:integer, $a as xs:integer, $b as xs:integer){
switch ($n)
case 0 return $a
case 1 return $b
default return local:fib($n - 1, $b, $a + $b)
declare function local:fib($n as xs:integer){
benibela / json-xml.xqm
Last active Sep 29, 2020 — forked from joewiz/json-xml.xqm
An implementation of XQuery 3.1's fn:json-to-xml and fn:xml-to-json functions
View json-xml.xqm
xquery version "3.1";
: An implementation of XQuery 3.1"s fn:json-to-xml and fn:xml-to-json functions for eXist, which does not support them natively as of 4.3.0, and Xidel.
: @author Joe Wicentowski, Benito van der Zander
: @version 0.6
: @see
module namespace jx = "";
jamescummings / tei_minimal-new.odd
Created Jun 23, 2019
A proposed new tei_minimal.odd which really is minimal
View tei_minimal-new.odd
<?xml version="1.0" encoding="UTF-8"?>
<TEI xmlns="">
<title>TEI Minimal</title>
<author>James Cummings</author>
<publisher>TEI Consortium</publisher>
luisenriquecorona / Sales.CustomerOrderSummary.sql
Created May 1, 2019
To demonstrate the use of the XQuery methods in this chapter, we will create a table in the WideWorldImporters database, called Sales. CustomerOrderSummary. This table can be created using the script
View Sales.CustomerOrderSummary.sql
USE WideWorldImporters
CREATE TABLE Sales.CustomerOrderSummary
OrderSummary XML
INSERT INTO Sales.CustomerOrderSummary (CustomerID,