View build.xml
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project default="xar" name="wilde" xmlns:xdb="http://exist-db.org/ant"> | |
<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"/> |
View xformsRepeats.xhtml
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
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<head> | |
<title>Insert with Origin</title> | |
<style type="text/css"> | |
@namespace xf url("http://www.w3.org/2002/xforms"); | |
body {font-family:Helvetica, sans-serif} | |
</style> | |
<xf:model> | |
<xf:instance id="i-rec"> | |
<TEI xmlns="http://www.tei-c.org/ns/1.0"> |
View dicey.xq
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 dicey="http://line-o.de/ns/dicey"; | |
declare function dicey:sequence ($n as xs:integer, | |
$generator as map(xs:string, item())) as item()* { | |
fold-left( | |
1 to $n, | |
map { "sequence": (), "generator": $generator}, | |
dicey:reducer#2 |
View create-stats.xq
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"; | |
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 | |
return |
View eXide-customCSS.css
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
#toolbar-current-app { | |
color:red !important; | |
background-color:yellow; | |
border-radius: 5px; | |
padding-left: 5px; | |
padding-right: 5px; | |
border: 1px solid #f1c871; | |
} |
View fib-exist.xq
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"; | |
(: adapted from https://stackoverflow.com/a/4936099 :) | |
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 := |
View fib.xq
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
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){ | |
local:fib($n,0,1) | |
}; |
View json-xml.xqm
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"; | |
(:~ | |
: 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 http://www.w3.org/TR/xpath-functions-31/#json | |
:) | |
module namespace jx = "http://joewiz.org/ns/xquery/json-xml"; |
View tei_minimal-new.odd
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
<?xml version="1.0" encoding="UTF-8"?> | |
<TEI xmlns="http://www.tei-c.org/ns/1.0"> | |
<teiHeader> | |
<fileDesc> | |
<titleStmt> | |
<title>TEI Minimal</title> | |
<author>James Cummings</author> | |
</titleStmt> | |
<publicationStmt> | |
<publisher>TEI Consortium</publisher> |
View Sales.CustomerOrderSummary.sql
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
USE WideWorldImporters | |
GO | |
CREATE TABLE Sales.CustomerOrderSummary | |
( | |
ID INT NOT NULL IDENTITY, | |
CustomerID INT NOT NULL, | |
OrderSummary XML | |
); | |
INSERT INTO Sales.CustomerOrderSummary (CustomerID, | |
OrderSummary) |
NewerOlder