In the index.js or the root file of your cypress/support folder,
xquery version "3.1"; | |
(:~ | |
: Find possible OCR errors in a text by checking for patterns that an OCR | |
: process is known to misread, e.g., "day" misread as "clay", or "France" | |
: misread as "Prance." If the OCR engine just misread some instances of these | |
: words but got other instances correct, then this query will highlight | |
: candidates for correction. | |
: | |
: The query lets you configure a source text and define pattern sets to be used. |
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; |
NAME=newBase60 | |
CONTAINER=exDev | |
PORT=8282 | |
USE_DC_OVERRIDE=yes | |
DC_OVERRIDE_NETWORK=www |
xquery version "3.1"; | |
declare namespace io = "http://io"; | |
(: IO version of get-char :) | |
declare function local:get-char() as map(*) { | |
local:create-io(function($realworld as element(io:realworld)) { | |
($realworld, 123) | |
}) | |
}; |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<array> | |
<dict> | |
<key>ApplicationIdentifier</key> | |
<string>ro.sync.exml.DiffDirs</string> | |
<key>ApplicationName</key> | |
<string>Diff Directories</string> |
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 |
license: mit | |
height: 500 | |
scrolling: yes | |
border: yes | |
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 { |
- Created: Nov 28, 2017
- Updated: Nov 29, 2017: Now covers transformation of XML documents
Recursion is a powerful programming technique, but the idea is simple: instead of performing a single operation, a function calls itself repeatedly to whittle through a larger task. In XQuery, recursion can be used to accomplish complex tasks on data that a plain FLWOR expression (which iterates through a sequence) cannot, such as transforming an entire XML document from one format into another, like TEI or DocBook into HTML, EPUB, LaTeX, or XSL-FO. Transforming a document is well-suited to recursion because each of the document's nodes may need to be examined and manipulated based on the node's type, name, and location in the document; and once a node has been processed, the transformation must continue processing the nodes' children and descendants until the deepest leaf node has been processed. But learning the technique of recursion is often hard for a beginning program