url | test | status |
---|---|---|
/resources | pass | 200 |
/resources/ | fail | 405 |
/resources?query=a | pass | 200 |
/resources/?query=a | fail | 405 |
/resources/a | pass | 200 |
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'; | |
(:~ | |
this script must be run with a user in the DBA group | |
add this line to your post-install script or run it manually | |
it will set the GID sticky bit | |
chown('/path/to/this/script.xq', 'admin', 'dba') | |
chmod('/path/to/this/script.xq', 'rwxr-S---') | |
:) |
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"; | |
(:~ | |
: POC: XQuery to commit content to github reop via github API. Tested in eXist-db v4.4.0 | |
: Code creates a new branch off of the master branch, commits updated content to the new branch | |
: and then submits a pull request when complete. Intended use is for online data submission, | |
: using GitHub for review/approval process. | |
: | |
: Prerequisites: | |
: In order to run the module, you will need a github Authorization token. |
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
(: 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( |
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
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
prefix cwrc: <http://sparql.cwrc.ca/ontologies/cwrc#> | |
prefix dcterms: <http://purl.org/dc/terms/> | |
prefix lawd: <http://lawd.info/ontology/> | |
prefix person: <https://www.w3.org/ns/person> | |
prefix skos: <http://www.w3.org/2004/02/skos/core#> | |
prefix snap: <http://data.snapdrgn.net/ontology/snap#> | |
prefix syriaca: <http://syriaca.org/schema#> | |
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"; | |
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 { |
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"; | |
(:~ | |
This XQuery library module transforms an XML Schema to a JSON Schema equivalent. | |
NOTE: This is a work in progress. I would appreciate any comments to make it more robust. | |
To execute the transformation, place the followin in another XQuery module. | |
xquery version "3.1"; | |
import module namespace xsd2json="http://easymetahub.com/ns/xsd2json" at "xsd2json.xqy"; |
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"; | |
(:~ | |
: Webhook endpoint for tcadrt.com data repository, /master/ branch: | |
: XQuery endpoint to respond to Github webhook requests. Query responds only to push requests from the master branch. | |
: 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. | |
: |
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
(: | |
Copyright (c) 2017. EasyMetaHub, LLC | |
This work is licensed under a | |
<a rel="license" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>. | |
:) | |
xquery version "3.1"; | |
(:~ | |
This library module walks an XML Schema and generates the stubs for a typeswitch |
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 namespace dp='https://history.state.gov/ns/xquery/date-processing' :) | |
declare variable $local:regexes := | |
map { | |
"month-regex" : "(?:January|February|March|April|May|June|July|August|September|October|November|December)", | |
"month-regex-fr" : "(?:janvier|février|fevrier|mart|avril|mai|juin|juillet|août|aout|septembre|octobre|novembre|décembre|decembre)", | |
"month-regex-sp" : "(?:enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|setiembre|octubre|noviembre|diciembre)", | |
"day-regex" : "(?:\d{1,2})(?:st|d|nd|rd|th)?", | |
"day-range-regex" : "(?:\d{1,2})(?:st|d|nd|rd|th)?\s*[-–—]\s*(?:\d{1,2})(?:st|d|nd|rd|th)?", | |
"year-regex" : "(?:\d{4})", |