eXist-db scripts to install and run eXist-db as a service on Windows operating systems.
These scripts should be placed in the "bin" folder of eXsit-db, for example after downloading and unzipping exist-distribution-6.0.1-win.zip from GitHub.
eXist-db scripts to install and run eXist-db as a service on Windows operating systems.
These scripts should be placed in the "bin" folder of eXsit-db, for example after downloading and unzipping exist-distribution-6.0.1-win.zip from GitHub.
import module namespace functx = "http://www.functx.com"; | |
(: NOTE -- functx uses 1 to 7 to represent MON-SUN, whereas eXist-db's datetime module used 1 to 7 to represent SUN-SAT :) | |
declare variable $local:MON := 1; | |
declare variable $local:TUES := 2; | |
declare variable $local:WEDS := 3; | |
declare variable $local:THURS := 4; | |
declare variable $local:FRI := 5; | |
declare variable $local:SAT := 6; |
xquery version "3.1"; | |
(:~ | |
Calculate Levenshtein Distance, using XQuery | |
@author Guillaume Mella | |
@see http://apps.jmmc.fr/~mellag/xquery/levenshtein/2018/01/19/xquery-levenshtein-distance/ | |
:) | |
declare function local:levenshtein-distance($string1 as xs:string?, $string2 as xs:string?) | |
as xs:integer |
A query to read the results of https://gist.github.com/joewiz/4ce1a564553d954855fe7500989afe22 and generate a report about function signature mismatches between the W3C XPath & XQuery Functions & Operators spec and eXist's implementation.
xquery version "3.1"; | |
(: List all collation locales available for use in the '?lang=' parameter of a collation URI. | |
: @see http://exist-db.org/exist/apps/doc/xquery.xml#collations | |
: @see http://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/util#collations.0 | |
:) | |
element collations { | |
for $collation in util:collations() | |
order by $collation |
xquery version "3.1"; | |
element modules { | |
util:registered-modules()[starts-with(., 'http://www.w3')] ! | |
element module { | |
element namespace-uri {.}, | |
util:registered-functions(.) ! | |
element function {.} | |
} | |
} |
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. | |
: | |
: @author Joe Wicentowski | |
: @version 0.4 | |
: @see http://www.w3.org/TR/xpath-functions-31/#json | |
:) | |
module namespace jx = "http://joewiz.org/ns/xquery/json-xml"; |
xquery version "3.0"; | |
(:module namespace gitsync = "http://syriaca.org/ns/gitsync";:) | |
(:~ | |
: XQuery endpoint to respond to Github webhook requests. Query responds only to push requests. | |
: The EXPath Crypto library supplies the HMAC-SHA1 algorithm for matching Github secret. | |
: | |
: Secret can be stored as environmental variable. | |
: Will need to be run with administrative privileges, suggest creating a git user with privileges only to relevant app. |
xquery version "3.0"; | |
import module namespace http = "http://expath.org/ns/http-client"; | |
let $url := 'http://history.state.gov/education/modules/border-vanishes-intro' | |
let $links := doc($url)//*:a[ends-with(@href, '.pdf')] | |
return | |
<results n="{count($links)}">{ | |
for $link in $links | |
let $href := if (starts-with($link/@href, '//')) then concat('http:', $link/@href) else $link/@href/string() |
Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.
From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:
1. (On a mac): Command-option-J
2. (On a PC): Control-alt-J