From 051128c16ff939d329eb0aa4ba9d9d511211b1b7 Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 11 Mar 2014 18:30:20 +0400 Subject: [PATCH 001/158] restore ie8 compatibility --- doc/site/js/main.js | 7 ++++++- index.html | 11 +++++++---- lib/ace/ext/old_ie.js | 6 ++++++ lib/ace/ext/themelist.js | 1 + lib/ace/layer/font_metrics.js | 21 ++++++++++++++------- 5 files changed, 34 insertions(+), 12 deletions(-) diff --git a/doc/site/js/main.js b/doc/site/js/main.js index 78595c6a..e6cd609c 100644 --- a/doc/site/js/main.js +++ b/doc/site/js/main.js @@ -161,7 +161,12 @@ function highlight() { var highlighter = ace.require("ace/ext/static_highlight") var dom = ace.require("ace/lib/dom") function qsa(sel) { - return [].slice.call(document.querySelectorAll(sel)); + var items = document.querySelectorAll(sel); + var result = []; + for (var i = 0; i < items.length; i++) { + result.push(items[i]); + } + return result; } qsa("code[class]").forEach(function(el) { diff --git a/index.html b/index.html index 8d65f8ea..9c416582 100644 --- a/index.html +++ b/index.html @@ -11,6 +11,9 @@ + @@ -65,7 +68,7 @@ and is the successor of the Mozilla Skywriter (Bespin) project.

-
/** +
/**
  * In fact, you're looking at ACE right now. Go ahead and play with it!
  *
  * We are currently showing off the JavaScript mode. ACE has support for 45
@@ -80,7 +83,7 @@ function add(x, y) {
 
 var addResult = add(3, 2);
 console.log(addResult);
-
+

Looking for a more full-featured demo? Check out the kitchen sink. @@ -140,7 +143,7 @@ console.log(addResult);

Embedding Ace in Your Site

Ace can be easily embedded into a web page. Get prebuilt version of ace from ace-builds repository and use the code below:

-
<!DOCTYPE html> +
<!DOCTYPE html>
 <html lang="en">
 <head>
 <title>ACE in Action</title>
@@ -168,7 +171,7 @@ console.log(addResult);
     editor.getSession().setMode("ace/mode/javascript");
 </script>
 </body>
-</html>
+</html>

Now check out the How-To Guide for instructions on common operations, such as setting a different language mode or getting the contents from the editor. diff --git a/lib/ace/ext/old_ie.js b/lib/ace/ext/old_ie.js index ca67888f..ce3f4e72 100644 --- a/lib/ace/ext/old_ie.js +++ b/lib/ace/ext/old_ie.js @@ -103,6 +103,12 @@ patch( }" ); +patch( + require("ace/mode/text").Mode.prototype, "getTokenizer", + /Tokenizer/, + "TokenizerModule.Tokenizer" +); + useragent.isOldIE = true; }); diff --git a/lib/ace/ext/themelist.js b/lib/ace/ext/themelist.js index 9eb4b71e..8914c776 100644 --- a/lib/ace/ext/themelist.js +++ b/lib/ace/ext/themelist.js @@ -41,6 +41,7 @@ define(function(require, exports, module) { "use strict"; +require("ace/lib/fixoldbrowsers"); var themeData = [ ["Chrome" ], diff --git a/lib/ace/layer/font_metrics.js b/lib/ace/layer/font_metrics.js index 45fa44cb..a65e100d 100644 --- a/lib/ace/layer/font_metrics.js +++ b/lib/ace/layer/font_metrics.js @@ -54,7 +54,7 @@ var FontMetrics = exports.FontMetrics = function(parentEl, interval) { if (!CHAR_COUNT) this.$testFractionalRect(); - this.$measureNode.textContent = lang.stringRepeat("X", CHAR_COUNT); + this.$measureNode.innerHTML = lang.stringRepeat("X", CHAR_COUNT); this.$characterSize = {width: 0, height: 0}; this.checkForSizeChanges(); @@ -121,11 +121,18 @@ var FontMetrics = exports.FontMetrics = function(parentEl, interval) { }; this.$measureSizes = function() { - var rect = this.$measureNode.getBoundingClientRect(); - var size = { - height: rect.height, - width: rect.width / CHAR_COUNT - }; + if (CHAR_COUNT === 1) { + var rect = this.$measureNode.getBoundingClientRect(); + var size = { + height: rect.height, + width: rect.width + }; + } else { + var size = { + height: this.$measureNode.clientHeight, + width: this.$measureNode.clientWidth / CHAR_COUNT + }; + } // Size and width can be null if the editor is not visible or // detached from the document if (size.width === 0 || size.height === 0) @@ -134,7 +141,7 @@ var FontMetrics = exports.FontMetrics = function(parentEl, interval) { }; this.$measureCharWidth = function(ch) { - this.$main.textContent = lang.stringRepeat(ch, CHAR_COUNT); + this.$main.innerHTML = lang.stringRepeat(ch, CHAR_COUNT); var rect = this.$main.getBoundingClientRect(); return rect.width / CHAR_COUNT; }; From 09d6741a024603ebae5bd098b3bc747ba6511713 Mon Sep 17 00:00:00 2001 From: nightwing Date: Wed, 12 Mar 2014 02:42:47 +0400 Subject: [PATCH 002/158] fix clipboard on old webkit versions --- lib/ace/keyboard/textinput.js | 92 ++++++++++++++--------------------- lib/ace/lib/useragent.js | 5 +- 2 files changed, 39 insertions(+), 58 deletions(-) diff --git a/lib/ace/keyboard/textinput.js b/lib/ace/keyboard/textinput.js index eb27026a..7cba4077 100644 --- a/lib/ace/keyboard/textinput.js +++ b/lib/ace/keyboard/textinput.js @@ -36,6 +36,7 @@ var useragent = require("../lib/useragent"); var dom = require("../lib/dom"); var lang = require("../lib/lang"); var BROKEN_SETDATA = useragent.isChrome < 18; +var USE_IE_MIME_TIPE = useragent.isIE; var TextInput = function(parentNode, host) { var text = dom.createElement("textarea"); @@ -54,7 +55,6 @@ var TextInput = function(parentNode, host) { var PLACEHOLDER = "\x01\x01"; - var cut = false; var copied = false; var pasted = false; var inComposition = false; @@ -186,9 +186,7 @@ var TextInput = function(parentNode, host) { } var onSelect = function(e) { - if (cut) { - cut = false; - } else if (copied) { + if (copied) { copied = false; } else if (isAllSelected(text)) { host.selectAll(); @@ -243,55 +241,31 @@ var TextInput = function(parentNode, host) { sendText(data); resetValue(); }; - - var onCut = function(e) { - var data = host.getCopyText(); - if (!data) { - event.preventDefault(e); - return; - } - + + var handleClipboardData = function(e, data) { var clipboardData = e.clipboardData || window.clipboardData; - - if (clipboardData && !BROKEN_SETDATA) { - // Safari 5 has clipboardData object, but does not handle setData() - var supported = clipboardData.setData("Text", data); - if (supported) { - host.onCut(); - event.preventDefault(e); - } - } - - if (!supported) { - cut = true; - text.value = data; - text.select(); - setTimeout(function(){ - cut = false; - resetValue(); - resetSelection(); - host.onCut(); - }); - } - }; - - var onCopy = function(e) { - var data = host.getCopyText(); - if (!data) { - event.preventDefault(e); + if (!clipboardData || BROKEN_SETDATA) return; - } - - var clipboardData = e.clipboardData || window.clipboardData; - if (clipboardData && !BROKEN_SETDATA) { + // using "Text" doesn't work on old webkit but ie needs it + // TODO are there other browsers that require "Text"? + var mime = USE_IE_MIME_TIPE ? "Text" : "text/plain"; + if (data) { // Safari 5 has clipboardData object, but does not handle setData() - var supported = clipboardData.setData("Text", data); - if (supported) { - host.onCopy(); - event.preventDefault(e); - } + return clipboardData.setData(mime, data); + } else { + return clipboardData.getData(mime); } - if (!supported) { + } + + var doCopy = function(e, isCut) { + var data = host.getCopyText(); + if (!data) + return event.preventDefault(e); + + if (handleClipboardData(e, data)) { + isCut ? host.onCut() : host.onCopy(); + event.preventDefault(e); + } else { copied = true; text.value = data; text.select(); @@ -299,16 +273,22 @@ var TextInput = function(parentNode, host) { copied = false; resetValue(); resetSelection(); - host.onCopy(); + isCut ? host.onCut() : host.onCopy(); }); } }; - + + var onCut = function(e) { + doCopy(e, true); + } + + var onCopy = function(e) { + doCopy(e, false); + } + var onPaste = function(e) { - var clipboardData = e.clipboardData || window.clipboardData; - - if (clipboardData) { - var data = clipboardData.getData("Text"); + var data = handleClipboardData(e); + if (typeof data == "string") { if (data) host.onPaste(data); if (useragent.isIE) @@ -336,7 +316,7 @@ var TextInput = function(parentNode, host) { if (!('oncut' in text) || !('oncopy' in text) || !('onpaste' in text)){ event.addListener(parentNode, "keydown", function(e) { if ((useragent.isMac && !e.metaKey) || !e.ctrlKey) - return; + return; switch (e.keyCode) { case 67: diff --git a/lib/ace/lib/useragent.js b/lib/ace/lib/useragent.js index 908a2a4c..e56e89a9 100644 --- a/lib/ace/lib/useragent.js +++ b/lib/ace/lib/useragent.js @@ -76,7 +76,8 @@ exports.isLinux = (os == "linux"); // Windows Store JavaScript apps (aka Metro apps written in HTML5 and JavaScript) do not use the "Microsoft Internet Explorer" string in their user agent, but "MSAppHost" instead. exports.isIE = (navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0) - && parseFloat(navigator.userAgent.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:|MSIE )([0-9]+[\.0-9]+)/)[1]); + ? parseFloat((ua.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]) + : parseFloat((ua.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]); // for ie exports.isOldIE = exports.isIE && exports.isIE < 9; @@ -84,7 +85,7 @@ exports.isOldIE = exports.isIE && exports.isIE < 9; exports.isGecko = exports.isMozilla = window.controllers && window.navigator.product === "Gecko"; // oldGecko == rev < 2.0 -exports.isOldGecko = exports.isGecko && parseInt((navigator.userAgent.match(/rv\:(\d+)/)||[])[1], 10) < 4; +exports.isOldGecko = exports.isGecko && parseInt((ua.match(/rv\:(\d+)/)||[])[1], 10) < 4; // Is this Opera exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]"; From 6e14e92912d03d4ab6dfdfc7af9204644581dbb1 Mon Sep 17 00:00:00 2001 From: nightwing Date: Wed, 12 Mar 2014 03:24:14 +0400 Subject: [PATCH 003/158] fix #1751 sticky selection on in IE11 --- lib/ace/lib/event.js | 9 ++++++--- lib/ace/mouse/mouse_handler.js | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/ace/lib/event.js b/lib/ace/lib/event.js index 9ad0c3ac..e904e024 100644 --- a/lib/ace/lib/event.js +++ b/lib/ace/lib/event.js @@ -161,7 +161,7 @@ exports.addMouseWheelListener = function(el, callback) { exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbackName) { var clicks = 0; - var startX, startY, timer; + var startX, startY, timer; var eventNames = { 2: "dblclick", 3: "tripleclick", @@ -180,9 +180,12 @@ exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbac } if (useragent.isIE) { var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5; - if (isNewClick) { + if (!timer || isNewClick) clicks = 1; - } + if (timer) + clearTimeout(timer) + timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600); + if (clicks == 1) { startX = e.clientX; startY = e.clientY; diff --git a/lib/ace/mouse/mouse_handler.js b/lib/ace/mouse/mouse_handler.js index 47457f17..cac4ce42 100644 --- a/lib/ace/mouse/mouse_handler.js +++ b/lib/ace/mouse/mouse_handler.js @@ -49,10 +49,10 @@ var MouseHandler = function(editor) { var mouseTarget = editor.renderer.getMouseEventTarget(); event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click")); event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this, "mousemove")); - event.addMultiMouseDownListener(mouseTarget, [300, 300, 250], this, "onMouseEvent"); + event.addMultiMouseDownListener(mouseTarget, [400, 300, 250], this, "onMouseEvent"); if (editor.renderer.scrollBarV) { - event.addMultiMouseDownListener(editor.renderer.scrollBarV.inner, [300, 300, 250], this, "onMouseEvent"); - event.addMultiMouseDownListener(editor.renderer.scrollBarH.inner, [300, 300, 250], this, "onMouseEvent"); + event.addMultiMouseDownListener(editor.renderer.scrollBarV.inner, [400, 300, 250], this, "onMouseEvent"); + event.addMultiMouseDownListener(editor.renderer.scrollBarH.inner, [400, 300, 250], this, "onMouseEvent"); } event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel")); From c72617b03361d1a2c53a7f99c2609665ae5364ee Mon Sep 17 00:00:00 2001 From: nightwing Date: Wed, 12 Mar 2014 03:34:52 +0400 Subject: [PATCH 004/158] fix sticky selection if editor loaded into iframe --- lib/ace/mouse/mouse_handler.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/ace/mouse/mouse_handler.js b/lib/ace/mouse/mouse_handler.js index cac4ce42..04e694e4 100644 --- a/lib/ace/mouse/mouse_handler.js +++ b/lib/ace/mouse/mouse_handler.js @@ -112,6 +112,12 @@ var MouseHandler = function(editor) { var self = this; var onMouseMove = function(e) { + if (!e) return; + // if editor is loaded inside iframe, and mouseup event is outside + // we won't recieve it, so we cancel on first mousemove without button + if (useragent.isWebKit && !e.which && self.releaseMouse) + return self.releaseMouse(); + self.x = e.clientX; self.y = e.clientY; mouseMoveHandler && mouseMoveHandler(e); @@ -130,7 +136,7 @@ var MouseHandler = function(editor) { } self.isMousePressed = false; self.$onCaptureMouseMove = self.releaseMouse = null; - self.onMouseEvent("mouseup", e); + e && self.onMouseEvent("mouseup", e); }; var onCaptureInterval = function() { From 56895731705d46e91e926bc75defbc842315ac9e Mon Sep 17 00:00:00 2001 From: nightwing Date: Wed, 12 Mar 2014 03:41:04 +0400 Subject: [PATCH 005/158] fix tests --- lib/ace/ext/old_ie.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/ext/old_ie.js b/lib/ace/ext/old_ie.js index ce3f4e72..8b8ce977 100644 --- a/lib/ace/ext/old_ie.js +++ b/lib/ace/ext/old_ie.js @@ -104,7 +104,7 @@ patch( ); patch( - require("ace/mode/text").Mode.prototype, "getTokenizer", + require("../mode/text").Mode.prototype, "getTokenizer", /Tokenizer/, "TokenizerModule.Tokenizer" ); From 498af4aab8293b4029a97af5fbbf71b326554188 Mon Sep 17 00:00:00 2001 From: nightwing Date: Wed, 12 Mar 2014 12:48:00 +0400 Subject: [PATCH 006/158] better fix for Array.slice on ie8 --- doc/site/js/main.js | 7 +------ index.html | 6 +++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/doc/site/js/main.js b/doc/site/js/main.js index e6cd609c..b24383c0 100644 --- a/doc/site/js/main.js +++ b/doc/site/js/main.js @@ -161,12 +161,7 @@ function highlight() { var highlighter = ace.require("ace/ext/static_highlight") var dom = ace.require("ace/lib/dom") function qsa(sel) { - var items = document.querySelectorAll(sel); - var result = []; - for (var i = 0; i < items.length; i++) { - result.push(items[i]); - } - return result; + return Array.apply(null, document.querySelectorAll(sel)); } qsa("code[class]").forEach(function(el) { diff --git a/index.html b/index.html index 9c416582..46c41ce8 100644 --- a/index.html +++ b/index.html @@ -9,10 +9,10 @@ - - + + From 88829fbee7b0a9400f4ec2bec975dbe9271da027 Mon Sep 17 00:00:00 2001 From: Weihang Fan Date: Thu, 13 Mar 2014 12:23:21 +0800 Subject: [PATCH 007/158] Add auto-indent in CoffeeScript for if, for, while, and loop statements. --- lib/ace/mode/coffee.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/mode/coffee.js b/lib/ace/mode/coffee.js index de331204..331ab89e 100644 --- a/lib/ace/mode/coffee.js +++ b/lib/ace/mode/coffee.js @@ -50,7 +50,7 @@ oop.inherits(Mode, TextMode); (function() { - var indenter = /(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$/; + var indenter = /(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/; var commentLine = /^(\s*)#/; var hereComment = /^\s*###(?!#)/; var indentation = /^\s*/; From 59c392042a2753a5e03fbb546af7b1f8f29f6aaf Mon Sep 17 00:00:00 2001 From: Weihang Fan Date: Thu, 13 Mar 2014 19:10:19 +0800 Subject: [PATCH 008/158] Fixed auto-indent for switch statements. --- lib/ace/mode/coffee.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/mode/coffee.js b/lib/ace/mode/coffee.js index 331ab89e..8e286351 100644 --- a/lib/ace/mode/coffee.js +++ b/lib/ace/mode/coffee.js @@ -50,7 +50,7 @@ oop.inherits(Mode, TextMode); (function() { - var indenter = /(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/; + var indenter = /(?:[({[=:]|[-=]>|\b(?:else|switch|(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/; var commentLine = /^(\s*)#/; var hereComment = /^\s*###(?!#)/; var indentation = /^\s*/; From 8cdb16659d9f0cd30fd95346cd70d2c73064bd06 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 13 Mar 2014 19:42:05 +0400 Subject: [PATCH 009/158] fix #1843 Double click to select word does not work for Qt QWebView --- lib/ace/mouse/default_handlers.js | 1 + lib/ace/mouse/mouse_handler.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ace/mouse/default_handlers.js b/lib/ace/mouse/default_handlers.js index 6e97bc5d..8a9adcf7 100644 --- a/lib/ace/mouse/default_handlers.js +++ b/lib/ace/mouse/default_handlers.js @@ -181,6 +181,7 @@ function DefaultHandlers(mouseHandler) { this.selectAllEnd = this.selectByWordsEnd = this.selectByLinesEnd = function() { + this.$clickSelection = null; this.editor.unsetStyle("ace_selecting"); if (this.editor.renderer.scroller.releaseCapture) { this.editor.renderer.scroller.releaseCapture(); diff --git a/lib/ace/mouse/mouse_handler.js b/lib/ace/mouse/mouse_handler.js index 04e694e4..55b72389 100644 --- a/lib/ace/mouse/mouse_handler.js +++ b/lib/ace/mouse/mouse_handler.js @@ -129,7 +129,7 @@ var MouseHandler = function(editor) { clearInterval(timerId); onCaptureInterval(); self[self.state + "End"] && self[self.state + "End"](e); - self.$clickSelection = null; + self.state = ""; if (renderer.$keepTextAreaAtCursor == null) { renderer.$keepTextAreaAtCursor = true; renderer.$moveTextAreaToCursor(); From 362a69228bfa89ff2caa3dfd655600d6dafb6837 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 23 Mar 2014 18:56:39 +0400 Subject: [PATCH 010/158] fix typo --- lib/ace/keyboard/textinput.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ace/keyboard/textinput.js b/lib/ace/keyboard/textinput.js index 7cba4077..5c75b6e9 100644 --- a/lib/ace/keyboard/textinput.js +++ b/lib/ace/keyboard/textinput.js @@ -36,7 +36,7 @@ var useragent = require("../lib/useragent"); var dom = require("../lib/dom"); var lang = require("../lib/lang"); var BROKEN_SETDATA = useragent.isChrome < 18; -var USE_IE_MIME_TIPE = useragent.isIE; +var USE_IE_MIME_TYPE = useragent.isIE; var TextInput = function(parentNode, host) { var text = dom.createElement("textarea"); @@ -248,7 +248,7 @@ var TextInput = function(parentNode, host) { return; // using "Text" doesn't work on old webkit but ie needs it // TODO are there other browsers that require "Text"? - var mime = USE_IE_MIME_TIPE ? "Text" : "text/plain"; + var mime = USE_IE_MIME_TYPE ? "Text" : "text/plain"; if (data) { // Safari 5 has clipboardData object, but does not handle setData() return clipboardData.setData(mime, data); From 9062f4fe40248890f51a3fe07946d73a4c2b4443 Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Mon, 3 Feb 2014 16:25:01 +0100 Subject: [PATCH 011/158] Remove unused mode/xml_util.js --- Makefile.dryice.js | 14 +-- lib/ace/mode/handlebars_highlight_rules.js | 4 +- lib/ace/mode/xml_highlight_rules.js | 5 +- lib/ace/mode/xml_util.js | 100 --------------------- 4 files changed, 11 insertions(+), 112 deletions(-) delete mode 100644 lib/ace/mode/xml_util.js diff --git a/Makefile.dryice.js b/Makefile.dryice.js index 549f3665..95397064 100755 --- a/Makefile.dryice.js +++ b/Makefile.dryice.js @@ -267,7 +267,7 @@ function workers(path) { }).filter(function(x) { return !!x; }); } function modeList() { - return jsFileList("lib/ace/mode", /_highlight_rules|_test|_worker|xml_util|_outdent|behaviour|completions/) + return jsFileList("lib/ace/mode", /_highlight_rules|_test|_worker|_outdent|behaviour|completions/) } function addSuffix(options) { @@ -296,7 +296,7 @@ function getWriteFilters(options, projectType) { if (options.compress) filters.push(copy.filter.uglifyjs); - + // copy.filter.uglifyjs.options.ascii = true; doesn't work with some uglify.js versions filters.push(function(text) { var t1 = text.replace(/[\x80-\uffff]/g, function(c) { @@ -307,9 +307,9 @@ function getWriteFilters(options, projectType) { c = "0" + c; return "\\u" + c; }); - return text; + return text; }); - + if (options.exportModule && projectType == "main") { if (options.noconflict) filters.push(exportAce(options.ns, options.exportModule, options.ns)); @@ -416,7 +416,7 @@ var buildAce = function(options) { project.assumeAllFilesLoaded(); delete project.ignoredModules["ace/theme/textmate"]; delete project.ignoredModules["ace/requirejs/text!ace/theme/textmate.css"]; - + options.themes.forEach(function(theme) { console.log("theme " + theme); copy({ @@ -428,7 +428,7 @@ var buildAce = function(options) { dest: targetDir + "/theme-" + theme.replace("_theme", "") + ".js" }); }); - + // generateThemesModule(options.themes); console.log('# ace key bindings ---------'); @@ -683,7 +683,7 @@ function updateModes() { var source = fs.readFileSync(filepath, "utf8"); if (!/this.\$id\s*=\s*"/.test(source)) source = source.replace(/\n([ \t]*)(\}\).call\(\w*Mode.prototype\))/, '\n$1 this.$id = "";\n$1$2'); - + source = source.replace(/(this.\$id\s*=\s*)"[^"]*"/, '$1"ace/mode/' + m + '"'); fs.writeFileSync(filepath, source, "utf8") }) diff --git a/lib/ace/mode/handlebars_highlight_rules.js b/lib/ace/mode/handlebars_highlight_rules.js index e224335f..c264afc1 100644 --- a/lib/ace/mode/handlebars_highlight_rules.js +++ b/lib/ace/mode/handlebars_highlight_rules.js @@ -5,14 +5,14 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var xmlUtil = require("./xml_util"); + function pop2(currentState, stack) { stack.splice(0, 3); return stack.shift() || "start"; } var HandlebarsHighlightRules = function() { HtmlHighlightRules.call(this); - var hbs = { + var hbs = { regex : "(?={{)", push : "handlebars" } diff --git a/lib/ace/mode/xml_highlight_rules.js b/lib/ace/mode/xml_highlight_rules.js index ee6ef8cd..155c06c7 100644 --- a/lib/ace/mode/xml_highlight_rules.js +++ b/lib/ace/mode/xml_highlight_rules.js @@ -3,7 +3,7 @@ * * Copyright (c) 2010, Ajax.org B.V. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -14,7 +14,7 @@ * * Neither the name of Ajax.org B.V. nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -32,7 +32,6 @@ define(function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); -var xmlUtil = require("./xml_util"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var XmlHighlightRules = function(normalize) { diff --git a/lib/ace/mode/xml_util.js b/lib/ace/mode/xml_util.js deleted file mode 100644 index abae6075..00000000 --- a/lib/ace/mode/xml_util.js +++ /dev/null @@ -1,100 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Distributed under the BSD license: - * - * Copyright (c) 2010, Ajax.org B.V. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Ajax.org B.V. nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * ***** END LICENSE BLOCK ***** */ - -define(function(require, exports, module) { -"use strict"; - -function string(state) { - return [{ - token : "string", - regex : '"', - next : state + "_qqstring" - }, { - token : "string", - regex : "'", - next : state + "_qstring" - }]; -} - -function multiLineString(quote, state) { - return [ - {token : "string", regex : quote, next : state}, - { - token : "constant.language.escape", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }, - {defaultToken : "string"} - ]; -} - -exports.tag = function(states, name, nextState, tagMap) { - states[name] = [{ - token : "text", - regex : "\\s+" - }, { - //token : "meta.tag", - - token : !tagMap ? "meta.tag.tag-name" : function(value) { - if (tagMap[value]) - return "meta.tag.tag-name." + tagMap[value]; - else - return "meta.tag.tag-name"; - }, - regex : "[-_a-zA-Z0-9:]+", - next : name + "_embed_attribute_list" - }, { - token: "empty", - regex: "", - next : name + "_embed_attribute_list" - }]; - - states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); - states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); - - states[name + "_embed_attribute_list"] = [{ - token : "meta.tag.r", - regex : "/?>", - next : nextState - }, { - token : "keyword.operator", - regex : "=" - }, { - token : "entity.other.attribute-name", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "text", - regex : "\\s+" - }].concat(string(name)); -}; - -}); From 8d45a2d209fc9b68654937c0c5140d59fc2c2072 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 30 Mar 2014 18:53:52 +0400 Subject: [PATCH 012/158] update saxparser and jshint --- lib/ace/mode/html/saxparser.js | 5227 ++++------ lib/ace/mode/javascript/jshint.js | 15351 ++++++++++++++-------------- tool/update_deps.js | 92 +- 3 files changed, 10085 insertions(+), 10585 deletions(-) diff --git a/lib/ace/mode/html/saxparser.js b/lib/ace/mode/html/saxparser.js index 079f2e5c..eb4cadca 100644 --- a/lib/ace/mode/html/saxparser.js +++ b/lib/ace/mode/html/saxparser.js @@ -1,5 +1,6 @@ -define(function(require, exports, module){ -var req = require=(function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s= 0; i--) { var node = this.elements[i]; @@ -126,6 +138,10 @@ ElementStack.prototype.remove = function(item) { this.elements.splice(this.elements.indexOf(item), 1); }; +/** + * Pops until an element with a given localName is popped + * @param {String} localName + */ ElementStack.prototype.popUntilPopped = function(localName) { var element; do { @@ -148,34 +164,73 @@ ElementStack.prototype.popUntilTableRowScopeMarker = function() { this.pop(); }; +/** + * + * @param {Number} index + * @return {StackItem} + */ ElementStack.prototype.item = function(index) { return this.elements[index]; }; +/** + * + * @param {StackItem} element + * @return {Boolean} + */ ElementStack.prototype.contains = function(element) { return this.elements.indexOf(element) !== -1; }; +/** + * + * @param {String} localName + * @return {Boolean} + */ ElementStack.prototype.inScope = function(localName) { return this._inScope(localName, isScopeMarker); }; +/** + * + * @param {String} localName + * @return {Boolean} + */ ElementStack.prototype.inListItemScope = function(localName) { return this._inScope(localName, isListItemScopeMarker); }; +/** + * + * @param {String} localName + * @return {Boolean} + */ ElementStack.prototype.inTableScope = function(localName) { return this._inScope(localName, isTableScopeMarker); }; +/** + * + * @param {String} localName + * @return {Boolean} + */ ElementStack.prototype.inButtonScope = function(localName) { return this._inScope(localName, isButtonScopeMarker); }; +/** + * + * @param {String} localName + * @return {Boolean} + */ ElementStack.prototype.inSelectScope = function(localName) { return this._inScope(localName, isSelectScopeMarker); }; +/** + * + * @return {Boolean} + */ ElementStack.prototype.hasNumberedHeaderElementInScope = function() { for (var i = this.elements.length - 1; i >= 0; i--) { var node = this.elements[i]; @@ -186,22 +241,34 @@ ElementStack.prototype.hasNumberedHeaderElementInScope = function() { } }; +/** + * + * @param {Object} element + * @return {StackItem} + */ ElementStack.prototype.furthestBlockForFormattingElement = function(element) { var furthestBlock = null; for (var i = this.elements.length - 1; i >= 0; i--) { var node = this.elements[i]; if (node.node === element) - return furthestBlock; + break; if (node.isSpecial()) furthestBlock = node; } + return furthestBlock; }; +/** + * + * @param {String} localName + * @return {Number} + */ ElementStack.prototype.findIndex = function(localName) { for (var i = this.elements.length - 1; i >= 0; i--) { if (this.elements[i].localName == localName) return i; } + return -1; }; ElementStack.prototype.remove_openElements_until = function(callback) { @@ -228,14 +295,11 @@ Object.defineProperty(ElementStack.prototype, 'length', { exports.ElementStack = ElementStack; -},{}],2:[function(req,module,exports){ -var entities = req('html5-entities'); -var InputStream = req('./InputStream').InputStream; - -/** - * Magic value for UTF-16 operations. - */ -var LEAD_OFFSET = (0xD800 - (0x10000 >> 10)); +}, +{}], +2:[function(_dereq_,module,exports){ +var entities = _dereq_('html5-entities'); +var InputStream = _dereq_('./InputStream').InputStream; var namedEntityPrefixes = {}; Object.keys(entities).forEach(function (entityKey) { @@ -306,11 +370,17 @@ EntityParser.consumeEntity = function(buffer, tokenizer, additionalAllowedCharac tokenizer._parseError("invalid-numeric-entity-replaced"); code = replacement; } - if (code > 0xFFFF && code < 0x10FFFF) { - var astralChar = ""; - astralChar += String.fromCharCode(LEAD_OFFSET + (code >> 10)); - astralChar += String.fromCharCode(0xDC00 + (code & 0x3FF)); - decodedCharacter = astralChar; + if (code > 0xFFFF && code <= 0x10FFFF) { + // we substract 0x10000 from cp to get a 20-bits number + // in the range 0..0xFFFF + code -= 0x10000; + // we add 0xD800 to the number formed by the first 10 bits + // to give the first byte + var first = ((0xffc00 & code) >> 10) + 0xD800; + // we add 0xDC00 to the number formed by the low 10 bits + // to give the second byte + var second = (0x3ff & code) + 0xDC00; + decodedCharacter = String.fromCharCode(first, second); } else decodedCharacter = String.fromCharCode(code); if (ch !== ';') { @@ -393,7 +463,7 @@ EntityParser.replaceEntityNumbers = function(c) { case 0x9E: return 0x017E; // LATIN SMALL LETTER Z WITH CARON case 0x9F: return 0x0178; // LATIN CAPITAL LETTER Y WITH DIAERESIS default: - if ((c >= 0xD800 && c <= 0xDFFF) || c >= 0x10FFFF) { /// @todo. The spec says > 0x10FFFF, not >=. Section 8.2.4.69. + if ((c >= 0xD800 && c <= 0xDFFF) || c > 0x10FFFF) { return 0xFFFD; } else if ((c >= 0x0001 && c <= 0x0008) || (c >= 0x000E && c <= 0x001F) || (c >= 0x007F && c <= 0x009F) || (c >= 0xFDD0 && c <= 0xFDEF) || @@ -413,7 +483,9 @@ EntityParser.replaceEntityNumbers = function(c) { exports.EntityParser = EntityParser; -},{"./InputStream":3,"html5-entities":12}],3:[function(req,module,exports){ +}, +{"./InputStream":3,"html5-entities":12}], +3:[function(_dereq_,module,exports){ // FIXME convert CR to LF http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#input-stream function InputStream() { this.data = ''; @@ -440,7 +512,10 @@ InputStream.prototype = { if(this.start >= this.data.length) { return InputStream.EOF; } - return this.data[this.start++]; + var ch = this.data[this.start++]; + if (ch === '\r') + ch = '\n'; + return ch; }, advance: function(amount) { this.start += amount; @@ -477,7 +552,7 @@ InputStream.prototype = { } else if(m = new RegExp(re + (this.eof ? "|$" : "")).exec(s)) { var t = this.data.slice(this.start, this.start + m.index); this.advance(m.index); - return t.toString(); + return t.replace(/\r/g, '\n').replace(/\n{2,}/g, '\n'); } else { throw InputStream.DRAIN; } @@ -523,7 +598,9 @@ InputStream.prototype = { exports.InputStream = InputStream; -},{}],4:[function(req,module,exports){ +}, +{}], +4:[function(_dereq_,module,exports){ var SpecialElements = { "http://www.w3.org/1999/xhtml": [ 'address', @@ -704,9 +781,11 @@ StackItem.prototype.isMathMLTextIntegrationPoint = function() { exports.StackItem = StackItem; -},{}],5:[function(req,module,exports){ -var InputStream = req('./InputStream').InputStream; -var EntityParser = req('./EntityParser').EntityParser; +}, +{}], +5:[function(_dereq_,module,exports){ +var InputStream = _dereq_('./InputStream').InputStream; +var EntityParser = _dereq_('./EntityParser').EntityParser; function isWhitespace(c){ return c === " " || c === "\n" || c === "\t" || c === "\r" || c === "\f"; @@ -2255,19 +2334,33 @@ Tokenizer.prototype.tokenize = function(source) { } }; +Object.defineProperty(Tokenizer.prototype, 'lineNumber', { + get: function() { + return this._inputStream.location().line; + } +}); + +Object.defineProperty(Tokenizer.prototype, 'columnNumber', { + get: function() { + return this._inputStream.location().column; + } +}); + exports.Tokenizer = Tokenizer; -},{"./EntityParser":2,"./InputStream":3}],6:[function(req,module,exports){ -(function(){var assert = req('assert'); +}, +{"./EntityParser":2,"./InputStream":3}], +6:[function(_dereq_,module,exports){ +var assert = _dereq_('assert'); -var messages = req('./messages.json'); -var constants = req('./constants'); +var messages = _dereq_('./messages.json'); +var constants = _dereq_('./constants'); -var EventEmitter = req('events').EventEmitter; +var EventEmitter = _dereq_('events').EventEmitter; -var Tokenizer = req('./Tokenizer').Tokenizer; -var ElementStack = req('./ElementStack').ElementStack; -var StackItem = req('./StackItem').StackItem; +var Tokenizer = _dereq_('./Tokenizer').Tokenizer; +var ElementStack = _dereq_('./ElementStack').ElementStack; +var StackItem = _dereq_('./StackItem').StackItem; var Marker = {}; @@ -2372,7 +2465,6 @@ function TreeBuilder() { this.redirectAttachToFosterParent = false; this.selfClosingFlagAcknowledged = false; this.context = ""; - this.firstStartTag = false; this.pendingTableCharacters = []; this.shouldSkipLeadingNewline = false; @@ -2421,11 +2513,7 @@ function TreeBuilder() { } }, startTagHtml: function(name, attributes) { - if (!tree.firstStartTag && name == 'html') { - tree.parseError('non-html-root'); - } - tree.addAttributesToElement(tree.openElements.rootNode, attributes); - tree.firstStartTag = false; + modes.inBody.startTagHtml(name, attributes); } }; @@ -2606,7 +2694,6 @@ function TreeBuilder() { }; modes.beforeHTML.startTagHtml = function(name, attributes, selfClosing) { - tree.firstStartTag = true; tree.insertHtmlElement(attributes); tree.setInsertionMode('beforeHead'); }; @@ -2815,11 +2902,10 @@ function TreeBuilder() { style: 'startTagNoFramesStyle', noscript: 'startTagNoScript', noframes: 'startTagNoFramesStyle', - base: 'startTagBaseLinkCommand', - basefont: 'startTagBaseLinkCommand', - bgsound: 'startTagBaseLinkCommand', - command: 'startTagBaseLinkCommand', //FIXME drop command tag? - link: 'startTagBaseLinkCommand', + base: 'startTagBaseBasefontBgsoundLink', + basefont: 'startTagBaseBasefontBgsoundLink', + bgsound: 'startTagBaseBasefontBgsoundLink', + link: 'startTagBaseBasefontBgsoundLink', meta: 'startTagMeta', "-default": 'startTagOther' }; @@ -2885,7 +2971,7 @@ function TreeBuilder() { tree.setInsertionMode('text'); }; - modes.inHead.startTagBaseLinkCommand = function(name, attributes) { + modes.inHead.startTagBaseBasefontBgsoundLink = function(name, attributes) { tree.insertSelfClosingElement(name, attributes); }; @@ -3015,7 +3101,6 @@ function TreeBuilder() { base: 'startTagProcessInHead', basefont: 'startTagProcessInHead', bgsound: 'startTagProcessInHead', - command: 'startTagProcessInHead', link: 'startTagProcessInHead', meta: 'startTagProcessInHead', noframes: 'startTagProcessInHead', @@ -3196,6 +3281,11 @@ function TreeBuilder() { tree.framesetOk = false; }; + modes.inBody.startTagHtml = function(name, attributes) { + tree.parseError('non-html-root'); + tree.addAttributesToElement(tree.openElements.rootNode, attributes); + }; + modes.inBody.startTagProcessInHead = function(name, attributes) { modes.inHead.processStartTag(name, attributes); }; @@ -3560,7 +3650,7 @@ function TreeBuilder() { } else { tree.generateImpliedEndTags('p'); if (tree.currentStackItem().localName != 'p') - tree.parseError('unexpected-end-tag', {name: 'p'}); + tree.parseError('unexpected-implied-end-tag', {name: 'p'}); tree.openElements.popUntilPopped(name); } }; @@ -3988,10 +4078,6 @@ function TreeBuilder() { modes.inHead.processComment(data); }; - modes.inHeadNoscript.startTagHtml = function(name, attributes) { - modes.inBody.processStartTag(name, attributes); - }; - modes.inHeadNoscript.startTagBasefontBgsoundLinkMetaNoframesStyle = function(name, attributes) { modes.inHead.processStartTag(name, attributes); }; @@ -4683,10 +4769,6 @@ function TreeBuilder() { tree.parseError('expected-eof-but-got-char'); }; - modes.afterAfterFrameset.startTagHtml = function(name, attributes) { - modes.inBody.processStartTag(name, attributes); - }; - modes.afterAfterFrameset.startTagNoFrames = function(name, attributes) { modes.inHead.processStartTag(name, attributes); }; @@ -4946,10 +5028,18 @@ TreeBuilder.prototype.processToken = function(token) { } }; +/** + * + * @return {Boolean} + */ TreeBuilder.prototype.isCdataSectionAllowed = function() { return this.openElements.length > 0 && this.currentStackItem().isForeign(); }; +/** + * + * @return {Boolean} + */ TreeBuilder.prototype.isSelfClosingFlagAcknowledged = function() { return this.selfClosingFlagAcknowledged; }; @@ -5062,7 +5152,7 @@ TreeBuilder.prototype.popElement = function() { /** * Returns true if redirect is required and current open element causes foster parenting - * @return {*} + * @return {Boolean} */ TreeBuilder.prototype.shouldFosterParent = function() { return this.redirectAttachToFosterParent && this.currentStackItem().isFosterParenting(); @@ -5118,6 +5208,10 @@ TreeBuilder.prototype.reconstructActiveFormattingElements = function() { }; +/** + * + * @param {StackItem} item + */ TreeBuilder.prototype.ensureNoahsArkCondition = function(item) { var kNoahsArkCapacity = 3; if (this.activeFormattingElements.length < kNoahsArkCapacity) @@ -5160,11 +5254,19 @@ TreeBuilder.prototype.ensureNoahsArkCondition = function(item) { this.removeElementFromActiveFormattingElements(candidates[i]); }; +/** + * + * @param {StackItem} item + */ TreeBuilder.prototype.appendElementToActiveFormattingElements = function(item) { this.ensureNoahsArkCondition(item); this.activeFormattingElements.push(item); }; +/** + * + * @param {StackItem} item + */ TreeBuilder.prototype.removeElementFromActiveFormattingElements = function(item) { var index = this.activeFormattingElements.indexOf(item); if (index >= 0) @@ -5180,12 +5282,12 @@ TreeBuilder.prototype.elementInActiveFormattingElements = function(name) { return false; }; -TreeBuilder.prototype.reparentChildren = function(oldParent, newParent) { - throw new Error("Not implemented"); +TreeBuilder.prototype.clearActiveFormattingElements = function() { + while (!(this.activeFormattingElements.length === 0 || this.activeFormattingElements.pop() == Marker)); }; -TreeBuilder.prototype.clearActiveFormattingElements = function() { - while (!(this.activeFormattingElements.length === 0 || this.activeFormattingElements.pop() == Marker)); +TreeBuilder.prototype.reparentChildren = function(oldParent, newParent) { + throw new Error("Not implemented"); }; /** @@ -5204,10 +5306,9 @@ TreeBuilder.prototype.setFragmentContext = function(context) { /** * * @param {String} code - * @param {Object} args - * @param isWarning + * @param {Object} [args] */ -TreeBuilder.prototype.parseError = function(code, args, isWarning) { +TreeBuilder.prototype.parseError = function(code, args) { // FIXME: this.errors.push([this.tokenizer.position, code, data]); if (!this.errorHandler) return; @@ -5321,8 +5422,9 @@ function formatMessage(format, args) { exports.TreeBuilder = TreeBuilder; -})() -},{"./ElementStack":1,"./StackItem":4,"./Tokenizer":5,"./constants":7,"./messages.json":8,"assert":13,"events":14}],7:[function(req,module,exports){ +}, +{"./ElementStack":1,"./StackItem":4,"./Tokenizer":5,"./constants":7,"./messages.json":8,"assert":13,"events":16}], +7:[function(_dereq_,module,exports){ exports.SVGTagMap = { "altglyph": "altGlyph", "altglyphdef": "altGlyphDef", @@ -5445,7 +5547,9 @@ exports.ForeignAttributeMap = { "xmlns": {prefix: null, localName: "xmlns", namespaceURI: "http://www.w3.org/2000/xmlns/"}, "xmlns:xlink": {prefix: "xmlns", localName: "xlink", namespaceURI: "http://www.w3.org/2000/xmlns/"}, }; -},{}],8:[function(req,module,exports){ +}, +{}], +8:[function(_dereq_,module,exports){ module.exports={ "null-character": "Null character in input stream, replaced with U+FFFD.", @@ -5589,6 +5693,8 @@ module.exports={ "Unexpected start tag head in existing head. Ignored.", "unexpected-end-tag": "Unexpected end tag ({name}). Ignored.", + "unexpected-implied-end-tag": + "End tag {name} implied, but there were open elements.", "unexpected-start-tag-out-of-my-head": "Unexpected start tag ({name}) that can be in head. Moved.", "unexpected-start-tag": @@ -5702,10 +5808,12 @@ module.exports={ "unexpected-start-tag-in-table": "Unexpected {name}. Expected table content." } -},{}],"DaboPu":[function(req,module,exports){ -var SAXTreeBuilder = req('./SAXTreeBuilder').SAXTreeBuilder; -var Tokenizer = req('../Tokenizer').Tokenizer; -var TreeParser = req('./TreeParser').TreeParser; +}, +{}], +9:[function(_dereq_,module,exports){ +var SAXTreeBuilder = _dereq_('./SAXTreeBuilder').SAXTreeBuilder; +var Tokenizer = _dereq_('../Tokenizer').Tokenizer; +var TreeParser = _dereq_('./TreeParser').TreeParser; function SAXParser() { this.contentHandler = null; @@ -5754,9 +5862,11 @@ Object.defineProperty(SAXParser.prototype, 'errorHandler', { exports.SAXParser = SAXParser; -},{"../Tokenizer":5,"./SAXTreeBuilder":10,"./TreeParser":11}],10:[function(req,module,exports){ -var util = req('util'); -var TreeBuilder = req('../TreeBuilder').TreeBuilder; +}, +{"../Tokenizer":5,"./SAXTreeBuilder":10,"./TreeParser":11}], +10:[function(_dereq_,module,exports){ +var util = _dereq_('util'); +var TreeBuilder = _dereq_('../TreeBuilder').TreeBuilder; function SAXTreeBuilder() { TreeBuilder.call(this); @@ -5765,28 +5875,33 @@ function SAXTreeBuilder() { util.inherits(SAXTreeBuilder, TreeBuilder); SAXTreeBuilder.prototype.start = function(tokenizer) { - this.document = new Document(); + this.document = new Document(this.tokenizer); +}; + +SAXTreeBuilder.prototype.end = function() { + this.document.endLocator = this.tokenizer; }; SAXTreeBuilder.prototype.insertDoctype = function(name, publicId, systemId) { - var doctype = new DTD(name, publicId, systemId); + var doctype = new DTD(this.tokenizer, name, publicId, systemId); + doctype.endLocator = this.tokenizer; this.document.appendChild(doctype); }; SAXTreeBuilder.prototype.createElement = function(namespaceURI, localName, attributes) { - var element = new Element(namespaceURI, localName, localName, attributes); + var element = new Element(this.tokenizer, namespaceURI, localName, localName, attributes || []); return element; }; SAXTreeBuilder.prototype.insertComment = function(data, parent) { if (!parent) parent = this.currentStackItem(); - var comment = new Comment(data); + var comment = new Comment(this.tokenizer, data); parent.appendChild(comment); }; SAXTreeBuilder.prototype.appendCharacters = function(parent, data) { - var text = new Characters(data); + var text = new Characters(this.tokenizer, data); parent.appendChild(text); }; @@ -5798,7 +5913,7 @@ SAXTreeBuilder.prototype.insertText = function(data) { if (tableIndex === 0) { return this.appendCharacters(table, data); } - var text = new Characters(data); + var text = new Characters(this.tokenizer, data); var parent = table.parentNode; if (parent) { parent.insertBetween(text, table.previousSibling, table); @@ -5904,7 +6019,14 @@ var NodeType = { * @version $Id$ * @author hsivonen */ -function Node() { +function Node(locator) { + if (!locator) { + this.columnNumber = -1; + this.lineNumber = -1; + } else { + this.columnNumber = locator.columnNumber; + this.lineNumber = locator.lineNumber; + } this.parentNode = null; this.nextSibling = null; this.firstChild = null; @@ -5959,9 +6081,10 @@ Object.defineProperty(Node.prototype, 'previousSibling', { }); -function ParentNode() { - Node.call(this); +function ParentNode(locator) { + Node.call(this, locator); this.lastChild = null; + this._endLocator = null; } ParentNode.prototype = Object.create(Node.prototype); @@ -6083,13 +6206,25 @@ ParentNode.prototype.removeChild = function(node) { return node; }; +Object.defineProperty(ParentNode.prototype, 'endLocator', { + get: function() { + return this._endLocator; + }, + set: function(endLocator) { + this._endLocator = { + lineNumber: endLocator.lineNumber, + columnNumber: endLocator.columnNumber + }; + } +}); + /** * A document. * @version $Id$ * @author hsivonen */ -function Document () { - Node.call(this); +function Document (locator) { + ParentNode.call(this, locator); this.nodeType = NodeType.DOCUMENT; } @@ -6107,7 +6242,7 @@ Document.prototype.visit = function(treeParser) { * @see nu.validator.saxtree.Node#revisit(nu.validator.saxtree.TreeParser) */ Document.prototype.revisit = function(treeParser) { - treeParser.endDocument(); + treeParser.endDocument(this.endLocator); }; /** @@ -6121,7 +6256,7 @@ Document.prototype.revisit = function(treeParser) { * The constructor. */ function DocumentFragment() { - ParentNode.call(this); + ParentNode.call(this, new Locator()); this.nodeType = NodeType.DOCUMENT_FRAGMENT; } @@ -6139,9 +6274,8 @@ DocumentFragment.prototype.visit = function(treeParser) { * @version $Id$ * @author hsivonen */ -function Element(uri, localName, qName, atts, prefixMappings) { - ParentNode.call(this); - +function Element(locator, uri, localName, qName, atts, prefixMappings) { + ParentNode.call(this, locator); this.uri = uri; this.localName = localName; this.qName = qName; @@ -6171,11 +6305,11 @@ Element.prototype.visit = function(treeParser) { * @see nu.validator.saxtree.Node#revisit(nu.validator.saxtree.TreeParser) */ Element.prototype.revisit = function(treeParser) { - treeParser.endElement(this.uri, this.localName, this.qName); + treeParser.endElement(this.uri, this.localName, this.qName, this.endLocator); if (this.prefixMappings) { for (var key in prefixMappings) { var mapping = prefixMappings[key]; - treeParser.endPrefixMapping(mapping.getPrefix()); + treeParser.endPrefixMapping(mapping.getPrefix(), this.endLocator); } } }; @@ -6183,12 +6317,10 @@ Element.prototype.revisit = function(treeParser) { /** * The constructor. * @param locator the locator - * @param buf the buffer - * @param start the offset in the buffer - * @param length the length + * @param {String} data the buffer */ -function Characters(data){ - Node.call(this); +function Characters(locator, data){ + Node.call(this, locator); this.data = data; this.nodeType = NodeType.CHARACTERS; } @@ -6209,8 +6341,8 @@ Characters.prototype.visit = function (treeParser) { * @param start the offset * @param length the length */ -function IgnorableWhitespace(data) { - Node.call(this); +function IgnorableWhitespace(locator, data) { + Node.call(this, locator); this.data = data; this.nodeType = NodeType.IGNORABLE_WHITESPACE; } @@ -6239,8 +6371,8 @@ IgnorableWhitespace.prototype.visit = function(treeParser) { * @param start the offset * @param length the length */ -function Comment(data) { - Node.call(this); +function Comment(locator, data) { + Node.call(this, locator); this.data = data; this.nodeType = NodeType.COMMENT; } @@ -6264,8 +6396,8 @@ Comment.prototype.visit = function(treeParser) { * The constructor. * @param locator the locator */ -function CDATA() { - ParentNode.call(this); +function CDATA(locator) { + ParentNode.call(this, locator); this.nodeType = NodeType.CDATA; } @@ -6284,7 +6416,7 @@ CDATA.prototype.visit = function(treeParser) { * @see nu.validator.saxtree.Node#revisit(nu.validator.saxtree.TreeParser) */ CDATA.prototype.revisit = function(treeParser) { - treeParser.endCDATA(); + treeParser.endCDATA(this.endLocator); }; /** @@ -6429,7 +6561,9 @@ DTD.prototype.revisit = function(treeParser) { exports.SAXTreeBuilder = SAXTreeBuilder; -},{"../TreeBuilder":6,"util":15}],11:[function(req,module,exports){ +}, +{"../TreeBuilder":6,"util":20}], +11:[function(_dereq_,module,exports){ /** * A tree visitor that replays a tree as SAX events. * @version $Id$ @@ -6445,31 +6579,31 @@ exports.SAXTreeBuilder = SAXTreeBuilder; * may be null */ function TreeParser(contentHandler, lexicalHandler){ - - /** - * The content handler. - */ - this.contentHandler; - /** - * The lexical handler. - */ - this.lexicalHandler; + /** + * The content handler. + */ + this.contentHandler; - /** - * The current locator. - */ - this.locatorDelegate; + /** + * The lexical handler. + */ + this.lexicalHandler; - if (!contentHandler) { - throw new IllegalArgumentException("contentHandler was null."); - } - this.contentHandler = contentHandler; - if (!lexicalHandler) { - this.lexicalHandler = new NullLexicalHandler(); - } else { - this.lexicalHandler = lexicalHandler; - } + /** + * The current locator. + */ + this.locatorDelegate; + + if (!contentHandler) { + throw new IllegalArgumentException("contentHandler was null."); + } + this.contentHandler = contentHandler; + if (!lexicalHandler) { + this.lexicalHandler = new NullLexicalHandler(); + } else { + this.lexicalHandler = lexicalHandler; + } } /** @@ -6482,43 +6616,43 @@ function TreeParser(contentHandler, lexicalHandler){ * @throws SAXException */ TreeParser.prototype.parse = function(node) { - // this.contentHandler.setDocumentLocator(this); - var current = node; - var next; - for (;;) { - current.visit(this); - if ((next = current.firstChild) != null) { - current = next; - continue; - } - for (;;) { - current.revisit(this); - if (current == node) { - return; - } - if ((next = current.nextSibling) != null) { - current = next; - break; - } - current = current.parentNode; - } - } + this.contentHandler.documentLocator = this; + var current = node; + var next; + for (;;) { + current.visit(this); + if (next = current.firstChild) { + current = next; + continue; + } + for (;;) { + current.revisit(this); + if (current == node) { + return; + } + if (next = current.nextSibling) { + current = next; + break; + } + current = current.parentNode; + } + } }; /** * @see org.xml.sax.ContentHandler#characters(char[], int, int) */ TreeParser.prototype.characters = function(ch, start, length, locator) { - this.locatorDelegate = locator; - this.contentHandler.characters(ch, start, length); + this.locatorDelegate = locator; + this.contentHandler.characters(ch, start, length); }; /** * @see org.xml.sax.ContentHandler#endDocument() */ TreeParser.prototype.endDocument = function(locator) { - this.locatorDelegate = locator; - this.contentHandler.endDocument(); + this.locatorDelegate = locator; + this.contentHandler.endDocument(); }; /** @@ -6526,24 +6660,24 @@ TreeParser.prototype.endDocument = function(locator) { * java.lang.String, java.lang.String) */ TreeParser.prototype.endElement = function(uri, localName, qName, locator) { - this.locatorDelegate = locator; - this.contentHandler.endElement(uri, localName, qName); + this.locatorDelegate = locator; + this.contentHandler.endElement(uri, localName, qName); }; /** * @see org.xml.sax.ContentHandler#endPrefixMapping(java.lang.String) */ TreeParser.prototype.endPrefixMapping = function(prefix, locator) { - this.locatorDelegate = locator; - this.contentHandler.endPrefixMapping(prefix); + this.locatorDelegate = locator; + this.contentHandler.endPrefixMapping(prefix); }; /** * @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int) */ TreeParser.prototype.ignorableWhitespace = function(ch, start, length, locator) { - this.locatorDelegate = locator; - this.contentHandler.ignorableWhitespace(ch, start, length); + this.locatorDelegate = locator; + this.contentHandler.ignorableWhitespace(ch, start, length); }; /** @@ -6551,24 +6685,24 @@ TreeParser.prototype.ignorableWhitespace = function(ch, start, length, locator) * java.lang.String) */ TreeParser.prototype.processingInstruction = function(target, data, locator) { - this.locatorDelegate = locator; - this.contentHandler.processingInstruction(target, data); + this.locatorDelegate = locator; + this.contentHandler.processingInstruction(target, data); }; /** * @see org.xml.sax.ContentHandler#skippedEntity(java.lang.String) */ TreeParser.prototype.skippedEntity = function(name, locator) { - this.locatorDelegate = locator; - this.contentHandler.skippedEntity(name); + this.locatorDelegate = locator; + this.contentHandler.skippedEntity(name); }; /** * @see org.xml.sax.ContentHandler#startDocument() */ TreeParser.prototype.startDocument = function(locator) { - this.locatorDelegate = locator; - this.contentHandler.startDocument(); + this.locatorDelegate = locator; + this.contentHandler.startDocument(); }; /** @@ -6576,8 +6710,8 @@ TreeParser.prototype.startDocument = function(locator) { * java.lang.String, java.lang.String, org.xml.sax.Attributes) */ TreeParser.prototype.startElement = function(uri, localName, qName, atts, locator) { - this.locatorDelegate = locator; - this.contentHandler.startElement(uri, localName, qName, atts); + this.locatorDelegate = locator; + this.contentHandler.startElement(uri, localName, qName, atts); }; /** @@ -6585,48 +6719,48 @@ TreeParser.prototype.startElement = function(uri, localName, qName, atts, locato * java.lang.String) */ TreeParser.prototype.startPrefixMapping = function(prefix, uri, locator) { - this.locatorDelegate = locator; - this.contentHandler.startPrefixMapping(prefix, uri); + this.locatorDelegate = locator; + this.contentHandler.startPrefixMapping(prefix, uri); }; /** * @see org.xml.sax.ext.LexicalHandler#comment(char[], int, int) */ TreeParser.prototype.comment = function(ch, start, length, locator) { - this.locatorDelegate = locator; - this.lexicalHandler.comment(ch, start, length); + this.locatorDelegate = locator; + this.lexicalHandler.comment(ch, start, length); }; /** * @see org.xml.sax.ext.LexicalHandler#endCDATA() */ TreeParser.prototype.endCDATA = function(locator) { - this.locatorDelegate = locator; - this.lexicalHandler.endCDATA(); + this.locatorDelegate = locator; + this.lexicalHandler.endCDATA(); }; /** * @see org.xml.sax.ext.LexicalHandler#endDTD() */ TreeParser.prototype.endDTD = function(locator) { - this.locatorDelegate = locator; - this.lexicalHandler.endDTD(); + this.locatorDelegate = locator; + this.lexicalHandler.endDTD(); }; /** * @see org.xml.sax.ext.LexicalHandler#endEntity(java.lang.String) */ TreeParser.prototype.endEntity = function(name, locator) { - this.locatorDelegate = locator; - this.lexicalHandler.endEntity(name); + this.locatorDelegate = locator; + this.lexicalHandler.endEntity(name); }; /** * @see org.xml.sax.ext.LexicalHandler#startCDATA() */ TreeParser.prototype.startCDATA = function(locator) { - this.locatorDelegate = locator; - this.lexicalHandler.startCDATA(); + this.locatorDelegate = locator; + this.lexicalHandler.startCDATA(); }; /** @@ -6634,63 +6768,35 @@ TreeParser.prototype.startCDATA = function(locator) { * java.lang.String, java.lang.String) */ TreeParser.prototype.startDTD = function(name, publicId, systemId, locator) { - this.locatorDelegate = locator; - this.lexicalHandler.startDTD(name, publicId, systemId); + this.locatorDelegate = locator; + this.lexicalHandler.startDTD(name, publicId, systemId); }; /** * @see org.xml.sax.ext.LexicalHandler#startEntity(java.lang.String) */ TreeParser.prototype.startEntity = function(name, locator) { - this.locatorDelegate = locator; - this.lexicalHandler.startEntity(name); + this.locatorDelegate = locator; + this.lexicalHandler.startEntity(name); }; -// /** -// * @see org.xml.sax.Locator#getColumnNumber() -// */ -// public int getColumnNumber() { -// if (locatorDelegate == null) { -// return -1; -// } else { -// return locatorDelegate.getColumnNumber(); -// } -// } - -// /** -// * @see org.xml.sax.Locator#getLineNumber() -// */ -// public int getLineNumber() { -// if (locatorDelegate == null) { -// return -1; -// } else { -// return locatorDelegate.getLineNumber(); -// } -// } - -// /** -// * @see org.xml.sax.Locator#getPublicId() -// */ -// public String getPublicId() { -// if (locatorDelegate == null) { -// return null; -// } else { - -// return locatorDelegate.getPublicId(); -// } -// } - -// /** -// * @see org.xml.sax.Locator#getSystemId() -// */ -// public String getSystemId() { -// if (locatorDelegate == null) { -// return null; -// } else { -// return locatorDelegate.getSystemId(); -// } -// } +Object.defineProperty(TreeParser.prototype, 'columnNumber', { + get: function() { + if (!this.locatorDelegate) + return -1; + else + return this.locatorDelegate.columnNumber; + } +}); +Object.defineProperty(TreeParser.prototype, 'lineNumber', { + get: function() { + if (!this.locatorDelegate) + return -1; + else + return this.locatorDelegate.lineNumber; + } +}); /** * A lexical handler that does nothing. @@ -6712,675 +6818,58 @@ NullLexicalHandler.prototype.startEntity = function() {}; exports.TreeParser = TreeParser; -},{}],12:[function(req,module,exports){ +}, +{}], +12:[function(_dereq_,module,exports){ module.exports = { - "AElig": "\u00C6", - "AElig;": "\u00C6", - "AMP": "&", - "AMP;": "&", - "Aacute": "\u00C1", "Aacute;": "\u00C1", - "Abreve;": "\u0102", - "Acirc": "\u00C2", - "Acirc;": "\u00C2", - "Acy;": "\u0410", - "Afr;": "\u1D504", - "Agrave": "\u00C0", - "Agrave;": "\u00C0", - "Alpha;": "\u0391", - "Amacr;": "\u0100", - "And;": "\u2A53", - "Aogon;": "\u0104", - "Aopf;": "\u1D538", - "ApplyFunction;": "\u2061", - "Aring": "\u00C5", - "Aring;": "\u00C5", - "Ascr;": "\u1D49C", - "Assign;": "\u2254", - "Atilde": "\u00C3", - "Atilde;": "\u00C3", - "Auml": "\u00C4", - "Auml;": "\u00C4", - "Backslash;": "\u2216", - "Barv;": "\u2AE7", - "Barwed;": "\u2306", - "Bcy;": "\u0411", - "Because;": "\u2235", - "Bernoullis;": "\u212C", - "Beta;": "\u0392", - "Bfr;": "\u1D505", - "Bopf;": "\u1D539", - "Breve;": "\u02D8", - "Bscr;": "\u212C", - "Bumpeq;": "\u224E", - "CHcy;": "\u0427", - "COPY": "\u00A9", - "COPY;": "\u00A9", - "Cacute;": "\u0106", - "Cap;": "\u22D2", - "CapitalDifferentialD;": "\u2145", - "Cayleys;": "\u212D", - "Ccaron;": "\u010C", - "Ccedil": "\u00C7", - "Ccedil;": "\u00C7", - "Ccirc;": "\u0108", - "Cconint;": "\u2230", - "Cdot;": "\u010A", - "Cedilla;": "\u00B8", - "CenterDot;": "\u00B7", - "Cfr;": "\u212D", - "Chi;": "\u03A7", - "CircleDot;": "\u2299", - "CircleMinus;": "\u2296", - "CirclePlus;": "\u2295", - "CircleTimes;": "\u2297", - "ClockwiseContourIntegral;": "\u2232", - "CloseCurlyDoubleQuote;": "\u201D", - "CloseCurlyQuote;": "\u2019", - "Colon;": "\u2237", - "Colone;": "\u2A74", - "Congruent;": "\u2261", - "Conint;": "\u222F", - "ContourIntegral;": "\u222E", - "Copf;": "\u2102", - "Coproduct;": "\u2210", - "CounterClockwiseContourIntegral;": "\u2233", - "Cross;": "\u2A2F", - "Cscr;": "\u1D49E", - "Cup;": "\u22D3", - "CupCap;": "\u224D", - "DD;": "\u2145", - "DDotrahd;": "\u2911", - "DJcy;": "\u0402", - "DScy;": "\u0405", - "DZcy;": "\u040F", - "Dagger;": "\u2021", - "Darr;": "\u21A1", - "Dashv;": "\u2AE4", - "Dcaron;": "\u010E", - "Dcy;": "\u0414", - "Del;": "\u2207", - "Delta;": "\u0394", - "Dfr;": "\u1D507", - "DiacriticalAcute;": "\u00B4", - "DiacriticalDot;": "\u02D9", - "DiacriticalDoubleAcute;": "\u02DD", - "DiacriticalGrave;": "`", - "DiacriticalTilde;": "\u02DC", - "Diamond;": "\u22C4", - "DifferentialD;": "\u2146", - "Dopf;": "\u1D53B", - "Dot;": "\u00A8", - "DotDot;": "\u20DC", - "DotEqual;": "\u2250", - "DoubleContourIntegral;": "\u222F", - "DoubleDot;": "\u00A8", - "DoubleDownArrow;": "\u21D3", - "DoubleLeftArrow;": "\u21D0", - "DoubleLeftRightArrow;": "\u21D4", - "DoubleLeftTee;": "\u2AE4", - "DoubleLongLeftArrow;": "\u27F8", - "DoubleLongLeftRightArrow;": "\u27FA", - "DoubleLongRightArrow;": "\u27F9", - "DoubleRightArrow;": "\u21D2", - "DoubleRightTee;": "\u22A8", - "DoubleUpArrow;": "\u21D1", - "DoubleUpDownArrow;": "\u21D5", - "DoubleVerticalBar;": "\u2225", - "DownArrow;": "\u2193", - "DownArrowBar;": "\u2913", - "DownArrowUpArrow;": "\u21F5", - "DownBreve;": "\u0311", - "DownLeftRightVector;": "\u2950", - "DownLeftTeeVector;": "\u295E", - "DownLeftVector;": "\u21BD", - "DownLeftVectorBar;": "\u2956", - "DownRightTeeVector;": "\u295F", - "DownRightVector;": "\u21C1", - "DownRightVectorBar;": "\u2957", - "DownTee;": "\u22A4", - "DownTeeArrow;": "\u21A7", - "Downarrow;": "\u21D3", - "Dscr;": "\u1D49F", - "Dstrok;": "\u0110", - "ENG;": "\u014A", - "ETH": "\u00D0", - "ETH;": "\u00D0", - "Eacute": "\u00C9", - "Eacute;": "\u00C9", - "Ecaron;": "\u011A", - "Ecirc": "\u00CA", - "Ecirc;": "\u00CA", - "Ecy;": "\u042D", - "Edot;": "\u0116", - "Efr;": "\u1D508", - "Egrave": "\u00C8", - "Egrave;": "\u00C8", - "Element;": "\u2208", - "Emacr;": "\u0112", - "EmptySmallSquare;": "\u25FB", - "EmptyVerySmallSquare;": "\u25AB", - "Eogon;": "\u0118", - "Eopf;": "\u1D53C", - "Epsilon;": "\u0395", - "Equal;": "\u2A75", - "EqualTilde;": "\u2242", - "Equilibrium;": "\u21CC", - "Escr;": "\u2130", - "Esim;": "\u2A73", - "Eta;": "\u0397", - "Euml": "\u00CB", - "Euml;": "\u00CB", - "Exists;": "\u2203", - "ExponentialE;": "\u2147", - "Fcy;": "\u0424", - "Ffr;": "\u1D509", - "FilledSmallSquare;": "\u25FC", - "FilledVerySmallSquare;": "\u25AA", - "Fopf;": "\u1D53D", - "ForAll;": "\u2200", - "Fouriertrf;": "\u2131", - "Fscr;": "\u2131", - "GJcy;": "\u0403", - "GT": ">", - "GT;": ">", - "Gamma;": "\u0393", - "Gammad;": "\u03DC", - "Gbreve;": "\u011E", - "Gcedil;": "\u0122", - "Gcirc;": "\u011C", - "Gcy;": "\u0413", - "Gdot;": "\u0120", - "Gfr;": "\u1D50A", - "Gg;": "\u22D9", - "Gopf;": "\u1D53E", - "GreaterEqual;": "\u2265", - "GreaterEqualLess;": "\u22DB", - "GreaterFullEqual;": "\u2267", - "GreaterGreater;": "\u2AA2", - "GreaterLess;": "\u2277", - "GreaterSlantEqual;": "\u2A7E", - "GreaterTilde;": "\u2273", - "Gscr;": "\u1D4A2", - "Gt;": "\u226B", - "HARDcy;": "\u042A", - "Hacek;": "\u02C7", - "Hat;": "^", - "Hcirc;": "\u0124", - "Hfr;": "\u210C", - "HilbertSpace;": "\u210B", - "Hopf;": "\u210D", - "HorizontalLine;": "\u2500", - "Hscr;": "\u210B", - "Hstrok;": "\u0126", - "HumpDownHump;": "\u224E", - "HumpEqual;": "\u224F", - "IEcy;": "\u0415", - "IJlig;": "\u0132", - "IOcy;": "\u0401", - "Iacute": "\u00CD", - "Iacute;": "\u00CD", - "Icirc": "\u00CE", - "Icirc;": "\u00CE", - "Icy;": "\u0418", - "Idot;": "\u0130", - "Ifr;": "\u2111", - "Igrave": "\u00CC", - "Igrave;": "\u00CC", - "Im;": "\u2111", - "Imacr;": "\u012A", - "ImaginaryI;": "\u2148", - "Implies;": "\u21D2", - "Int;": "\u222C", - "Integral;": "\u222B", - "Intersection;": "\u22C2", - "InvisibleComma;": "\u2063", - "InvisibleTimes;": "\u2062", - "Iogon;": "\u012E", - "Iopf;": "\u1D540", - "Iota;": "\u0399", - "Iscr;": "\u2110", - "Itilde;": "\u0128", - "Iukcy;": "\u0406", - "Iuml": "\u00CF", - "Iuml;": "\u00CF", - "Jcirc;": "\u0134", - "Jcy;": "\u0419", - "Jfr;": "\u1D50D", - "Jopf;": "\u1D541", - "Jscr;": "\u1D4A5", - "Jsercy;": "\u0408", - "Jukcy;": "\u0404", - "KHcy;": "\u0425", - "KJcy;": "\u040C", - "Kappa;": "\u039A", - "Kcedil;": "\u0136", - "Kcy;": "\u041A", - "Kfr;": "\u1D50E", - "Kopf;": "\u1D542", - "Kscr;": "\u1D4A6", - "LJcy;": "\u0409", - "LT": "<", - "LT;": "<", - "Lacute;": "\u0139", - "Lambda;": "\u039B", - "Lang;": "\u27EA", - "Laplacetrf;": "\u2112", - "Larr;": "\u219E", - "Lcaron;": "\u013D", - "Lcedil;": "\u013B", - "Lcy;": "\u041B", - "LeftAngleBracket;": "\u27E8", - "LeftArrow;": "\u2190", - "LeftArrowBar;": "\u21E4", - "LeftArrowRightArrow;": "\u21C6", - "LeftCeiling;": "\u2308", - "LeftDoubleBracket;": "\u27E6", - "LeftDownTeeVector;": "\u2961", - "LeftDownVector;": "\u21C3", - "LeftDownVectorBar;": "\u2959", - "LeftFloor;": "\u230A", - "LeftRightArrow;": "\u2194", - "LeftRightVector;": "\u294E", - "LeftTee;": "\u22A3", - "LeftTeeArrow;": "\u21A4", - "LeftTeeVector;": "\u295A", - "LeftTriangle;": "\u22B2", - "LeftTriangleBar;": "\u29CF", - "LeftTriangleEqual;": "\u22B4", - "LeftUpDownVector;": "\u2951", - "LeftUpTeeVector;": "\u2960", - "LeftUpVector;": "\u21BF", - "LeftUpVectorBar;": "\u2958", - "LeftVector;": "\u21BC", - "LeftVectorBar;": "\u2952", - "Leftarrow;": "\u21D0", - "Leftrightarrow;": "\u21D4", - "LessEqualGreater;": "\u22DA", - "LessFullEqual;": "\u2266", - "LessGreater;": "\u2276", - "LessLess;": "\u2AA1", - "LessSlantEqual;": "\u2A7D", - "LessTilde;": "\u2272", - "Lfr;": "\u1D50F", - "Ll;": "\u22D8", - "Lleftarrow;": "\u21DA", - "Lmidot;": "\u013F", - "LongLeftArrow;": "\u27F5", - "LongLeftRightArrow;": "\u27F7", - "LongRightArrow;": "\u27F6", - "Longleftarrow;": "\u27F8", - "Longleftrightarrow;": "\u27FA", - "Longrightarrow;": "\u27F9", - "Lopf;": "\u1D543", - "LowerLeftArrow;": "\u2199", - "LowerRightArrow;": "\u2198", - "Lscr;": "\u2112", - "Lsh;": "\u21B0", - "Lstrok;": "\u0141", - "Lt;": "\u226A", - "Map;": "\u2905", - "Mcy;": "\u041C", - "MediumSpace;": "\u205F", - "Mellintrf;": "\u2133", - "Mfr;": "\u1D510", - "MinusPlus;": "\u2213", - "Mopf;": "\u1D544", - "Mscr;": "\u2133", - "Mu;": "\u039C", - "NJcy;": "\u040A", - "Nacute;": "\u0143", - "Ncaron;": "\u0147", - "Ncedil;": "\u0145", - "Ncy;": "\u041D", - "NegativeMediumSpace;": "\u200B", - "NegativeThickSpace;": "\u200B", - "NegativeThinSpace;": "\u200B", - "NegativeVeryThinSpace;": "\u200B", - "NestedGreaterGreater;": "\u226B", - "NestedLessLess;": "\u226A", - "NewLine;": "\u000A", - "Nfr;": "\u1D511", - "NoBreak;": "\u2060", - "NonBreakingSpace;": "\u00A0", - "Nopf;": "\u2115", - "Not;": "\u2AEC", - "NotCongruent;": "\u2262", - "NotCupCap;": "\u226D", - "NotDoubleVerticalBar;": "\u2226", - "NotElement;": "\u2209", - "NotEqual;": "\u2260", - "NotEqualTilde;": "\u2242\u0338", - "NotExists;": "\u2204", - "NotGreater;": "\u226F", - "NotGreaterEqual;": "\u2271", - "NotGreaterFullEqual;": "\u2267\u0338", - "NotGreaterGreater;": "\u226B\u0338", - "NotGreaterLess;": "\u2279", - "NotGreaterSlantEqual;": "\u2A7E\u0338", - "NotGreaterTilde;": "\u2275", - "NotHumpDownHump;": "\u224E\u0338", - "NotHumpEqual;": "\u224F\u0338", - "NotLeftTriangle;": "\u22EA", - "NotLeftTriangleBar;": "\u29CF\u0338", - "NotLeftTriangleEqual;": "\u22EC", - "NotLess;": "\u226E", - "NotLessEqual;": "\u2270", - "NotLessGreater;": "\u2278", - "NotLessLess;": "\u226A\u0338", - "NotLessSlantEqual;": "\u2A7D\u0338", - "NotLessTilde;": "\u2274", - "NotNestedGreaterGreater;": "\u2AA2\u0338", - "NotNestedLessLess;": "\u2AA1\u0338", - "NotPrecedes;": "\u2280", - "NotPrecedesEqual;": "\u2AAF\u0338", - "NotPrecedesSlantEqual;": "\u22E0", - "NotReverseElement;": "\u220C", - "NotRightTriangle;": "\u22EB", - "NotRightTriangleBar;": "\u29D0\u0338", - "NotRightTriangleEqual;": "\u22ED", - "NotSquareSubset;": "\u228F\u0338", - "NotSquareSubsetEqual;": "\u22E2", - "NotSquareSuperset;": "\u2290\u0338", - "NotSquareSupersetEqual;": "\u22E3", - "NotSubset;": "\u2282\u20D2", - "NotSubsetEqual;": "\u2288", - "NotSucceeds;": "\u2281", - "NotSucceedsEqual;": "\u2AB0\u0338", - "NotSucceedsSlantEqual;": "\u22E1", - "NotSucceedsTilde;": "\u227F\u0338", - "NotSuperset;": "\u2283\u20D2", - "NotSupersetEqual;": "\u2289", - "NotTilde;": "\u2241", - "NotTildeEqual;": "\u2244", - "NotTildeFullEqual;": "\u2247", - "NotTildeTilde;": "\u2249", - "NotVerticalBar;": "\u2224", - "Nscr;": "\u1D4A9", - "Ntilde": "\u00D1", - "Ntilde;": "\u00D1", - "Nu;": "\u039D", - "OElig;": "\u0152", - "Oacute": "\u00D3", - "Oacute;": "\u00D3", - "Ocirc": "\u00D4", - "Ocirc;": "\u00D4", - "Ocy;": "\u041E", - "Odblac;": "\u0150", - "Ofr;": "\u1D512", - "Ograve": "\u00D2", - "Ograve;": "\u00D2", - "Omacr;": "\u014C", - "Omega;": "\u03A9", - "Omicron;": "\u039F", - "Oopf;": "\u1D546", - "OpenCurlyDoubleQuote;": "\u201C", - "OpenCurlyQuote;": "\u2018", - "Or;": "\u2A54", - "Oscr;": "\u1D4AA", - "Oslash": "\u00D8", - "Oslash;": "\u00D8", - "Otilde": "\u00D5", - "Otilde;": "\u00D5", - "Otimes;": "\u2A37", - "Ouml": "\u00D6", - "Ouml;": "\u00D6", - "OverBar;": "\u203E", - "OverBrace;": "\u23DE", - "OverBracket;": "\u23B4", - "OverParenthesis;": "\u23DC", - "PartialD;": "\u2202", - "Pcy;": "\u041F", - "Pfr;": "\u1D513", - "Phi;": "\u03A6", - "Pi;": "\u03A0", - "PlusMinus;": "\u00B1", - "Poincareplane;": "\u210C", - "Popf;": "\u2119", - "Pr;": "\u2ABB", - "Precedes;": "\u227A", - "PrecedesEqual;": "\u2AAF", - "PrecedesSlantEqual;": "\u227C", - "PrecedesTilde;": "\u227E", - "Prime;": "\u2033", - "Product;": "\u220F", - "Proportion;": "\u2237", - "Proportional;": "\u221D", - "Pscr;": "\u1D4AB", - "Psi;": "\u03A8", - "QUOT": "\u0022", - "QUOT;": "\u0022", - "Qfr;": "\u1D514", - "Qopf;": "\u211A", - "Qscr;": "\u1D4AC", - "RBarr;": "\u2910", - "REG": "\u00AE", - "REG;": "\u00AE", - "Racute;": "\u0154", - "Rang;": "\u27EB", - "Rarr;": "\u21A0", - "Rarrtl;": "\u2916", - "Rcaron;": "\u0158", - "Rcedil;": "\u0156", - "Rcy;": "\u0420", - "Re;": "\u211C", - "ReverseElement;": "\u220B", - "ReverseEquilibrium;": "\u21CB", - "ReverseUpEquilibrium;": "\u296F", - "Rfr;": "\u211C", - "Rho;": "\u03A1", - "RightAngleBracket;": "\u27E9", - "RightArrow;": "\u2192", - "RightArrowBar;": "\u21E5", - "RightArrowLeftArrow;": "\u21C4", - "RightCeiling;": "\u2309", - "RightDoubleBracket;": "\u27E7", - "RightDownTeeVector;": "\u295D", - "RightDownVector;": "\u21C2", - "RightDownVectorBar;": "\u2955", - "RightFloor;": "\u230B", - "RightTee;": "\u22A2", - "RightTeeArrow;": "\u21A6", - "RightTeeVector;": "\u295B", - "RightTriangle;": "\u22B3", - "RightTriangleBar;": "\u29D0", - "RightTriangleEqual;": "\u22B5", - "RightUpDownVector;": "\u294F", - "RightUpTeeVector;": "\u295C", - "RightUpVector;": "\u21BE", - "RightUpVectorBar;": "\u2954", - "RightVector;": "\u21C0", - "RightVectorBar;": "\u2953", - "Rightarrow;": "\u21D2", - "Ropf;": "\u211D", - "RoundImplies;": "\u2970", - "Rrightarrow;": "\u21DB", - "Rscr;": "\u211B", - "Rsh;": "\u21B1", - "RuleDelayed;": "\u29F4", - "SHCHcy;": "\u0429", - "SHcy;": "\u0428", - "SOFTcy;": "\u042C", - "Sacute;": "\u015A", - "Sc;": "\u2ABC", - "Scaron;": "\u0160", - "Scedil;": "\u015E", - "Scirc;": "\u015C", - "Scy;": "\u0421", - "Sfr;": "\u1D516", - "ShortDownArrow;": "\u2193", - "ShortLeftArrow;": "\u2190", - "ShortRightArrow;": "\u2192", - "ShortUpArrow;": "\u2191", - "Sigma;": "\u03A3", - "SmallCircle;": "\u2218", - "Sopf;": "\u1D54A", - "Sqrt;": "\u221A", - "Square;": "\u25A1", - "SquareIntersection;": "\u2293", - "SquareSubset;": "\u228F", - "SquareSubsetEqual;": "\u2291", - "SquareSuperset;": "\u2290", - "SquareSupersetEqual;": "\u2292", - "SquareUnion;": "\u2294", - "Sscr;": "\u1D4AE", - "Star;": "\u22C6", - "Sub;": "\u22D0", - "Subset;": "\u22D0", - "SubsetEqual;": "\u2286", - "Succeeds;": "\u227B", - "SucceedsEqual;": "\u2AB0", - "SucceedsSlantEqual;": "\u227D", - "SucceedsTilde;": "\u227F", - "SuchThat;": "\u220B", - "Sum;": "\u2211", - "Sup;": "\u22D1", - "Superset;": "\u2283", - "SupersetEqual;": "\u2287", - "Supset;": "\u22D1", - "THORN": "\u00DE", - "THORN;": "\u00DE", - "TRADE;": "\u2122", - "TSHcy;": "\u040B", - "TScy;": "\u0426", - "Tab;": "\u0009", - "Tau;": "\u03A4", - "Tcaron;": "\u0164", - "Tcedil;": "\u0162", - "Tcy;": "\u0422", - "Tfr;": "\u1D517", - "Therefore;": "\u2234", - "Theta;": "\u0398", - "ThickSpace;": "\u205F\u200A", - "ThinSpace;": "\u2009", - "Tilde;": "\u223C", - "TildeEqual;": "\u2243", - "TildeFullEqual;": "\u2245", - "TildeTilde;": "\u2248", - "Topf;": "\u1D54B", - "TripleDot;": "\u20DB", - "Tscr;": "\u1D4AF", - "Tstrok;": "\u0166", - "Uacute": "\u00DA", - "Uacute;": "\u00DA", - "Uarr;": "\u219F", - "Uarrocir;": "\u2949", - "Ubrcy;": "\u040E", - "Ubreve;": "\u016C", - "Ucirc": "\u00DB", - "Ucirc;": "\u00DB", - "Ucy;": "\u0423", - "Udblac;": "\u0170", - "Ufr;": "\u1D518", - "Ugrave": "\u00D9", - "Ugrave;": "\u00D9", - "Umacr;": "\u016A", - "UnderBar;": "_", - "UnderBrace;": "\u23DF", - "UnderBracket;": "\u23B5", - "UnderParenthesis;": "\u23DD", - "Union;": "\u22C3", - "UnionPlus;": "\u228E", - "Uogon;": "\u0172", - "Uopf;": "\u1D54C", - "UpArrow;": "\u2191", - "UpArrowBar;": "\u2912", - "UpArrowDownArrow;": "\u21C5", - "UpDownArrow;": "\u2195", - "UpEquilibrium;": "\u296E", - "UpTee;": "\u22A5", - "UpTeeArrow;": "\u21A5", - "Uparrow;": "\u21D1", - "Updownarrow;": "\u21D5", - "UpperLeftArrow;": "\u2196", - "UpperRightArrow;": "\u2197", - "Upsi;": "\u03D2", - "Upsilon;": "\u03A5", - "Uring;": "\u016E", - "Uscr;": "\u1D4B0", - "Utilde;": "\u0168", - "Uuml": "\u00DC", - "Uuml;": "\u00DC", - "VDash;": "\u22AB", - "Vbar;": "\u2AEB", - "Vcy;": "\u0412", - "Vdash;": "\u22A9", - "Vdashl;": "\u2AE6", - "Vee;": "\u22C1", - "Verbar;": "\u2016", - "Vert;": "\u2016", - "VerticalBar;": "\u2223", - "VerticalLine;": "|", - "VerticalSeparator;": "\u2758", - "VerticalTilde;": "\u2240", - "VeryThinSpace;": "\u200A", - "Vfr;": "\u1D519", - "Vopf;": "\u1D54D", - "Vscr;": "\u1D4B1", - "Vvdash;": "\u22AA", - "Wcirc;": "\u0174", - "Wedge;": "\u22C0", - "Wfr;": "\u1D51A", - "Wopf;": "\u1D54E", - "Wscr;": "\u1D4B2", - "Xfr;": "\u1D51B", - "Xi;": "\u039E", - "Xopf;": "\u1D54F", - "Xscr;": "\u1D4B3", - "YAcy;": "\u042F", - "YIcy;": "\u0407", - "YUcy;": "\u042E", - "Yacute": "\u00DD", - "Yacute;": "\u00DD", - "Ycirc;": "\u0176", - "Ycy;": "\u042B", - "Yfr;": "\u1D51C", - "Yopf;": "\u1D550", - "Yscr;": "\u1D4B4", - "Yuml;": "\u0178", - "ZHcy;": "\u0416", - "Zacute;": "\u0179", - "Zcaron;": "\u017D", - "Zcy;": "\u0417", - "Zdot;": "\u017B", - "ZeroWidthSpace;": "\u200B", - "Zeta;": "\u0396", - "Zfr;": "\u2128", - "Zopf;": "\u2124", - "Zscr;": "\u1D4B5", - "aacute": "\u00E1", + "Aacute": "\u00C1", "aacute;": "\u00E1", + "aacute": "\u00E1", + "Abreve;": "\u0102", "abreve;": "\u0103", "ac;": "\u223E", - "acE;": "\u223E\u0333", "acd;": "\u223F", - "acirc": "\u00E2", + "acE;": "\u223E\u0333", + "Acirc;": "\u00C2", + "Acirc": "\u00C2", "acirc;": "\u00E2", - "acute": "\u00B4", + "acirc": "\u00E2", "acute;": "\u00B4", + "acute": "\u00B4", + "Acy;": "\u0410", "acy;": "\u0430", - "aelig": "\u00E6", + "AElig;": "\u00C6", + "AElig": "\u00C6", "aelig;": "\u00E6", + "aelig": "\u00E6", "af;": "\u2061", - "afr;": "\u1D51E", - "agrave": "\u00E0", + "Afr;": "\uD835\uDD04", + "afr;": "\uD835\uDD1E", + "Agrave;": "\u00C0", + "Agrave": "\u00C0", "agrave;": "\u00E0", + "agrave": "\u00E0", "alefsym;": "\u2135", "aleph;": "\u2135", + "Alpha;": "\u0391", "alpha;": "\u03B1", + "Amacr;": "\u0100", "amacr;": "\u0101", "amalg;": "\u2A3F", - "amp": "&", - "amp;": "&", - "and;": "\u2227", + "amp;": "\u0026", + "amp": "\u0026", + "AMP;": "\u0026", + "AMP": "\u0026", "andand;": "\u2A55", + "And;": "\u2A53", + "and;": "\u2227", "andd;": "\u2A5C", "andslope;": "\u2A58", "andv;": "\u2A5A", "ang;": "\u2220", "ange;": "\u29A4", "angle;": "\u2220", - "angmsd;": "\u2221", "angmsdaa;": "\u29A8", "angmsdab;": "\u29A9", "angmsdac;": "\u29AA", @@ -7389,57 +6878,76 @@ module.exports = { "angmsdaf;": "\u29AD", "angmsdag;": "\u29AE", "angmsdah;": "\u29AF", + "angmsd;": "\u2221", "angrt;": "\u221F", "angrtvb;": "\u22BE", "angrtvbd;": "\u299D", "angsph;": "\u2222", "angst;": "\u00C5", "angzarr;": "\u237C", + "Aogon;": "\u0104", "aogon;": "\u0105", - "aopf;": "\u1D552", + "Aopf;": "\uD835\uDD38", + "aopf;": "\uD835\uDD52", + "apacir;": "\u2A6F", "ap;": "\u2248", "apE;": "\u2A70", - "apacir;": "\u2A6F", "ape;": "\u224A", "apid;": "\u224B", "apos;": "\u0027", + "ApplyFunction;": "\u2061", "approx;": "\u2248", "approxeq;": "\u224A", - "aring": "\u00E5", + "Aring;": "\u00C5", + "Aring": "\u00C5", "aring;": "\u00E5", - "ascr;": "\u1D4B6", - "ast;": "*", + "aring": "\u00E5", + "Ascr;": "\uD835\uDC9C", + "ascr;": "\uD835\uDCB6", + "Assign;": "\u2254", + "ast;": "\u002A", "asymp;": "\u2248", "asympeq;": "\u224D", - "atilde": "\u00E3", + "Atilde;": "\u00C3", + "Atilde": "\u00C3", "atilde;": "\u00E3", - "auml": "\u00E4", + "atilde": "\u00E3", + "Auml;": "\u00C4", + "Auml": "\u00C4", "auml;": "\u00E4", + "auml": "\u00E4", "awconint;": "\u2233", "awint;": "\u2A11", - "bNot;": "\u2AED", "backcong;": "\u224C", "backepsilon;": "\u03F6", "backprime;": "\u2035", "backsim;": "\u223D", "backsimeq;": "\u22CD", + "Backslash;": "\u2216", + "Barv;": "\u2AE7", "barvee;": "\u22BD", "barwed;": "\u2305", + "Barwed;": "\u2306", "barwedge;": "\u2305", "bbrk;": "\u23B5", "bbrktbrk;": "\u23B6", "bcong;": "\u224C", + "Bcy;": "\u0411", "bcy;": "\u0431", "bdquo;": "\u201E", "becaus;": "\u2235", "because;": "\u2235", + "Because;": "\u2235", "bemptyv;": "\u29B0", "bepsi;": "\u03F6", "bernou;": "\u212C", + "Bernoullis;": "\u212C", + "Beta;": "\u0392", "beta;": "\u03B2", "beth;": "\u2136", "between;": "\u226C", - "bfr;": "\u1D51F", + "Bfr;": "\uD835\uDD05", + "bfr;": "\uD835\uDD1F", "bigcap;": "\u22C2", "bigcirc;": "\u25EF", "bigcup;": "\u22C3", @@ -7467,138 +6975,177 @@ module.exports = { "block;": "\u2588", "bne;": "\u003D\u20E5", "bnequiv;": "\u2261\u20E5", + "bNot;": "\u2AED", "bnot;": "\u2310", - "bopf;": "\u1D553", + "Bopf;": "\uD835\uDD39", + "bopf;": "\uD835\uDD53", "bot;": "\u22A5", "bottom;": "\u22A5", "bowtie;": "\u22C8", - "boxDL;": "\u2557", - "boxDR;": "\u2554", - "boxDl;": "\u2556", - "boxDr;": "\u2553", - "boxH;": "\u2550", - "boxHD;": "\u2566", - "boxHU;": "\u2569", - "boxHd;": "\u2564", - "boxHu;": "\u2567", - "boxUL;": "\u255D", - "boxUR;": "\u255A", - "boxUl;": "\u255C", - "boxUr;": "\u2559", - "boxV;": "\u2551", - "boxVH;": "\u256C", - "boxVL;": "\u2563", - "boxVR;": "\u2560", - "boxVh;": "\u256B", - "boxVl;": "\u2562", - "boxVr;": "\u255F", "boxbox;": "\u29C9", - "boxdL;": "\u2555", - "boxdR;": "\u2552", "boxdl;": "\u2510", + "boxdL;": "\u2555", + "boxDl;": "\u2556", + "boxDL;": "\u2557", "boxdr;": "\u250C", + "boxdR;": "\u2552", + "boxDr;": "\u2553", + "boxDR;": "\u2554", "boxh;": "\u2500", - "boxhD;": "\u2565", - "boxhU;": "\u2568", + "boxH;": "\u2550", "boxhd;": "\u252C", + "boxHd;": "\u2564", + "boxhD;": "\u2565", + "boxHD;": "\u2566", "boxhu;": "\u2534", + "boxHu;": "\u2567", + "boxhU;": "\u2568", + "boxHU;": "\u2569", "boxminus;": "\u229F", "boxplus;": "\u229E", "boxtimes;": "\u22A0", - "boxuL;": "\u255B", - "boxuR;": "\u2558", "boxul;": "\u2518", + "boxuL;": "\u255B", + "boxUl;": "\u255C", + "boxUL;": "\u255D", "boxur;": "\u2514", + "boxuR;": "\u2558", + "boxUr;": "\u2559", + "boxUR;": "\u255A", "boxv;": "\u2502", - "boxvH;": "\u256A", - "boxvL;": "\u2561", - "boxvR;": "\u255E", + "boxV;": "\u2551", "boxvh;": "\u253C", + "boxvH;": "\u256A", + "boxVh;": "\u256B", + "boxVH;": "\u256C", "boxvl;": "\u2524", + "boxvL;": "\u2561", + "boxVl;": "\u2562", + "boxVL;": "\u2563", "boxvr;": "\u251C", + "boxvR;": "\u255E", + "boxVr;": "\u255F", + "boxVR;": "\u2560", "bprime;": "\u2035", "breve;": "\u02D8", - "brvbar": "\u00A6", + "Breve;": "\u02D8", "brvbar;": "\u00A6", - "bscr;": "\u1D4B7", + "brvbar": "\u00A6", + "bscr;": "\uD835\uDCB7", + "Bscr;": "\u212C", "bsemi;": "\u204F", "bsim;": "\u223D", "bsime;": "\u22CD", - "bsol;": "\u005C", "bsolb;": "\u29C5", + "bsol;": "\u005C", "bsolhsub;": "\u27C8", "bull;": "\u2022", "bullet;": "\u2022", "bump;": "\u224E", "bumpE;": "\u2AAE", "bumpe;": "\u224F", + "Bumpeq;": "\u224E", "bumpeq;": "\u224F", + "Cacute;": "\u0106", "cacute;": "\u0107", - "cap;": "\u2229", "capand;": "\u2A44", "capbrcup;": "\u2A49", "capcap;": "\u2A4B", + "cap;": "\u2229", + "Cap;": "\u22D2", "capcup;": "\u2A47", "capdot;": "\u2A40", + "CapitalDifferentialD;": "\u2145", "caps;": "\u2229\uFE00", "caret;": "\u2041", "caron;": "\u02C7", + "Cayleys;": "\u212D", "ccaps;": "\u2A4D", + "Ccaron;": "\u010C", "ccaron;": "\u010D", - "ccedil": "\u00E7", + "Ccedil;": "\u00C7", + "Ccedil": "\u00C7", "ccedil;": "\u00E7", + "ccedil": "\u00E7", + "Ccirc;": "\u0108", "ccirc;": "\u0109", + "Cconint;": "\u2230", "ccups;": "\u2A4C", "ccupssm;": "\u2A50", + "Cdot;": "\u010A", "cdot;": "\u010B", - "cedil": "\u00B8", "cedil;": "\u00B8", + "cedil": "\u00B8", + "Cedilla;": "\u00B8", "cemptyv;": "\u29B2", - "cent": "\u00A2", "cent;": "\u00A2", + "cent": "\u00A2", "centerdot;": "\u00B7", - "cfr;": "\u1D520", + "CenterDot;": "\u00B7", + "cfr;": "\uD835\uDD20", + "Cfr;": "\u212D", + "CHcy;": "\u0427", "chcy;": "\u0447", "check;": "\u2713", "checkmark;": "\u2713", + "Chi;": "\u03A7", "chi;": "\u03C7", - "cir;": "\u25CB", - "cirE;": "\u29C3", "circ;": "\u02C6", "circeq;": "\u2257", "circlearrowleft;": "\u21BA", "circlearrowright;": "\u21BB", - "circledR;": "\u00AE", - "circledS;": "\u24C8", "circledast;": "\u229B", "circledcirc;": "\u229A", "circleddash;": "\u229D", + "CircleDot;": "\u2299", + "circledR;": "\u00AE", + "circledS;": "\u24C8", + "CircleMinus;": "\u2296", + "CirclePlus;": "\u2295", + "CircleTimes;": "\u2297", + "cir;": "\u25CB", + "cirE;": "\u29C3", "cire;": "\u2257", "cirfnint;": "\u2A10", "cirmid;": "\u2AEF", "cirscir;": "\u29C2", + "ClockwiseContourIntegral;": "\u2232", + "CloseCurlyDoubleQuote;": "\u201D", + "CloseCurlyQuote;": "\u2019", "clubs;": "\u2663", "clubsuit;": "\u2663", - "colon;": ":", + "colon;": "\u003A", + "Colon;": "\u2237", + "Colone;": "\u2A74", "colone;": "\u2254", "coloneq;": "\u2254", - "comma;": ",", - "commat;": "@", + "comma;": "\u002C", + "commat;": "\u0040", "comp;": "\u2201", "compfn;": "\u2218", "complement;": "\u2201", "complexes;": "\u2102", "cong;": "\u2245", "congdot;": "\u2A6D", + "Congruent;": "\u2261", "conint;": "\u222E", - "copf;": "\u1D554", + "Conint;": "\u222F", + "ContourIntegral;": "\u222E", + "copf;": "\uD835\uDD54", + "Copf;": "\u2102", "coprod;": "\u2210", - "copy": "\u00A9", + "Coproduct;": "\u2210", "copy;": "\u00A9", + "copy": "\u00A9", + "COPY;": "\u00A9", + "COPY": "\u00A9", "copysr;": "\u2117", + "CounterClockwiseContourIntegral;": "\u2233", "crarr;": "\u21B5", "cross;": "\u2717", - "cscr;": "\u1D4B8", + "Cross;": "\u2A2F", + "Cscr;": "\uD835\uDC9E", + "cscr;": "\uD835\uDCB8", "csub;": "\u2ACF", "csube;": "\u2AD1", "csup;": "\u2AD0", @@ -7610,9 +7157,11 @@ module.exports = { "cuesc;": "\u22DF", "cularr;": "\u21B6", "cularrp;": "\u293D", - "cup;": "\u222A", "cupbrcap;": "\u2A48", "cupcap;": "\u2A46", + "CupCap;": "\u224D", + "cup;": "\u222A", + "Cup;": "\u22D3", "cupcup;": "\u2A4A", "cupdot;": "\u228D", "cupor;": "\u2A45", @@ -7623,8 +7172,8 @@ module.exports = { "curlyeqsucc;": "\u22DF", "curlyvee;": "\u22CE", "curlywedge;": "\u22CF", - "curren": "\u00A4", "curren;": "\u00A4", + "curren": "\u00A4", "curvearrowleft;": "\u21B6", "curvearrowright;": "\u21B7", "cuvee;": "\u22CE", @@ -7632,63 +7181,116 @@ module.exports = { "cwconint;": "\u2232", "cwint;": "\u2231", "cylcty;": "\u232D", - "dArr;": "\u21D3", - "dHar;": "\u2965", "dagger;": "\u2020", + "Dagger;": "\u2021", "daleth;": "\u2138", "darr;": "\u2193", + "Darr;": "\u21A1", + "dArr;": "\u21D3", "dash;": "\u2010", + "Dashv;": "\u2AE4", "dashv;": "\u22A3", "dbkarow;": "\u290F", "dblac;": "\u02DD", + "Dcaron;": "\u010E", "dcaron;": "\u010F", + "Dcy;": "\u0414", "dcy;": "\u0434", - "dd;": "\u2146", "ddagger;": "\u2021", "ddarr;": "\u21CA", + "DD;": "\u2145", + "dd;": "\u2146", + "DDotrahd;": "\u2911", "ddotseq;": "\u2A77", - "deg": "\u00B0", "deg;": "\u00B0", + "deg": "\u00B0", + "Del;": "\u2207", + "Delta;": "\u0394", "delta;": "\u03B4", "demptyv;": "\u29B1", "dfisht;": "\u297F", - "dfr;": "\u1D521", + "Dfr;": "\uD835\uDD07", + "dfr;": "\uD835\uDD21", + "dHar;": "\u2965", "dharl;": "\u21C3", "dharr;": "\u21C2", + "DiacriticalAcute;": "\u00B4", + "DiacriticalDot;": "\u02D9", + "DiacriticalDoubleAcute;": "\u02DD", + "DiacriticalGrave;": "\u0060", + "DiacriticalTilde;": "\u02DC", "diam;": "\u22C4", "diamond;": "\u22C4", + "Diamond;": "\u22C4", "diamondsuit;": "\u2666", "diams;": "\u2666", "die;": "\u00A8", + "DifferentialD;": "\u2146", "digamma;": "\u03DD", "disin;": "\u22F2", "div;": "\u00F7", - "divide": "\u00F7", "divide;": "\u00F7", + "divide": "\u00F7", "divideontimes;": "\u22C7", "divonx;": "\u22C7", + "DJcy;": "\u0402", "djcy;": "\u0452", "dlcorn;": "\u231E", "dlcrop;": "\u230D", - "dollar;": "$", - "dopf;": "\u1D555", + "dollar;": "\u0024", + "Dopf;": "\uD835\uDD3B", + "dopf;": "\uD835\uDD55", + "Dot;": "\u00A8", "dot;": "\u02D9", + "DotDot;": "\u20DC", "doteq;": "\u2250", "doteqdot;": "\u2251", + "DotEqual;": "\u2250", "dotminus;": "\u2238", "dotplus;": "\u2214", "dotsquare;": "\u22A1", "doublebarwedge;": "\u2306", + "DoubleContourIntegral;": "\u222F", + "DoubleDot;": "\u00A8", + "DoubleDownArrow;": "\u21D3", + "DoubleLeftArrow;": "\u21D0", + "DoubleLeftRightArrow;": "\u21D4", + "DoubleLeftTee;": "\u2AE4", + "DoubleLongLeftArrow;": "\u27F8", + "DoubleLongLeftRightArrow;": "\u27FA", + "DoubleLongRightArrow;": "\u27F9", + "DoubleRightArrow;": "\u21D2", + "DoubleRightTee;": "\u22A8", + "DoubleUpArrow;": "\u21D1", + "DoubleUpDownArrow;": "\u21D5", + "DoubleVerticalBar;": "\u2225", + "DownArrowBar;": "\u2913", "downarrow;": "\u2193", + "DownArrow;": "\u2193", + "Downarrow;": "\u21D3", + "DownArrowUpArrow;": "\u21F5", + "DownBreve;": "\u0311", "downdownarrows;": "\u21CA", "downharpoonleft;": "\u21C3", "downharpoonright;": "\u21C2", + "DownLeftRightVector;": "\u2950", + "DownLeftTeeVector;": "\u295E", + "DownLeftVectorBar;": "\u2956", + "DownLeftVector;": "\u21BD", + "DownRightTeeVector;": "\u295F", + "DownRightVectorBar;": "\u2957", + "DownRightVector;": "\u21C1", + "DownTeeArrow;": "\u21A7", + "DownTee;": "\u22A4", "drbkarow;": "\u2910", "drcorn;": "\u231F", "drcrop;": "\u230C", - "dscr;": "\u1D4B9", + "Dscr;": "\uD835\uDC9F", + "dscr;": "\uD835\uDCB9", + "DScy;": "\u0405", "dscy;": "\u0455", "dsol;": "\u29F6", + "Dstrok;": "\u0110", "dstrok;": "\u0111", "dtdot;": "\u22F1", "dtri;": "\u25BF", @@ -7696,48 +7298,67 @@ module.exports = { "duarr;": "\u21F5", "duhar;": "\u296F", "dwangle;": "\u29A6", + "DZcy;": "\u040F", "dzcy;": "\u045F", "dzigrarr;": "\u27FF", - "eDDot;": "\u2A77", - "eDot;": "\u2251", - "eacute": "\u00E9", + "Eacute;": "\u00C9", + "Eacute": "\u00C9", "eacute;": "\u00E9", + "eacute": "\u00E9", "easter;": "\u2A6E", + "Ecaron;": "\u011A", "ecaron;": "\u011B", - "ecir;": "\u2256", - "ecirc": "\u00EA", + "Ecirc;": "\u00CA", + "Ecirc": "\u00CA", "ecirc;": "\u00EA", + "ecirc": "\u00EA", + "ecir;": "\u2256", "ecolon;": "\u2255", + "Ecy;": "\u042D", "ecy;": "\u044D", + "eDDot;": "\u2A77", + "Edot;": "\u0116", "edot;": "\u0117", + "eDot;": "\u2251", "ee;": "\u2147", "efDot;": "\u2252", - "efr;": "\u1D522", + "Efr;": "\uD835\uDD08", + "efr;": "\uD835\uDD22", "eg;": "\u2A9A", - "egrave": "\u00E8", + "Egrave;": "\u00C8", + "Egrave": "\u00C8", "egrave;": "\u00E8", + "egrave": "\u00E8", "egs;": "\u2A96", "egsdot;": "\u2A98", "el;": "\u2A99", + "Element;": "\u2208", "elinters;": "\u23E7", "ell;": "\u2113", "els;": "\u2A95", "elsdot;": "\u2A97", + "Emacr;": "\u0112", "emacr;": "\u0113", "empty;": "\u2205", "emptyset;": "\u2205", + "EmptySmallSquare;": "\u25FB", "emptyv;": "\u2205", + "EmptyVerySmallSquare;": "\u25AB", "emsp13;": "\u2004", "emsp14;": "\u2005", "emsp;": "\u2003", + "ENG;": "\u014A", "eng;": "\u014B", "ensp;": "\u2002", + "Eogon;": "\u0118", "eogon;": "\u0119", - "eopf;": "\u1D556", + "Eopf;": "\uD835\uDD3C", + "eopf;": "\uD835\uDD56", "epar;": "\u22D5", "eparsl;": "\u29E3", "eplus;": "\u2A71", "epsi;": "\u03B5", + "Epsilon;": "\u0395", "epsilon;": "\u03B5", "epsiv;": "\u03F5", "eqcirc;": "\u2256", @@ -7745,56 +7366,75 @@ module.exports = { "eqsim;": "\u2242", "eqslantgtr;": "\u2A96", "eqslantless;": "\u2A95", - "equals;": "=", + "Equal;": "\u2A75", + "equals;": "\u003D", + "EqualTilde;": "\u2242", "equest;": "\u225F", + "Equilibrium;": "\u21CC", "equiv;": "\u2261", "equivDD;": "\u2A78", "eqvparsl;": "\u29E5", - "erDot;": "\u2253", "erarr;": "\u2971", + "erDot;": "\u2253", "escr;": "\u212F", + "Escr;": "\u2130", "esdot;": "\u2250", + "Esim;": "\u2A73", "esim;": "\u2242", + "Eta;": "\u0397", "eta;": "\u03B7", - "eth": "\u00F0", + "ETH;": "\u00D0", + "ETH": "\u00D0", "eth;": "\u00F0", - "euml": "\u00EB", + "eth": "\u00F0", + "Euml;": "\u00CB", + "Euml": "\u00CB", "euml;": "\u00EB", + "euml": "\u00EB", "euro;": "\u20AC", - "excl;": "!", + "excl;": "\u0021", "exist;": "\u2203", + "Exists;": "\u2203", "expectation;": "\u2130", "exponentiale;": "\u2147", + "ExponentialE;": "\u2147", "fallingdotseq;": "\u2252", + "Fcy;": "\u0424", "fcy;": "\u0444", "female;": "\u2640", "ffilig;": "\uFB03", "fflig;": "\uFB00", "ffllig;": "\uFB04", - "ffr;": "\u1D523", + "Ffr;": "\uD835\uDD09", + "ffr;": "\uD835\uDD23", "filig;": "\uFB01", - "fjlig;": "\u0066", + "FilledSmallSquare;": "\u25FC", + "FilledVerySmallSquare;": "\u25AA", + "fjlig;": "\u0066\u006A", "flat;": "\u266D", "fllig;": "\uFB02", "fltns;": "\u25B1", "fnof;": "\u0192", - "fopf;": "\u1D557", + "Fopf;": "\uD835\uDD3D", + "fopf;": "\uD835\uDD57", "forall;": "\u2200", + "ForAll;": "\u2200", "fork;": "\u22D4", "forkv;": "\u2AD9", + "Fouriertrf;": "\u2131", "fpartint;": "\u2A0D", - "frac12": "\u00BD", "frac12;": "\u00BD", + "frac12": "\u00BD", "frac13;": "\u2153", - "frac14": "\u00BC", "frac14;": "\u00BC", + "frac14": "\u00BC", "frac15;": "\u2155", "frac16;": "\u2159", "frac18;": "\u215B", "frac23;": "\u2154", "frac25;": "\u2156", - "frac34": "\u00BE", "frac34;": "\u00BE", + "frac34": "\u00BE", "frac35;": "\u2157", "frac38;": "\u215C", "frac45;": "\u2158", @@ -7803,55 +7443,78 @@ module.exports = { "frac78;": "\u215E", "frasl;": "\u2044", "frown;": "\u2322", - "fscr;": "\u1D4BB", - "gE;": "\u2267", - "gEl;": "\u2A8C", + "fscr;": "\uD835\uDCBB", + "Fscr;": "\u2131", "gacute;": "\u01F5", + "Gamma;": "\u0393", "gamma;": "\u03B3", + "Gammad;": "\u03DC", "gammad;": "\u03DD", "gap;": "\u2A86", + "Gbreve;": "\u011E", "gbreve;": "\u011F", + "Gcedil;": "\u0122", + "Gcirc;": "\u011C", "gcirc;": "\u011D", + "Gcy;": "\u0413", "gcy;": "\u0433", + "Gdot;": "\u0120", "gdot;": "\u0121", "ge;": "\u2265", + "gE;": "\u2267", + "gEl;": "\u2A8C", "gel;": "\u22DB", "geq;": "\u2265", "geqq;": "\u2267", "geqslant;": "\u2A7E", - "ges;": "\u2A7E", "gescc;": "\u2AA9", + "ges;": "\u2A7E", "gesdot;": "\u2A80", "gesdoto;": "\u2A82", "gesdotol;": "\u2A84", "gesl;": "\u22DB\uFE00", "gesles;": "\u2A94", - "gfr;": "\u1D524", + "Gfr;": "\uD835\uDD0A", + "gfr;": "\uD835\uDD24", "gg;": "\u226B", + "Gg;": "\u22D9", "ggg;": "\u22D9", "gimel;": "\u2137", + "GJcy;": "\u0403", "gjcy;": "\u0453", + "gla;": "\u2AA5", "gl;": "\u2277", "glE;": "\u2A92", - "gla;": "\u2AA5", "glj;": "\u2AA4", - "gnE;": "\u2269", "gnap;": "\u2A8A", "gnapprox;": "\u2A8A", "gne;": "\u2A88", + "gnE;": "\u2269", "gneq;": "\u2A88", "gneqq;": "\u2269", "gnsim;": "\u22E7", - "gopf;": "\u1D558", - "grave;": "`", + "Gopf;": "\uD835\uDD3E", + "gopf;": "\uD835\uDD58", + "grave;": "\u0060", + "GreaterEqual;": "\u2265", + "GreaterEqualLess;": "\u22DB", + "GreaterFullEqual;": "\u2267", + "GreaterGreater;": "\u2AA2", + "GreaterLess;": "\u2277", + "GreaterSlantEqual;": "\u2A7E", + "GreaterTilde;": "\u2273", + "Gscr;": "\uD835\uDCA2", "gscr;": "\u210A", "gsim;": "\u2273", "gsime;": "\u2A8E", "gsiml;": "\u2A90", - "gt": ">", - "gt;": ">", "gtcc;": "\u2AA7", "gtcir;": "\u2A7A", + "gt;": "\u003E", + "gt": "\u003E", + "GT;": "\u003E", + "GT": "\u003E", + "Gt;": "\u226B", "gtdot;": "\u22D7", "gtlPar;": "\u2995", "gtquest;": "\u2A7C", @@ -7864,149 +7527,210 @@ module.exports = { "gtrsim;": "\u2273", "gvertneqq;": "\u2269\uFE00", "gvnE;": "\u2269\uFE00", - "hArr;": "\u21D4", + "Hacek;": "\u02C7", "hairsp;": "\u200A", "half;": "\u00BD", "hamilt;": "\u210B", + "HARDcy;": "\u042A", "hardcy;": "\u044A", - "harr;": "\u2194", "harrcir;": "\u2948", + "harr;": "\u2194", + "hArr;": "\u21D4", "harrw;": "\u21AD", + "Hat;": "\u005E", "hbar;": "\u210F", + "Hcirc;": "\u0124", "hcirc;": "\u0125", "hearts;": "\u2665", "heartsuit;": "\u2665", "hellip;": "\u2026", "hercon;": "\u22B9", - "hfr;": "\u1D525", + "hfr;": "\uD835\uDD25", + "Hfr;": "\u210C", + "HilbertSpace;": "\u210B", "hksearow;": "\u2925", "hkswarow;": "\u2926", "hoarr;": "\u21FF", "homtht;": "\u223B", "hookleftarrow;": "\u21A9", "hookrightarrow;": "\u21AA", - "hopf;": "\u1D559", + "hopf;": "\uD835\uDD59", + "Hopf;": "\u210D", "horbar;": "\u2015", - "hscr;": "\u1D4BD", + "HorizontalLine;": "\u2500", + "hscr;": "\uD835\uDCBD", + "Hscr;": "\u210B", "hslash;": "\u210F", + "Hstrok;": "\u0126", "hstrok;": "\u0127", + "HumpDownHump;": "\u224E", + "HumpEqual;": "\u224F", "hybull;": "\u2043", "hyphen;": "\u2010", - "iacute": "\u00ED", + "Iacute;": "\u00CD", + "Iacute": "\u00CD", "iacute;": "\u00ED", + "iacute": "\u00ED", "ic;": "\u2063", - "icirc": "\u00EE", + "Icirc;": "\u00CE", + "Icirc": "\u00CE", "icirc;": "\u00EE", + "icirc": "\u00EE", + "Icy;": "\u0418", "icy;": "\u0438", + "Idot;": "\u0130", + "IEcy;": "\u0415", "iecy;": "\u0435", - "iexcl": "\u00A1", "iexcl;": "\u00A1", + "iexcl": "\u00A1", "iff;": "\u21D4", - "ifr;": "\u1D526", - "igrave": "\u00EC", + "ifr;": "\uD835\uDD26", + "Ifr;": "\u2111", + "Igrave;": "\u00CC", + "Igrave": "\u00CC", "igrave;": "\u00EC", + "igrave": "\u00EC", "ii;": "\u2148", "iiiint;": "\u2A0C", "iiint;": "\u222D", "iinfin;": "\u29DC", "iiota;": "\u2129", + "IJlig;": "\u0132", "ijlig;": "\u0133", + "Imacr;": "\u012A", "imacr;": "\u012B", "image;": "\u2111", + "ImaginaryI;": "\u2148", "imagline;": "\u2110", "imagpart;": "\u2111", "imath;": "\u0131", + "Im;": "\u2111", "imof;": "\u22B7", "imped;": "\u01B5", - "in;": "\u2208", + "Implies;": "\u21D2", "incare;": "\u2105", + "in;": "\u2208", "infin;": "\u221E", "infintie;": "\u29DD", "inodot;": "\u0131", - "int;": "\u222B", "intcal;": "\u22BA", + "int;": "\u222B", + "Int;": "\u222C", "integers;": "\u2124", + "Integral;": "\u222B", "intercal;": "\u22BA", + "Intersection;": "\u22C2", "intlarhk;": "\u2A17", "intprod;": "\u2A3C", + "InvisibleComma;": "\u2063", + "InvisibleTimes;": "\u2062", + "IOcy;": "\u0401", "iocy;": "\u0451", + "Iogon;": "\u012E", "iogon;": "\u012F", - "iopf;": "\u1D55A", + "Iopf;": "\uD835\uDD40", + "iopf;": "\uD835\uDD5A", + "Iota;": "\u0399", "iota;": "\u03B9", "iprod;": "\u2A3C", - "iquest": "\u00BF", "iquest;": "\u00BF", - "iscr;": "\u1D4BE", + "iquest": "\u00BF", + "iscr;": "\uD835\uDCBE", + "Iscr;": "\u2110", "isin;": "\u2208", - "isinE;": "\u22F9", "isindot;": "\u22F5", + "isinE;": "\u22F9", "isins;": "\u22F4", "isinsv;": "\u22F3", "isinv;": "\u2208", "it;": "\u2062", + "Itilde;": "\u0128", "itilde;": "\u0129", + "Iukcy;": "\u0406", "iukcy;": "\u0456", - "iuml": "\u00EF", + "Iuml;": "\u00CF", + "Iuml": "\u00CF", "iuml;": "\u00EF", + "iuml": "\u00EF", + "Jcirc;": "\u0134", "jcirc;": "\u0135", + "Jcy;": "\u0419", "jcy;": "\u0439", - "jfr;": "\u1D527", + "Jfr;": "\uD835\uDD0D", + "jfr;": "\uD835\uDD27", "jmath;": "\u0237", - "jopf;": "\u1D55B", - "jscr;": "\u1D4BF", + "Jopf;": "\uD835\uDD41", + "jopf;": "\uD835\uDD5B", + "Jscr;": "\uD835\uDCA5", + "jscr;": "\uD835\uDCBF", + "Jsercy;": "\u0408", "jsercy;": "\u0458", + "Jukcy;": "\u0404", "jukcy;": "\u0454", + "Kappa;": "\u039A", "kappa;": "\u03BA", "kappav;": "\u03F0", + "Kcedil;": "\u0136", "kcedil;": "\u0137", + "Kcy;": "\u041A", "kcy;": "\u043A", - "kfr;": "\u1D528", + "Kfr;": "\uD835\uDD0E", + "kfr;": "\uD835\uDD28", "kgreen;": "\u0138", + "KHcy;": "\u0425", "khcy;": "\u0445", + "KJcy;": "\u040C", "kjcy;": "\u045C", - "kopf;": "\u1D55C", - "kscr;": "\u1D4C0", + "Kopf;": "\uD835\uDD42", + "kopf;": "\uD835\uDD5C", + "Kscr;": "\uD835\uDCA6", + "kscr;": "\uD835\uDCC0", "lAarr;": "\u21DA", - "lArr;": "\u21D0", - "lAtail;": "\u291B", - "lBarr;": "\u290E", - "lE;": "\u2266", - "lEg;": "\u2A8B", - "lHar;": "\u2962", + "Lacute;": "\u0139", "lacute;": "\u013A", "laemptyv;": "\u29B4", "lagran;": "\u2112", + "Lambda;": "\u039B", "lambda;": "\u03BB", "lang;": "\u27E8", + "Lang;": "\u27EA", "langd;": "\u2991", "langle;": "\u27E8", "lap;": "\u2A85", - "laquo": "\u00AB", + "Laplacetrf;": "\u2112", "laquo;": "\u00AB", - "larr;": "\u2190", + "laquo": "\u00AB", "larrb;": "\u21E4", "larrbfs;": "\u291F", + "larr;": "\u2190", + "Larr;": "\u219E", + "lArr;": "\u21D0", "larrfs;": "\u291D", "larrhk;": "\u21A9", "larrlp;": "\u21AB", "larrpl;": "\u2939", "larrsim;": "\u2973", "larrtl;": "\u21A2", - "lat;": "\u2AAB", "latail;": "\u2919", + "lAtail;": "\u291B", + "lat;": "\u2AAB", "late;": "\u2AAD", "lates;": "\u2AAD\uFE00", "lbarr;": "\u290C", + "lBarr;": "\u290E", "lbbrk;": "\u2772", - "lbrace;": "{", - "lbrack;": "[", + "lbrace;": "\u007B", + "lbrack;": "\u005B", "lbrke;": "\u298B", "lbrksld;": "\u298F", "lbrkslu;": "\u298D", + "Lcaron;": "\u013D", "lcaron;": "\u013E", + "Lcedil;": "\u013B", "lcedil;": "\u013C", "lceil;": "\u2308", - "lcub;": "{", + "lcub;": "\u007B", + "Lcy;": "\u041B", "lcy;": "\u043B", "ldca;": "\u2936", "ldquo;": "\u201C", @@ -8015,22 +7739,50 @@ module.exports = { "ldrushar;": "\u294B", "ldsh;": "\u21B2", "le;": "\u2264", + "lE;": "\u2266", + "LeftAngleBracket;": "\u27E8", + "LeftArrowBar;": "\u21E4", "leftarrow;": "\u2190", + "LeftArrow;": "\u2190", + "Leftarrow;": "\u21D0", + "LeftArrowRightArrow;": "\u21C6", "leftarrowtail;": "\u21A2", + "LeftCeiling;": "\u2308", + "LeftDoubleBracket;": "\u27E6", + "LeftDownTeeVector;": "\u2961", + "LeftDownVectorBar;": "\u2959", + "LeftDownVector;": "\u21C3", + "LeftFloor;": "\u230A", "leftharpoondown;": "\u21BD", "leftharpoonup;": "\u21BC", "leftleftarrows;": "\u21C7", "leftrightarrow;": "\u2194", + "LeftRightArrow;": "\u2194", + "Leftrightarrow;": "\u21D4", "leftrightarrows;": "\u21C6", "leftrightharpoons;": "\u21CB", "leftrightsquigarrow;": "\u21AD", + "LeftRightVector;": "\u294E", + "LeftTeeArrow;": "\u21A4", + "LeftTee;": "\u22A3", + "LeftTeeVector;": "\u295A", "leftthreetimes;": "\u22CB", + "LeftTriangleBar;": "\u29CF", + "LeftTriangle;": "\u22B2", + "LeftTriangleEqual;": "\u22B4", + "LeftUpDownVector;": "\u2951", + "LeftUpTeeVector;": "\u2960", + "LeftUpVectorBar;": "\u2958", + "LeftUpVector;": "\u21BF", + "LeftVectorBar;": "\u2952", + "LeftVector;": "\u21BC", + "lEg;": "\u2A8B", "leg;": "\u22DA", "leq;": "\u2264", "leqq;": "\u2266", "leqslant;": "\u2A7D", - "les;": "\u2A7D", "lescc;": "\u2AA8", + "les;": "\u2A7D", "lesdot;": "\u2A7F", "lesdoto;": "\u2A81", "lesdotor;": "\u2A83", @@ -8040,30 +7792,42 @@ module.exports = { "lessdot;": "\u22D6", "lesseqgtr;": "\u22DA", "lesseqqgtr;": "\u2A8B", + "LessEqualGreater;": "\u22DA", + "LessFullEqual;": "\u2266", + "LessGreater;": "\u2276", "lessgtr;": "\u2276", + "LessLess;": "\u2AA1", "lesssim;": "\u2272", + "LessSlantEqual;": "\u2A7D", + "LessTilde;": "\u2272", "lfisht;": "\u297C", "lfloor;": "\u230A", - "lfr;": "\u1D529", + "Lfr;": "\uD835\uDD0F", + "lfr;": "\uD835\uDD29", "lg;": "\u2276", "lgE;": "\u2A91", + "lHar;": "\u2962", "lhard;": "\u21BD", "lharu;": "\u21BC", "lharul;": "\u296A", "lhblk;": "\u2584", + "LJcy;": "\u0409", "ljcy;": "\u0459", - "ll;": "\u226A", "llarr;": "\u21C7", + "ll;": "\u226A", + "Ll;": "\u22D8", "llcorner;": "\u231E", + "Lleftarrow;": "\u21DA", "llhard;": "\u296B", "lltri;": "\u25FA", + "Lmidot;": "\u013F", "lmidot;": "\u0140", - "lmoust;": "\u23B0", "lmoustache;": "\u23B0", - "lnE;": "\u2268", + "lmoust;": "\u23B0", "lnap;": "\u2A89", "lnapprox;": "\u2A89", "lne;": "\u2A87", + "lnE;": "\u2268", "lneq;": "\u2A87", "lneqq;": "\u2268", "lnsim;": "\u22E6", @@ -8071,21 +7835,30 @@ module.exports = { "loarr;": "\u21FD", "lobrk;": "\u27E6", "longleftarrow;": "\u27F5", + "LongLeftArrow;": "\u27F5", + "Longleftarrow;": "\u27F8", "longleftrightarrow;": "\u27F7", + "LongLeftRightArrow;": "\u27F7", + "Longleftrightarrow;": "\u27FA", "longmapsto;": "\u27FC", "longrightarrow;": "\u27F6", + "LongRightArrow;": "\u27F6", + "Longrightarrow;": "\u27F9", "looparrowleft;": "\u21AB", "looparrowright;": "\u21AC", "lopar;": "\u2985", - "lopf;": "\u1D55D", + "Lopf;": "\uD835\uDD43", + "lopf;": "\uD835\uDD5D", "loplus;": "\u2A2D", "lotimes;": "\u2A34", "lowast;": "\u2217", - "lowbar;": "_", + "lowbar;": "\u005F", + "LowerLeftArrow;": "\u2199", + "LowerRightArrow;": "\u2198", "loz;": "\u25CA", "lozenge;": "\u25CA", "lozf;": "\u29EB", - "lpar;": "(", + "lpar;": "\u0028", "lparlt;": "\u2993", "lrarr;": "\u21C6", "lrcorner;": "\u231F", @@ -8094,38 +7867,44 @@ module.exports = { "lrm;": "\u200E", "lrtri;": "\u22BF", "lsaquo;": "\u2039", - "lscr;": "\u1D4C1", + "lscr;": "\uD835\uDCC1", + "Lscr;": "\u2112", "lsh;": "\u21B0", + "Lsh;": "\u21B0", "lsim;": "\u2272", "lsime;": "\u2A8D", "lsimg;": "\u2A8F", - "lsqb;": "[", + "lsqb;": "\u005B", "lsquo;": "\u2018", "lsquor;": "\u201A", + "Lstrok;": "\u0141", "lstrok;": "\u0142", - "lt": "<", - "lt;": "<", "ltcc;": "\u2AA6", "ltcir;": "\u2A79", + "lt;": "\u003C", + "lt": "\u003C", + "LT;": "\u003C", + "LT": "\u003C", + "Lt;": "\u226A", "ltdot;": "\u22D6", "lthree;": "\u22CB", "ltimes;": "\u22C9", "ltlarr;": "\u2976", "ltquest;": "\u2A7B", - "ltrPar;": "\u2996", "ltri;": "\u25C3", "ltrie;": "\u22B4", "ltrif;": "\u25C2", + "ltrPar;": "\u2996", "lurdshar;": "\u294A", "luruhar;": "\u2966", "lvertneqq;": "\u2268\uFE00", "lvnE;": "\u2268\uFE00", - "mDDot;": "\u223A", - "macr": "\u00AF", "macr;": "\u00AF", + "macr": "\u00AF", "male;": "\u2642", "malt;": "\u2720", "maltese;": "\u2720", + "Map;": "\u2905", "map;": "\u21A6", "mapsto;": "\u21A6", "mapstodown;": "\u21A7", @@ -8133,45 +7912,44 @@ module.exports = { "mapstoup;": "\u21A5", "marker;": "\u25AE", "mcomma;": "\u2A29", + "Mcy;": "\u041C", "mcy;": "\u043C", "mdash;": "\u2014", + "mDDot;": "\u223A", "measuredangle;": "\u2221", - "mfr;": "\u1D52A", + "MediumSpace;": "\u205F", + "Mellintrf;": "\u2133", + "Mfr;": "\uD835\uDD10", + "mfr;": "\uD835\uDD2A", "mho;": "\u2127", - "micro": "\u00B5", "micro;": "\u00B5", - "mid;": "\u2223", - "midast;": "*", + "micro": "\u00B5", + "midast;": "\u002A", "midcir;": "\u2AF0", - "middot": "\u00B7", + "mid;": "\u2223", "middot;": "\u00B7", - "minus;": "\u2212", + "middot": "\u00B7", "minusb;": "\u229F", + "minus;": "\u2212", "minusd;": "\u2238", "minusdu;": "\u2A2A", + "MinusPlus;": "\u2213", "mlcp;": "\u2ADB", "mldr;": "\u2026", "mnplus;": "\u2213", "models;": "\u22A7", - "mopf;": "\u1D55E", + "Mopf;": "\uD835\uDD44", + "mopf;": "\uD835\uDD5E", "mp;": "\u2213", - "mscr;": "\u1D4C2", + "mscr;": "\uD835\uDCC2", + "Mscr;": "\u2133", "mstpos;": "\u223E", + "Mu;": "\u039C", "mu;": "\u03BC", "multimap;": "\u22B8", "mumap;": "\u22B8", - "nGg;": "\u22D9\u0338", - "nGt;": "\u226B\u20D2", - "nGtv;": "\u226B\u0338", - "nLeftarrow;": "\u21CD", - "nLeftrightarrow;": "\u21CE", - "nLl;": "\u22D8\u0338", - "nLt;": "\u226A\u20D2", - "nLtv;": "\u226A\u0338", - "nRightarrow;": "\u21CF", - "nVDash;": "\u22AF", - "nVdash;": "\u22AE", "nabla;": "\u2207", + "Nacute;": "\u0143", "nacute;": "\u0144", "nang;": "\u2220\u20D2", "nap;": "\u2249", @@ -8179,101 +7957,178 @@ module.exports = { "napid;": "\u224B\u0338", "napos;": "\u0149", "napprox;": "\u2249", - "natur;": "\u266E", "natural;": "\u266E", "naturals;": "\u2115", - "nbsp": "\u00A0", + "natur;": "\u266E", "nbsp;": "\u00A0", + "nbsp": "\u00A0", "nbump;": "\u224E\u0338", "nbumpe;": "\u224F\u0338", "ncap;": "\u2A43", + "Ncaron;": "\u0147", "ncaron;": "\u0148", + "Ncedil;": "\u0145", "ncedil;": "\u0146", - "ncong;": "\u2247\u0338", - "ncongdot;": "\u2A6D", + "ncong;": "\u2247", + "ncongdot;": "\u2A6D\u0338", "ncup;": "\u2A42", + "Ncy;": "\u041D", "ncy;": "\u043D", "ndash;": "\u2013", - "ne;": "\u2260", - "neArr;": "\u21D7", "nearhk;": "\u2924", "nearr;": "\u2197", + "neArr;": "\u21D7", "nearrow;": "\u2197", + "ne;": "\u2260", "nedot;": "\u2250\u0338", + "NegativeMediumSpace;": "\u200B", + "NegativeThickSpace;": "\u200B", + "NegativeThinSpace;": "\u200B", + "NegativeVeryThinSpace;": "\u200B", "nequiv;": "\u2262", "nesear;": "\u2928", "nesim;": "\u2242\u0338", + "NestedGreaterGreater;": "\u226B", + "NestedLessLess;": "\u226A", + "NewLine;": "\u000A", "nexist;": "\u2204", "nexists;": "\u2204", - "nfr;": "\u1D52B", + "Nfr;": "\uD835\uDD11", + "nfr;": "\uD835\uDD2B", "ngE;": "\u2267\u0338", "nge;": "\u2271", "ngeq;": "\u2271", "ngeqq;": "\u2267\u0338", "ngeqslant;": "\u2A7E\u0338", "nges;": "\u2A7E\u0338", + "nGg;": "\u22D9\u0338", "ngsim;": "\u2275", + "nGt;": "\u226B\u20D2", "ngt;": "\u226F", "ngtr;": "\u226F", - "nhArr;": "\u21CE", + "nGtv;": "\u226B\u0338", "nharr;": "\u21AE", + "nhArr;": "\u21CE", "nhpar;": "\u2AF2", "ni;": "\u220B", "nis;": "\u22FC", "nisd;": "\u22FA", "niv;": "\u220B", + "NJcy;": "\u040A", "njcy;": "\u045A", - "nlArr;": "\u21CD", - "nlE;": "\u2266\u0338", "nlarr;": "\u219A", + "nlArr;": "\u21CD", "nldr;": "\u2025", + "nlE;": "\u2266\u0338", "nle;": "\u2270", "nleftarrow;": "\u219A", + "nLeftarrow;": "\u21CD", "nleftrightarrow;": "\u21AE", + "nLeftrightarrow;": "\u21CE", "nleq;": "\u2270", "nleqq;": "\u2266\u0338", "nleqslant;": "\u2A7D\u0338", "nles;": "\u2A7D\u0338", "nless;": "\u226E", + "nLl;": "\u22D8\u0338", "nlsim;": "\u2274", + "nLt;": "\u226A\u20D2", "nlt;": "\u226E", "nltri;": "\u22EA", "nltrie;": "\u22EC", + "nLtv;": "\u226A\u0338", "nmid;": "\u2224", - "nopf;": "\u1D55F", - "not": "\u00AC", + "NoBreak;": "\u2060", + "NonBreakingSpace;": "\u00A0", + "nopf;": "\uD835\uDD5F", + "Nopf;": "\u2115", + "Not;": "\u2AEC", "not;": "\u00AC", + "not": "\u00AC", + "NotCongruent;": "\u2262", + "NotCupCap;": "\u226D", + "NotDoubleVerticalBar;": "\u2226", + "NotElement;": "\u2209", + "NotEqual;": "\u2260", + "NotEqualTilde;": "\u2242\u0338", + "NotExists;": "\u2204", + "NotGreater;": "\u226F", + "NotGreaterEqual;": "\u2271", + "NotGreaterFullEqual;": "\u2267\u0338", + "NotGreaterGreater;": "\u226B\u0338", + "NotGreaterLess;": "\u2279", + "NotGreaterSlantEqual;": "\u2A7E\u0338", + "NotGreaterTilde;": "\u2275", + "NotHumpDownHump;": "\u224E\u0338", + "NotHumpEqual;": "\u224F\u0338", "notin;": "\u2209", - "notinE;": "\u22F9\u0338", "notindot;": "\u22F5\u0338", + "notinE;": "\u22F9\u0338", "notinva;": "\u2209", "notinvb;": "\u22F7", "notinvc;": "\u22F6", + "NotLeftTriangleBar;": "\u29CF\u0338", + "NotLeftTriangle;": "\u22EA", + "NotLeftTriangleEqual;": "\u22EC", + "NotLess;": "\u226E", + "NotLessEqual;": "\u2270", + "NotLessGreater;": "\u2278", + "NotLessLess;": "\u226A\u0338", + "NotLessSlantEqual;": "\u2A7D\u0338", + "NotLessTilde;": "\u2274", + "NotNestedGreaterGreater;": "\u2AA2\u0338", + "NotNestedLessLess;": "\u2AA1\u0338", "notni;": "\u220C", "notniva;": "\u220C", "notnivb;": "\u22FE", "notnivc;": "\u22FD", - "npar;": "\u2226", + "NotPrecedes;": "\u2280", + "NotPrecedesEqual;": "\u2AAF\u0338", + "NotPrecedesSlantEqual;": "\u22E0", + "NotReverseElement;": "\u220C", + "NotRightTriangleBar;": "\u29D0\u0338", + "NotRightTriangle;": "\u22EB", + "NotRightTriangleEqual;": "\u22ED", + "NotSquareSubset;": "\u228F\u0338", + "NotSquareSubsetEqual;": "\u22E2", + "NotSquareSuperset;": "\u2290\u0338", + "NotSquareSupersetEqual;": "\u22E3", + "NotSubset;": "\u2282\u20D2", + "NotSubsetEqual;": "\u2288", + "NotSucceeds;": "\u2281", + "NotSucceedsEqual;": "\u2AB0\u0338", + "NotSucceedsSlantEqual;": "\u22E1", + "NotSucceedsTilde;": "\u227F\u0338", + "NotSuperset;": "\u2283\u20D2", + "NotSupersetEqual;": "\u2289", + "NotTilde;": "\u2241", + "NotTildeEqual;": "\u2244", + "NotTildeFullEqual;": "\u2247", + "NotTildeTilde;": "\u2249", + "NotVerticalBar;": "\u2224", "nparallel;": "\u2226", + "npar;": "\u2226", "nparsl;": "\u2AFD\u20E5", "npart;": "\u2202\u0338", "npolint;": "\u2A14", "npr;": "\u2280", "nprcue;": "\u22E0", - "npre;": "\u2AAF", "nprec;": "\u2280", - "npreceq;": "\u2AAF", - "nrArr;": "\u21CF", - "nrarr;": "\u219B", + "npreceq;": "\u2AAF\u0338", + "npre;": "\u2AAF\u0338", "nrarrc;": "\u2933\u0338", + "nrarr;": "\u219B", + "nrArr;": "\u21CF", "nrarrw;": "\u219D\u0338", "nrightarrow;": "\u219B", + "nRightarrow;": "\u21CF", "nrtri;": "\u22EB", "nrtrie;": "\u22ED", "nsc;": "\u2281", "nsccue;": "\u22E1", "nsce;": "\u2AB0\u0338", - "nscr;": "\u1D4C3", + "Nscr;": "\uD835\uDCA9", + "nscr;": "\uD835\uDCC3", "nshortmid;": "\u2224", "nshortparallel;": "\u2226", "nsim;": "\u2241", @@ -8286,35 +8141,40 @@ module.exports = { "nsub;": "\u2284", "nsubE;": "\u2AC5\u0338", "nsube;": "\u2288", - "nsubset;": "\u2282\u0338", + "nsubset;": "\u2282\u20D2", "nsubseteq;": "\u2288", "nsubseteqq;": "\u2AC5\u0338", "nsucc;": "\u2281", "nsucceq;": "\u2AB0\u0338", "nsup;": "\u2285", - "nsupE;": "\u2AC6", + "nsupE;": "\u2AC6\u0338", "nsupe;": "\u2289", - "nsupset;": "\u2283\u0338", + "nsupset;": "\u2283\u20D2", "nsupseteq;": "\u2289", "nsupseteqq;": "\u2AC6\u0338", "ntgl;": "\u2279", - "ntilde": "\u00F1", + "Ntilde;": "\u00D1", + "Ntilde": "\u00D1", "ntilde;": "\u00F1", + "ntilde": "\u00F1", "ntlg;": "\u2278", "ntriangleleft;": "\u22EA", "ntrianglelefteq;": "\u22EC", "ntriangleright;": "\u22EB", "ntrianglerighteq;": "\u22ED", + "Nu;": "\u039D", "nu;": "\u03BD", - "num;": "#", + "num;": "\u0023", "numero;": "\u2116", "numsp;": "\u2007", - "nvDash;": "\u22AD", - "nvHarr;": "\u2904", "nvap;": "\u224D\u20D2", "nvdash;": "\u22AC", + "nvDash;": "\u22AD", + "nVdash;": "\u22AE", + "nVDash;": "\u22AF", "nvge;": "\u2265\u20D2", "nvgt;": "\u003E\u20D2", + "nvHarr;": "\u2904", "nvinfin;": "\u29DE", "nvlArr;": "\u2902", "nvle;": "\u2264\u20D2", @@ -8323,30 +8183,39 @@ module.exports = { "nvrArr;": "\u2903", "nvrtrie;": "\u22B5\u20D2", "nvsim;": "\u223C\u20D2", - "nwArr;": "\u21D6", "nwarhk;": "\u2923", "nwarr;": "\u2196", + "nwArr;": "\u21D6", "nwarrow;": "\u2196", "nwnear;": "\u2927", - "oS;": "\u24C8", - "oacute": "\u00F3", + "Oacute;": "\u00D3", + "Oacute": "\u00D3", "oacute;": "\u00F3", + "oacute": "\u00F3", "oast;": "\u229B", - "ocir;": "\u229A", - "ocirc": "\u00F4", + "Ocirc;": "\u00D4", + "Ocirc": "\u00D4", "ocirc;": "\u00F4", + "ocirc": "\u00F4", + "ocir;": "\u229A", + "Ocy;": "\u041E", "ocy;": "\u043E", "odash;": "\u229D", + "Odblac;": "\u0150", "odblac;": "\u0151", "odiv;": "\u2A38", "odot;": "\u2299", "odsold;": "\u29BC", + "OElig;": "\u0152", "oelig;": "\u0153", "ofcir;": "\u29BF", - "ofr;": "\u1D52C", + "Ofr;": "\uD835\uDD12", + "ofr;": "\uD835\uDD2C", "ogon;": "\u02DB", - "ograve": "\u00F2", + "Ograve;": "\u00D2", + "Ograve": "\u00D2", "ograve;": "\u00F2", + "ograve": "\u00F2", "ogt;": "\u29C1", "ohbar;": "\u29B5", "ohm;": "\u03A9", @@ -8356,160 +8225,211 @@ module.exports = { "olcross;": "\u29BB", "oline;": "\u203E", "olt;": "\u29C0", + "Omacr;": "\u014C", "omacr;": "\u014D", + "Omega;": "\u03A9", "omega;": "\u03C9", + "Omicron;": "\u039F", "omicron;": "\u03BF", "omid;": "\u29B6", "ominus;": "\u2296", - "oopf;": "\u1D560", + "Oopf;": "\uD835\uDD46", + "oopf;": "\uD835\uDD60", "opar;": "\u29B7", + "OpenCurlyDoubleQuote;": "\u201C", + "OpenCurlyQuote;": "\u2018", "operp;": "\u29B9", "oplus;": "\u2295", - "or;": "\u2228", "orarr;": "\u21BB", + "Or;": "\u2A54", + "or;": "\u2228", "ord;": "\u2A5D", "order;": "\u2134", "orderof;": "\u2134", - "ordf": "\u00AA", "ordf;": "\u00AA", - "ordm": "\u00BA", + "ordf": "\u00AA", "ordm;": "\u00BA", + "ordm": "\u00BA", "origof;": "\u22B6", "oror;": "\u2A56", "orslope;": "\u2A57", "orv;": "\u2A5B", + "oS;": "\u24C8", + "Oscr;": "\uD835\uDCAA", "oscr;": "\u2134", - "oslash": "\u00F8", + "Oslash;": "\u00D8", + "Oslash": "\u00D8", "oslash;": "\u00F8", + "oslash": "\u00F8", "osol;": "\u2298", - "otilde": "\u00F5", + "Otilde;": "\u00D5", + "Otilde": "\u00D5", "otilde;": "\u00F5", - "otimes;": "\u2297", + "otilde": "\u00F5", "otimesas;": "\u2A36", - "ouml": "\u00F6", + "Otimes;": "\u2A37", + "otimes;": "\u2297", + "Ouml;": "\u00D6", + "Ouml": "\u00D6", "ouml;": "\u00F6", + "ouml": "\u00F6", "ovbar;": "\u233D", - "par;": "\u2225", - "para": "\u00B6", + "OverBar;": "\u203E", + "OverBrace;": "\u23DE", + "OverBracket;": "\u23B4", + "OverParenthesis;": "\u23DC", "para;": "\u00B6", + "para": "\u00B6", "parallel;": "\u2225", + "par;": "\u2225", "parsim;": "\u2AF3", "parsl;": "\u2AFD", "part;": "\u2202", + "PartialD;": "\u2202", + "Pcy;": "\u041F", "pcy;": "\u043F", - "percnt;": "%", - "period;": ".", + "percnt;": "\u0025", + "period;": "\u002E", "permil;": "\u2030", "perp;": "\u22A5", "pertenk;": "\u2031", - "pfr;": "\u1D52D", + "Pfr;": "\uD835\uDD13", + "pfr;": "\uD835\uDD2D", + "Phi;": "\u03A6", "phi;": "\u03C6", "phiv;": "\u03D5", "phmmat;": "\u2133", "phone;": "\u260E", + "Pi;": "\u03A0", "pi;": "\u03C0", "pitchfork;": "\u22D4", "piv;": "\u03D6", "planck;": "\u210F", "planckh;": "\u210E", "plankv;": "\u210F", - "plus;": "+", "plusacir;": "\u2A23", "plusb;": "\u229E", "pluscir;": "\u2A22", + "plus;": "\u002B", "plusdo;": "\u2214", "plusdu;": "\u2A25", "pluse;": "\u2A72", - "plusmn": "\u00B1", + "PlusMinus;": "\u00B1", "plusmn;": "\u00B1", + "plusmn": "\u00B1", "plussim;": "\u2A26", "plustwo;": "\u2A27", "pm;": "\u00B1", + "Poincareplane;": "\u210C", "pointint;": "\u2A15", - "popf;": "\u1D561", - "pound": "\u00A3", + "popf;": "\uD835\uDD61", + "Popf;": "\u2119", "pound;": "\u00A3", - "pr;": "\u227A", - "prE;": "\u2AB3", + "pound": "\u00A3", "prap;": "\u2AB7", + "Pr;": "\u2ABB", + "pr;": "\u227A", "prcue;": "\u227C", - "pre;": "\u2AAF", - "prec;": "\u227A", "precapprox;": "\u2AB7", + "prec;": "\u227A", "preccurlyeq;": "\u227C", + "Precedes;": "\u227A", + "PrecedesEqual;": "\u2AAF", + "PrecedesSlantEqual;": "\u227C", + "PrecedesTilde;": "\u227E", "preceq;": "\u2AAF", "precnapprox;": "\u2AB9", "precneqq;": "\u2AB5", "precnsim;": "\u22E8", + "pre;": "\u2AAF", + "prE;": "\u2AB3", "precsim;": "\u227E", "prime;": "\u2032", + "Prime;": "\u2033", "primes;": "\u2119", - "prnE;": "\u2AB5", "prnap;": "\u2AB9", + "prnE;": "\u2AB5", "prnsim;": "\u22E8", "prod;": "\u220F", + "Product;": "\u220F", "profalar;": "\u232E", "profline;": "\u2312", "profsurf;": "\u2313", "prop;": "\u221D", + "Proportional;": "\u221D", + "Proportion;": "\u2237", "propto;": "\u221D", "prsim;": "\u227E", "prurel;": "\u22B0", - "pscr;": "\u1D4C5", + "Pscr;": "\uD835\uDCAB", + "pscr;": "\uD835\uDCC5", + "Psi;": "\u03A8", "psi;": "\u03C8", "puncsp;": "\u2008", - "qfr;": "\u1D52E", + "Qfr;": "\uD835\uDD14", + "qfr;": "\uD835\uDD2E", "qint;": "\u2A0C", - "qopf;": "\u1D562", + "qopf;": "\uD835\uDD62", + "Qopf;": "\u211A", "qprime;": "\u2057", - "qscr;": "\u1D4C6", + "Qscr;": "\uD835\uDCAC", + "qscr;": "\uD835\uDCC6", "quaternions;": "\u210D", "quatint;": "\u2A16", - "quest;": "?", + "quest;": "\u003F", "questeq;": "\u225F", - "quot": "\u0022", "quot;": "\u0022", + "quot": "\u0022", + "QUOT;": "\u0022", + "QUOT": "\u0022", "rAarr;": "\u21DB", - "rArr;": "\u21D2", - "rAtail;": "\u291C", - "rBarr;": "\u290F", - "rHar;": "\u2964", "race;": "\u223D\u0331", + "Racute;": "\u0154", "racute;": "\u0155", "radic;": "\u221A", "raemptyv;": "\u29B3", "rang;": "\u27E9", + "Rang;": "\u27EB", "rangd;": "\u2992", "range;": "\u29A5", "rangle;": "\u27E9", - "raquo": "\u00BB", "raquo;": "\u00BB", - "rarr;": "\u2192", + "raquo": "\u00BB", "rarrap;": "\u2975", "rarrb;": "\u21E5", "rarrbfs;": "\u2920", "rarrc;": "\u2933", + "rarr;": "\u2192", + "Rarr;": "\u21A0", + "rArr;": "\u21D2", "rarrfs;": "\u291E", "rarrhk;": "\u21AA", "rarrlp;": "\u21AC", "rarrpl;": "\u2945", "rarrsim;": "\u2974", + "Rarrtl;": "\u2916", "rarrtl;": "\u21A3", "rarrw;": "\u219D", "ratail;": "\u291A", + "rAtail;": "\u291C", "ratio;": "\u2236", "rationals;": "\u211A", "rbarr;": "\u290D", + "rBarr;": "\u290F", + "RBarr;": "\u2910", "rbbrk;": "\u2773", - "rbrace;": "}", - "rbrack;": "]", + "rbrace;": "\u007D", + "rbrack;": "\u005D", "rbrke;": "\u298C", "rbrksld;": "\u298E", "rbrkslu;": "\u2990", + "Rcaron;": "\u0158", "rcaron;": "\u0159", + "Rcedil;": "\u0156", "rcedil;": "\u0157", "rceil;": "\u2309", - "rcub;": "}", + "rcub;": "\u007D", + "Rcy;": "\u0420", "rcy;": "\u0440", "rdca;": "\u2937", "rdldhar;": "\u2969", @@ -8520,49 +8440,86 @@ module.exports = { "realine;": "\u211B", "realpart;": "\u211C", "reals;": "\u211D", + "Re;": "\u211C", "rect;": "\u25AD", - "reg": "\u00AE", "reg;": "\u00AE", + "reg": "\u00AE", + "REG;": "\u00AE", + "REG": "\u00AE", + "ReverseElement;": "\u220B", + "ReverseEquilibrium;": "\u21CB", + "ReverseUpEquilibrium;": "\u296F", "rfisht;": "\u297D", "rfloor;": "\u230B", - "rfr;": "\u1D52F", + "rfr;": "\uD835\uDD2F", + "Rfr;": "\u211C", + "rHar;": "\u2964", "rhard;": "\u21C1", "rharu;": "\u21C0", "rharul;": "\u296C", + "Rho;": "\u03A1", "rho;": "\u03C1", "rhov;": "\u03F1", + "RightAngleBracket;": "\u27E9", + "RightArrowBar;": "\u21E5", "rightarrow;": "\u2192", + "RightArrow;": "\u2192", + "Rightarrow;": "\u21D2", + "RightArrowLeftArrow;": "\u21C4", "rightarrowtail;": "\u21A3", + "RightCeiling;": "\u2309", + "RightDoubleBracket;": "\u27E7", + "RightDownTeeVector;": "\u295D", + "RightDownVectorBar;": "\u2955", + "RightDownVector;": "\u21C2", + "RightFloor;": "\u230B", "rightharpoondown;": "\u21C1", "rightharpoonup;": "\u21C0", "rightleftarrows;": "\u21C4", "rightleftharpoons;": "\u21CC", "rightrightarrows;": "\u21C9", "rightsquigarrow;": "\u219D", + "RightTeeArrow;": "\u21A6", + "RightTee;": "\u22A2", + "RightTeeVector;": "\u295B", "rightthreetimes;": "\u22CC", + "RightTriangleBar;": "\u29D0", + "RightTriangle;": "\u22B3", + "RightTriangleEqual;": "\u22B5", + "RightUpDownVector;": "\u294F", + "RightUpTeeVector;": "\u295C", + "RightUpVectorBar;": "\u2954", + "RightUpVector;": "\u21BE", + "RightVectorBar;": "\u2953", + "RightVector;": "\u21C0", "ring;": "\u02DA", "risingdotseq;": "\u2253", "rlarr;": "\u21C4", "rlhar;": "\u21CC", "rlm;": "\u200F", - "rmoust;": "\u23B1", "rmoustache;": "\u23B1", + "rmoust;": "\u23B1", "rnmid;": "\u2AEE", "roang;": "\u27ED", "roarr;": "\u21FE", "robrk;": "\u27E7", "ropar;": "\u2986", - "ropf;": "\u1D563", + "ropf;": "\uD835\uDD63", + "Ropf;": "\u211D", "roplus;": "\u2A2E", "rotimes;": "\u2A35", - "rpar;": ")", + "RoundImplies;": "\u2970", + "rpar;": "\u0029", "rpargt;": "\u2994", "rppolint;": "\u2A12", "rrarr;": "\u21C9", + "Rrightarrow;": "\u21DB", "rsaquo;": "\u203A", - "rscr;": "\u1D4C7", + "rscr;": "\uD835\uDCC7", + "Rscr;": "\u211B", "rsh;": "\u21B1", - "rsqb;": "]", + "Rsh;": "\u21B1", + "rsqb;": "\u005D", "rsquo;": "\u2019", "rsquor;": "\u2019", "rthree;": "\u22CC", @@ -8571,47 +8528,62 @@ module.exports = { "rtrie;": "\u22B5", "rtrif;": "\u25B8", "rtriltri;": "\u29CE", + "RuleDelayed;": "\u29F4", "ruluhar;": "\u2968", "rx;": "\u211E", + "Sacute;": "\u015A", "sacute;": "\u015B", "sbquo;": "\u201A", - "sc;": "\u227B", - "scE;": "\u2AB4", "scap;": "\u2AB8", + "Scaron;": "\u0160", "scaron;": "\u0161", + "Sc;": "\u2ABC", + "sc;": "\u227B", "sccue;": "\u227D", "sce;": "\u2AB0", + "scE;": "\u2AB4", + "Scedil;": "\u015E", "scedil;": "\u015F", + "Scirc;": "\u015C", "scirc;": "\u015D", - "scnE;": "\u2AB6", "scnap;": "\u2ABA", + "scnE;": "\u2AB6", "scnsim;": "\u22E9", "scpolint;": "\u2A13", "scsim;": "\u227F", + "Scy;": "\u0421", "scy;": "\u0441", - "sdot;": "\u22C5", "sdotb;": "\u22A1", + "sdot;": "\u22C5", "sdote;": "\u2A66", - "seArr;": "\u21D8", "searhk;": "\u2925", "searr;": "\u2198", + "seArr;": "\u21D8", "searrow;": "\u2198", - "sect": "\u00A7", "sect;": "\u00A7", - "semi;": ";", + "sect": "\u00A7", + "semi;": "\u003B", "seswar;": "\u2929", "setminus;": "\u2216", "setmn;": "\u2216", "sext;": "\u2736", - "sfr;": "\u1D530", + "Sfr;": "\uD835\uDD16", + "sfr;": "\uD835\uDD30", "sfrown;": "\u2322", "sharp;": "\u266F", + "SHCHcy;": "\u0429", "shchcy;": "\u0449", + "SHcy;": "\u0428", "shcy;": "\u0448", + "ShortDownArrow;": "\u2193", + "ShortLeftArrow;": "\u2190", "shortmid;": "\u2223", "shortparallel;": "\u2225", - "shy": "\u00AD", + "ShortRightArrow;": "\u2192", + "ShortUpArrow;": "\u2191", "shy;": "\u00AD", + "shy": "\u00AD", + "Sigma;": "\u03A3", "sigma;": "\u03C3", "sigmaf;": "\u03C2", "sigmav;": "\u03C2", @@ -8627,6 +8599,7 @@ module.exports = { "simplus;": "\u2A24", "simrarr;": "\u2972", "slarr;": "\u2190", + "SmallCircle;": "\u2218", "smallsetminus;": "\u2216", "smashp;": "\u2A33", "smeparsl;": "\u29E4", @@ -8635,11 +8608,13 @@ module.exports = { "smt;": "\u2AAA", "smte;": "\u2AAC", "smtes;": "\u2AAC\uFE00", + "SOFTcy;": "\u042C", "softcy;": "\u044C", - "sol;": "/", - "solb;": "\u29C4", "solbar;": "\u233F", - "sopf;": "\u1D564", + "solb;": "\u29C4", + "sol;": "\u002F", + "Sopf;": "\uD835\uDD4A", + "sopf;": "\uD835\uDD64", "spades;": "\u2660", "spadesuit;": "\u2660", "spar;": "\u2225", @@ -8647,6 +8622,7 @@ module.exports = { "sqcaps;": "\u2293\uFE00", "sqcup;": "\u2294", "sqcups;": "\u2294\uFE00", + "Sqrt;": "\u221A", "sqsub;": "\u228F", "sqsube;": "\u2291", "sqsubset;": "\u228F", @@ -8655,23 +8631,33 @@ module.exports = { "sqsupe;": "\u2292", "sqsupset;": "\u2290", "sqsupseteq;": "\u2292", - "squ;": "\u25A1", "square;": "\u25A1", + "Square;": "\u25A1", + "SquareIntersection;": "\u2293", + "SquareSubset;": "\u228F", + "SquareSubsetEqual;": "\u2291", + "SquareSuperset;": "\u2290", + "SquareSupersetEqual;": "\u2292", + "SquareUnion;": "\u2294", "squarf;": "\u25AA", + "squ;": "\u25A1", "squf;": "\u25AA", "srarr;": "\u2192", - "sscr;": "\u1D4C8", + "Sscr;": "\uD835\uDCAE", + "sscr;": "\uD835\uDCC8", "ssetmn;": "\u2216", "ssmile;": "\u2323", "sstarf;": "\u22C6", + "Star;": "\u22C6", "star;": "\u2606", "starf;": "\u2605", "straightepsilon;": "\u03F5", "straightphi;": "\u03D5", "strns;": "\u00AF", "sub;": "\u2282", - "subE;": "\u2AC5", + "Sub;": "\u22D0", "subdot;": "\u2ABD", + "subE;": "\u2AC5", "sube;": "\u2286", "subedot;": "\u2AC3", "submult;": "\u2AC1", @@ -8680,35 +8666,46 @@ module.exports = { "subplus;": "\u2ABF", "subrarr;": "\u2979", "subset;": "\u2282", + "Subset;": "\u22D0", "subseteq;": "\u2286", "subseteqq;": "\u2AC5", + "SubsetEqual;": "\u2286", "subsetneq;": "\u228A", "subsetneqq;": "\u2ACB", "subsim;": "\u2AC7", "subsub;": "\u2AD5", "subsup;": "\u2AD3", - "succ;": "\u227B", "succapprox;": "\u2AB8", + "succ;": "\u227B", "succcurlyeq;": "\u227D", + "Succeeds;": "\u227B", + "SucceedsEqual;": "\u2AB0", + "SucceedsSlantEqual;": "\u227D", + "SucceedsTilde;": "\u227F", "succeq;": "\u2AB0", "succnapprox;": "\u2ABA", "succneqq;": "\u2AB6", "succnsim;": "\u22E9", "succsim;": "\u227F", + "SuchThat;": "\u220B", "sum;": "\u2211", + "Sum;": "\u2211", "sung;": "\u266A", - "sup1": "\u00B9", "sup1;": "\u00B9", - "sup2": "\u00B2", + "sup1": "\u00B9", "sup2;": "\u00B2", - "sup3": "\u00B3", + "sup2": "\u00B2", "sup3;": "\u00B3", + "sup3": "\u00B3", "sup;": "\u2283", - "supE;": "\u2AC6", + "Sup;": "\u22D1", "supdot;": "\u2ABE", "supdsub;": "\u2AD8", + "supE;": "\u2AC6", "supe;": "\u2287", "supedot;": "\u2AC4", + "Superset;": "\u2283", + "SupersetEqual;": "\u2287", "suphsol;": "\u27C9", "suphsub;": "\u2AD7", "suplarr;": "\u297B", @@ -8717,6 +8714,7 @@ module.exports = { "supne;": "\u228B", "supplus;": "\u2AC0", "supset;": "\u2283", + "Supset;": "\u22D1", "supseteq;": "\u2287", "supseteqq;": "\u2AC6", "supsetneq;": "\u228B", @@ -8724,50 +8722,68 @@ module.exports = { "supsim;": "\u2AC8", "supsub;": "\u2AD4", "supsup;": "\u2AD6", - "swArr;": "\u21D9", "swarhk;": "\u2926", "swarr;": "\u2199", + "swArr;": "\u21D9", "swarrow;": "\u2199", "swnwar;": "\u292A", - "szlig": "\u00DF", "szlig;": "\u00DF", + "szlig": "\u00DF", + "Tab;": "\u0009", "target;": "\u2316", + "Tau;": "\u03A4", "tau;": "\u03C4", "tbrk;": "\u23B4", + "Tcaron;": "\u0164", "tcaron;": "\u0165", + "Tcedil;": "\u0162", "tcedil;": "\u0163", + "Tcy;": "\u0422", "tcy;": "\u0442", "tdot;": "\u20DB", "telrec;": "\u2315", - "tfr;": "\u1D531", + "Tfr;": "\uD835\uDD17", + "tfr;": "\uD835\uDD31", "there4;": "\u2234", "therefore;": "\u2234", + "Therefore;": "\u2234", + "Theta;": "\u0398", "theta;": "\u03B8", "thetasym;": "\u03D1", "thetav;": "\u03D1", "thickapprox;": "\u2248", "thicksim;": "\u223C", + "ThickSpace;": "\u205F\u200A", + "ThinSpace;": "\u2009", "thinsp;": "\u2009", "thkap;": "\u2248", "thksim;": "\u223C", - "thorn": "\u00FE", + "THORN;": "\u00DE", + "THORN": "\u00DE", "thorn;": "\u00FE", + "thorn": "\u00FE", "tilde;": "\u02DC", - "times": "\u00D7", - "times;": "\u00D7", - "timesb;": "\u22A0", + "Tilde;": "\u223C", + "TildeEqual;": "\u2243", + "TildeFullEqual;": "\u2245", + "TildeTilde;": "\u2248", "timesbar;": "\u2A31", + "timesb;": "\u22A0", + "times;": "\u00D7", + "times": "\u00D7", "timesd;": "\u2A30", "tint;": "\u222D", "toea;": "\u2928", - "top;": "\u22A4", "topbot;": "\u2336", "topcir;": "\u2AF1", - "topf;": "\u1D565", + "top;": "\u22A4", + "Topf;": "\uD835\uDD4B", + "topf;": "\uD835\uDD65", "topfork;": "\u2ADA", "tosa;": "\u2929", "tprime;": "\u2034", "trade;": "\u2122", + "TRADE;": "\u2122", "triangle;": "\u25B5", "triangledown;": "\u25BF", "triangleleft;": "\u25C3", @@ -8778,34 +8794,52 @@ module.exports = { "tridot;": "\u25EC", "trie;": "\u225C", "triminus;": "\u2A3A", + "TripleDot;": "\u20DB", "triplus;": "\u2A39", "trisb;": "\u29CD", "tritime;": "\u2A3B", "trpezium;": "\u23E2", - "tscr;": "\u1D4C9", + "Tscr;": "\uD835\uDCAF", + "tscr;": "\uD835\uDCC9", + "TScy;": "\u0426", "tscy;": "\u0446", + "TSHcy;": "\u040B", "tshcy;": "\u045B", + "Tstrok;": "\u0166", "tstrok;": "\u0167", "twixt;": "\u226C", "twoheadleftarrow;": "\u219E", "twoheadrightarrow;": "\u21A0", - "uArr;": "\u21D1", - "uHar;": "\u2963", - "uacute": "\u00FA", + "Uacute;": "\u00DA", + "Uacute": "\u00DA", "uacute;": "\u00FA", + "uacute": "\u00FA", "uarr;": "\u2191", + "Uarr;": "\u219F", + "uArr;": "\u21D1", + "Uarrocir;": "\u2949", + "Ubrcy;": "\u040E", "ubrcy;": "\u045E", + "Ubreve;": "\u016C", "ubreve;": "\u016D", - "ucirc": "\u00FB", + "Ucirc;": "\u00DB", + "Ucirc": "\u00DB", "ucirc;": "\u00FB", + "ucirc": "\u00FB", + "Ucy;": "\u0423", "ucy;": "\u0443", "udarr;": "\u21C5", + "Udblac;": "\u0170", "udblac;": "\u0171", "udhar;": "\u296E", "ufisht;": "\u297E", - "ufr;": "\u1D532", - "ugrave": "\u00F9", + "Ufr;": "\uD835\uDD18", + "ufr;": "\uD835\uDD32", + "Ugrave;": "\u00D9", + "Ugrave": "\u00D9", "ugrave;": "\u00F9", + "ugrave": "\u00F9", + "uHar;": "\u2963", "uharl;": "\u21BF", "uharr;": "\u21BE", "uhblk;": "\u2580", @@ -8813,38 +8847,61 @@ module.exports = { "ulcorner;": "\u231C", "ulcrop;": "\u230F", "ultri;": "\u25F8", + "Umacr;": "\u016A", "umacr;": "\u016B", - "uml": "\u00A8", "uml;": "\u00A8", + "uml": "\u00A8", + "UnderBar;": "\u005F", + "UnderBrace;": "\u23DF", + "UnderBracket;": "\u23B5", + "UnderParenthesis;": "\u23DD", + "Union;": "\u22C3", + "UnionPlus;": "\u228E", + "Uogon;": "\u0172", "uogon;": "\u0173", - "uopf;": "\u1D566", + "Uopf;": "\uD835\uDD4C", + "uopf;": "\uD835\uDD66", + "UpArrowBar;": "\u2912", "uparrow;": "\u2191", + "UpArrow;": "\u2191", + "Uparrow;": "\u21D1", + "UpArrowDownArrow;": "\u21C5", "updownarrow;": "\u2195", + "UpDownArrow;": "\u2195", + "Updownarrow;": "\u21D5", + "UpEquilibrium;": "\u296E", "upharpoonleft;": "\u21BF", "upharpoonright;": "\u21BE", "uplus;": "\u228E", + "UpperLeftArrow;": "\u2196", + "UpperRightArrow;": "\u2197", "upsi;": "\u03C5", + "Upsi;": "\u03D2", "upsih;": "\u03D2", + "Upsilon;": "\u03A5", "upsilon;": "\u03C5", + "UpTeeArrow;": "\u21A5", + "UpTee;": "\u22A5", "upuparrows;": "\u21C8", "urcorn;": "\u231D", "urcorner;": "\u231D", "urcrop;": "\u230E", + "Uring;": "\u016E", "uring;": "\u016F", "urtri;": "\u25F9", - "uscr;": "\u1D4CA", + "Uscr;": "\uD835\uDCB0", + "uscr;": "\uD835\uDCCA", "utdot;": "\u22F0", + "Utilde;": "\u0168", "utilde;": "\u0169", "utri;": "\u25B5", "utrif;": "\u25B4", "uuarr;": "\u21C8", - "uuml": "\u00FC", + "Uuml;": "\u00DC", + "Uuml": "\u00DC", "uuml;": "\u00FC", + "uuml": "\u00FC", "uwangle;": "\u29A7", - "vArr;": "\u21D5", - "vBar;": "\u2AE8", - "vBarv;": "\u2AE9", - "vDash;": "\u22A8", "vangrt;": "\u299C", "varepsilon;": "\u03F5", "varkappa;": "\u03F0", @@ -8853,6 +8910,7 @@ module.exports = { "varpi;": "\u03D6", "varpropto;": "\u221D", "varr;": "\u2195", + "vArr;": "\u21D5", "varrho;": "\u03F1", "varsigma;": "\u03C2", "varsubsetneq;": "\u228A\uFE00", @@ -8862,107 +8920,175 @@ module.exports = { "vartheta;": "\u03D1", "vartriangleleft;": "\u22B2", "vartriangleright;": "\u22B3", + "vBar;": "\u2AE8", + "Vbar;": "\u2AEB", + "vBarv;": "\u2AE9", + "Vcy;": "\u0412", "vcy;": "\u0432", "vdash;": "\u22A2", - "vee;": "\u2228", + "vDash;": "\u22A8", + "Vdash;": "\u22A9", + "VDash;": "\u22AB", + "Vdashl;": "\u2AE6", "veebar;": "\u22BB", + "vee;": "\u2228", + "Vee;": "\u22C1", "veeeq;": "\u225A", "vellip;": "\u22EE", - "verbar;": "|", - "vert;": "|", - "vfr;": "\u1D533", + "verbar;": "\u007C", + "Verbar;": "\u2016", + "vert;": "\u007C", + "Vert;": "\u2016", + "VerticalBar;": "\u2223", + "VerticalLine;": "\u007C", + "VerticalSeparator;": "\u2758", + "VerticalTilde;": "\u2240", + "VeryThinSpace;": "\u200A", + "Vfr;": "\uD835\uDD19", + "vfr;": "\uD835\uDD33", "vltri;": "\u22B2", "vnsub;": "\u2282\u20D2", "vnsup;": "\u2283\u20D2", - "vopf;": "\u1D567", + "Vopf;": "\uD835\uDD4D", + "vopf;": "\uD835\uDD67", "vprop;": "\u221D", "vrtri;": "\u22B3", - "vscr;": "\u1D4CB", + "Vscr;": "\uD835\uDCB1", + "vscr;": "\uD835\uDCCB", "vsubnE;": "\u2ACB\uFE00", "vsubne;": "\u228A\uFE00", "vsupnE;": "\u2ACC\uFE00", "vsupne;": "\u228B\uFE00", + "Vvdash;": "\u22AA", "vzigzag;": "\u299A", + "Wcirc;": "\u0174", "wcirc;": "\u0175", "wedbar;": "\u2A5F", "wedge;": "\u2227", + "Wedge;": "\u22C0", "wedgeq;": "\u2259", "weierp;": "\u2118", - "wfr;": "\u1D534", - "wopf;": "\u1D568", + "Wfr;": "\uD835\uDD1A", + "wfr;": "\uD835\uDD34", + "Wopf;": "\uD835\uDD4E", + "wopf;": "\uD835\uDD68", "wp;": "\u2118", "wr;": "\u2240", "wreath;": "\u2240", - "wscr;": "\u1D4CC", + "Wscr;": "\uD835\uDCB2", + "wscr;": "\uD835\uDCCC", "xcap;": "\u22C2", "xcirc;": "\u25EF", "xcup;": "\u22C3", "xdtri;": "\u25BD", - "xfr;": "\u1D535", - "xhArr;": "\u27FA", + "Xfr;": "\uD835\uDD1B", + "xfr;": "\uD835\uDD35", "xharr;": "\u27F7", + "xhArr;": "\u27FA", + "Xi;": "\u039E", "xi;": "\u03BE", - "xlArr;": "\u27F8", "xlarr;": "\u27F5", + "xlArr;": "\u27F8", "xmap;": "\u27FC", "xnis;": "\u22FB", "xodot;": "\u2A00", - "xopf;": "\u1D569", + "Xopf;": "\uD835\uDD4F", + "xopf;": "\uD835\uDD69", "xoplus;": "\u2A01", "xotime;": "\u2A02", - "xrArr;": "\u27F9", "xrarr;": "\u27F6", - "xscr;": "\u1D4CD", + "xrArr;": "\u27F9", + "Xscr;": "\uD835\uDCB3", + "xscr;": "\uD835\uDCCD", "xsqcup;": "\u2A06", "xuplus;": "\u2A04", "xutri;": "\u25B3", "xvee;": "\u22C1", "xwedge;": "\u22C0", - "yacute": "\u00FD", + "Yacute;": "\u00DD", + "Yacute": "\u00DD", "yacute;": "\u00FD", + "yacute": "\u00FD", + "YAcy;": "\u042F", "yacy;": "\u044F", + "Ycirc;": "\u0176", "ycirc;": "\u0177", + "Ycy;": "\u042B", "ycy;": "\u044B", - "yen": "\u00A5", "yen;": "\u00A5", - "yfr;": "\u1D536", + "yen": "\u00A5", + "Yfr;": "\uD835\uDD1C", + "yfr;": "\uD835\uDD36", + "YIcy;": "\u0407", "yicy;": "\u0457", - "yopf;": "\u1D56A", - "yscr;": "\u1D4CE", + "Yopf;": "\uD835\uDD50", + "yopf;": "\uD835\uDD6A", + "Yscr;": "\uD835\uDCB4", + "yscr;": "\uD835\uDCCE", + "YUcy;": "\u042E", "yucy;": "\u044E", - "yuml": "\u00FF", "yuml;": "\u00FF", + "yuml": "\u00FF", + "Yuml;": "\u0178", + "Zacute;": "\u0179", "zacute;": "\u017A", + "Zcaron;": "\u017D", "zcaron;": "\u017E", + "Zcy;": "\u0417", "zcy;": "\u0437", + "Zdot;": "\u017B", "zdot;": "\u017C", "zeetrf;": "\u2128", + "ZeroWidthSpace;": "\u200B", + "Zeta;": "\u0396", "zeta;": "\u03B6", - "zfr;": "\u1D537", + "zfr;": "\uD835\uDD37", + "Zfr;": "\u2128", + "ZHcy;": "\u0416", "zhcy;": "\u0436", "zigrarr;": "\u21DD", - "zopf;": "\u1D56B", - "zscr;": "\u1D4CF", + "zopf;": "\uD835\uDD6B", + "Zopf;": "\u2124", + "Zscr;": "\uD835\uDCB5", + "zscr;": "\uD835\uDCCF", "zwj;": "\u200D", "zwnj;": "\u200C" }; -},{}],13:[function(req,module,exports){ -(function(){// UTILITY -var util = req('util'); -var Buffer = req("buffer").Buffer; -var pSlice = Array.prototype.slice; +}, +{}], +13:[function(_dereq_,module,exports){ +// http://wiki.commonjs.org/wiki/Unit_Testing/1.0 +// +// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! +// +// Originally from narwhal.js (http://narwhaljs.org) +// Copyright (c) 2009 Thomas Robinson <280north.com> +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the 'Software'), to +// deal in the Software without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -function objectKeys(object) { - if (Object.keys) return Object.keys(object); - var result = []; - for (var name in object) { - if (Object.prototype.hasOwnProperty.call(object, name)) { - result.push(name); - } - } - return result; -} +// when used in node, this will actually load the util module we depend on +// versus loading the builtin util module as happens otherwise +// this is a bug in node module loading as far as I am concerned +var util = _dereq_('util/'); + +var pSlice = Array.prototype.slice; +var hasOwn = Object.prototype.hasOwnProperty; // 1. The assert module provides functions that throw // AssertionError's when particular conditions are not met. The @@ -8977,53 +9103,71 @@ var assert = module.exports = ok; assert.AssertionError = function AssertionError(options) { this.name = 'AssertionError'; - this.message = options.message; this.actual = options.actual; this.expected = options.expected; this.operator = options.operator; + if (options.message) { + this.message = options.message; + this.generatedMessage = false; + } else { + this.message = getMessage(this); + this.generatedMessage = true; + } var stackStartFunction = options.stackStartFunction || fail; if (Error.captureStackTrace) { Error.captureStackTrace(this, stackStartFunction); } + else { + // non v8 browsers so we can have a stacktrace + var err = new Error(); + if (err.stack) { + var out = err.stack; + + // try to strip useless frames + var fn_name = stackStartFunction.name; + var idx = out.indexOf('\n' + fn_name); + if (idx >= 0) { + // once we have located the function frame + // we need to strip out everything before it (and its line) + var next_line = out.indexOf('\n', idx + 1); + out = out.substring(next_line + 1); + } + + this.stack = out; + } + } }; // assert.AssertionError instanceof Error util.inherits(assert.AssertionError, Error); function replacer(key, value) { - if (value === undefined) { + if (util.isUndefined(value)) { return '' + value; } - if (typeof value === 'number' && (isNaN(value) || !isFinite(value))) { + if (util.isNumber(value) && (isNaN(value) || !isFinite(value))) { return value.toString(); } - if (typeof value === 'function' || value instanceof RegExp) { + if (util.isFunction(value) || util.isRegExp(value)) { return value.toString(); } return value; } function truncate(s, n) { - if (typeof s == 'string') { + if (util.isString(s)) { return s.length < n ? s : s.slice(0, n); } else { return s; } } -assert.AssertionError.prototype.toString = function() { - if (this.message) { - return [this.name + ':', this.message].join(' '); - } else { - return [ - this.name + ':', - truncate(JSON.stringify(this.actual, replacer), 128), - this.operator, - truncate(JSON.stringify(this.expected, replacer), 128) - ].join(' '); - } -}; +function getMessage(self) { + return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' + + self.operator + ' ' + + truncate(JSON.stringify(self.expected, replacer), 128); +} // At present only the three keys mentioned above are used and // understood by the spec. Implementations or sub modules can pass @@ -9052,12 +9196,12 @@ assert.fail = fail; // 4. Pure assertion tests whether a value is truthy, as determined // by !!guard. // assert.ok(guard, message_opt); -// This statement is equivalent to assert.equal(true, guard, +// This statement is equivalent to assert.equal(true, !!guard, // message_opt);. To test strictly for the value true, use // assert.strictEqual(true, guard, message_opt);. function ok(value, message) { - if (!!!value) fail(value, true, message, '==', assert.ok); + if (!value) fail(value, true, message, '==', assert.ok); } assert.ok = ok; @@ -9092,7 +9236,7 @@ function _deepEqual(actual, expected) { if (actual === expected) { return true; - } else if (Buffer.isBuffer(actual) && Buffer.isBuffer(expected)) { + } else if (util.isBuffer(actual) && util.isBuffer(expected)) { if (actual.length != expected.length) return false; for (var i = 0; i < actual.length; i++) { @@ -9103,15 +9247,25 @@ function _deepEqual(actual, expected) { // 7.2. If the expected value is a Date object, the actual value is // equivalent if it is also a Date object that refers to the same time. - } else if (actual instanceof Date && expected instanceof Date) { + } else if (util.isDate(actual) && util.isDate(expected)) { return actual.getTime() === expected.getTime(); - // 7.3. Other pairs that do not both pass typeof value == 'object', + // 7.3 If the expected value is a RegExp object, the actual value is + // equivalent if it is also a RegExp object with the same source and + // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). + } else if (util.isRegExp(actual) && util.isRegExp(expected)) { + return actual.source === expected.source && + actual.global === expected.global && + actual.multiline === expected.multiline && + actual.lastIndex === expected.lastIndex && + actual.ignoreCase === expected.ignoreCase; + + // 7.4. Other pairs that do not both pass typeof value == 'object', // equivalence is determined by ==. - } else if (typeof actual != 'object' && typeof expected != 'object') { + } else if (!util.isObject(actual) && !util.isObject(expected)) { return actual == expected; - // 7.4. For all other Object pairs, including Array objects, equivalence is + // 7.5 For all other Object pairs, including Array objects, equivalence is // determined by having the same number of owned properties (as verified // with Object.prototype.hasOwnProperty.call), the same set of keys // (although not necessarily the same order), equivalent values for every @@ -9122,16 +9276,12 @@ function _deepEqual(actual, expected) { } } -function isUndefinedOrNull(value) { - return value === null || value === undefined; -} - function isArguments(object) { return Object.prototype.toString.call(object) == '[object Arguments]'; } function objEquiv(a, b) { - if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) + if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) return false; // an identical 'prototype' property. if (a.prototype !== b.prototype) return false; @@ -9205,7 +9355,7 @@ function expectedException(actual, expected) { return false; } - if (expected instanceof RegExp) { + if (Object.prototype.toString.call(expected) == '[object RegExp]') { return expected.test(actual); } else if (actual instanceof expected) { return true; @@ -9219,7 +9369,7 @@ function expectedException(actual, expected) { function _throws(shouldThrow, block, expected, message) { var actual; - if (typeof expected === 'string') { + if (util.isString(expected)) { message = expected; expected = null; } @@ -9234,11 +9384,11 @@ function _throws(shouldThrow, block, expected, message) { (message ? ' ' + message : '.'); if (shouldThrow && !actual) { - fail('Missing expected exception' + message); + fail(actual, expected, 'Missing expected exception' + message); } if (!shouldThrow && expectedException(actual, expected)) { - fail('Got unwanted exception' + message); + fail(actual, expected, 'Got unwanted exception' + message); } if ((shouldThrow && actual && expected && @@ -9255,518 +9405,60 @@ assert.throws = function(block, /*optional*/error, /*optional*/message) { }; // EXTENSION! This is annoying to write outside this module. -assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) { +assert.doesNotThrow = function(block, /*optional*/message) { _throws.apply(this, [false].concat(pSlice.call(arguments))); }; assert.ifError = function(err) { if (err) {throw err;}}; -})() -},{"buffer":17,"util":15}],14:[function(req,module,exports){ -(function(process){if (!process.EventEmitter) process.EventEmitter = function () {}; +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + if (hasOwn.call(obj, key)) keys.push(key); + } + return keys; +}; -var EventEmitter = exports.EventEmitter = process.EventEmitter; -var isArray = typeof Array.isArray === 'function' - ? Array.isArray - : function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]' - } -; -function indexOf (xs, x) { - if (xs.indexOf) return xs.indexOf(x); - for (var i = 0; i < xs.length; i++) { - if (x === xs[i]) return i; - } - return -1; +}, +{"util/":15}], +14:[function(_dereq_,module,exports){ +module.exports = function isBuffer(arg) { + return arg && typeof arg === 'object' + && typeof arg.copy === 'function' + && typeof arg.fill === 'function' + && typeof arg.readUInt8 === 'function'; } - -// By default EventEmitters will print a warning if more than -// 10 listeners are added to it. This is a useful default which -// helps finding memory leaks. +}, +{}], +15:[function(_dereq_,module,exports){ +(function (process,global){ +// Copyright Joyent, Inc. and other Node contributors. // -// Obviously not all Emitters should be limited to 10. This function allows -// that to be increased. Set to zero for unlimited. -var defaultMaxListeners = 10; -EventEmitter.prototype.setMaxListeners = function(n) { - if (!this._events) this._events = {}; - this._events.maxListeners = n; -}; - - -EventEmitter.prototype.emit = function(type) { - // If there is no 'error' event listener then throw. - if (type === 'error') { - if (!this._events || !this._events.error || - (isArray(this._events.error) && !this._events.error.length)) - { - if (arguments[1] instanceof Error) { - throw arguments[1]; // Unhandled 'error' event - } else { - throw new Error("Uncaught, unspecified 'error' event."); - } - return false; - } - } - - if (!this._events) return false; - var handler = this._events[type]; - if (!handler) return false; - - if (typeof handler == 'function') { - switch (arguments.length) { - // fast cases - case 1: - handler.call(this); - break; - case 2: - handler.call(this, arguments[1]); - break; - case 3: - handler.call(this, arguments[1], arguments[2]); - break; - // slower - default: - var args = Array.prototype.slice.call(arguments, 1); - handler.apply(this, args); - } - return true; - - } else if (isArray(handler)) { - var args = Array.prototype.slice.call(arguments, 1); - - var listeners = handler.slice(); - for (var i = 0, l = listeners.length; i < l; i++) { - listeners[i].apply(this, args); - } - return true; - - } else { - return false; - } -}; - -// EventEmitter is defined in src/node_events.cc -// EventEmitter.prototype.emit() is also defined there. -EventEmitter.prototype.addListener = function(type, listener) { - if ('function' !== typeof listener) { - throw new Error('addListener only takes instances of Function'); - } - - if (!this._events) this._events = {}; - - // To avoid recursion in the case that type == "newListeners"! Before - // adding it to the listeners, first emit "newListeners". - this.emit('newListener', type, listener); - - if (!this._events[type]) { - // Optimize the case of one listener. Don't need the extra array object. - this._events[type] = listener; - } else if (isArray(this._events[type])) { - - // Check for listener leak - if (!this._events[type].warned) { - var m; - if (this._events.maxListeners !== undefined) { - m = this._events.maxListeners; - } else { - m = defaultMaxListeners; - } - - if (m && m > 0 && this._events[type].length > m) { - this._events[type].warned = true; - console.error('(node) warning: possible EventEmitter memory ' + - 'leak detected. %d listeners added. ' + - 'Use emitter.setMaxListeners() to increase limit.', - this._events[type].length); - console.trace(); - } - } - - // If we've already got an array, just append. - this._events[type].push(listener); - } else { - // Adding the second element, need to change to array. - this._events[type] = [this._events[type], listener]; - } - - return this; -}; - -EventEmitter.prototype.on = EventEmitter.prototype.addListener; - -EventEmitter.prototype.once = function(type, listener) { - var self = this; - self.on(type, function g() { - self.removeListener(type, g); - listener.apply(this, arguments); - }); - - return this; -}; - -EventEmitter.prototype.removeListener = function(type, listener) { - if ('function' !== typeof listener) { - throw new Error('removeListener only takes instances of Function'); - } - - // does not use listeners(), so no side effect of creating _events[type] - if (!this._events || !this._events[type]) return this; - - var list = this._events[type]; - - if (isArray(list)) { - var i = indexOf(list, listener); - if (i < 0) return this; - list.splice(i, 1); - if (list.length == 0) - delete this._events[type]; - } else if (this._events[type] === listener) { - delete this._events[type]; - } - - return this; -}; - -EventEmitter.prototype.removeAllListeners = function(type) { - if (arguments.length === 0) { - this._events = {}; - return this; - } - - // does not use listeners(), so no side effect of creating _events[type] - if (type && this._events && this._events[type]) this._events[type] = null; - return this; -}; - -EventEmitter.prototype.listeners = function(type) { - if (!this._events) this._events = {}; - if (!this._events[type]) this._events[type] = []; - if (!isArray(this._events[type])) { - this._events[type] = [this._events[type]]; - } - return this._events[type]; -}; - -})(req("__browserify_process")) -},{"__browserify_process":20}],15:[function(req,module,exports){ -var events = req('events'); - -exports.isArray = isArray; -exports.isDate = function(obj){return Object.prototype.toString.call(obj) === '[object Date]'}; -exports.isRegExp = function(obj){return Object.prototype.toString.call(obj) === '[object RegExp]'}; - - -exports.print = function () {}; -exports.puts = function () {}; -exports.debug = function() {}; - -exports.inspect = function(obj, showHidden, depth, colors) { - var seen = []; - - var stylize = function(str, styleType) { - // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics - var styles = - { 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] }; - - var style = - { 'special': 'cyan', - 'number': 'blue', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' }[styleType]; - - if (style) { - return '\u001b[' + styles[style][0] + 'm' + str + - '\u001b[' + styles[style][1] + 'm'; - } else { - return str; - } - }; - if (! colors) { - stylize = function(str, styleType) { return str; }; - } - - function format(value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (value && typeof value.inspect === 'function' && - // Filter out the util module, it's inspect function is special - value !== exports && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - return value.inspect(recurseTimes); - } - - // Primitive types cannot have properties - switch (typeof value) { - case 'undefined': - return stylize('undefined', 'undefined'); - - case 'string': - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return stylize(simple, 'string'); - - case 'number': - return stylize('' + value, 'number'); - - case 'boolean': - return stylize('' + value, 'boolean'); - } - // For some reason typeof null is "object", so special case here. - if (value === null) { - return stylize('null', 'null'); - } - - // Look up the keys of the object. - var visible_keys = Object_keys(value); - var keys = showHidden ? Object_getOwnPropertyNames(value) : visible_keys; - - // Functions without properties can be shortcutted. - if (typeof value === 'function' && keys.length === 0) { - if (isRegExp(value)) { - return stylize('' + value, 'regexp'); - } else { - var name = value.name ? ': ' + value.name : ''; - return stylize('[Function' + name + ']', 'special'); - } - } - - // Dates without properties can be shortcutted - if (isDate(value) && keys.length === 0) { - return stylize(value.toUTCString(), 'date'); - } - - var base, type, braces; - // Determine the object type - if (isArray(value)) { - type = 'Array'; - braces = ['[', ']']; - } else { - type = 'Object'; - braces = ['{', '}']; - } - - // Make functions say that they are functions - if (typeof value === 'function') { - var n = value.name ? ': ' + value.name : ''; - base = (isRegExp(value)) ? ' ' + value : ' [Function' + n + ']'; - } else { - base = ''; - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + value.toUTCString(); - } - - if (keys.length === 0) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return stylize('' + value, 'regexp'); - } else { - return stylize('[Object]', 'special'); - } - } - - seen.push(value); - - var output = keys.map(function(key) { - var name, str; - if (value.__lookupGetter__) { - if (value.__lookupGetter__(key)) { - if (value.__lookupSetter__(key)) { - str = stylize('[Getter/Setter]', 'special'); - } else { - str = stylize('[Getter]', 'special'); - } - } else { - if (value.__lookupSetter__(key)) { - str = stylize('[Setter]', 'special'); - } - } - } - if (visible_keys.indexOf(key) < 0) { - name = '[' + key + ']'; - } - if (!str) { - if (seen.indexOf(value[key]) < 0) { - if (recurseTimes === null) { - str = format(value[key]); - } else { - str = format(value[key], recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (isArray(value)) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = stylize('[Circular]', 'special'); - } - } - if (typeof name === 'undefined') { - if (type === 'Array' && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = stylize(name, 'string'); - } - } - - return name + ': ' + str; - }); - - seen.pop(); - - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.length + 1; - }, 0); - - if (length > 50) { - output = braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - - } else { - output = braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; - } - - return output; - } - return format(obj, (typeof depth === 'undefined' ? 2 : depth)); -}; - - -function isArray(ar) { - return Array.isArray(ar) || - (typeof ar === 'object' && Object.prototype.toString.call(ar) === '[object Array]'); -} - - -function isRegExp(re) { - typeof re === 'object' && Object.prototype.toString.call(re) === '[object RegExp]'; -} - - -function isDate(d) { - return typeof d === 'object' && Object.prototype.toString.call(d) === '[object Date]'; -} - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - -exports.log = function (msg) {}; - -exports.pump = null; - -var Object_keys = Object.keys || function (obj) { - var res = []; - for (var key in obj) res.push(key); - return res; -}; - -var Object_getOwnPropertyNames = Object.getOwnPropertyNames || function (obj) { - var res = []; - for (var key in obj) { - if (Object.hasOwnProperty.call(obj, key)) res.push(key); - } - return res; -}; - -var Object_create = Object.create || function (prototype, properties) { - // from es5-shim - var object; - if (prototype === null) { - object = { '__proto__' : null }; - } - else { - if (typeof prototype !== 'object') { - throw new TypeError( - 'typeof prototype[' + (typeof prototype) + '] != \'object\'' - ); - } - var Type = function () {}; - Type.prototype = prototype; - object = new Type(); - object.__proto__ = prototype; - } - if (typeof properties !== 'undefined' && Object.defineProperties) { - Object.defineProperties(object, properties); - } - return object; -}; - -exports.inherits = function(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object_create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); -}; +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. var formatRegExp = /%[sdj%]/g; exports.format = function(f) { - if (typeof f !== 'string') { + if (!isString(f)) { var objects = []; for (var i = 0; i < arguments.length; i++) { - objects.push(exports.inspect(arguments[i])); + objects.push(inspect(arguments[i])); } return objects.join(' '); } @@ -9780,1280 +9472,888 @@ exports.format = function(f) { switch (x) { case '%s': return String(args[i++]); case '%d': return Number(args[i++]); - case '%j': return JSON.stringify(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } default: return x; } }); - for(var x = args[i]; i < len; x = args[++i]){ - if (x === null || typeof x !== 'object') { + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { str += ' ' + x; } else { - str += ' ' + exports.inspect(x); + str += ' ' + inspect(x); } } return str; }; -},{"events":14}],16:[function(req,module,exports){ -exports.readIEEE754 = function(buffer, offset, isBE, mLen, nBytes) { - var e, m, - eLen = nBytes * 8 - mLen - 1, - eMax = (1 << eLen) - 1, - eBias = eMax >> 1, - nBits = -7, - i = isBE ? 0 : (nBytes - 1), - d = isBE ? 1 : -1, - s = buffer[offset + i]; - i += d; - - e = s & ((1 << (-nBits)) - 1); - s >>= (-nBits); - nBits += eLen; - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8); - - m = e & ((1 << (-nBits)) - 1); - e >>= (-nBits); - nBits += mLen; - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8); - - if (e === 0) { - e = 1 - eBias; - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity); - } else { - m = m + Math.pow(2, mLen); - e = e - eBias; +// Mark that a method should not be used. +// Returns a modified function which warns once by default. +// If --no-deprecation is set, then it is a no-op. +exports.deprecate = function(fn, msg) { + // Allow for deprecating things in the process of starting up. + if (isUndefined(global.process)) { + return function() { + return exports.deprecate(fn, msg).apply(this, arguments); + }; } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen); + + if (process.noDeprecation === true) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (process.throwDeprecation) { + throw new Error(msg); + } else if (process.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; }; -exports.writeIEEE754 = function(buffer, value, offset, isBE, mLen, nBytes) { - var e, m, c, - eLen = nBytes * 8 - mLen - 1, - eMax = (1 << eLen) - 1, - eBias = eMax >> 1, - rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0), - i = isBE ? (nBytes - 1) : 0, - d = isBE ? -1 : 1, - s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; - value = Math.abs(value); - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0; - e = eMax; - } else { - e = Math.floor(Math.log(value) / Math.LN2); - if (value * (c = Math.pow(2, -e)) < 1) { - e--; - c *= 2; - } - if (e + eBias >= 1) { - value += rt / c; +var debugs = {}; +var debugEnviron; +exports.debuglog = function(set) { + if (isUndefined(debugEnviron)) + debugEnviron = process.env.NODE_DEBUG || ''; + set = set.toUpperCase(); + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = process.pid; + debugs[set] = function() { + var msg = exports.format.apply(exports, arguments); + console.error('%s %d: %s', set, pid, msg); + }; } else { - value += rt * Math.pow(2, 1 - eBias); - } - if (value * c >= 2) { - e++; - c /= 2; - } - - if (e + eBias >= eMax) { - m = 0; - e = eMax; - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen); - e = e + eBias; - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); - e = 0; + debugs[set] = function() {}; } } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8); - - e = (e << mLen) | m; - eLen += mLen; - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8); - - buffer[offset + i - d] |= s * 128; + return debugs[set]; }; -},{}],17:[function(req,module,exports){ -(function(){var assert = req('assert'); -exports.Buffer = Buffer; -exports.SlowBuffer = Buffer; -Buffer.poolSize = 8192; -exports.INSPECT_MAX_BYTES = 50; -function Buffer(subject, encoding, offset) { - if (!(this instanceof Buffer)) { - return new Buffer(subject, encoding, offset); +/** + * Echos the value of a value. Trys to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Object} opts Optional options object that alters the output. + */ +/* legacy: obj, showHidden, depth, colors*/ +function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + // legacy... + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + exports._extend(ctx, opts); } - this.parent = this; - this.offset = 0; + // set default options + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); +} +exports.inspect = inspect; - var type; - // Are we slicing? - if (typeof offset === 'number') { - this.length = coerce(encoding); - this.offset = offset; +// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +inspect.colors = { + 'bold' : [1, 22], + 'italic' : [3, 23], + 'underline' : [4, 24], + 'inverse' : [7, 27], + 'white' : [37, 39], + 'grey' : [90, 39], + 'black' : [30, 39], + 'blue' : [34, 39], + 'cyan' : [36, 39], + 'green' : [32, 39], + 'magenta' : [35, 39], + 'red' : [31, 39], + 'yellow' : [33, 39] +}; + +// Don't use 'blue' not visible on cmd.exe +inspect.styles = { + 'special': 'cyan', + 'number': 'yellow', + 'boolean': 'yellow', + 'undefined': 'grey', + 'null': 'bold', + 'string': 'green', + 'date': 'magenta', + // "name": intentionally not styling + 'regexp': 'red' +}; + + +function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + + '\u001b[' + inspect.colors[style][1] + 'm'; } else { - // Find the length - switch (type = typeof subject) { - case 'number': - this.length = coerce(subject); - break; + return str; + } +} - case 'string': - this.length = Buffer.byteLength(subject, encoding); - break; - case 'object': // Assume object is an array - this.length = coerce(subject.length); - break; +function stylizeNoColor(str, styleType) { + return str; +} + +function arrayToHash(array) { + var hash = {}; + + array.forEach(function(val, idx) { + hash[val] = true; + }); + + return hash; +} + + +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect && + value && + isFunction(value.inspect) && + // Filter out the util module, it's inspect function is special + value.inspect !== exports.inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + // IE doesn't make error fields non-enumerable + // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx + if (isError(value) + && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { + return formatError(value); + } + + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '', array = false, braces = ['{', '}']; + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + base = ' ' + formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); +} + + +function formatPrimitive(ctx, value) { + if (isUndefined(value)) + return ctx.stylize('undefined', 'undefined'); + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + if (isNumber(value)) + return ctx.stylize('' + value, 'number'); + if (isBoolean(value)) + return ctx.stylize('' + value, 'boolean'); + // For some reason typeof null is "object", so special case here. + if (isNull(value)) + return ctx.stylize('null', 'null'); +} + + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; +} + + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + + +function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function(prev, cur) { + numLinesEst++; + if (cur.indexOf('\n') >= 0) numLinesEst++; + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. +function isArray(ar) { + return Array.isArray(ar); +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return isObject(e) && + (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = _dereq_('./support/isBuffer'); + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); +} + + +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', + 'Oct', 'Nov', 'Dec']; + +// 26 Feb 16:19:34 +function timestamp() { + var d = new Date(); + var time = [pad(d.getHours()), + pad(d.getMinutes()), + pad(d.getSeconds())].join(':'); + return [d.getDate(), months[d.getMonth()], time].join(' '); +} + + +// log is just a thin wrapper to console.log that prepends a timestamp +exports.log = function() { + console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +}; + + +/** + * Inherit the prototype methods from one constructor into another. + * + * The Function.prototype.inherits from lang.js rewritten as a standalone + * function (not on Function.prototype). NOTE: If this file is to be loaded + * during bootstrapping this function needs to be rewritten using some native + * functions as prototype setup using normal JavaScript does not work as + * expected during bootstrapping (see mirror.js in r114903). + * + * @param {function} ctor Constructor function which needs to inherit the + * prototype. + * @param {function} superCtor Constructor function to inherit prototype from. + */ +exports.inherits = _dereq_('inherits'); + +exports._extend = function(origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject(add)) return origin; + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; +}; + +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +}).call(this,_dereq_("H:\\node\\npm\\node_modules\\browserify\\node_modules\\insert-module-globals\\node_modules\\process\\browser.js"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +}, +{"./support/isBuffer":14,"H:\\node\\npm\\node_modules\\browserify\\node_modules\\insert-module-globals\\node_modules\\process\\browser.js":18,"inherits":17}], +16:[function(_dereq_,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +function EventEmitter() { + this._events = this._events || {}; + this._maxListeners = this._maxListeners || undefined; +} +module.exports = EventEmitter; + +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; + +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._maxListeners = undefined; + +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +EventEmitter.defaultMaxListeners = 10; + +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +EventEmitter.prototype.setMaxListeners = function(n) { + if (!isNumber(n) || n < 0 || isNaN(n)) + throw TypeError('n must be a positive number'); + this._maxListeners = n; + return this; +}; + +EventEmitter.prototype.emit = function(type) { + var er, handler, len, args, i, listeners; + + if (!this._events) + this._events = {}; + + // If there is no 'error' event listener then throw. + if (type === 'error') { + if (!this._events.error || + (isObject(this._events.error) && !this._events.error.length)) { + er = arguments[1]; + if (er instanceof Error) { + throw er; // Unhandled 'error' event + } else { + throw TypeError('Uncaught, unspecified "error" event.'); + } + return false; + } + } + + handler = this._events[type]; + + if (isUndefined(handler)) + return false; + + if (isFunction(handler)) { + switch (arguments.length) { + // fast cases + case 1: + handler.call(this); + break; + case 2: + handler.call(this, arguments[1]); + break; + case 3: + handler.call(this, arguments[1], arguments[2]); + break; + // slower default: - throw new Error('First argument needs to be a number, ' + - 'array or string.'); + len = arguments.length; + args = new Array(len - 1); + for (i = 1; i < len; i++) + args[i - 1] = arguments[i]; + handler.apply(this, args); + } + } else if (isObject(handler)) { + len = arguments.length; + args = new Array(len - 1); + for (i = 1; i < len; i++) + args[i - 1] = arguments[i]; + + listeners = handler.slice(); + len = listeners.length; + for (i = 0; i < len; i++) + listeners[i].apply(this, args); + } + + return true; +}; + +EventEmitter.prototype.addListener = function(type, listener) { + var m; + + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + if (!this._events) + this._events = {}; + + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (this._events.newListener) + this.emit('newListener', type, + isFunction(listener.listener) ? + listener.listener : listener); + + if (!this._events[type]) + // Optimize the case of one listener. Don't need the extra array object. + this._events[type] = listener; + else if (isObject(this._events[type])) + // If we've already got an array, just append. + this._events[type].push(listener); + else + // Adding the second element, need to change to array. + this._events[type] = [this._events[type], listener]; + + // Check for listener leak + if (isObject(this._events[type]) && !this._events[type].warned) { + var m; + if (!isUndefined(this._maxListeners)) { + m = this._maxListeners; + } else { + m = EventEmitter.defaultMaxListeners; } - // Treat array-ish objects as a byte array. - if (isArrayIsh(subject)) { - for (var i = 0; i < this.length; i++) { - if (subject instanceof Buffer) { - this[i] = subject.readUInt8(i); - } - else { - this[i] = subject[i]; - } - } - } else if (type == 'string') { - // We are a string - this.length = this.write(subject, 0, encoding); - } else if (type === 'number') { - for (var i = 0; i < this.length; i++) { - this[i] = 0; - } + if (m && m > 0 && this._events[type].length > m) { + this._events[type].warned = true; + console.error('(node) warning: possible EventEmitter memory ' + + 'leak detected. %d listeners added. ' + + 'Use emitter.setMaxListeners() to increase limit.', + this._events[type].length); + console.trace(); } } -} -Buffer.prototype.get = function get(i) { - if (i < 0 || i >= this.length) throw new Error('oob'); - return this[i]; + return this; }; -Buffer.prototype.set = function set(i, v) { - if (i < 0 || i >= this.length) throw new Error('oob'); - return this[i] = v; -}; +EventEmitter.prototype.on = EventEmitter.prototype.addListener; -Buffer.byteLength = function (str, encoding) { - switch (encoding || "utf8") { - case 'hex': - return str.length / 2; +EventEmitter.prototype.once = function(type, listener) { + if (!isFunction(listener)) + throw TypeError('listener must be a function'); - case 'utf8': - case 'utf-8': - return utf8ToBytes(str).length; + var fired = false; - case 'ascii': - case 'binary': - return str.length; + function g() { + this.removeListener(type, g); - case 'base64': - return base64ToBytes(str).length; - - default: - throw new Error('Unknown encoding'); - } -}; - -Buffer.prototype.utf8Write = function (string, offset, length) { - var bytes, pos; - return Buffer._charsWritten = blitBuffer(utf8ToBytes(string), this, offset, length); -}; - -Buffer.prototype.asciiWrite = function (string, offset, length) { - var bytes, pos; - return Buffer._charsWritten = blitBuffer(asciiToBytes(string), this, offset, length); -}; - -Buffer.prototype.binaryWrite = Buffer.prototype.asciiWrite; - -Buffer.prototype.base64Write = function (string, offset, length) { - var bytes, pos; - return Buffer._charsWritten = blitBuffer(base64ToBytes(string), this, offset, length); -}; - -Buffer.prototype.base64Slice = function (start, end) { - var bytes = Array.prototype.slice.apply(this, arguments) - return req("base64-js").fromByteArray(bytes); -}; - -Buffer.prototype.utf8Slice = function () { - var bytes = Array.prototype.slice.apply(this, arguments); - var res = ""; - var tmp = ""; - var i = 0; - while (i < bytes.length) { - if (bytes[i] <= 0x7F) { - res += decodeUtf8Char(tmp) + String.fromCharCode(bytes[i]); - tmp = ""; - } else - tmp += "%" + bytes[i].toString(16); - - i++; + if (!fired) { + fired = true; + listener.apply(this, arguments); + } } - return res + decodeUtf8Char(tmp); -} + g.listener = listener; + this.on(type, g); -Buffer.prototype.asciiSlice = function () { - var bytes = Array.prototype.slice.apply(this, arguments); - var ret = ""; - for (var i = 0; i < bytes.length; i++) - ret += String.fromCharCode(bytes[i]); + return this; +}; + +// emits a 'removeListener' event iff the listener was removed +EventEmitter.prototype.removeListener = function(type, listener) { + var list, position, length, i; + + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + if (!this._events || !this._events[type]) + return this; + + list = this._events[type]; + length = list.length; + position = -1; + + if (list === listener || + (isFunction(list.listener) && list.listener === listener)) { + delete this._events[type]; + if (this._events.removeListener) + this.emit('removeListener', type, listener); + + } else if (isObject(list)) { + for (i = length; i-- > 0;) { + if (list[i] === listener || + (list[i].listener && list[i].listener === listener)) { + position = i; + break; + } + } + + if (position < 0) + return this; + + if (list.length === 1) { + list.length = 0; + delete this._events[type]; + } else { + list.splice(position, 1); + } + + if (this._events.removeListener) + this.emit('removeListener', type, listener); + } + + return this; +}; + +EventEmitter.prototype.removeAllListeners = function(type) { + var key, listeners; + + if (!this._events) + return this; + + // not listening for removeListener, no need to emit + if (!this._events.removeListener) { + if (arguments.length === 0) + this._events = {}; + else if (this._events[type]) + delete this._events[type]; + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + for (key in this._events) { + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = {}; + return this; + } + + listeners = this._events[type]; + + if (isFunction(listeners)) { + this.removeListener(type, listeners); + } else { + // LIFO order + while (listeners.length) + this.removeListener(type, listeners[listeners.length - 1]); + } + delete this._events[type]; + + return this; +}; + +EventEmitter.prototype.listeners = function(type) { + var ret; + if (!this._events || !this._events[type]) + ret = []; + else if (isFunction(this._events[type])) + ret = [this._events[type]]; + else + ret = this._events[type].slice(); return ret; +}; + +EventEmitter.listenerCount = function(emitter, type) { + var ret; + if (!emitter._events || !emitter._events[type]) + ret = 0; + else if (isFunction(emitter._events[type])) + ret = 1; + else + ret = emitter._events[type].length; + return ret; +}; + +function isFunction(arg) { + return typeof arg === 'function'; } -Buffer.prototype.binarySlice = Buffer.prototype.asciiSlice; +function isNumber(arg) { + return typeof arg === 'number'; +} -Buffer.prototype.inspect = function() { - var out = [], - len = this.length; - for (var i = 0; i < len; i++) { - out[i] = toHex(this[i]); - if (i == exports.INSPECT_MAX_BYTES) { - out[i + 1] = '...'; - break; - } - } - return ''; -}; +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +function isUndefined(arg) { + return arg === void 0; +} -Buffer.prototype.hexSlice = function(start, end) { - var len = this.length; - - if (!start || start < 0) start = 0; - if (!end || end < 0 || end > len) end = len; - - var out = ''; - for (var i = start; i < end; i++) { - out += toHex(this[i]); - } - return out; -}; - - -Buffer.prototype.toString = function(encoding, start, end) { - encoding = String(encoding || 'utf8').toLowerCase(); - start = +start || 0; - if (typeof end == 'undefined') end = this.length; - - // Fastpath empty strings - if (+end == start) { - return ''; - } - - switch (encoding) { - case 'hex': - return this.hexSlice(start, end); - - case 'utf8': - case 'utf-8': - return this.utf8Slice(start, end); - - case 'ascii': - return this.asciiSlice(start, end); - - case 'binary': - return this.binarySlice(start, end); - - case 'base64': - return this.base64Slice(start, end); - - case 'ucs2': - case 'ucs-2': - return this.ucs2Slice(start, end); - - default: - throw new Error('Unknown encoding'); - } -}; - - -Buffer.prototype.hexWrite = function(string, offset, length) { - offset = +offset || 0; - var remaining = this.length - offset; - if (!length) { - length = remaining; - } else { - length = +length; - if (length > remaining) { - length = remaining; - } - } - - // must be an even number of digits - var strLen = string.length; - if (strLen % 2) { - throw new Error('Invalid hex string'); - } - if (length > strLen / 2) { - length = strLen / 2; - } - for (var i = 0; i < length; i++) { - var byte = parseInt(string.substr(i * 2, 2), 16); - if (isNaN(byte)) throw new Error('Invalid hex string'); - this[offset + i] = byte; - } - Buffer._charsWritten = i * 2; - return i; -}; - - -Buffer.prototype.write = function(string, offset, length, encoding) { - // Support both (string, offset, length, encoding) - // and the legacy (string, encoding, offset, length) - if (isFinite(offset)) { - if (!isFinite(length)) { - encoding = length; - length = undefined; - } - } else { // legacy - var swap = encoding; - encoding = offset; - offset = length; - length = swap; - } - - offset = +offset || 0; - var remaining = this.length - offset; - if (!length) { - length = remaining; - } else { - length = +length; - if (length > remaining) { - length = remaining; - } - } - encoding = String(encoding || 'utf8').toLowerCase(); - - switch (encoding) { - case 'hex': - return this.hexWrite(string, offset, length); - - case 'utf8': - case 'utf-8': - return this.utf8Write(string, offset, length); - - case 'ascii': - return this.asciiWrite(string, offset, length); - - case 'binary': - return this.binaryWrite(string, offset, length); - - case 'base64': - return this.base64Write(string, offset, length); - - case 'ucs2': - case 'ucs-2': - return this.ucs2Write(string, offset, length); - - default: - throw new Error('Unknown encoding'); - } -}; - - -// slice(start, end) -Buffer.prototype.slice = function(start, end) { - if (end === undefined) end = this.length; - - if (end > this.length) { - throw new Error('oob'); - } - if (start > end) { - throw new Error('oob'); - } - - return new Buffer(this, end - start, +start); -}; - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function(target, target_start, start, end) { - var source = this; - start || (start = 0); - if (end === undefined || isNaN(end)) { - end = this.length; - } - target_start || (target_start = 0); - - if (end < start) throw new Error('sourceEnd < sourceStart'); - - // Copy 0 bytes; we're done - if (end === start) return 0; - if (target.length == 0 || source.length == 0) return 0; - - if (target_start < 0 || target_start >= target.length) { - throw new Error('targetStart out of bounds'); - } - - if (start < 0 || start >= source.length) { - throw new Error('sourceStart out of bounds'); - } - - if (end < 0 || end > source.length) { - throw new Error('sourceEnd out of bounds'); - } - - // Are we oob? - if (end > this.length) { - end = this.length; - } - - if (target.length - target_start < end - start) { - end = target.length - target_start + start; - } - - var temp = []; - for (var i=start; i= this.length) { - throw new Error('start out of bounds'); - } - - if (end < 0 || end > this.length) { - throw new Error('end out of bounds'); - } - - for (var i = start; i < end; i++) { - this[i] = value; +}, +{}], +17:[function(_dereq_,module,exports){ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor } } -// Static methods -Buffer.isBuffer = function isBuffer(b) { - return b instanceof Buffer || b instanceof Buffer; -}; - -Buffer.concat = function (list, totalLength) { - if (!isArray(list)) { - throw new Error("Usage: Buffer.concat(list, [totalLength])\n \ - list should be an Array."); - } - - if (list.length === 0) { - return new Buffer(0); - } else if (list.length === 1) { - return list[0]; - } - - if (typeof totalLength !== 'number') { - totalLength = 0; - for (var i = 0; i < list.length; i++) { - var buf = list[i]; - totalLength += buf.length; - } - } - - var buffer = new Buffer(totalLength); - var pos = 0; - for (var i = 0; i < list.length; i++) { - var buf = list[i]; - buf.copy(buffer, pos); - pos += buf.length; - } - return buffer; -}; - -// helpers - -function coerce(length) { - // Coerce length to a number (possibly NaN), round up - // in case it's fractional (e.g. 123.456) then do a - // double negate to coerce a NaN to 0. Easy, right? - length = ~~Math.ceil(+length); - return length < 0 ? 0 : length; -} - -function isArray(subject) { - return (Array.isArray || - function(subject){ - return {}.toString.apply(subject) == '[object Array]' - }) - (subject) -} - -function isArrayIsh(subject) { - return isArray(subject) || Buffer.isBuffer(subject) || - subject && typeof subject === 'object' && - typeof subject.length === 'number'; -} - -function toHex(n) { - if (n < 16) return '0' + n.toString(16); - return n.toString(16); -} - -function utf8ToBytes(str) { - var byteArray = []; - for (var i = 0; i < str.length; i++) - if (str.charCodeAt(i) <= 0x7F) - byteArray.push(str.charCodeAt(i)); - else { - var h = encodeURIComponent(str.charAt(i)).substr(1).split('%'); - for (var j = 0; j < h.length; j++) - byteArray.push(parseInt(h[j], 16)); - } - - return byteArray; -} - -function asciiToBytes(str) { - var byteArray = [] - for (var i = 0; i < str.length; i++ ) - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push( str.charCodeAt(i) & 0xFF ); - - return byteArray; -} - -function base64ToBytes(str) { - return req("base64-js").toByteArray(str); -} - -function blitBuffer(src, dst, offset, length) { - var pos, i = 0; - while (i < length) { - if ((i+offset >= dst.length) || (i >= src.length)) - break; - - dst[i + offset] = src[i]; - i++; - } - return i; -} - -function decodeUtf8Char(str) { - try { - return decodeURIComponent(str); - } catch (err) { - return String.fromCharCode(0xFFFD); // UTF 8 invalid char - } -} - -// read/write bit-twiddling - -Buffer.prototype.readUInt8 = function(offset, noAssert) { - var buffer = this; - - if (!noAssert) { - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset < buffer.length, - 'Trying to read beyond buffer length'); - } - - if (offset >= buffer.length) return; - - return buffer[offset]; -}; - -function readUInt16(buffer, offset, isBigEndian, noAssert) { - var val = 0; - - - if (!noAssert) { - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 1 < buffer.length, - 'Trying to read beyond buffer length'); - } - - if (offset >= buffer.length) return 0; - - if (isBigEndian) { - val = buffer[offset] << 8; - if (offset + 1 < buffer.length) { - val |= buffer[offset + 1]; - } - } else { - val = buffer[offset]; - if (offset + 1 < buffer.length) { - val |= buffer[offset + 1] << 8; - } - } - - return val; -} - -Buffer.prototype.readUInt16LE = function(offset, noAssert) { - return readUInt16(this, offset, false, noAssert); -}; - -Buffer.prototype.readUInt16BE = function(offset, noAssert) { - return readUInt16(this, offset, true, noAssert); -}; - -function readUInt32(buffer, offset, isBigEndian, noAssert) { - var val = 0; - - if (!noAssert) { - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 3 < buffer.length, - 'Trying to read beyond buffer length'); - } - - if (offset >= buffer.length) return 0; - - if (isBigEndian) { - if (offset + 1 < buffer.length) - val = buffer[offset + 1] << 16; - if (offset + 2 < buffer.length) - val |= buffer[offset + 2] << 8; - if (offset + 3 < buffer.length) - val |= buffer[offset + 3]; - val = val + (buffer[offset] << 24 >>> 0); - } else { - if (offset + 2 < buffer.length) - val = buffer[offset + 2] << 16; - if (offset + 1 < buffer.length) - val |= buffer[offset + 1] << 8; - val |= buffer[offset]; - if (offset + 3 < buffer.length) - val = val + (buffer[offset + 3] << 24 >>> 0); - } - - return val; -} - -Buffer.prototype.readUInt32LE = function(offset, noAssert) { - return readUInt32(this, offset, false, noAssert); -}; - -Buffer.prototype.readUInt32BE = function(offset, noAssert) { - return readUInt32(this, offset, true, noAssert); -}; - - -/* - * Signed integer types, yay team! A reminder on how two's complement actually - * works. The first bit is the signed bit, i.e. tells us whether or not the - * number should be positive or negative. If the two's complement value is - * positive, then we're done, as it's equivalent to the unsigned representation. - * - * Now if the number is positive, you're pretty much done, you can just leverage - * the unsigned translations and return those. Unfortunately, negative numbers - * aren't quite that straightforward. - * - * At first glance, one might be inclined to use the traditional formula to - * translate binary numbers between the positive and negative values in two's - * complement. (Though it doesn't quite work for the most negative value) - * Mainly: - * - invert all the bits - * - add one to the result - * - * Of course, this doesn't quite work in Javascript. Take for example the value - * of -128. This could be represented in 16 bits (big-endian) as 0xff80. But of - * course, Javascript will do the following: - * - * > ~0xff80 - * -65409 - * - * Whoh there, Javascript, that's not quite right. But wait, according to - * Javascript that's perfectly correct. When Javascript ends up seeing the - * constant 0xff80, it has no notion that it is actually a signed number. It - * assumes that we've input the unsigned value 0xff80. Thus, when it does the - * binary negation, it casts it into a signed value, (positive 0xff80). Then - * when you perform binary negation on that, it turns it into a negative number. - * - * Instead, we're going to have to use the following general formula, that works - * in a rather Javascript friendly way. I'm glad we don't support this kind of - * weird numbering scheme in the kernel. - * - * (BIT-MAX - (unsigned)val + 1) * -1 - * - * The astute observer, may think that this doesn't make sense for 8-bit numbers - * (really it isn't necessary for them). However, when you get 16-bit numbers, - * you do. Let's go back to our prior example and see how this will look: - * - * (0xffff - 0xff80 + 1) * -1 - * (0x007f + 1) * -1 - * (0x0080) * -1 - */ -Buffer.prototype.readInt8 = function(offset, noAssert) { - var buffer = this; - var neg; - - if (!noAssert) { - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset < buffer.length, - 'Trying to read beyond buffer length'); - } - - if (offset >= buffer.length) return; - - neg = buffer[offset] & 0x80; - if (!neg) { - return (buffer[offset]); - } - - return ((0xff - buffer[offset] + 1) * -1); -}; - -function readInt16(buffer, offset, isBigEndian, noAssert) { - var neg, val; - - if (!noAssert) { - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 1 < buffer.length, - 'Trying to read beyond buffer length'); - } - - val = readUInt16(buffer, offset, isBigEndian, noAssert); - neg = val & 0x8000; - if (!neg) { - return val; - } - - return (0xffff - val + 1) * -1; -} - -Buffer.prototype.readInt16LE = function(offset, noAssert) { - return readInt16(this, offset, false, noAssert); -}; - -Buffer.prototype.readInt16BE = function(offset, noAssert) { - return readInt16(this, offset, true, noAssert); -}; - -function readInt32(buffer, offset, isBigEndian, noAssert) { - var neg, val; - - if (!noAssert) { - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 3 < buffer.length, - 'Trying to read beyond buffer length'); - } - - val = readUInt32(buffer, offset, isBigEndian, noAssert); - neg = val & 0x80000000; - if (!neg) { - return (val); - } - - return (0xffffffff - val + 1) * -1; -} - -Buffer.prototype.readInt32LE = function(offset, noAssert) { - return readInt32(this, offset, false, noAssert); -}; - -Buffer.prototype.readInt32BE = function(offset, noAssert) { - return readInt32(this, offset, true, noAssert); -}; - -function readFloat(buffer, offset, isBigEndian, noAssert) { - if (!noAssert) { - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset + 3 < buffer.length, - 'Trying to read beyond buffer length'); - } - - return req('./buffer_ieee754').readIEEE754(buffer, offset, isBigEndian, - 23, 4); -} - -Buffer.prototype.readFloatLE = function(offset, noAssert) { - return readFloat(this, offset, false, noAssert); -}; - -Buffer.prototype.readFloatBE = function(offset, noAssert) { - return readFloat(this, offset, true, noAssert); -}; - -function readDouble(buffer, offset, isBigEndian, noAssert) { - if (!noAssert) { - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset + 7 < buffer.length, - 'Trying to read beyond buffer length'); - } - - return req('./buffer_ieee754').readIEEE754(buffer, offset, isBigEndian, - 52, 8); -} - -Buffer.prototype.readDoubleLE = function(offset, noAssert) { - return readDouble(this, offset, false, noAssert); -}; - -Buffer.prototype.readDoubleBE = function(offset, noAssert) { - return readDouble(this, offset, true, noAssert); -}; - - -/* - * We have to make sure that the value is a valid integer. This means that it is - * non-negative. It has no fractional component and that it does not exceed the - * maximum allowed value. - * - * value The number to check for validity - * - * max The maximum value - */ -function verifuint(value, max) { - assert.ok(typeof (value) == 'number', - 'cannot write a non-number as a number'); - - assert.ok(value >= 0, - 'specified a negative value for writing an unsigned value'); - - assert.ok(value <= max, 'value is larger than maximum value for type'); - - assert.ok(Math.floor(value) === value, 'value has a fractional component'); -} - -Buffer.prototype.writeUInt8 = function(value, offset, noAssert) { - var buffer = this; - - if (!noAssert) { - assert.ok(value !== undefined && value !== null, - 'missing value'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset < buffer.length, - 'trying to write beyond buffer length'); - - verifuint(value, 0xff); - } - - if (offset < buffer.length) { - buffer[offset] = value; - } -}; - -function writeUInt16(buffer, value, offset, isBigEndian, noAssert) { - if (!noAssert) { - assert.ok(value !== undefined && value !== null, - 'missing value'); - - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 1 < buffer.length, - 'trying to write beyond buffer length'); - - verifuint(value, 0xffff); - } - - for (var i = 0; i < Math.min(buffer.length - offset, 2); i++) { - buffer[offset + i] = - (value & (0xff << (8 * (isBigEndian ? 1 - i : i)))) >>> - (isBigEndian ? 1 - i : i) * 8; - } - -} - -Buffer.prototype.writeUInt16LE = function(value, offset, noAssert) { - writeUInt16(this, value, offset, false, noAssert); -}; - -Buffer.prototype.writeUInt16BE = function(value, offset, noAssert) { - writeUInt16(this, value, offset, true, noAssert); -}; - -function writeUInt32(buffer, value, offset, isBigEndian, noAssert) { - if (!noAssert) { - assert.ok(value !== undefined && value !== null, - 'missing value'); - - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 3 < buffer.length, - 'trying to write beyond buffer length'); - - verifuint(value, 0xffffffff); - } - - for (var i = 0; i < Math.min(buffer.length - offset, 4); i++) { - buffer[offset + i] = - (value >>> (isBigEndian ? 3 - i : i) * 8) & 0xff; - } -} - -Buffer.prototype.writeUInt32LE = function(value, offset, noAssert) { - writeUInt32(this, value, offset, false, noAssert); -}; - -Buffer.prototype.writeUInt32BE = function(value, offset, noAssert) { - writeUInt32(this, value, offset, true, noAssert); -}; - - -/* - * We now move onto our friends in the signed number category. Unlike unsigned - * numbers, we're going to have to worry a bit more about how we put values into - * arrays. Since we are only worrying about signed 32-bit values, we're in - * slightly better shape. Unfortunately, we really can't do our favorite binary - * & in this system. It really seems to do the wrong thing. For example: - * - * > -32 & 0xff - * 224 - * - * What's happening above is really: 0xe0 & 0xff = 0xe0. However, the results of - * this aren't treated as a signed number. Ultimately a bad thing. - * - * What we're going to want to do is basically create the unsigned equivalent of - * our representation and pass that off to the wuint* functions. To do that - * we're going to do the following: - * - * - if the value is positive - * we can pass it directly off to the equivalent wuint - * - if the value is negative - * we do the following computation: - * mb + val + 1, where - * mb is the maximum unsigned value in that byte size - * val is the Javascript negative integer - * - * - * As a concrete value, take -128. In signed 16 bits this would be 0xff80. If - * you do out the computations: - * - * 0xffff - 128 + 1 - * 0xffff - 127 - * 0xff80 - * - * You can then encode this value as the signed version. This is really rather - * hacky, but it should work and get the job done which is our goal here. - */ - -/* - * A series of checks to make sure we actually have a signed 32-bit number - */ -function verifsint(value, max, min) { - assert.ok(typeof (value) == 'number', - 'cannot write a non-number as a number'); - - assert.ok(value <= max, 'value larger than maximum allowed value'); - - assert.ok(value >= min, 'value smaller than minimum allowed value'); - - assert.ok(Math.floor(value) === value, 'value has a fractional component'); -} - -function verifIEEE754(value, max, min) { - assert.ok(typeof (value) == 'number', - 'cannot write a non-number as a number'); - - assert.ok(value <= max, 'value larger than maximum allowed value'); - - assert.ok(value >= min, 'value smaller than minimum allowed value'); -} - -Buffer.prototype.writeInt8 = function(value, offset, noAssert) { - var buffer = this; - - if (!noAssert) { - assert.ok(value !== undefined && value !== null, - 'missing value'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset < buffer.length, - 'Trying to write beyond buffer length'); - - verifsint(value, 0x7f, -0x80); - } - - if (value >= 0) { - buffer.writeUInt8(value, offset, noAssert); - } else { - buffer.writeUInt8(0xff + value + 1, offset, noAssert); - } -}; - -function writeInt16(buffer, value, offset, isBigEndian, noAssert) { - if (!noAssert) { - assert.ok(value !== undefined && value !== null, - 'missing value'); - - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 1 < buffer.length, - 'Trying to write beyond buffer length'); - - verifsint(value, 0x7fff, -0x8000); - } - - if (value >= 0) { - writeUInt16(buffer, value, offset, isBigEndian, noAssert); - } else { - writeUInt16(buffer, 0xffff + value + 1, offset, isBigEndian, noAssert); - } -} - -Buffer.prototype.writeInt16LE = function(value, offset, noAssert) { - writeInt16(this, value, offset, false, noAssert); -}; - -Buffer.prototype.writeInt16BE = function(value, offset, noAssert) { - writeInt16(this, value, offset, true, noAssert); -}; - -function writeInt32(buffer, value, offset, isBigEndian, noAssert) { - if (!noAssert) { - assert.ok(value !== undefined && value !== null, - 'missing value'); - - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 3 < buffer.length, - 'Trying to write beyond buffer length'); - - verifsint(value, 0x7fffffff, -0x80000000); - } - - if (value >= 0) { - writeUInt32(buffer, value, offset, isBigEndian, noAssert); - } else { - writeUInt32(buffer, 0xffffffff + value + 1, offset, isBigEndian, noAssert); - } -} - -Buffer.prototype.writeInt32LE = function(value, offset, noAssert) { - writeInt32(this, value, offset, false, noAssert); -}; - -Buffer.prototype.writeInt32BE = function(value, offset, noAssert) { - writeInt32(this, value, offset, true, noAssert); -}; - -function writeFloat(buffer, value, offset, isBigEndian, noAssert) { - if (!noAssert) { - assert.ok(value !== undefined && value !== null, - 'missing value'); - - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 3 < buffer.length, - 'Trying to write beyond buffer length'); - - verifIEEE754(value, 3.4028234663852886e+38, -3.4028234663852886e+38); - } - - req('./buffer_ieee754').writeIEEE754(buffer, value, offset, isBigEndian, - 23, 4); -} - -Buffer.prototype.writeFloatLE = function(value, offset, noAssert) { - writeFloat(this, value, offset, false, noAssert); -}; - -Buffer.prototype.writeFloatBE = function(value, offset, noAssert) { - writeFloat(this, value, offset, true, noAssert); -}; - -function writeDouble(buffer, value, offset, isBigEndian, noAssert) { - if (!noAssert) { - assert.ok(value !== undefined && value !== null, - 'missing value'); - - assert.ok(typeof (isBigEndian) === 'boolean', - 'missing or invalid endian'); - - assert.ok(offset !== undefined && offset !== null, - 'missing offset'); - - assert.ok(offset + 7 < buffer.length, - 'Trying to write beyond buffer length'); - - verifIEEE754(value, 1.7976931348623157E+308, -1.7976931348623157E+308); - } - - req('./buffer_ieee754').writeIEEE754(buffer, value, offset, isBigEndian, - 52, 8); -} - -Buffer.prototype.writeDoubleLE = function(value, offset, noAssert) { - writeDouble(this, value, offset, false, noAssert); -}; - -Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) { - writeDouble(this, value, offset, true, noAssert); -}; - -})() -},{"./buffer_ieee754":16,"assert":13,"base64-js":18}],18:[function(req,module,exports){ -(function (exports) { - 'use strict'; - - var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - - function b64ToByteArray(b64) { - var i, j, l, tmp, placeHolders, arr; - - if (b64.length % 4 > 0) { - throw 'Invalid string. Length must be a multiple of 4'; - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - placeHolders = b64.indexOf('='); - placeHolders = placeHolders > 0 ? b64.length - placeHolders : 0; - - // base64 is 4/3 + up to two characters of the original data - arr = [];//new Uint8Array(b64.length * 3 / 4 - placeHolders); - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? b64.length - 4 : b64.length; - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (lookup.indexOf(b64[i]) << 18) | (lookup.indexOf(b64[i + 1]) << 12) | (lookup.indexOf(b64[i + 2]) << 6) | lookup.indexOf(b64[i + 3]); - arr.push((tmp & 0xFF0000) >> 16); - arr.push((tmp & 0xFF00) >> 8); - arr.push(tmp & 0xFF); - } - - if (placeHolders === 2) { - tmp = (lookup.indexOf(b64[i]) << 2) | (lookup.indexOf(b64[i + 1]) >> 4); - arr.push(tmp & 0xFF); - } else if (placeHolders === 1) { - tmp = (lookup.indexOf(b64[i]) << 10) | (lookup.indexOf(b64[i + 1]) << 4) | (lookup.indexOf(b64[i + 2]) >> 2); - arr.push((tmp >> 8) & 0xFF); - arr.push(tmp & 0xFF); - } - - return arr; - } - - function uint8ToBase64(uint8) { - var i, - extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes - output = "", - temp, length; - - function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]; - }; - - // go through the array every three bytes, we'll deal with trailing stuff later - for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { - temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]); - output += tripletToBase64(temp); - } - - // pad the end with zeros, but make sure to not forget the extra bytes - switch (extraBytes) { - case 1: - temp = uint8[uint8.length - 1]; - output += lookup[temp >> 2]; - output += lookup[(temp << 4) & 0x3F]; - output += '=='; - break; - case 2: - temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]); - output += lookup[temp >> 10]; - output += lookup[(temp >> 4) & 0x3F]; - output += lookup[(temp << 2) & 0x3F]; - output += '='; - break; - } - - return output; - } - - module.exports.toByteArray = b64ToByteArray; - module.exports.fromByteArray = uint8ToBase64; -}()); - -},{}],"./lib/sax/SAXParser.js":[function(req,module,exports){ -module.exports=req('DaboPu'); -},{}],20:[function(req,module,exports){ +}, +{}], +18:[function(_dereq_,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -11072,7 +10372,8 @@ process.nextTick = (function () { if (canPost) { var queue = []; window.addEventListener('message', function (ev) { - if (ev.source === window && ev.data === 'process-tick') { + var source = ev.source; + if ((source === window || source === null) && ev.data === 'process-tick') { ev.stopPropagation(); if (queue.length > 0) { var fn = queue.shift(); @@ -11097,6 +10398,13 @@ process.browser = true; process.env = {}; process.argv = []; +function noop() {} + +process.on = noop; +process.once = noop; +process.off = noop; +process.emit = noop; + process.binding = function (name) { throw new Error('process.binding is not supported'); } @@ -11107,7 +10415,16 @@ process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; -},{}]},{},["DaboPu"]) -; -exports.SAXParser = req('./lib/sax/SAXParser.js').SAXParser; -}); +}, +{}], +19:[function(_dereq_,module,exports){ +module.exports=_dereq_(14) +}, +{}], +20:[function(_dereq_,module,exports){ +module.exports=_dereq_(15) +}, +{"./support/isBuffer":19,"H:\\node\\npm\\node_modules\\browserify\\node_modules\\insert-module-globals\\node_modules\\process\\browser.js":18,"inherits":17}]},{},[9]) +(9) + +}); \ No newline at end of file diff --git a/lib/ace/mode/javascript/jshint.js b/lib/ace/mode/javascript/jshint.js index 84254ffa..fb2039b6 100644 --- a/lib/ace/mode/javascript/jshint.js +++ b/lib/ace/mode/javascript/jshint.js @@ -1,14 +1,32 @@ define(function(require, exports, module) { -// 2.1.9 -require = null; -require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 65 && i <= 90 || // A-Z + i === 95 || // _ + i >= 97 && i <= 122; // a-z +} + +var identifierPartTable = []; + +for (var i = 0; i < 128; i++) { + identifierPartTable[i] = + identifierStartTable[i] || // $, _, A-Z, a-z + i >= 48 && i <= 57; // 0-9 +} + +module.exports = { + asciiIdentifierStartTable: identifierStartTable, + asciiIdentifierPartTable: identifierPartTable +}; + +}, +{}], +2:[function(_dereq_,module,exports){ // Underscore.js 1.4.4 // http://underscorejs.org // (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc. @@ -1238,844 +1256,34 @@ require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof requ }, {}], -2:[function(req,module,exports){ -"use strict"; - -var _ = req("underscore"); - -var errors = { - // JSHint options - E001: "Bad option: '{a}'.", - E002: "Bad option value.", - - // JSHint input - E003: "Expected a JSON value.", - E004: "Input is neither a string nor an array of strings.", - E005: "Input is empty.", - E006: "Unexpected early end of program.", - - // Strict mode - E007: "Missing \"use strict\" statement.", - E008: "Strict violation.", - E009: "Option 'validthis' can't be used in a global scope.", - E010: "'with' is not allowed in strict mode.", - - // Constants - E011: "const '{a}' has already been declared.", - E012: "const '{a}' is initialized to 'undefined'.", - E013: "Attempting to override '{a}' which is a constant.", - - // Regular expressions - E014: "A regular expression literal can be confused with '/='.", - E015: "Unclosed regular expression.", - E016: "Invalid regular expression.", - - // Tokens - E017: "Unclosed comment.", - E018: "Unbegun comment.", - E019: "Unmatched '{a}'.", - E020: "Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.", - E021: "Expected '{a}' and instead saw '{b}'.", - E022: "Line breaking error '{a}'.", - E023: "Missing '{a}'.", - E024: "Unexpected '{a}'.", - E025: "Missing ':' on a case clause.", - E026: "Missing '}' to match '{' from line {a}.", - E027: "Missing ']' to match '[' form line {a}.", - E028: "Illegal comma.", - E029: "Unclosed string.", - - // Everything else - E030: "Expected an identifier and instead saw '{a}'.", - E031: "Bad assignment.", // FIXME: Rephrase - E032: "Expected a small integer or 'false' and instead saw '{a}'.", - E033: "Expected an operator and instead saw '{a}'.", - E034: "get/set are ES5 features.", - E035: "Missing property name.", - E036: "Expected to see a statement and instead saw a block.", - E037: null, // Vacant - E038: null, // Vacant - E039: "Function declarations are not invocable. Wrap the whole function invocation in parens.", - E040: "Each value should have its own case label.", - E041: "Unrecoverable syntax error.", - E042: "Stopping.", - E043: "Too many errors.", - E044: "'{a}' is already defined and can't be redefined.", - E045: "Invalid for each loop.", - E046: "A yield statement shall be within a generator function (with syntax: `function*`)", - E047: "A generator function shall contain a yield statement.", - E048: "Let declaration not directly within block.", - E049: "A {a} cannot be named '{b}'.", - E050: "Mozilla requires the yield expression to be parenthesized here.", - E051: "Regular parameters cannot come after default parameters." -}; - -var warnings = { - W001: "'hasOwnProperty' is a really bad name.", - W002: "Value of '{a}' may be overwritten in IE 8 and earlier.", - W003: "'{a}' was used before it was defined.", - W004: "'{a}' is already defined.", - W005: "A dot following a number can be confused with a decimal point.", - W006: "Confusing minuses.", - W007: "Confusing pluses.", - W008: "A leading decimal point can be confused with a dot: '{a}'.", - W009: "The array literal notation [] is preferrable.", - W010: "The object literal notation {} is preferrable.", - W011: "Unexpected space after '{a}'.", - W012: "Unexpected space before '{a}'.", - W013: "Missing space after '{a}'.", - W014: "Bad line breaking before '{a}'.", - W015: "Expected '{a}' to have an indentation at {b} instead at {c}.", - W016: "Unexpected use of '{a}'.", - W017: "Bad operand.", - W018: "Confusing use of '{a}'.", - W019: "Use the isNaN function to compare with NaN.", - W020: "Read only.", - W021: "'{a}' is a function.", - W022: "Do not assign to the exception parameter.", - W023: "Expected an identifier in an assignment and instead saw a function invocation.", - W024: "Expected an identifier and instead saw '{a}' (a reserved word).", - W025: "Missing name in function declaration.", - W026: "Inner functions should be listed at the top of the outer function.", - W027: "Unreachable '{a}' after '{b}'.", - W028: "Label '{a}' on {b} statement.", - W030: "Expected an assignment or function call and instead saw an expression.", - W031: "Do not use 'new' for side effects.", - W032: "Unnecessary semicolon.", - W033: "Missing semicolon.", - W034: "Unnecessary directive \"{a}\".", - W035: "Empty block.", - W036: "Unexpected /*member '{a}'.", - W037: "'{a}' is a statement label.", - W038: "'{a}' used out of scope.", - W039: "'{a}' is not allowed.", - W040: "Possible strict violation.", - W041: "Use '{a}' to compare with '{b}'.", - W042: "Avoid EOL escaping.", - W043: "Bad escaping of EOL. Use option multistr if needed.", - W044: "Bad or unnecessary escaping.", - W045: "Bad number '{a}'.", - W046: "Don't use extra leading zeros '{a}'.", - W047: "A trailing decimal point can be confused with a dot: '{a}'.", - W048: "Unexpected control character in regular expression.", - W049: "Unexpected escaped character '{a}' in regular expression.", - W050: "JavaScript URL.", - W051: "Variables should not be deleted.", - W052: "Unexpected '{a}'.", - W053: "Do not use {a} as a constructor.", - W054: "The Function constructor is a form of eval.", - W055: "A constructor name should start with an uppercase letter.", - W056: "Bad constructor.", - W057: "Weird construction. Is 'new' unnecessary?", - W058: "Missing '()' invoking a constructor.", - W059: "Avoid arguments.{a}.", - W060: "document.write can be a form of eval.", - W061: "eval can be harmful.", - W062: "Wrap an immediate function invocation in parens " + - "to assist the reader in understanding that the expression " + - "is the result of a function, and not the function itself.", - W063: "Math is not a function.", - W064: "Missing 'new' prefix when invoking a constructor.", - W065: "Missing radix parameter.", - W066: "Implied eval. Consider passing a function instead of a string.", - W067: "Bad invocation.", - W068: "Wrapping non-IIFE function literals in parens is unnecessary.", - W069: "['{a}'] is better written in dot notation.", - W070: "Extra comma. (it breaks older versions of IE)", - W071: "This function has too many statements. ({a})", - W072: "This function has too many parameters. ({a})", - W073: "Blocks are nested too deeply. ({a})", - W074: "This function's cyclomatic complexity is too high. ({a})", - W075: "Duplicate key '{a}'.", - W076: "Unexpected parameter '{a}' in get {b} function.", - W077: "Expected a single parameter in set {a} function.", - W078: "Setter is defined without getter.", - W079: "Redefinition of '{a}'.", - W080: "It's not necessary to initialize '{a}' to 'undefined'.", - W081: "Too many var statements.", - W082: "Function declarations should not be placed in blocks. " + - "Use a function expression or move the statement to the top of " + - "the outer function.", - W083: "Don't make functions within a loop.", - W084: "Assignment in conditional expression", - W085: "Don't use 'with'.", - W086: "Expected a 'break' statement before '{a}'.", - W087: "Forgotten 'debugger' statement?", - W088: "Creating global 'for' variable. Should be 'for (var {a} ...'.", - W089: "The body of a for in should be wrapped in an if statement to filter " + - "unwanted properties from the prototype.", - W090: "'{a}' is not a statement label.", - W091: "'{a}' is out of scope.", - W092: "Wrap the /regexp/ literal in parens to disambiguate the slash operator.", - W093: "Did you mean to return a conditional instead of an assignment?", - W094: "Unexpected comma.", - W095: "Expected a string and instead saw {a}.", - W096: "The '{a}' key may produce unexpected results.", - W097: "Use the function form of \"use strict\".", - W098: "'{a}' is defined but never used.", - W099: "Mixed spaces and tabs.", - W100: "This character may get silently deleted by one or more browsers.", - W101: "Line is too long.", - W102: "Trailing whitespace.", - W103: "The '{a}' property is deprecated.", - W104: "'{a}' is only available in JavaScript 1.7.", - W105: "Unexpected {a} in '{b}'.", - W106: "Identifier '{a}' is not in camel case.", - W107: "Script URL.", - W108: "Strings must use doublequote.", - W109: "Strings must use singlequote.", - W110: "Mixed double and single quotes.", - W112: "Unclosed string.", - W113: "Control character in string: {a}.", - W114: "Avoid {a}.", - W115: "Octal literals are not allowed in strict mode.", - W116: "Expected '{a}' and instead saw '{b}'.", - W117: "'{a}' is not defined.", - W118: "'{a}' is only available in Mozilla JavaScript extensions (use moz option).", - W119: "'{a}' is only available in ES6 (use esnext option).", - W120: "You might be leaking a variable ({a}) here." -}; - -var info = { - I001: "Comma warnings can be turned off with 'laxcomma'.", - I002: "Reserved words as properties can be used under the 'es5' option.", - I003: "ES5 option is now set per default" -}; - -exports.errors = {}; -exports.warnings = {}; -exports.info = {}; - -_.each(errors, function (desc, code) { - exports.errors[code] = { code: code, desc: desc }; -}); - -_.each(warnings, function (desc, code) { - exports.warnings[code] = { code: code, desc: desc }; -}); - -_.each(info, function (desc, code) { - exports.info[code] = { code: code, desc: desc }; -}); - -}, -{"underscore":1}], -3:[function(req,module,exports){ -// jshint -W001 - -"use strict"; - -// Identifiers provided by the ECMAScript standard. - -exports.reservedVars = { - arguments : false, - NaN : false -}; - -exports.ecmaIdentifiers = { - Array : false, - Boolean : false, - Date : false, - decodeURI : false, - decodeURIComponent : false, - encodeURI : false, - encodeURIComponent : false, - Error : false, - "eval" : false, - EvalError : false, - Function : false, - hasOwnProperty : false, - isFinite : false, - isNaN : false, - JSON : false, - Math : false, - Map : false, - Number : false, - Object : false, - parseInt : false, - parseFloat : false, - RangeError : false, - ReferenceError : false, - RegExp : false, - Set : false, - String : false, - SyntaxError : false, - TypeError : false, - URIError : false, - WeakMap : false -}; - -// Global variables commonly provided by a web browser environment. - -exports.browser = { - ArrayBuffer : false, - ArrayBufferView : false, - Audio : false, - Blob : false, - addEventListener : false, - applicationCache : false, - atob : false, - blur : false, - btoa : false, - clearInterval : false, - clearTimeout : false, - close : false, - closed : false, - CustomEvent : false, - DataView : false, - DOMParser : false, - defaultStatus : false, - document : false, - Element : false, - ElementTimeControl : false, - event : false, - FileReader : false, - Float32Array : false, - Float64Array : false, - FormData : false, - focus : false, - frames : false, - getComputedStyle : false, - HTMLElement : false, - HTMLAnchorElement : false, - HTMLBaseElement : false, - HTMLBlockquoteElement: false, - HTMLBodyElement : false, - HTMLBRElement : false, - HTMLButtonElement : false, - HTMLCanvasElement : false, - HTMLDirectoryElement : false, - HTMLDivElement : false, - HTMLDListElement : false, - HTMLFieldSetElement : false, - HTMLFontElement : false, - HTMLFormElement : false, - HTMLFrameElement : false, - HTMLFrameSetElement : false, - HTMLHeadElement : false, - HTMLHeadingElement : false, - HTMLHRElement : false, - HTMLHtmlElement : false, - HTMLIFrameElement : false, - HTMLImageElement : false, - HTMLInputElement : false, - HTMLIsIndexElement : false, - HTMLLabelElement : false, - HTMLLayerElement : false, - HTMLLegendElement : false, - HTMLLIElement : false, - HTMLLinkElement : false, - HTMLMapElement : false, - HTMLMenuElement : false, - HTMLMetaElement : false, - HTMLModElement : false, - HTMLObjectElement : false, - HTMLOListElement : false, - HTMLOptGroupElement : false, - HTMLOptionElement : false, - HTMLParagraphElement : false, - HTMLParamElement : false, - HTMLPreElement : false, - HTMLQuoteElement : false, - HTMLScriptElement : false, - HTMLSelectElement : false, - HTMLStyleElement : false, - HTMLTableCaptionElement: false, - HTMLTableCellElement : false, - HTMLTableColElement : false, - HTMLTableElement : false, - HTMLTableRowElement : false, - HTMLTableSectionElement: false, - HTMLTextAreaElement : false, - HTMLTitleElement : false, - HTMLUListElement : false, - HTMLVideoElement : false, - history : false, - Int16Array : false, - Int32Array : false, - Int8Array : false, - Image : false, - length : false, - localStorage : false, - location : false, - MessageChannel : false, - MessageEvent : false, - MessagePort : false, - MouseEvent : false, - moveBy : false, - moveTo : false, - MutationObserver : false, - name : false, - Node : false, - NodeFilter : false, - navigator : false, - onbeforeunload : true, - onblur : true, - onerror : true, - onfocus : true, - onload : true, - onresize : true, - onunload : true, - open : false, - openDatabase : false, - opener : false, - Option : false, - parent : false, - print : false, - removeEventListener : false, - resizeBy : false, - resizeTo : false, - screen : false, - scroll : false, - scrollBy : false, - scrollTo : false, - sessionStorage : false, - setInterval : false, - setTimeout : false, - SharedWorker : false, - status : false, - SVGAElement : false, - SVGAltGlyphDefElement: false, - SVGAltGlyphElement : false, - SVGAltGlyphItemElement: false, - SVGAngle : false, - SVGAnimateColorElement: false, - SVGAnimateElement : false, - SVGAnimateMotionElement: false, - SVGAnimateTransformElement: false, - SVGAnimatedAngle : false, - SVGAnimatedBoolean : false, - SVGAnimatedEnumeration: false, - SVGAnimatedInteger : false, - SVGAnimatedLength : false, - SVGAnimatedLengthList: false, - SVGAnimatedNumber : false, - SVGAnimatedNumberList: false, - SVGAnimatedPathData : false, - SVGAnimatedPoints : false, - SVGAnimatedPreserveAspectRatio: false, - SVGAnimatedRect : false, - SVGAnimatedString : false, - SVGAnimatedTransformList: false, - SVGAnimationElement : false, - SVGCSSRule : false, - SVGCircleElement : false, - SVGClipPathElement : false, - SVGColor : false, - SVGColorProfileElement: false, - SVGColorProfileRule : false, - SVGComponentTransferFunctionElement: false, - SVGCursorElement : false, - SVGDefsElement : false, - SVGDescElement : false, - SVGDocument : false, - SVGElement : false, - SVGElementInstance : false, - SVGElementInstanceList: false, - SVGEllipseElement : false, - SVGExternalResourcesRequired: false, - SVGFEBlendElement : false, - SVGFEColorMatrixElement: false, - SVGFEComponentTransferElement: false, - SVGFECompositeElement: false, - SVGFEConvolveMatrixElement: false, - SVGFEDiffuseLightingElement: false, - SVGFEDisplacementMapElement: false, - SVGFEDistantLightElement: false, - SVGFEFloodElement : false, - SVGFEFuncAElement : false, - SVGFEFuncBElement : false, - SVGFEFuncGElement : false, - SVGFEFuncRElement : false, - SVGFEGaussianBlurElement: false, - SVGFEImageElement : false, - SVGFEMergeElement : false, - SVGFEMergeNodeElement: false, - SVGFEMorphologyElement: false, - SVGFEOffsetElement : false, - SVGFEPointLightElement: false, - SVGFESpecularLightingElement: false, - SVGFESpotLightElement: false, - SVGFETileElement : false, - SVGFETurbulenceElement: false, - SVGFilterElement : false, - SVGFilterPrimitiveStandardAttributes: false, - SVGFitToViewBox : false, - SVGFontElement : false, - SVGFontFaceElement : false, - SVGFontFaceFormatElement: false, - SVGFontFaceNameElement: false, - SVGFontFaceSrcElement: false, - SVGFontFaceUriElement: false, - SVGForeignObjectElement: false, - SVGGElement : false, - SVGGlyphElement : false, - SVGGlyphRefElement : false, - SVGGradientElement : false, - SVGHKernElement : false, - SVGICCColor : false, - SVGImageElement : false, - SVGLangSpace : false, - SVGLength : false, - SVGLengthList : false, - SVGLineElement : false, - SVGLinearGradientElement: false, - SVGLocatable : false, - SVGMPathElement : false, - SVGMarkerElement : false, - SVGMaskElement : false, - SVGMatrix : false, - SVGMetadataElement : false, - SVGMissingGlyphElement: false, - SVGNumber : false, - SVGNumberList : false, - SVGPaint : false, - SVGPathElement : false, - SVGPathSeg : false, - SVGPathSegArcAbs : false, - SVGPathSegArcRel : false, - SVGPathSegClosePath : false, - SVGPathSegCurvetoCubicAbs: false, - SVGPathSegCurvetoCubicRel: false, - SVGPathSegCurvetoCubicSmoothAbs: false, - SVGPathSegCurvetoCubicSmoothRel: false, - SVGPathSegCurvetoQuadraticAbs: false, - SVGPathSegCurvetoQuadraticRel: false, - SVGPathSegCurvetoQuadraticSmoothAbs: false, - SVGPathSegCurvetoQuadraticSmoothRel: false, - SVGPathSegLinetoAbs : false, - SVGPathSegLinetoHorizontalAbs: false, - SVGPathSegLinetoHorizontalRel: false, - SVGPathSegLinetoRel : false, - SVGPathSegLinetoVerticalAbs: false, - SVGPathSegLinetoVerticalRel: false, - SVGPathSegList : false, - SVGPathSegMovetoAbs : false, - SVGPathSegMovetoRel : false, - SVGPatternElement : false, - SVGPoint : false, - SVGPointList : false, - SVGPolygonElement : false, - SVGPolylineElement : false, - SVGPreserveAspectRatio: false, - SVGRadialGradientElement: false, - SVGRect : false, - SVGRectElement : false, - SVGRenderingIntent : false, - SVGSVGElement : false, - SVGScriptElement : false, - SVGSetElement : false, - SVGStopElement : false, - SVGStringList : false, - SVGStylable : false, - SVGStyleElement : false, - SVGSwitchElement : false, - SVGSymbolElement : false, - SVGTRefElement : false, - SVGTSpanElement : false, - SVGTests : false, - SVGTextContentElement: false, - SVGTextElement : false, - SVGTextPathElement : false, - SVGTextPositioningElement: false, - SVGTitleElement : false, - SVGTransform : false, - SVGTransformList : false, - SVGTransformable : false, - SVGURIReference : false, - SVGUnitTypes : false, - SVGUseElement : false, - SVGVKernElement : false, - SVGViewElement : false, - SVGViewSpec : false, - SVGZoomAndPan : false, - TimeEvent : false, - top : false, - Uint16Array : false, - Uint32Array : false, - Uint8Array : false, - Uint8ClampedArray : false, - WebSocket : false, - window : false, - Worker : false, - XMLHttpRequest : false, - XMLSerializer : false, - XPathEvaluator : false, - XPathException : false, - XPathExpression : false, - XPathNamespace : false, - XPathNSResolver : false, - XPathResult : false -}; - -exports.devel = { - alert : false, - confirm: false, - console: false, - Debug : false, - opera : false, - prompt : false -}; - -exports.worker = { - importScripts: true, - postMessage : true, - self : true -}; - -// Widely adopted global names that are not part of ECMAScript standard -exports.nonstandard = { - escape : false, - unescape: false -}; - -// Globals provided by popular JavaScript environments. - -exports.couch = { - "require" : false, - respond : false, - getRow : false, - emit : false, - send : false, - start : false, - sum : false, - log : false, - exports : false, - module : false, - provides : false -}; - -exports.node = { - __filename : false, - __dirname : false, - Buffer : false, - DataView : false, - console : false, - exports : true, // In Node it is ok to exports = module.exports = foo(); - GLOBAL : false, - global : false, - module : false, - process : false, - require : false, - setTimeout : false, - clearTimeout : false, - setInterval : false, - clearInterval : false, - setImmediate : false, // v0.9.1+ - clearImmediate: false // v0.9.1+ -}; - -exports.phantom = { - phantom : true, - require : true, - WebPage : true -}; - -exports.rhino = { - defineClass : false, - deserialize : false, - gc : false, - help : false, - importPackage: false, - "java" : false, - load : false, - loadClass : false, - print : false, - quit : false, - readFile : false, - readUrl : false, - runCommand : false, - seal : false, - serialize : false, - spawn : false, - sync : false, - toint32 : false, - version : false -}; - -exports.shelljs = { - target : false, - echo : false, - exit : false, - cd : false, - pwd : false, - ls : false, - find : false, - cp : false, - rm : false, - mv : false, - mkdir : false, - test : false, - cat : false, - sed : false, - grep : false, - which : false, - dirs : false, - pushd : false, - popd : false, - env : false, - exec : false, - chmod : false, - config : false, - error : false, - tempdir : false -}; - -exports.wsh = { - ActiveXObject : true, - Enumerator : true, - GetObject : true, - ScriptEngine : true, - ScriptEngineBuildVersion : true, - ScriptEngineMajorVersion : true, - ScriptEngineMinorVersion : true, - VBArray : true, - WSH : true, - WScript : true, - XDomainRequest : true -}; - -// Globals provided by popular JavaScript libraries. - -exports.dojo = { - dojo : false, - dijit : false, - dojox : false, - define : false, - "require": false -}; - -exports.jquery = { - "$" : false, - jQuery : false -}; - -exports.mootools = { - "$" : false, - "$$" : false, - Asset : false, - Browser : false, - Chain : false, - Class : false, - Color : false, - Cookie : false, - Core : false, - Document : false, - DomReady : false, - DOMEvent : false, - DOMReady : false, - Drag : false, - Element : false, - Elements : false, - Event : false, - Events : false, - Fx : false, - Group : false, - Hash : false, - HtmlTable : false, - Iframe : false, - IframeShim : false, - InputValidator: false, - instanceOf : false, - Keyboard : false, - Locale : false, - Mask : false, - MooTools : false, - Native : false, - Options : false, - OverText : false, - Request : false, - Scroller : false, - Slick : false, - Slider : false, - Sortables : false, - Spinner : false, - Swiff : false, - Tips : false, - Type : false, - typeOf : false, - URI : false, - Window : false -}; - -exports.prototypejs = { - "$" : false, - "$$" : false, - "$A" : false, - "$F" : false, - "$H" : false, - "$R" : false, - "$break" : false, - "$continue" : false, - "$w" : false, - Abstract : false, - Ajax : false, - Class : false, - Enumerable : false, - Element : false, - Event : false, - Field : false, - Form : false, - Hash : false, - Insertion : false, - ObjectRange : false, - PeriodicalExecuter: false, - Position : false, - Prototype : false, - Selector : false, - Template : false, - Toggle : false, - Try : false, - Autocompleter : false, - Builder : false, - Control : false, - Draggable : false, - Draggables : false, - Droppables : false, - Effect : false, - Sortable : false, - SortableObserver : false, - Sound : false, - Scriptaculous : false -}; - -exports.yui = { - YUI : false, - Y : false, - YUI_config: false -}; - - -}, -{}], -"n4bKNg":[function(req,module,exports){ +3:[function(_dereq_,module,exports){ /*! * JSHint, by JSHint Community. * * This file (and this file only) is licensed under the same slightly modified * MIT license that JSLint is. It stops evil-doers everywhere: * - * Copyright (c) 2002 Douglas Crockford (www.JSLint.com) + * Copyright (c) 2002 Douglas Crockford (www.JSLint.com) * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. * - * The Software shall be used for Good, not Evil. + * The Software shall be used for Good, not Evil. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. * */ @@ -2083,4964 +1291,5004 @@ exports.yui = { /*global console:true */ /*exported console */ -var _ = req("underscore"); -var events = req("events"); -var vars = req("../shared/vars.js"); -var messages = req("../shared/messages.js"); -var Lexer = req("./lex.js").Lexer; -var reg = req("./reg.js"); -var state = req("./state.js").state; -var style = req("./style.js"); - -// We need this module here because environments such as IE and Rhino -// don't necessarilly expose the 'console' API and browserify uses -// it to log things. It's a sad state of affair, really. -var console = req("console-browserify"); +var _ = _dereq_("underscore"); +var events = _dereq_("events"); +var vars = _dereq_("./vars.js"); +var messages = _dereq_("./messages.js"); +var Lexer = _dereq_("./lex.js").Lexer; +var reg = _dereq_("./reg.js"); +var state = _dereq_("./state.js").state; +var style = _dereq_("./style.js"); // We build the application inside a function so that we produce only a singleton // variable. That function will be invoked immediately, and its return value is // the JSHINT function itself. var JSHINT = (function () { - "use strict"; - - var anonname, // The guessed name for anonymous functions. - api, // Extension API - - // These are operators that should not be used with the ! operator. - bang = { - "<" : true, - "<=" : true, - "==" : true, - "===": true, - "!==": true, - "!=" : true, - ">" : true, - ">=" : true, - "+" : true, - "-" : true, - "*" : true, - "/" : true, - "%" : true - }, - - // These are the JSHint boolean options. - boolOptions = { - asi : true, // if automatic semicolon insertion should be tolerated - bitwise : true, // if bitwise operators should not be allowed - boss : true, // if advanced usage of assignments should be allowed - browser : true, // if the standard browser globals should be predefined - camelcase : true, // if identifiers should be required in camel case - couch : true, // if CouchDB globals should be predefined - curly : true, // if curly braces around all blocks should be required - debug : true, // if debugger statements should be allowed - devel : true, // if logging globals should be predefined (console, alert, etc.) - dojo : true, // if Dojo Toolkit globals should be predefined - eqeqeq : true, // if === should be required - eqnull : true, // if == null comparisons should be tolerated - es3 : true, // if ES3 syntax should be allowed - es5 : true, // if ES5 syntax should be allowed (is now set per default) - esnext : true, // if es.next specific syntax should be allowed - moz : true, // if mozilla specific syntax should be allowed - evil : true, // if eval should be allowed - expr : true, // if ExpressionStatement should be allowed as Programs - forin : true, // if for in statements must filter - funcscope : true, // if only function scope should be used for scope tests - gcl : true, // if JSHint should be compatible with Google Closure Linter - globalstrict: true, // if global "use strict"; should be allowed (also enables 'strict') - immed : true, // if immediate invocations must be wrapped in parens - iterator : true, // if the `__iterator__` property should be allowed - jquery : true, // if jQuery globals should be predefined - lastsemic : true, // if semicolons may be ommitted for the trailing - // statements inside of a one-line blocks. - laxbreak : true, // if line breaks should not be checked - laxcomma : true, // if line breaks should not be checked around commas - loopfunc : true, // if functions should be allowed to be defined within - // loops - mootools : true, // if MooTools globals should be predefined - multistr : true, // allow multiline strings - newcap : true, // if constructor names must be capitalized - noarg : true, // if arguments.caller and arguments.callee should be - // disallowed - node : true, // if the Node.js environment globals should be - // predefined - noempty : true, // if empty blocks should be disallowed - nonew : true, // if using `new` for side-effects should be disallowed - nonstandard : true, // if non-standard (but widely adopted) globals should - // be predefined - nomen : true, // if names should be checked - onevar : true, // if only one var statement per function should be - // allowed - passfail : true, // if the scan should stop on first error - phantom : true, // if PhantomJS symbols should be allowed - plusplus : true, // if increment/decrement should not be allowed - proto : true, // if the `__proto__` property should be allowed - prototypejs : true, // if Prototype and Scriptaculous globals should be - // predefined - rhino : true, // if the Rhino environment globals should be predefined - shelljs : true, // if ShellJS globals should be predefined - undef : true, // if variables should be declared before used - scripturl : true, // if script-targeted URLs should be tolerated - shadow : true, // if variable shadowing should be tolerated - smarttabs : true, // if smarttabs should be tolerated - // (http://www.emacswiki.org/emacs/SmartTabs) - strict : true, // require the "use strict"; pragma - sub : true, // if all forms of subscript notation are tolerated - supernew : true, // if `new function () { ... };` and `new Object;` - // should be tolerated - trailing : true, // if trailing whitespace rules apply - validthis : true, // if 'this' inside a non-constructor function is valid. - // This is a function scoped option only. - withstmt : true, // if with statements should be allowed - white : true, // if strict whitespace rules apply - worker : true, // if Web Worker script symbols should be allowed - wsh : true, // if the Windows Scripting Host environment globals - // should be predefined - yui : true, // YUI variables should be predefined - - // Obsolete options - onecase : true, // if one case switch statements should be allowed - regexp : true, // if the . should not be allowed in regexp literals - regexdash : true // if unescaped first/last dash (-) inside brackets - // should be tolerated - }, - - // These are the JSHint options that can take any value - // (we use this object to detect invalid options) - valOptions = { - maxlen : false, - indent : false, - maxerr : false, - predef : false, - quotmark : false, //'single'|'double'|true - scope : false, - maxstatements: false, // {int} max statements per function - maxdepth : false, // {int} max nested block depth per function - maxparams : false, // {int} max params per function - maxcomplexity: false, // {int} max cyclomatic complexity per function - unused : true, // warn if variables are unused. Available options: - // false - don't check for unused variables - // true - "vars" + check last function param - // "vars" - skip checking unused function params - // "strict" - "vars" + check all function params - latedef : false // warn if the variable is used before its definition - // false - don't emit any warnings - // true - warn if any variable is used before its definition - // "nofunc" - warn for any variable but function declarations - }, - - // These are JSHint boolean options which are shared with JSLint - // where the definition in JSHint is opposite JSLint - invertedOptions = { - bitwise : true, - forin : true, - newcap : true, - nomen : true, - plusplus: true, - regexp : true, - undef : true, - white : true, - - // Inverted and renamed, use JSHint name here - eqeqeq : true, - onevar : true, - strict : true - }, - - // These are JSHint boolean options which are shared with JSLint - // where the name has been changed but the effect is unchanged - renamedOptions = { - eqeq : "eqeqeq", - vars : "onevar", - windows: "wsh", - sloppy : "strict" - }, - - declared, // Globals that were declared using /*global ... */ syntax. - exported, // Variables that are used outside of the current file. - - functionicity = [ - "closure", "exception", "global", "label", - "outer", "unused", "var" - ], - - funct, // The current function - functions, // All of the functions - - global, // The global scope - implied, // Implied globals - inblock, - indent, - lookahead, - lex, - member, - membersOnly, - noreach, - predefined, // Global variables defined by option - - scope, // The current scope - stack, - unuseds, - urls, - warnings, - - extraModules = [], - emitter = new events.EventEmitter(); - - function checkOption(name, t) { - name = name.trim(); - - if (/^[+-]W\d{3}$/g.test(name)) { - return true; - } - - if (valOptions[name] === undefined && boolOptions[name] === undefined) { - if (t.type !== "jslint") { - error("E001", t, name); - return false; - } - } - - return true; - } - - function isString(obj) { - return Object.prototype.toString.call(obj) === "[object String]"; - } - - function isIdentifier(tkn, value) { - if (!tkn) - return false; - - if (!tkn.identifier || tkn.value !== value) - return false; - - return true; - } - - function isReserved(token) { - if (!token.reserved) { - return false; - } - var meta = token.meta; - - if (meta && meta.isFutureReservedWord && state.option.inES5()) { - // ES3 FutureReservedWord in an ES5 environment. - if (!meta.es5) { - return false; - } - - // Some ES5 FutureReservedWord identifiers are active only - // within a strict mode environment. - if (meta.strictOnly) { - if (!state.option.strict && !state.directive["use strict"]) { - return false; - } - } - - if (token.isProperty) { - return false; - } - } - - return true; - } - - function supplant(str, data) { - return str.replace(/\{([^{}]*)\}/g, function (a, b) { - var r = data[b]; - return typeof r === "string" || typeof r === "number" ? r : a; - }); - } - - function combine(t, o) { - var n; - for (n in o) { - if (_.has(o, n) && !_.has(JSHINT.blacklist, n)) { - t[n] = o[n]; - } - } - } - - function updatePredefined() { - Object.keys(JSHINT.blacklist).forEach(function (key) { - delete predefined[key]; - }); - } - - function assume() { - if (state.option.couch) { - combine(predefined, vars.couch); - } - - if (state.option.rhino) { - combine(predefined, vars.rhino); - } - - if (state.option.shelljs) { - combine(predefined, vars.shelljs); - combine(predefined, vars.node); - } - - if (state.option.phantom) { - combine(predefined, vars.phantom); - } - - if (state.option.prototypejs) { - combine(predefined, vars.prototypejs); - } - - if (state.option.node) { - combine(predefined, vars.node); - } - - if (state.option.devel) { - combine(predefined, vars.devel); - } - - if (state.option.dojo) { - combine(predefined, vars.dojo); - } - - if (state.option.browser) { - combine(predefined, vars.browser); - } - - if (state.option.nonstandard) { - combine(predefined, vars.nonstandard); - } - - if (state.option.jquery) { - combine(predefined, vars.jquery); - } - - if (state.option.mootools) { - combine(predefined, vars.mootools); - } - - if (state.option.worker) { - combine(predefined, vars.worker); - } - - if (state.option.wsh) { - combine(predefined, vars.wsh); - } - - if (state.option.globalstrict && state.option.strict !== false) { - state.option.strict = true; - } - - if (state.option.yui) { - combine(predefined, vars.yui); - } - - // Let's assume that chronologically ES3 < ES5 < ES6/ESNext < Moz - - state.option.inMoz = function (strict) { - return state.option.moz; - }; - - state.option.inESNext = function (strict) { - return state.option.moz || state.option.esnext; - }; - - state.option.inES5 = function (/* strict */) { - return !state.option.es3; - }; - - state.option.inES3 = function (strict) { - if (strict) { - return !state.option.moz && !state.option.esnext && state.option.es3; - } - return state.option.es3; - }; - } - - // Produce an error warning. - function quit(code, line, chr) { - var percentage = Math.floor((line / state.lines.length) * 100); - var message = messages.errors[code].desc; - - throw { - name: "JSHintError", - line: line, - character: chr, - message: message + " (" + percentage + "% scanned).", - raw: message, - code: code - }; - } - - function isundef(scope, code, token, a) { - return JSHINT.undefs.push([scope, code, token, a]); - } - - function warning(code, t, a, b, c, d) { - var ch, l, w, msg; - - if (/^W\d{3}$/.test(code)) { - if (state.ignored[code]) - return; - - msg = messages.warnings[code]; - } else if (/E\d{3}/.test(code)) { - msg = messages.errors[code]; - } else if (/I\d{3}/.test(code)) { - msg = messages.info[code]; - } - - t = t || state.tokens.next; - if (t.id === "(end)") { // `~ - t = state.tokens.curr; - } - - l = t.line || 0; - ch = t.from || 0; - - w = { - id: "(error)", - raw: msg.desc, - code: msg.code, - evidence: state.lines[l - 1] || "", - line: l, - character: ch, - scope: JSHINT.scope, - a: a, - b: b, - c: c, - d: d - }; - - w.reason = supplant(msg.desc, w); - JSHINT.errors.push(w); - - if (state.option.passfail) { - quit("E042", l, ch); - } - - warnings += 1; - if (warnings >= state.option.maxerr) { - quit("E043", l, ch); - } - - return w; - } - - function warningAt(m, l, ch, a, b, c, d) { - return warning(m, { - line: l, - from: ch - }, a, b, c, d); - } - - function error(m, t, a, b, c, d) { - warning(m, t, a, b, c, d); - } - - function errorAt(m, l, ch, a, b, c, d) { - return error(m, { - line: l, - from: ch - }, a, b, c, d); - } - - // Tracking of "internal" scripts, like eval containing a static string - function addInternalSrc(elem, src) { - var i; - i = { - id: "(internal)", - elem: elem, - value: src - }; - JSHINT.internals.push(i); - return i; - } - - function addlabel(t, type, tkn, islet) { - // Define t in the current function in the current scope. - if (type === "exception") { - if (_.has(funct["(context)"], t)) { - if (funct[t] !== true && !state.option.node) { - warning("W002", state.tokens.next, t); - } - } - } - - if (_.has(funct, t) && !funct["(global)"]) { - if (funct[t] === true) { - if (state.option.latedef) { - if ((state.option.latedef === true && _.contains([funct[t], type], "unction")) || - !_.contains([funct[t], type], "unction")) { - warning("W003", state.tokens.next, t); - } - } - } else { - if (!state.option.shadow && type !== "exception" || - (funct["(blockscope)"].getlabel(t))) { - warning("W004", state.tokens.next, t); - } - } - } - - // a double definition of a let variable in same block throws a TypeError - if (funct["(blockscope)"] && funct["(blockscope)"].current.has(t)) { - error("E044", state.tokens.next, t); - } - - // if the identifier is from a let, adds it only to the current blockscope - if (islet) { - funct["(blockscope)"].current.add(t, type, state.tokens.curr); - } else { - - funct[t] = type; - - if (tkn) { - funct["(tokens)"][t] = tkn; - } - - if (funct["(global)"]) { - global[t] = funct; - if (_.has(implied, t)) { - if (state.option.latedef) { - if ((state.option.latedef === true && _.contains([funct[t], type], "unction")) || - !_.contains([funct[t], type], "unction")) { - warning("W003", state.tokens.next, t); - } - } - - delete implied[t]; - } - } else { - scope[t] = funct; - } - } - } - - function doOption() { - var nt = state.tokens.next; - var body = nt.body.match(/(-\s+)?[^\s,]+(?:\s*:\s*(-\s+)?[^\s,]+)?/g); - var predef = {}; - - if (nt.type === "globals") { - body.forEach(function (g) { - g = g.split(":"); - var key = (g[0] || "").trim(); - var val = (g[1] || "").trim(); - - if (key.charAt(0) === "-") { - key = key.slice(1); - val = false; - - JSHINT.blacklist[key] = key; - updatePredefined(); - } else { - predef[key] = (val === "true"); - } - }); - - combine(predefined, predef); - - for (var key in predef) { - if (_.has(predef, key)) { - declared[key] = nt; - } - } - } - - if (nt.type === "exported") { - body.forEach(function (e) { - exported[e] = true; - }); - } - - if (nt.type === "members") { - membersOnly = membersOnly || {}; - - body.forEach(function (m) { - var ch1 = m.charAt(0); - var ch2 = m.charAt(m.length - 1); - - if (ch1 === ch2 && (ch1 === "\"" || ch1 === "'")) { - m = m - .substr(1, m.length - 2) - .replace("\\b", "\b") - .replace("\\t", "\t") - .replace("\\n", "\n") - .replace("\\v", "\v") - .replace("\\f", "\f") - .replace("\\r", "\r") - .replace("\\\\", "\\") - .replace("\\\"", "\""); - } - - membersOnly[m] = false; - }); - } - - var numvals = [ - "maxstatements", - "maxparams", - "maxdepth", - "maxcomplexity", - "maxerr", - "maxlen", - "indent" - ]; - - if (nt.type === "jshint" || nt.type === "jslint") { - body.forEach(function (g) { - g = g.split(":"); - var key = (g[0] || "").trim(); - var val = (g[1] || "").trim(); - - if (!checkOption(key, nt)) { - return; - } - - if (numvals.indexOf(key) >= 0) { - - // GH988 - numeric options can be disabled by setting them to `false` - if (val !== "false") { - val = +val; - - if (typeof val !== "number" || !isFinite(val) || val <= 0 || Math.floor(val) !== val) { - error("E032", nt, g[1].trim()); - return; - } - - if (key === "indent") { - state.option["(explicitIndent)"] = true; - } - state.option[key] = val; - } else { - if (key === "indent") { - state.option["(explicitIndent)"] = false; - } else { - state.option[key] = false; - } - } - - return; - } - - if (key === "validthis") { - // `validthis` is valid only within a function scope. - if (funct["(global)"]) { - error("E009"); - } else { - if (val === "true" || val === "false") { - state.option.validthis = (val === "true"); - } else { - error("E002", nt); - } - } - return; - } - - if (key === "quotmark") { - switch (val) { - case "true": - case "false": - state.option.quotmark = (val === "true"); - break; - case "double": - case "single": - state.option.quotmark = val; - break; - default: - error("E002", nt); - } - return; - } - - if (key === "unused") { - switch (val) { - case "true": - state.option.unused = true; - break; - case "false": - state.option.unused = false; - break; - case "vars": - case "strict": - state.option.unused = val; - break; - default: - error("E002", nt); - } - return; - } - - if (key === "latedef") { - switch (val) { - case "true": - state.option.latedef = true; - break; - case "false": - state.option.latedef = false; - break; - case "nofunc": - state.option.latedef = "nofunc"; - break; - default: - error("E002", nt); - } - return; - } - - var match = /^([+-])(W\d{3})$/g.exec(key); - if (match) { - // ignore for -W..., unignore for +W... - state.ignored[match[2]] = (match[1] === "-"); - return; - } - - var tn; - if (val === "true" || val === "false") { - if (nt.type === "jslint") { - tn = renamedOptions[key] || key; - state.option[tn] = (val === "true"); - - if (invertedOptions[tn] !== undefined) { - state.option[tn] = !state.option[tn]; - } - } else { - state.option[key] = (val === "true"); - } - - if (key === "newcap") { - state.option["(explicitNewcap)"] = true; - } - return; - } - - error("E002", nt); - }); - - assume(); - } - } - - // We need a peek function. If it has an argument, it peeks that much farther - // ahead. It is used to distinguish - // for ( var i in ... - // from - // for ( var i = ... - - function peek(p) { - var i = p || 0, j = 0, t; - - while (j <= i) { - t = lookahead[j]; - if (!t) { - t = lookahead[j] = lex.token(); - } - j += 1; - } - return t; - } - - // Produce the next token. It looks for programming errors. - - function advance(id, t) { - switch (state.tokens.curr.id) { - case "(number)": - if (state.tokens.next.id === ".") { - warning("W005", state.tokens.curr); - } - break; - case "-": - if (state.tokens.next.id === "-" || state.tokens.next.id === "--") { - warning("W006"); - } - break; - case "+": - if (state.tokens.next.id === "+" || state.tokens.next.id === "++") { - warning("W007"); - } - break; - } - - if (state.tokens.curr.type === "(string)" || state.tokens.curr.identifier) { - anonname = state.tokens.curr.value; - } - - if (id && state.tokens.next.id !== id) { - if (t) { - if (state.tokens.next.id === "(end)") { - error("E019", t, t.id); - } else { - error("E020", state.tokens.next, id, t.id, t.line, state.tokens.next.value); - } - } else if (state.tokens.next.type !== "(identifier)" || state.tokens.next.value !== id) { - warning("W116", state.tokens.next, id, state.tokens.next.value); - } - } - - state.tokens.prev = state.tokens.curr; - state.tokens.curr = state.tokens.next; - for (;;) { - state.tokens.next = lookahead.shift() || lex.token(); - - if (!state.tokens.next) { // No more tokens left, give up - quit("E041", state.tokens.curr.line); - } - - if (state.tokens.next.id === "(end)" || state.tokens.next.id === "(error)") { - return; - } - - if (state.tokens.next.check) { - state.tokens.next.check(); - } - - if (state.tokens.next.isSpecial) { - doOption(); - } else { - if (state.tokens.next.id !== "(endline)") { - break; - } - } - } - } - - function isInfix(token) { - return token.infix || (!token.identifier && !!token.led); - } - - function isEndOfExpr() { - var curr = state.tokens.curr; - var next = state.tokens.next; - if (next.id === ";" || next.id === "}" || next.id === ":") { - return true; - } - if (isInfix(next) === isInfix(curr) || (curr.id === "yield" && state.option.inMoz(true))) { - return curr.line !== next.line; - } - return false; - } - - // This is the heart of JSHINT, the Pratt parser. In addition to parsing, it - // is looking for ad hoc lint patterns. We add .fud to Pratt's model, which is - // like .nud except that it is only used on the first token of a statement. - // Having .fud makes it much easier to define statement-oriented languages like - // JavaScript. I retained Pratt's nomenclature. - - // .nud Null denotation - // .fud First null denotation - // .led Left denotation - // lbp Left binding power - // rbp Right binding power - - // They are elements of the parsing method called Top Down Operator Precedence. - - function expression(rbp, initial) { - var left, isArray = false, isObject = false, isLetExpr = false; - - // if current expression is a let expression - if (!initial && state.tokens.next.value === "let" && peek(0).value === "(") { - if (!state.option.inMoz(true)) { - warning("W118", state.tokens.next, "let expressions"); - } - isLetExpr = true; - // create a new block scope we use only for the current expression - funct["(blockscope)"].stack(); - advance("let"); - advance("("); - state.syntax["let"].fud.call(state.syntax["let"].fud, false); - advance(")"); - } - - if (state.tokens.next.id === "(end)") - error("E006", state.tokens.curr); - - advance(); - - if (initial) { - anonname = "anonymous"; - funct["(verb)"] = state.tokens.curr.value; - } - - if (initial === true && state.tokens.curr.fud) { - left = state.tokens.curr.fud(); - } else { - if (state.tokens.curr.nud) { - left = state.tokens.curr.nud(); - } else { - error("E030", state.tokens.curr, state.tokens.curr.id); - } - - while (rbp < state.tokens.next.lbp && !isEndOfExpr()) { - isArray = state.tokens.curr.value === "Array"; - isObject = state.tokens.curr.value === "Object"; - - // #527, new Foo.Array(), Foo.Array(), new Foo.Object(), Foo.Object() - // Line breaks in IfStatement heads exist to satisfy the checkJSHint - // "Line too long." error. - if (left && (left.value || (left.first && left.first.value))) { - // If the left.value is not "new", or the left.first.value is a "." - // then safely assume that this is not "new Array()" and possibly - // not "new Object()"... - if (left.value !== "new" || - (left.first && left.first.value && left.first.value === ".")) { - isArray = false; - // ...In the case of Object, if the left.value and state.tokens.curr.value - // are not equal, then safely assume that this not "new Object()" - if (left.value !== state.tokens.curr.value) { - isObject = false; - } - } - } - - advance(); - - if (isArray && state.tokens.curr.id === "(" && state.tokens.next.id === ")") { - warning("W009", state.tokens.curr); - } - - if (isObject && state.tokens.curr.id === "(" && state.tokens.next.id === ")") { - warning("W010", state.tokens.curr); - } - - if (left && state.tokens.curr.led) { - left = state.tokens.curr.led(left); - } else { - error("E033", state.tokens.curr, state.tokens.curr.id); - } - } - } - if (isLetExpr) { - funct["(blockscope)"].unstack(); - } - return left; - } - - -// Functions for conformance of style. - - function adjacent(left, right) { - left = left || state.tokens.curr; - right = right || state.tokens.next; - if (state.option.white) { - if (left.character !== right.from && left.line === right.line) { - left.from += (left.character - left.from); - warning("W011", left, left.value); - } - } - } - - function nobreak(left, right) { - left = left || state.tokens.curr; - right = right || state.tokens.next; - if (state.option.white && (left.character !== right.from || left.line !== right.line)) { - warning("W012", right, right.value); - } - } - - function nospace(left, right) { - left = left || state.tokens.curr; - right = right || state.tokens.next; - if (state.option.white && !left.comment) { - if (left.line === right.line) { - adjacent(left, right); - } - } - } - - function nonadjacent(left, right) { - if (state.option.white) { - left = left || state.tokens.curr; - right = right || state.tokens.next; - - if (left.value === ";" && right.value === ";") { - return; - } - - if (left.line === right.line && left.character === right.from) { - left.from += (left.character - left.from); - warning("W013", left, left.value); - } - } - } - - function nobreaknonadjacent(left, right) { - left = left || state.tokens.curr; - right = right || state.tokens.next; - if (!state.option.laxbreak && left.line !== right.line) { - warning("W014", right, right.value); - } else if (state.option.white) { - left = left || state.tokens.curr; - right = right || state.tokens.next; - if (left.character === right.from) { - left.from += (left.character - left.from); - warning("W013", left, left.value); - } - } - } - - function indentation(bias) { - if (!state.option.white && !state.option["(explicitIndent)"]) { - return; - } - - if (state.tokens.next.id === "(end)") { - return; - } - - var i = indent + (bias || 0); - if (state.tokens.next.from !== i) { - warning("W015", state.tokens.next, state.tokens.next.value, i, state.tokens.next.from); - } - } - - function nolinebreak(t) { - t = t || state.tokens.curr; - if (t.line !== state.tokens.next.line) { - warning("E022", t, t.value); - } - } - - function nobreakcomma(left, right) { - if (left.line !== right.line) { - if (!state.option.laxcomma) { - if (comma.first) { - warning("I001"); - comma.first = false; - } - warning("W014", left, right.value); - } - } else if (!left.comment && left.character !== right.from && state.option.white) { - left.from += (left.character - left.from); - warning("W011", left, left.value); - } - } - - function comma(opts) { - opts = opts || {}; - - if (!opts.peek) { - nobreakcomma(state.tokens.curr, state.tokens.next); - advance(","); - } else { - nobreakcomma(state.tokens.prev, state.tokens.curr); - } - - // TODO: This is a temporary solution to fight against false-positives in - // arrays and objects with trailing commas (see GH-363). The best solution - // would be to extract all whitespace rules out of parser. - - if (state.tokens.next.value !== "]" && state.tokens.next.value !== "}") { - nonadjacent(state.tokens.curr, state.tokens.next); - } - - if (state.tokens.next.identifier && !(opts.property && state.option.inES5())) { - // Keywords that cannot follow a comma operator. - switch (state.tokens.next.value) { - case "break": - case "case": - case "catch": - case "continue": - case "default": - case "do": - case "else": - case "finally": - case "for": - case "if": - case "in": - case "instanceof": - case "return": - case "switch": - case "throw": - case "try": - case "var": - case "let": - case "while": - case "with": - error("E024", state.tokens.next, state.tokens.next.value); - return false; - } - } - - if (state.tokens.next.type === "(punctuator)") { - switch (state.tokens.next.value) { - case "}": - case "]": - case ",": - if (opts.allowTrailing) { - return true; - } - - /* falls through */ - case ")": - error("E024", state.tokens.next, state.tokens.next.value); - return false; - } - } - return true; - } - - // Functional constructors for making the symbols that will be inherited by - // tokens. - - function symbol(s, p) { - var x = state.syntax[s]; - if (!x || typeof x !== "object") { - state.syntax[s] = x = { - id: s, - lbp: p, - value: s - }; - } - return x; - } - - function delim(s) { - return symbol(s, 0); - } - - function stmt(s, f) { - var x = delim(s); - x.identifier = x.reserved = true; - x.fud = f; - return x; - } - - function blockstmt(s, f) { - var x = stmt(s, f); - x.block = true; - return x; - } - - function reserveName(x) { - var c = x.id.charAt(0); - if ((c >= "a" && c <= "z") || (c >= "A" && c <= "Z")) { - x.identifier = x.reserved = true; - } - return x; - } - - function prefix(s, f) { - var x = symbol(s, 150); - reserveName(x); - x.nud = (typeof f === "function") ? f : function () { - this.right = expression(150); - this.arity = "unary"; - if (this.id === "++" || this.id === "--") { - if (state.option.plusplus) { - warning("W016", this, this.id); - } else if (this.right && - (!this.right.identifier || isReserved(this.right)) && - this.right.id !== "." && this.right.id !== "[") { - warning("W017", this); - } - } - return this; - }; - return x; - } - - function type(s, f) { - var x = delim(s); - x.type = s; - x.nud = f; - return x; - } - - function reserve(name, func) { - var x = type(name, func); - x.identifier = true; - x.reserved = true; - return x; - } - - function FutureReservedWord(name, meta) { - var x = type(name, (meta && meta.nud) || function () { - return this; - }); - - meta = meta || {}; - meta.isFutureReservedWord = true; - - x.value = name; - x.identifier = true; - x.reserved = true; - x.meta = meta; - - return x; - } - - function reservevar(s, v) { - return reserve(s, function () { - if (typeof v === "function") { - v(this); - } - return this; - }); - } - - function infix(s, f, p, w) { - var x = symbol(s, p); - reserveName(x); - x.infix = true; - x.led = function (left) { - if (!w) { - nobreaknonadjacent(state.tokens.prev, state.tokens.curr); - nonadjacent(state.tokens.curr, state.tokens.next); - } - if (s === "in" && left.id === "!") { - warning("W018", left, "!"); - } - if (typeof f === "function") { - return f(left, this); - } else { - this.left = left; - this.right = expression(p); - return this; - } - }; - return x; - } - - - function application(s) { - var x = symbol(s, 42); - - x.led = function (left) { - if (!state.option.inESNext()) { - warning("W104", state.tokens.curr, "arrow function syntax (=>)"); - } - - nobreaknonadjacent(state.tokens.prev, state.tokens.curr); - nonadjacent(state.tokens.curr, state.tokens.next); - - this.left = left; - this.right = doFunction(undefined, undefined, false, left); - return this; - }; - return x; - } - - function relation(s, f) { - var x = symbol(s, 100); - - x.led = function (left) { - nobreaknonadjacent(state.tokens.prev, state.tokens.curr); - nonadjacent(state.tokens.curr, state.tokens.next); - var right = expression(100); - - if (isIdentifier(left, "NaN") || isIdentifier(right, "NaN")) { - warning("W019", this); - } else if (f) { - f.apply(this, [left, right]); - } - - if (!left || !right) { - quit("E041", state.tokens.curr.line); - } - - if (left.id === "!") { - warning("W018", left, "!"); - } - - if (right.id === "!") { - warning("W018", right, "!"); - } - - this.left = left; - this.right = right; - return this; - }; - return x; - } - - function isPoorRelation(node) { - return node && - ((node.type === "(number)" && +node.value === 0) || - (node.type === "(string)" && node.value === "") || - (node.type === "null" && !state.option.eqnull) || - node.type === "true" || - node.type === "false" || - node.type === "undefined"); - } - - function assignop(s, f, p) { - var x = infix(s, typeof f === "function" ? f : function (left, that) { - that.left = left; - - if (left) { - if (predefined[left.value] === false && - scope[left.value]["(global)"] === true) { - warning("W020", left); - } else if (left["function"]) { - warning("W021", left, left.value); - } - - if (funct[left.value] === "const") { - error("E013", left, left.value); - } - - if (left.id === ".") { - if (!left.left) { - warning("E031", that); - } else if (left.left.value === "arguments" && !state.directive["use strict"]) { - warning("E031", that); - } - - that.right = expression(10); - return that; - } else if (left.id === "[") { - if (state.tokens.curr.left.first) { - state.tokens.curr.left.first.forEach(function (t) { - if (funct[t.value] === "const") { - error("E013", t, t.value); - } - }); - } else if (!left.left) { - warning("E031", that); - } else if (left.left.value === "arguments" && !state.directive["use strict"]) { - warning("E031", that); - } - that.right = expression(10); - return that; - } else if (left.identifier && !isReserved(left)) { - if (funct[left.value] === "exception") { - warning("W022", left); - } - that.right = expression(10); - return that; - } - - if (left === state.syntax["function"]) { - warning("W023", state.tokens.curr); - } - } - - error("E031", that); - }, p); - - x.exps = true; - x.assign = true; - return x; - } - - - function bitwise(s, f, p) { - var x = symbol(s, p); - reserveName(x); - x.led = (typeof f === "function") ? f : function (left) { - if (state.option.bitwise) { - warning("W016", this, this.id); - } - this.left = left; - this.right = expression(p); - return this; - }; - return x; - } - - - function bitwiseassignop(s) { - return assignop(s, function (left, that) { - if (state.option.bitwise) { - warning("W016", that, that.id); - } - nonadjacent(state.tokens.prev, state.tokens.curr); - nonadjacent(state.tokens.curr, state.tokens.next); - if (left) { - if (left.id === "." || left.id === "[" || - (left.identifier && !isReserved(left))) { - expression(10); - return that; - } - if (left === state.syntax["function"]) { - warning("W023", state.tokens.curr); - } - return that; - } - error("E031", that); - }, 20); - } - - - function suffix(s) { - var x = symbol(s, 150); - - x.led = function (left) { - if (state.option.plusplus) { - warning("W016", this, this.id); - } else if ((!left.identifier || isReserved(left)) && left.id !== "." && left.id !== "[") { - warning("W017", this); - } - - this.left = left; - return this; - }; - return x; - } - - // fnparam means that this identifier is being defined as a function - // argument (see identifier()) - // prop means that this identifier is that of an object property - - function optionalidentifier(fnparam, prop) { - if (!state.tokens.next.identifier) { - return; - } - - advance(); - - var curr = state.tokens.curr; - var val = state.tokens.curr.value; - - if (!isReserved(curr)) { - return val; - } - - if (prop) { - if (state.option.inES5()) { - return val; - } - } - - if (fnparam && val === "undefined") { - return val; - } - - // Display an info message about reserved words as properties - // and ES5 but do it only once. - if (prop && !api.getCache("displayed:I002")) { - api.setCache("displayed:I002", true); - warning("I002"); - } - - warning("W024", state.tokens.curr, state.tokens.curr.id); - return val; - } - - // fnparam means that this identifier is being defined as a function - // argument - // prop means that this identifier is that of an object property - function identifier(fnparam, prop) { - var i = optionalidentifier(fnparam, prop); - if (i) { - return i; - } - if (state.tokens.curr.id === "function" && state.tokens.next.id === "(") { - warning("W025"); - } else { - error("E030", state.tokens.next, state.tokens.next.value); - } - } - - - function reachable(s) { - var i = 0, t; - if (state.tokens.next.id !== ";" || noreach) { - return; - } - for (;;) { - t = peek(i); - if (t.reach) { - return; - } - if (t.id !== "(endline)") { - if (t.id === "function") { - if (!state.option.latedef) { - break; - } - - warning("W026", t); - break; - } - - warning("W027", t, t.value, s); - break; - } - i += 1; - } - } - - - function statement(noindent) { - var values; - var i = indent, r, s = scope, t = state.tokens.next; - - if (t.id === ";") { - advance(";"); - return; - } - - // Is this a labelled statement? - var res = isReserved(t); - - // We're being more tolerant here: if someone uses - // a FutureReservedWord as a label, we warn but proceed - // anyway. - - if (res && t.meta && t.meta.isFutureReservedWord && peek().id === ":") { - warning("W024", t, t.id); - res = false; - } - - // detect a destructuring assignment - if (_.has(["[", "{"], t.value)) { - if (lookupBlockType().isDestAssign) { - if (!state.option.inESNext()) { - warning("W104", state.tokens.curr, "destructuring expression"); - } - values = destructuringExpression(); - values.forEach(function (tok) { - isundef(funct, "W117", tok.token, tok.id); - }); - advance("="); - destructuringExpressionMatch(values, expression(10, true)); - advance(";"); - return; - } - } - if (t.identifier && !res && peek().id === ":") { - advance(); - advance(":"); - scope = Object.create(s); - addlabel(t.value, "label"); - - if (!state.tokens.next.labelled && state.tokens.next.value !== "{") { - warning("W028", state.tokens.next, t.value, state.tokens.next.value); - } - - state.tokens.next.label = t.value; - t = state.tokens.next; - } - - // Is it a lonely block? - - if (t.id === "{") { - block(true, true); - return; - } - - // Parse the statement. - - if (!noindent) { - indentation(); - } - r = expression(0, true); - - // Look for the final semicolon. - - if (!t.block) { - if (!state.option.expr && (!r || !r.exps)) { - warning("W030", state.tokens.curr); - } else if (state.option.nonew && r && r.left && r.id === "(" && r.left.id === "new") { - warning("W031", t); - } - - if (state.tokens.next.id !== ";") { - if (!state.option.asi) { - // If this is the last statement in a block that ends on - // the same line *and* option lastsemic is on, ignore the warning. - // Otherwise, complain about missing semicolon. - if (!state.option.lastsemic || state.tokens.next.id !== "}" || - state.tokens.next.line !== state.tokens.curr.line) { - warningAt("W033", state.tokens.curr.line, state.tokens.curr.character); - } - } - } else { - adjacent(state.tokens.curr, state.tokens.next); - advance(";"); - nonadjacent(state.tokens.curr, state.tokens.next); - } - } - - // Restore the indentation. - - indent = i; - scope = s; - return r; - } - - - function statements(startLine) { - var a = [], p; - - while (!state.tokens.next.reach && state.tokens.next.id !== "(end)") { - if (state.tokens.next.id === ";") { - p = peek(); - - if (!p || (p.id !== "(" && p.id !== "[")) { - warning("W032"); - } - - advance(";"); - } else { - a.push(statement(startLine === state.tokens.next.line)); - } - } - return a; - } - - - /* - * read all directives - * recognizes a simple form of asi, but always - * warns, if it is used - */ - function directives() { - var i, p, pn; - - for (;;) { - if (state.tokens.next.id === "(string)") { - p = peek(0); - if (p.id === "(endline)") { - i = 1; - do { - pn = peek(i); - i = i + 1; - } while (pn.id === "(endline)"); - - if (pn.id !== ";") { - if (pn.id !== "(string)" && pn.id !== "(number)" && - pn.id !== "(regexp)" && pn.identifier !== true && - pn.id !== "}") { - break; - } - warning("W033", state.tokens.next); - } else { - p = pn; - } - } else if (p.id === "}") { - // Directive with no other statements, warn about missing semicolon - warning("W033", p); - } else if (p.id !== ";") { - break; - } - - indentation(); - advance(); - if (state.directive[state.tokens.curr.value]) { - warning("W034", state.tokens.curr, state.tokens.curr.value); - } - - if (state.tokens.curr.value === "use strict") { - if (!state.option["(explicitNewcap)"]) - state.option.newcap = true; - state.option.undef = true; - } - - // there's no directive negation, so always set to true - state.directive[state.tokens.curr.value] = true; - - if (p.id === ";") { - advance(";"); - } - continue; - } - break; - } - } - - - /* - * Parses a single block. A block is a sequence of statements wrapped in - * braces. - * - * ordinary - true for everything but function bodies and try blocks. - * stmt - true if block can be a single statement (e.g. in if/for/while). - * isfunc - true if block is a function body - */ - function block(ordinary, stmt, isfunc, isfatarrow) { - var a, - b = inblock, - old_indent = indent, - m, - s = scope, - t, - line, - d; - - inblock = ordinary; - - if (!ordinary || !state.option.funcscope) - scope = Object.create(scope); - - nonadjacent(state.tokens.curr, state.tokens.next); - t = state.tokens.next; - - var metrics = funct["(metrics)"]; - metrics.nestedBlockDepth += 1; - metrics.verifyMaxNestedBlockDepthPerFunction(); - - if (state.tokens.next.id === "{") { - advance("{"); - - // create a new block scope - funct["(blockscope)"].stack(); - - line = state.tokens.curr.line; - if (state.tokens.next.id !== "}") { - indent += state.option.indent; - while (!ordinary && state.tokens.next.from > indent) { - indent += state.option.indent; - } - - if (isfunc) { - m = {}; - for (d in state.directive) { - if (_.has(state.directive, d)) { - m[d] = state.directive[d]; - } - } - directives(); - - if (state.option.strict && funct["(context)"]["(global)"]) { - if (!m["use strict"] && !state.directive["use strict"]) { - warning("E007"); - } - } - } - - a = statements(line); - - metrics.statementCount += a.length; - - if (isfunc) { - state.directive = m; - } - - indent -= state.option.indent; - if (line !== state.tokens.next.line) { - indentation(); - } - } else if (line !== state.tokens.next.line) { - indentation(); - } - advance("}", t); - - funct["(blockscope)"].unstack(); - - indent = old_indent; - } else if (!ordinary) { - if (isfunc) { - m = {}; - if (stmt && !isfatarrow && !state.option.inMoz(true)) { - error("W118", state.tokens.curr, "function closure expressions"); - } - - if (!stmt) { - for (d in state.directive) { - if (_.has(state.directive, d)) { - m[d] = state.directive[d]; - } - } - } - expression(10); - - if (state.option.strict && funct["(context)"]["(global)"]) { - if (!m["use strict"] && !state.directive["use strict"]) { - warning("E007"); - } - } - } else { - error("E021", state.tokens.next, "{", state.tokens.next.value); - } - } else { - - // check to avoid let declaration not within a block - funct["(nolet)"] = true; - - if (!stmt || state.option.curly) { - warning("W116", state.tokens.next, "{", state.tokens.next.value); - } - - noreach = true; - indent += state.option.indent; - // test indentation only if statement is in new line - a = [statement(state.tokens.next.line === state.tokens.curr.line)]; - indent -= state.option.indent; - noreach = false; - - delete funct["(nolet)"]; - } - funct["(verb)"] = null; - if (!ordinary || !state.option.funcscope) scope = s; - inblock = b; - if (ordinary && state.option.noempty && (!a || a.length === 0)) { - warning("W035"); - } - metrics.nestedBlockDepth -= 1; - return a; - } - - - function countMember(m) { - if (membersOnly && typeof membersOnly[m] !== "boolean") { - warning("W036", state.tokens.curr, m); - } - if (typeof member[m] === "number") { - member[m] += 1; - } else { - member[m] = 1; - } - } - - - function note_implied(tkn) { - var name = tkn.value, line = tkn.line, a = implied[name]; - if (typeof a === "function") { - a = false; - } - - if (!a) { - a = [line]; - implied[name] = a; - } else if (a[a.length - 1] !== line) { - a.push(line); - } - } - - - // Build the syntax table by declaring the syntactic elements of the language. - - type("(number)", function () { - return this; - }); - - type("(string)", function () { - return this; - }); - - state.syntax["(identifier)"] = { - type: "(identifier)", - lbp: 0, - identifier: true, - nud: function () { - var v = this.value, - s = scope[v], - f; - - if (typeof s === "function") { - // Protection against accidental inheritance. - s = undefined; - } else if (typeof s === "boolean") { - f = funct; - funct = functions[0]; - addlabel(v, "var"); - s = funct; - funct = f; - } - var block; - if (_.has(funct, "(blockscope)")) { - block = funct["(blockscope)"].getlabel(v); - } - - // The name is in scope and defined in the current function. - if (funct === s || block) { - // Change 'unused' to 'var', and reject labels. - // the name is in a block scope - switch (block ? block[v]["(type)"] : funct[v]) { - case "unused": - if (block) block[v]["(type)"] = "var"; - else funct[v] = "var"; - break; - case "unction": - if (block) block[v]["(type)"] = "function"; - else funct[v] = "function"; - this["function"] = true; - break; - case "function": - this["function"] = true; - break; - case "label": - warning("W037", state.tokens.curr, v); - break; - } - } else if (funct["(global)"]) { - // The name is not defined in the function. If we are in the global - // scope, then we have an undefined variable. - // - // Operators typeof and delete do not raise runtime errors even if - // the base object of a reference is null so no need to display warning - // if we're inside of typeof or delete. - - if (typeof predefined[v] !== "boolean") { - // Attempting to subscript a null reference will throw an - // error, even within the typeof and delete operators - if (!(anonname === "typeof" || anonname === "delete") || - (state.tokens.next && (state.tokens.next.value === "." || - state.tokens.next.value === "["))) { - - // if we're in a list comprehension, variables are declared - // locally and used before being defined. So we check - // the presence of the given variable in the comp array - // before declaring it undefined. - - if (!funct["(comparray)"].check(v)) { - isundef(funct, "W117", state.tokens.curr, v); - } - } - } - - note_implied(state.tokens.curr); - } else { - // If the name is already defined in the current - // function, but not as outer, then there is a scope error. - - switch (funct[v]) { - case "closure": - case "function": - case "var": - case "unused": - warning("W038", state.tokens.curr, v); - break; - case "label": - warning("W037", state.tokens.curr, v); - break; - case "outer": - case "global": - break; - default: - // If the name is defined in an outer function, make an outer entry, - // and if it was unused, make it var. - if (s === true) { - funct[v] = true; - } else if (s === null) { - warning("W039", state.tokens.curr, v); - note_implied(state.tokens.curr); - } else if (typeof s !== "object") { - // Operators typeof and delete do not raise runtime errors even - // if the base object of a reference is null so no need to - // - // display warning if we're inside of typeof or delete. - // Attempting to subscript a null reference will throw an - // error, even within the typeof and delete operators - if (!(anonname === "typeof" || anonname === "delete") || - (state.tokens.next && - (state.tokens.next.value === "." || state.tokens.next.value === "["))) { - - isundef(funct, "W117", state.tokens.curr, v); - } - funct[v] = true; - note_implied(state.tokens.curr); - } else { - switch (s[v]) { - case "function": - case "unction": - this["function"] = true; - s[v] = "closure"; - funct[v] = s["(global)"] ? "global" : "outer"; - break; - case "var": - case "unused": - s[v] = "closure"; - funct[v] = s["(global)"] ? "global" : "outer"; - break; - case "closure": - funct[v] = s["(global)"] ? "global" : "outer"; - break; - case "label": - warning("W037", state.tokens.curr, v); - } - } - } - } - return this; - }, - led: function () { - error("E033", state.tokens.next, state.tokens.next.value); - } - }; - - type("(regexp)", function () { - return this; - }); - - // ECMAScript parser - - delim("(endline)"); - delim("(begin)"); - delim("(end)").reach = true; - delim("(error)").reach = true; - delim("}").reach = true; - delim(")"); - delim("]"); - delim("\"").reach = true; - delim("'").reach = true; - delim(";"); - delim(":").reach = true; - delim("#"); - - reserve("else"); - reserve("case").reach = true; - reserve("catch"); - reserve("default").reach = true; - reserve("finally"); - reservevar("arguments", function (x) { - if (state.directive["use strict"] && funct["(global)"]) { - warning("E008", x); - } - }); - reservevar("eval"); - reservevar("false"); - reservevar("Infinity"); - reservevar("null"); - reservevar("this", function (x) { - if (state.directive["use strict"] && !state.option.validthis && ((funct["(statement)"] && - funct["(name)"].charAt(0) > "Z") || funct["(global)"])) { - warning("W040", x); - } - }); - reservevar("true"); - reservevar("undefined"); - - assignop("=", "assign", 20); - assignop("+=", "assignadd", 20); - assignop("-=", "assignsub", 20); - assignop("*=", "assignmult", 20); - assignop("/=", "assigndiv", 20).nud = function () { - error("E014"); - }; - assignop("%=", "assignmod", 20); - - bitwiseassignop("&=", "assignbitand", 20); - bitwiseassignop("|=", "assignbitor", 20); - bitwiseassignop("^=", "assignbitxor", 20); - bitwiseassignop("<<=", "assignshiftleft", 20); - bitwiseassignop(">>=", "assignshiftright", 20); - bitwiseassignop(">>>=", "assignshiftrightunsigned", 20); - infix(",", function (left, that) { - var expr; - that.exprs = [left]; - if (!comma({peek: true})) { - return that; - } - while (true) { - if (!(expr = expression(10))) { - break; - } - that.exprs.push(expr); - if (state.tokens.next.value !== "," || !comma()) { - break; - } - } - return that; - }, 10, true); - - infix("?", function (left, that) { - increaseComplexityCount(); - that.left = left; - that.right = expression(10); - advance(":"); - that["else"] = expression(10); - return that; - }, 30); - - var orPrecendence = 40; - infix("||", function (left, that) { - increaseComplexityCount(); - that.left = left; - that.right = expression(orPrecendence); - return that; - }, orPrecendence); - infix("&&", "and", 50); - bitwise("|", "bitor", 70); - bitwise("^", "bitxor", 80); - bitwise("&", "bitand", 90); - relation("==", function (left, right) { - var eqnull = state.option.eqnull && (left.value === "null" || right.value === "null"); - - if (!eqnull && state.option.eqeqeq) - warning("W116", this, "===", "=="); - else if (isPoorRelation(left)) - warning("W041", this, "===", left.value); - else if (isPoorRelation(right)) - warning("W041", this, "===", right.value); - - return this; - }); - relation("==="); - relation("!=", function (left, right) { - var eqnull = state.option.eqnull && - (left.value === "null" || right.value === "null"); - - if (!eqnull && state.option.eqeqeq) { - warning("W116", this, "!==", "!="); - } else if (isPoorRelation(left)) { - warning("W041", this, "!==", left.value); - } else if (isPoorRelation(right)) { - warning("W041", this, "!==", right.value); - } - return this; - }); - relation("!=="); - relation("<"); - relation(">"); - relation("<="); - relation(">="); - bitwise("<<", "shiftleft", 120); - bitwise(">>", "shiftright", 120); - bitwise(">>>", "shiftrightunsigned", 120); - infix("in", "in", 120); - infix("instanceof", "instanceof", 120); - infix("+", function (left, that) { - var right = expression(130); - if (left && right && left.id === "(string)" && right.id === "(string)") { - left.value += right.value; - left.character = right.character; - if (!state.option.scripturl && reg.javascriptURL.test(left.value)) { - warning("W050", left); - } - return left; - } - that.left = left; - that.right = right; - return that; - }, 130); - prefix("+", "num"); - prefix("+++", function () { - warning("W007"); - this.right = expression(150); - this.arity = "unary"; - return this; - }); - infix("+++", function (left) { - warning("W007"); - this.left = left; - this.right = expression(130); - return this; - }, 130); - infix("-", "sub", 130); - prefix("-", "neg"); - prefix("---", function () { - warning("W006"); - this.right = expression(150); - this.arity = "unary"; - return this; - }); - infix("---", function (left) { - warning("W006"); - this.left = left; - this.right = expression(130); - return this; - }, 130); - infix("*", "mult", 140); - infix("/", "div", 140); - infix("%", "mod", 140); - - suffix("++", "postinc"); - prefix("++", "preinc"); - state.syntax["++"].exps = true; - - suffix("--", "postdec"); - prefix("--", "predec"); - state.syntax["--"].exps = true; - prefix("delete", function () { - var p = expression(10); - if (!p || (p.id !== "." && p.id !== "[")) { - warning("W051"); - } - this.first = p; - return this; - }).exps = true; - - prefix("~", function () { - if (state.option.bitwise) { - warning("W052", this, "~"); - } - expression(150); - return this; - }); - - prefix("...", function () { - if (!state.option.inESNext()) { - warning("W104", this, "spread/rest operator"); - } - if (!state.tokens.next.identifier) { - error("E030", state.tokens.next, state.tokens.next.value); - } - expression(150); - return this; - }); - - prefix("!", function () { - this.right = expression(150); - this.arity = "unary"; - - if (!this.right) { // '!' followed by nothing? Give up. - quit("E041", this.line || 0); - } - - if (bang[this.right.id] === true) { - warning("W018", this, "!"); - } - return this; - }); - - prefix("typeof", "typeof"); - prefix("new", function () { - var c = expression(155), i; - if (c && c.id !== "function") { - if (c.identifier) { - c["new"] = true; - switch (c.value) { - case "Number": - case "String": - case "Boolean": - case "Math": - case "JSON": - warning("W053", state.tokens.prev, c.value); - break; - case "Function": - if (!state.option.evil) { - warning("W054"); - } - break; - case "Date": - case "RegExp": - break; - default: - if (c.id !== "function") { - i = c.value.substr(0, 1); - if (state.option.newcap && (i < "A" || i > "Z") && !_.has(global, c.value)) { - warning("W055", state.tokens.curr); - } - } - } - } else { - if (c.id !== "." && c.id !== "[" && c.id !== "(") { - warning("W056", state.tokens.curr); - } - } - } else { - if (!state.option.supernew) - warning("W057", this); - } - adjacent(state.tokens.curr, state.tokens.next); - if (state.tokens.next.id !== "(" && !state.option.supernew) { - warning("W058", state.tokens.curr, state.tokens.curr.value); - } - this.first = c; - return this; - }); - state.syntax["new"].exps = true; - - prefix("void").exps = true; - - infix(".", function (left, that) { - adjacent(state.tokens.prev, state.tokens.curr); - nobreak(); - var m = identifier(false, true); - - if (typeof m === "string") { - countMember(m); - } - - that.left = left; - that.right = m; - - if (m && m === "hasOwnProperty" && state.tokens.next.value === "=") { - warning("W001"); - } - - if (left && left.value === "arguments" && (m === "callee" || m === "caller")) { - if (state.option.noarg) - warning("W059", left, m); - else if (state.directive["use strict"]) - error("E008"); - } else if (!state.option.evil && left && left.value === "document" && - (m === "write" || m === "writeln")) { - warning("W060", left); - } - - if (!state.option.evil && (m === "eval" || m === "execScript")) { - warning("W061"); - } - - return that; - }, 160, true); - - infix("(", function (left, that) { - if (state.tokens.prev.id !== "}" && state.tokens.prev.id !== ")") { - nobreak(state.tokens.prev, state.tokens.curr); - } - - nospace(); - if (state.option.immed && left && !left.immed && left.id === "function") { - warning("W062"); - } - - var n = 0; - var p = []; - - if (left) { - if (left.type === "(identifier)") { - if (left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)) { - if ("Number String Boolean Date Object".indexOf(left.value) === -1) { - if (left.value === "Math") { - warning("W063", left); - } else if (state.option.newcap) { - warning("W064", left); - } - } - } - } - } - - if (state.tokens.next.id !== ")") { - for (;;) { - p[p.length] = expression(10); - n += 1; - if (state.tokens.next.id !== ",") { - break; - } - comma(); - } - } - - advance(")"); - nospace(state.tokens.prev, state.tokens.curr); - - if (typeof left === "object") { - if (left.value === "parseInt" && n === 1) { - warning("W065", state.tokens.curr); - } - if (!state.option.evil) { - if (left.value === "eval" || left.value === "Function" || - left.value === "execScript") { - warning("W061", left); - - if (p[0] && [0].id === "(string)") { - addInternalSrc(left, p[0].value); - } - } else if (p[0] && p[0].id === "(string)" && - (left.value === "setTimeout" || - left.value === "setInterval")) { - warning("W066", left); - addInternalSrc(left, p[0].value); - - // window.setTimeout/setInterval - } else if (p[0] && p[0].id === "(string)" && - left.value === "." && - left.left.value === "window" && - (left.right === "setTimeout" || - left.right === "setInterval")) { - warning("W066", left); - addInternalSrc(left, p[0].value); - } - } - if (!left.identifier && left.id !== "." && left.id !== "[" && - left.id !== "(" && left.id !== "&&" && left.id !== "||" && - left.id !== "?") { - warning("W067", left); - } - } - - that.left = left; - return that; - }, 155, true).exps = true; - - prefix("(", function () { - nospace(); - var bracket, brackets = []; - var pn, pn1, i = 0; - var ret; - - do { - pn = peek(i); - i += 1; - pn1 = peek(i); - i += 1; - } while (pn.value !== ")" && pn1.value !== "=>" && pn1.value !== ";" && pn1.type !== "(end)"); - - if (state.tokens.next.id === "function") { - state.tokens.next.immed = true; - } - - var exprs = []; - - if (state.tokens.next.id !== ")") { - for (;;) { - if (pn1.value === "=>" && state.tokens.next.value === "{") { - bracket = state.tokens.next; - bracket.left = destructuringExpression(); - brackets.push(bracket); - for (var t in bracket.left) { - exprs.push(bracket.left[t].token); - } - } else { - exprs.push(expression(10)); - } - if (state.tokens.next.id !== ",") { - break; - } - comma(); - } - } - - advance(")", this); - nospace(state.tokens.prev, state.tokens.curr); - if (state.option.immed && exprs[0] && exprs[0].id === "function") { - if (state.tokens.next.id !== "(" && - (state.tokens.next.id !== "." || (peek().value !== "call" && peek().value !== "apply"))) { - warning("W068", this); - } - } - - if (state.tokens.next.value === "=>") { - return exprs; - } - if (!exprs.length) { - return; - } - if (exprs.length > 1) { - ret = Object.create(state.syntax[","]); - ret.exprs = exprs; - } else { - ret = exprs[0]; - } - if (ret) { - ret.paren = true; - } - return ret; - }); - - application("=>"); - - infix("[", function (left, that) { - nobreak(state.tokens.prev, state.tokens.curr); - nospace(); - var e = expression(10), s; - if (e && e.type === "(string)") { - if (!state.option.evil && (e.value === "eval" || e.value === "execScript")) { - warning("W061", that); - } - - countMember(e.value); - if (!state.option.sub && reg.identifier.test(e.value)) { - s = state.syntax[e.value]; - if (!s || !isReserved(s)) { - warning("W069", state.tokens.prev, e.value); - } - } - } - advance("]", that); - - if (e && e.value === "hasOwnProperty" && state.tokens.next.value === "=") { - warning("W001"); - } - - nospace(state.tokens.prev, state.tokens.curr); - that.left = left; - that.right = e; - return that; - }, 160, true); - - function comprehensiveArrayExpression() { - var res = {}; - res.exps = true; - funct["(comparray)"].stack(); - - res.right = expression(10); - advance("for"); - if (state.tokens.next.value === "each") { - advance("each"); - if (!state.option.inMoz(true)) { - warning("W118", state.tokens.curr, "for each"); - } - } - advance("("); - funct["(comparray)"].setState("define"); - res.left = expression(10); - advance(")"); - if (state.tokens.next.value === "if") { - advance("if"); - advance("("); - funct["(comparray)"].setState("filter"); - res.filter = expression(10); - advance(")"); - } - advance("]"); - funct["(comparray)"].unstack(); - return res; - } - - prefix("[", function () { - var blocktype = lookupBlockType(true); - if (blocktype.isCompArray) { - if (!state.option.inMoz(true)) { - warning("W118", state.tokens.curr, "array comprehension"); - } - return comprehensiveArrayExpression(); - } else if (blocktype.isDestAssign && !state.option.inESNext()) { - warning("W104", state.tokens.curr, "destructuring assignment"); - } - var b = state.tokens.curr.line !== state.tokens.next.line; - this.first = []; - if (b) { - indent += state.option.indent; - if (state.tokens.next.from === indent + state.option.indent) { - indent += state.option.indent; - } - } - while (state.tokens.next.id !== "(end)") { - while (state.tokens.next.id === ",") { - if (!state.option.inES5()) - warning("W070"); - advance(","); - } - if (state.tokens.next.id === "]") { - break; - } - if (b && state.tokens.curr.line !== state.tokens.next.line) { - indentation(); - } - this.first.push(expression(10)); - if (state.tokens.next.id === ",") { - comma({ allowTrailing: true }); - if (state.tokens.next.id === "]" && !state.option.inES5(true)) { - warning("W070", state.tokens.curr); - break; - } - } else { - break; - } - } - if (b) { - indent -= state.option.indent; - indentation(); - } - advance("]", this); - return this; - }, 160); - - - function property_name() { - var id = optionalidentifier(false, true); - - if (!id) { - if (state.tokens.next.id === "(string)") { - id = state.tokens.next.value; - advance(); - } else if (state.tokens.next.id === "(number)") { - id = state.tokens.next.value.toString(); - advance(); - } - } - - if (id === "hasOwnProperty") { - warning("W001"); - } - - return id; - } - - - function functionparams(parsed) { - var curr, next; - var params = []; - var ident; - var tokens = []; - var t; - var pastDefault = false; - - if (parsed) { - if (parsed instanceof Array) { - for (var i in parsed) { - curr = parsed[i]; - if (_.contains(["{", "["], curr.id)) { - for (t in curr.left) { - t = tokens[t]; - if (t.id) { - params.push(t.id); - addlabel(t.id, "unused", t.token); - } - } - } else if (curr.value === "...") { - if (!state.option.inESNext()) { - warning("W104", curr, "spread/rest operator"); - } - continue; - } else { - addlabel(curr.value, "unused", curr); - } - } - return params; - } else { - if (parsed.identifier === true) { - addlabel(parsed.value, "unused", parsed); - return [parsed]; - } - } - } - - next = state.tokens.next; - - advance("("); - nospace(); - - if (state.tokens.next.id === ")") { - advance(")"); - return; - } - - for (;;) { - if (_.contains(["{", "["], state.tokens.next.id)) { - tokens = destructuringExpression(); - for (t in tokens) { - t = tokens[t]; - if (t.id) { - params.push(t.id); - addlabel(t.id, "unused", t.token); - } - } - } else if (state.tokens.next.value === "...") { - if (!state.option.inESNext()) { - warning("W104", state.tokens.next, "spread/rest operator"); - } - advance("..."); - nospace(); - ident = identifier(true); - params.push(ident); - addlabel(ident, "unused", state.tokens.curr); - } else { - ident = identifier(true); - params.push(ident); - addlabel(ident, "unused", state.tokens.curr); - } - - // it is a syntax error to have a regular argument after a default argument - if (pastDefault) { - if (state.tokens.next.id !== "=") { - error("E051", state.tokens.current); - } - } - if (state.tokens.next.id === "=") { - if (!state.option.inESNext()) { - warning("W119", state.tokens.next, "default parameters"); - } - advance("="); - pastDefault = true; - expression(10); - } - if (state.tokens.next.id === ",") { - comma(); - } else { - advance(")", next); - nospace(state.tokens.prev, state.tokens.curr); - return params; - } - } - } - - - function doFunction(name, statement, generator, fatarrowparams) { - var f; - var oldOption = state.option; - var oldIgnored = state.ignored; - var oldScope = scope; - - state.option = Object.create(state.option); - state.ignored = Object.create(state.ignored); - scope = Object.create(scope); - - funct = { - "(name)" : name || "\"" + anonname + "\"", - "(line)" : state.tokens.next.line, - "(character)" : state.tokens.next.character, - "(context)" : funct, - "(breakage)" : 0, - "(loopage)" : 0, - "(metrics)" : createMetrics(state.tokens.next), - "(scope)" : scope, - "(statement)" : statement, - "(tokens)" : {}, - "(blockscope)": funct["(blockscope)"], - "(comparray)" : funct["(comparray)"] - }; - - if (generator) { - funct["(generator)"] = true; - } - - f = funct; - state.tokens.curr.funct = funct; - - functions.push(funct); - - if (name) { - addlabel(name, "function"); - } - - funct["(params)"] = functionparams(fatarrowparams); - - funct["(metrics)"].verifyMaxParametersPerFunction(funct["(params)"]); - - block(false, true, true, fatarrowparams ? true:false); - - if (generator && funct["(generator)"] !== "yielded") { - error("E047", state.tokens.curr); - } - - funct["(metrics)"].verifyMaxStatementsPerFunction(); - funct["(metrics)"].verifyMaxComplexityPerFunction(); - funct["(unusedOption)"] = state.option.unused; - - scope = oldScope; - state.option = oldOption; - state.ignored = oldIgnored; - funct["(last)"] = state.tokens.curr.line; - funct["(lastcharacter)"] = state.tokens.curr.character; - funct = funct["(context)"]; - - return f; - } - - function createMetrics(functionStartToken) { - return { - statementCount: 0, - nestedBlockDepth: -1, - ComplexityCount: 1, - verifyMaxStatementsPerFunction: function () { - if (state.option.maxstatements && - this.statementCount > state.option.maxstatements) { - warning("W071", functionStartToken, this.statementCount); - } - }, - - verifyMaxParametersPerFunction: function (params) { - params = params || []; - - if (state.option.maxparams && params.length > state.option.maxparams) { - warning("W072", functionStartToken, params.length); - } - }, - - verifyMaxNestedBlockDepthPerFunction: function () { - if (state.option.maxdepth && - this.nestedBlockDepth > 0 && - this.nestedBlockDepth === state.option.maxdepth + 1) { - warning("W073", null, this.nestedBlockDepth); - } - }, - - verifyMaxComplexityPerFunction: function () { - var max = state.option.maxcomplexity; - var cc = this.ComplexityCount; - if (max && cc > max) { - warning("W074", functionStartToken, cc); - } - } - }; - } - - function increaseComplexityCount() { - funct["(metrics)"].ComplexityCount += 1; - } - - // Parse assignments that were found instead of conditionals. - // For example: if (a = 1) { ... } - - function checkCondAssignment(expr) { - var id, paren; - if (expr) { - id = expr.id; - paren = expr.paren; - if (id === "," && (expr = expr.exprs[expr.exprs.length - 1])) { - id = expr.id; - paren = paren || expr.paren; - } - } - switch (id) { - case "=": - case "+=": - case "-=": - case "*=": - case "%=": - case "&=": - case "|=": - case "^=": - case "/=": - if (!paren && !state.option.boss) { - warning("W084"); - } - } - } - - - (function (x) { - x.nud = function (isclassdef) { - var b, f, i, p, t, g; - var props = {}; // All properties, including accessors - var tag = ""; - - function saveProperty(name, tkn) { - if (props[name] && _.has(props, name)) - warning("W075", state.tokens.next, i); - else - props[name] = {}; - - props[name].basic = true; - props[name].basictkn = tkn; - } - - function saveSetter(name, tkn) { - if (props[name] && _.has(props, name)) { - if (props[name].basic || props[name].setter) - warning("W075", state.tokens.next, i); - } else { - props[name] = {}; - } - - props[name].setter = true; - props[name].setterToken = tkn; - } - - function saveGetter(name) { - if (props[name] && _.has(props, name)) { - if (props[name].basic || props[name].getter) - warning("W075", state.tokens.next, i); - } else { - props[name] = {}; - } - - props[name].getter = true; - props[name].getterToken = state.tokens.curr; - } - - b = state.tokens.curr.line !== state.tokens.next.line; - if (b) { - indent += state.option.indent; - if (state.tokens.next.from === indent + state.option.indent) { - indent += state.option.indent; - } - } - - for (;;) { - if (state.tokens.next.id === "}") { - break; - } - - if (b) { - indentation(); - } - - if (isclassdef && state.tokens.next.value === "static") { - advance("static"); - tag = "static "; - } - - if (state.tokens.next.value === "get" && peek().id !== ":") { - advance("get"); - - if (!state.option.inES5(!isclassdef)) { - error("E034"); - } - - i = property_name(); - if (!i) { - error("E035"); - } - - // It is a Syntax Error if PropName of MethodDefinition is - // "constructor" and SpecialMethod of MethodDefinition is true. - if (isclassdef && i === "constructor") { - error("E049", state.tokens.next, "class getter method", i); - } - - saveGetter(tag + i); - t = state.tokens.next; - adjacent(state.tokens.curr, state.tokens.next); - f = doFunction(); - p = f["(params)"]; - - if (p) { - warning("W076", t, p[0], i); - } - - adjacent(state.tokens.curr, state.tokens.next); - } else if (state.tokens.next.value === "set" && peek().id !== ":") { - advance("set"); - - if (!state.option.inES5(!isclassdef)) { - error("E034"); - } - - i = property_name(); - if (!i) { - error("E035"); - } - - // It is a Syntax Error if PropName of MethodDefinition is - // "constructor" and SpecialMethod of MethodDefinition is true. - if (isclassdef && i === "constructor") { - error("E049", state.tokens.next, "class setter method", i); - } - - saveSetter(tag + i, state.tokens.next); - t = state.tokens.next; - adjacent(state.tokens.curr, state.tokens.next); - f = doFunction(); - p = f["(params)"]; - - if (!p || p.length !== 1) { - warning("W077", t, i); - } - } else { - g = false; - if (state.tokens.next.value === "*" && state.tokens.next.type === "(punctuator)") { - if (!state.option.inESNext()) { - warning("W104", state.tokens.next, "generator functions"); - } - advance("*"); - g = true; - } - i = property_name(); - saveProperty(tag + i, state.tokens.next); - - if (typeof i !== "string") { - break; - } - - if (state.tokens.next.value === "(") { - if (!state.option.inESNext()) { - warning("W104", state.tokens.curr, "concise methods"); - } - doFunction(i, undefined, g); - } else if (!isclassdef) { - advance(":"); - nonadjacent(state.tokens.curr, state.tokens.next); - expression(10); - } - } - // It is a Syntax Error if PropName of MethodDefinition is "prototype". - if (isclassdef && i === "prototype") { - error("E049", state.tokens.next, "class method", i); - } - - countMember(i); - if (isclassdef) { - tag = ""; - continue; - } - if (state.tokens.next.id === ",") { - comma({ allowTrailing: true, property: true }); - if (state.tokens.next.id === ",") { - warning("W070", state.tokens.curr); - } else if (state.tokens.next.id === "}" && !state.option.inES5(true)) { - warning("W070", state.tokens.curr); - } - } else { - break; - } - } - if (b) { - indent -= state.option.indent; - indentation(); - } - advance("}", this); - - // Check for lonely setters if in the ES5 mode. - if (state.option.inES5()) { - for (var name in props) { - if (_.has(props, name) && props[name].setter && !props[name].getter) { - warning("W078", props[name].setterToken); - } - } - } - return this; - }; - x.fud = function () { - error("E036", state.tokens.curr); - }; - }(delim("{"))); - - function destructuringExpression() { - var id, ids; - var identifiers = []; - if (!state.option.inESNext()) { - warning("W104", state.tokens.curr, "destructuring expression"); - } - var nextInnerDE = function () { - var ident; - if (_.contains(["[", "{"], state.tokens.next.value)) { - ids = destructuringExpression(); - for (var id in ids) { - id = ids[id]; - identifiers.push({ id: id.id, token: id.token }); - } - } else if (state.tokens.next.value === ",") { - identifiers.push({ id: null, token: state.tokens.curr }); - } else { - ident = identifier(); - if (ident) - identifiers.push({ id: ident, token: state.tokens.curr }); - } - }; - if (state.tokens.next.value === "[") { - advance("["); - nextInnerDE(); - while (state.tokens.next.value !== "]") { - advance(","); - nextInnerDE(); - } - advance("]"); - } else if (state.tokens.next.value === "{") { - advance("{"); - id = identifier(); - if (state.tokens.next.value === ":") { - advance(":"); - nextInnerDE(); - } else { - identifiers.push({ id: id, token: state.tokens.curr }); - } - while (state.tokens.next.value !== "}") { - advance(","); - id = identifier(); - if (state.tokens.next.value === ":") { - advance(":"); - nextInnerDE(); - } else { - identifiers.push({ id: id, token: state.tokens.curr }); - } - } - advance("}"); - } - return identifiers; - } - function destructuringExpressionMatch(tokens, value) { - if (value.first) { - _.zip(tokens, value.first).forEach(function (val) { - var token = val[0]; - var value = val[1]; - if (token && value) { - token.first = value; - } else if (token && token.first && !value) { - warning("W080", token.first, token.first.value); - } /* else { - XXX value is discarded: wouldn't it need a warning ? - } */ - }); - } - } - - var conststatement = stmt("const", function (prefix) { - var tokens, value; - // state variable to know if it is a lone identifier, or a destructuring statement. - var lone; - - if (!state.option.inESNext()) { - warning("W104", state.tokens.curr, "const"); - } - - this.first = []; - for (;;) { - var names = []; - nonadjacent(state.tokens.curr, state.tokens.next); - if (_.contains(["{", "["], state.tokens.next.value)) { - tokens = destructuringExpression(); - lone = false; - } else { - tokens = [ { id: identifier(), token: state.tokens.curr } ]; - lone = true; - } - for (var t in tokens) { - t = tokens[t]; - if (funct[t.id] === "const") { - warning("E011", null, t.id); - } - if (funct["(global)"] && predefined[t.id] === false) { - warning("W079", t.token, t.id); - } - if (t.id) { - addlabel(t.id, "const"); - names.push(t.token); - } - } - if (prefix) { - break; - } - - this.first = this.first.concat(names); - - if (state.tokens.next.id !== "=") { - warning("E012", state.tokens.curr, state.tokens.curr.value); - } - - if (state.tokens.next.id === "=") { - nonadjacent(state.tokens.curr, state.tokens.next); - advance("="); - nonadjacent(state.tokens.curr, state.tokens.next); - if (state.tokens.next.id === "undefined") { - warning("W080", state.tokens.prev, state.tokens.prev.value); - } - if (peek(0).id === "=" && state.tokens.next.identifier) { - warning("W120", state.tokens.next, state.tokens.next.value); - } - value = expression(10); - if (lone) { - tokens[0].first = value; - } else { - destructuringExpressionMatch(names, value); - } - } - - if (state.tokens.next.id !== ",") { - break; - } - comma(); - } - return this; - }); - conststatement.exps = true; - var varstatement = stmt("var", function (prefix) { - // JavaScript does not have block scope. It only has function scope. So, - // declaring a variable in a block can have unexpected consequences. - var tokens, lone, value; - - if (funct["(onevar)"] && state.option.onevar) { - warning("W081"); - } else if (!funct["(global)"]) { - funct["(onevar)"] = true; - } - - this.first = []; - for (;;) { - var names = []; - nonadjacent(state.tokens.curr, state.tokens.next); - if (_.contains(["{", "["], state.tokens.next.value)) { - tokens = destructuringExpression(); - lone = false; - } else { - tokens = [ { id: identifier(), token: state.tokens.curr } ]; - lone = true; - } - for (var t in tokens) { - t = tokens[t]; - if (state.option.inESNext() && funct[t.id] === "const") { - warning("E011", null, t.id); - } - if (funct["(global)"] && predefined[t.id] === false) { - warning("W079", t.token, t.id); - } - if (t.id) { - addlabel(t.id, "unused", t.token); - names.push(t.token); - } - } - if (prefix) { - break; - } - - this.first = this.first.concat(names); - - if (state.tokens.next.id === "=") { - nonadjacent(state.tokens.curr, state.tokens.next); - advance("="); - nonadjacent(state.tokens.curr, state.tokens.next); - if (state.tokens.next.id === "undefined") { - warning("W080", state.tokens.prev, state.tokens.prev.value); - } - if (peek(0).id === "=" && state.tokens.next.identifier) { - warning("W120", state.tokens.next, state.tokens.next.value); - } - value = expression(10); - if (lone) { - tokens[0].first = value; - } else { - destructuringExpressionMatch(names, value); - } - } - - if (state.tokens.next.id !== ",") { - break; - } - comma(); - } - return this; - }); - varstatement.exps = true; - var letstatement = stmt("let", function (prefix) { - var tokens, lone, value, letblock; - - if (!state.option.inESNext()) { - warning("W104", state.tokens.curr, "let"); - } - - if (state.tokens.next.value === "(") { - if (!state.option.inMoz(true)) { - warning("W118", state.tokens.next, "let block"); - } - advance("("); - funct["(blockscope)"].stack(); - letblock = true; - } else if (funct["(nolet)"]) { - error("E048", state.tokens.curr); - } - - if (funct["(onevar)"] && state.option.onevar) { - warning("W081"); - } else if (!funct["(global)"]) { - funct["(onevar)"] = true; - } - - this.first = []; - for (;;) { - var names = []; - nonadjacent(state.tokens.curr, state.tokens.next); - if (_.contains(["{", "["], state.tokens.next.value)) { - tokens = destructuringExpression(); - lone = false; - } else { - tokens = [ { id: identifier(), token: state.tokens.curr.value } ]; - lone = true; - } - for (var t in tokens) { - t = tokens[t]; - if (state.option.inESNext() && funct[t.id] === "const") { - warning("E011", null, t.id); - } - if (funct["(global)"] && predefined[t.id] === false) { - warning("W079", t.token, t.id); - } - if (t.id && !funct["(nolet)"]) { - addlabel(t.id, "unused", t.token, true); - names.push(t.token); - } - } - if (prefix) { - break; - } - - this.first = this.first.concat(names); - - if (state.tokens.next.id === "=") { - nonadjacent(state.tokens.curr, state.tokens.next); - advance("="); - nonadjacent(state.tokens.curr, state.tokens.next); - if (state.tokens.next.id === "undefined") { - warning("W080", state.tokens.prev, state.tokens.prev.value); - } - if (peek(0).id === "=" && state.tokens.next.identifier) { - warning("W120", state.tokens.next, state.tokens.next.value); - } - value = expression(10); - if (lone) { - tokens[0].first = value; - } else { - destructuringExpressionMatch(names, value); - } - } - - if (state.tokens.next.id !== ",") { - break; - } - comma(); - } - if (letblock) { - advance(")"); - block(true, true); - this.block = true; - funct["(blockscope)"].unstack(); - } - - return this; - }); - letstatement.exps = true; - - blockstmt("class", function () { - return classdef.call(this, true); - }); - - function classdef(stmt) { - /*jshint validthis:true */ - if (!state.option.inESNext()) { - warning("W104", state.tokens.curr, "class"); - } - if (stmt) { - // BindingIdentifier - this.name = identifier(); - addlabel(this.name, "unused", state.tokens.curr); - } else if (state.tokens.next.identifier && state.tokens.next.value !== "extends") { - // BindingIdentifier(opt) - this.name = identifier(); - } - classtail(this); - return this; - } - - function classtail(c) { - var strictness = state.directive["use strict"]; - - // ClassHeritage(opt) - if (state.tokens.next.value === "extends") { - advance("extends"); - c.heritage = expression(10); - } - - // A ClassBody is always strict code. - state.directive["use strict"] = true; - advance("{"); - // ClassBody(opt) - c.body = state.syntax["{"].nud(true); - state.directive["use strict"] = strictness; - } - - blockstmt("function", function () { - var generator = false; - if (state.tokens.next.value === "*") { - advance("*"); - if (state.option.inESNext(true)) { - generator = true; - } else { - warning("W119", state.tokens.curr, "function*"); - } - } - if (inblock) { - warning("W082", state.tokens.curr); - - } - var i = identifier(); - if (funct[i] === "const") { - warning("E011", null, i); - } - adjacent(state.tokens.curr, state.tokens.next); - addlabel(i, "unction", state.tokens.curr); - - doFunction(i, { statement: true }, generator); - if (state.tokens.next.id === "(" && state.tokens.next.line === state.tokens.curr.line) { - error("E039"); - } - return this; - }); - - prefix("function", function () { - var generator = false; - if (state.tokens.next.value === "*") { - if (!state.option.inESNext()) { - warning("W119", state.tokens.curr, "function*"); - } - advance("*"); - generator = true; - } - var i = optionalidentifier(); - if (i || state.option.gcl) { - adjacent(state.tokens.curr, state.tokens.next); - } else { - nonadjacent(state.tokens.curr, state.tokens.next); - } - doFunction(i, undefined, generator); - if (!state.option.loopfunc && funct["(loopage)"]) { - warning("W083"); - } - return this; - }); - - blockstmt("if", function () { - var t = state.tokens.next; - increaseComplexityCount(); - state.condition = true; - advance("("); - nonadjacent(this, t); - nospace(); - checkCondAssignment(expression(0)); - advance(")", t); - state.condition = false; - nospace(state.tokens.prev, state.tokens.curr); - block(true, true); - if (state.tokens.next.id === "else") { - nonadjacent(state.tokens.curr, state.tokens.next); - advance("else"); - if (state.tokens.next.id === "if" || state.tokens.next.id === "switch") { - statement(true); - } else { - block(true, true); - } - } - return this; - }); - - blockstmt("try", function () { - var b; - - function doCatch() { - var oldScope = scope; - var e; - - advance("catch"); - nonadjacent(state.tokens.curr, state.tokens.next); - advance("("); - - scope = Object.create(oldScope); - - e = state.tokens.next.value; - if (state.tokens.next.type !== "(identifier)") { - e = null; - warning("E030", state.tokens.next, e); - } - - advance(); - - funct = { - "(name)" : "(catch)", - "(line)" : state.tokens.next.line, - "(character)": state.tokens.next.character, - "(context)" : funct, - "(breakage)" : funct["(breakage)"], - "(loopage)" : funct["(loopage)"], - "(scope)" : scope, - "(statement)": false, - "(metrics)" : createMetrics(state.tokens.next), - "(catch)" : true, - "(tokens)" : {}, - "(blockscope)": funct["(blockscope)"], - "(comparray)": funct["(comparray)"] - }; - - if (e) { - addlabel(e, "exception"); - } - - if (state.tokens.next.value === "if") { - if (!state.option.inMoz(true)) { - warning("W118", state.tokens.curr, "catch filter"); - } - advance("if"); - expression(0); - } - - advance(")"); - - state.tokens.curr.funct = funct; - functions.push(funct); - - block(false); - - scope = oldScope; - - funct["(last)"] = state.tokens.curr.line; - funct["(lastcharacter)"] = state.tokens.curr.character; - funct = funct["(context)"]; - } - - block(false); - - while (state.tokens.next.id === "catch") { - increaseComplexityCount(); - if (b && (!state.option.inMoz(true))) { - warning("W118", state.tokens.next, "multiple catch blocks"); - } - doCatch(); - b = true; - } - - if (state.tokens.next.id === "finally") { - advance("finally"); - block(false); - return; - } - - if (!b) { - error("E021", state.tokens.next, "catch", state.tokens.next.value); - } - - return this; - }); - - blockstmt("while", function () { - var t = state.tokens.next; - funct["(breakage)"] += 1; - funct["(loopage)"] += 1; - increaseComplexityCount(); - advance("("); - nonadjacent(this, t); - nospace(); - checkCondAssignment(expression(0)); - advance(")", t); - nospace(state.tokens.prev, state.tokens.curr); - block(true, true); - funct["(breakage)"] -= 1; - funct["(loopage)"] -= 1; - return this; - }).labelled = true; - - blockstmt("with", function () { - var t = state.tokens.next; - if (state.directive["use strict"]) { - error("E010", state.tokens.curr); - } else if (!state.option.withstmt) { - warning("W085", state.tokens.curr); - } - - advance("("); - nonadjacent(this, t); - nospace(); - expression(0); - advance(")", t); - nospace(state.tokens.prev, state.tokens.curr); - block(true, true); - - return this; - }); - - blockstmt("switch", function () { - var t = state.tokens.next, - g = false; - funct["(breakage)"] += 1; - advance("("); - nonadjacent(this, t); - nospace(); - checkCondAssignment(expression(0)); - advance(")", t); - nospace(state.tokens.prev, state.tokens.curr); - nonadjacent(state.tokens.curr, state.tokens.next); - t = state.tokens.next; - advance("{"); - nonadjacent(state.tokens.curr, state.tokens.next); - indent += state.option.indent; - this.cases = []; - - for (;;) { - switch (state.tokens.next.id) { - case "case": - switch (funct["(verb)"]) { - case "yield": - case "break": - case "case": - case "continue": - case "return": - case "switch": - case "throw": - break; - default: - // You can tell JSHint that you don't use break intentionally by - // adding a comment /* falls through */ on a line just before - // the next `case`. - if (!reg.fallsThrough.test(state.lines[state.tokens.next.line - 2])) { - warning("W086", state.tokens.curr, "case"); - } - } - indentation(-state.option.indent); - advance("case"); - this.cases.push(expression(20)); - increaseComplexityCount(); - g = true; - advance(":"); - funct["(verb)"] = "case"; - break; - case "default": - switch (funct["(verb)"]) { - case "yield": - case "break": - case "continue": - case "return": - case "throw": - break; - default: - // Do not display a warning if 'default' is the first statement or if - // there is a special /* falls through */ comment. - if (this.cases.length) { - if (!reg.fallsThrough.test(state.lines[state.tokens.next.line - 2])) { - warning("W086", state.tokens.curr, "default"); - } - } - } - indentation(-state.option.indent); - advance("default"); - g = true; - advance(":"); - break; - case "}": - indent -= state.option.indent; - indentation(); - advance("}", t); - funct["(breakage)"] -= 1; - funct["(verb)"] = undefined; - return; - case "(end)": - error("E023", state.tokens.next, "}"); - return; - default: - if (g) { - switch (state.tokens.curr.id) { - case ",": - error("E040"); - return; - case ":": - g = false; - statements(); - break; - default: - error("E025", state.tokens.curr); - return; - } - } else { - if (state.tokens.curr.id === ":") { - advance(":"); - error("E024", state.tokens.curr, ":"); - statements(); - } else { - error("E021", state.tokens.next, "case", state.tokens.next.value); - return; - } - } - } - } - }).labelled = true; - - stmt("debugger", function () { - if (!state.option.debug) { - warning("W087"); - } - return this; - }).exps = true; - - (function () { - var x = stmt("do", function () { - funct["(breakage)"] += 1; - funct["(loopage)"] += 1; - increaseComplexityCount(); - - this.first = block(true, true); - advance("while"); - var t = state.tokens.next; - nonadjacent(state.tokens.curr, t); - advance("("); - nospace(); - checkCondAssignment(expression(0)); - advance(")", t); - nospace(state.tokens.prev, state.tokens.curr); - funct["(breakage)"] -= 1; - funct["(loopage)"] -= 1; - return this; - }); - x.labelled = true; - x.exps = true; - }()); - - blockstmt("for", function () { - var s, t = state.tokens.next; - var letscope = false; - var foreachtok = null; - - if (t.value === "each") { - foreachtok = t; - advance("each"); - if (!state.option.inMoz(true)) { - warning("W118", state.tokens.curr, "for each"); - } - } - - funct["(breakage)"] += 1; - funct["(loopage)"] += 1; - increaseComplexityCount(); - advance("("); - nonadjacent(this, t); - nospace(); - - // what kind of for(…) statement it is? for(…of…)? for(…in…)? for(…;…;…)? - var nextop; // contains the token of the "in" or "of" operator - var i = 0; - var inof = ["in", "of"]; - do { - nextop = peek(i); - ++i; - } while (!_.contains(inof, nextop.value) && nextop.value !== ";" && - nextop.type !== "(end)"); - - // if we're in a for (… in|of …) statement - if (_.contains(inof, nextop.value)) { - if (!state.option.inESNext() && nextop.value === "of") { - error("W104", nextop, "for of"); - } - if (state.tokens.next.id === "var") { - advance("var"); - state.syntax["var"].fud.call(state.syntax["var"].fud, true); - } else if (state.tokens.next.id === "let") { - advance("let"); - // create a new block scope - letscope = true; - funct["(blockscope)"].stack(); - state.syntax["let"].fud.call(state.syntax["let"].fud, true); - } else { - switch (funct[state.tokens.next.value]) { - case "unused": - funct[state.tokens.next.value] = "var"; - break; - case "var": - break; - default: - if (!funct["(blockscope)"].getlabel(state.tokens.next.value)) - warning("W088", state.tokens.next, state.tokens.next.value); - } - advance(); - } - advance(nextop.value); - expression(20); - advance(")", t); - s = block(true, true); - if (state.option.forin && s && (s.length > 1 || typeof s[0] !== "object" || - s[0].value !== "if")) { - warning("W089", this); - } - funct["(breakage)"] -= 1; - funct["(loopage)"] -= 1; - } else { - if (foreachtok) { - error("E045", foreachtok); - } - if (state.tokens.next.id !== ";") { - if (state.tokens.next.id === "var") { - advance("var"); - state.syntax["var"].fud.call(state.syntax["var"].fud); - } else if (state.tokens.next.id === "let") { - advance("let"); - // create a new block scope - letscope = true; - funct["(blockscope)"].stack(); - state.syntax["let"].fud.call(state.syntax["let"].fud); - } else { - for (;;) { - expression(0, "for"); - if (state.tokens.next.id !== ",") { - break; - } - comma(); - } - } - } - nolinebreak(state.tokens.curr); - advance(";"); - if (state.tokens.next.id !== ";") { - checkCondAssignment(expression(0)); - } - nolinebreak(state.tokens.curr); - advance(";"); - if (state.tokens.next.id === ";") { - error("E021", state.tokens.next, ")", ";"); - } - if (state.tokens.next.id !== ")") { - for (;;) { - expression(0, "for"); - if (state.tokens.next.id !== ",") { - break; - } - comma(); - } - } - advance(")", t); - nospace(state.tokens.prev, state.tokens.curr); - block(true, true); - funct["(breakage)"] -= 1; - funct["(loopage)"] -= 1; - - } - // unstack loop blockscope - if (letscope) { - funct["(blockscope)"].unstack(); - } - return this; - }).labelled = true; - - - stmt("break", function () { - var v = state.tokens.next.value; - - if (funct["(breakage)"] === 0) - warning("W052", state.tokens.next, this.value); - - if (!state.option.asi) - nolinebreak(this); - - if (state.tokens.next.id !== ";" && !state.tokens.next.reach) { - if (state.tokens.curr.line === state.tokens.next.line) { - if (funct[v] !== "label") { - warning("W090", state.tokens.next, v); - } else if (scope[v] !== funct) { - warning("W091", state.tokens.next, v); - } - this.first = state.tokens.next; - advance(); - } - } - reachable("break"); - return this; - }).exps = true; - - - stmt("continue", function () { - var v = state.tokens.next.value; - - if (funct["(breakage)"] === 0) - warning("W052", state.tokens.next, this.value); - - if (!state.option.asi) - nolinebreak(this); - - if (state.tokens.next.id !== ";" && !state.tokens.next.reach) { - if (state.tokens.curr.line === state.tokens.next.line) { - if (funct[v] !== "label") { - warning("W090", state.tokens.next, v); - } else if (scope[v] !== funct) { - warning("W091", state.tokens.next, v); - } - this.first = state.tokens.next; - advance(); - } - } else if (!funct["(loopage)"]) { - warning("W052", state.tokens.next, this.value); - } - reachable("continue"); - return this; - }).exps = true; - - - stmt("return", function () { - if (this.line === state.tokens.next.line) { - if (state.tokens.next.id === "(regexp)") - warning("W092"); - - if (state.tokens.next.id !== ";" && !state.tokens.next.reach) { - nonadjacent(state.tokens.curr, state.tokens.next); - this.first = expression(0); - - if (this.first && - this.first.type === "(punctuator)" && this.first.value === "=" && !state.option.boss) { - warningAt("W093", this.first.line, this.first.character); - } - } - } else { - if (state.tokens.next.type === "(punctuator)" && - ["[", "{", "+", "-"].indexOf(state.tokens.next.value) > -1) { - nolinebreak(this); // always warn (Line breaking error) - } - } - reachable("return"); - return this; - }).exps = true; - - (function (x) { - x.exps = true; - x.lbp = 25; - }(prefix("yield", function () { - var prev = state.tokens.prev; - if (state.option.inESNext(true) && !funct["(generator)"]) { - error("E046", state.tokens.curr, "yield"); - } else if (!state.option.inESNext()) { - warning("W104", state.tokens.curr, "yield"); - } - funct["(generator)"] = "yielded"; - if (this.line === state.tokens.next.line || !state.option.inMoz(true)) { - if (state.tokens.next.id === "(regexp)") - warning("W092"); - - if (state.tokens.next.id !== ";" && !state.tokens.next.reach && state.tokens.next.nud) { - nobreaknonadjacent(state.tokens.curr, state.tokens.next); - this.first = expression(10); - - if (this.first.type === "(punctuator)" && this.first.value === "=" && !state.option.boss) { - warningAt("W093", this.first.line, this.first.character); - } - } - - if (state.option.inMoz(true) && state.tokens.next.id !== ")" && - (prev.lbp > 30 || (!prev.assign && !isEndOfExpr()) || prev.id === "yield")) { - error("E050", this); - } - } else if (!state.option.asi) { - nolinebreak(this); // always warn (Line breaking error) - } - return this; - }))); - - - stmt("throw", function () { - nolinebreak(this); - nonadjacent(state.tokens.curr, state.tokens.next); - this.first = expression(20); - reachable("throw"); - return this; - }).exps = true; - - stmt("import", function () { - if (!state.option.inESNext()) { - warning("W119", state.tokens.curr, "import"); - } - - if (state.tokens.next.identifier) { - this.name = identifier(); - addlabel(this.name, "unused", state.tokens.curr); - } else { - advance("{"); - for (;;) { - var importName; - if (state.tokens.next.type === "default") { - importName = "default"; - advance("default"); - } else { - importName = identifier(); - } - if (state.tokens.next.value === "as") { - advance("as"); - importName = identifier(); - } - addlabel(importName, "unused", state.tokens.curr); - - if (state.tokens.next.value === ",") { - advance(","); - } else if (state.tokens.next.value === "}") { - advance("}"); - break; - } else { - error("E024", state.tokens.next, state.tokens.next.value); - break; - } - } - } - - advance("from"); - advance("(string)"); - return this; - }).exps = true; - - stmt("export", function () { - if (!state.option.inESNext()) { - warning("W119", state.tokens.curr, "export"); - } - - if (state.tokens.next.type === "default") { - advance("default"); - if (state.tokens.next.id === "function" || state.tokens.next.id === "class") { - this.block = true; - } - this.exportee = expression(10); - - return this; - } - - if (state.tokens.next.value === "{") { - advance("{"); - for (;;) { - identifier(); - - if (state.tokens.next.value === ",") { - advance(","); - } else if (state.tokens.next.value === "}") { - advance("}"); - break; - } else { - error("E024", state.tokens.next, state.tokens.next.value); - break; - } - } - return this; - } - - if (state.tokens.next.id === "var") { - advance("var"); - state.syntax["var"].fud.call(state.syntax["var"].fud); - } else if (state.tokens.next.id === "let") { - advance("let"); - state.syntax["let"].fud.call(state.syntax["let"].fud); - } else if (state.tokens.next.id === "const") { - advance("const"); - state.syntax["const"].fud.call(state.syntax["const"].fud); - } else if (state.tokens.next.id === "function") { - this.block = true; - advance("function"); - state.syntax["function"].fud(); - } else if (state.tokens.next.id === "class") { - this.block = true; - advance("class"); - state.syntax["class"].fud(); - } else { - error("E024", state.tokens.next, state.tokens.next.value); - } - - return this; - }).exps = true; - - // Future Reserved Words - - FutureReservedWord("abstract"); - FutureReservedWord("boolean"); - FutureReservedWord("byte"); - FutureReservedWord("char"); - FutureReservedWord("class", { es5: true, nud: classdef }); - FutureReservedWord("double"); - FutureReservedWord("enum", { es5: true }); - FutureReservedWord("export", { es5: true }); - FutureReservedWord("extends", { es5: true }); - FutureReservedWord("final"); - FutureReservedWord("float"); - FutureReservedWord("goto"); - FutureReservedWord("implements", { es5: true, strictOnly: true }); - FutureReservedWord("import", { es5: true }); - FutureReservedWord("int"); - FutureReservedWord("interface", { es5: true, strictOnly: true }); - FutureReservedWord("long"); - FutureReservedWord("native"); - FutureReservedWord("package", { es5: true, strictOnly: true }); - FutureReservedWord("private", { es5: true, strictOnly: true }); - FutureReservedWord("protected", { es5: true, strictOnly: true }); - FutureReservedWord("public", { es5: true, strictOnly: true }); - FutureReservedWord("short"); - FutureReservedWord("static", { es5: true, strictOnly: true }); - FutureReservedWord("super", { es5: true }); - FutureReservedWord("synchronized"); - FutureReservedWord("throws"); - FutureReservedWord("transient"); - FutureReservedWord("volatile"); - - // this function is used to determine wether a squarebracket or a curlybracket - // expression is a comprehension array, destructuring assignment or a json value. - - var lookupBlockType = function () { - var pn, pn1; - var i = 0; - var bracketStack = 0; - var ret = {}; - if (_.contains(["[", "{"], state.tokens.curr.value)) - bracketStack += 1; - if (_.contains(["[", "{"], state.tokens.next.value)) - bracketStack += 1; - if (_.contains(["]", "}"], state.tokens.next.value)) - bracketStack -= 1; - do { - pn = peek(i); - pn1 = peek(i + 1); - i = i + 1; - if (_.contains(["[", "{"], pn.value)) { - bracketStack += 1; - } else if (_.contains(["]", "}"], pn.value)) { - bracketStack -= 1; - } - if (pn.identifier && pn.value === "for" && bracketStack === 1) { - ret.isCompArray = true; - ret.notJson = true; - break; - } - if (_.contains(["}", "]"], pn.value) && pn1.value === "=") { - ret.isDestAssign = true; - ret.notJson = true; - break; - } - if (pn.value === ";") { - ret.isBlock = true; - ret.notJson = true; - } - } while (bracketStack > 0 && pn.id !== "(end)" && i < 15); - return ret; - }; - - // Check whether this function has been reached for a destructuring assign with undeclared values - function destructuringAssignOrJsonValue() { - // lookup for the assignment (esnext only) - // if it has semicolons, it is a block, so go parse it as a block - // or it's not a block, but there are assignments, check for undeclared variables - - var block = lookupBlockType(); - if (block.notJson) { - if (!state.option.inESNext() && block.isDestAssign) { - warning("W104", state.tokens.curr, "destructuring assignment"); - } - statements(); - // otherwise parse json value - } else { - state.option.laxbreak = true; - state.jsonMode = true; - jsonValue(); - } - } - - // array comprehension parsing function - // parses and defines the three states of the list comprehension in order - // to avoid defining global variables, but keeping them to the list comprehension scope - // only. The order of the states are as follows: - // * "use" which will be the returned iterative part of the list comprehension - // * "define" which will define the variables local to the list comprehension - // * "filter" which will help filter out values - - var arrayComprehension = function () { - var CompArray = function () { - this.mode = "use"; - this.variables = []; - }; - var _carrays = []; - var _current; - function declare(v) { - var l = _current.variables.filter(function (elt) { - // if it has, change its undef state - if (elt.value === v) { - elt.undef = false; - return v; - } - }).length; - return l !== 0; - } - function use(v) { - var l = _current.variables.filter(function (elt) { - // and if it has been defined - if (elt.value === v && !elt.undef) { - if (elt.unused === true) { - elt.unused = false; - } - return v; - } - }).length; - // otherwise we warn about it - return (l === 0); - } - return {stack: function () { - _current = new CompArray(); - _carrays.push(_current); - }, - unstack: function () { - _current.variables.filter(function (v) { - if (v.unused) - warning("W098", v.token, v.value); - if (v.undef) - isundef(v.funct, "W117", v.token, v.value); - }); - _carrays.splice(_carrays[_carrays.length - 1], 1); - _current = _carrays[_carrays.length - 1]; - }, - setState: function (s) { - if (_.contains(["use", "define", "filter"], s)) - _current.mode = s; - }, - check: function (v) { - // When we are in "use" state of the list comp, we enqueue that var - if (_current && _current.mode === "use") { - _current.variables.push({funct: funct, - token: state.tokens.curr, - value: v, - undef: true, - unused: false}); - return true; - // When we are in "define" state of the list comp, - } else if (_current && _current.mode === "define") { - // check if the variable has been used previously - if (!declare(v)) { - _current.variables.push({funct: funct, - token: state.tokens.curr, - value: v, - undef: false, - unused: true}); - } - return true; - // When we are in "filter" state, - } else if (_current && _current.mode === "filter") { - // we check whether current variable has been declared - if (use(v)) { - // if not we warn about it - isundef(funct, "W117", state.tokens.curr, v); - } - return true; - } - return false; - } - }; - }; - - - // Parse JSON - - function jsonValue() { - - function jsonObject() { - var o = {}, t = state.tokens.next; - advance("{"); - if (state.tokens.next.id !== "}") { - for (;;) { - if (state.tokens.next.id === "(end)") { - error("E026", state.tokens.next, t.line); - } else if (state.tokens.next.id === "}") { - warning("W094", state.tokens.curr); - break; - } else if (state.tokens.next.id === ",") { - error("E028", state.tokens.next); - } else if (state.tokens.next.id !== "(string)") { - warning("W095", state.tokens.next, state.tokens.next.value); - } - if (o[state.tokens.next.value] === true) { - warning("W075", state.tokens.next, state.tokens.next.value); - } else if ((state.tokens.next.value === "__proto__" && - !state.option.proto) || (state.tokens.next.value === "__iterator__" && - !state.option.iterator)) { - warning("W096", state.tokens.next, state.tokens.next.value); - } else { - o[state.tokens.next.value] = true; - } - advance(); - advance(":"); - jsonValue(); - if (state.tokens.next.id !== ",") { - break; - } - advance(","); - } - } - advance("}"); - } - - function jsonArray() { - var t = state.tokens.next; - advance("["); - if (state.tokens.next.id !== "]") { - for (;;) { - if (state.tokens.next.id === "(end)") { - error("E027", state.tokens.next, t.line); - } else if (state.tokens.next.id === "]") { - warning("W094", state.tokens.curr); - break; - } else if (state.tokens.next.id === ",") { - error("E028", state.tokens.next); - } - jsonValue(); - if (state.tokens.next.id !== ",") { - break; - } - advance(","); - } - } - advance("]"); - } - - switch (state.tokens.next.id) { - case "{": - jsonObject(); - break; - case "[": - jsonArray(); - break; - case "true": - case "false": - case "null": - case "(number)": - case "(string)": - advance(); - break; - case "-": - advance("-"); - if (state.tokens.curr.character !== state.tokens.next.from) { - warning("W011", state.tokens.curr); - } - adjacent(state.tokens.curr, state.tokens.next); - advance("(number)"); - break; - default: - error("E003", state.tokens.next); - } - } - - var blockScope = function () { - var _current = {}; - var _variables = [_current]; - - function _checkBlockLabels() { - for (var t in _current) { - if (_current[t]["(type)"] === "unused") { - if (state.option.unused) { - var tkn = _current[t]["(token)"]; - var line = tkn.line; - var chr = tkn.character; - warningAt("W098", line, chr, t); - } - } - } - } - - return { - stack: function () { - _current = {}; - _variables.push(_current); - }, - - unstack: function () { - _checkBlockLabels(); - _variables.splice(_variables.length - 1, 1); - _current = _.last(_variables); - }, - - getlabel: function (l) { - for (var i = _variables.length - 1 ; i >= 0; --i) { - if (_.has(_variables[i], l)) { - return _variables[i]; - } - } - }, - - current: { - has: function (t) { - return _.has(_current, t); - }, - add: function (t, type, tok) { - _current[t] = { "(type)" : type, - "(token)": tok }; - } - } - }; - }; - - // The actual JSHINT function itself. - var itself = function (s, o, g) { - var i, k, x; - var optionKeys; - var newOptionObj = {}; - var newIgnoredObj = {}; - - state.reset(); - - if (o && o.scope) { - JSHINT.scope = o.scope; - } else { - JSHINT.errors = []; - JSHINT.undefs = []; - JSHINT.internals = []; - JSHINT.blacklist = {}; - JSHINT.scope = "(main)"; - } - - predefined = Object.create(null); - combine(predefined, vars.ecmaIdentifiers); - combine(predefined, vars.reservedVars); - - combine(predefined, g || {}); - - declared = Object.create(null); - exported = Object.create(null); - - function each(obj, cb) { - if (!obj) - return; - - if (!Array.isArray(obj) && typeof obj === "object") - obj = Object.keys(obj); - - obj.forEach(cb); - } - - if (o) { - each(o.predef || null, function (item) { - var slice, prop; - - if (item[0] === "-") { - slice = item.slice(1); - JSHINT.blacklist[slice] = slice; - } else { - prop = Object.getOwnPropertyDescriptor(o.predef, item); - predefined[item] = prop ? prop.value : false; - } - }); - - each(o.exported || null, function (item) { - exported[item] = true; - }); - - delete o.predef; - delete o.exported; - - optionKeys = Object.keys(o); - for (x = 0; x < optionKeys.length; x++) { - if (/^-W\d{3}$/g.test(optionKeys[x])) { - newIgnoredObj[optionKeys[x].slice(1)] = true; - } else { - newOptionObj[optionKeys[x]] = o[optionKeys[x]]; - - if (optionKeys[x] === "newcap" && o[optionKeys[x]] === false) - newOptionObj["(explicitNewcap)"] = true; - - if (optionKeys[x] === "indent") - newOptionObj["(explicitIndent)"] = o[optionKeys[x]] === false ? false : true; - } - } - } - - state.option = newOptionObj; - state.ignored = newIgnoredObj; - - state.option.indent = state.option.indent || 4; - state.option.maxerr = state.option.maxerr || 50; - - indent = 1; - global = Object.create(predefined); - scope = global; - funct = { - "(global)": true, - "(name)": "(global)", - "(scope)": scope, - "(breakage)": 0, - "(loopage)": 0, - "(tokens)": {}, - "(metrics)": createMetrics(state.tokens.next), - "(blockscope)": blockScope(), - "(comparray)": arrayComprehension() - }; - functions = [funct]; - urls = []; - stack = null; - member = {}; - membersOnly = null; - implied = {}; - inblock = false; - lookahead = []; - warnings = 0; - unuseds = []; - - if (!isString(s) && !Array.isArray(s)) { - errorAt("E004", 0); - return false; - } - - api = { - get isJSON() { - return state.jsonMode; - }, - - getOption: function (name) { - return state.option[name] || null; - }, - - getCache: function (name) { - return state.cache[name]; - }, - - setCache: function (name, value) { - state.cache[name] = value; - }, - - warn: function (code, data) { - warningAt.apply(null, [ code, data.line, data.char ].concat(data.data)); - }, - - on: function (names, listener) { - names.split(" ").forEach(function (name) { - emitter.on(name, listener); - }.bind(this)); - } - }; - - emitter.removeAllListeners(); - (extraModules || []).forEach(function (func) { - func(api); - }); - - state.tokens.prev = state.tokens.curr = state.tokens.next = state.syntax["(begin)"]; - - lex = new Lexer(s); - - lex.on("warning", function (ev) { - warningAt.apply(null, [ ev.code, ev.line, ev.character].concat(ev.data)); - }); - - lex.on("error", function (ev) { - errorAt.apply(null, [ ev.code, ev.line, ev.character ].concat(ev.data)); - }); - - lex.on("fatal", function (ev) { - quit("E041", ev.line, ev.from); - }); - - lex.on("Identifier", function (ev) { - emitter.emit("Identifier", ev); - }); - - lex.on("String", function (ev) { - emitter.emit("String", ev); - }); - - lex.on("Number", function (ev) { - emitter.emit("Number", ev); - }); - - lex.start(); - - // Check options - for (var name in o) { - if (_.has(o, name)) { - checkOption(name, state.tokens.curr); - } - } - - assume(); - - // combine the passed globals after we've assumed all our options - combine(predefined, g || {}); - - //reset values - comma.first = true; - - try { - advance(); - switch (state.tokens.next.id) { - case "{": - case "[": - destructuringAssignOrJsonValue(); - break; - default: - directives(); - - if (state.directive["use strict"]) { - if (!state.option.globalstrict && !state.option.node) { - warning("W097", state.tokens.prev); - } - } - - statements(); - } - advance((state.tokens.next && state.tokens.next.value !== ".") ? "(end)" : undefined); - funct["(blockscope)"].unstack(); - - var markDefined = function (name, context) { - do { - if (typeof context[name] === "string") { - // JSHINT marks unused variables as 'unused' and - // unused function declaration as 'unction'. This - // code changes such instances back 'var' and - // 'closure' so that the code in JSHINT.data() - // doesn't think they're unused. - - if (context[name] === "unused") - context[name] = "var"; - else if (context[name] === "unction") - context[name] = "closure"; - - return true; - } - - context = context["(context)"]; - } while (context); - - return false; - }; - - var clearImplied = function (name, line) { - if (!implied[name]) - return; - - var newImplied = []; - for (var i = 0; i < implied[name].length; i += 1) { - if (implied[name][i] !== line) - newImplied.push(implied[name][i]); - } - - if (newImplied.length === 0) - delete implied[name]; - else - implied[name] = newImplied; - }; - - var warnUnused = function (name, tkn, type, unused_opt) { - var line = tkn.line; - var chr = tkn.character; - - if (unused_opt === undefined) { - unused_opt = state.option.unused; - } - - if (unused_opt === true) { - unused_opt = "last-param"; - } - - var warnable_types = { - "vars": ["var"], - "last-param": ["var", "param"], - "strict": ["var", "param", "last-param"] - }; - - if (unused_opt) { - if (warnable_types[unused_opt] && warnable_types[unused_opt].indexOf(type) !== -1) { - warningAt("W098", line, chr, name); - } - } - - unuseds.push({ - name: name, - line: line, - character: chr - }); - }; - - var checkUnused = function (func, key) { - var type = func[key]; - var tkn = func["(tokens)"][key]; - - if (key.charAt(0) === "(") - return; - - if (type !== "unused" && type !== "unction") - return; - - // Params are checked separately from other variables. - if (func["(params)"] && func["(params)"].indexOf(key) !== -1) - return; - - // Variable is in global scope and defined as exported. - if (func["(global)"] && _.has(exported, key)) { - return; - } - - warnUnused(key, tkn, "var"); - }; - - // Check queued 'x is not defined' instances to see if they're still undefined. - for (i = 0; i < JSHINT.undefs.length; i += 1) { - k = JSHINT.undefs[i].slice(0); - - if (markDefined(k[2].value, k[0])) { - clearImplied(k[2].value, k[2].line); - } else if (state.option.undef) { - warning.apply(warning, k.slice(1)); - } - } - - functions.forEach(function (func) { - if (func["(unusedOption)"] === false) { - return; - } - - for (var key in func) { - if (_.has(func, key)) { - checkUnused(func, key); - } - } - - if (!func["(params)"]) - return; - - var params = func["(params)"].slice(); - var param = params.pop(); - var type, unused_opt; - - while (param) { - type = func[param]; - unused_opt = func["(unusedOption)"] || state.option.unused; - unused_opt = unused_opt === true ? "last-param" : unused_opt; - - // 'undefined' is a special case for (function (window, undefined) { ... })(); - // patterns. - - if (param === "undefined") - return; - - if (type === "unused" || type === "unction") { - warnUnused(param, func["(tokens)"][param], "param", func["(unusedOption)"]); - } else if (unused_opt === "last-param") { - return; - } - - param = params.pop(); - } - }); - - for (var key in declared) { - if (_.has(declared, key) && !_.has(global, key)) { - warnUnused(key, declared[key], "var"); - } - } - - } catch (err) { - if (err && err.name === "JSHintError") { - var nt = state.tokens.next || {}; - JSHINT.errors.push({ - scope : "(main)", - raw : err.raw, - code : err.code, - reason : err.message, - line : err.line || nt.line, - character : err.character || nt.from - }, null); - } else { - throw err; - } - } - - // Loop over the listed "internals", and check them as well. - - if (JSHINT.scope === "(main)") { - o = o || {}; - - for (i = 0; i < JSHINT.internals.length; i += 1) { - k = JSHINT.internals[i]; - o.scope = k.elem; - itself(k.value, o, g); - } - } - - return JSHINT.errors.length === 0; - }; - - // Modules. - itself.addModule = function (func) { - extraModules.push(func); - }; - - itself.addModule(style.register); - - // Data summary. - itself.data = function () { - var data = { - functions: [], - options: state.option - }; - var implieds = []; - var members = []; - var fu, f, i, j, n, globals; - - if (itself.errors.length) { - data.errors = itself.errors; - } - - if (state.jsonMode) { - data.json = true; - } - - for (n in implied) { - if (_.has(implied, n)) { - implieds.push({ - name: n, - line: implied[n] - }); - } - } - - if (implieds.length > 0) { - data.implieds = implieds; - } - - if (urls.length > 0) { - data.urls = urls; - } - - globals = Object.keys(scope); - if (globals.length > 0) { - data.globals = globals; - } - - for (i = 1; i < functions.length; i += 1) { - f = functions[i]; - fu = {}; - - for (j = 0; j < functionicity.length; j += 1) { - fu[functionicity[j]] = []; - } - - for (j = 0; j < functionicity.length; j += 1) { - if (fu[functionicity[j]].length === 0) { - delete fu[functionicity[j]]; - } - } - - fu.name = f["(name)"]; - fu.param = f["(params)"]; - fu.line = f["(line)"]; - fu.character = f["(character)"]; - fu.last = f["(last)"]; - fu.lastcharacter = f["(lastcharacter)"]; - data.functions.push(fu); - } - - if (unuseds.length > 0) { - data.unused = unuseds; - } - - members = []; - for (n in member) { - if (typeof member[n] === "number") { - data.member = member; - break; - } - } - - return data; - }; - - itself.jshint = itself; - - return itself; + "use strict"; + + var anonname, // The guessed name for anonymous functions. + api, // Extension API + + // These are operators that should not be used with the ! operator. + bang = { + "<" : true, + "<=" : true, + "==" : true, + "===": true, + "!==": true, + "!=" : true, + ">" : true, + ">=" : true, + "+" : true, + "-" : true, + "*" : true, + "/" : true, + "%" : true + }, + + // These are the JSHint boolean options. + boolOptions = { + asi : true, // if automatic semicolon insertion should be tolerated + bitwise : true, // if bitwise operators should not be allowed + boss : true, // if advanced usage of assignments should be allowed + browser : true, // if the standard browser globals should be predefined + camelcase : true, // if identifiers should be required in camel case + couch : true, // if CouchDB globals should be predefined + curly : true, // if curly braces around all blocks should be required + debug : true, // if debugger statements should be allowed + devel : true, // if logging globals should be predefined (console, alert, etc.) + dojo : true, // if Dojo Toolkit globals should be predefined + eqeqeq : true, // if === should be required + eqnull : true, // if == null comparisons should be tolerated + notypeof : true, // if should report typos in typeof comparisons + es3 : true, // if ES3 syntax should be allowed + es5 : true, // if ES5 syntax should be allowed (is now set per default) + esnext : true, // if es.next specific syntax should be allowed + moz : true, // if mozilla specific syntax should be allowed + evil : true, // if eval should be allowed + expr : true, // if ExpressionStatement should be allowed as Programs + forin : true, // if for in statements must filter + funcscope : true, // if only function scope should be used for scope tests + globalstrict: true, // if global "use strict"; should be allowed (also enables 'strict') + immed : true, // if immediate invocations must be wrapped in parens + iterator : true, // if the `__iterator__` property should be allowed + jquery : true, // if jQuery globals should be predefined + lastsemic : true, // if semicolons may be ommitted for the trailing + // statements inside of a one-line blocks. + laxbreak : true, // if line breaks should not be checked + laxcomma : true, // if line breaks should not be checked around commas + loopfunc : true, // if functions should be allowed to be defined within + // loops + mootools : true, // if MooTools globals should be predefined + multistr : true, // allow multiline strings + freeze : true, // if modifying native object prototypes should be disallowed + newcap : true, // if constructor names must be capitalized + noarg : true, // if arguments.caller and arguments.callee should be + // disallowed + node : true, // if the Node.js environment globals should be + // predefined + noempty : true, // if empty blocks should be disallowed + nonbsp : true, // if non-breaking spaces should be disallowed + nonew : true, // if using `new` for side-effects should be disallowed + nonstandard : true, // if non-standard (but widely adopted) globals should + // be predefined + phantom : true, // if PhantomJS symbols should be allowed + plusplus : true, // if increment/decrement should not be allowed + proto : true, // if the `__proto__` property should be allowed + prototypejs : true, // if Prototype and Scriptaculous globals should be + // predefined + rhino : true, // if the Rhino environment globals should be predefined + shelljs : true, // if ShellJS globals should be predefined + typed : true, // if typed array globals should be predefined + undef : true, // if variables should be declared before used + scripturl : true, // if script-targeted URLs should be tolerated + strict : true, // require the "use strict"; pragma + sub : true, // if all forms of subscript notation are tolerated + supernew : true, // if `new function () { ... };` and `new Object;` + // should be tolerated + validthis : true, // if 'this' inside a non-constructor function is valid. + // This is a function scoped option only. + withstmt : true, // if with statements should be allowed + worker : true, // if Web Worker script symbols should be allowed + wsh : true, // if the Windows Scripting Host environment globals + // should be predefined + yui : true, // YUI variables should be predefined + mocha : true, // Mocha functions should be predefined + noyield : true, // allow generators without a yield + + // Obsolete options + onecase : true, // if one case switch statements should be allowed + regexp : true, // if the . should not be allowed in regexp literals + regexdash : true // if unescaped first/last dash (-) inside brackets + // should be tolerated + }, + + // These are the JSHint options that can take any value + // (we use this object to detect invalid options) + valOptions = { + maxlen : false, + indent : false, + maxerr : false, + predef : false, // predef is deprecated and being replaced by globals + globals : false, + quotmark : false, // 'single'|'double'|true + scope : false, + maxstatements: false, // {int} max statements per function + maxdepth : false, // {int} max nested block depth per function + maxparams : false, // {int} max params per function + maxcomplexity: false, // {int} max cyclomatic complexity per function + shadow : false, // if variable shadowing should be tolerated + // "inner" - check for variables defined in the same scope only + // "outer" - check for variables defined in outer scopes as well + // false - same as inner + // true - allow variable shadowing + unused : true, // warn if variables are unused. Available options: + // false - don't check for unused variables + // true - "vars" + check last function param + // "vars" - skip checking unused function params + // "strict" - "vars" + check all function params + latedef : false, // warn if the variable is used before its definition + // false - don't emit any warnings + // true - warn if any variable is used before its definition + // "nofunc" - warn for any variable but function declarations + ignore : false // start/end ignoring lines of code, bypassing the lexer + // start - start ignoring lines, including the current line + // end - stop ignoring lines, starting on the next line + // line - ignore warnings / errors for just a single line + // (this option does not bypass the lexer) + }, + + // These are JSHint boolean options which are shared with JSLint + // where the definition in JSHint is opposite JSLint + invertedOptions = { + bitwise : true, + forin : true, + newcap : true, + plusplus: true, + regexp : true, + undef : true, + + // Inverted and renamed, use JSHint name here + eqeqeq : true, + strict : true + }, + + // These are JSHint boolean options which are shared with JSLint + // where the name has been changed but the effect is unchanged + renamedOptions = { + eqeq : "eqeqeq", + windows: "wsh", + sloppy : "strict" + }, + + removedOptions = { + nomen: true, + onevar: true, + passfail: true, + white: true, + gcl: true, + smarttabs: true, + trailing: true + }, + + declared, // Globals that were declared using /*global ... */ syntax. + exported, // Variables that are used outside of the current file. + + functionicity = [ + "closure", "exception", "global", "label", + "outer", "unused", "var" + ], + + funct, // The current function + functions, // All of the functions + + global, // The global scope + implied, // Implied globals + inblock, + indent, + lookahead, + lex, + member, + membersOnly, + noreach, + predefined, // Global variables defined by option + + scope, // The current scope + stack, + unuseds, + urls, + + extraModules = [], + emitter = new events.EventEmitter(); + + function checkOption(name, t) { + name = name.trim(); + + if (/^[+-]W\d{3}$/g.test(name)) { + return true; + } + + if (valOptions[name] === undefined && boolOptions[name] === undefined) { + if (t.type !== "jslint" && !removedOptions[name]) { + error("E001", t, name); + return false; + } + } + + return true; + } + + function isString(obj) { + return Object.prototype.toString.call(obj) === "[object String]"; + } + + function isIdentifier(tkn, value) { + if (!tkn) + return false; + + if (!tkn.identifier || tkn.value !== value) + return false; + + return true; + } + + function isReserved(token) { + if (!token.reserved) { + return false; + } + var meta = token.meta; + + if (meta && meta.isFutureReservedWord && state.option.inES5()) { + // ES3 FutureReservedWord in an ES5 environment. + if (!meta.es5) { + return false; + } + + // Some ES5 FutureReservedWord identifiers are active only + // within a strict mode environment. + if (meta.strictOnly) { + if (!state.option.strict && !state.directive["use strict"]) { + return false; + } + } + + if (token.isProperty) { + return false; + } + } + + return true; + } + + function supplant(str, data) { + return str.replace(/\{([^{}]*)\}/g, function (a, b) { + var r = data[b]; + return typeof r === "string" || typeof r === "number" ? r : a; + }); + } + + function combine(dest, src) { + Object.keys(src).forEach(function (name) { + if (JSHINT.blacklist.hasOwnProperty(name)) return; + dest[name] = src[name]; + }); + } + + function assume() { + if (state.option.esnext) { + combine(predefined, vars.newEcmaIdentifiers); + } + + if (state.option.couch) { + combine(predefined, vars.couch); + } + + if (state.option.rhino) { + combine(predefined, vars.rhino); + } + + if (state.option.shelljs) { + combine(predefined, vars.shelljs); + combine(predefined, vars.node); + } + if (state.option.typed) { + combine(predefined, vars.typed); + } + + if (state.option.phantom) { + combine(predefined, vars.phantom); + } + + if (state.option.prototypejs) { + combine(predefined, vars.prototypejs); + } + + if (state.option.node) { + combine(predefined, vars.node); + combine(predefined, vars.typed); + } + + if (state.option.devel) { + combine(predefined, vars.devel); + } + + if (state.option.dojo) { + combine(predefined, vars.dojo); + } + + if (state.option.browser) { + combine(predefined, vars.browser); + combine(predefined, vars.typed); + } + + if (state.option.nonstandard) { + combine(predefined, vars.nonstandard); + } + + if (state.option.jquery) { + combine(predefined, vars.jquery); + } + + if (state.option.mootools) { + combine(predefined, vars.mootools); + } + + if (state.option.worker) { + combine(predefined, vars.worker); + } + + if (state.option.wsh) { + combine(predefined, vars.wsh); + } + + if (state.option.globalstrict && state.option.strict !== false) { + state.option.strict = true; + } + + if (state.option.yui) { + combine(predefined, vars.yui); + } + + if (state.option.mocha) { + combine(predefined, vars.mocha); + } + + // Let's assume that chronologically ES3 < ES5 < ES6/ESNext < Moz + + state.option.inMoz = function (strict) { + return state.option.moz; + }; + + state.option.inESNext = function (strict) { + return state.option.moz || state.option.esnext; + }; + + state.option.inES5 = function (/* strict */) { + return !state.option.es3; + }; + + state.option.inES3 = function (strict) { + if (strict) { + return !state.option.moz && !state.option.esnext && state.option.es3; + } + return state.option.es3; + }; + } + + // Produce an error warning. + function quit(code, line, chr) { + var percentage = Math.floor((line / state.lines.length) * 100); + var message = messages.errors[code].desc; + + throw { + name: "JSHintError", + line: line, + character: chr, + message: message + " (" + percentage + "% scanned).", + raw: message, + code: code + }; + } + + function isundef(scope, code, token, a) { + return JSHINT.undefs.push([scope, code, token, a]); + } + + function removeIgnoredMessages() { + var ignored = state.ignoredLines; + + if (_.isEmpty(ignored)) return; + JSHINT.errors = _.reject(JSHINT.errors, function (err) { return ignored[err.line] }); + } + + function warning(code, t, a, b, c, d) { + var ch, l, w, msg; + + if (/^W\d{3}$/.test(code)) { + if (state.ignored[code]) + return; + + msg = messages.warnings[code]; + } else if (/E\d{3}/.test(code)) { + msg = messages.errors[code]; + } else if (/I\d{3}/.test(code)) { + msg = messages.info[code]; + } + + t = t || state.tokens.next; + if (t.id === "(end)") { // `~ + t = state.tokens.curr; + } + + l = t.line || 0; + ch = t.from || 0; + + w = { + id: "(error)", + raw: msg.desc, + code: msg.code, + evidence: state.lines[l - 1] || "", + line: l, + character: ch, + scope: JSHINT.scope, + a: a, + b: b, + c: c, + d: d + }; + + w.reason = supplant(msg.desc, w); + JSHINT.errors.push(w); + + removeIgnoredMessages(); + + if (JSHINT.errors.length >= state.option.maxerr) + quit("E043", l, ch); + + return w; + } + + function warningAt(m, l, ch, a, b, c, d) { + return warning(m, { + line: l, + from: ch + }, a, b, c, d); + } + + function error(m, t, a, b, c, d) { + warning(m, t, a, b, c, d); + } + + function errorAt(m, l, ch, a, b, c, d) { + return error(m, { + line: l, + from: ch + }, a, b, c, d); + } + + // Tracking of "internal" scripts, like eval containing a static string + function addInternalSrc(elem, src) { + var i; + i = { + id: "(internal)", + elem: elem, + value: src + }; + JSHINT.internals.push(i); + return i; + } + + // name: string + // opts: { type: string, token: token, islet: bool } + function addlabel(name, opts) { + opts = opts || {}; + + var type = opts.type; + var token = opts.token; + var islet = opts.islet; + + // Define label in the current function in the current scope. + if (type === "exception") { + if (_.has(funct["(context)"], name)) { + if (funct[name] !== true && !state.option.node) { + warning("W002", state.tokens.next, name); + } + } + } + + if (_.has(funct, name) && !funct["(global)"]) { + if (funct[name] === true) { + if (state.option.latedef) { + if ((state.option.latedef === true && _.contains([funct[name], type], "unction")) || + !_.contains([funct[name], type], "unction")) { + warning("W003", state.tokens.next, name); + } + } + } else { + if ((!state.option.shadow || _.contains([ "inner", "outer" ], state.option.shadow)) && + type !== "exception" || funct["(blockscope)"].getlabel(name)) { + warning("W004", state.tokens.next, name); + } + } + } + + if (funct["(context)"] && _.has(funct["(context)"], name) && type !== "function") { + if (state.option.shadow === "outer") { + warning("W123", state.tokens.next, name); + } + } + + // if the identifier is from a let, adds it only to the current blockscope + if (islet) { + funct["(blockscope)"].current.add(name, type, state.tokens.curr); + } else { + funct["(blockscope)"].shadow(name); + funct[name] = type; + + if (token) { + funct["(tokens)"][name] = token; + } + + setprop(funct, name, { unused: opts.unused || false }); + + if (funct["(global)"]) { + global[name] = funct; + if (_.has(implied, name)) { + if (state.option.latedef) { + if ((state.option.latedef === true && _.contains([funct[name], type], "unction")) || + !_.contains([funct[name], type], "unction")) { + warning("W003", state.tokens.next, name); + } + } + + delete implied[name]; + } + } else { + scope[name] = funct; + } + } + } + + function doOption() { + var nt = state.tokens.next; + var body = nt.body.match(/(-\s+)?[^\s,:]+(?:\s*:\s*(-\s+)?[^\s,]+)?/g); + var predef = {}; + + if (nt.type === "globals") { + body.forEach(function (g) { + g = g.split(":"); + var key = (g[0] || "").trim(); + var val = (g[1] || "").trim(); + + if (key.charAt(0) === "-") { + key = key.slice(1); + val = false; + + JSHINT.blacklist[key] = key; + delete predefined[key]; + } else { + predef[key] = (val === "true"); + } + }); + + combine(predefined, predef); + + for (var key in predef) { + if (_.has(predef, key)) { + declared[key] = nt; + } + } + } + + if (nt.type === "exported") { + body.forEach(function (e) { + exported[e] = true; + }); + } + + if (nt.type === "members") { + membersOnly = membersOnly || {}; + + body.forEach(function (m) { + var ch1 = m.charAt(0); + var ch2 = m.charAt(m.length - 1); + + if (ch1 === ch2 && (ch1 === "\"" || ch1 === "'")) { + m = m + .substr(1, m.length - 2) + .replace("\\\"", "\""); + } + + membersOnly[m] = false; + }); + } + + var numvals = [ + "maxstatements", + "maxparams", + "maxdepth", + "maxcomplexity", + "maxerr", + "maxlen", + "indent" + ]; + + if (nt.type === "jshint" || nt.type === "jslint") { + body.forEach(function (g) { + g = g.split(":"); + var key = (g[0] || "").trim(); + var val = (g[1] || "").trim(); + + if (!checkOption(key, nt)) { + return; + } + + if (numvals.indexOf(key) >= 0) { + // GH988 - numeric options can be disabled by setting them to `false` + if (val !== "false") { + val = +val; + + if (typeof val !== "number" || !isFinite(val) || val <= 0 || Math.floor(val) !== val) { + error("E032", nt, g[1].trim()); + return; + } + + state.option[key] = val; + } else { + state.option[key] = key === "indent" ? 4 : false; + } + + return; + } + + if (key === "validthis") { + // `validthis` is valid only within a function scope. + + if (funct["(global)"]) + return void error("E009"); + + if (val !== "true" && val !== "false") + return void error("E002", nt); + + state.option.validthis = (val === "true"); + return; + } + + if (key === "quotmark") { + switch (val) { + case "true": + case "false": + state.option.quotmark = (val === "true"); + break; + case "double": + case "single": + state.option.quotmark = val; + break; + default: + error("E002", nt); + } + return; + } + + if (key === "shadow") { + switch (val) { + case "true": + state.option.shadow = true; + break; + case "outer": + state.option.shadow = "outer"; + break; + case "false": + case "inner": + state.option.shadow = "inner"; + break; + default: + error("E002", nt); + } + return; + } + + if (key === "unused") { + switch (val) { + case "true": + state.option.unused = true; + break; + case "false": + state.option.unused = false; + break; + case "vars": + case "strict": + state.option.unused = val; + break; + default: + error("E002", nt); + } + return; + } + + if (key === "latedef") { + switch (val) { + case "true": + state.option.latedef = true; + break; + case "false": + state.option.latedef = false; + break; + case "nofunc": + state.option.latedef = "nofunc"; + break; + default: + error("E002", nt); + } + return; + } + + if (key === "ignore") { + switch (val) { + case "start": + state.ignoreLinterErrors = true; + break; + case "end": + state.ignoreLinterErrors = false; + break; + case "line": + state.ignoredLines[nt.line] = true; + removeIgnoredMessages(); + break; + default: + error("E002", nt); + } + return; + } + + var match = /^([+-])(W\d{3})$/g.exec(key); + if (match) { + // ignore for -W..., unignore for +W... + state.ignored[match[2]] = (match[1] === "-"); + return; + } + + var tn; + if (val === "true" || val === "false") { + if (nt.type === "jslint") { + tn = renamedOptions[key] || key; + state.option[tn] = (val === "true"); + + if (invertedOptions[tn] !== undefined) { + state.option[tn] = !state.option[tn]; + } + } else { + state.option[key] = (val === "true"); + } + + if (key === "newcap") { + state.option["(explicitNewcap)"] = true; + } + return; + } + + error("E002", nt); + }); + + assume(); + } + } + + // We need a peek function. If it has an argument, it peeks that much farther + // ahead. It is used to distinguish + // for ( var i in ... + // from + // for ( var i = ... + + function peek(p) { + var i = p || 0, j = 0, t; + + while (j <= i) { + t = lookahead[j]; + if (!t) { + t = lookahead[j] = lex.token(); + } + j += 1; + } + return t; + } + + // Produce the next token. It looks for programming errors. + + function advance(id, t) { + switch (state.tokens.curr.id) { + case "(number)": + if (state.tokens.next.id === ".") { + warning("W005", state.tokens.curr); + } + break; + case "-": + if (state.tokens.next.id === "-" || state.tokens.next.id === "--") { + warning("W006"); + } + break; + case "+": + if (state.tokens.next.id === "+" || state.tokens.next.id === "++") { + warning("W007"); + } + break; + } + + if (state.tokens.curr.type === "(string)" || state.tokens.curr.identifier) { + anonname = state.tokens.curr.value; + } + + if (id && state.tokens.next.id !== id) { + if (t) { + if (state.tokens.next.id === "(end)") { + error("E019", t, t.id); + } else { + error("E020", state.tokens.next, id, t.id, t.line, state.tokens.next.value); + } + } else if (state.tokens.next.type !== "(identifier)" || state.tokens.next.value !== id) { + warning("W116", state.tokens.next, id, state.tokens.next.value); + } + } + + state.tokens.prev = state.tokens.curr; + state.tokens.curr = state.tokens.next; + for (;;) { + state.tokens.next = lookahead.shift() || lex.token(); + + if (!state.tokens.next) { // No more tokens left, give up + quit("E041", state.tokens.curr.line); + } + + if (state.tokens.next.id === "(end)" || state.tokens.next.id === "(error)") { + return; + } + + if (state.tokens.next.check) { + state.tokens.next.check(); + } + + if (state.tokens.next.isSpecial) { + doOption(); + } else { + if (state.tokens.next.id !== "(endline)") { + break; + } + } + } + } + + function isInfix(token) { + return token.infix || (!token.identifier && !!token.led); + } + + function isEndOfExpr() { + var curr = state.tokens.curr; + var next = state.tokens.next; + if (next.id === ";" || next.id === "}" || next.id === ":") { + return true; + } + if (isInfix(next) === isInfix(curr) || (curr.id === "yield" && state.option.inMoz(true))) { + return curr.line !== next.line; + } + return false; + } + + // This is the heart of JSHINT, the Pratt parser. In addition to parsing, it + // is looking for ad hoc lint patterns. We add .fud to Pratt's model, which is + // like .nud except that it is only used on the first token of a statement. + // Having .fud makes it much easier to define statement-oriented languages like + // JavaScript. I retained Pratt's nomenclature. + + // .nud Null denotation + // .fud First null denotation + // .led Left denotation + // lbp Left binding power + // rbp Right binding power + + // They are elements of the parsing method called Top Down Operator Precedence. + + function expression(rbp, initial) { + var left, isArray = false, isObject = false, isLetExpr = false; + + // if current expression is a let expression + if (!initial && state.tokens.next.value === "let" && peek(0).value === "(") { + if (!state.option.inMoz(true)) { + warning("W118", state.tokens.next, "let expressions"); + } + isLetExpr = true; + // create a new block scope we use only for the current expression + funct["(blockscope)"].stack(); + advance("let"); + advance("("); + state.syntax["let"].fud.call(state.syntax["let"].fud, false); + advance(")"); + } + + if (state.tokens.next.id === "(end)") + error("E006", state.tokens.curr); + + if (state.option.asi && + (state.tokens.curr.id === "[" || + state.tokens.curr.id === "(" || + state.tokens.curr.id === "/") && + state.tokens.prev.line < state.tokens.curr.line) + warning("W014", state.tokens.curr, state.tokens.curr.id); + + advance(); + + if (initial) { + anonname = "anonymous"; + funct["(verb)"] = state.tokens.curr.value; + } + + if (initial === true && state.tokens.curr.fud) { + left = state.tokens.curr.fud(); + } else { + if (state.tokens.curr.nud) { + left = state.tokens.curr.nud(); + } else { + error("E030", state.tokens.curr, state.tokens.curr.id); + } + + while (rbp < state.tokens.next.lbp && !isEndOfExpr()) { + isArray = state.tokens.curr.value === "Array"; + isObject = state.tokens.curr.value === "Object"; + + // #527, new Foo.Array(), Foo.Array(), new Foo.Object(), Foo.Object() + // Line breaks in IfStatement heads exist to satisfy the checkJSHint + // "Line too long." error. + if (left && (left.value || (left.first && left.first.value))) { + // If the left.value is not "new", or the left.first.value is a "." + // then safely assume that this is not "new Array()" and possibly + // not "new Object()"... + if (left.value !== "new" || + (left.first && left.first.value && left.first.value === ".")) { + isArray = false; + // ...In the case of Object, if the left.value and state.tokens.curr.value + // are not equal, then safely assume that this not "new Object()" + if (left.value !== state.tokens.curr.value) { + isObject = false; + } + } + } + + advance(); + + if (isArray && state.tokens.curr.id === "(" && state.tokens.next.id === ")") { + warning("W009", state.tokens.curr); + } + + if (isObject && state.tokens.curr.id === "(" && state.tokens.next.id === ")") { + warning("W010", state.tokens.curr); + } + + if (left && state.tokens.curr.led) { + left = state.tokens.curr.led(left); + } else { + error("E033", state.tokens.curr, state.tokens.curr.id); + } + } + } + if (isLetExpr) { + funct["(blockscope)"].unstack(); + } + return left; + } + + + // Functions for conformance of style. + + function nobreaknonadjacent(left, right) { + left = left || state.tokens.curr; + right = right || state.tokens.next; + if (!state.option.laxbreak && left.line !== right.line) { + warning("W014", right, right.value); + } + } + + function nolinebreak(t) { + t = t || state.tokens.curr; + if (t.line !== state.tokens.next.line) { + warning("E022", t, t.value); + } + } + + function nobreakcomma(left, right) { + if (left.line !== right.line) { + if (!state.option.laxcomma) { + if (comma.first) { + warning("I001"); + comma.first = false; + } + warning("W014", left, right.value); + } + } + } + + function comma(opts) { + opts = opts || {}; + + if (!opts.peek) { + nobreakcomma(state.tokens.curr, state.tokens.next); + advance(","); + } else { + nobreakcomma(state.tokens.prev, state.tokens.curr); + } + + if (state.tokens.next.identifier && !(opts.property && state.option.inES5())) { + // Keywords that cannot follow a comma operator. + switch (state.tokens.next.value) { + case "break": + case "case": + case "catch": + case "continue": + case "default": + case "do": + case "else": + case "finally": + case "for": + case "if": + case "in": + case "instanceof": + case "return": + case "switch": + case "throw": + case "try": + case "var": + case "let": + case "while": + case "with": + error("E024", state.tokens.next, state.tokens.next.value); + return false; + } + } + + if (state.tokens.next.type === "(punctuator)") { + switch (state.tokens.next.value) { + case "}": + case "]": + case ",": + if (opts.allowTrailing) { + return true; + } + + /* falls through */ + case ")": + error("E024", state.tokens.next, state.tokens.next.value); + return false; + } + } + return true; + } + + // Functional constructors for making the symbols that will be inherited by + // tokens. + + function symbol(s, p) { + var x = state.syntax[s]; + if (!x || typeof x !== "object") { + state.syntax[s] = x = { + id: s, + lbp: p, + value: s + }; + } + return x; + } + + function delim(s) { + return symbol(s, 0); + } + + function stmt(s, f) { + var x = delim(s); + x.identifier = x.reserved = true; + x.fud = f; + return x; + } + + function blockstmt(s, f) { + var x = stmt(s, f); + x.block = true; + return x; + } + + function reserveName(x) { + var c = x.id.charAt(0); + if ((c >= "a" && c <= "z") || (c >= "A" && c <= "Z")) { + x.identifier = x.reserved = true; + } + return x; + } + + function prefix(s, f) { + var x = symbol(s, 150); + reserveName(x); + + x.nud = (typeof f === "function") ? f : function () { + this.right = expression(150); + this.arity = "unary"; + + if (this.id === "++" || this.id === "--") { + if (state.option.plusplus) { + warning("W016", this, this.id); + } else if (this.right && (!this.right.identifier || isReserved(this.right)) && + this.right.id !== "." && this.right.id !== "[") { + warning("W017", this); + } + } + + return this; + }; + + return x; + } + + function type(s, f) { + var x = delim(s); + x.type = s; + x.nud = f; + return x; + } + + function reserve(name, func) { + var x = type(name, func); + x.identifier = true; + x.reserved = true; + return x; + } + + function FutureReservedWord(name, meta) { + var x = type(name, (meta && meta.nud) || function () { + return this; + }); + + meta = meta || {}; + meta.isFutureReservedWord = true; + + x.value = name; + x.identifier = true; + x.reserved = true; + x.meta = meta; + + return x; + } + + function reservevar(s, v) { + return reserve(s, function () { + if (typeof v === "function") { + v(this); + } + return this; + }); + } + + function infix(s, f, p, w) { + var x = symbol(s, p); + reserveName(x); + x.infix = true; + x.led = function (left) { + if (!w) { + nobreaknonadjacent(state.tokens.prev, state.tokens.curr); + } + if (s === "in" && left.id === "!") { + warning("W018", left, "!"); + } + if (typeof f === "function") { + return f(left, this); + } else { + this.left = left; + this.right = expression(p); + return this; + } + }; + return x; + } + + + function application(s) { + var x = symbol(s, 42); + + x.led = function (left) { + if (!state.option.inESNext()) { + warning("W104", state.tokens.curr, "arrow function syntax (=>)"); + } + + nobreaknonadjacent(state.tokens.prev, state.tokens.curr); + + this.left = left; + this.right = doFunction(undefined, undefined, false, left); + return this; + }; + return x; + } + + function relation(s, f) { + var x = symbol(s, 100); + + x.led = function (left) { + nobreaknonadjacent(state.tokens.prev, state.tokens.curr); + var right = expression(100); + + if (isIdentifier(left, "NaN") || isIdentifier(right, "NaN")) { + warning("W019", this); + } else if (f) { + f.apply(this, [left, right]); + } + + if (!left || !right) { + quit("E041", state.tokens.curr.line); + } + + if (left.id === "!") { + warning("W018", left, "!"); + } + + if (right.id === "!") { + warning("W018", right, "!"); + } + + this.left = left; + this.right = right; + return this; + }; + return x; + } + + function isPoorRelation(node) { + return node && + ((node.type === "(number)" && +node.value === 0) || + (node.type === "(string)" && node.value === "") || + (node.type === "null" && !state.option.eqnull) || + node.type === "true" || + node.type === "false" || + node.type === "undefined"); + } + + // Checks whether the 'typeof' operator is used with the correct + // value. For docs on 'typeof' see: + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof + + function isTypoTypeof(left, right) { + if (state.option.notypeof) + return false; + + if (!left || !right) + return false; + + var values = [ + "undefined", "object", "boolean", "number", + "string", "function", "xml", "object", "unknown" + ]; + + if (right.type === "(identifier)" && right.value === "typeof" && left.type === "(string)") + return !_.contains(values, left.value); + + return false; + } + + function findNativePrototype(left) { + var natives = [ + "Array", "ArrayBuffer", "Boolean", "Collator", "DataView", "Date", + "DateTimeFormat", "Error", "EvalError", "Float32Array", "Float64Array", + "Function", "Infinity", "Intl", "Int16Array", "Int32Array", "Int8Array", + "Iterator", "Number", "NumberFormat", "Object", "RangeError", + "ReferenceError", "RegExp", "StopIteration", "String", "SyntaxError", + "TypeError", "Uint16Array", "Uint32Array", "Uint8Array", "Uint8ClampedArray", + "URIError" + ]; + + function walkPrototype(obj) { + if (typeof obj !== "object") return; + return obj.right === "prototype" ? obj : walkPrototype(obj.left); + } + + function walkNative(obj) { + while (!obj.identifier && typeof obj.left === "object") + obj = obj.left; + + if (obj.identifier && natives.indexOf(obj.value) >= 0) + return obj.value; + } + + var prototype = walkPrototype(left); + if (prototype) return walkNative(prototype); + } + + function assignop(s, f, p) { + var x = infix(s, typeof f === "function" ? f : function (left, that) { + that.left = left; + + if (left) { + if (state.option.freeze) { + var nativeObject = findNativePrototype(left); + if (nativeObject) + warning("W121", left, nativeObject); + } + + if (predefined[left.value] === false && + scope[left.value]["(global)"] === true) { + warning("W020", left); + } else if (left["function"]) { + warning("W021", left, left.value); + } + + if (funct[left.value] === "const") { + error("E013", left, left.value); + } + + if (left.id === ".") { + if (!left.left) { + warning("E031", that); + } else if (left.left.value === "arguments" && !state.directive["use strict"]) { + warning("E031", that); + } + + that.right = expression(10); + return that; + } else if (left.id === "[") { + if (state.tokens.curr.left.first) { + state.tokens.curr.left.first.forEach(function (t) { + if (t && funct[t.value] === "const") { + error("E013", t, t.value); + } + }); + } else if (!left.left) { + warning("E031", that); + } else if (left.left.value === "arguments" && !state.directive["use strict"]) { + warning("E031", that); + } + that.right = expression(10); + return that; + } else if (left.identifier && !isReserved(left)) { + if (funct[left.value] === "exception") { + warning("W022", left); + } + that.right = expression(10); + return that; + } + + if (left === state.syntax["function"]) { + warning("W023", state.tokens.curr); + } + } + + error("E031", that); + }, p); + + x.exps = true; + x.assign = true; + return x; + } + + + function bitwise(s, f, p) { + var x = symbol(s, p); + reserveName(x); + x.led = (typeof f === "function") ? f : function (left) { + if (state.option.bitwise) { + warning("W016", this, this.id); + } + this.left = left; + this.right = expression(p); + return this; + }; + return x; + } + + + function bitwiseassignop(s) { + return assignop(s, function (left, that) { + if (state.option.bitwise) { + warning("W016", that, that.id); + } + + if (left) { + if (left.id === "." || left.id === "[" || + (left.identifier && !isReserved(left))) { + expression(10); + return that; + } + if (left === state.syntax["function"]) { + warning("W023", state.tokens.curr); + } + return that; + } + error("E031", that); + }, 20); + } + + + function suffix(s) { + var x = symbol(s, 150); + + x.led = function (left) { + if (state.option.plusplus) { + warning("W016", this, this.id); + } else if ((!left.identifier || isReserved(left)) && left.id !== "." && left.id !== "[") { + warning("W017", this); + } + + this.left = left; + return this; + }; + return x; + } + + // fnparam means that this identifier is being defined as a function + // argument (see identifier()) + // prop means that this identifier is that of an object property + + function optionalidentifier(fnparam, prop) { + if (!state.tokens.next.identifier) { + return; + } + + advance(); + + var curr = state.tokens.curr; + var val = state.tokens.curr.value; + + if (!isReserved(curr)) { + return val; + } + + if (prop) { + if (state.option.inES5()) { + return val; + } + } + + if (fnparam && val === "undefined") { + return val; + } + + warning("W024", state.tokens.curr, state.tokens.curr.id); + return val; + } + + // fnparam means that this identifier is being defined as a function + // argument + // prop means that this identifier is that of an object property + function identifier(fnparam, prop) { + var i = optionalidentifier(fnparam, prop); + if (i) { + return i; + } + if (state.tokens.curr.id === "function" && state.tokens.next.id === "(") { + warning("W025"); + } else { + error("E030", state.tokens.next, state.tokens.next.value); + } + } + + + function reachable(s) { + var i = 0, t; + if (state.tokens.next.id !== ";" || noreach) { + return; + } + for (;;) { + do { + t = peek(i); + i += 1; + } while (t.id != "(end)" && t.id === "(comment)"); + + if (t.reach) { + return; + } + if (t.id !== "(endline)") { + if (t.id === "function") { + if (state.option.latedef === true) { + warning("W026", t); + } + break; + } + + warning("W027", t, t.value, s); + break; + } + } + } + + + function statement() { + var values; + var i = indent, r, s = scope, t = state.tokens.next; + + if (t.id === ";") { + advance(";"); + return; + } + + // Is this a labelled statement? + var res = isReserved(t); + + // We're being more tolerant here: if someone uses + // a FutureReservedWord as a label, we warn but proceed + // anyway. + + if (res && t.meta && t.meta.isFutureReservedWord && peek().id === ":") { + warning("W024", t, t.id); + res = false; + } + + // detect a destructuring assignment + if (_.has(["[", "{"], t.value)) { + if (lookupBlockType().isDestAssign) { + if (!state.option.inESNext()) { + warning("W104", state.tokens.curr, "destructuring expression"); + } + values = destructuringExpression(); + values.forEach(function (tok) { + isundef(funct, "W117", tok.token, tok.id); + }); + advance("="); + destructuringExpressionMatch(values, expression(10, true)); + advance(";"); + return; + } + } + if (t.identifier && !res && peek().id === ":") { + advance(); + advance(":"); + scope = Object.create(s); + addlabel(t.value, { type: "label" }); + + if (!state.tokens.next.labelled && state.tokens.next.value !== "{") { + warning("W028", state.tokens.next, t.value, state.tokens.next.value); + } + + state.tokens.next.label = t.value; + t = state.tokens.next; + } + + // Is it a lonely block? + + if (t.id === "{") { + // Is it a switch case block? + // + // switch (foo) { + // case bar: { <= here. + // ... + // } + // } + var iscase = (funct["(verb)"] === "case" && state.tokens.curr.value === ":"); + block(true, true, false, false, iscase); + return; + } + + // Parse the statement. + + r = expression(0, true); + + if (r && (!r.identifier || r.value !== "function") && (r.type !== "(punctuator)")) { + if (!state.directive["use strict"] && + state.option.globalstrict && + state.option.strict) { + warning("E007"); + } + } + + // Look for the final semicolon. + + if (!t.block) { + if (!state.option.expr && (!r || !r.exps)) { + warning("W030", state.tokens.curr); + } else if (state.option.nonew && r && r.left && r.id === "(" && r.left.id === "new") { + warning("W031", t); + } + + if (state.tokens.next.id !== ";") { + if (!state.option.asi) { + // If this is the last statement in a block that ends on + // the same line *and* option lastsemic is on, ignore the warning. + // Otherwise, complain about missing semicolon. + if (!state.option.lastsemic || state.tokens.next.id !== "}" || + state.tokens.next.line !== state.tokens.curr.line) { + warningAt("W033", state.tokens.curr.line, state.tokens.curr.character); + } + } + } else { + advance(";"); + } + } + + // Restore the indentation. + + indent = i; + scope = s; + return r; + } + + + function statements(startLine) { + var a = [], p; + + while (!state.tokens.next.reach && state.tokens.next.id !== "(end)") { + if (state.tokens.next.id === ";") { + p = peek(); + + if (!p || (p.id !== "(" && p.id !== "[")) { + warning("W032"); + } + + advance(";"); + } else { + a.push(statement(startLine === state.tokens.next.line)); + } + } + return a; + } + + + /* + * read all directives + * recognizes a simple form of asi, but always + * warns, if it is used + */ + function directives() { + var i, p, pn; + + for (;;) { + if (state.tokens.next.id === "(string)") { + p = peek(0); + if (p.id === "(endline)") { + i = 1; + do { + pn = peek(i); + i = i + 1; + } while (pn.id === "(endline)"); + + if (pn.id !== ";") { + if (pn.id !== "(string)" && pn.id !== "(number)" && + pn.id !== "(regexp)" && pn.identifier !== true && + pn.id !== "}") { + break; + } + warning("W033", state.tokens.next); + } else { + p = pn; + } + } else if (p.id === "}") { + // Directive with no other statements, warn about missing semicolon + warning("W033", p); + } else if (p.id !== ";") { + break; + } + + advance(); + if (state.directive[state.tokens.curr.value]) { + warning("W034", state.tokens.curr, state.tokens.curr.value); + } + + if (state.tokens.curr.value === "use strict") { + if (!state.option["(explicitNewcap)"]) + state.option.newcap = true; + state.option.undef = true; + } + + // there's no directive negation, so always set to true + state.directive[state.tokens.curr.value] = true; + + if (p.id === ";") { + advance(";"); + } + continue; + } + break; + } + } + + + /* + * Parses a single block. A block is a sequence of statements wrapped in + * braces. + * + * ordinary - true for everything but function bodies and try blocks. + * stmt - true if block can be a single statement (e.g. in if/for/while). + * isfunc - true if block is a function body + * isfatarrow - true if its a body of a fat arrow function + * iscase - true if block is a switch case block + */ + function block(ordinary, stmt, isfunc, isfatarrow, iscase) { + var a, + b = inblock, + old_indent = indent, + m, + s = scope, + t, + line, + d; + + inblock = ordinary; + + if (!ordinary || !state.option.funcscope) + scope = Object.create(scope); + + t = state.tokens.next; + + var metrics = funct["(metrics)"]; + metrics.nestedBlockDepth += 1; + metrics.verifyMaxNestedBlockDepthPerFunction(); + + if (state.tokens.next.id === "{") { + advance("{"); + + // create a new block scope + funct["(blockscope)"].stack(); + + line = state.tokens.curr.line; + if (state.tokens.next.id !== "}") { + indent += state.option.indent; + while (!ordinary && state.tokens.next.from > indent) { + indent += state.option.indent; + } + + if (isfunc) { + m = {}; + for (d in state.directive) { + if (_.has(state.directive, d)) { + m[d] = state.directive[d]; + } + } + directives(); + + if (state.option.strict && funct["(context)"]["(global)"]) { + if (!m["use strict"] && !state.directive["use strict"]) { + warning("E007"); + } + } + } + + a = statements(line); + + metrics.statementCount += a.length; + + if (isfunc) { + state.directive = m; + } + + indent -= state.option.indent; + } + + advance("}", t); + + funct["(blockscope)"].unstack(); + + indent = old_indent; + } else if (!ordinary) { + if (isfunc) { + m = {}; + if (stmt && !isfatarrow && !state.option.inMoz(true)) { + error("W118", state.tokens.curr, "function closure expressions"); + } + + if (!stmt) { + for (d in state.directive) { + if (_.has(state.directive, d)) { + m[d] = state.directive[d]; + } + } + } + expression(10); + + if (state.option.strict && funct["(context)"]["(global)"]) { + if (!m["use strict"] && !state.directive["use strict"]) { + warning("E007"); + } + } + } else { + error("E021", state.tokens.next, "{", state.tokens.next.value); + } + } else { + + // check to avoid let declaration not within a block + funct["(nolet)"] = true; + + if (!stmt || state.option.curly) { + warning("W116", state.tokens.next, "{", state.tokens.next.value); + } + + noreach = true; + indent += state.option.indent; + // test indentation only if statement is in new line + a = [statement()]; + indent -= state.option.indent; + noreach = false; + + delete funct["(nolet)"]; + } + + // Don't clear and let it propagate out if it is "break", "return" or similar in switch case + switch (funct["(verb)"]) { + case "break": + case "continue": + case "return": + case "throw": + if (iscase) { + break; + } + + /* falls through */ + default: + funct["(verb)"] = null; + } + + if (!ordinary || !state.option.funcscope) scope = s; + inblock = b; + if (ordinary && state.option.noempty && (!a || a.length === 0)) { + warning("W035"); + } + metrics.nestedBlockDepth -= 1; + return a; + } + + + function countMember(m) { + if (membersOnly && typeof membersOnly[m] !== "boolean") { + warning("W036", state.tokens.curr, m); + } + if (typeof member[m] === "number") { + member[m] += 1; + } else { + member[m] = 1; + } + } + + + function note_implied(tkn) { + var name = tkn.value; + var desc = Object.getOwnPropertyDescriptor(implied, name); + + if (!desc) + implied[name] = [tkn.line]; + else + desc.value.push(tkn.line); + } + + + // Build the syntax table by declaring the syntactic elements of the language. + + type("(number)", function () { + return this; + }); + + type("(string)", function () { + return this; + }); + + type("(template)", function () { + return this; + }); + + state.syntax["(identifier)"] = { + type: "(identifier)", + lbp: 0, + identifier: true, + + nud: function () { + var v = this.value; + var s = scope[v]; + var f; + var block; + + if (typeof s === "function") { + // Protection against accidental inheritance. + s = undefined; + } else if (!funct["(blockscope)"].current.has(v) && typeof s === "boolean") { + f = funct; + funct = functions[0]; + addlabel(v, { type: "var" }); + s = funct; + funct = f; + } + + block = funct["(blockscope)"].getlabel(v); + + // The name is in scope and defined in the current function. + if (funct === s || block) { + // Change 'unused' to 'var', and reject labels. + // the name is in a block scope. + switch (block ? block[v]["(type)"] : funct[v]) { + case "unused": + if (block) block[v]["(type)"] = "var"; + else funct[v] = "var"; + break; + case "unction": + if (block) block[v]["(type)"] = "function"; + else funct[v] = "function"; + this["function"] = true; + break; + case "const": + setprop(funct, v, { unused: false }); + break; + case "function": + this["function"] = true; + break; + case "label": + warning("W037", state.tokens.curr, v); + break; + } + } else if (funct["(global)"]) { + // The name is not defined in the function. If we are in the global + // scope, then we have an undefined variable. + // + // Operators typeof and delete do not raise runtime errors even if + // the base object of a reference is null so no need to display warning + // if we're inside of typeof or delete. + + if (typeof predefined[v] !== "boolean") { + // Attempting to subscript a null reference will throw an + // error, even within the typeof and delete operators + if (!(anonname === "typeof" || anonname === "delete") || + (state.tokens.next && (state.tokens.next.value === "." || + state.tokens.next.value === "["))) { + + // if we're in a list comprehension, variables are declared + // locally and used before being defined. So we check + // the presence of the given variable in the comp array + // before declaring it undefined. + + if (!funct["(comparray)"].check(v)) { + isundef(funct, "W117", state.tokens.curr, v); + } + } + } + + note_implied(state.tokens.curr); + } else { + // If the name is already defined in the current + // function, but not as outer, then there is a scope error. + + switch (funct[v]) { + case "closure": + case "function": + case "var": + case "unused": + warning("W038", state.tokens.curr, v); + break; + case "label": + warning("W037", state.tokens.curr, v); + break; + case "outer": + case "global": + break; + default: + // If the name is defined in an outer function, make an outer entry, + // and if it was unused, make it var. + if (s === true) { + funct[v] = true; + } else if (s === null) { + warning("W039", state.tokens.curr, v); + note_implied(state.tokens.curr); + } else if (typeof s !== "object") { + // Operators typeof and delete do not raise runtime errors even + // if the base object of a reference is null so no need to + // + // display warning if we're inside of typeof or delete. + // Attempting to subscript a null reference will throw an + // error, even within the typeof and delete operators + if (!(anonname === "typeof" || anonname === "delete") || + (state.tokens.next && + (state.tokens.next.value === "." || state.tokens.next.value === "["))) { + + isundef(funct, "W117", state.tokens.curr, v); + } + funct[v] = true; + note_implied(state.tokens.curr); + } else { + switch (s[v]) { + case "function": + case "unction": + this["function"] = true; + s[v] = "closure"; + funct[v] = s["(global)"] ? "global" : "outer"; + break; + case "var": + case "unused": + s[v] = "closure"; + funct[v] = s["(global)"] ? "global" : "outer"; + break; + case "const": + setprop(s, v, { unused: false }); + break; + case "closure": + funct[v] = s["(global)"] ? "global" : "outer"; + break; + case "label": + warning("W037", state.tokens.curr, v); + } + } + } + } + return this; + }, + + led: function () { + error("E033", state.tokens.next, state.tokens.next.value); + } + }; + + type("(regexp)", function () { + return this; + }); + + // ECMAScript parser + + delim("(endline)"); + delim("(begin)"); + delim("(end)").reach = true; + delim("(error)").reach = true; + delim("}").reach = true; + delim(")"); + delim("]"); + delim("\"").reach = true; + delim("'").reach = true; + delim(";"); + delim(":").reach = true; + delim("#"); + + reserve("else"); + reserve("case").reach = true; + reserve("catch"); + reserve("default").reach = true; + reserve("finally"); + reservevar("arguments", function (x) { + if (state.directive["use strict"] && funct["(global)"]) { + warning("E008", x); + } + }); + reservevar("eval"); + reservevar("false"); + reservevar("Infinity"); + reservevar("null"); + reservevar("this", function (x) { + if (state.directive["use strict"] && !state.option.validthis && ((funct["(statement)"] && + funct["(name)"].charAt(0) > "Z") || funct["(global)"])) { + warning("W040", x); + } + }); + reservevar("true"); + reservevar("undefined"); + + assignop("=", "assign", 20); + assignop("+=", "assignadd", 20); + assignop("-=", "assignsub", 20); + assignop("*=", "assignmult", 20); + assignop("/=", "assigndiv", 20).nud = function () { + error("E014"); + }; + assignop("%=", "assignmod", 20); + + bitwiseassignop("&=", "assignbitand", 20); + bitwiseassignop("|=", "assignbitor", 20); + bitwiseassignop("^=", "assignbitxor", 20); + bitwiseassignop("<<=", "assignshiftleft", 20); + bitwiseassignop(">>=", "assignshiftright", 20); + bitwiseassignop(">>>=", "assignshiftrightunsigned", 20); + infix(",", function (left, that) { + var expr; + that.exprs = [left]; + if (!comma({peek: true})) { + return that; + } + while (true) { + if (!(expr = expression(10))) { + break; + } + that.exprs.push(expr); + if (state.tokens.next.value !== "," || !comma()) { + break; + } + } + return that; + }, 10, true); + + infix("?", function (left, that) { + increaseComplexityCount(); + that.left = left; + that.right = expression(10); + advance(":"); + that["else"] = expression(10); + return that; + }, 30); + + var orPrecendence = 40; + infix("||", function (left, that) { + increaseComplexityCount(); + that.left = left; + that.right = expression(orPrecendence); + return that; + }, orPrecendence); + infix("&&", "and", 50); + bitwise("|", "bitor", 70); + bitwise("^", "bitxor", 80); + bitwise("&", "bitand", 90); + relation("==", function (left, right) { + var eqnull = state.option.eqnull && (left.value === "null" || right.value === "null"); + + switch (true) { + case !eqnull && state.option.eqeqeq: + this.from = this.character; + warning("W116", this, "===", "=="); + break; + case isPoorRelation(left): + warning("W041", this, "===", left.value); + break; + case isPoorRelation(right): + warning("W041", this, "===", right.value); + break; + case isTypoTypeof(right, left): + warning("W122", this, right.value); + break; + case isTypoTypeof(left, right): + warning("W122", this, left.value); + break; + } + + return this; + }); + relation("===", function (left, right) { + if (isTypoTypeof(right, left)) { + warning("W122", this, right.value); + } else if (isTypoTypeof(left, right)) { + warning("W122", this, left.value); + } + return this; + }); + relation("!=", function (left, right) { + var eqnull = state.option.eqnull && + (left.value === "null" || right.value === "null"); + + if (!eqnull && state.option.eqeqeq) { + this.from = this.character; + warning("W116", this, "!==", "!="); + } else if (isPoorRelation(left)) { + warning("W041", this, "!==", left.value); + } else if (isPoorRelation(right)) { + warning("W041", this, "!==", right.value); + } else if (isTypoTypeof(right, left)) { + warning("W122", this, right.value); + } else if (isTypoTypeof(left, right)) { + warning("W122", this, left.value); + } + return this; + }); + relation("!==", function (left, right) { + if (isTypoTypeof(right, left)) { + warning("W122", this, right.value); + } else if (isTypoTypeof(left, right)) { + warning("W122", this, left.value); + } + return this; + }); + relation("<"); + relation(">"); + relation("<="); + relation(">="); + bitwise("<<", "shiftleft", 120); + bitwise(">>", "shiftright", 120); + bitwise(">>>", "shiftrightunsigned", 120); + infix("in", "in", 120); + infix("instanceof", "instanceof", 120); + infix("+", function (left, that) { + var right = expression(130); + if (left && right && left.id === "(string)" && right.id === "(string)") { + left.value += right.value; + left.character = right.character; + if (!state.option.scripturl && reg.javascriptURL.test(left.value)) { + warning("W050", left); + } + return left; + } + that.left = left; + that.right = right; + return that; + }, 130); + prefix("+", "num"); + prefix("+++", function () { + warning("W007"); + this.right = expression(150); + this.arity = "unary"; + return this; + }); + infix("+++", function (left) { + warning("W007"); + this.left = left; + this.right = expression(130); + return this; + }, 130); + infix("-", "sub", 130); + prefix("-", "neg"); + prefix("---", function () { + warning("W006"); + this.right = expression(150); + this.arity = "unary"; + return this; + }); + infix("---", function (left) { + warning("W006"); + this.left = left; + this.right = expression(130); + return this; + }, 130); + infix("*", "mult", 140); + infix("/", "div", 140); + infix("%", "mod", 140); + + suffix("++", "postinc"); + prefix("++", "preinc"); + state.syntax["++"].exps = true; + + suffix("--", "postdec"); + prefix("--", "predec"); + state.syntax["--"].exps = true; + prefix("delete", function () { + var p = expression(10); + if (!p || (p.id !== "." && p.id !== "[")) { + warning("W051"); + } + this.first = p; + return this; + }).exps = true; + + prefix("~", function () { + if (state.option.bitwise) { + warning("W052", this, "~"); + } + expression(150); + return this; + }); + + prefix("...", function () { + if (!state.option.inESNext()) { + warning("W104", this, "spread/rest operator"); + } + if (!state.tokens.next.identifier) { + error("E030", state.tokens.next, state.tokens.next.value); + } + expression(150); + return this; + }); + + prefix("!", function () { + this.right = expression(150); + this.arity = "unary"; + + if (!this.right) { // '!' followed by nothing? Give up. + quit("E041", this.line || 0); + } + + if (bang[this.right.id] === true) { + warning("W018", this, "!"); + } + return this; + }); + + prefix("typeof", "typeof"); + prefix("new", function () { + var c = expression(155), i; + if (c && c.id !== "function") { + if (c.identifier) { + c["new"] = true; + switch (c.value) { + case "Number": + case "String": + case "Boolean": + case "Math": + case "JSON": + warning("W053", state.tokens.prev, c.value); + break; + case "Function": + if (!state.option.evil) { + warning("W054"); + } + break; + case "Date": + case "RegExp": + case "this": + break; + default: + if (c.id !== "function") { + i = c.value.substr(0, 1); + if (state.option.newcap && (i < "A" || i > "Z") && !_.has(global, c.value)) { + warning("W055", state.tokens.curr); + } + } + } + } else { + if (c.id !== "." && c.id !== "[" && c.id !== "(") { + warning("W056", state.tokens.curr); + } + } + } else { + if (!state.option.supernew) + warning("W057", this); + } + if (state.tokens.next.id !== "(" && !state.option.supernew) { + warning("W058", state.tokens.curr, state.tokens.curr.value); + } + this.first = c; + return this; + }); + state.syntax["new"].exps = true; + + prefix("void").exps = true; + + infix(".", function (left, that) { + var m = identifier(false, true); + + if (typeof m === "string") { + countMember(m); + } + + that.left = left; + that.right = m; + + if (m && m === "hasOwnProperty" && state.tokens.next.value === "=") { + warning("W001"); + } + + if (left && left.value === "arguments" && (m === "callee" || m === "caller")) { + if (state.option.noarg) + warning("W059", left, m); + else if (state.directive["use strict"]) + error("E008"); + } else if (!state.option.evil && left && left.value === "document" && + (m === "write" || m === "writeln")) { + warning("W060", left); + } + + if (!state.option.evil && (m === "eval" || m === "execScript")) { + warning("W061"); + } + + return that; + }, 160, true); + + infix("(", function (left, that) { + if (state.option.immed && left && !left.immed && left.id === "function") { + warning("W062"); + } + + var n = 0; + var p = []; + + if (left) { + if (left.type === "(identifier)") { + if (left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)) { + if ("Number String Boolean Date Object Error".indexOf(left.value) === -1) { + if (left.value === "Math") { + warning("W063", left); + } else if (state.option.newcap) { + warning("W064", left); + } + } + } + } + } + + if (state.tokens.next.id !== ")") { + for (;;) { + p[p.length] = expression(10); + n += 1; + if (state.tokens.next.id !== ",") { + break; + } + comma(); + } + } + + advance(")"); + + if (typeof left === "object") { + if (state.option.inES3() && left.value === "parseInt" && n === 1) { + warning("W065", state.tokens.curr); + } + if (!state.option.evil) { + if (left.value === "eval" || left.value === "Function" || + left.value === "execScript") { + warning("W061", left); + + if (p[0] && [0].id === "(string)") { + addInternalSrc(left, p[0].value); + } + } else if (p[0] && p[0].id === "(string)" && + (left.value === "setTimeout" || + left.value === "setInterval")) { + warning("W066", left); + addInternalSrc(left, p[0].value); + + // window.setTimeout/setInterval + } else if (p[0] && p[0].id === "(string)" && + left.value === "." && + left.left.value === "window" && + (left.right === "setTimeout" || + left.right === "setInterval")) { + warning("W066", left); + addInternalSrc(left, p[0].value); + } + } + if (!left.identifier && left.id !== "." && left.id !== "[" && + left.id !== "(" && left.id !== "&&" && left.id !== "||" && + left.id !== "?") { + warning("W067", left); + } + } + + that.left = left; + return that; + }, 155, true).exps = true; + + prefix("(", function () { + var bracket, brackets = []; + var pn, pn1, i = 0; + var ret; + var parens = 1; + + do { + pn = peek(i); + + if (pn.value === "(") { + parens += 1; + } else if (pn.value === ")") { + parens -= 1; + } + + i += 1; + pn1 = peek(i); + } while (!(parens === 0 && pn.value === ")") && + pn1.value !== "=>" && pn1.value !== ";" && pn1.type !== "(end)"); + + if (state.tokens.next.id === "function") { + state.tokens.next.immed = true; + } + + var exprs = []; + + if (state.tokens.next.id !== ")") { + for (;;) { + if (pn1.value === "=>" && _.contains(["{", "["], state.tokens.next.value)) { + bracket = state.tokens.next; + bracket.left = destructuringExpression(); + brackets.push(bracket); + for (var t in bracket.left) { + exprs.push(bracket.left[t].token); + } + } else { + exprs.push(expression(10)); + } + if (state.tokens.next.id !== ",") { + break; + } + comma(); + } + } + + advance(")", this); + if (state.option.immed && exprs[0] && exprs[0].id === "function") { + if (state.tokens.next.id !== "(" && + (state.tokens.next.id !== "." || (peek().value !== "call" && peek().value !== "apply"))) { + warning("W068", this); + } + } + + if (state.tokens.next.value === "=>") { + return exprs; + } + if (!exprs.length) { + return; + } + if (exprs.length > 1) { + ret = Object.create(state.syntax[","]); + ret.exprs = exprs; + } else { + ret = exprs[0]; + } + if (ret) { + ret.paren = true; + } + return ret; + }); + + application("=>"); + + infix("[", function (left, that) { + var e = expression(10), s; + if (e && e.type === "(string)") { + if (!state.option.evil && (e.value === "eval" || e.value === "execScript")) { + warning("W061", that); + } + + countMember(e.value); + if (!state.option.sub && reg.identifier.test(e.value)) { + s = state.syntax[e.value]; + if (!s || !isReserved(s)) { + warning("W069", state.tokens.prev, e.value); + } + } + } + advance("]", that); + + if (e && e.value === "hasOwnProperty" && state.tokens.next.value === "=") { + warning("W001"); + } + + that.left = left; + that.right = e; + return that; + }, 160, true); + + function comprehensiveArrayExpression() { + var res = {}; + res.exps = true; + funct["(comparray)"].stack(); + + // Handle reversed for expressions, used in spidermonkey + var reversed = false; + if (state.tokens.next.value !== "for") { + reversed = true; + if (!state.option.inMoz(true)) { + warning("W116", state.tokens.next, "for", state.tokens.next.value); + } + funct["(comparray)"].setState("use"); + res.right = expression(10); + } + + advance("for"); + if (state.tokens.next.value === "each") { + advance("each"); + if (!state.option.inMoz(true)) { + warning("W118", state.tokens.curr, "for each"); + } + } + advance("("); + funct["(comparray)"].setState("define"); + res.left = expression(130); + if (_.contains(["in", "of"], state.tokens.next.value)) { + advance(); + } else { + error("E045", state.tokens.curr); + } + funct["(comparray)"].setState("generate"); + expression(10); + + advance(")"); + if (state.tokens.next.value === "if") { + advance("if"); + advance("("); + funct["(comparray)"].setState("filter"); + res.filter = expression(10); + advance(")"); + } + + if (!reversed) { + funct["(comparray)"].setState("use"); + res.right = expression(10); + } + + advance("]"); + funct["(comparray)"].unstack(); + return res; + } + + prefix("[", function () { + var blocktype = lookupBlockType(true); + if (blocktype.isCompArray) { + if (!state.option.inESNext()) { + warning("W119", state.tokens.curr, "array comprehension"); + } + return comprehensiveArrayExpression(); + } else if (blocktype.isDestAssign && !state.option.inESNext()) { + warning("W104", state.tokens.curr, "destructuring assignment"); + } + var b = state.tokens.curr.line !== state.tokens.next.line; + this.first = []; + if (b) { + indent += state.option.indent; + if (state.tokens.next.from === indent + state.option.indent) { + indent += state.option.indent; + } + } + while (state.tokens.next.id !== "(end)") { + while (state.tokens.next.id === ",") { + if (!state.option.inES5()) + warning("W070"); + advance(","); + } + + if (state.tokens.next.id === "]") { + break; + } + + this.first.push(expression(10)); + if (state.tokens.next.id === ",") { + comma({ allowTrailing: true }); + if (state.tokens.next.id === "]" && !state.option.inES5(true)) { + warning("W070", state.tokens.curr); + break; + } + } else { + break; + } + } + if (b) { + indent -= state.option.indent; + } + advance("]", this); + return this; + }, 160); + + + function property_name() { + var id = optionalidentifier(false, true); + + if (!id) { + if (state.tokens.next.id === "(string)") { + id = state.tokens.next.value; + advance(); + } else if (state.tokens.next.id === "(number)") { + id = state.tokens.next.value.toString(); + advance(); + } + } + + if (id === "hasOwnProperty") { + warning("W001"); + } + + return id; + } + + function functionparams(parsed) { + var curr, next; + var params = []; + var ident; + var tokens = []; + var t; + var pastDefault = false; + + if (parsed) { + if (Array.isArray(parsed)) { + for (var i in parsed) { + curr = parsed[i]; + if (curr.value === "...") { + if (!state.option.inESNext()) { + warning("W104", curr, "spread/rest operator"); + } + continue; + } else if (curr.value !== ",") { + params.push(curr.value); + addlabel(curr.value, { type: "unused", token: curr }); + } + } + return params; + } else { + if (parsed.identifier === true) { + addlabel(parsed.value, { type: "unused", token: parsed }); + return [parsed]; + } + } + } + + next = state.tokens.next; + + advance("("); + + if (state.tokens.next.id === ")") { + advance(")"); + return; + } + + for (;;) { + if (_.contains(["{", "["], state.tokens.next.id)) { + tokens = destructuringExpression(); + for (t in tokens) { + t = tokens[t]; + if (t.id) { + params.push(t.id); + addlabel(t.id, { type: "unused", token: t.token }); + } + } + } else if (state.tokens.next.value === "...") { + if (!state.option.inESNext()) { + warning("W104", state.tokens.next, "spread/rest operator"); + } + advance("..."); + ident = identifier(true); + params.push(ident); + addlabel(ident, { type: "unused", token: state.tokens.curr }); + } else { + ident = identifier(true); + params.push(ident); + addlabel(ident, { type: "unused", token: state.tokens.curr }); + } + + // it is a syntax error to have a regular argument after a default argument + if (pastDefault) { + if (state.tokens.next.id !== "=") { + error("E051", state.tokens.current); + } + } + if (state.tokens.next.id === "=") { + if (!state.option.inESNext()) { + warning("W119", state.tokens.next, "default parameters"); + } + advance("="); + pastDefault = true; + expression(10); + } + if (state.tokens.next.id === ",") { + comma(); + } else { + advance(")", next); + return params; + } + } + } + + function setprop(funct, name, values) { + if (!funct["(properties)"][name]) { + funct["(properties)"][name] = { unused: false }; + } + + _.extend(funct["(properties)"][name], values); + } + + function getprop(funct, name, prop) { + if (!funct["(properties)"][name]) + return null; + + return funct["(properties)"][name][prop] || null; + } + + function functor(name, token, scope, overwrites) { + var funct = { + "(name)" : name, + "(breakage)" : 0, + "(loopage)" : 0, + "(scope)" : scope, + "(tokens)" : {}, + "(properties)": {}, + + "(catch)" : false, + "(global)" : false, + + "(line)" : null, + "(character)" : null, + "(metrics)" : null, + "(statement)" : null, + "(context)" : null, + "(blockscope)": null, + "(comparray)" : null, + "(generator)" : null, + "(params)" : null + }; + + if (token) { + _.extend(funct, { + "(line)" : token.line, + "(character)": token.character, + "(metrics)" : createMetrics(token) + }); + } + + _.extend(funct, overwrites); + + if (funct["(context)"]) { + funct["(blockscope)"] = funct["(context)"]["(blockscope)"]; + funct["(comparray)"] = funct["(context)"]["(comparray)"]; + } + + return funct; + } + + function doFunction(name, statement, generator, fatarrowparams) { + var f; + var oldOption = state.option; + var oldIgnored = state.ignored; + var oldScope = scope; + + state.option = Object.create(state.option); + state.ignored = Object.create(state.ignored); + scope = Object.create(scope); + + funct = functor(name || "\"" + anonname + "\"", state.tokens.next, scope, { + "(statement)": statement, + "(context)": funct, + "(generator)": generator ? true : null + }); + + f = funct; + state.tokens.curr.funct = funct; + + functions.push(funct); + + if (name) { + addlabel(name, { type: "function" }); + } + + funct["(params)"] = functionparams(fatarrowparams); + funct["(metrics)"].verifyMaxParametersPerFunction(funct["(params)"]); + + // So we parse fat-arrow functions after we encounter =>. So basically + // doFunction is called with the left side of => as its last argument. + // This means that the parser, at that point, had already added its + // arguments to the undefs array and here we undo that. + + JSHINT.undefs = _.filter(JSHINT.undefs, function (item) { + return !_.contains(_.union(fatarrowparams), item[2]); + }); + + block(false, true, true, fatarrowparams ? true : false); + + if (!state.option.noyield && generator && funct["(generator)"] !== "yielded") { + warning("W124", state.tokens.curr); + } + + funct["(metrics)"].verifyMaxStatementsPerFunction(); + funct["(metrics)"].verifyMaxComplexityPerFunction(); + funct["(unusedOption)"] = state.option.unused; + + scope = oldScope; + state.option = oldOption; + state.ignored = oldIgnored; + funct["(last)"] = state.tokens.curr.line; + funct["(lastcharacter)"] = state.tokens.curr.character; + + _.map(Object.keys(funct), function (key) { + if (key[0] === "(") return; + funct["(blockscope)"].unshadow(key); + }); + + funct = funct["(context)"]; + + return f; + } + + function createMetrics(functionStartToken) { + return { + statementCount: 0, + nestedBlockDepth: -1, + ComplexityCount: 1, + + verifyMaxStatementsPerFunction: function () { + if (state.option.maxstatements && + this.statementCount > state.option.maxstatements) { + warning("W071", functionStartToken, this.statementCount); + } + }, + + verifyMaxParametersPerFunction: function (params) { + params = params || []; + + if (state.option.maxparams && params.length > state.option.maxparams) { + warning("W072", functionStartToken, params.length); + } + }, + + verifyMaxNestedBlockDepthPerFunction: function () { + if (state.option.maxdepth && + this.nestedBlockDepth > 0 && + this.nestedBlockDepth === state.option.maxdepth + 1) { + warning("W073", null, this.nestedBlockDepth); + } + }, + + verifyMaxComplexityPerFunction: function () { + var max = state.option.maxcomplexity; + var cc = this.ComplexityCount; + if (max && cc > max) { + warning("W074", functionStartToken, cc); + } + } + }; + } + + function increaseComplexityCount() { + funct["(metrics)"].ComplexityCount += 1; + } + + // Parse assignments that were found instead of conditionals. + // For example: if (a = 1) { ... } + + function checkCondAssignment(expr) { + var id, paren; + if (expr) { + id = expr.id; + paren = expr.paren; + if (id === "," && (expr = expr.exprs[expr.exprs.length - 1])) { + id = expr.id; + paren = paren || expr.paren; + } + } + switch (id) { + case "=": + case "+=": + case "-=": + case "*=": + case "%=": + case "&=": + case "|=": + case "^=": + case "/=": + if (!paren && !state.option.boss) { + warning("W084"); + } + } + } + + + (function (x) { + x.nud = function (isclassdef) { + var b, f, i, p, t, g; + var props = {}; // All properties, including accessors + var tag = ""; + + function saveProperty(name, tkn) { + if (props[name] && _.has(props, name)) + warning("W075", state.tokens.next, i); + else + props[name] = {}; + + props[name].basic = true; + props[name].basictkn = tkn; + } + + function saveSetter(name, tkn) { + if (props[name] && _.has(props, name)) { + if (props[name].basic || props[name].setter) + warning("W075", state.tokens.next, i); + } else { + props[name] = {}; + } + + props[name].setter = true; + props[name].setterToken = tkn; + } + + function saveGetter(name) { + if (props[name] && _.has(props, name)) { + if (props[name].basic || props[name].getter) + warning("W075", state.tokens.next, i); + } else { + props[name] = {}; + } + + props[name].getter = true; + props[name].getterToken = state.tokens.curr; + } + + b = state.tokens.curr.line !== state.tokens.next.line; + if (b) { + indent += state.option.indent; + if (state.tokens.next.from === indent + state.option.indent) { + indent += state.option.indent; + } + } + + for (;;) { + if (state.tokens.next.id === "}") { + break; + } + + if (isclassdef && state.tokens.next.value === "static") { + advance("static"); + tag = "static "; + } + + if (state.tokens.next.value === "get" && peek().id !== ":") { + advance("get"); + + if (!state.option.inES5(!isclassdef)) { + error("E034"); + } + + i = property_name(); + + // ES6 allows for get() {...} and set() {...} method + // definition shorthand syntax, so we don't produce an error + // if the esnext option is enabled. + if (!i && !state.option.inESNext()) { + error("E035"); + } + + // It is a Syntax Error if PropName of MethodDefinition is + // "constructor" and SpecialMethod of MethodDefinition is true. + if (isclassdef && i === "constructor") { + error("E049", state.tokens.next, "class getter method", i); + } + + // We don't want to save this getter unless it's an actual getter + // and not an ES6 concise method + if (i) { + saveGetter(tag + i); + } + + t = state.tokens.next; + f = doFunction(); + p = f["(params)"]; + + // Don't warn about getter/setter pairs if this is an ES6 concise method + if (i && p) { + warning("W076", t, p[0], i); + } + } else if (state.tokens.next.value === "set" && peek().id !== ":") { + advance("set"); + + if (!state.option.inES5(!isclassdef)) { + error("E034"); + } + + i = property_name(); + + // ES6 allows for get() {...} and set() {...} method + // definition shorthand syntax, so we don't produce an error + // if the esnext option is enabled. + if (!i && !state.option.inESNext()) { + error("E035"); + } + + // It is a Syntax Error if PropName of MethodDefinition is + // "constructor" and SpecialMethod of MethodDefinition is true. + if (isclassdef && i === "constructor") { + error("E049", state.tokens.next, "class setter method", i); + } + + // We don't want to save this getter unless it's an actual getter + // and not an ES6 concise method + if (i) { + saveSetter(tag + i, state.tokens.next); + } + + t = state.tokens.next; + f = doFunction(); + p = f["(params)"]; + + // Don't warn about getter/setter pairs if this is an ES6 concise method + if (i && (!p || p.length !== 1)) { + warning("W077", t, i); + } + } else { + g = false; + if (state.tokens.next.value === "*" && state.tokens.next.type === "(punctuator)") { + if (!state.option.inESNext()) { + warning("W104", state.tokens.next, "generator functions"); + } + advance("*"); + g = true; + } + i = property_name(); + saveProperty(tag + i, state.tokens.next); + + if (typeof i !== "string") { + break; + } + + if (state.tokens.next.value === "(") { + if (!state.option.inESNext()) { + warning("W104", state.tokens.curr, "concise methods"); + } + doFunction(i, undefined, g); + } else if (!isclassdef) { + advance(":"); + expression(10); + } + } + // It is a Syntax Error if PropName of MethodDefinition is "prototype". + if (isclassdef && i === "prototype") { + error("E049", state.tokens.next, "class method", i); + } + + countMember(i); + if (isclassdef) { + tag = ""; + continue; + } + if (state.tokens.next.id === ",") { + comma({ allowTrailing: true, property: true }); + if (state.tokens.next.id === ",") { + warning("W070", state.tokens.curr); + } else if (state.tokens.next.id === "}" && !state.option.inES5(true)) { + warning("W070", state.tokens.curr); + } + } else { + break; + } + } + if (b) { + indent -= state.option.indent; + } + advance("}", this); + + // Check for lonely setters if in the ES5 mode. + if (state.option.inES5()) { + for (var name in props) { + if (_.has(props, name) && props[name].setter && !props[name].getter) { + warning("W078", props[name].setterToken); + } + } + } + return this; + }; + x.fud = function () { + error("E036", state.tokens.curr); + }; + }(delim("{"))); + + function destructuringExpression() { + var id, ids; + var identifiers = []; + if (!state.option.inESNext()) { + warning("W104", state.tokens.curr, "destructuring expression"); + } + var nextInnerDE = function () { + var ident; + if (_.contains(["[", "{"], state.tokens.next.value)) { + ids = destructuringExpression(); + for (var id in ids) { + id = ids[id]; + identifiers.push({ id: id.id, token: id.token }); + } + } else if (state.tokens.next.value === ",") { + identifiers.push({ id: null, token: state.tokens.curr }); + } else if (state.tokens.next.value === "(") { + advance("("); + nextInnerDE(); + advance(")"); + } else { + ident = identifier(); + if (ident) + identifiers.push({ id: ident, token: state.tokens.curr }); + } + }; + if (state.tokens.next.value === "[") { + advance("["); + nextInnerDE(); + while (state.tokens.next.value !== "]") { + advance(","); + nextInnerDE(); + } + advance("]"); + } else if (state.tokens.next.value === "{") { + advance("{"); + id = identifier(); + if (state.tokens.next.value === ":") { + advance(":"); + nextInnerDE(); + } else { + identifiers.push({ id: id, token: state.tokens.curr }); + } + while (state.tokens.next.value !== "}") { + advance(","); + id = identifier(); + if (state.tokens.next.value === ":") { + advance(":"); + nextInnerDE(); + } else { + identifiers.push({ id: id, token: state.tokens.curr }); + } + } + advance("}"); + } + return identifiers; + } + + function destructuringExpressionMatch(tokens, value) { + var first = value.first; + + if (!first) + return; + + _.zip(tokens, Array.isArray(first) ? first : [ first ]).forEach(function (val) { + var token = val[0]; + var value = val[1]; + + if (token && value) + token.first = value; + else if (token && token.first && !value) + warning("W080", token.first, token.first.value); + }); + } + + var conststatement = stmt("const", function (prefix) { + var tokens; + var value; + var lone; // State variable to know if it is a lone identifier, or a destructuring statement. + + if (!state.option.inESNext()) + warning("W104", state.tokens.curr, "const"); + + this.first = []; + for (;;) { + var names = []; + if (_.contains(["{", "["], state.tokens.next.value)) { + tokens = destructuringExpression(); + lone = false; + } else { + tokens = [ { id: identifier(), token: state.tokens.curr } ]; + lone = true; + } + for (var t in tokens) { + if (tokens.hasOwnProperty(t)) { + t = tokens[t]; + if (funct[t.id] === "const") { + warning("E011", null, t.id); + } + if (funct["(global)"] && predefined[t.id] === false) { + warning("W079", t.token, t.id); + } + if (t.id) { + addlabel(t.id, { token: t.token, type: "const", unused: true }); + names.push(t.token); + } + } + } + if (prefix) { + break; + } + + this.first = this.first.concat(names); + + if (state.tokens.next.id !== "=") { + warning("E012", state.tokens.curr, state.tokens.curr.value); + } + + if (state.tokens.next.id === "=") { + advance("="); + if (state.tokens.next.id === "undefined") { + warning("W080", state.tokens.prev, state.tokens.prev.value); + } + if (peek(0).id === "=" && state.tokens.next.identifier) { + warning("W120", state.tokens.next, state.tokens.next.value); + } + value = expression(10); + if (lone) { + tokens[0].first = value; + } else { + destructuringExpressionMatch(names, value); + } + } + + if (state.tokens.next.id !== ",") { + break; + } + comma(); + } + return this; + }); + + conststatement.exps = true; + var varstatement = stmt("var", function (prefix) { + // JavaScript does not have block scope. It only has function scope. So, + // declaring a variable in a block can have unexpected consequences. + var tokens, lone, value; + + this.first = []; + for (;;) { + var names = []; + if (_.contains(["{", "["], state.tokens.next.value)) { + tokens = destructuringExpression(); + lone = false; + } else { + tokens = [ { id: identifier(), token: state.tokens.curr } ]; + lone = true; + } + for (var t in tokens) { + if (tokens.hasOwnProperty(t)) { + t = tokens[t]; + if (state.option.inESNext() && funct[t.id] === "const") { + warning("E011", null, t.id); + } + if (funct["(global)"] && predefined[t.id] === false) { + warning("W079", t.token, t.id); + } + if (t.id) { + addlabel(t.id, { type: "unused", token: t.token }); + names.push(t.token); + } + } + } + if (prefix) { + break; + } + + this.first = this.first.concat(names); + + if (state.tokens.next.id === "=") { + advance("="); + if (state.tokens.next.id === "undefined") { + warning("W080", state.tokens.prev, state.tokens.prev.value); + } + if (peek(0).id === "=" && state.tokens.next.identifier) { + warning("W120", state.tokens.next, state.tokens.next.value); + } + value = expression(10); + if (lone) { + tokens[0].first = value; + } else { + destructuringExpressionMatch(names, value); + } + } + + if (state.tokens.next.id !== ",") { + break; + } + comma(); + } + return this; + }); + varstatement.exps = true; + + var letstatement = stmt("let", function (prefix) { + var tokens, lone, value, letblock; + + if (!state.option.inESNext()) { + warning("W104", state.tokens.curr, "let"); + } + + if (state.tokens.next.value === "(") { + if (!state.option.inMoz(true)) { + warning("W118", state.tokens.next, "let block"); + } + advance("("); + funct["(blockscope)"].stack(); + letblock = true; + } else if (funct["(nolet)"]) { + error("E048", state.tokens.curr); + } + + this.first = []; + for (;;) { + var names = []; + if (_.contains(["{", "["], state.tokens.next.value)) { + tokens = destructuringExpression(); + lone = false; + } else { + tokens = [ { id: identifier(), token: state.tokens.curr.value } ]; + lone = true; + } + for (var t in tokens) { + if (tokens.hasOwnProperty(t)) { + t = tokens[t]; + if (state.option.inESNext() && funct[t.id] === "const") { + warning("E011", null, t.id); + } + if (funct["(global)"] && predefined[t.id] === false) { + warning("W079", t.token, t.id); + } + if (t.id && !funct["(nolet)"]) { + addlabel(t.id, { type: "unused", token: t.token, islet: true }); + names.push(t.token); + } + } + } + if (prefix) { + break; + } + + this.first = this.first.concat(names); + + if (state.tokens.next.id === "=") { + advance("="); + if (state.tokens.next.id === "undefined") { + warning("W080", state.tokens.prev, state.tokens.prev.value); + } + if (peek(0).id === "=" && state.tokens.next.identifier) { + warning("W120", state.tokens.next, state.tokens.next.value); + } + value = expression(10); + if (lone) { + tokens[0].first = value; + } else { + destructuringExpressionMatch(names, value); + } + } + + if (state.tokens.next.id !== ",") { + break; + } + comma(); + } + if (letblock) { + advance(")"); + block(true, true); + this.block = true; + funct["(blockscope)"].unstack(); + } + + return this; + }); + letstatement.exps = true; + + blockstmt("class", function () { + return classdef.call(this, true); + }); + + function classdef(stmt) { + /*jshint validthis:true */ + if (!state.option.inESNext()) { + warning("W104", state.tokens.curr, "class"); + } + if (stmt) { + // BindingIdentifier + this.name = identifier(); + addlabel(this.name, { type: "unused", token: state.tokens.curr }); + } else if (state.tokens.next.identifier && state.tokens.next.value !== "extends") { + // BindingIdentifier(opt) + this.name = identifier(); + } + classtail(this); + return this; + } + + function classtail(c) { + var strictness = state.directive["use strict"]; + + // ClassHeritage(opt) + if (state.tokens.next.value === "extends") { + advance("extends"); + c.heritage = expression(10); + } + + // A ClassBody is always strict code. + state.directive["use strict"] = true; + advance("{"); + // ClassBody(opt) + c.body = state.syntax["{"].nud(true); + state.directive["use strict"] = strictness; + } + + blockstmt("function", function () { + var generator = false; + if (state.tokens.next.value === "*") { + advance("*"); + if (state.option.inESNext(true)) { + generator = true; + } else { + warning("W119", state.tokens.curr, "function*"); + } + } + if (inblock) { + warning("W082", state.tokens.curr); + + } + var i = identifier(); + if (funct[i] === "const") { + warning("E011", null, i); + } + addlabel(i, { type: "unction", token: state.tokens.curr }); + + doFunction(i, { statement: true }, generator); + if (state.tokens.next.id === "(" && state.tokens.next.line === state.tokens.curr.line) { + error("E039"); + } + return this; + }); + + prefix("function", function () { + var generator = false; + if (state.tokens.next.value === "*") { + if (!state.option.inESNext()) { + warning("W119", state.tokens.curr, "function*"); + } + advance("*"); + generator = true; + } + var i = optionalidentifier(); + doFunction(i, undefined, generator); + if (!state.option.loopfunc && funct["(loopage)"]) { + warning("W083"); + } + return this; + }); + + blockstmt("if", function () { + var t = state.tokens.next; + increaseComplexityCount(); + state.condition = true; + advance("("); + checkCondAssignment(expression(0)); + advance(")", t); + state.condition = false; + block(true, true); + if (state.tokens.next.id === "else") { + advance("else"); + if (state.tokens.next.id === "if" || state.tokens.next.id === "switch") { + statement(true); + } else { + block(true, true); + } + } + return this; + }); + + blockstmt("try", function () { + var b; + + function doCatch() { + var oldScope = scope; + var e; + + advance("catch"); + advance("("); + + scope = Object.create(oldScope); + + e = state.tokens.next.value; + if (state.tokens.next.type !== "(identifier)") { + e = null; + warning("E030", state.tokens.next, e); + } + + advance(); + + funct = functor("(catch)", state.tokens.next, scope, { + "(context)" : funct, + "(breakage)" : funct["(breakage)"], + "(loopage)" : funct["(loopage)"], + "(statement)": false, + "(catch)" : true + }); + + if (e) { + addlabel(e, { type: "exception" }); + } + + if (state.tokens.next.value === "if") { + if (!state.option.inMoz(true)) { + warning("W118", state.tokens.curr, "catch filter"); + } + advance("if"); + expression(0); + } + + advance(")"); + + state.tokens.curr.funct = funct; + functions.push(funct); + + block(false); + + scope = oldScope; + + funct["(last)"] = state.tokens.curr.line; + funct["(lastcharacter)"] = state.tokens.curr.character; + funct = funct["(context)"]; + } + + block(true); + + while (state.tokens.next.id === "catch") { + increaseComplexityCount(); + if (b && (!state.option.inMoz(true))) { + warning("W118", state.tokens.next, "multiple catch blocks"); + } + doCatch(); + b = true; + } + + if (state.tokens.next.id === "finally") { + advance("finally"); + block(true); + return; + } + + if (!b) { + error("E021", state.tokens.next, "catch", state.tokens.next.value); + } + + return this; + }); + + blockstmt("while", function () { + var t = state.tokens.next; + funct["(breakage)"] += 1; + funct["(loopage)"] += 1; + increaseComplexityCount(); + advance("("); + checkCondAssignment(expression(0)); + advance(")", t); + block(true, true); + funct["(breakage)"] -= 1; + funct["(loopage)"] -= 1; + return this; + }).labelled = true; + + blockstmt("with", function () { + var t = state.tokens.next; + if (state.directive["use strict"]) { + error("E010", state.tokens.curr); + } else if (!state.option.withstmt) { + warning("W085", state.tokens.curr); + } + + advance("("); + expression(0); + advance(")", t); + block(true, true); + + return this; + }); + + blockstmt("switch", function () { + var t = state.tokens.next; + var g = false; + var noindent = false; + + funct["(breakage)"] += 1; + advance("("); + checkCondAssignment(expression(0)); + advance(")", t); + t = state.tokens.next; + advance("{"); + + if (state.tokens.next.from === indent) + noindent = true; + + if (!noindent) + indent += state.option.indent; + + this.cases = []; + + for (;;) { + switch (state.tokens.next.id) { + case "case": + switch (funct["(verb)"]) { + case "yield": + case "break": + case "case": + case "continue": + case "return": + case "switch": + case "throw": + break; + default: + // You can tell JSHint that you don't use break intentionally by + // adding a comment /* falls through */ on a line just before + // the next `case`. + if (!reg.fallsThrough.test(state.lines[state.tokens.next.line - 2])) { + warning("W086", state.tokens.curr, "case"); + } + } + + advance("case"); + this.cases.push(expression(0)); + increaseComplexityCount(); + g = true; + advance(":"); + funct["(verb)"] = "case"; + break; + case "default": + switch (funct["(verb)"]) { + case "yield": + case "break": + case "continue": + case "return": + case "throw": + break; + default: + // Do not display a warning if 'default' is the first statement or if + // there is a special /* falls through */ comment. + if (this.cases.length) { + if (!reg.fallsThrough.test(state.lines[state.tokens.next.line - 2])) { + warning("W086", state.tokens.curr, "default"); + } + } + } + + advance("default"); + g = true; + advance(":"); + break; + case "}": + if (!noindent) + indent -= state.option.indent; + + advance("}", t); + funct["(breakage)"] -= 1; + funct["(verb)"] = undefined; + return; + case "(end)": + error("E023", state.tokens.next, "}"); + return; + default: + indent += state.option.indent; + if (g) { + switch (state.tokens.curr.id) { + case ",": + error("E040"); + return; + case ":": + g = false; + statements(); + break; + default: + error("E025", state.tokens.curr); + return; + } + } else { + if (state.tokens.curr.id === ":") { + advance(":"); + error("E024", state.tokens.curr, ":"); + statements(); + } else { + error("E021", state.tokens.next, "case", state.tokens.next.value); + return; + } + } + indent -= state.option.indent; + } + } + }).labelled = true; + + stmt("debugger", function () { + if (!state.option.debug) { + warning("W087", this); + } + return this; + }).exps = true; + + (function () { + var x = stmt("do", function () { + funct["(breakage)"] += 1; + funct["(loopage)"] += 1; + increaseComplexityCount(); + + this.first = block(true, true); + advance("while"); + var t = state.tokens.next; + advance("("); + checkCondAssignment(expression(0)); + advance(")", t); + funct["(breakage)"] -= 1; + funct["(loopage)"] -= 1; + return this; + }); + x.labelled = true; + x.exps = true; + }()); + + blockstmt("for", function () { + var s, t = state.tokens.next; + var letscope = false; + var foreachtok = null; + + if (t.value === "each") { + foreachtok = t; + advance("each"); + if (!state.option.inMoz(true)) { + warning("W118", state.tokens.curr, "for each"); + } + } + + funct["(breakage)"] += 1; + funct["(loopage)"] += 1; + increaseComplexityCount(); + advance("("); + + // what kind of for(…) statement it is? for(…of…)? for(…in…)? for(…;…;…)? + var nextop; // contains the token of the "in" or "of" operator + var i = 0; + var inof = ["in", "of"]; + do { + nextop = peek(i); + ++i; + } while (!_.contains(inof, nextop.value) && nextop.value !== ";" && + nextop.type !== "(end)"); + + // if we're in a for (… in|of …) statement + if (_.contains(inof, nextop.value)) { + if (!state.option.inESNext() && nextop.value === "of") { + error("W104", nextop, "for of"); + } + + if (state.tokens.next.id === "var") { + advance("var"); + state.syntax["var"].fud.call(state.syntax["var"].fud, true); + } else if (state.tokens.next.id === "let") { + advance("let"); + // create a new block scope + letscope = true; + funct["(blockscope)"].stack(); + state.syntax["let"].fud.call(state.syntax["let"].fud, true); + } else if (!state.tokens.next.identifier) { + error("E030", state.tokens.next, state.tokens.next.type); + advance(); + } else { + switch (funct[state.tokens.next.value]) { + case "unused": + funct[state.tokens.next.value] = "var"; + break; + case "var": + break; + default: + if (!funct["(blockscope)"].getlabel(state.tokens.next.value)) + warning("W088", state.tokens.next, state.tokens.next.value); + } + advance(); + } + advance(nextop.value); + expression(20); + advance(")", t); + s = block(true, true); + if (state.option.forin && s && (s.length > 1 || typeof s[0] !== "object" || + s[0].value !== "if")) { + warning("W089", this); + } + funct["(breakage)"] -= 1; + funct["(loopage)"] -= 1; + } else { + if (foreachtok) { + error("E045", foreachtok); + } + if (state.tokens.next.id !== ";") { + if (state.tokens.next.id === "var") { + advance("var"); + state.syntax["var"].fud.call(state.syntax["var"].fud); + } else if (state.tokens.next.id === "let") { + advance("let"); + // create a new block scope + letscope = true; + funct["(blockscope)"].stack(); + state.syntax["let"].fud.call(state.syntax["let"].fud); + } else { + for (;;) { + expression(0, "for"); + if (state.tokens.next.id !== ",") { + break; + } + comma(); + } + } + } + nolinebreak(state.tokens.curr); + advance(";"); + if (state.tokens.next.id !== ";") { + checkCondAssignment(expression(0)); + } + nolinebreak(state.tokens.curr); + advance(";"); + if (state.tokens.next.id === ";") { + error("E021", state.tokens.next, ")", ";"); + } + if (state.tokens.next.id !== ")") { + for (;;) { + expression(0, "for"); + if (state.tokens.next.id !== ",") { + break; + } + comma(); + } + } + advance(")", t); + block(true, true); + funct["(breakage)"] -= 1; + funct["(loopage)"] -= 1; + + } + // unstack loop blockscope + if (letscope) { + funct["(blockscope)"].unstack(); + } + return this; + }).labelled = true; + + + stmt("break", function () { + var v = state.tokens.next.value; + + if (funct["(breakage)"] === 0) + warning("W052", state.tokens.next, this.value); + + if (!state.option.asi) + nolinebreak(this); + + if (state.tokens.next.id !== ";" && !state.tokens.next.reach) { + if (state.tokens.curr.line === state.tokens.next.line) { + if (funct[v] !== "label") { + warning("W090", state.tokens.next, v); + } else if (scope[v] !== funct) { + warning("W091", state.tokens.next, v); + } + this.first = state.tokens.next; + advance(); + } + } + reachable("break"); + return this; + }).exps = true; + + + stmt("continue", function () { + var v = state.tokens.next.value; + + if (funct["(breakage)"] === 0) + warning("W052", state.tokens.next, this.value); + + if (!state.option.asi) + nolinebreak(this); + + if (state.tokens.next.id !== ";" && !state.tokens.next.reach) { + if (state.tokens.curr.line === state.tokens.next.line) { + if (funct[v] !== "label") { + warning("W090", state.tokens.next, v); + } else if (scope[v] !== funct) { + warning("W091", state.tokens.next, v); + } + this.first = state.tokens.next; + advance(); + } + } else if (!funct["(loopage)"]) { + warning("W052", state.tokens.next, this.value); + } + reachable("continue"); + return this; + }).exps = true; + + + stmt("return", function () { + if (this.line === state.tokens.next.line) { + if (state.tokens.next.id !== ";" && !state.tokens.next.reach) { + this.first = expression(0); + + if (this.first && + this.first.type === "(punctuator)" && this.first.value === "=" && + !this.first.paren && !state.option.boss) { + warningAt("W093", this.first.line, this.first.character); + } + } + } else { + if (state.tokens.next.type === "(punctuator)" && + ["[", "{", "+", "-"].indexOf(state.tokens.next.value) > -1) { + nolinebreak(this); // always warn (Line breaking error) + } + } + reachable("return"); + return this; + }).exps = true; + + (function (x) { + x.exps = true; + x.lbp = 25; + }(prefix("yield", function () { + var prev = state.tokens.prev; + if (state.option.inESNext(true) && !funct["(generator)"]) { + // If it's a yield within a catch clause inside a generator then that's ok + if (!("(catch)" === funct["(name)"] && funct["(context)"]["(generator)"])) { + error("E046", state.tokens.curr, "yield"); + } + } else if (!state.option.inESNext()) { + warning("W104", state.tokens.curr, "yield"); + } + funct["(generator)"] = "yielded"; + if (this.line === state.tokens.next.line || !state.option.inMoz(true)) { + if (state.tokens.next.id !== ";" && !state.tokens.next.reach && state.tokens.next.nud) { + nobreaknonadjacent(state.tokens.curr, state.tokens.next); + this.first = expression(10); + + if (this.first.type === "(punctuator)" && this.first.value === "=" && + !this.first.paren && !state.option.boss) { + warningAt("W093", this.first.line, this.first.character); + } + } + + if (state.option.inMoz(true) && state.tokens.next.id !== ")" && + (prev.lbp > 30 || (!prev.assign && !isEndOfExpr()) || prev.id === "yield")) { + error("E050", this); + } + } else if (!state.option.asi) { + nolinebreak(this); // always warn (Line breaking error) + } + return this; + }))); + + + stmt("throw", function () { + nolinebreak(this); + this.first = expression(20); + reachable("throw"); + return this; + }).exps = true; + + stmt("import", function () { + if (!state.option.inESNext()) { + warning("W119", state.tokens.curr, "import"); + } + + if (state.tokens.next.type === "(string)") { + advance("(string)"); + return this; + } + if (state.tokens.next.identifier) { + this.name = identifier(); + addlabel(this.name, { type: "unused", token: state.tokens.curr }); + } else { + advance("{"); + for (;;) { + if (state.tokens.next.value === "}") { + advance("}"); + break; + } + var importName; + if (state.tokens.next.type === "default") { + importName = "default"; + advance("default"); + } else { + importName = identifier(); + } + if (state.tokens.next.value === "as") { + advance("as"); + importName = identifier(); + } + addlabel(importName, { type: "unused", token: state.tokens.curr }); + + if (state.tokens.next.value === ",") { + advance(","); + } else if (state.tokens.next.value === "}") { + advance("}"); + break; + } else { + error("E024", state.tokens.next, state.tokens.next.value); + break; + } + } + } + + advance("from"); + advance("(string)"); + return this; + }).exps = true; + + stmt("export", function () { + if (!state.option.inESNext()) { + warning("W119", state.tokens.curr, "export"); + } + + if (state.tokens.next.type === "default") { + advance("default"); + if (state.tokens.next.id === "function" || state.tokens.next.id === "class") { + this.block = true; + } + this.exportee = expression(10); + + return this; + } + + if (state.tokens.next.value === "{") { + advance("{"); + for (;;) { + exported[identifier()] = true; + + if (state.tokens.next.value === ",") { + advance(","); + } else if (state.tokens.next.value === "}") { + advance("}"); + break; + } else { + error("E024", state.tokens.next, state.tokens.next.value); + break; + } + } + return this; + } + + if (state.tokens.next.id === "var") { + advance("var"); + exported[state.tokens.next.value] = true; + state.syntax["var"].fud.call(state.syntax["var"].fud); + } else if (state.tokens.next.id === "let") { + advance("let"); + exported[state.tokens.next.value] = true; + state.syntax["let"].fud.call(state.syntax["let"].fud); + } else if (state.tokens.next.id === "const") { + advance("const"); + exported[state.tokens.next.value] = true; + state.syntax["const"].fud.call(state.syntax["const"].fud); + } else if (state.tokens.next.id === "function") { + this.block = true; + advance("function"); + exported[state.tokens.next.value] = true; + state.syntax["function"].fud(); + } else if (state.tokens.next.id === "class") { + this.block = true; + advance("class"); + exported[state.tokens.next.value] = true; + state.syntax["class"].fud(); + } else { + error("E024", state.tokens.next, state.tokens.next.value); + } + + return this; + }).exps = true; + + // Future Reserved Words + + FutureReservedWord("abstract"); + FutureReservedWord("boolean"); + FutureReservedWord("byte"); + FutureReservedWord("char"); + FutureReservedWord("class", { es5: true, nud: classdef }); + FutureReservedWord("double"); + FutureReservedWord("enum", { es5: true }); + FutureReservedWord("export", { es5: true }); + FutureReservedWord("extends", { es5: true }); + FutureReservedWord("final"); + FutureReservedWord("float"); + FutureReservedWord("goto"); + FutureReservedWord("implements", { es5: true, strictOnly: true }); + FutureReservedWord("import", { es5: true }); + FutureReservedWord("int"); + FutureReservedWord("interface", { es5: true, strictOnly: true }); + FutureReservedWord("long"); + FutureReservedWord("native"); + FutureReservedWord("package", { es5: true, strictOnly: true }); + FutureReservedWord("private", { es5: true, strictOnly: true }); + FutureReservedWord("protected", { es5: true, strictOnly: true }); + FutureReservedWord("public", { es5: true, strictOnly: true }); + FutureReservedWord("short"); + FutureReservedWord("static", { es5: true, strictOnly: true }); + FutureReservedWord("super", { es5: true }); + FutureReservedWord("synchronized"); + FutureReservedWord("throws"); + FutureReservedWord("transient"); + FutureReservedWord("volatile"); + + // this function is used to determine wether a squarebracket or a curlybracket + // expression is a comprehension array, destructuring assignment or a json value. + + var lookupBlockType = function () { + var pn, pn1; + var i = -1; + var bracketStack = 0; + var ret = {}; + if (_.contains(["[", "{"], state.tokens.curr.value)) + bracketStack += 1; + do { + pn = (i === -1) ? state.tokens.next : peek(i); + pn1 = peek(i + 1); + i = i + 1; + if (_.contains(["[", "{"], pn.value)) { + bracketStack += 1; + } else if (_.contains(["]", "}"], pn.value)) { + bracketStack -= 1; + } + if (pn.identifier && pn.value === "for" && bracketStack === 1) { + ret.isCompArray = true; + ret.notJson = true; + break; + } + if (_.contains(["}", "]"], pn.value) && pn1.value === "=" && bracketStack === 0) { + ret.isDestAssign = true; + ret.notJson = true; + break; + } + if (pn.value === ";") { + ret.isBlock = true; + ret.notJson = true; + } + } while (bracketStack > 0 && pn.id !== "(end)" && i < 15); + return ret; + }; + + // Check whether this function has been reached for a destructuring assign with undeclared values + function destructuringAssignOrJsonValue() { + // lookup for the assignment (esnext only) + // if it has semicolons, it is a block, so go parse it as a block + // or it's not a block, but there are assignments, check for undeclared variables + + var block = lookupBlockType(); + if (block.notJson) { + if (!state.option.inESNext() && block.isDestAssign) { + warning("W104", state.tokens.curr, "destructuring assignment"); + } + statements(); + // otherwise parse json value + } else { + state.option.laxbreak = true; + state.jsonMode = true; + jsonValue(); + } + } + + // array comprehension parsing function + // parses and defines the three states of the list comprehension in order + // to avoid defining global variables, but keeping them to the list comprehension scope + // only. The order of the states are as follows: + // * "use" which will be the returned iterative part of the list comprehension + // * "define" which will define the variables local to the list comprehension + // * "filter" which will help filter out values + + var arrayComprehension = function () { + var CompArray = function () { + this.mode = "use"; + this.variables = []; + }; + var _carrays = []; + var _current; + function declare(v) { + var l = _current.variables.filter(function (elt) { + // if it has, change its undef state + if (elt.value === v) { + elt.undef = false; + return v; + } + }).length; + return l !== 0; + } + function use(v) { + var l = _current.variables.filter(function (elt) { + // and if it has been defined + if (elt.value === v && !elt.undef) { + if (elt.unused === true) { + elt.unused = false; + } + return v; + } + }).length; + // otherwise we warn about it + return (l === 0); + } + return {stack: function () { + _current = new CompArray(); + _carrays.push(_current); + }, + unstack: function () { + _current.variables.filter(function (v) { + if (v.unused) + warning("W098", v.token, v.value); + if (v.undef) + isundef(v.funct, "W117", v.token, v.value); + }); + _carrays.splice(-1, 1); + _current = _carrays[_carrays.length - 1]; + }, + setState: function (s) { + if (_.contains(["use", "define", "generate", "filter"], s)) + _current.mode = s; + }, + check: function (v) { + if (!_current) { + return; + } + // When we are in "use" state of the list comp, we enqueue that var + if (_current && _current.mode === "use") { + if (use(v)) { + _current.variables.push({ + funct: funct, + token: state.tokens.curr, + value: v, + undef: true, + unused: false + }); + } + return true; + // When we are in "define" state of the list comp, + } else if (_current && _current.mode === "define") { + // check if the variable has been used previously + if (!declare(v)) { + _current.variables.push({ + funct: funct, + token: state.tokens.curr, + value: v, + undef: false, + unused: true + }); + } + return true; + // When we are in the "generate" state of the list comp, + } else if (_current && _current.mode === "generate") { + isundef(funct, "W117", state.tokens.curr, v); + return true; + // When we are in "filter" state, + } else if (_current && _current.mode === "filter") { + // we check whether current variable has been declared + if (use(v)) { + // if not we warn about it + isundef(funct, "W117", state.tokens.curr, v); + } + return true; + } + return false; + } + }; + }; + + + // Parse JSON + + function jsonValue() { + function jsonObject() { + var o = {}, t = state.tokens.next; + advance("{"); + if (state.tokens.next.id !== "}") { + for (;;) { + if (state.tokens.next.id === "(end)") { + error("E026", state.tokens.next, t.line); + } else if (state.tokens.next.id === "}") { + warning("W094", state.tokens.curr); + break; + } else if (state.tokens.next.id === ",") { + error("E028", state.tokens.next); + } else if (state.tokens.next.id !== "(string)") { + warning("W095", state.tokens.next, state.tokens.next.value); + } + if (o[state.tokens.next.value] === true) { + warning("W075", state.tokens.next, state.tokens.next.value); + } else if ((state.tokens.next.value === "__proto__" && + !state.option.proto) || (state.tokens.next.value === "__iterator__" && + !state.option.iterator)) { + warning("W096", state.tokens.next, state.tokens.next.value); + } else { + o[state.tokens.next.value] = true; + } + advance(); + advance(":"); + jsonValue(); + if (state.tokens.next.id !== ",") { + break; + } + advance(","); + } + } + advance("}"); + } + + function jsonArray() { + var t = state.tokens.next; + advance("["); + if (state.tokens.next.id !== "]") { + for (;;) { + if (state.tokens.next.id === "(end)") { + error("E027", state.tokens.next, t.line); + } else if (state.tokens.next.id === "]") { + warning("W094", state.tokens.curr); + break; + } else if (state.tokens.next.id === ",") { + error("E028", state.tokens.next); + } + jsonValue(); + if (state.tokens.next.id !== ",") { + break; + } + advance(","); + } + } + advance("]"); + } + + switch (state.tokens.next.id) { + case "{": + jsonObject(); + break; + case "[": + jsonArray(); + break; + case "true": + case "false": + case "null": + case "(number)": + case "(string)": + advance(); + break; + case "-": + advance("-"); + advance("(number)"); + break; + default: + error("E003", state.tokens.next); + } + } + + var blockScope = function () { + var _current = {}; + var _variables = [_current]; + + function _checkBlockLabels() { + for (var t in _current) { + if (_current[t]["(type)"] === "unused") { + if (state.option.unused) { + var tkn = _current[t]["(token)"]; + var line = tkn.line; + var chr = tkn.character; + warningAt("W098", line, chr, t); + } + } + } + } + + return { + stack: function () { + _current = {}; + _variables.push(_current); + }, + + unstack: function () { + _checkBlockLabels(); + _variables.splice(_variables.length - 1, 1); + _current = _.last(_variables); + }, + + getlabel: function (l) { + for (var i = _variables.length - 1 ; i >= 0; --i) { + if (_.has(_variables[i], l) && !_variables[i][l]["(shadowed)"]) { + return _variables[i]; + } + } + }, + + shadow: function (name) { + for (var i = _variables.length - 1; i >= 0; i--) { + if (_.has(_variables[i], name)) { + _variables[i][name]["(shadowed)"] = true; + } + } + }, + + unshadow: function (name) { + for (var i = _variables.length - 1; i >= 0; i--) { + if (_.has(_variables[i], name)) { + _variables[i][name]["(shadowed)"] = false; + } + } + }, + + current: { + has: function (t) { + return _.has(_current, t); + }, + + add: function (t, type, tok) { + _current[t] = { "(type)" : type, "(token)": tok, "(shadowed)": false }; + } + } + }; + }; + + // The actual JSHINT function itself. + var itself = function (s, o, g) { + var i, k, x; + var optionKeys; + var newOptionObj = {}; + var newIgnoredObj = {}; + + o = _.clone(o); + state.reset(); + + if (o && o.scope) { + JSHINT.scope = o.scope; + } else { + JSHINT.errors = []; + JSHINT.undefs = []; + JSHINT.internals = []; + JSHINT.blacklist = {}; + JSHINT.scope = "(main)"; + } + + predefined = Object.create(null); + combine(predefined, vars.ecmaIdentifiers); + combine(predefined, vars.reservedVars); + + combine(predefined, g || {}); + + declared = Object.create(null); + exported = Object.create(null); + + function each(obj, cb) { + if (!obj) + return; + + if (!Array.isArray(obj) && typeof obj === "object") + obj = Object.keys(obj); + + obj.forEach(cb); + } + + if (o) { + each(o.predef || null, function (item) { + var slice, prop; + + if (item[0] === "-") { + slice = item.slice(1); + JSHINT.blacklist[slice] = slice; + } else { + prop = Object.getOwnPropertyDescriptor(o.predef, item); + predefined[item] = prop ? prop.value : false; + } + }); + + each(o.exported || null, function (item) { + exported[item] = true; + }); + + delete o.predef; + delete o.exported; + + optionKeys = Object.keys(o); + for (x = 0; x < optionKeys.length; x++) { + if (/^-W\d{3}$/g.test(optionKeys[x])) { + newIgnoredObj[optionKeys[x].slice(1)] = true; + } else { + newOptionObj[optionKeys[x]] = o[optionKeys[x]]; + + if (optionKeys[x] === "newcap" && o[optionKeys[x]] === false) + newOptionObj["(explicitNewcap)"] = true; + } + } + } + + state.option = newOptionObj; + state.ignored = newIgnoredObj; + + state.option.indent = state.option.indent || 4; + state.option.maxerr = state.option.maxerr || 50; + + indent = 1; + global = Object.create(predefined); + scope = global; + + funct = functor("(global)", null, scope, { + "(global)" : true, + "(blockscope)": blockScope(), + "(comparray)" : arrayComprehension(), + "(metrics)" : createMetrics(state.tokens.next) + }); + + functions = [funct]; + urls = []; + stack = null; + member = {}; + membersOnly = null; + implied = {}; + inblock = false; + lookahead = []; + unuseds = []; + + if (!isString(s) && !Array.isArray(s)) { + errorAt("E004", 0); + return false; + } + + api = { + get isJSON() { + return state.jsonMode; + }, + + getOption: function (name) { + return state.option[name] || null; + }, + + getCache: function (name) { + return state.cache[name]; + }, + + setCache: function (name, value) { + state.cache[name] = value; + }, + + warn: function (code, data) { + warningAt.apply(null, [ code, data.line, data.char ].concat(data.data)); + }, + + on: function (names, listener) { + names.split(" ").forEach(function (name) { + emitter.on(name, listener); + }.bind(this)); + } + }; + + emitter.removeAllListeners(); + (extraModules || []).forEach(function (func) { + func(api); + }); + + state.tokens.prev = state.tokens.curr = state.tokens.next = state.syntax["(begin)"]; + + lex = new Lexer(s); + + lex.on("warning", function (ev) { + warningAt.apply(null, [ ev.code, ev.line, ev.character].concat(ev.data)); + }); + + lex.on("error", function (ev) { + errorAt.apply(null, [ ev.code, ev.line, ev.character ].concat(ev.data)); + }); + + lex.on("fatal", function (ev) { + quit("E041", ev.line, ev.from); + }); + + lex.on("Identifier", function (ev) { + emitter.emit("Identifier", ev); + }); + + lex.on("String", function (ev) { + emitter.emit("String", ev); + }); + + lex.on("Number", function (ev) { + emitter.emit("Number", ev); + }); + + lex.start(); + + // Check options + for (var name in o) { + if (_.has(o, name)) { + checkOption(name, state.tokens.curr); + } + } + + assume(); + + // combine the passed globals after we've assumed all our options + combine(predefined, g || {}); + + //reset values + comma.first = true; + + try { + advance(); + switch (state.tokens.next.id) { + case "{": + case "[": + destructuringAssignOrJsonValue(); + break; + default: + directives(); + + if (state.directive["use strict"]) { + if (!state.option.globalstrict && !(state.option.node || state.option.phantom)) { + warning("W097", state.tokens.prev); + } + } + + statements(); + } + advance((state.tokens.next && state.tokens.next.value !== ".") ? "(end)" : undefined); + funct["(blockscope)"].unstack(); + + var markDefined = function (name, context) { + do { + if (typeof context[name] === "string") { + // JSHINT marks unused variables as 'unused' and + // unused function declaration as 'unction'. This + // code changes such instances back 'var' and + // 'closure' so that the code in JSHINT.data() + // doesn't think they're unused. + + if (context[name] === "unused") + context[name] = "var"; + else if (context[name] === "unction") + context[name] = "closure"; + + return true; + } + + context = context["(context)"]; + } while (context); + + return false; + }; + + var clearImplied = function (name, line) { + if (!implied[name]) + return; + + var newImplied = []; + for (var i = 0; i < implied[name].length; i += 1) { + if (implied[name][i] !== line) + newImplied.push(implied[name][i]); + } + + if (newImplied.length === 0) + delete implied[name]; + else + implied[name] = newImplied; + }; + + var warnUnused = function (name, tkn, type, unused_opt) { + var line = tkn.line; + var chr = tkn.character; + + if (unused_opt === undefined) { + unused_opt = state.option.unused; + } + + if (unused_opt === true) { + unused_opt = "last-param"; + } + + var warnable_types = { + "vars": ["var"], + "last-param": ["var", "param"], + "strict": ["var", "param", "last-param"] + }; + + if (unused_opt) { + if (warnable_types[unused_opt] && warnable_types[unused_opt].indexOf(type) !== -1) { + warningAt("W098", line, chr, name); + } + } + + unuseds.push({ + name: name, + line: line, + character: chr + }); + }; + + var checkUnused = function (func, key) { + var type = func[key]; + var tkn = func["(tokens)"][key]; + + if (key.charAt(0) === "(") + return; + + if (type !== "unused" && type !== "unction" && type !== "const") + return; + + // Params are checked separately from other variables. + if (func["(params)"] && func["(params)"].indexOf(key) !== -1) + return; + + // Variable is in global scope and defined as exported. + if (func["(global)"] && _.has(exported, key)) + return; + + // Is this constant unused? + if (type === "const" && !getprop(func, key, "unused")) + return; + + warnUnused(key, tkn, "var"); + }; + + // Check queued 'x is not defined' instances to see if they're still undefined. + for (i = 0; i < JSHINT.undefs.length; i += 1) { + k = JSHINT.undefs[i].slice(0); + + if (markDefined(k[2].value, k[0])) { + clearImplied(k[2].value, k[2].line); + } else if (state.option.undef) { + warning.apply(warning, k.slice(1)); + } + } + + functions.forEach(function (func) { + if (func["(unusedOption)"] === false) { + return; + } + + for (var key in func) { + if (_.has(func, key)) { + checkUnused(func, key); + } + } + + if (!func["(params)"]) + return; + + var params = func["(params)"].slice(); + var param = params.pop(); + var type, unused_opt; + + while (param) { + type = func[param]; + unused_opt = func["(unusedOption)"] || state.option.unused; + unused_opt = unused_opt === true ? "last-param" : unused_opt; + + // 'undefined' is a special case for (function (window, undefined) { ... })(); + // patterns. + + if (param === "undefined") + return; + + if (type === "unused" || type === "unction") { + warnUnused(param, func["(tokens)"][param], "param", func["(unusedOption)"]); + } else if (unused_opt === "last-param") { + return; + } + + param = params.pop(); + } + }); + + for (var key in declared) { + if (_.has(declared, key) && !_.has(global, key) && !_.has(exported, key)) { + warnUnused(key, declared[key], "var"); + } + } + + } catch (err) { + if (err && err.name === "JSHintError") { + var nt = state.tokens.next || {}; + JSHINT.errors.push({ + scope : "(main)", + raw : err.raw, + code : err.code, + reason : err.message, + line : err.line || nt.line, + character : err.character || nt.from + }, null); + } else { + throw err; + } + } + + // Loop over the listed "internals", and check them as well. + + if (JSHINT.scope === "(main)") { + o = o || {}; + + for (i = 0; i < JSHINT.internals.length; i += 1) { + k = JSHINT.internals[i]; + o.scope = k.elem; + itself(k.value, o, g); + } + } + + return JSHINT.errors.length === 0; + }; + + // Modules. + itself.addModule = function (func) { + extraModules.push(func); + }; + + itself.addModule(style.register); + + // Data summary. + itself.data = function () { + var data = { + functions: [], + options: state.option + }; + + var implieds = []; + var members = []; + var fu, f, i, j, n, globals; + + if (itself.errors.length) { + data.errors = itself.errors; + } + + if (state.jsonMode) { + data.json = true; + } + + for (n in implied) { + if (_.has(implied, n)) { + implieds.push({ + name: n, + line: implied[n] + }); + } + } + + if (implieds.length > 0) { + data.implieds = implieds; + } + + if (urls.length > 0) { + data.urls = urls; + } + + globals = Object.keys(scope); + if (globals.length > 0) { + data.globals = globals; + } + + for (i = 1; i < functions.length; i += 1) { + f = functions[i]; + fu = {}; + + for (j = 0; j < functionicity.length; j += 1) { + fu[functionicity[j]] = []; + } + + for (j = 0; j < functionicity.length; j += 1) { + if (fu[functionicity[j]].length === 0) { + delete fu[functionicity[j]]; + } + } + + fu.name = f["(name)"]; + fu.param = f["(params)"]; + fu.line = f["(line)"]; + fu.character = f["(character)"]; + fu.last = f["(last)"]; + fu.lastcharacter = f["(lastcharacter)"]; + + fu.metrics = { + complexity: f["(metrics)"].ComplexityCount, + parameters: (f["(params)"] || []).length, + statements: f["(metrics)"].statementCount + }; + + data.functions.push(fu); + } + + if (unuseds.length > 0) { + data.unused = unuseds; + } + + members = []; + for (n in member) { + if (typeof member[n] === "number") { + data.member = member; + break; + } + } + + return data; + }; + + itself.jshint = itself; + + return itself; }()); // Make JSHINT a Node module, if possible. if (typeof exports === "object" && exports) { - exports.JSHINT = JSHINT; + exports.JSHINT = JSHINT; } }, -{"../shared/messages.js":2,"../shared/vars.js":3,"./lex.js":5,"./reg.js":6,"./state.js":7,"./style.js":8,"console-browserify":9,"events":10,"underscore":1}], -5:[function(req,module,exports){ +{"./lex.js":4,"./messages.js":5,"./reg.js":6,"./state.js":7,"./style.js":8,"./vars.js":9,"events":10,"underscore":2}], +4:[function(_dereq_,module,exports){ /* * Lexical analysis and token construction. */ "use strict"; -var _ = req("underscore"); -var events = req("events"); -var reg = req("./reg.js"); -var state = req("./state.js").state; +var _ = _dereq_("underscore"); +var events = _dereq_("events"); +var reg = _dereq_("./reg.js"); +var state = _dereq_("./state.js").state; + +var unicodeData = _dereq_("../data/ascii-identifier-data.js"); +var asciiIdentifierStartTable = unicodeData.asciiIdentifierStartTable; +var asciiIdentifierPartTable = unicodeData.asciiIdentifierPartTable; // Some of these token types are from JavaScript Parser API // while others are specific to JSHint parser. // JS Parser API: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API var Token = { - Identifier: 1, - Punctuator: 2, - NumericLiteral: 3, - StringLiteral: 4, - Comment: 5, - Keyword: 6, - NullLiteral: 7, - BooleanLiteral: 8, - RegExp: 9 + Identifier: 1, + Punctuator: 2, + NumericLiteral: 3, + StringLiteral: 4, + Comment: 5, + Keyword: 6, + NullLiteral: 7, + BooleanLiteral: 8, + RegExp: 9, + TemplateLiteral: 10 }; -// This is auto generated from the unicode tables. -// The tables are at: -// http://www.fileformat.info/info/unicode/category/Lu/list.htm -// http://www.fileformat.info/info/unicode/category/Ll/list.htm -// http://www.fileformat.info/info/unicode/category/Lt/list.htm -// http://www.fileformat.info/info/unicode/category/Lm/list.htm -// http://www.fileformat.info/info/unicode/category/Lo/list.htm -// http://www.fileformat.info/info/unicode/category/Nl/list.htm - -var unicodeLetterTable = [ - 170, 170, 181, 181, 186, 186, 192, 214, - 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, - 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, - 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, - 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, - 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, - 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, - 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, - 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2308, 2361, - 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, - 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, - 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, - 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, - 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, - 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, - 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, - 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, - 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, - 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, - 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, - 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, - 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, - 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, - 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, - 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, - 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, - 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, - 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, - 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, - 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, - 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, - 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, - 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4304, 4346, - 4348, 4348, 4352, 4680, 4682, 4685, 4688, 4694, 4696, 4696, - 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, - 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, - 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, - 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, - 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, - 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, - 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, - 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, - 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7104, 7141, - 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, - 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, - 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, - 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, - 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, - 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, - 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, - 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, - 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, - 11360, 11492, 11499, 11502, 11520, 11557, 11568, 11621, - 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, - 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, - 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, - 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, - 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, - 12593, 12686, 12704, 12730, 12784, 12799, 13312, 13312, - 19893, 19893, 19968, 19968, 40907, 40907, 40960, 42124, - 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, - 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, - 42786, 42888, 42891, 42894, 42896, 42897, 42912, 42921, - 43002, 43009, 43011, 43013, 43015, 43018, 43020, 43042, - 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, - 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, - 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, - 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, - 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, - 43739, 43741, 43777, 43782, 43785, 43790, 43793, 43798, - 43808, 43814, 43816, 43822, 43968, 44002, 44032, 44032, - 55203, 55203, 55216, 55238, 55243, 55291, 63744, 64045, - 64048, 64109, 64112, 64217, 64256, 64262, 64275, 64279, - 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, - 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, - 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, - 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, - 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, - 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, - 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, - 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66334, - 66352, 66378, 66432, 66461, 66464, 66499, 66504, 66511, - 66513, 66517, 66560, 66717, 67584, 67589, 67592, 67592, - 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, - 67840, 67861, 67872, 67897, 68096, 68096, 68112, 68115, - 68117, 68119, 68121, 68147, 68192, 68220, 68352, 68405, - 68416, 68437, 68448, 68466, 68608, 68680, 69635, 69687, - 69763, 69807, 73728, 74606, 74752, 74850, 77824, 78894, - 92160, 92728, 110592, 110593, 119808, 119892, 119894, 119964, - 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, - 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, - 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, - 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, - 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, - 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, - 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, - 131072, 131072, 173782, 173782, 173824, 173824, 177972, 177972, - 177984, 177984, 178205, 178205, 194560, 195101 -]; - -var identifierStartTable = []; - -for (var i = 0; i < 128; i++) { - identifierStartTable[i] = - i === 36 || // $ - i >= 65 && i <= 90 || // A-Z - i === 95 || // _ - i >= 97 && i <= 122; // a-z -} - -var identifierPartTable = []; - -for (var i = 0; i < 128; i++) { - identifierPartTable[i] = - identifierStartTable[i] || // $, _, A-Z, a-z - i >= 48 && i <= 57; // 0-9 -} - // Object that handles postponed lexing verifications that checks the parsed // environment state. function asyncTrigger() { - var _checks = []; + var _checks = []; - return { - push: function (fn) { - _checks.push(fn); - }, + return { + push: function (fn) { + _checks.push(fn); + }, - check: function () { - for (var check = 0; check < _checks.length; ++check) { - _checks[check](); - } + check: function () { + for (var check = 0; check < _checks.length; ++check) { + _checks[check](); + } - _checks.splice(0, _checks.length); - } - }; + _checks.splice(0, _checks.length); + } + }; } /* @@ -7070,1503 +6318,1808 @@ function asyncTrigger() { * JSLint format. */ function Lexer(source) { - var lines = source; + var lines = source; - if (typeof lines === "string") { - lines = lines - .replace(/\r\n/g, "\n") - .replace(/\r/g, "\n") - .split("\n"); - } + if (typeof lines === "string") { + lines = lines + .replace(/\r\n/g, "\n") + .replace(/\r/g, "\n") + .split("\n"); + } - // If the first line is a shebang (#!), make it a blank and move on. - // Shebangs are used by Node scripts. + // If the first line is a shebang (#!), make it a blank and move on. + // Shebangs are used by Node scripts. - if (lines[0] && lines[0].substr(0, 2) === "#!") { - lines[0] = ""; - } + if (lines[0] && lines[0].substr(0, 2) === "#!") { + if (lines[0].indexOf("node") !== -1) { + state.option.node = true; + } + lines[0] = ""; + } - this.emitter = new events.EventEmitter(); - this.source = source; - this.setLines(lines); - this.prereg = true; + this.emitter = new events.EventEmitter(); + this.source = source; + this.setLines(lines); + this.prereg = true; - this.line = 0; - this.char = 1; - this.from = 1; - this.input = ""; + this.line = 0; + this.char = 1; + this.from = 1; + this.input = ""; + this.inComment = false; - for (var i = 0; i < state.option.indent; i += 1) { - state.tab += " "; - } + for (var i = 0; i < state.option.indent; i += 1) { + state.tab += " "; + } } Lexer.prototype = { - _lines: [], - - getLines: function () { - this._lines = state.lines; - return this._lines; - }, - - setLines: function (val) { - this._lines = val; - state.lines = this._lines; - }, - - /* - * Return the next i character without actually moving the - * char pointer. - */ - peek: function (i) { - return this.input.charAt(i || 0); - }, - - /* - * Move the char pointer forward i times. - */ - skip: function (i) { - i = i || 1; - this.char += i; - this.input = this.input.slice(i); - }, - - /* - * Subscribe to a token event. The API for this method is similar - * Underscore.js i.e. you can subscribe to multiple events with - * one call: - * - * lex.on("Identifier Number", function (data) { - * // ... - * }); - */ - on: function (names, listener) { - names.split(" ").forEach(function (name) { - this.emitter.on(name, listener); - }.bind(this)); - }, - - /* - * Trigger a token event. All arguments will be passed to each - * listener. - */ - trigger: function () { - this.emitter.emit.apply(this.emitter, Array.prototype.slice.call(arguments)); - }, - - /* - * Postpone a token event. the checking condition is set as - * last parameter, and the trigger function is called in a - * stored callback. To be later called using the check() function - * by the parser. This avoids parser's peek() to give the lexer - * a false context. - */ - triggerAsync: function (type, args, checks, fn) { - checks.push(function () { - if (fn()) { - this.trigger(type, args); - } - }.bind(this)); - }, - - /* - * Extract a punctuator out of the next sequence of characters - * or return 'null' if its not possible. - * - * This method's implementation was heavily influenced by the - * scanPunctuator function in the Esprima parser's source code. - */ - scanPunctuator: function () { - var ch1 = this.peek(); - var ch2, ch3, ch4; - - switch (ch1) { - // Most common single-character punctuators - case ".": - if ((/^[0-9]$/).test(this.peek(1))) { - return null; - } - if (this.peek(1) === "." && this.peek(2) === ".") { - return { - type: Token.Punctuator, - value: "..." - }; - } - /* falls through */ - case "(": - case ")": - case ";": - case ",": - case "{": - case "}": - case "[": - case "]": - case ":": - case "~": - case "?": - return { - type: Token.Punctuator, - value: ch1 - }; - - // A pound sign (for Node shebangs) - case "#": - return { - type: Token.Punctuator, - value: ch1 - }; - - // We're at the end of input - case "": - return null; - } - - // Peek more characters - - ch2 = this.peek(1); - ch3 = this.peek(2); - ch4 = this.peek(3); - - // 4-character punctuator: >>>= - - if (ch1 === ">" && ch2 === ">" && ch3 === ">" && ch4 === "=") { - return { - type: Token.Punctuator, - value: ">>>=" - }; - } - - // 3-character punctuators: === !== >>> <<= >>= - - if (ch1 === "=" && ch2 === "=" && ch3 === "=") { - return { - type: Token.Punctuator, - value: "===" - }; - } - - if (ch1 === "!" && ch2 === "=" && ch3 === "=") { - return { - type: Token.Punctuator, - value: "!==" - }; - } - - if (ch1 === ">" && ch2 === ">" && ch3 === ">") { - return { - type: Token.Punctuator, - value: ">>>" - }; - } - - if (ch1 === "<" && ch2 === "<" && ch3 === "=") { - return { - type: Token.Punctuator, - value: "<<=" - }; - } - - if (ch1 === ">" && ch2 === ">" && ch3 === "=") { - return { - type: Token.Punctuator, - value: ">>=" - }; - } - - // Fat arrow punctuator - if (ch1 === "=" && ch2 === ">") { - return { - type: Token.Punctuator, - value: ch1 + ch2 - }; - } - - // 2-character punctuators: <= >= == != ++ -- << >> && || - // += -= *= %= &= |= ^= (but not /=, see below) - if (ch1 === ch2 && ("+-<>&|".indexOf(ch1) >= 0)) { - return { - type: Token.Punctuator, - value: ch1 + ch2 - }; - } - - if ("<>=!+-*%&|^".indexOf(ch1) >= 0) { - if (ch2 === "=") { - return { - type: Token.Punctuator, - value: ch1 + ch2 - }; - } - - return { - type: Token.Punctuator, - value: ch1 - }; - } - - // Special case: /=. We need to make sure that this is an - // operator and not a regular expression. - - if (ch1 === "/") { - if (ch2 === "=" && /\/=(?!(\S*\/[gim]?))/.test(this.input)) { - // /= is not a part of a regular expression, return it as a - // punctuator. - return { - type: Token.Punctuator, - value: "/=" - }; - } - - return { - type: Token.Punctuator, - value: "/" - }; - } - - return null; - }, - - /* - * Extract a comment out of the next sequence of characters and/or - * lines or return 'null' if its not possible. Since comments can - * span across multiple lines this method has to move the char - * pointer. - * - * In addition to normal JavaScript comments (// and /*) this method - * also recognizes JSHint- and JSLint-specific comments such as - * /*jshint, /*jslint, /*globals and so on. - */ - scanComments: function () { - var ch1 = this.peek(); - var ch2 = this.peek(1); - var rest = this.input.substr(2); - var startLine = this.line; - var startChar = this.char; - - // Create a comment token object and make sure it - // has all the data JSHint needs to work with special - // comments. - - function commentToken(label, body, opt) { - var special = ["jshint", "jslint", "members", "member", "globals", "global", "exported"]; - var isSpecial = false; - var value = label + body; - var commentType = "plain"; - opt = opt || {}; - - if (opt.isMultiline) { - value += "*/"; - } - - special.forEach(function (str) { - if (isSpecial) { - return; - } - - // Don't recognize any special comments other than jshint for single-line - // comments. This introduced many problems with legit comments. - if (label === "//" && str !== "jshint") { - return; - } - - if (body.substr(0, str.length) === str) { - isSpecial = true; - label = label + str; - body = body.substr(str.length); - } - - if (!isSpecial && body.charAt(0) === " " && body.substr(1, str.length) === str) { - isSpecial = true; - label = label + " " + str; - body = body.substr(str.length + 1); - } - - if (!isSpecial) { - return; - } - - switch (str) { - case "member": - commentType = "members"; - break; - case "global": - commentType = "globals"; - break; - default: - commentType = str; - } - }); - - return { - type: Token.Comment, - commentType: commentType, - value: value, - body: body, - isSpecial: isSpecial, - isMultiline: opt.isMultiline || false, - isMalformed: opt.isMalformed || false - }; - } - - // End of unbegun comment. Raise an error and skip that input. - if (ch1 === "*" && ch2 === "/") { - this.trigger("error", { - code: "E018", - line: startLine, - character: startChar - }); - - this.skip(2); - return null; - } - - // Comments must start either with // or /* - if (ch1 !== "/" || (ch2 !== "*" && ch2 !== "/")) { - return null; - } - - // One-line comment - if (ch2 === "/") { - this.skip(this.input.length); // Skip to the EOL. - return commentToken("//", rest); - } - - var body = ""; - - /* Multi-line comment */ - if (ch2 === "*") { - this.skip(2); - - while (this.peek() !== "*" || this.peek(1) !== "/") { - if (this.peek() === "") { // End of Line - body += "\n"; - - // If we hit EOF and our comment is still unclosed, - // trigger an error and end the comment implicitly. - if (!this.nextLine()) { - this.trigger("error", { - code: "E017", - line: startLine, - character: startChar - }); - - return commentToken("/*", body, { - isMultiline: true, - isMalformed: true - }); - } - } else { - body += this.peek(); - this.skip(); - } - } - - this.skip(2); - return commentToken("/*", body, { isMultiline: true }); - } - }, - - /* - * Extract a keyword out of the next sequence of characters or - * return 'null' if its not possible. - */ - scanKeyword: function () { - var result = /^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input); - var keywords = [ - "if", "in", "do", "var", "for", "new", - "try", "let", "this", "else", "case", - "void", "with", "enum", "while", "break", - "catch", "throw", "const", "yield", "class", - "super", "return", "typeof", "delete", - "switch", "export", "import", "default", - "finally", "extends", "function", "continue", - "debugger", "instanceof" - ]; - - if (result && keywords.indexOf(result[0]) >= 0) { - return { - type: Token.Keyword, - value: result[0] - }; - } - - return null; - }, - - /* - * Extract a JavaScript identifier out of the next sequence of - * characters or return 'null' if its not possible. In addition, - * to Identifier this method can also produce BooleanLiteral - * (true/false) and NullLiteral (null). - */ - scanIdentifier: function () { - var id = ""; - var index = 0; - var type, char; - - // Detects any character in the Unicode categories "Uppercase - // letter (Lu)", "Lowercase letter (Ll)", "Titlecase letter - // (Lt)", "Modifier letter (Lm)", "Other letter (Lo)", or - // "Letter number (Nl)". - // - // Both approach and unicodeLetterTable were borrowed from - // Google's Traceur. - - function isUnicodeLetter(code) { - for (var i = 0; i < unicodeLetterTable.length;) { - if (code < unicodeLetterTable[i++]) { - return false; - } - - if (code <= unicodeLetterTable[i++]) { - return true; - } - } - - return false; - } - - function isHexDigit(str) { - return (/^[0-9a-fA-F]$/).test(str); - } - - var readUnicodeEscapeSequence = function () { - /*jshint validthis:true */ - index += 1; - - if (this.peek(index) !== "u") { - return null; - } - - var ch1 = this.peek(index + 1); - var ch2 = this.peek(index + 2); - var ch3 = this.peek(index + 3); - var ch4 = this.peek(index + 4); - var code; - - if (isHexDigit(ch1) && isHexDigit(ch2) && isHexDigit(ch3) && isHexDigit(ch4)) { - code = parseInt(ch1 + ch2 + ch3 + ch4, 16); - - if (isUnicodeLetter(code)) { - index += 5; - return "\\u" + ch1 + ch2 + ch3 + ch4; - } - - return null; - } - - return null; - }.bind(this); - - var getIdentifierStart = function () { - /*jshint validthis:true */ - var chr = this.peek(index); - var code = chr.charCodeAt(0); - - if (code === 92) { - return readUnicodeEscapeSequence(); - } - - if (code < 128) { - if (identifierStartTable[code]) { - index += 1; - return chr; - } - - return null; - } - - if (isUnicodeLetter(code)) { - index += 1; - return chr; - } - - return null; - }.bind(this); - - var getIdentifierPart = function () { - /*jshint validthis:true */ - var chr = this.peek(index); - var code = chr.charCodeAt(0); - - if (code === 92) { - return readUnicodeEscapeSequence(); - } - - if (code < 128) { - if (identifierPartTable[code]) { - index += 1; - return chr; - } - - return null; - } - - if (isUnicodeLetter(code)) { - index += 1; - return chr; - } - - return null; - }.bind(this); - - char = getIdentifierStart(); - if (char === null) { - return null; - } - - id = char; - for (;;) { - char = getIdentifierPart(); - - if (char === null) { - break; - } - - id += char; - } - - switch (id) { - case "true": - case "false": - type = Token.BooleanLiteral; - break; - case "null": - type = Token.NullLiteral; - break; - default: - type = Token.Identifier; - } - - return { - type: type, - value: id - }; - }, - - /* - * Extract a numeric literal out of the next sequence of - * characters or return 'null' if its not possible. This method - * supports all numeric literals described in section 7.8.3 - * of the EcmaScript 5 specification. - * - * This method's implementation was heavily influenced by the - * scanNumericLiteral function in the Esprima parser's source code. - */ - scanNumericLiteral: function () { - var index = 0; - var value = ""; - var length = this.input.length; - var char = this.peek(index); - var bad; - - function isDecimalDigit(str) { - return (/^[0-9]$/).test(str); - } - - function isOctalDigit(str) { - return (/^[0-7]$/).test(str); - } - - function isHexDigit(str) { - return (/^[0-9a-fA-F]$/).test(str); - } - - function isIdentifierStart(ch) { - return (ch === "$") || (ch === "_") || (ch === "\\") || - (ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z"); - } - - // Numbers must start either with a decimal digit or a point. - - if (char !== "." && !isDecimalDigit(char)) { - return null; - } - - if (char !== ".") { - value = this.peek(index); - index += 1; - char = this.peek(index); - - if (value === "0") { - // Base-16 numbers. - if (char === "x" || char === "X") { - index += 1; - value += char; - - while (index < length) { - char = this.peek(index); - if (!isHexDigit(char)) { - break; - } - value += char; - index += 1; - } - - if (value.length <= 2) { // 0x - return { - type: Token.NumericLiteral, - value: value, - isMalformed: true - }; - } - - if (index < length) { - char = this.peek(index); - if (isIdentifierStart(char)) { - return null; - } - } - - return { - type: Token.NumericLiteral, - value: value, - base: 16, - isMalformed: false - }; - } - - // Base-8 numbers. - if (isOctalDigit(char)) { - index += 1; - value += char; - bad = false; - - while (index < length) { - char = this.peek(index); - - // Numbers like '019' (note the 9) are not valid octals - // but we still parse them and mark as malformed. - - if (isDecimalDigit(char)) { - bad = true; - } else if (!isOctalDigit(char)) { - break; - } - value += char; - index += 1; - } - - if (index < length) { - char = this.peek(index); - if (isIdentifierStart(char)) { - return null; - } - } - - return { - type: Token.NumericLiteral, - value: value, - base: 8, - isMalformed: false - }; - } - - // Decimal numbers that start with '0' such as '09' are illegal - // but we still parse them and return as malformed. - - if (isDecimalDigit(char)) { - index += 1; - value += char; - } - } - - while (index < length) { - char = this.peek(index); - if (!isDecimalDigit(char)) { - break; - } - value += char; - index += 1; - } - } - - // Decimal digits. - - if (char === ".") { - value += char; - index += 1; - - while (index < length) { - char = this.peek(index); - if (!isDecimalDigit(char)) { - break; - } - value += char; - index += 1; - } - } - - // Exponent part. - - if (char === "e" || char === "E") { - value += char; - index += 1; - char = this.peek(index); - - if (char === "+" || char === "-") { - value += this.peek(index); - index += 1; - } - - char = this.peek(index); - if (isDecimalDigit(char)) { - value += char; - index += 1; - - while (index < length) { - char = this.peek(index); - if (!isDecimalDigit(char)) { - break; - } - value += char; - index += 1; - } - } else { - return null; - } - } - - if (index < length) { - char = this.peek(index); - if (isIdentifierStart(char)) { - return null; - } - } - - return { - type: Token.NumericLiteral, - value: value, - base: 10, - isMalformed: !isFinite(value) - }; - }, - - /* - * Extract a string out of the next sequence of characters and/or - * lines or return 'null' if its not possible. Since strings can - * span across multiple lines this method has to move the char - * pointer. - * - * This method recognizes pseudo-multiline JavaScript strings: - * - * var str = "hello\ - * world"; - */ - scanStringLiteral: function (checks) { - /*jshint loopfunc:true */ - var quote = this.peek(); - - // String must start with a quote. - if (quote !== "\"" && quote !== "'") { - return null; - } - - // In JSON strings must always use double quotes. - this.triggerAsync("warning", { - code: "W108", - line: this.line, - character: this.char // +1? - }, checks, function () { return state.jsonMode && quote !== "\""; }); - - var value = ""; - var startLine = this.line; - var startChar = this.char; - var allowNewLine = false; - - this.skip(); - - outer: while (this.peek() !== quote) { - while (this.peek() === "") { // End Of Line - - // If an EOL is not preceded by a backslash, show a warning - // and proceed like it was a legit multi-line string where - // author simply forgot to escape the newline symbol. - // - // Another approach is to implicitly close a string on EOL - // but it generates too many false positives. - - if (!allowNewLine) { - this.trigger("warning", { - code: "W112", - line: this.line, - character: this.char - }); - } else { - allowNewLine = false; - - // Otherwise show a warning if multistr option was not set. - // For JSON, show warning no matter what. - - this.triggerAsync("warning", { - code: "W043", - line: this.line, - character: this.char - }, checks, function () { return !state.option.multistr; }); - - this.triggerAsync("warning", { - code: "W042", - line: this.line, - character: this.char - }, checks, function () { return state.jsonMode && state.option.multistr; }); - } - - // If we get an EOF inside of an unclosed string, show an - // error and implicitly close it at the EOF point. - - if (!this.nextLine()) { - this.trigger("error", { - code: "E029", - line: startLine, - character: startChar - }); - - return { - type: Token.StringLiteral, - value: value, - isUnclosed: true, - quote: quote - }; - } - - if (this.peek() == quote) - break outer; - } - - allowNewLine = false; - var char = this.peek(); - var jump = 1; // A length of a jump, after we're done - // parsing this character. - - if (char < " ") { - // Warn about a control character in a string. - this.trigger("warning", { - code: "W113", - line: this.line, - character: this.char, - data: [ "" ] - }); - } - - // Special treatment for some escaped characters. - - if (char === "\\") { - this.skip(); - char = this.peek(); - - switch (char) { - case "'": - this.triggerAsync("warning", { - code: "W114", - line: this.line, - character: this.char, - data: [ "\\'" ] - }, checks, function () {return state.jsonMode; }); - break; - case "b": - char = "\b"; - break; - case "f": - char = "\f"; - break; - case "n": - char = "\n"; - break; - case "r": - char = "\r"; - break; - case "t": - char = "\t"; - break; - case "0": - char = "\0"; - - // Octal literals fail in strict mode. - // Check if the number is between 00 and 07. - var n = parseInt(this.peek(1), 10); - this.triggerAsync("warning", { - code: "W115", - line: this.line, - character: this.char - }, checks, - function () { return n >= 0 && n <= 7 && state.directive["use strict"]; }); - break; - case "u": - char = String.fromCharCode(parseInt(this.input.substr(1, 4), 16)); - jump = 5; - break; - case "v": - this.triggerAsync("warning", { - code: "W114", - line: this.line, - character: this.char, - data: [ "\\v" ] - }, checks, function () { return state.jsonMode; }); - - char = "\v"; - break; - case "x": - var x = parseInt(this.input.substr(1, 2), 16); - - this.triggerAsync("warning", { - code: "W114", - line: this.line, - character: this.char, - data: [ "\\x-" ] - }, checks, function () { return state.jsonMode; }); - - char = String.fromCharCode(x); - jump = 3; - break; - case "\\": - case "\"": - case "/": - break; - case "": - allowNewLine = true; - char = ""; - break; - case "!": - if (value.slice(value.length - 2) === "<") { - break; - } - - /*falls through */ - default: - // Weird escaping. - this.trigger("warning", { - code: "W044", - line: this.line, - character: this.char - }); - } - } - - value += char; - this.skip(jump); - } - - this.skip(); - return { - type: Token.StringLiteral, - value: value, - isUnclosed: false, - quote: quote - }; - }, - - /* - * Extract a regular expression out of the next sequence of - * characters and/or lines or return 'null' if its not possible. - * - * This method is platform dependent: it accepts almost any - * regular expression values but then tries to compile and run - * them using system's RegExp object. This means that there are - * rare edge cases where one JavaScript engine complains about - * your regular expression while others don't. - */ - scanRegExp: function () { - var index = 0; - var length = this.input.length; - var char = this.peek(); - var value = char; - var body = ""; - var flags = []; - var malformed = false; - var isCharSet = false; - var terminated; - - var scanUnexpectedChars = function () { - // Unexpected control character - if (char < " ") { - malformed = true; - this.trigger("warning", { - code: "W048", - line: this.line, - character: this.char - }); - } - - // Unexpected escaped character - if (char === "<") { - malformed = true; - this.trigger("warning", { - code: "W049", - line: this.line, - character: this.char, - data: [ char ] - }); - } - }.bind(this); - - // Regular expressions must start with '/' - if (!this.prereg || char !== "/") { - return null; - } - - index += 1; - terminated = false; - - // Try to get everything in between slashes. A couple of - // cases aside (see scanUnexpectedChars) we don't really - // care whether the resulting expression is valid or not. - // We will check that later using the RegExp object. - - while (index < length) { - char = this.peek(index); - value += char; - body += char; - - if (isCharSet) { - if (char === "]") { - if (this.peek(index - 1) !== "\\" || this.peek(index - 2) === "\\") { - isCharSet = false; - } - } - - if (char === "\\") { - index += 1; - char = this.peek(index); - body += char; - value += char; - - scanUnexpectedChars(); - } - - index += 1; - continue; - } - - if (char === "\\") { - index += 1; - char = this.peek(index); - body += char; - value += char; - - scanUnexpectedChars(); - - if (char === "/") { - index += 1; - continue; - } - - if (char === "[") { - index += 1; - continue; - } - } - - if (char === "[") { - isCharSet = true; - index += 1; - continue; - } - - if (char === "/") { - body = body.substr(0, body.length - 1); - terminated = true; - index += 1; - break; - } - - index += 1; - } - - // A regular expression that was never closed is an - // error from which we cannot recover. - - if (!terminated) { - this.trigger("error", { - code: "E015", - line: this.line, - character: this.from - }); - - return void this.trigger("fatal", { - line: this.line, - from: this.from - }); - } - - // Parse flags (if any). - - while (index < length) { - char = this.peek(index); - if (!/[gim]/.test(char)) { - break; - } - flags.push(char); - value += char; - index += 1; - } - - // Check regular expression for correctness. - - try { - new RegExp(body, flags.join("")); - } catch (err) { - malformed = true; - this.trigger("error", { - code: "E016", - line: this.line, - character: this.char, - data: [ err.message ] // Platform dependent! - }); - } - - return { - type: Token.RegExp, - value: value, - flags: flags, - isMalformed: malformed - }; - }, - - /* - * Scan for any occurence of mixed tabs and spaces. If smarttabs option - * is on, ignore tabs followed by spaces. - * - * Tabs followed by one space followed by a block comment are allowed. - */ - scanMixedSpacesAndTabs: function () { - var at, match; - - if (state.option.smarttabs) { - // Negative look-behind for "//" - match = this.input.match(/(\/\/|^\s?\*)? \t/); - at = match && !match[1] ? 0 : -1; - } else { - at = this.input.search(/ \t|\t [^\*]/); - } - - return at; - }, - - /* - * Scan for characters that get silently deleted by one or more browsers. - */ - scanUnsafeChars: function () { - return this.input.search(reg.unsafeChars); - }, - - /* - * Produce the next raw token or return 'null' if no tokens can be matched. - * This method skips over all space characters. - */ - next: function (checks) { - this.from = this.char; - - // Move to the next non-space character. - var start; - if (/\s/.test(this.peek())) { - start = this.char; - - while (/\s/.test(this.peek())) { - this.from += 1; - this.skip(); - } - - if (this.peek() === "") { // EOL - if (!/^\s*$/.test(this.getLines()[this.line - 1]) && state.option.trailing) { - this.trigger("warning", { code: "W102", line: this.line, character: start }); - } - } - } - - // Methods that work with multi-line structures and move the - // character pointer. - - var match = this.scanComments() || - this.scanStringLiteral(checks); - - if (match) { - return match; - } - - // Methods that don't move the character pointer. - - match = - this.scanRegExp() || - this.scanPunctuator() || - this.scanKeyword() || - this.scanIdentifier() || - this.scanNumericLiteral(); - - if (match) { - this.skip(match.value.length); - return match; - } - - // No token could be matched, give up. - - return null; - }, - - /* - * Switch to the next line and reset all char pointers. Once - * switched, this method also checks for mixed spaces and tabs - * and other minor warnings. - */ - nextLine: function () { - var char; - - if (this.line >= this.getLines().length) { - return false; - } - - this.input = this.getLines()[this.line]; - this.line += 1; - this.char = 1; - this.from = 1; - - char = this.scanMixedSpacesAndTabs(); - if (char >= 0) { - this.trigger("warning", { code: "W099", line: this.line, character: char + 1 }); - } - - this.input = this.input.replace(/\t/g, state.tab); - char = this.scanUnsafeChars(); - - if (char >= 0) { - this.trigger("warning", { code: "W100", line: this.line, character: char }); - } - - // If there is a limit on line length, warn when lines get too - // long. - - if (state.option.maxlen && state.option.maxlen < this.input.length) { - this.trigger("warning", { code: "W101", line: this.line, character: this.input.length }); - } - - return true; - }, - - /* - * This is simply a synonym for nextLine() method with a friendlier - * public name. - */ - start: function () { - this.nextLine(); - }, - - /* - * Produce the next token. This function is called by advance() to get - * the next token. It retuns a token in a JSLint-compatible format. - */ - token: function () { - /*jshint loopfunc:true */ - var checks = asyncTrigger(); - var token; - - - function isReserved(token, isProperty) { - if (!token.reserved) { - return false; - } - var meta = token.meta; - - if (meta && meta.isFutureReservedWord && state.option.inES5()) { - // ES3 FutureReservedWord in an ES5 environment. - if (!meta.es5) { - return false; - } - - // Some ES5 FutureReservedWord identifiers are active only - // within a strict mode environment. - if (meta.strictOnly) { - if (!state.option.strict && !state.directive["use strict"]) { - return false; - } - } - - if (isProperty) { - return false; - } - } - - return true; - } - - // Produce a token object. - var create = function (type, value, isProperty) { - /*jshint validthis:true */ - var obj; - - if (type !== "(endline)" && type !== "(end)") { - this.prereg = false; - } - - if (type === "(punctuator)") { - switch (value) { - case ".": - case ")": - case "~": - case "#": - case "]": - this.prereg = false; - break; - default: - this.prereg = true; - } - - obj = Object.create(state.syntax[value] || state.syntax["(error)"]); - } - - if (type === "(identifier)") { - if (value === "return" || value === "case" || value === "typeof") { - this.prereg = true; - } - - if (_.has(state.syntax, value)) { - obj = Object.create(state.syntax[value] || state.syntax["(error)"]); - - // If this can't be a reserved keyword, reset the object. - if (!isReserved(obj, isProperty && type === "(identifier)")) { - obj = null; - } - } - } - - if (!obj) { - obj = Object.create(state.syntax[type]); - } - - obj.identifier = (type === "(identifier)"); - obj.type = obj.type || type; - obj.value = value; - obj.line = this.line; - obj.character = this.char; - obj.from = this.from; - - if (isProperty && obj.identifier) { - obj.isProperty = isProperty; - } - - obj.check = checks.check; - - return obj; - }.bind(this); - - for (;;) { - if (!this.input.length) { - return create(this.nextLine() ? "(endline)" : "(end)", ""); - } - - token = this.next(checks); - - if (!token) { - if (this.input.length) { - // Unexpected character. - this.trigger("error", { - code: "E024", - line: this.line, - character: this.char, - data: [ this.peek() ] - }); - - this.input = ""; - } - - continue; - } - - switch (token.type) { - case Token.StringLiteral: - this.triggerAsync("String", { - line: this.line, - char: this.char, - from: this.from, - value: token.value, - quote: token.quote - }, checks, function () { return true; }); - - return create("(string)", token.value); - case Token.Identifier: - this.trigger("Identifier", { - line: this.line, - char: this.char, - from: this.form, - name: token.value, - isProperty: state.tokens.curr.id === "." - }); - - /* falls through */ - case Token.Keyword: - case Token.NullLiteral: - case Token.BooleanLiteral: - return create("(identifier)", token.value, state.tokens.curr.id === "."); - - case Token.NumericLiteral: - if (token.isMalformed) { - this.trigger("warning", { - code: "W045", - line: this.line, - character: this.char, - data: [ token.value ] - }); - } - - this.triggerAsync("warning", { - code: "W114", - line: this.line, - character: this.char, - data: [ "0x-" ] - }, checks, function () { return token.base === 16 && state.jsonMode; }); - - this.triggerAsync("warning", { - code: "W115", - line: this.line, - character: this.char - }, checks, function () { - return state.directive["use strict"] && token.base === 8; - }); - - this.trigger("Number", { - line: this.line, - char: this.char, - from: this.from, - value: token.value, - base: token.base, - isMalformed: token.malformed - }); - - return create("(number)", token.value); - - case Token.RegExp: - return create("(regexp)", token.value); - - case Token.Comment: - state.tokens.curr.comment = true; - - if (token.isSpecial) { - return { - value: token.value, - body: token.body, - type: token.commentType, - isSpecial: token.isSpecial, - line: this.line, - character: this.char, - from: this.from - }; - } - - break; - - case "": - break; - - default: - return create("(punctuator)", token.value); - } - } - } + _lines: [], + + getLines: function () { + this._lines = state.lines; + return this._lines; + }, + + setLines: function (val) { + this._lines = val; + state.lines = this._lines; + }, + + /* + * Return the next i character without actually moving the + * char pointer. + */ + peek: function (i) { + return this.input.charAt(i || 0); + }, + + /* + * Move the char pointer forward i times. + */ + skip: function (i) { + i = i || 1; + this.char += i; + this.input = this.input.slice(i); + }, + + /* + * Subscribe to a token event. The API for this method is similar + * Underscore.js i.e. you can subscribe to multiple events with + * one call: + * + * lex.on("Identifier Number", function (data) { + * // ... + * }); + */ + on: function (names, listener) { + names.split(" ").forEach(function (name) { + this.emitter.on(name, listener); + }.bind(this)); + }, + + /* + * Trigger a token event. All arguments will be passed to each + * listener. + */ + trigger: function () { + this.emitter.emit.apply(this.emitter, Array.prototype.slice.call(arguments)); + }, + + /* + * Postpone a token event. the checking condition is set as + * last parameter, and the trigger function is called in a + * stored callback. To be later called using the check() function + * by the parser. This avoids parser's peek() to give the lexer + * a false context. + */ + triggerAsync: function (type, args, checks, fn) { + checks.push(function () { + if (fn()) { + this.trigger(type, args); + } + }.bind(this)); + }, + + /* + * Extract a punctuator out of the next sequence of characters + * or return 'null' if its not possible. + * + * This method's implementation was heavily influenced by the + * scanPunctuator function in the Esprima parser's source code. + */ + scanPunctuator: function () { + var ch1 = this.peek(); + var ch2, ch3, ch4; + + switch (ch1) { + // Most common single-character punctuators + case ".": + if ((/^[0-9]$/).test(this.peek(1))) { + return null; + } + if (this.peek(1) === "." && this.peek(2) === ".") { + return { + type: Token.Punctuator, + value: "..." + }; + } + /* falls through */ + case "(": + case ")": + case ";": + case ",": + case "{": + case "}": + case "[": + case "]": + case ":": + case "~": + case "?": + return { + type: Token.Punctuator, + value: ch1 + }; + + // A pound sign (for Node shebangs) + case "#": + return { + type: Token.Punctuator, + value: ch1 + }; + + // We're at the end of input + case "": + return null; + } + + // Peek more characters + + ch2 = this.peek(1); + ch3 = this.peek(2); + ch4 = this.peek(3); + + // 4-character punctuator: >>>= + + if (ch1 === ">" && ch2 === ">" && ch3 === ">" && ch4 === "=") { + return { + type: Token.Punctuator, + value: ">>>=" + }; + } + + // 3-character punctuators: === !== >>> <<= >>= + + if (ch1 === "=" && ch2 === "=" && ch3 === "=") { + return { + type: Token.Punctuator, + value: "===" + }; + } + + if (ch1 === "!" && ch2 === "=" && ch3 === "=") { + return { + type: Token.Punctuator, + value: "!==" + }; + } + + if (ch1 === ">" && ch2 === ">" && ch3 === ">") { + return { + type: Token.Punctuator, + value: ">>>" + }; + } + + if (ch1 === "<" && ch2 === "<" && ch3 === "=") { + return { + type: Token.Punctuator, + value: "<<=" + }; + } + + if (ch1 === ">" && ch2 === ">" && ch3 === "=") { + return { + type: Token.Punctuator, + value: ">>=" + }; + } + + // Fat arrow punctuator + if (ch1 === "=" && ch2 === ">") { + return { + type: Token.Punctuator, + value: ch1 + ch2 + }; + } + + // 2-character punctuators: <= >= == != ++ -- << >> && || + // += -= *= %= &= |= ^= (but not /=, see below) + if (ch1 === ch2 && ("+-<>&|".indexOf(ch1) >= 0)) { + return { + type: Token.Punctuator, + value: ch1 + ch2 + }; + } + + if ("<>=!+-*%&|^".indexOf(ch1) >= 0) { + if (ch2 === "=") { + return { + type: Token.Punctuator, + value: ch1 + ch2 + }; + } + + return { + type: Token.Punctuator, + value: ch1 + }; + } + + // Special case: /=. We need to make sure that this is an + // operator and not a regular expression. + + if (ch1 === "/") { + if (ch2 === "=" && /\/=(?!(\S*\/[gim]?))/.test(this.input)) { + // /= is not a part of a regular expression, return it as a + // punctuator. + return { + type: Token.Punctuator, + value: "/=" + }; + } + + return { + type: Token.Punctuator, + value: "/" + }; + } + + return null; + }, + + /* + * Extract a comment out of the next sequence of characters and/or + * lines or return 'null' if its not possible. Since comments can + * span across multiple lines this method has to move the char + * pointer. + * + * In addition to normal JavaScript comments (// and /*) this method + * also recognizes JSHint- and JSLint-specific comments such as + * /*jshint, /*jslint, /*globals and so on. + */ + scanComments: function () { + var ch1 = this.peek(); + var ch2 = this.peek(1); + var rest = this.input.substr(2); + var startLine = this.line; + var startChar = this.char; + + // Create a comment token object and make sure it + // has all the data JSHint needs to work with special + // comments. + + function commentToken(label, body, opt) { + var special = ["jshint", "jslint", "members", "member", "globals", "global", "exported"]; + var isSpecial = false; + var value = label + body; + var commentType = "plain"; + opt = opt || {}; + + if (opt.isMultiline) { + value += "*/"; + } + + special.forEach(function (str) { + if (isSpecial) { + return; + } + + // Don't recognize any special comments other than jshint for single-line + // comments. This introduced many problems with legit comments. + if (label === "//" && str !== "jshint") { + return; + } + + if (body.substr(0, str.length) === str) { + isSpecial = true; + label = label + str; + body = body.substr(str.length); + } + + if (!isSpecial && body.charAt(0) === " " && body.substr(1, str.length) === str) { + isSpecial = true; + label = label + " " + str; + body = body.substr(str.length + 1); + } + + if (!isSpecial) { + return; + } + + switch (str) { + case "member": + commentType = "members"; + break; + case "global": + commentType = "globals"; + break; + default: + commentType = str; + } + }); + + return { + type: Token.Comment, + commentType: commentType, + value: value, + body: body, + isSpecial: isSpecial, + isMultiline: opt.isMultiline || false, + isMalformed: opt.isMalformed || false + }; + } + + // End of unbegun comment. Raise an error and skip that input. + if (ch1 === "*" && ch2 === "/") { + this.trigger("error", { + code: "E018", + line: startLine, + character: startChar + }); + + this.skip(2); + return null; + } + + // Comments must start either with // or /* + if (ch1 !== "/" || (ch2 !== "*" && ch2 !== "/")) { + return null; + } + + // One-line comment + if (ch2 === "/") { + this.skip(this.input.length); // Skip to the EOL. + return commentToken("//", rest); + } + + var body = ""; + + /* Multi-line comment */ + if (ch2 === "*") { + this.inComment = true; + this.skip(2); + + while (this.peek() !== "*" || this.peek(1) !== "/") { + if (this.peek() === "") { // End of Line + body += "\n"; + + // If we hit EOF and our comment is still unclosed, + // trigger an error and end the comment implicitly. + if (!this.nextLine()) { + this.trigger("error", { + code: "E017", + line: startLine, + character: startChar + }); + + this.inComment = false; + return commentToken("/*", body, { + isMultiline: true, + isMalformed: true + }); + } + } else { + body += this.peek(); + this.skip(); + } + } + + this.skip(2); + this.inComment = false; + return commentToken("/*", body, { isMultiline: true }); + } + }, + + /* + * Extract a keyword out of the next sequence of characters or + * return 'null' if its not possible. + */ + scanKeyword: function () { + var result = /^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input); + var keywords = [ + "if", "in", "do", "var", "for", "new", + "try", "let", "this", "else", "case", + "void", "with", "enum", "while", "break", + "catch", "throw", "const", "yield", "class", + "super", "return", "typeof", "delete", + "switch", "export", "import", "default", + "finally", "extends", "function", "continue", + "debugger", "instanceof" + ]; + + if (result && keywords.indexOf(result[0]) >= 0) { + return { + type: Token.Keyword, + value: result[0] + }; + } + + return null; + }, + + /* + * Extract a JavaScript identifier out of the next sequence of + * characters or return 'null' if its not possible. In addition, + * to Identifier this method can also produce BooleanLiteral + * (true/false) and NullLiteral (null). + */ + scanIdentifier: function () { + var id = ""; + var index = 0; + var type, char; + + function isNonAsciiIdentifierStart(code) { + return code > 256; + } + + function isNonAsciiIdentifierPart(code) { + return code > 256; + } + + function isHexDigit(str) { + return (/^[0-9a-fA-F]$/).test(str); + } + + var readUnicodeEscapeSequence = function () { + /*jshint validthis:true */ + index += 1; + + if (this.peek(index) !== "u") { + return null; + } + + var ch1 = this.peek(index + 1); + var ch2 = this.peek(index + 2); + var ch3 = this.peek(index + 3); + var ch4 = this.peek(index + 4); + var code; + + if (isHexDigit(ch1) && isHexDigit(ch2) && isHexDigit(ch3) && isHexDigit(ch4)) { + code = parseInt(ch1 + ch2 + ch3 + ch4, 16); + + if (asciiIdentifierPartTable[code] || isNonAsciiIdentifierPart(code)) { + index += 5; + return "\\u" + ch1 + ch2 + ch3 + ch4; + } + + return null; + } + + return null; + }.bind(this); + + var getIdentifierStart = function () { + /*jshint validthis:true */ + var chr = this.peek(index); + var code = chr.charCodeAt(0); + + if (code === 92) { + return readUnicodeEscapeSequence(); + } + + if (code < 128) { + if (asciiIdentifierStartTable[code]) { + index += 1; + return chr; + } + + return null; + } + + if (isNonAsciiIdentifierStart(code)) { + index += 1; + return chr; + } + + return null; + }.bind(this); + + var getIdentifierPart = function () { + /*jshint validthis:true */ + var chr = this.peek(index); + var code = chr.charCodeAt(0); + + if (code === 92) { + return readUnicodeEscapeSequence(); + } + + if (code < 128) { + if (asciiIdentifierPartTable[code]) { + index += 1; + return chr; + } + + return null; + } + + if (isNonAsciiIdentifierPart(code)) { + index += 1; + return chr; + } + + return null; + }.bind(this); + + char = getIdentifierStart(); + if (char === null) { + return null; + } + + id = char; + for (;;) { + char = getIdentifierPart(); + + if (char === null) { + break; + } + + id += char; + } + + switch (id) { + case "true": + case "false": + type = Token.BooleanLiteral; + break; + case "null": + type = Token.NullLiteral; + break; + default: + type = Token.Identifier; + } + + return { + type: type, + value: id + }; + }, + + /* + * Extract a numeric literal out of the next sequence of + * characters or return 'null' if its not possible. This method + * supports all numeric literals described in section 7.8.3 + * of the EcmaScript 5 specification. + * + * This method's implementation was heavily influenced by the + * scanNumericLiteral function in the Esprima parser's source code. + */ + scanNumericLiteral: function () { + var index = 0; + var value = ""; + var length = this.input.length; + var char = this.peek(index); + var bad; + + function isDecimalDigit(str) { + return (/^[0-9]$/).test(str); + } + + function isOctalDigit(str) { + return (/^[0-7]$/).test(str); + } + + function isHexDigit(str) { + return (/^[0-9a-fA-F]$/).test(str); + } + + function isIdentifierStart(ch) { + return (ch === "$") || (ch === "_") || (ch === "\\") || + (ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z"); + } + + // Numbers must start either with a decimal digit or a point. + + if (char !== "." && !isDecimalDigit(char)) { + return null; + } + + if (char !== ".") { + value = this.peek(index); + index += 1; + char = this.peek(index); + + if (value === "0") { + // Base-16 numbers. + if (char === "x" || char === "X") { + index += 1; + value += char; + + while (index < length) { + char = this.peek(index); + if (!isHexDigit(char)) { + break; + } + value += char; + index += 1; + } + + if (value.length <= 2) { // 0x + return { + type: Token.NumericLiteral, + value: value, + isMalformed: true + }; + } + + if (index < length) { + char = this.peek(index); + if (isIdentifierStart(char)) { + return null; + } + } + + return { + type: Token.NumericLiteral, + value: value, + base: 16, + isMalformed: false + }; + } + + // Base-8 numbers. + if (isOctalDigit(char)) { + index += 1; + value += char; + bad = false; + + while (index < length) { + char = this.peek(index); + + // Numbers like '019' (note the 9) are not valid octals + // but we still parse them and mark as malformed. + + if (isDecimalDigit(char)) { + bad = true; + } else if (!isOctalDigit(char)) { + break; + } + value += char; + index += 1; + } + + if (index < length) { + char = this.peek(index); + if (isIdentifierStart(char)) { + return null; + } + } + + return { + type: Token.NumericLiteral, + value: value, + base: 8, + isMalformed: false + }; + } + + // Decimal numbers that start with '0' such as '09' are illegal + // but we still parse them and return as malformed. + + if (isDecimalDigit(char)) { + index += 1; + value += char; + } + } + + while (index < length) { + char = this.peek(index); + if (!isDecimalDigit(char)) { + break; + } + value += char; + index += 1; + } + } + + // Decimal digits. + + if (char === ".") { + value += char; + index += 1; + + while (index < length) { + char = this.peek(index); + if (!isDecimalDigit(char)) { + break; + } + value += char; + index += 1; + } + } + + // Exponent part. + + if (char === "e" || char === "E") { + value += char; + index += 1; + char = this.peek(index); + + if (char === "+" || char === "-") { + value += this.peek(index); + index += 1; + } + + char = this.peek(index); + if (isDecimalDigit(char)) { + value += char; + index += 1; + + while (index < length) { + char = this.peek(index); + if (!isDecimalDigit(char)) { + break; + } + value += char; + index += 1; + } + } else { + return null; + } + } + + if (index < length) { + char = this.peek(index); + if (isIdentifierStart(char)) { + return null; + } + } + + return { + type: Token.NumericLiteral, + value: value, + base: 10, + isMalformed: !isFinite(value) + }; + }, + + /* + * Extract a template literal out of the next sequence of characters + * and/or lines or return 'null' if its not possible. Since template + * literals can span across multiple lines, this method has to move + * the char pointer. + */ + scanTemplateLiteral: function () { + // String must start with a backtick. + if (!state.option.esnext || this.peek() !== "`") { + return null; + } + + var startLine = this.line; + var startChar = this.char; + var jump = 1; + var value = ""; + + // For now, do not perform any linting of the content of the template + // string. Just skip until the next backtick is found. + this.skip(); + + while (this.peek() !== "`") { + while (this.peek() === "") { + // End of line --- For template literals in ES6, no backslash is + // required to precede newlines. + if (!this.nextLine()) { + this.trigger("error", { + code: "E052", + line: startLine, + character: startChar + }); + + return { + type: Token.TemplateLiteral, + value: value, + isUnclosed: true + }; + } + value += "\n"; + } + + // TODO: do more interesting linting here, similar to string literal + // linting. + var char = this.peek(); + this.skip(jump); + value += char; + } + + this.skip(); + return { + type: Token.TemplateLiteral, + value: value, + isUnclosed: false + }; + }, + + /* + * Extract a string out of the next sequence of characters and/or + * lines or return 'null' if its not possible. Since strings can + * span across multiple lines this method has to move the char + * pointer. + * + * This method recognizes pseudo-multiline JavaScript strings: + * + * var str = "hello\ + * world"; + */ + scanStringLiteral: function (checks) { + /*jshint loopfunc:true */ + var quote = this.peek(); + + // String must start with a quote. + if (quote !== "\"" && quote !== "'") { + return null; + } + + // In JSON strings must always use double quotes. + this.triggerAsync("warning", { + code: "W108", + line: this.line, + character: this.char // +1? + }, checks, function () { return state.jsonMode && quote !== "\""; }); + + var value = ""; + var startLine = this.line; + var startChar = this.char; + var allowNewLine = false; + + this.skip(); + + outer: while (this.peek() !== quote) { + while (this.peek() === "") { // End Of Line + + // If an EOL is not preceded by a backslash, show a warning + // and proceed like it was a legit multi-line string where + // author simply forgot to escape the newline symbol. + // + // Another approach is to implicitly close a string on EOL + // but it generates too many false positives. + + if (!allowNewLine) { + this.trigger("warning", { + code: "W112", + line: this.line, + character: this.char + }); + } else { + allowNewLine = false; + + // Otherwise show a warning if multistr option was not set. + // For JSON, show warning no matter what. + + this.triggerAsync("warning", { + code: "W043", + line: this.line, + character: this.char + }, checks, function () { return !state.option.multistr; }); + + this.triggerAsync("warning", { + code: "W042", + line: this.line, + character: this.char + }, checks, function () { return state.jsonMode && state.option.multistr; }); + } + + // If we get an EOF inside of an unclosed string, show an + // error and implicitly close it at the EOF point. + + if (!this.nextLine()) { + this.trigger("error", { + code: "E029", + line: startLine, + character: startChar + }); + + return { + type: Token.StringLiteral, + value: value, + isUnclosed: true, + quote: quote + }; + } + + if (this.peek() == quote) + break outer; + } + + allowNewLine = false; + var char = this.peek(); + var jump = 1; // A length of a jump, after we're done + // parsing this character. + + if (char < " ") { + // Warn about a control character in a string. + this.trigger("warning", { + code: "W113", + line: this.line, + character: this.char, + data: [ "" ] + }); + } + + // Special treatment for some escaped characters. + + if (char === "\\") { + this.skip(); + char = this.peek(); + + switch (char) { + case "'": + this.triggerAsync("warning", { + code: "W114", + line: this.line, + character: this.char, + data: [ "\\'" ] + }, checks, function () {return state.jsonMode; }); + break; + case "b": + char = "\\b"; + break; + case "f": + char = "\\f"; + break; + case "n": + char = "\\n"; + break; + case "r": + char = "\\r"; + break; + case "t": + char = "\\t"; + break; + case "0": + char = "\\0"; + + // Octal literals fail in strict mode. + // Check if the number is between 00 and 07. + var n = parseInt(this.peek(1), 10); + this.triggerAsync("warning", { + code: "W115", + line: this.line, + character: this.char + }, checks, + function () { return n >= 0 && n <= 7 && state.directive["use strict"]; }); + break; + case "u": + char = String.fromCharCode(parseInt(this.input.substr(1, 4), 16)); + jump = 5; + break; + case "v": + this.triggerAsync("warning", { + code: "W114", + line: this.line, + character: this.char, + data: [ "\\v" ] + }, checks, function () { return state.jsonMode; }); + + char = "\v"; + break; + case "x": + var x = parseInt(this.input.substr(1, 2), 16); + + this.triggerAsync("warning", { + code: "W114", + line: this.line, + character: this.char, + data: [ "\\x-" ] + }, checks, function () { return state.jsonMode; }); + + char = String.fromCharCode(x); + jump = 3; + break; + case "\\": + char = "\\\\"; + break; + case "\"": + char = "\\\""; + break; + case "/": + break; + case "": + allowNewLine = true; + char = ""; + break; + case "!": + if (value.slice(value.length - 2) === "<") { + break; + } + + /*falls through */ + default: + // Weird escaping. + this.trigger("warning", { + code: "W044", + line: this.line, + character: this.char + }); + } + } + + value += char; + this.skip(jump); + } + + this.skip(); + return { + type: Token.StringLiteral, + value: value, + isUnclosed: false, + quote: quote + }; + }, + + /* + * Extract a regular expression out of the next sequence of + * characters and/or lines or return 'null' if its not possible. + * + * This method is platform dependent: it accepts almost any + * regular expression values but then tries to compile and run + * them using system's RegExp object. This means that there are + * rare edge cases where one JavaScript engine complains about + * your regular expression while others don't. + */ + scanRegExp: function () { + var index = 0; + var length = this.input.length; + var char = this.peek(); + var value = char; + var body = ""; + var flags = []; + var malformed = false; + var isCharSet = false; + var terminated; + + var scanUnexpectedChars = function () { + // Unexpected control character + if (char < " ") { + malformed = true; + this.trigger("warning", { + code: "W048", + line: this.line, + character: this.char + }); + } + + // Unexpected escaped character + if (char === "<") { + malformed = true; + this.trigger("warning", { + code: "W049", + line: this.line, + character: this.char, + data: [ char ] + }); + } + }.bind(this); + + // Regular expressions must start with '/' + if (!this.prereg || char !== "/") { + return null; + } + + index += 1; + terminated = false; + + // Try to get everything in between slashes. A couple of + // cases aside (see scanUnexpectedChars) we don't really + // care whether the resulting expression is valid or not. + // We will check that later using the RegExp object. + + while (index < length) { + char = this.peek(index); + value += char; + body += char; + + if (isCharSet) { + if (char === "]") { + if (this.peek(index - 1) !== "\\" || this.peek(index - 2) === "\\") { + isCharSet = false; + } + } + + if (char === "\\") { + index += 1; + char = this.peek(index); + body += char; + value += char; + + scanUnexpectedChars(); + } + + index += 1; + continue; + } + + if (char === "\\") { + index += 1; + char = this.peek(index); + body += char; + value += char; + + scanUnexpectedChars(); + + if (char === "/") { + index += 1; + continue; + } + + if (char === "[") { + index += 1; + continue; + } + } + + if (char === "[") { + isCharSet = true; + index += 1; + continue; + } + + if (char === "/") { + body = body.substr(0, body.length - 1); + terminated = true; + index += 1; + break; + } + + index += 1; + } + + // A regular expression that was never closed is an + // error from which we cannot recover. + + if (!terminated) { + this.trigger("error", { + code: "E015", + line: this.line, + character: this.from + }); + + return void this.trigger("fatal", { + line: this.line, + from: this.from + }); + } + + // Parse flags (if any). + + while (index < length) { + char = this.peek(index); + if (!/[gim]/.test(char)) { + break; + } + flags.push(char); + value += char; + index += 1; + } + + // Check regular expression for correctness. + + try { + new RegExp(body, flags.join("")); + } catch (err) { + malformed = true; + this.trigger("error", { + code: "E016", + line: this.line, + character: this.char, + data: [ err.message ] // Platform dependent! + }); + } + + return { + type: Token.RegExp, + value: value, + flags: flags, + isMalformed: malformed + }; + }, + + /* + * Scan for any occurence of non-breaking spaces. Non-breaking spaces + * can be mistakenly typed on OS X with option-space. Non UTF-8 web + * pages with non-breaking pages produce syntax errors. + */ + scanNonBreakingSpaces: function () { + return state.option.nonbsp ? + this.input.search(/(\u00A0)/) : -1; + }, + + /* + * Scan for characters that get silently deleted by one or more browsers. + */ + scanUnsafeChars: function () { + return this.input.search(reg.unsafeChars); + }, + + /* + * Produce the next raw token or return 'null' if no tokens can be matched. + * This method skips over all space characters. + */ + next: function (checks) { + this.from = this.char; + + // Move to the next non-space character. + var start; + if (/\s/.test(this.peek())) { + start = this.char; + + while (/\s/.test(this.peek())) { + this.from += 1; + this.skip(); + } + } + + // Methods that work with multi-line structures and move the + // character pointer. + + var match = this.scanComments() || + this.scanStringLiteral(checks) || + this.scanTemplateLiteral(); + + if (match) { + return match; + } + + // Methods that don't move the character pointer. + + match = + this.scanRegExp() || + this.scanPunctuator() || + this.scanKeyword() || + this.scanIdentifier() || + this.scanNumericLiteral(); + + if (match) { + this.skip(match.value.length); + return match; + } + + // No token could be matched, give up. + + return null; + }, + + /* + * Switch to the next line and reset all char pointers. Once + * switched, this method also checks for other minor warnings. + */ + nextLine: function () { + var char; + + if (this.line >= this.getLines().length) { + return false; + } + + this.input = this.getLines()[this.line]; + this.line += 1; + this.char = 1; + this.from = 1; + + var inputTrimmed = this.input.trim(); + + var startsWith = function () { + return _.some(arguments, function (prefix) { + return inputTrimmed.indexOf(prefix) === 0; + }); + }; + + var endsWith = function () { + return _.some(arguments, function (suffix) { + return inputTrimmed.indexOf(suffix, inputTrimmed.length - suffix.length) !== -1; + }); + }; + + // If we are ignoring linter errors, replace the input with empty string + // if it doesn't already at least start or end a multi-line comment + if (state.ignoreLinterErrors === true) { + if (!startsWith("/*", "//") && !endsWith("*/")) { + this.input = ""; + } + } + + char = this.scanNonBreakingSpaces(); + if (char >= 0) { + this.trigger("warning", { code: "W125", line: this.line, character: char + 1 }); + } + + this.input = this.input.replace(/\t/g, state.tab); + char = this.scanUnsafeChars(); + + if (char >= 0) { + this.trigger("warning", { code: "W100", line: this.line, character: char }); + } + + // If there is a limit on line length, warn when lines get too + // long. + + if (state.option.maxlen && state.option.maxlen < this.input.length) { + var inComment = this.inComment || + startsWith.call(inputTrimmed, "//") || + startsWith.call(inputTrimmed, "/*"); + + var shouldTriggerError = !inComment || !reg.maxlenException.test(inputTrimmed); + + if (shouldTriggerError) { + this.trigger("warning", { code: "W101", line: this.line, character: this.input.length }); + } + } + + return true; + }, + + /* + * This is simply a synonym for nextLine() method with a friendlier + * public name. + */ + start: function () { + this.nextLine(); + }, + + /* + * Produce the next token. This function is called by advance() to get + * the next token. It retuns a token in a JSLint-compatible format. + */ + token: function () { + /*jshint loopfunc:true */ + var checks = asyncTrigger(); + var token; + + + function isReserved(token, isProperty) { + if (!token.reserved) { + return false; + } + var meta = token.meta; + + if (meta && meta.isFutureReservedWord && state.option.inES5()) { + // ES3 FutureReservedWord in an ES5 environment. + if (!meta.es5) { + return false; + } + + // Some ES5 FutureReservedWord identifiers are active only + // within a strict mode environment. + if (meta.strictOnly) { + if (!state.option.strict && !state.directive["use strict"]) { + return false; + } + } + + if (isProperty) { + return false; + } + } + + return true; + } + + // Produce a token object. + var create = function (type, value, isProperty) { + /*jshint validthis:true */ + var obj; + + if (type !== "(endline)" && type !== "(end)") { + this.prereg = false; + } + + if (type === "(punctuator)") { + switch (value) { + case ".": + case ")": + case "~": + case "#": + case "]": + this.prereg = false; + break; + default: + this.prereg = true; + } + + obj = Object.create(state.syntax[value] || state.syntax["(error)"]); + } + + if (type === "(identifier)") { + if (value === "return" || value === "case" || value === "typeof") { + this.prereg = true; + } + + if (_.has(state.syntax, value)) { + obj = Object.create(state.syntax[value] || state.syntax["(error)"]); + + // If this can't be a reserved keyword, reset the object. + if (!isReserved(obj, isProperty && type === "(identifier)")) { + obj = null; + } + } + } + + if (!obj) { + obj = Object.create(state.syntax[type]); + } + + obj.identifier = (type === "(identifier)"); + obj.type = obj.type || type; + obj.value = value; + obj.line = this.line; + obj.character = this.char; + obj.from = this.from; + + if (isProperty && obj.identifier) { + obj.isProperty = isProperty; + } + + obj.check = checks.check; + + return obj; + }.bind(this); + + for (;;) { + if (!this.input.length) { + return create(this.nextLine() ? "(endline)" : "(end)", ""); + } + + token = this.next(checks); + + if (!token) { + if (this.input.length) { + // Unexpected character. + this.trigger("error", { + code: "E024", + line: this.line, + character: this.char, + data: [ this.peek() ] + }); + + this.input = ""; + } + + continue; + } + + switch (token.type) { + case Token.StringLiteral: + this.triggerAsync("String", { + line: this.line, + char: this.char, + from: this.from, + value: token.value, + quote: token.quote + }, checks, function () { return true; }); + + return create("(string)", token.value); + + case Token.TemplateLiteral: + this.trigger("Template", { + line: this.line, + char: this.char, + from: this.from, + value: token.value + }); + return create("(template)", token.value); + + case Token.Identifier: + this.trigger("Identifier", { + line: this.line, + char: this.char, + from: this.form, + name: token.value, + isProperty: state.tokens.curr.id === "." + }); + + /* falls through */ + case Token.Keyword: + case Token.NullLiteral: + case Token.BooleanLiteral: + return create("(identifier)", token.value, state.tokens.curr.id === "."); + + case Token.NumericLiteral: + if (token.isMalformed) { + this.trigger("warning", { + code: "W045", + line: this.line, + character: this.char, + data: [ token.value ] + }); + } + + this.triggerAsync("warning", { + code: "W114", + line: this.line, + character: this.char, + data: [ "0x-" ] + }, checks, function () { return token.base === 16 && state.jsonMode; }); + + this.triggerAsync("warning", { + code: "W115", + line: this.line, + character: this.char + }, checks, function () { + return state.directive["use strict"] && token.base === 8; + }); + + this.trigger("Number", { + line: this.line, + char: this.char, + from: this.from, + value: token.value, + base: token.base, + isMalformed: token.malformed + }); + + return create("(number)", token.value); + + case Token.RegExp: + return create("(regexp)", token.value); + + case Token.Comment: + state.tokens.curr.comment = true; + + if (token.isSpecial) { + return { + id: '(comment)', + value: token.value, + body: token.body, + type: token.commentType, + isSpecial: token.isSpecial, + line: this.line, + character: this.char, + from: this.from + }; + } + + break; + + case "": + break; + + default: + return create("(punctuator)", token.value); + } + } + } }; exports.Lexer = Lexer; }, -{"./reg.js":6,"./state.js":7,"events":10,"underscore":1}], -6:[function(req,module,exports){ +{"../data/ascii-identifier-data.js":1,"./reg.js":6,"./state.js":7,"events":10,"underscore":2}], +5:[function(_dereq_,module,exports){ +"use strict"; + +var _ = _dereq_("underscore"); + +var errors = { + // JSHint options + E001: "Bad option: '{a}'.", + E002: "Bad option value.", + + // JSHint input + E003: "Expected a JSON value.", + E004: "Input is neither a string nor an array of strings.", + E005: "Input is empty.", + E006: "Unexpected early end of program.", + + // Strict mode + E007: "Missing \"use strict\" statement.", + E008: "Strict violation.", + E009: "Option 'validthis' can't be used in a global scope.", + E010: "'with' is not allowed in strict mode.", + + // Constants + E011: "const '{a}' has already been declared.", + E012: "const '{a}' is initialized to 'undefined'.", + E013: "Attempting to override '{a}' which is a constant.", + + // Regular expressions + E014: "A regular expression literal can be confused with '/='.", + E015: "Unclosed regular expression.", + E016: "Invalid regular expression.", + + // Tokens + E017: "Unclosed comment.", + E018: "Unbegun comment.", + E019: "Unmatched '{a}'.", + E020: "Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.", + E021: "Expected '{a}' and instead saw '{b}'.", + E022: "Line breaking error '{a}'.", + E023: "Missing '{a}'.", + E024: "Unexpected '{a}'.", + E025: "Missing ':' on a case clause.", + E026: "Missing '}' to match '{' from line {a}.", + E027: "Missing ']' to match '[' from line {a}.", + E028: "Illegal comma.", + E029: "Unclosed string.", + + // Everything else + E030: "Expected an identifier and instead saw '{a}'.", + E031: "Bad assignment.", // FIXME: Rephrase + E032: "Expected a small integer or 'false' and instead saw '{a}'.", + E033: "Expected an operator and instead saw '{a}'.", + E034: "get/set are ES5 features.", + E035: "Missing property name.", + E036: "Expected to see a statement and instead saw a block.", + E037: null, + E038: null, + E039: "Function declarations are not invocable. Wrap the whole function invocation in parens.", + E040: "Each value should have its own case label.", + E041: "Unrecoverable syntax error.", + E042: "Stopping.", + E043: "Too many errors.", + E044: null, + E045: "Invalid for each loop.", + E046: "A yield statement shall be within a generator function (with syntax: `function*`)", + E047: null, // Vacant + E048: "Let declaration not directly within block.", + E049: "A {a} cannot be named '{b}'.", + E050: "Mozilla requires the yield expression to be parenthesized here.", + E051: "Regular parameters cannot come after default parameters.", + E052: "Unclosed template literal." +}; + +var warnings = { + W001: "'hasOwnProperty' is a really bad name.", + W002: "Value of '{a}' may be overwritten in IE 8 and earlier.", + W003: "'{a}' was used before it was defined.", + W004: "'{a}' is already defined.", + W005: "A dot following a number can be confused with a decimal point.", + W006: "Confusing minuses.", + W007: "Confusing plusses.", + W008: "A leading decimal point can be confused with a dot: '{a}'.", + W009: "The array literal notation [] is preferable.", + W010: "The object literal notation {} is preferable.", + W011: null, + W012: null, + W013: null, + W014: "Bad line breaking before '{a}'.", + W015: null, + W016: "Unexpected use of '{a}'.", + W017: "Bad operand.", + W018: "Confusing use of '{a}'.", + W019: "Use the isNaN function to compare with NaN.", + W020: "Read only.", + W021: "'{a}' is a function.", + W022: "Do not assign to the exception parameter.", + W023: "Expected an identifier in an assignment and instead saw a function invocation.", + W024: "Expected an identifier and instead saw '{a}' (a reserved word).", + W025: "Missing name in function declaration.", + W026: "Inner functions should be listed at the top of the outer function.", + W027: "Unreachable '{a}' after '{b}'.", + W028: "Label '{a}' on {b} statement.", + W030: "Expected an assignment or function call and instead saw an expression.", + W031: "Do not use 'new' for side effects.", + W032: "Unnecessary semicolon.", + W033: "Missing semicolon.", + W034: "Unnecessary directive \"{a}\".", + W035: "Empty block.", + W036: "Unexpected /*member '{a}'.", + W037: "'{a}' is a statement label.", + W038: "'{a}' used out of scope.", + W039: "'{a}' is not allowed.", + W040: "Possible strict violation.", + W041: "Use '{a}' to compare with '{b}'.", + W042: "Avoid EOL escaping.", + W043: "Bad escaping of EOL. Use option multistr if needed.", + W044: "Bad or unnecessary escaping.", + W045: "Bad number '{a}'.", + W046: "Don't use extra leading zeros '{a}'.", + W047: "A trailing decimal point can be confused with a dot: '{a}'.", + W048: "Unexpected control character in regular expression.", + W049: "Unexpected escaped character '{a}' in regular expression.", + W050: "JavaScript URL.", + W051: "Variables should not be deleted.", + W052: "Unexpected '{a}'.", + W053: "Do not use {a} as a constructor.", + W054: "The Function constructor is a form of eval.", + W055: "A constructor name should start with an uppercase letter.", + W056: "Bad constructor.", + W057: "Weird construction. Is 'new' necessary?", + W058: "Missing '()' invoking a constructor.", + W059: "Avoid arguments.{a}.", + W060: "document.write can be a form of eval.", + W061: "eval can be harmful.", + W062: "Wrap an immediate function invocation in parens " + + "to assist the reader in understanding that the expression " + + "is the result of a function, and not the function itself.", + W063: "Math is not a function.", + W064: "Missing 'new' prefix when invoking a constructor.", + W065: "Missing radix parameter.", + W066: "Implied eval. Consider passing a function instead of a string.", + W067: "Bad invocation.", + W068: "Wrapping non-IIFE function literals in parens is unnecessary.", + W069: "['{a}'] is better written in dot notation.", + W070: "Extra comma. (it breaks older versions of IE)", + W071: "This function has too many statements. ({a})", + W072: "This function has too many parameters. ({a})", + W073: "Blocks are nested too deeply. ({a})", + W074: "This function's cyclomatic complexity is too high. ({a})", + W075: "Duplicate key '{a}'.", + W076: "Unexpected parameter '{a}' in get {b} function.", + W077: "Expected a single parameter in set {a} function.", + W078: "Setter is defined without getter.", + W079: "Redefinition of '{a}'.", + W080: "It's not necessary to initialize '{a}' to 'undefined'.", + W081: null, + W082: "Function declarations should not be placed in blocks. " + + "Use a function expression or move the statement to the top of " + + "the outer function.", + W083: "Don't make functions within a loop.", + W084: "Assignment in conditional expression", + W085: "Don't use 'with'.", + W086: "Expected a 'break' statement before '{a}'.", + W087: "Forgotten 'debugger' statement?", + W088: "Creating global 'for' variable. Should be 'for (var {a} ...'.", + W089: "The body of a for in should be wrapped in an if statement to filter " + + "unwanted properties from the prototype.", + W090: "'{a}' is not a statement label.", + W091: "'{a}' is out of scope.", + W093: "Did you mean to return a conditional instead of an assignment?", + W094: "Unexpected comma.", + W095: "Expected a string and instead saw {a}.", + W096: "The '{a}' key may produce unexpected results.", + W097: "Use the function form of \"use strict\".", + W098: "'{a}' is defined but never used.", + W099: null, + W100: "This character may get silently deleted by one or more browsers.", + W101: "Line is too long.", + W102: null, + W103: "The '{a}' property is deprecated.", + W104: "'{a}' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz).", + W105: "Unexpected {a} in '{b}'.", + W106: "Identifier '{a}' is not in camel case.", + W107: "Script URL.", + W108: "Strings must use doublequote.", + W109: "Strings must use singlequote.", + W110: "Mixed double and single quotes.", + W112: "Unclosed string.", + W113: "Control character in string: {a}.", + W114: "Avoid {a}.", + W115: "Octal literals are not allowed in strict mode.", + W116: "Expected '{a}' and instead saw '{b}'.", + W117: "'{a}' is not defined.", + W118: "'{a}' is only available in Mozilla JavaScript extensions (use moz option).", + W119: "'{a}' is only available in ES6 (use esnext option).", + W120: "You might be leaking a variable ({a}) here.", + W121: "Extending prototype of native object: '{a}'.", + W122: "Invalid typeof value '{a}'", + W123: "'{a}' is already defined in outer scope.", + W124: "A generator function shall contain a yield statement.", + W125: "This line contains non-breaking spaces: http://jshint.com/doc/options/#nonbsp" +}; + +var info = { + I001: "Comma warnings can be turned off with 'laxcomma'.", + I002: null, + I003: "ES5 option is now set per default" +}; + +exports.errors = {}; +exports.warnings = {}; +exports.info = {}; + +_.each(errors, function (desc, code) { + exports.errors[code] = { code: code, desc: desc }; +}); + +_.each(warnings, function (desc, code) { + exports.warnings[code] = { code: code, desc: desc }; +}); + +_.each(info, function (desc, code) { + exports.info[code] = { code: code, desc: desc }; +}); + +}, +{"underscore":2}], +6:[function(_dereq_,module,exports){ /* * Regular expressions. Some of these are stupidly long. */ @@ -8577,18 +8130,18 @@ exports.Lexer = Lexer; // Unsafe comment or string (ax) exports.unsafeString = - /@cc|<\/?|script|\]\s*\]|<\s*!|</i; + /@cc|<\/?|script|\]\s*\]|<\s*!|</i; // Unsafe characters that are silently deleted by one or more browsers (cx) exports.unsafeChars = - /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/; + /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/; // Characters in strings that need escaping (nx and nxg) exports.needEsc = - /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/; + /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/; exports.needEscGlobal = - /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; + /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; // Star slash (lx) exports.starSlash = /\*\//; @@ -8602,265 +8155,888 @@ exports.javascriptURL = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livesc // Catches /* falls through */ comments (ft) exports.fallsThrough = /^\s*\/\*\s*falls?\sthrough\s*\*\/\s*$/; +// very conservative rule (eg: only one space between the start of the comment and the first character) +// to relax the maxlen option +exports.maxlenException = /^(?:(?:\/\/|\/\*|\*) ?)?[^ ]+$/; + }, {}], -7:[function(req,module,exports){ +7:[function(_dereq_,module,exports){ "use strict"; var state = { - syntax: {}, + syntax: {}, - reset: function () { - this.tokens = { - prev: null, - next: null, - curr: null - }; + reset: function () { + this.tokens = { + prev: null, + next: null, + curr: null + }; - this.option = {}; - this.ignored = {}; - this.directive = {}; - this.jsonMode = false; - this.jsonWarnings = []; - this.lines = []; - this.tab = ""; - this.cache = {}; // Node.JS doesn't have Map. Sniff. - } + this.option = {}; + this.ignored = {}; + this.directive = {}; + this.jsonMode = false; + this.jsonWarnings = []; + this.lines = []; + this.tab = ""; + this.cache = {}; // Node.JS doesn't have Map. Sniff. + this.ignoredLines = {}; + + // Blank out non-multi-line-commented lines when ignoring linter errors + this.ignoreLinterErrors = false; + } }; exports.state = state; }, {}], -8:[function(req,module,exports){ +8:[function(_dereq_,module,exports){ "use strict"; exports.register = function (linter) { - // Check for properties named __proto__. This special property was - // deprecated and then re-introduced for ES6. + // Check for properties named __proto__. This special property was + // deprecated and then re-introduced for ES6. - linter.on("Identifier", function style_scanProto(data) { - if (linter.getOption("proto")) { - return; - } + linter.on("Identifier", function style_scanProto(data) { + if (linter.getOption("proto")) { + return; + } - if (data.name === "__proto__") { - linter.warn("W103", { - line: data.line, - char: data.char, - data: [ data.name ] - }); - } - }); + if (data.name === "__proto__") { + linter.warn("W103", { + line: data.line, + char: data.char, + data: [ data.name ] + }); + } + }); - // Check for properties named __iterator__. This is a special property - // available only in browsers with JavaScript 1.7 implementation. + // Check for properties named __iterator__. This is a special property + // available only in browsers with JavaScript 1.7 implementation. - linter.on("Identifier", function style_scanIterator(data) { - if (linter.getOption("iterator")) { - return; - } + linter.on("Identifier", function style_scanIterator(data) { + if (linter.getOption("iterator")) { + return; + } - if (data.name === "__iterator__") { - linter.warn("W104", { - line: data.line, - char: data.char, - data: [ data.name ] - }); - } - }); + if (data.name === "__iterator__") { + linter.warn("W104", { + line: data.line, + char: data.char, + data: [ data.name ] + }); + } + }); - // Check for dangling underscores. + // Check that all identifiers are using camelCase notation. + // Exceptions: names like MY_VAR and _myVar. - linter.on("Identifier", function style_scanDangling(data) { - if (!linter.getOption("nomen")) { - return; - } + linter.on("Identifier", function style_scanCamelCase(data) { + if (!linter.getOption("camelcase")) { + return; + } - // Underscore.js - if (data.name === "_") { - return; - } + if (data.name.replace(/^_+|_+$/g, "").indexOf("_") > -1 && !data.name.match(/^[A-Z0-9_]*$/)) { + linter.warn("W106", { + line: data.line, + char: data.from, + data: [ data.name ] + }); + } + }); - // In Node, __dirname and __filename should be ignored. - if (linter.getOption("node")) { - if (/^(__dirname|__filename)$/.test(data.name) && !data.isProperty) { - return; - } - } + // Enforce consistency in style of quoting. - if (/^(_+.*|.*_+)$/.test(data.name)) { - linter.warn("W105", { - line: data.line, - char: data.from, - data: [ "dangling '_'", data.name ] - }); - } - }); + linter.on("String", function style_scanQuotes(data) { + var quotmark = linter.getOption("quotmark"); + var code; - // Check that all identifiers are using camelCase notation. - // Exceptions: names like MY_VAR and _myVar. + if (!quotmark) { + return; + } - linter.on("Identifier", function style_scanCamelCase(data) { - if (!linter.getOption("camelcase")) { - return; - } + // If quotmark is set to 'single' warn about all double-quotes. - if (data.name.replace(/^_+/, "").indexOf("_") > -1 && !data.name.match(/^[A-Z0-9_]*$/)) { - linter.warn("W106", { - line: data.line, - char: data.from, - data: [ data.name ] - }); - } - }); + if (quotmark === "single" && data.quote !== "'") { + code = "W109"; + } - // Enforce consistency in style of quoting. + // If quotmark is set to 'double' warn about all single-quotes. - linter.on("String", function style_scanQuotes(data) { - var quotmark = linter.getOption("quotmark"); - var code; + if (quotmark === "double" && data.quote !== "\"") { + code = "W108"; + } - if (!quotmark) { - return; - } + // If quotmark is set to true, remember the first quotation style + // and then warn about all others. - // If quotmark is set to 'single' warn about all double-quotes. + if (quotmark === true) { + if (!linter.getCache("quotmark")) { + linter.setCache("quotmark", data.quote); + } - if (quotmark === "single" && data.quote !== "'") { - code = "W109"; - } + if (linter.getCache("quotmark") !== data.quote) { + code = "W110"; + } + } - // If quotmark is set to 'double' warn about all single-quotes. + if (code) { + linter.warn(code, { + line: data.line, + char: data.char, + }); + } + }); - if (quotmark === "double" && data.quote !== "\"") { - code = "W108"; - } + linter.on("Number", function style_scanNumbers(data) { + if (data.value.charAt(0) === ".") { + // Warn about a leading decimal point. + linter.warn("W008", { + line: data.line, + char: data.char, + data: [ data.value ] + }); + } - // If quotmark is set to true, remember the first quotation style - // and then warn about all others. + if (data.value.substr(data.value.length - 1) === ".") { + // Warn about a trailing decimal point. + linter.warn("W047", { + line: data.line, + char: data.char, + data: [ data.value ] + }); + } - if (quotmark === true) { - if (!linter.getCache("quotmark")) { - linter.setCache("quotmark", data.quote); - } + if (/^00+/.test(data.value)) { + // Multiple leading zeroes. + linter.warn("W046", { + line: data.line, + char: data.char, + data: [ data.value ] + }); + } + }); - if (linter.getCache("quotmark") !== data.quote) { - code = "W110"; - } - } + // Warn about script URLs. - if (code) { - linter.warn(code, { - line: data.line, - char: data.char, - }); - } - }); + linter.on("String", function style_scanJavaScriptURLs(data) { + var re = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i; - linter.on("Number", function style_scanNumbers(data) { - if (data.value.charAt(0) === ".") { - // Warn about a leading decimal point. - linter.warn("W008", { - line: data.line, - char: data.char, - data: [ data.value ] - }); - } + if (linter.getOption("scripturl")) { + return; + } - if (data.value.substr(data.value.length - 1) === ".") { - // Warn about a trailing decimal point. - linter.warn("W047", { - line: data.line, - char: data.char, - data: [ data.value ] - }); - } - - if (/^00+/.test(data.value)) { - // Multiple leading zeroes. - linter.warn("W046", { - line: data.line, - char: data.char, - data: [ data.value ] - }); - } - }); - - // Warn about script URLs. - - linter.on("String", function style_scanJavaScriptURLs(data) { - var re = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i; - - if (linter.getOption("scripturl")) { - return; - } - - if (re.test(data.value)) { - linter.warn("W107", { - line: data.line, - char: data.char - }); - } - }); + if (re.test(data.value)) { + linter.warn("W107", { + line: data.line, + char: data.char + }); + } + }); }; -}, -{}], -9:[function(req,module,exports){ }, {}], -10:[function(req,module,exports){ -var process=req("__browserify_process");if (!process.EventEmitter) process.EventEmitter = function () {}; +9:[function(_dereq_,module,exports){ +// jshint -W001 -var EventEmitter = exports.EventEmitter = process.EventEmitter; -var isArray = typeof Array.isArray === 'function' - ? Array.isArray - : function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]' - } -; -function indexOf (xs, x) { - if (xs.indexOf) return xs.indexOf(x); - for (var i = 0; i < xs.length; i++) { - if (x === xs[i]) return i; - } - return -1; -} +"use strict"; -// By default EventEmitters will print a warning if more than -// 10 listeners are added to it. This is a useful default which -// helps finding memory leaks. +// Identifiers provided by the ECMAScript standard. + +exports.reservedVars = { + arguments : false, + NaN : false +}; + +exports.ecmaIdentifiers = { + Array : false, + Boolean : false, + Date : false, + decodeURI : false, + decodeURIComponent : false, + encodeURI : false, + encodeURIComponent : false, + Error : false, + "eval" : false, + EvalError : false, + Function : false, + hasOwnProperty : false, + isFinite : false, + isNaN : false, + JSON : false, + Math : false, + Number : false, + Object : false, + parseInt : false, + parseFloat : false, + RangeError : false, + ReferenceError : false, + RegExp : false, + String : false, + SyntaxError : false, + TypeError : false, + URIError : false, +}; + +exports.newEcmaIdentifiers = { + Set : false, + Map : false, + WeakMap : false, + WeakSet : false, + Proxy : false, + Promise : false +}; + +// Global variables commonly provided by a web browser environment. + +exports.browser = { + Audio : false, + Blob : false, + addEventListener : false, + applicationCache : false, + atob : false, + blur : false, + btoa : false, + CanvasGradient : false, + CanvasPattern : false, + CanvasRenderingContext2D: false, + clearInterval : false, + clearTimeout : false, + close : false, + closed : false, + CustomEvent : false, + DOMParser : false, + defaultStatus : false, + document : false, + Element : false, + ElementTimeControl : false, + event : false, + FileReader : false, + FormData : false, + focus : false, + frames : false, + getComputedStyle : false, + HTMLElement : false, + HTMLAnchorElement : false, + HTMLBaseElement : false, + HTMLBlockquoteElement: false, + HTMLBodyElement : false, + HTMLBRElement : false, + HTMLButtonElement : false, + HTMLCanvasElement : false, + HTMLDirectoryElement : false, + HTMLDivElement : false, + HTMLDListElement : false, + HTMLFieldSetElement : false, + HTMLFontElement : false, + HTMLFormElement : false, + HTMLFrameElement : false, + HTMLFrameSetElement : false, + HTMLHeadElement : false, + HTMLHeadingElement : false, + HTMLHRElement : false, + HTMLHtmlElement : false, + HTMLIFrameElement : false, + HTMLImageElement : false, + HTMLInputElement : false, + HTMLIsIndexElement : false, + HTMLLabelElement : false, + HTMLLayerElement : false, + HTMLLegendElement : false, + HTMLLIElement : false, + HTMLLinkElement : false, + HTMLMapElement : false, + HTMLMenuElement : false, + HTMLMetaElement : false, + HTMLModElement : false, + HTMLObjectElement : false, + HTMLOListElement : false, + HTMLOptGroupElement : false, + HTMLOptionElement : false, + HTMLParagraphElement : false, + HTMLParamElement : false, + HTMLPreElement : false, + HTMLQuoteElement : false, + HTMLScriptElement : false, + HTMLSelectElement : false, + HTMLStyleElement : false, + HTMLTableCaptionElement: false, + HTMLTableCellElement : false, + HTMLTableColElement : false, + HTMLTableElement : false, + HTMLTableRowElement : false, + HTMLTableSectionElement: false, + HTMLTextAreaElement : false, + HTMLTitleElement : false, + HTMLUListElement : false, + HTMLVideoElement : false, + history : false, + Image : false, + length : false, + localStorage : false, + location : false, + matchMedia : false, + MessageChannel : false, + MessageEvent : false, + MessagePort : false, + MouseEvent : false, + moveBy : false, + moveTo : false, + MutationObserver : false, + name : false, + Node : false, + NodeFilter : false, + NodeList : false, + navigator : false, + onbeforeunload : true, + onblur : true, + onerror : true, + onfocus : true, + onload : true, + onresize : true, + onunload : true, + open : false, + openDatabase : false, + opener : false, + Option : false, + parent : false, + print : false, + removeEventListener : false, + resizeBy : false, + resizeTo : false, + screen : false, + scroll : false, + scrollBy : false, + scrollTo : false, + sessionStorage : false, + setInterval : false, + setTimeout : false, + SharedWorker : false, + status : false, + SVGAElement : false, + SVGAltGlyphDefElement: false, + SVGAltGlyphElement : false, + SVGAltGlyphItemElement: false, + SVGAngle : false, + SVGAnimateColorElement: false, + SVGAnimateElement : false, + SVGAnimateMotionElement: false, + SVGAnimateTransformElement: false, + SVGAnimatedAngle : false, + SVGAnimatedBoolean : false, + SVGAnimatedEnumeration: false, + SVGAnimatedInteger : false, + SVGAnimatedLength : false, + SVGAnimatedLengthList: false, + SVGAnimatedNumber : false, + SVGAnimatedNumberList: false, + SVGAnimatedPathData : false, + SVGAnimatedPoints : false, + SVGAnimatedPreserveAspectRatio: false, + SVGAnimatedRect : false, + SVGAnimatedString : false, + SVGAnimatedTransformList: false, + SVGAnimationElement : false, + SVGCSSRule : false, + SVGCircleElement : false, + SVGClipPathElement : false, + SVGColor : false, + SVGColorProfileElement: false, + SVGColorProfileRule : false, + SVGComponentTransferFunctionElement: false, + SVGCursorElement : false, + SVGDefsElement : false, + SVGDescElement : false, + SVGDocument : false, + SVGElement : false, + SVGElementInstance : false, + SVGElementInstanceList: false, + SVGEllipseElement : false, + SVGExternalResourcesRequired: false, + SVGFEBlendElement : false, + SVGFEColorMatrixElement: false, + SVGFEComponentTransferElement: false, + SVGFECompositeElement: false, + SVGFEConvolveMatrixElement: false, + SVGFEDiffuseLightingElement: false, + SVGFEDisplacementMapElement: false, + SVGFEDistantLightElement: false, + SVGFEFloodElement : false, + SVGFEFuncAElement : false, + SVGFEFuncBElement : false, + SVGFEFuncGElement : false, + SVGFEFuncRElement : false, + SVGFEGaussianBlurElement: false, + SVGFEImageElement : false, + SVGFEMergeElement : false, + SVGFEMergeNodeElement: false, + SVGFEMorphologyElement: false, + SVGFEOffsetElement : false, + SVGFEPointLightElement: false, + SVGFESpecularLightingElement: false, + SVGFESpotLightElement: false, + SVGFETileElement : false, + SVGFETurbulenceElement: false, + SVGFilterElement : false, + SVGFilterPrimitiveStandardAttributes: false, + SVGFitToViewBox : false, + SVGFontElement : false, + SVGFontFaceElement : false, + SVGFontFaceFormatElement: false, + SVGFontFaceNameElement: false, + SVGFontFaceSrcElement: false, + SVGFontFaceUriElement: false, + SVGForeignObjectElement: false, + SVGGElement : false, + SVGGlyphElement : false, + SVGGlyphRefElement : false, + SVGGradientElement : false, + SVGHKernElement : false, + SVGICCColor : false, + SVGImageElement : false, + SVGLangSpace : false, + SVGLength : false, + SVGLengthList : false, + SVGLineElement : false, + SVGLinearGradientElement: false, + SVGLocatable : false, + SVGMPathElement : false, + SVGMarkerElement : false, + SVGMaskElement : false, + SVGMatrix : false, + SVGMetadataElement : false, + SVGMissingGlyphElement: false, + SVGNumber : false, + SVGNumberList : false, + SVGPaint : false, + SVGPathElement : false, + SVGPathSeg : false, + SVGPathSegArcAbs : false, + SVGPathSegArcRel : false, + SVGPathSegClosePath : false, + SVGPathSegCurvetoCubicAbs: false, + SVGPathSegCurvetoCubicRel: false, + SVGPathSegCurvetoCubicSmoothAbs: false, + SVGPathSegCurvetoCubicSmoothRel: false, + SVGPathSegCurvetoQuadraticAbs: false, + SVGPathSegCurvetoQuadraticRel: false, + SVGPathSegCurvetoQuadraticSmoothAbs: false, + SVGPathSegCurvetoQuadraticSmoothRel: false, + SVGPathSegLinetoAbs : false, + SVGPathSegLinetoHorizontalAbs: false, + SVGPathSegLinetoHorizontalRel: false, + SVGPathSegLinetoRel : false, + SVGPathSegLinetoVerticalAbs: false, + SVGPathSegLinetoVerticalRel: false, + SVGPathSegList : false, + SVGPathSegMovetoAbs : false, + SVGPathSegMovetoRel : false, + SVGPatternElement : false, + SVGPoint : false, + SVGPointList : false, + SVGPolygonElement : false, + SVGPolylineElement : false, + SVGPreserveAspectRatio: false, + SVGRadialGradientElement: false, + SVGRect : false, + SVGRectElement : false, + SVGRenderingIntent : false, + SVGSVGElement : false, + SVGScriptElement : false, + SVGSetElement : false, + SVGStopElement : false, + SVGStringList : false, + SVGStylable : false, + SVGStyleElement : false, + SVGSwitchElement : false, + SVGSymbolElement : false, + SVGTRefElement : false, + SVGTSpanElement : false, + SVGTests : false, + SVGTextContentElement: false, + SVGTextElement : false, + SVGTextPathElement : false, + SVGTextPositioningElement: false, + SVGTitleElement : false, + SVGTransform : false, + SVGTransformList : false, + SVGTransformable : false, + SVGURIReference : false, + SVGUnitTypes : false, + SVGUseElement : false, + SVGVKernElement : false, + SVGViewElement : false, + SVGViewSpec : false, + SVGZoomAndPan : false, + TimeEvent : false, + top : false, + URL : false, + WebSocket : false, + window : false, + Worker : false, + XMLHttpRequest : false, + XMLSerializer : false, + XPathEvaluator : false, + XPathException : false, + XPathExpression : false, + XPathNamespace : false, + XPathNSResolver : false, + XPathResult : false +}; + +exports.devel = { + alert : false, + confirm: false, + console: false, + Debug : false, + opera : false, + prompt : false +}; + +exports.worker = { + importScripts: true, + postMessage : true, + self : true +}; + +// Widely adopted global names that are not part of ECMAScript standard +exports.nonstandard = { + escape : false, + unescape: false +}; + +// Globals provided by popular JavaScript environments. + +exports.couch = { + "require" : false, + respond : false, + getRow : false, + emit : false, + send : false, + start : false, + sum : false, + log : false, + exports : false, + module : false, + provides : false +}; + +exports.node = { + __filename : false, + __dirname : false, + GLOBAL : false, + global : false, + module : false, + require : false, + + // These globals are writeable because Node allows the following + // usage pattern: var Buffer = require("buffer").Buffer; + + Buffer : true, + console : true, + exports : true, + process : true, + setTimeout : true, + clearTimeout : true, + setInterval : true, + clearInterval : true, + setImmediate : true, // v0.9.1+ + clearImmediate: true // v0.9.1+ +}; + +exports.phantom = { + phantom : true, + require : true, + WebPage : true, + console : true, // in examples, but undocumented + exports : true // v1.7+ +}; + +exports.rhino = { + defineClass : false, + deserialize : false, + gc : false, + help : false, + importClass : false, + importPackage: false, + "java" : false, + load : false, + loadClass : false, + Packages : false, + print : false, + quit : false, + readFile : false, + readUrl : false, + runCommand : false, + seal : false, + serialize : false, + spawn : false, + sync : false, + toint32 : false, + version : false +}; + +exports.shelljs = { + target : false, + echo : false, + exit : false, + cd : false, + pwd : false, + ls : false, + find : false, + cp : false, + rm : false, + mv : false, + mkdir : false, + test : false, + cat : false, + sed : false, + grep : false, + which : false, + dirs : false, + pushd : false, + popd : false, + env : false, + exec : false, + chmod : false, + config : false, + error : false, + tempdir : false +}; + +exports.typed = { + ArrayBuffer : false, + ArrayBufferView : false, + DataView : false, + Float32Array : false, + Float64Array : false, + Int16Array : false, + Int32Array : false, + Int8Array : false, + Uint16Array : false, + Uint32Array : false, + Uint8Array : false, + Uint8ClampedArray : false +}; + +exports.wsh = { + ActiveXObject : true, + Enumerator : true, + GetObject : true, + ScriptEngine : true, + ScriptEngineBuildVersion : true, + ScriptEngineMajorVersion : true, + ScriptEngineMinorVersion : true, + VBArray : true, + WSH : true, + WScript : true, + XDomainRequest : true +}; + +// Globals provided by popular JavaScript libraries. + +exports.dojo = { + dojo : false, + dijit : false, + dojox : false, + define : false, + "require": false +}; + +exports.jquery = { + "$" : false, + jQuery : false +}; + +exports.mootools = { + "$" : false, + "$$" : false, + Asset : false, + Browser : false, + Chain : false, + Class : false, + Color : false, + Cookie : false, + Core : false, + Document : false, + DomReady : false, + DOMEvent : false, + DOMReady : false, + Drag : false, + Element : false, + Elements : false, + Event : false, + Events : false, + Fx : false, + Group : false, + Hash : false, + HtmlTable : false, + Iframe : false, + IframeShim : false, + InputValidator: false, + instanceOf : false, + Keyboard : false, + Locale : false, + Mask : false, + MooTools : false, + Native : false, + Options : false, + OverText : false, + Request : false, + Scroller : false, + Slick : false, + Slider : false, + Sortables : false, + Spinner : false, + Swiff : false, + Tips : false, + Type : false, + typeOf : false, + URI : false, + Window : false +}; + +exports.prototypejs = { + "$" : false, + "$$" : false, + "$A" : false, + "$F" : false, + "$H" : false, + "$R" : false, + "$break" : false, + "$continue" : false, + "$w" : false, + Abstract : false, + Ajax : false, + Class : false, + Enumerable : false, + Element : false, + Event : false, + Field : false, + Form : false, + Hash : false, + Insertion : false, + ObjectRange : false, + PeriodicalExecuter: false, + Position : false, + Prototype : false, + Selector : false, + Template : false, + Toggle : false, + Try : false, + Autocompleter : false, + Builder : false, + Control : false, + Draggable : false, + Draggables : false, + Droppables : false, + Effect : false, + Sortable : false, + SortableObserver : false, + Sound : false, + Scriptaculous : false +}; + +exports.yui = { + YUI : false, + Y : false, + YUI_config: false +}; + +exports.mocha = { + // BDD + describe : false, + it : false, + before : false, + after : false, + beforeEach : false, + afterEach : false, + // TDD + suite : false, + test : false, + setup : false, + teardown : false +}; + +}, +{}], +10:[function(_dereq_,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. // +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +function EventEmitter() { + this._events = this._events || {}; + this._maxListeners = this._maxListeners || undefined; +} +module.exports = EventEmitter; + +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; + +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._maxListeners = undefined; + +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +EventEmitter.defaultMaxListeners = 10; + // Obviously not all Emitters should be limited to 10. This function allows // that to be increased. Set to zero for unlimited. -var defaultMaxListeners = 200; EventEmitter.prototype.setMaxListeners = function(n) { - if (!this._events) this._events = {}; - this._events.maxListeners = n; + if (!isNumber(n) || n < 0 || isNaN(n)) + throw TypeError('n must be a positive number'); + this._maxListeners = n; + return this; }; - EventEmitter.prototype.emit = function(type) { + var er, handler, len, args, i, listeners; + + if (!this._events) + this._events = {}; + // If there is no 'error' event listener then throw. if (type === 'error') { - if (!this._events || !this._events.error || - (isArray(this._events.error) && !this._events.error.length)) - { - if (arguments[1] instanceof Error) { - throw arguments[1]; // Unhandled 'error' event + if (!this._events.error || + (isObject(this._events.error) && !this._events.error.length)) { + er = arguments[1]; + if (er instanceof Error) { + throw er; // Unhandled 'error' event } else { - throw new Error("Uncaught, unspecified 'error' event."); + throw TypeError('Uncaught, unspecified "error" event.'); } return false; } } - if (!this._events) return false; - var handler = this._events[type]; - if (!handler) return false; + handler = this._events[type]; - if (typeof handler == 'function') { + if (isUndefined(handler)) + return false; + + if (isFunction(handler)) { switch (arguments.length) { // fast cases case 1: @@ -8874,67 +9050,70 @@ EventEmitter.prototype.emit = function(type) { break; // slower default: - var args = Array.prototype.slice.call(arguments, 1); + len = arguments.length; + args = new Array(len - 1); + for (i = 1; i < len; i++) + args[i - 1] = arguments[i]; handler.apply(this, args); } - return true; + } else if (isObject(handler)) { + len = arguments.length; + args = new Array(len - 1); + for (i = 1; i < len; i++) + args[i - 1] = arguments[i]; - } else if (isArray(handler)) { - var args = Array.prototype.slice.call(arguments, 1); - - var listeners = handler.slice(); - for (var i = 0, l = listeners.length; i < l; i++) { + listeners = handler.slice(); + len = listeners.length; + for (i = 0; i < len; i++) listeners[i].apply(this, args); - } - return true; - - } else { - return false; } + + return true; }; -// EventEmitter is defined in src/node_events.cc -// EventEmitter.prototype.emit() is also defined there. EventEmitter.prototype.addListener = function(type, listener) { - if ('function' !== typeof listener) { - throw new Error('addListener only takes instances of Function'); - } + var m; - if (!this._events) this._events = {}; + if (!isFunction(listener)) + throw TypeError('listener must be a function'); - // To avoid recursion in the case that type == "newListeners"! Before - // adding it to the listeners, first emit "newListeners". - this.emit('newListener', type, listener); + if (!this._events) + this._events = {}; - if (!this._events[type]) { + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (this._events.newListener) + this.emit('newListener', type, + isFunction(listener.listener) ? + listener.listener : listener); + + if (!this._events[type]) // Optimize the case of one listener. Don't need the extra array object. this._events[type] = listener; - } else if (isArray(this._events[type])) { - - // Check for listener leak - if (!this._events[type].warned) { - var m; - if (this._events.maxListeners !== undefined) { - m = this._events.maxListeners; - } else { - m = defaultMaxListeners; - } - - if (m && m > 0 && this._events[type].length > m) { - this._events[type].warned = true; - console.error('(node) warning: possible EventEmitter memory ' + - 'leak detected. %d listeners added. ' + - 'Use emitter.setMaxListeners() to increase limit.', - this._events[type].length); - console.trace(); - } - } - + else if (isObject(this._events[type])) // If we've already got an array, just append. this._events[type].push(listener); - } else { + else // Adding the second element, need to change to array. this._events[type] = [this._events[type], listener]; + + // Check for listener leak + if (isObject(this._events[type]) && !this._events[type].warned) { + var m; + if (!isUndefined(this._maxListeners)) { + m = this._maxListeners; + } else { + m = EventEmitter.defaultMaxListeners; + } + + if (m && m > 0 && this._events[type].length > m) { + this._events[type].warned = true; + console.error('(node) warning: possible EventEmitter memory ' + + 'leak detected. %d listeners added. ' + + 'Use emitter.setMaxListeners() to increase limit.', + this._events[type].length); + console.trace(); + } } return this; @@ -8943,134 +9122,152 @@ EventEmitter.prototype.addListener = function(type, listener) { EventEmitter.prototype.on = EventEmitter.prototype.addListener; EventEmitter.prototype.once = function(type, listener) { - var self = this; - self.on(type, function g() { - self.removeListener(type, g); - listener.apply(this, arguments); - }); + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + var fired = false; + + function g() { + this.removeListener(type, g); + + if (!fired) { + fired = true; + listener.apply(this, arguments); + } + } + + g.listener = listener; + this.on(type, g); return this; }; +// emits a 'removeListener' event iff the listener was removed EventEmitter.prototype.removeListener = function(type, listener) { - if ('function' !== typeof listener) { - throw new Error('removeListener only takes instances of Function'); - } + var list, position, length, i; - // does not use listeners(), so no side effect of creating _events[type] - if (!this._events || !this._events[type]) return this; + if (!isFunction(listener)) + throw TypeError('listener must be a function'); - var list = this._events[type]; + if (!this._events || !this._events[type]) + return this; - if (isArray(list)) { - var i = indexOf(list, listener); - if (i < 0) return this; - list.splice(i, 1); - if (list.length == 0) - delete this._events[type]; - } else if (this._events[type] === listener) { + list = this._events[type]; + length = list.length; + position = -1; + + if (list === listener || + (isFunction(list.listener) && list.listener === listener)) { delete this._events[type]; + if (this._events.removeListener) + this.emit('removeListener', type, listener); + + } else if (isObject(list)) { + for (i = length; i-- > 0;) { + if (list[i] === listener || + (list[i].listener && list[i].listener === listener)) { + position = i; + break; + } + } + + if (position < 0) + return this; + + if (list.length === 1) { + list.length = 0; + delete this._events[type]; + } else { + list.splice(position, 1); + } + + if (this._events.removeListener) + this.emit('removeListener', type, listener); } return this; }; EventEmitter.prototype.removeAllListeners = function(type) { + var key, listeners; + + if (!this._events) + return this; + + // not listening for removeListener, no need to emit + if (!this._events.removeListener) { + if (arguments.length === 0) + this._events = {}; + else if (this._events[type]) + delete this._events[type]; + return this; + } + + // emit removeListener for all listeners on all events if (arguments.length === 0) { + for (key in this._events) { + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); this._events = {}; return this; } - // does not use listeners(), so no side effect of creating _events[type] - if (type && this._events && this._events[type]) this._events[type] = null; + listeners = this._events[type]; + + if (isFunction(listeners)) { + this.removeListener(type, listeners); + } else { + // LIFO order + while (listeners.length) + this.removeListener(type, listeners[listeners.length - 1]); + } + delete this._events[type]; + return this; }; EventEmitter.prototype.listeners = function(type) { - if (!this._events) this._events = {}; - if (!this._events[type]) this._events[type] = []; - if (!isArray(this._events[type])) { - this._events[type] = [this._events[type]]; - } - return this._events[type]; + var ret; + if (!this._events || !this._events[type]) + ret = []; + else if (isFunction(this._events[type])) + ret = [this._events[type]]; + else + ret = this._events[type].slice(); + return ret; }; EventEmitter.listenerCount = function(emitter, type) { var ret; if (!emitter._events || !emitter._events[type]) ret = 0; - else if (typeof emitter._events[type] === 'function') + else if (isFunction(emitter._events[type])) ret = 1; else ret = emitter._events[type].length; return ret; }; -}, -{"__browserify_process":11}], -11:[function(req,module,exports){ -// shim for using process in browser - -var process = module.exports = {}; - -process.nextTick = (function () { - var canSetImmediate = typeof window !== 'undefined' - && window.setImmediate; - var canPost = typeof window !== 'undefined' - && window.postMessage && window.addEventListener - ; - - if (canSetImmediate) { - return function (f) { return window.setImmediate(f) }; - } - - if (canPost) { - var queue = []; - window.addEventListener('message', function (ev) { - if (ev.source === window && ev.data === 'process-tick') { - ev.stopPropagation(); - if (queue.length > 0) { - var fn = queue.shift(); - fn(); - } - } - }, true); - - return function nextTick(fn) { - queue.push(fn); - window.postMessage('process-tick', '*'); - }; - } - - return function nextTick(fn) { - setTimeout(fn, 0); - }; -})(); - -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; - -process.binding = function (name) { - throw new Error('process.binding is not supported'); +function isFunction(arg) { + return typeof arg === 'function'; } -// TODO(shtylman) -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; +function isNumber(arg) { + return typeof arg === 'number'; +} + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} + +function isUndefined(arg) { + return arg === void 0; +} }, -{}], -"jshint":[function(req,module,exports){ -module.exports=req('n4bKNg'); -}, -{}]},{},["n4bKNg"]) -; - -function req() {return require.apply(this, arguments)} -module.exports = req("jshint"); +{}]},{},[3]) +(3) }); \ No newline at end of file diff --git a/tool/update_deps.js b/tool/update_deps.js index a5adebb3..4ac9f4e6 100644 --- a/tool/update_deps.js +++ b/tool/update_deps.js @@ -12,7 +12,12 @@ var deps = { csslint: { path: "mode/css/csslint.js", url: "https://raw.github.com/stubbornella/csslint/master/release/csslint.js", - needsFixup: true + needsFixup: true, + browserify: { + npmModule: "csslint@latest", + path: "jshint/src/jshint.js", + exports: "jshint" + }, }, requirejs: { path: "../../demo/kitchen-sink/require.js", @@ -30,49 +35,34 @@ var deps = { ) } }, - jshint: { - path: "mode/javascript/jshint.js", - url: "http://jshint.com/get/jshint-2.1.9.js", - fetch: function(_, cb) { - //run("npm install jshint@latest", function() { - var base = Path.join(__dirname, "/node_modules/jshint/") - var path = Path.join(base, "/src/stable/jshint") - run('browserify ' + path + ' -i console-browserify -r jshint', function(err, src) { - src = replaceConsoleBrowserify(src); - var version = JSON.parse(fs.readFileSync(base + "package.json")).version - src = [ "// " + version, - "var JSHINT;", - "(function () {", - "require = null;", - src, - "JSHINT = require('jshint').JSHINT;", - "}());" - ].join("\n") - cb(err, src); - }) - //}); + html5: { + path: "mode/html/saxparser.js", + browserify: { + npmModule: "git+https://github.com/aredridel/html5.git#master", + path: "html5/lib/sax/SAXParser.js", + exports: "SAXParser" }, + fetch: browserify, + needsFixup: true, + postProcess: function(src) { + return src; + } + }, + jshint: { + path: "mode/javascript/jshint.js", + browserify: { + npmModule: "git+https://github.com/nightwing/jshint.git#master", + path: "jshint/src/jshint.js", + exports: "jshint" + }, + fetch: browserify, needsFixup: true, postProcess: function(src) { - src = src.replace(/(\],|\{)((?:\d+|"\w+"):\[)/g, "$1\n$2") - .replace(/^(\},)(\{[^{}\[\]]*?\}\])/gm, "$1\n$2") - src = src.replace( /"Expected a conditional expression and instead saw an assignment."/g, '"Assignment in conditional expression"' ); - - src = src.replace(/\brequire\(["']|\(require,|\(require\)/g, function(r){ - return r.replace("require", "req"); - }) - src = src.replace(/var defaultMaxListeners = 10;/, function(a) {return a.replace("10", "200")}); - - src = src.replace(/var JSHINT;\s*\(function[\s()]+\{\s*/, "") - .replace(/JSHINT = .*\n\s*\}\(\)\);\s*/, ""); - src += '\n' - + 'function req() {return require.apply(this, arguments)}\n' - + 'module.exports = req("jshint");\n'; return src; } }, @@ -238,23 +228,19 @@ function unquote(str) { }); } -function replaceConsoleBrowserify(str) { - var simpleConsole = function(req,module,exports){ - ["log", "info", "warn", "error", - "time","timeEnd", "trace", "dir", "assert" - ].forEach(function(x) {exports[x] = nop;}); - function nop() {} - } - var m = /"console-browserify":(\d+)/.exec(str); - name = m && m[1]; - if (name) { - str = str.replace( - "{1:[", - "{" + name + ":[" + simpleConsole + ",{}],\n1:[" - ) - } - return str; +function browserify(_, cb) { + var br = this.browserify; + var path = Path.join("node_modules", br.path) + run("npm install " + this.browserify.npmModule, function() { + run("browserify " + path + " -s " + br.exports, function(err, src) { + src = src.replace(/^.*return\s*\(function/, "module.exports = (function") + .replace(/\}\);\s*$/, ""); + src = src.replace(/(\],|\{)((?:\d+|"\w+"):\[)/g, "$1\n$2") + .replace(/^(\},)(\{[^{}\[\]]*?\}\])/gm, "$1\n$2") + cb(err, src); + }) + }) } - +getDep(deps.html5) getDep(deps.jshint) \ No newline at end of file From bb558021977c07c73d9ba9da1497439ee1206408 Mon Sep 17 00:00:00 2001 From: nightwing Date: Mon, 31 Mar 2014 20:02:13 +0400 Subject: [PATCH 013/158] update require.js --- demo/kitchen-sink/require.js | 203 ++++++++++++++++++----------------- tool/update_deps.js | 14 ++- 2 files changed, 118 insertions(+), 99 deletions(-) diff --git a/demo/kitchen-sink/require.js b/demo/kitchen-sink/require.js index 267b7690..203843c1 100644 --- a/demo/kitchen-sink/require.js +++ b/demo/kitchen-sink/require.js @@ -1,5 +1,5 @@ /** vim: et:ts=4:sw=4:sts=4 - * @license RequireJS 2.1.9+ Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. + * @license RequireJS 2.1.11+ Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/jrburke/requirejs for details */ @@ -12,7 +12,7 @@ var requirejs, require, define; (function (global) { var req, s, head, baseElement, dataMain, src, interactiveScript, currentlyAddingScript, mainScript, subPath, - version = '2.1.9+', + version = '2.1.11+', commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, jsSuffixRegExp = /\.js$/, @@ -108,7 +108,10 @@ var requirejs, require, define; if (source) { eachProp(source, function (value, prop) { if (force || !hasProp(target, prop)) { - if (deepStringMixin && typeof value !== 'string') { + if (deepStringMixin && typeof value === 'object' && value && + !isArray(value) && !isFunction(value) && + !(value instanceof RegExp)) { + if (!target[prop]) { target[prop] = {}; } @@ -138,7 +141,7 @@ var requirejs, require, define; throw err; } - //Allow getting a global that expressed in + //Allow getting a global that is expressed in //dot notation, like 'a.b.c'. function getGlobal(value) { if (!value) { @@ -177,7 +180,7 @@ var requirejs, require, define; if (typeof requirejs !== 'undefined') { if (isFunction(requirejs)) { - //Do not overwrite and existing requirejs instance. + //Do not overwrite an existing requirejs instance. return; } cfg = requirejs; @@ -201,6 +204,7 @@ var requirejs, require, define; waitSeconds: 7, baseUrl: './', paths: {}, + bundles: {}, pkgs: {}, shim: {}, config: {} @@ -214,6 +218,7 @@ var requirejs, require, define; defQueue = [], defined = {}, urlFetched = {}, + bundlesMap = {}, requireCounter = 1, unnormalizedCounter = 1; @@ -227,8 +232,8 @@ var requirejs, require, define; * @param {Array} ary the array of path segments. */ function trimDots(ary) { - var i, part; - for (i = 0; ary[i]; i += 1) { + var i, part, length = ary.length; + for (i = 0; i < length; i++) { part = ary[i]; if (part === '.') { ary.splice(i, 1); @@ -261,7 +266,7 @@ var requirejs, require, define; * @returns {String} normalized name */ function normalize(name, baseName, applyMap) { - var pkgName, pkgConfig, mapValue, nameParts, i, j, nameSegment, + var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex, foundMap, foundI, foundStarMap, starI, baseParts = baseName && baseName.split('/'), normalizedBaseParts = baseParts, @@ -274,29 +279,26 @@ var requirejs, require, define; //otherwise, assume it is a top-level require that will //be relative to baseUrl in the end. if (baseName) { - if (getOwn(config.pkgs, baseName)) { - //If the baseName is a package name, then just treat it as one - //name to concat the name with. - normalizedBaseParts = baseParts = [baseName]; - } else { - //Convert baseName to array, and lop off the last part, - //so that . matches that 'directory' and not name of the baseName's - //module. For instance, baseName of 'one/two/three', maps to - //'one/two/three.js', but we want the directory, 'one/two' for - //this normalization. - normalizedBaseParts = baseParts.slice(0, baseParts.length - 1); + //Convert baseName to array, and lop off the last part, + //so that . matches that 'directory' and not name of the baseName's + //module. For instance, baseName of 'one/two/three', maps to + //'one/two/three.js', but we want the directory, 'one/two' for + //this normalization. + normalizedBaseParts = baseParts.slice(0, baseParts.length - 1); + name = name.split('/'); + lastIndex = name.length - 1; + + // If wanting node ID compatibility, strip .js from end + // of IDs. Have to do this here, and not in nameToUrl + // because node allows either .js or non .js to map + // to same file. + if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) { + name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, ''); } - name = normalizedBaseParts.concat(name.split('/')); + name = normalizedBaseParts.concat(name); trimDots(name); - - //Some use of packages may use a . path to reference the - //'main' module name, so normalize for that. - pkgConfig = getOwn(config.pkgs, (pkgName = name[0])); name = name.join('/'); - if (pkgConfig && name === pkgName + '/' + pkgConfig.main) { - name = pkgName; - } } else if (name.indexOf('./') === 0) { // No baseName, so this is ID is resolved relative // to baseUrl, pull off the leading dot. @@ -308,7 +310,7 @@ var requirejs, require, define; if (applyMap && map && (baseParts || starMap)) { nameParts = name.split('/'); - for (i = nameParts.length; i > 0; i -= 1) { + outerLoop: for (i = nameParts.length; i > 0; i -= 1) { nameSegment = nameParts.slice(0, i).join('/'); if (baseParts) { @@ -325,16 +327,12 @@ var requirejs, require, define; //Match, update name to the new value. foundMap = mapValue; foundI = i; - break; + break outerLoop; } } } } - if (foundMap) { - break; - } - //Check for a star map match, but just hold on to it, //if there is a shorter segment match later in a matching //config, then favor over this star map. @@ -355,7 +353,11 @@ var requirejs, require, define; } } - return name; + // If the name points to a package's name, use + // the package main instead. + pkgMain = getOwn(config.pkgs, name); + + return pkgMain ? pkgMain : name; } function removeScript(name) { @@ -377,7 +379,13 @@ var requirejs, require, define; //retry pathConfig.shift(); context.require.undef(id); - context.require([id]); + + //Custom require that does not do map translation, since + //ID is "absolute", already mapped/resolved. + context.makeRequire(null, { + skipMap: true + })([id]); + return true; } } @@ -565,7 +573,7 @@ var requirejs, require, define; mod.usingExports = true; if (mod.map.isDefine) { if (mod.exports) { - return mod.exports; + return (defined[mod.map.id] = mod.exports); } else { return (mod.exports = defined[mod.map.id] = {}); } @@ -579,15 +587,9 @@ var requirejs, require, define; id: mod.map.id, uri: mod.map.url, config: function () { - var c, - pkg = getOwn(config.pkgs, mod.map.id); - // For packages, only support config targeted - // at the main module. - c = pkg ? getOwn(config.config, mod.map.id + '/' + pkg.main) : - getOwn(config.config, mod.map.id); - return c || {}; + return getOwn(config.config, mod.map.id) || {}; }, - exports: defined[mod.map.id] + exports: mod.exports || (mod.exports = {}) }); } } @@ -870,17 +872,14 @@ var requirejs, require, define; exports = context.execCb(id, factory, depExports, exports); } - if (this.map.isDefine) { - //If setting exports via 'module' is in play, - //favor that over return value and exports. After that, - //favor a non-undefined return value over exports use. + // Favor return value over exports. If node/cjs in play, + // then will not have a return value anyway. Favor + // module.exports assignment over exports object. + if (this.map.isDefine && exports === undefined) { cjsModule = this.module; - if (cjsModule && - cjsModule.exports !== undefined && - //Make sure it is not already the exports value - cjsModule.exports !== this.exports) { + if (cjsModule) { exports = cjsModule.exports; - } else if (exports === undefined && this.usingExports) { + } else if (this.usingExports) { //exports already set the defined value. exports = this.exports; } @@ -940,6 +939,7 @@ var requirejs, require, define; on(pluginMap, 'defined', bind(this, function (plugin) { var load, normalizedMap, normalizedMod, + bundleId = getOwn(bundlesMap, this.map.id), name = this.map.name, parentName = this.map.parentMap ? this.map.parentMap.name : null, localRequire = context.makeRequire(map.parentMap, { @@ -985,6 +985,14 @@ var requirejs, require, define; return; } + //If a paths config, then just load that file instead to + //resolve the plugin, as it is built into that paths layer. + if (bundleId) { + this.map.url = context.nameToUrl(bundleId); + this.load(); + return; + } + load = bind(this, function (value) { this.init([], function () { return value; }, null, { enabled: true @@ -1249,31 +1257,38 @@ var requirejs, require, define; } } - //Save off the paths and packages since they require special processing, + //Save off the paths since they require special processing, //they are additive. - var pkgs = config.pkgs, - shim = config.shim, + var shim = config.shim, objs = { paths: true, + bundles: true, config: true, map: true }; eachProp(cfg, function (value, prop) { if (objs[prop]) { - if (prop === 'map') { - if (!config.map) { - config.map = {}; - } - mixin(config[prop], value, true, true); - } else { - mixin(config[prop], value, true); + if (!config[prop]) { + config[prop] = {}; } + mixin(config[prop], value, true, true); } else { config[prop] = value; } }); + //Reverse map the bundles + if (cfg.bundles) { + eachProp(cfg.bundles, function (value, prop) { + each(value, function (v) { + if (v !== prop) { + bundlesMap[v] = prop; + } + }); + }); + } + //Merge shim if (cfg.shim) { eachProp(cfg.shim, function (value, id) { @@ -1294,29 +1309,25 @@ var requirejs, require, define; //Adjust packages if necessary. if (cfg.packages) { each(cfg.packages, function (pkgObj) { - var location; + var location, name; pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj; + + name = pkgObj.name; location = pkgObj.location; + if (location) { + config.paths[name] = pkgObj.location; + } - //Create a brand new object on pkgs, since currentPackages can - //be passed in again, and config.pkgs is the internal transformed - //state for all package configs. - pkgs[pkgObj.name] = { - name: pkgObj.name, - location: location || pkgObj.name, - //Remove leading dot in main, so main paths are normalized, - //and remove any trailing .js, since different package - //envs have different conventions: some use a module name, - //some use a file name. - main: (pkgObj.main || 'main') - .replace(currDirRegExp, '') - .replace(jsSuffixRegExp, '') - }; + //Save pointer to main module ID for pkg name. + //Remove leading dot in main, so main paths are normalized, + //and remove any trailing .js, since different package + //envs have different conventions: some use a module name, + //some use a file name. + config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main') + .replace(currDirRegExp, '') + .replace(jsSuffixRegExp, ''); }); - - //Done with modifications, assing packages back to context config - config.pkgs = pkgs; } //If there are any "waiting to execute" modules in the registry, @@ -1497,7 +1508,7 @@ var requirejs, require, define; /** * Called to enable a module if it is still in the registry * awaiting enablement. A second arg, parent, the parent module, - * is passed in for context, when this method is overriden by + * is passed in for context, when this method is overridden by * the optimizer. Not shown here to keep code compact. */ enable: function (depMap) { @@ -1571,8 +1582,19 @@ var requirejs, require, define; * internal API, not a public one. Use toUrl for the public API. */ nameToUrl: function (moduleName, ext, skipExt) { - var paths, pkgs, pkg, pkgPath, syms, i, parentModule, url, - parentPath; + var paths, syms, i, parentModule, url, + parentPath, bundleId, + pkgMain = getOwn(config.pkgs, moduleName); + + if (pkgMain) { + moduleName = pkgMain; + } + + bundleId = getOwn(bundlesMap, moduleName); + + if (bundleId) { + return context.nameToUrl(bundleId, ext, skipExt); + } //If a colon is in the URL, it indicates a protocol is used and it is just //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?) @@ -1586,7 +1608,6 @@ var requirejs, require, define; } else { //A module that needs to be converted to a path. paths = config.paths; - pkgs = config.pkgs; syms = moduleName.split('/'); //For each module name segment, see if there is a path @@ -1594,7 +1615,7 @@ var requirejs, require, define; //and work up from it. for (i = syms.length; i > 0; i -= 1) { parentModule = syms.slice(0, i).join('/'); - pkg = getOwn(pkgs, parentModule); + parentPath = getOwn(paths, parentModule); if (parentPath) { //If an array, it means there are a few choices, @@ -1604,16 +1625,6 @@ var requirejs, require, define; } syms.splice(0, i, parentPath); break; - } else if (pkg) { - //If module name is just the package name, then looking - //for the main module. - if (moduleName === pkg.name) { - pkgPath = pkg.location + '/' + pkg.main; - } else { - pkgPath = pkg.location; - } - syms.splice(0, i, pkgPath); - break; } } diff --git a/tool/update_deps.js b/tool/update_deps.js index 4ac9f4e6..296f9884 100644 --- a/tool/update_deps.js +++ b/tool/update_deps.js @@ -14,10 +14,11 @@ var deps = { url: "https://raw.github.com/stubbornella/csslint/master/release/csslint.js", needsFixup: true, browserify: { - npmModule: "csslint@latest", + npmModule: "git+https://github.com/stubbornella/csslint.git#master", path: "jshint/src/jshint.js", exports: "jshint" }, + fetch: browserify, }, requirejs: { path: "../../demo/kitchen-sink/require.js", @@ -242,5 +243,12 @@ function browserify(_, cb) { }) } -getDep(deps.html5) -getDep(deps.jshint) \ No newline at end of file +var args = process.argv.slice(2); +args = args.filter(function(x) {return x[0] != "-" }); +if (!args.length) + args = Object.keys(deps); + +args.forEach(function(key) { + getDep(deps[key]) +}); + From dcd96294f79cb6028879ecf35d0640c01d2fea87 Mon Sep 17 00:00:00 2001 From: nightwing Date: Mon, 31 Mar 2014 20:23:45 +0400 Subject: [PATCH 014/158] update csslint --- lib/ace/mode/css/csslint.js | 692 +++++++++++++++++++----------------- tool/update_deps.js | 8 +- 2 files changed, 373 insertions(+), 327 deletions(-) diff --git a/lib/ace/mode/css/csslint.js b/lib/ace/mode/css/csslint.js index 078c71b1..a3a7a9bd 100644 --- a/lib/ace/mode/css/csslint.js +++ b/lib/ace/mode/css/csslint.js @@ -1,7 +1,7 @@ define(function(require, exports, module) { /*! CSSLint -Copyright (c) 2013 Nicole Sullivan and Nicholas C. Zakas. All rights reserved. +Copyright (c) 2014 Nicole Sullivan and Nicholas C. Zakas. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* Build: v0.10.0 15-August-2013 01:07:22 */ +/* Build: v0.10.0 31-March-2014 08:16:48 */ /*! Parser-Lib Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved. @@ -46,7 +46,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* Version v0.2.3, Build time: 19-June-2013 11:16:15 */ +/* Version v0.2.4, Build time: 7-January-2014 07:32:49 */ var parserlib = {}; (function(){ @@ -65,7 +65,7 @@ function EventTarget(){ * @property _listeners * @private */ - this._listeners = {}; + this._listeners = {}; } EventTarget.prototype = { @@ -87,14 +87,14 @@ EventTarget.prototype = { this._listeners[type].push(listener); }, - + /** * Fires an event based on the passed-in object. * @param {Object|String} event An object with at least a 'type' attribute * or a string indicating the event name. * @return {void} * @method fire - */ + */ fire: function(event){ if (typeof event == "string"){ event = { type: event }; @@ -102,19 +102,19 @@ EventTarget.prototype = { if (typeof event.target != "undefined"){ event.target = this; } - + if (typeof event.type == "undefined"){ throw new Error("Event object missing 'type' property."); } - + if (this._listeners[event.type]){ - + //create a copy of the array and use that so listeners can't chane var listeners = this._listeners[event.type].concat(); for (var i=0, len=listeners.length; i < len; i++){ listeners[i].call(this, event); } - } + } }, /** @@ -133,9 +133,9 @@ EventTarget.prototype = { break; } } - - - } + + + } } }; /** @@ -499,7 +499,7 @@ SyntaxUnit.prototype = { //restore constructor constructor: SyntaxUnit, - + /** * Returns the text representation of the unit. * @return {String} The text representation of the unit. @@ -508,7 +508,7 @@ SyntaxUnit.prototype = { valueOf: function(){ return this.toString(); }, - + /** * Returns the text representation of the unit. * @return {String} The text representation of the unit. @@ -526,7 +526,7 @@ SyntaxUnit.prototype = { * @class TokenStreamBase * @namespace parserlib.util * @constructor - * @param {String|StringReader} input The text to tokenize or a reader from + * @param {String|StringReader} input The text to tokenize or a reader from * which to read the input. */ function TokenStreamBase(input, tokenData){ @@ -538,15 +538,15 @@ function TokenStreamBase(input, tokenData){ * @private */ this._reader = input ? new StringReader(input.toString()) : null; - + /** * Token object for the last consumed token. * @type Token * @property _token * @private */ - this._token = null; - + this._token = null; + /** * The array of token information. * @type Array @@ -554,7 +554,7 @@ function TokenStreamBase(input, tokenData){ * @private */ this._tokenData = tokenData; - + /** * Lookahead token buffer. * @type Array @@ -562,7 +562,7 @@ function TokenStreamBase(input, tokenData){ * @private */ this._lt = []; - + /** * Lookahead token buffer index. * @type int @@ -570,7 +570,7 @@ function TokenStreamBase(input, tokenData){ * @private */ this._ltIndex = 0; - + this._ltIndexCache = []; } @@ -590,7 +590,7 @@ TokenStreamBase.createTokenData = function(tokens){ tokenData = tokens.concat([]), i = 0, len = tokenData.length+1; - + tokenData.UNKNOWN = -1; tokenData.unshift({name:"EOF"}); @@ -601,27 +601,27 @@ TokenStreamBase.createTokenData = function(tokens){ typeMap[tokenData[i].text] = i; } } - + tokenData.name = function(tt){ return nameMap[tt]; }; - + tokenData.type = function(c){ return typeMap[c]; }; - + return tokenData; }; TokenStreamBase.prototype = { //restore constructor - constructor: TokenStreamBase, - + constructor: TokenStreamBase, + //------------------------------------------------------------------------- // Matching methods //------------------------------------------------------------------------- - + /** * Determines if the next token matches the given token type. * If so, that token is consumed; if not, the token is placed @@ -637,27 +637,27 @@ TokenStreamBase.prototype = { * @method match */ match: function(tokenTypes, channel){ - + //always convert to an array, makes things easier if (!(tokenTypes instanceof Array)){ tokenTypes = [tokenTypes]; } - + var tt = this.get(channel), i = 0, len = tokenTypes.length; - + while(i < len){ if (tt == tokenTypes[i++]){ return true; } } - + //no match found, put the token back this.unget(); return false; - }, - + }, + /** * Determines if the next token matches the given token type. * If so, that token is consumed; if not, an error is thrown. @@ -668,7 +668,7 @@ TokenStreamBase.prototype = { * provided, reads from the default (unnamed) channel. * @return {void} * @method mustMatch - */ + */ mustMatch: function(tokenTypes, channel){ var token; @@ -678,17 +678,17 @@ TokenStreamBase.prototype = { tokenTypes = [tokenTypes]; } - if (!this.match.apply(this, arguments)){ + if (!this.match.apply(this, arguments)){ token = this.LT(1); - throw new SyntaxError("Expected " + this._tokenData[tokenTypes[0]].name + + throw new SyntaxError("Expected " + this._tokenData[tokenTypes[0]].name + " at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol); } }, - + //------------------------------------------------------------------------- // Consuming methods //------------------------------------------------------------------------- - + /** * Keeps reading from the token stream until either one of the specified * token types is found or until the end of the input is reached. @@ -701,21 +701,21 @@ TokenStreamBase.prototype = { * @method advance */ advance: function(tokenTypes, channel){ - + while(this.LA(0) !== 0 && !this.match(tokenTypes, channel)){ this.get(); } - return this.LA(0); + return this.LA(0); }, - + /** - * Consumes the next token from the token stream. + * Consumes the next token from the token stream. * @return {int} The token type of the token that was just consumed. * @method get - */ + */ get: function(channel){ - + var tokenInfo = this._tokenData, reader = this._reader, value, @@ -724,14 +724,14 @@ TokenStreamBase.prototype = { found = false, token, info; - + //check the lookahead buffer first - if (this._lt.length && this._ltIndex >= 0 && this._ltIndex < this._lt.length){ - + if (this._lt.length && this._ltIndex >= 0 && this._ltIndex < this._lt.length){ + i++; this._token = this._lt[this._ltIndex++]; info = tokenInfo[this._token.type]; - + //obey channels logic while((info.channel !== undefined && channel !== info.channel) && this._ltIndex < this._lt.length){ @@ -739,7 +739,7 @@ TokenStreamBase.prototype = { info = tokenInfo[this._token.type]; i++; } - + //here be dragons if ((info.channel === undefined || channel === info.channel) && this._ltIndex <= this._lt.length){ @@ -747,45 +747,45 @@ TokenStreamBase.prototype = { return this._token.type; } } - + //call token retriever method token = this._getToken(); //if it should be hidden, don't save a token if (token.type > -1 && !tokenInfo[token.type].hide){ - + //apply token channel token.channel = tokenInfo[token.type].channel; - + //save for later this._token = token; this._lt.push(token); //save space that will be moved (must be done before array is truncated) - this._ltIndexCache.push(this._lt.length - this._ltIndex + i); - + this._ltIndexCache.push(this._lt.length - this._ltIndex + i); + //keep the buffer under 5 items if (this._lt.length > 5){ - this._lt.shift(); + this._lt.shift(); } - + //also keep the shift buffer under 5 items if (this._ltIndexCache.length > 5){ this._ltIndexCache.shift(); } - + //update lookahead index this._ltIndex = this._lt.length; } - + /* * Skip to the next token if: * 1. The token type is marked as hidden. * 2. The token type has a channel specified and it isn't the current channel. */ info = tokenInfo[token.type]; - if (info && - (info.hide || + if (info && + (info.hide || (info.channel !== undefined && channel !== info.channel))){ return this.get(channel); } else { @@ -793,7 +793,7 @@ TokenStreamBase.prototype = { return token.type; } }, - + /** * Looks ahead a certain number of tokens and returns the token type at * that position. This will throw an error if you lookahead past the @@ -812,34 +812,34 @@ TokenStreamBase.prototype = { if (index > 5){ throw new Error("Too much lookahead."); } - + //get all those tokens while(total){ - tt = this.get(); - total--; + tt = this.get(); + total--; } - + //unget all those tokens while(total < index){ this.unget(); total++; } } else if (index < 0){ - + if(this._lt[this._ltIndex+index]){ tt = this._lt[this._ltIndex+index].type; } else { throw new Error("Too much lookbehind."); } - + } else { tt = this._token.type; } - + return tt; - + }, - + /** * Looks ahead a certain number of tokens and returns the token at * that position. This will throw an error if you lookahead past the @@ -849,18 +849,18 @@ TokenStreamBase.prototype = { * current token, 1 for the next, -1 for the previous, etc. * @return {Object} The token of the token in the given position. * @method LA - */ + */ LT: function(index){ - + //lookahead first to prime the token buffer this.LA(index); - + //now find the token, subtract one because _ltIndex is already at the next index - return this._lt[this._ltIndex+index-1]; + return this._lt[this._ltIndex+index-1]; }, - + /** - * Returns the token type for the next token in the stream without + * Returns the token type for the next token in the stream without * consuming it. * @return {int} The token type of the next token in the stream. * @method peek @@ -868,7 +868,7 @@ TokenStreamBase.prototype = { peek: function(){ return this.LA(1); }, - + /** * Returns the actual token object for the last consumed token. * @return {Token} The token object for the last consumed token. @@ -877,7 +877,7 @@ TokenStreamBase.prototype = { token: function(){ return this._token; }, - + /** * Returns the name of the token for the given token type. * @param {int} tokenType The type of token to get the name of. @@ -892,22 +892,22 @@ TokenStreamBase.prototype = { return this._tokenData[tokenType].name; } }, - + /** * Returns the token type value for the given token name. * @param {String} tokenName The name of the token whose value should be returned. * @return {int} The token type value for the given token name or -1 * for an unknown token. * @method tokenName - */ + */ tokenType: function(tokenName){ return this._tokenData[tokenName] || -1; }, - + /** * Returns the last consumed token to the token stream. * @method unget - */ + */ unget: function(){ //if (this._ltIndex > -1){ if (this._ltIndexCache.length){ @@ -956,7 +956,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* Version v0.2.3, Build time: 19-June-2013 11:16:15 */ +/* Version v0.2.4, Build time: 7-January-2014 07:32:49 */ (function(){ var EventTarget = parserlib.util.EventTarget, TokenStreamBase = parserlib.util.TokenStreamBase, @@ -991,6 +991,7 @@ var Colors = { darkcyan :"#008b8b", darkgoldenrod :"#b8860b", darkgray :"#a9a9a9", + darkgrey :"#a9a9a9", darkgreen :"#006400", darkkhaki :"#bdb76b", darkmagenta :"#8b008b", @@ -1002,11 +1003,13 @@ var Colors = { darkseagreen :"#8fbc8f", darkslateblue :"#483d8b", darkslategray :"#2f4f4f", + darkslategrey :"#2f4f4f", darkturquoise :"#00ced1", darkviolet :"#9400d3", deeppink :"#ff1493", deepskyblue :"#00bfff", dimgray :"#696969", + dimgrey :"#696969", dodgerblue :"#1e90ff", firebrick :"#b22222", floralwhite :"#fffaf0", @@ -1017,6 +1020,7 @@ var Colors = { gold :"#ffd700", goldenrod :"#daa520", gray :"#808080", + grey :"#808080", green :"#008000", greenyellow :"#adff2f", honeydew :"#f0fff0", @@ -1034,12 +1038,14 @@ var Colors = { lightcyan :"#e0ffff", lightgoldenrodyellow :"#fafad2", lightgray :"#d3d3d3", + lightgrey :"#d3d3d3", lightgreen :"#90ee90", lightpink :"#ffb6c1", lightsalmon :"#ffa07a", lightseagreen :"#20b2aa", lightskyblue :"#87cefa", lightslategray :"#778899", + lightslategrey :"#778899", lightsteelblue :"#b0c4de", lightyellow :"#ffffe0", lime :"#00ff00", @@ -1092,6 +1098,7 @@ var Colors = { skyblue :"#87ceeb", slateblue :"#6a5acd", slategray :"#708090", + slategrey :"#708090", snow :"#fffafa", springgreen :"#00ff7f", steelblue :"#4682b4", @@ -1117,6 +1124,7 @@ var Colors = { buttontext :"Text on push buttons.", captiontext :"Text in caption, size box, and scrollbar arrow box.", graytext :"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.", + greytext :"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.", highlight :"Item(s) selected in a control.", highlighttext :"Text of item(s) selected in a control.", inactiveborder :"Inactive window border.", @@ -1143,12 +1151,12 @@ var Colors = { * @class Combinator * @extends parserlib.util.SyntaxUnit * @constructor - * @param {String} text The text representation of the unit. + * @param {String} text The text representation of the unit. * @param {int} line The line of text on which the unit resides. * @param {int} col The column of text on which the unit resides. */ function Combinator(text, line, col){ - + SyntaxUnit.call(this, text, line, col, Parser.COMBINATOR_TYPE); /** @@ -1157,7 +1165,7 @@ function Combinator(text, line, col){ * @property type */ this.type = "unknown"; - + //pretty simple if (/^\s+$/.test(text)){ this.type = "descendant"; @@ -1186,7 +1194,7 @@ Combinator.prototype.constructor = Combinator; * @param {SyntaxUnit} value The value of the feature or null if none. */ function MediaFeature(name, value){ - + SyntaxUnit.call(this, "(" + name + (value !== null ? ":" + value : "") + ")", name.startLine, name.startCol, Parser.MEDIA_FEATURE_TYPE); /** @@ -1222,8 +1230,8 @@ MediaFeature.prototype.constructor = MediaFeature; * @param {int} col The column of text on which the unit resides. */ function MediaQuery(modifier, mediaType, features, line, col){ - - SyntaxUnit.call(this, (modifier ? modifier + " ": "") + (mediaType ? mediaType : "") + (mediaType && features.length > 0 ? " and " : "") + features.join(" and "), line, col, Parser.MEDIA_QUERY_TYPE); + + SyntaxUnit.call(this, (modifier ? modifier + " ": "") + (mediaType ? mediaType : "") + (mediaType && features.length > 0 ? " and " : "") + features.join(" and "), line, col, Parser.MEDIA_QUERY_TYPE); /** * The media modifier ("not" or "only") @@ -1237,8 +1245,8 @@ function MediaQuery(modifier, mediaType, features, line, col){ * @type String * @property mediaType */ - this.mediaType = mediaType; - + this.mediaType = mediaType; + /** * The parts that make up the selector. * @type Array @@ -3533,6 +3541,12 @@ nth var Properties = { //A + "align-items" : "flex-start | flex-end | center | baseline | stretch", + "align-content" : "flex-start | flex-end | center | space-between | space-around | stretch", + "align-self" : "auto | flex-start | flex-end | center | baseline | stretch", + "-webkit-align-items" : "flex-start | flex-end | center | baseline | stretch", + "-webkit-align-content" : "flex-start | flex-end | center | space-between | space-around | stretch", + "-webkit-align-self" : "auto | flex-start | flex-end | center | baseline | stretch", "alignment-adjust" : "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | | ", "alignment-baseline" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical", "animation" : 1, @@ -3543,7 +3557,7 @@ var Properties = { "animation-name" : { multi: "none | ", comma: true }, "animation-play-state" : { multi: "running | paused", comma: true }, "animation-timing-function" : 1, - + //vendor prefixed "-moz-animation-delay" : { multi: "

If $i1 and $i2 are both nodes, they are compared as described\n below:

If the two nodes are of different kinds, the result is false.

If the two nodes are both document nodes then they are deep-equal if and only if\n the sequence $i1/(*|text()) is deep-equal to the sequence\n $i2/(*|text()).

If the two nodes are both element nodes then they are deep-equal if and only if\n all of the following conditions are satisfied:

The two nodes have the same name, that is (node-name($i1) eq\n node-name($i2)).

Either both nodes are both annotated as having simple content or both nodes are\n annotated as having complex content. For this purpose \"simple content\" means either a simple\n type or a complex type with simple content; \"complex content\" means a complex type whose variety\n is mixed, element-only, or empty.

It is a consequence of this rule that validating a document\n D against a schema will usually (but not necessarily) result in a document that is not deep-equal\n to D. The exception is when the schema allows all elements to have mixed content.

The two nodes have the same number of attributes, and for every attribute\n $a1 in $i1/@* there exists an attribute\n $a2 in $i2/@* such that $a1 and\n $a2 are deep-equal.

One of the following conditions holds:

Both element nodes are annotated as having simple content\n (as defined in 3(b) above), and\n the typed value of $i1 is deep-equal to the typed value\n of $i2.

Both element nodes have a type annotation that is a complex type with\n variety element-only, and the sequence $i1/* is\n deep-equal to the sequence $i2/*.

Both element nodes have a type annotation that is a complex type with\n variety mixed, and the sequence $i1/(*|text()) is\n deep-equal to the sequence $i2/(*|text()).

Both element nodes have a type annotation that is a complex type with\n variety empty.

If the two nodes are both attribute nodes then they are deep-equal if and only if\n both the following conditions are satisfied:

The two nodes have the same name, that is (node-name($i1) eq\n node-name($i2)).

The typed value of $i1 is deep-equal to the typed value of\n $i2.

If the two nodes are both processing instruction nodes or namespace bindings, then they are deep-equal if and\n only if both the following conditions are satisfied:

The two nodes have the same name, that is (node-name($i1) eq\n node-name($i2)).

The string value of $i1 is equal to the string value of\n $i2.

If the two nodes are both namespace nodes, then they are deep-equal if and only\n if both the following conditions are satisfied:

The two nodes either have the same name or are both nameless, that is\n fn:deep-equal(node-name($i1), node-name($i2)).

The string value of $i1 is equal to the string value of\n $i2 when compared using the Unicode codepoint collation.

If the two nodes are both text nodes or comment nodes, then they are deep-equal if\n and only if their string-values are equal.

A type error is raised \n if either input sequence contains a function item.\n \n

\n", "summary" : "

This function assesses whether two sequences are deep-equal to each other.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "parameter1", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "parameter2", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "deep-equal", "qname" : "fn:deep-equal", "signature" : "($parameter1 as item()*, $parameter2 as item()*, $collation as xs:string) as xs:boolean external", "description" : "

This function assesses whether two sequences are deep-equal to each other. To\n be deep-equal, they must contain items that are pairwise deep-equal; and for two items\n to be deep-equal, they must either be atomic values that compare equal, or nodes of the\n same kind, with the same name, whose children are deep-equal.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and implicit timezone.\n \t

The three-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri, and implicit timezone.\n \t

The $collation argument identifies a collation which is used at all levels\n of recursion when strings are compared (but not when names are compared), according to\n the rules in .

If the two sequences are both empty, the function returns true.

If the two sequences are of different lengths, the function returns\n false.

If the two sequences are of the same length, the function returns true if\n and only if every item in the sequence $parameter1 is deep-equal to the\n item at the same position in the sequence $parameter2. The rules for\n deciding whether two items are deep-equal follow.

Call the two items $i1 and $i2 respectively.

If $i1 and $i2 are both atomic values, they are deep-equal if\n and only if ($i1 eq $i2) is true, or if both values are\n NaN. If the eq operator is not defined for $i1\n and $i2, the function returns false.

If one of the pair $i1 or $i2 is an atomic value and the\n other is not,\n \n the function returns false.

If $i1 and $i2 are both nodes, they are compared as described\n below:

If the two nodes are of different kinds, the result is false.

If the two nodes are both document nodes then they are deep-equal if and only if\n the sequence $i1/(*|text()) is deep-equal to the sequence\n $i2/(*|text()).

If the two nodes are both element nodes then they are deep-equal if and only if\n all of the following conditions are satisfied:

The two nodes have the same name, that is (node-name($i1) eq\n node-name($i2)).

Either both nodes are both annotated as having simple content or both nodes are\n annotated as having complex content. For this purpose \"simple content\" means either a simple\n type or a complex type with simple content; \"complex content\" means a complex type whose variety\n is mixed, element-only, or empty.

It is a consequence of this rule that validating a document\n D against a schema will usually (but not necessarily) result in a document that is not deep-equal\n to D. The exception is when the schema allows all elements to have mixed content.

The two nodes have the same number of attributes, and for every attribute\n $a1 in $i1/@* there exists an attribute\n $a2 in $i2/@* such that $a1 and\n $a2 are deep-equal.

One of the following conditions holds:

Both element nodes are annotated as having simple content\n (as defined in 3(b) above), and\n the typed value of $i1 is deep-equal to the typed value\n of $i2.

Both element nodes have a type annotation that is a complex type with\n variety element-only, and the sequence $i1/* is\n deep-equal to the sequence $i2/*.

Both element nodes have a type annotation that is a complex type with\n variety mixed, and the sequence $i1/(*|text()) is\n deep-equal to the sequence $i2/(*|text()).

Both element nodes have a type annotation that is a complex type with\n variety empty.

If the two nodes are both attribute nodes then they are deep-equal if and only if\n both the following conditions are satisfied:

The two nodes have the same name, that is (node-name($i1) eq\n node-name($i2)).

The typed value of $i1 is deep-equal to the typed value of\n $i2.

If the two nodes are both processing instruction nodes or namespace bindings, then they are deep-equal if and\n only if both the following conditions are satisfied:

The two nodes have the same name, that is (node-name($i1) eq\n node-name($i2)).

The string value of $i1 is equal to the string value of\n $i2.

If the two nodes are both namespace nodes, then they are deep-equal if and only\n if both the following conditions are satisfied:

The two nodes either have the same name or are both nameless, that is\n fn:deep-equal(node-name($i1), node-name($i2)).

The string value of $i1 is equal to the string value of\n $i2 when compared using the Unicode codepoint collation.

If the two nodes are both text nodes or comment nodes, then they are deep-equal if\n and only if their string-values are equal.

A type error is raised \n if either input sequence contains a function item.\n \n

\n", "summary" : "

This function assesses whether two sequences are deep-equal to each other.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "parameter1", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "parameter2", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "collation", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "default-collation", "qname" : "fn:default-collation", "signature" : "() as xs:string external", "description" : "

Returns the value of the default collation property from the static context.\n

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations.\n \t

Returns the value of the default collation property from the static context. Components\n of the static context are discussed in .

The default collation property can never be absent. If it is not explicitly defined, a\n system defined default can be invoked. If this is not provided, the Unicode codepoint\n collation (http://www.w3.org/2005/xpath-functions/collation/codepoint) is\n used.

\n", "summary" : "

Returns the value of the default collation property from the static context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "distinct-values", "qname" : "fn:distinct-values", "signature" : "($arg as xs:anyAtomicType*) as xs:anyAtomicType* external", "description" : "

Returns the values that appear in a sequence, with duplicates eliminated.

The one-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and implicit timezone.\n \t

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri, and implicit timezone.\n \t

The function returns the sequence that results from removing from $arg all\n but one of a set of values that are equal to one another. Values are compared using the\n eq operator, subject to the caveats defined below.

Values of type xs:untypedAtomic are compared as if they were of type\n xs:string.

Values that cannot be compared, because the eq operator is not defined for\n their types, are considered to be distinct.

The collation used by this function is determined according to the rules in . This collation is used when string comparison is\n required.

For xs:float and xs:double values, positive zero is equal to\n negative zero and, although NaN does not equal itself, if $arg\n contains multiple NaN values a single NaN is returned.

If xs:dateTime, xs:date or xs:time values do not\n have a timezone, they are considered to have the implicit timezone provided by the\n dynamic context for the purpose of comparison. Note that xs:dateTime,\n xs:date or xs:time values can compare equal even if their\n timezones are different.

The order in which the sequence of values is returned is .

Which value of a set of values that compare equal is returned is .

The static type of the result is a sequence of prime types as defined\n in [Formal Semantics].

\n

If the input sequence contains values of different numeric types that differ from\n each other by small amounts, then the eq operator is not transitive, because of\n rounding effects occurring during type promotion. In the situation where the input\n contains three values A, B, and C such that\n A eq B, B eq C, but A ne C, then the number\n of items in the result of the function (as well as the choice of which items are\n returned) is , subject only to the\n constraints that (a) no two items in the result sequence compare equal to each other,\n and (b) every input item that does not appear in the result sequence compares equal\n to some item that does appear in the result sequence.

\n

For example, this arises when computing:

\n distinct-values(\n (xs:float('1.0'),\n xs:decimal('1.0000000000100000000001',\n xs:double( '1.00000000001'))\n

because the values of type xs:float and xs:double both\n compare equal to the value of type xs:decimal but not equal to each\n other.

\n

If $arg is the empty sequence, the function returns the empty sequence.

\n", "summary" : "

Returns the values that appear in a sequence, with duplicates eliminated.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "distinct-values", "qname" : "fn:distinct-values", "signature" : "($arg as xs:anyAtomicType*, $collation as xs:string) as xs:anyAtomicType* external", "description" : "

Returns the values that appear in a sequence, with duplicates eliminated.

The one-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and implicit timezone.\n \t

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri, and implicit timezone.\n \t

The function returns the sequence that results from removing from $arg all\n but one of a set of values that are equal to one another. Values are compared using the\n eq operator, subject to the caveats defined below.

Values of type xs:untypedAtomic are compared as if they were of type\n xs:string.

Values that cannot be compared, because the eq operator is not defined for\n their types, are considered to be distinct.

The collation used by this function is determined according to the rules in . This collation is used when string comparison is\n required.

For xs:float and xs:double values, positive zero is equal to\n negative zero and, although NaN does not equal itself, if $arg\n contains multiple NaN values a single NaN is returned.

If xs:dateTime, xs:date or xs:time values do not\n have a timezone, they are considered to have the implicit timezone provided by the\n dynamic context for the purpose of comparison. Note that xs:dateTime,\n xs:date or xs:time values can compare equal even if their\n timezones are different.

The order in which the sequence of values is returned is .

Which value of a set of values that compare equal is returned is .

The static type of the result is a sequence of prime types as defined\n in [Formal Semantics].

\n

If the input sequence contains values of different numeric types that differ from\n each other by small amounts, then the eq operator is not transitive, because of\n rounding effects occurring during type promotion. In the situation where the input\n contains three values A, B, and C such that\n A eq B, B eq C, but A ne C, then the number\n of items in the result of the function (as well as the choice of which items are\n returned) is , subject only to the\n constraints that (a) no two items in the result sequence compare equal to each other,\n and (b) every input item that does not appear in the result sequence compares equal\n to some item that does appear in the result sequence.

\n

For example, this arises when computing:

\n distinct-values(\n (xs:float('1.0'),\n xs:decimal('1.0000000000100000000001',\n xs:double( '1.00000000001'))\n

because the values of type xs:float and xs:double both\n compare equal to the value of type xs:decimal but not equal to each\n other.

\n

If $arg is the empty sequence, the function returns the empty sequence.

\n", "summary" : "

Returns the values that appear in a sequence, with duplicates eliminated.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "" }, { "name" : "collation", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "doc-available", "qname" : "fn:doc-available", "signature" : "($uri as xs:string?) as xs:boolean external", "description" : "

The function returns true if and only if the function\n call fn:doc($uri) would return a document node.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tavailable documents, and static base uri.\n \t

If $uri is an empty sequence, this function returns\n false.

If a call on fn:doc($uri) would return a document\n node, this function returns true.

A dynamic error is raised if\n $uri is not a valid URI according to the rules applied by the\n implementation of fn:doc.

Otherwise, this function returns false.

If this function returns true, then calling fn:doc($uri)\n within the same must return a document node. However,\n if nondeterministic processing has been selected for the fn:doc function,\n this guarantee is lost.

\n", "summary" : "

The function returns true if and only if the function\n call fn:doc($uri) would return a document node.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "doc", "qname" : "fn:doc", "signature" : "($uri as xs:string?) as document()? external", "description" : "

Retrieves a document using a URI supplied as an\n xs:string, and returns the corresponding document node.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tavailable documents, and static base uri.\n \t

If $uri is the empty sequence, the result is an empty sequence.

If $uri is a relative URI reference, it is resolved\n relative to the value of the Static Base URI property from the static context. The resulting\n absolute URI is promoted to an xs:string.

If the Available documents described in provides a mapping from this string to a document\n node, the function returns that document node.

The URI may include a fragment identifier.

By default, this function is deterministic. Two calls on this function\n return the same document node if the same URI Reference (after resolution to an absolute\n URI Reference) is supplied to both calls. Thus, the following expression (if it does not\n raise an error) will always be true:

doc(\"foo.xml\") is doc(\"foo.xml\")

However, for performance reasons, implementations may provide a user option to evaluate\n the function without a guarantee of determinism. The manner in which any such option is\n provided is implementation-defined. If the user has not selected such an option, a call\n of the function must either return a deterministic result or must raise a dynamic error\n .

For detailed type semantics, see [Formal Semantics].

If $uri is read from a source document, it is generally appropriate to\n resolve it relative to the base URI property of the relevant node in the source\n document. This can be achieved by calling the fn:resolve-uri function,\n and passing the resulting absolute URI as an argument to the fn:doc\n function.

If two calls to this function supply different absolute URI References as arguments, the\n same document node may be returned if the implementation can determine that the two\n arguments refer to the same resource.

By defining the semantics of this function in terms of a string-to-document-node\n mapping in the dynamic context, the specification is acknowledging that the results of\n this function are outside the purview of the language specification itself, and depend\n entirely on the run-time environment in which the expression is evaluated. This run-time\n environment includes not only an unpredictable collection of resources (\"the web\"), but\n configurable machinery for locating resources and turning their contents into document\n nodes within the XPath data model. Both the set of resources that are reachable, and the\n mechanisms by which those resources are parsed and validated, are .

One possible processing model for this function is as follows. The resource identified\n by the URI Reference is retrieved. If the resource cannot be retrieved, a dynamic error is\n raised . The data resulting from the retrieval action\n is then parsed as an XML document and a tree is constructed in accordance with the\n . If the top-level media type is known and is\n \"text\", the content is parsed in the same way as if the media type were text/xml;\n otherwise, it is parsed in the same way as if the media type were application/xml. If\n the contents cannot be parsed successfully, a dynamic error is raised . Otherwise, the result of the function is the document node at the root\n of the resulting tree. This tree is then optionally validated against a schema.

Various aspects of this processing are .\n Implementations may provide external configuration options that allow any aspect of the\n processing to be controlled by the user. In particular:

The set of URI schemes that the implementation recognizes is\n implementation-defined. Implementations may allow the mapping of URIs to resources\n to be configured by the user, using mechanisms such as catalogs or user-written\n URI handlers.

The handling of non-XML media types is implementation-defined. Implementations may\n allow instances of the data model to be constructed from non-XML resources, under\n user control.

It is whether DTD validation and/or schema\n validation is applied to the source document.

Implementations may provide user-defined error handling options that allow\n processing to continue following an error in retrieving a resource, or in parsing\n and validating its content. When errors have been handled in this way, the\n function may return either an empty sequence, or a fallback document provided by\n the error handler.

Implementations may provide user options that relax the requirement for the\n function to return deterministic results.

A dynamic error may be raised if $uri is not a valid URI.

A dynamic error is raised if the\n available documents provides no mapping for the absolutized URI.

A dynamic error is raised if the resource cannot be\n retrieved or cannot be parsed successfully as XML.

A dynamic error is raised if the implementation is not able\n to guarantee that the result of the function will be deterministic, and the user has not\n indicated that an unstable result is acceptable.

\n", "summary" : "

Retrieves a document using a URI supplied as an\n xs:string , and returns the corresponding document node.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "document()?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "document-uri", "qname" : "fn:document-uri", "signature" : "() as xs:anyURI? external", "description" : "

Returns the URI of a resource where a document can be found, if available.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the argument is omitted, it defaults to the context item\n (.). The behavior of the function if the argument is omitted is exactly\n the same as if the context item had been passed as the argument.

If $arg is the empty sequence, the function returns the empty sequence.

If $arg is not a document node, the function returns the empty\n sequence.

Otherwise, the function returns the value of the document-uri accessor\n applied to $arg, as defined in (See\n ).

The following errors may be raised when $arg is omitted:

\n", "summary" : "

Returns the URI of a resource where a document can be found, if available.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:anyURI?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "document-uri", "qname" : "fn:document-uri", "signature" : "($arg as node()?) as xs:anyURI? external", "description" : "

Returns the URI of a resource where a document can be found, if available.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the argument is omitted, it defaults to the context item\n (.). The behavior of the function if the argument is omitted is exactly\n the same as if the context item had been passed as the argument.

If $arg is the empty sequence, the function returns the empty sequence.

If $arg is not a document node, the function returns the empty\n sequence.

Otherwise, the function returns the value of the document-uri accessor\n applied to $arg, as defined in (See\n ).

The following errors may be raised when $arg is omitted:

\n", "summary" : "

Returns the URI of a resource where a document can be found, if available.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "node()", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:anyURI?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "element-with-id", "qname" : "fn:element-with-id", "signature" : "($arg as xs:string*) as element(*)* external", "description" : "

Returns the sequence of element nodes that have an\n ID value matching the value of one or more of the IDREF\n values supplied in $arg.

The one-argument form of this function is deterministic, context-dependent, and focus-dependent.

The two-argument form of this function is deterministic, context-independent, and focus-independent.

\n

The effect of this function is identical to fn:id in respect\n of elements that have an attribute with the is-id property. However,\n it behaves differently in respect of element nodes with the is-id\n property. Whereas the fn:id, for legacy reasons, returns the element\n that has the is-id property, this parent returns the element\n identified by the ID, which is the parent of the element having the\n is-id property.

\n

The function returns a sequence, in document order with duplicates eliminated,\n containing every element node E that satisfies all the following\n conditions:

\n

\n E is in the target document. The target document is the document\n containing $node, or the document containing the context item\n (.) if the second argument is omitted. The behavior of the\n function if $node is omitted is exactly the same as if the context\n item had been passed as $node.

E has an ID value equal to one of the candidate\n IDREF values, where:

An element has an ID value equal to V if\n either or both of the following conditions are true:

The element has an child element node whose is-id\n property (See .) is true and\n whose typed value is equal to V under the rules of the\n eq operator using the Unicode code point collation\n (http://www.w3.org/2005/xpath-functions/collation/codepoint).

The element has an attribute node whose is-id property\n (See .) is true and whose\n typed value is equal to V under the rules of the\n eq operator using the Unicode code point collation\n (http://www.w3.org/2005/xpath-functions/collation/codepoint).

Each xs:string in $arg is parsed as if it were\n of type IDREFS, that is, each xs:string in\n $arg is treated as a whitespace-separated sequence of\n tokens, each acting as an IDREF. These tokens are then\n included in the list of candidate IDREFs. If any of the\n tokens is not a lexically valid IDREF (that is, if it is not\n lexically an xs:NCName), it is ignored. Formally, the\n candidate IDREF values are the strings in the sequence given\n by the expression:

for $s in $arg return\n fn:tokenize(fn:normalize-space($s), ' ')[. castable as xs:IDREF]

If several elements have the same ID value, then E\n is the one that is first in document order.

\n
\n

A dynamic error is raised if\n $node, or the context item if the second argument is omitted, is a\n node in a tree whose root is not a document node.

\n

The following errors may be raised when $node is omitted:

\n
  • If the context\n item is absent, dynamic error\n

  • If the context item is not a\n node, type error .

\n
\n", "summary" : "

Returns the sequence of element nodes that have an\n ID value matching the value of one or more of the IDREF \n values supplied in $arg .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "element(*)*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "element-with-id", "qname" : "fn:element-with-id", "signature" : "($arg as xs:string*, $node as node()) as element(*)* external", "description" : "

Returns the sequence of element nodes that have an\n ID value matching the value of one or more of the IDREF\n values supplied in $arg.

The one-argument form of this function is deterministic, context-dependent, and focus-dependent.

The two-argument form of this function is deterministic, context-independent, and focus-independent.

\n

The effect of this function is identical to fn:id in respect\n of elements that have an attribute with the is-id property. However,\n it behaves differently in respect of element nodes with the is-id\n property. Whereas the fn:id, for legacy reasons, returns the element\n that has the is-id property, this parent returns the element\n identified by the ID, which is the parent of the element having the\n is-id property.

\n

The function returns a sequence, in document order with duplicates eliminated,\n containing every element node E that satisfies all the following\n conditions:

\n

\n E is in the target document. The target document is the document\n containing $node, or the document containing the context item\n (.) if the second argument is omitted. The behavior of the\n function if $node is omitted is exactly the same as if the context\n item had been passed as $node.

E has an ID value equal to one of the candidate\n IDREF values, where:

An element has an ID value equal to V if\n either or both of the following conditions are true:

The element has an child element node whose is-id\n property (See .) is true and\n whose typed value is equal to V under the rules of the\n eq operator using the Unicode code point collation\n (http://www.w3.org/2005/xpath-functions/collation/codepoint).

The element has an attribute node whose is-id property\n (See .) is true and whose\n typed value is equal to V under the rules of the\n eq operator using the Unicode code point collation\n (http://www.w3.org/2005/xpath-functions/collation/codepoint).

Each xs:string in $arg is parsed as if it were\n of type IDREFS, that is, each xs:string in\n $arg is treated as a whitespace-separated sequence of\n tokens, each acting as an IDREF. These tokens are then\n included in the list of candidate IDREFs. If any of the\n tokens is not a lexically valid IDREF (that is, if it is not\n lexically an xs:NCName), it is ignored. Formally, the\n candidate IDREF values are the strings in the sequence given\n by the expression:

for $s in $arg return\n fn:tokenize(fn:normalize-space($s), ' ')[. castable as xs:IDREF]

If several elements have the same ID value, then E\n is the one that is first in document order.

\n
\n

A dynamic error is raised if\n $node, or the context item if the second argument is omitted, is a\n node in a tree whose root is not a document node.

\n

The following errors may be raised when $node is omitted:

\n
  • If the context\n item is absent, dynamic error\n

  • If the context item is not a\n node, type error .

\n
\n", "summary" : "

Returns the sequence of element nodes that have an\n ID value matching the value of one or more of the IDREF \n values supplied in $arg .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "*", "description" : "" }, { "name" : "node", "type" : "node()", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "element(*)*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "empty", "qname" : "fn:empty", "signature" : "($arg as item()*) as xs:boolean external", "description" : "

Returns true if the argument is the empty sequence.

This function is deterministic, context-independent, and focus-independent.

If the value of $arg is the empty sequence, the function returns\n true; otherwise, the function returns false.

The expression fn:empty((1,2,3)[10]) returns true().

The expression fn:empty(fn:remove((\"hello\", \"world\"), 1)) returns false().

\n", "summary" : "

Returns true if the argument is the empty sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "encode-for-uri", "qname" : "fn:encode-for-uri", "signature" : "($uri-part as xs:string?) as xs:string external", "description" : "

Encodes reserved characters in a string that is intended to be used in the path\n segment of a URI.

This function is deterministic, context-independent, and focus-independent.

If $uri-part is the empty sequence, the function returns the zero-length\n string.

This function applies the URI escaping rules defined in section 2 of to the xs:string supplied as $uri-part. The\n effect of the function is to escape reserved characters. Each such character in the\n string is replaced with its percent-encoded form as described in .

Since recommends that, for consistency, URI producers and\n normalizers should use uppercase hexadecimal digits for all percent-encodings, this\n function must always generate hexadecimal values using the upper-case letters A-F.

All characters are escaped except those identified as \"unreserved\" by , that is the upper- and lower-case letters A-Z, the digits 0-9,\n HYPHEN-MINUS (\"-\"), LOW LINE (\"_\"), FULL STOP \".\", and TILDE \"~\".

This function escapes URI delimiters and therefore cannot be used indiscriminately to\n encode \"invalid\" characters in a path segment.

This function is invertible but not idempotent. This is because a string containing a\n percent character will be modified by applying the function: for example\n 100% becomes 100%25, while 100%25 becomes\n 100%2525.

\n", "summary" : "

Encodes reserved characters in a string that is intended to be used in the path\n segment of a URI.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri-part", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "ends-with", "qname" : "fn:ends-with", "signature" : "($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean external", "description" : "

Returns true if the string $arg1 contains $arg2 as a\n trailing substring, taking collations into account.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations.\n \t

The three-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri.\n \t

If the value of $arg1 or $arg2 is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of $arg2 is the zero-length string, then the function returns\n true. If the value of $arg1 is the zero-length string and\n the value of $arg2 is not the zero-length string, then the function returns\n false.

The collation used by this function is determined according to the rules in .

The function returns an xs:boolean indicating whether or not the value of\n $arg1 starts with a sequence of collation units that provides a\n match to the collation units of $arg2 according to the\n collation that is used.

\n Match is defined in .

A dynamic error may be raised if the\n specified collation does not support collation units.

\n", "summary" : "

Returns true if the string $arg1 contains $arg2 as a\n trailing substring, taking collations into account.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "arg2", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "ends-with", "qname" : "fn:ends-with", "signature" : "($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean external", "description" : "

Returns true if the string $arg1 contains $arg2 as a\n trailing substring, taking collations into account.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations.\n \t

The three-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri.\n \t

If the value of $arg1 or $arg2 is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of $arg2 is the zero-length string, then the function returns\n true. If the value of $arg1 is the zero-length string and\n the value of $arg2 is not the zero-length string, then the function returns\n false.

The collation used by this function is determined according to the rules in .

The function returns an xs:boolean indicating whether or not the value of\n $arg1 starts with a sequence of collation units that provides a\n match to the collation units of $arg2 according to the\n collation that is used.

\n Match is defined in .

A dynamic error may be raised if the\n specified collation does not support collation units.

\n", "summary" : "

Returns true if the string $arg1 contains $arg2 as a\n trailing substring, taking collations into account.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "arg2", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "collation", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "environment-variable", "qname" : "fn:environment-variable", "signature" : "($arg as xs:string) as xs:string? external", "description" : "

Returns the value of a system environment variable, if it exists.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tenvironment variables.\n \t

The set of available environment variables\n is a set of (name, value) pairs forming part\n of the dynamic context, in which the name is unique within the set of pairs. The name\n and value are arbitrary strings.

If the $name argument matches the name of one of these pairs, the function\n returns the corresponding value.

If there is no environment variable with a matching name, the function returns the empty\n sequence.

The collation used for matching names is , but\n must be the same as the collation used to ensure that the names of all environment\n variables are unique.

The function is deterministic,\n which means that if it is called several times\n within the same execution scope, with the same arguments,\n it must return the same result.

On many platforms, the term \"environment variable\" has a natural meaning in terms of\n facilities provided by the operating system. This interpretation of the concept does not\n exclude other interpretations, such as a mapping to a set of configuration parameters in\n a database system.

Environment variable names are usually case sensitive. Names are usually of the form\n (letter|_) (letter|_|digit)*, but this varies by platform.

On some platforms, there may sometimes be multiple environment variables with the same name;\n in this case, it is implementation-dependent as to which is returned; see for example\n (Chapter 8, Environment Variables).\n Implementations may use prefixes or other naming conventions\n to disambiguate the names.

The requirement to ensure that the function is deterministic means in practice that\n the implementation must make a snapshot of the environment variables at some time\n during execution, and return values obtained from this snapshot, rather than using\n live values that are subject to change at any time.

Operating system environment variables may be associated with a particular process,\n while queries and stylesheets may execute across multiple processes (or multiple machines).\n In such circumstances implementations may choose to provide access\n to the environment variables associated with the process in which the query or stylesheet\n processing was initiated.

Security advice: Queries from untrusted sources should not be permitted unrestricted\n access to environment variables. For example, the name of the account under which the\n query is running may be useful information to a would-be intruder. An implementation may\n therefore choose to restrict access to the environment, or may provide a facility to\n make fn:environment-variable always return the empty sequence.

\n", "summary" : "

Returns the value of a system environment variable, if it exists.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "environment-variable", "qname" : "fn:environment-variable", "signature" : "($name as xs:string) as xs:string? external", "description" : "

Returns the value of a system environment variable, if it exists.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tenvironment variables.\n \t

The set of available environment variables\n is a set of (name, value) pairs forming part\n of the dynamic context, in which the name is unique within the set of pairs. The name\n and value are arbitrary strings.

If the $name argument matches the name of one of these pairs, the function\n returns the corresponding value.

If there is no environment variable with a matching name, the function returns the empty\n sequence.

The collation used for matching names is , but\n must be the same as the collation used to ensure that the names of all environment\n variables are unique.

The function is deterministic,\n which means that if it is called several times\n within the same execution scope, with the same arguments,\n it must return the same result.

On many platforms, the term \"environment variable\" has a natural meaning in terms of\n facilities provided by the operating system. This interpretation of the concept does not\n exclude other interpretations, such as a mapping to a set of configuration parameters in\n a database system.

Environment variable names are usually case sensitive. Names are usually of the form\n (letter|_) (letter|_|digit)*, but this varies by platform.

On some platforms, there may sometimes be multiple environment variables with the same name;\n in this case, it is implementation-dependent as to which is returned; see for example\n (Chapter 8, Environment Variables).\n Implementations may use prefixes or other naming conventions\n to disambiguate the names.

The requirement to ensure that the function is deterministic means in practice that\n the implementation must make a snapshot of the environment variables at some time\n during execution, and return values obtained from this snapshot, rather than using\n live values that are subject to change at any time.

Operating system environment variables may be associated with a particular process,\n while queries and stylesheets may execute across multiple processes (or multiple machines).\n In such circumstances implementations may choose to provide access\n to the environment variables associated with the process in which the query or stylesheet\n processing was initiated.

Security advice: Queries from untrusted sources should not be permitted unrestricted\n access to environment variables. For example, the name of the account under which the\n query is running may be useful information to a would-be intruder. An implementation may\n therefore choose to restrict access to the environment, or may provide a facility to\n make fn:environment-variable always return the empty sequence.

\n", "summary" : "

Returns the value of a system environment variable, if it exists.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "error", "qname" : "fn:error", "signature" : "() as none external", "description" : "

Calling the fn:error function raises an application-defined\n error.

This function is nondeterministic, context-independent, and focus-independent.

This function never returns a value. Instead it always raises an error. The effect of\n the error is identical to the effect of dynamic errors raised implicitly, for example\n when an incorrect argument is supplied to a function.

The parameters to the fn:error function supply information that is\n associated with the error condition and that is made available to a caller that asks for\n information about the error. The error may be caught either by the host language (using\n a try/catch construct in XSLT or XQuery, for example), or by the calling application or\n external processing environment. The way in which error information is returned to the\n external processing environment is

If fn:error is called with no arguments, then its behavior is the same as\n the function call:

fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000'))

If $code is the empty sequence then the effective value is the\n xs:QName constructed by:

fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')

There are three pieces of information that may be associated with an error:

The $code is an error code that distinguishes this error from others.\n It is an xs:QName; the namespace URI conventionally identifies the\n component, subsystem, or authority responsible for defining the meaning of the\n error code, while the local part identifies the specific error condition. The\n namespace URI http://www.w3.org/2005/xqt-errors is used for errors\n defined in this specification; other namespace URIs may be used for errors defined\n by the application.

If the external processing environment expects the error code to be returned as a\n URI or a string rather than as an xs:QName, then an error code with\n namespace URI NS and local part LP will be returned in\n the form NS#LP. The namespace URI part of the error code should\n therefore not include a fragment identifier.

The $description is a natural-language description of the error\n condition.

The $error-object is an arbitrary value used to convey additional\n information about the error, and may be used in any way the application\n chooses.

This function always raises a dynamic error. By default, it raises

\n", "summary" : "

Calling the fn:error function raises an application-defined\n error.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "none", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "error", "qname" : "fn:error", "signature" : "($code as xs:QName) as none external", "description" : "

Calling the fn:error function raises an application-defined\n error.

This function is nondeterministic, context-independent, and focus-independent.

This function never returns a value. Instead it always raises an error. The effect of\n the error is identical to the effect of dynamic errors raised implicitly, for example\n when an incorrect argument is supplied to a function.

The parameters to the fn:error function supply information that is\n associated with the error condition and that is made available to a caller that asks for\n information about the error. The error may be caught either by the host language (using\n a try/catch construct in XSLT or XQuery, for example), or by the calling application or\n external processing environment. The way in which error information is returned to the\n external processing environment is

If fn:error is called with no arguments, then its behavior is the same as\n the function call:

fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000'))

If $code is the empty sequence then the effective value is the\n xs:QName constructed by:

fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')

There are three pieces of information that may be associated with an error:

The $code is an error code that distinguishes this error from others.\n It is an xs:QName; the namespace URI conventionally identifies the\n component, subsystem, or authority responsible for defining the meaning of the\n error code, while the local part identifies the specific error condition. The\n namespace URI http://www.w3.org/2005/xqt-errors is used for errors\n defined in this specification; other namespace URIs may be used for errors defined\n by the application.

If the external processing environment expects the error code to be returned as a\n URI or a string rather than as an xs:QName, then an error code with\n namespace URI NS and local part LP will be returned in\n the form NS#LP. The namespace URI part of the error code should\n therefore not include a fragment identifier.

The $description is a natural-language description of the error\n condition.

The $error-object is an arbitrary value used to convey additional\n information about the error, and may be used in any way the application\n chooses.

This function always raises a dynamic error. By default, it raises

\n", "summary" : "

Calling the fn:error function raises an application-defined\n error.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "code", "type" : "xs:QName", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "none", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "error", "qname" : "fn:error", "signature" : "($code as xs:QName?, $description as xs:string) as none external", "description" : "

Calling the fn:error function raises an application-defined\n error.

This function is nondeterministic, context-independent, and focus-independent.

This function never returns a value. Instead it always raises an error. The effect of\n the error is identical to the effect of dynamic errors raised implicitly, for example\n when an incorrect argument is supplied to a function.

The parameters to the fn:error function supply information that is\n associated with the error condition and that is made available to a caller that asks for\n information about the error. The error may be caught either by the host language (using\n a try/catch construct in XSLT or XQuery, for example), or by the calling application or\n external processing environment. The way in which error information is returned to the\n external processing environment is

If fn:error is called with no arguments, then its behavior is the same as\n the function call:

fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000'))

If $code is the empty sequence then the effective value is the\n xs:QName constructed by:

fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')

There are three pieces of information that may be associated with an error:

The $code is an error code that distinguishes this error from others.\n It is an xs:QName; the namespace URI conventionally identifies the\n component, subsystem, or authority responsible for defining the meaning of the\n error code, while the local part identifies the specific error condition. The\n namespace URI http://www.w3.org/2005/xqt-errors is used for errors\n defined in this specification; other namespace URIs may be used for errors defined\n by the application.

If the external processing environment expects the error code to be returned as a\n URI or a string rather than as an xs:QName, then an error code with\n namespace URI NS and local part LP will be returned in\n the form NS#LP. The namespace URI part of the error code should\n therefore not include a fragment identifier.

The $description is a natural-language description of the error\n condition.

The $error-object is an arbitrary value used to convey additional\n information about the error, and may be used in any way the application\n chooses.

This function always raises a dynamic error. By default, it raises

\n", "summary" : "

Calling the fn:error function raises an application-defined\n error.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "code", "type" : "xs:QName", "occurrence" : "?", "description" : "" }, { "name" : "description", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "none", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "error", "qname" : "fn:error", "signature" : "($code as xs:QName?, $description as xs:string, $error-object as item()*) as none external", "description" : "

Calling the fn:error function raises an application-defined\n error.

This function is nondeterministic, context-independent, and focus-independent.

This function never returns a value. Instead it always raises an error. The effect of\n the error is identical to the effect of dynamic errors raised implicitly, for example\n when an incorrect argument is supplied to a function.

The parameters to the fn:error function supply information that is\n associated with the error condition and that is made available to a caller that asks for\n information about the error. The error may be caught either by the host language (using\n a try/catch construct in XSLT or XQuery, for example), or by the calling application or\n external processing environment. The way in which error information is returned to the\n external processing environment is

If fn:error is called with no arguments, then its behavior is the same as\n the function call:

fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000'))

If $code is the empty sequence then the effective value is the\n xs:QName constructed by:

fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000')

There are three pieces of information that may be associated with an error:

The $code is an error code that distinguishes this error from others.\n It is an xs:QName; the namespace URI conventionally identifies the\n component, subsystem, or authority responsible for defining the meaning of the\n error code, while the local part identifies the specific error condition. The\n namespace URI http://www.w3.org/2005/xqt-errors is used for errors\n defined in this specification; other namespace URIs may be used for errors defined\n by the application.

If the external processing environment expects the error code to be returned as a\n URI or a string rather than as an xs:QName, then an error code with\n namespace URI NS and local part LP will be returned in\n the form NS#LP. The namespace URI part of the error code should\n therefore not include a fragment identifier.

The $description is a natural-language description of the error\n condition.

The $error-object is an arbitrary value used to convey additional\n information about the error, and may be used in any way the application\n chooses.

This function always raises a dynamic error. By default, it raises

\n", "summary" : "

Calling the fn:error function raises an application-defined\n error.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "code", "type" : "xs:QName", "occurrence" : "?", "description" : "" }, { "name" : "description", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "error-object", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "none", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "escape-html-uri", "qname" : "fn:escape-html-uri", "signature" : "($uri as xs:string?) as xs:string external", "description" : "

Escapes a URI in the same way that HTML user agents handle attribute values\n expected to contain URIs.

This function is deterministic, context-independent, and focus-independent.

If $uri is the empty sequence, the function returns the zero-length\n string.

Otherwise, the function escapes all characters except\n printable characters of the US-ASCII coded character set, specifically the codepoints between 32 and 126 (decimal) inclusive. Each\n character in $uri to be escaped is replaced by an escape sequence, which is\n formed by encoding the character as a sequence of octets in UTF-8, and then representing\n each of these octets in the form %HH, where HH is the hexadecimal representation of the\n octet. This function must always generate hexadecimal values using the upper-case\n letters A-F.

The behavior of this function corresponds to the recommended handling of non-ASCII\n characters in URI attribute values as described in Appendix\n B.2.1.

\n", "summary" : "

Escapes a URI in the same way that HTML user agents handle attribute values\n expected to contain URIs.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "exactly-one", "qname" : "fn:exactly-one", "signature" : "($arg as item()*) as item() external", "description" : "

Returns $arg if it contains exactly one item. Otherwise, raises an\n error.

This function is deterministic, context-independent, and focus-independent.

Except in error cases, the function returns $arg unchanged.

For detailed type semantics, see [Formal Semantics].

A dynamic error is raised if $arg is an empty\n sequence or a sequence containing more than one item.

\n", "summary" : "

Returns $arg if it contains exactly one item.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "item()", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "exists", "qname" : "fn:exists", "signature" : "($arg as item()*) as xs:boolean external", "description" : "

Returns true if the argument is a non-empty sequence.

This function is deterministic, context-independent, and focus-independent.

If the value of $arg is a non-empty sequence, the function returns\n true; otherwise, the function returns false.

The expression fn:exists(fn:remove((\"hello\"), 1)) returns false().

The expression fn:exists(fn:remove((\"hello\", \"world\"), 1)) returns true().

\n", "summary" : "

Returns true if the argument is a non-empty sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "false", "qname" : "fn:false", "signature" : "() as xs:boolean external", "description" : "

Returns the xs:boolean value false.

This function is deterministic, context-independent, and focus-independent.

The result is equivalent to xs:boolean(\"0\").

The expression fn:false() returns xs:boolean(0).

\n", "summary" : "

Returns the xs:boolean value false .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "filter", "qname" : "fn:filter", "signature" : "($seq as item()*, $f as function (item()) as xs:boolean) as item()* external", "description" : "

Returns those items from the sequence $seq for which the supplied\n function $f returns true.

This function is deterministic, context-independent, and focus-independent.

The effect of the function is equivalent to the following implementation in XQuery:

\n declare function fn:filter(\n $seq as item()*,\n $f as function(item()) as xs:boolean)\n as item()* {\n if (fn:empty($seq))\n then ()\n else ( fn:head($seq)[$f(.) eq fn:true()],\n fn:filter(fn:tail($seq), $f)\n )\n };

or its equivalent in XSLT:

\n <xsl:function name=\"fn:filter\" as=\"item()*\">\n <xsl:param name=\"seq\" as=\"item()*\"/>\n <xsl:param name=\"f\" as=\"function(item()) as xs:boolean\"/>\n <xsl:if test=\"fn:exists($seq)\">\n <xsl:sequence select=\"fn:head($seq)[$f(.) eq fn:true()], fn:filter(fn:tail($seq), $f)\"/>\n </xsl:if>\n </xsl:function>\n

As a consequence of the function signature and the function calling\n rules, a type error occurs if the supplied function $f returns anything other\n than a single xs:boolean item; there is no conversion to an effective\n boolean value.

\n", "summary" : "

Returns those items from the sequence $seq for which the supplied\n function $f returns true.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "f", "type" : "function (item()) as xs:boolean", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "floor", "qname" : "fn:floor", "signature" : "($arg as numeric?) as numeric? external", "description" : "

Rounds $arg downwards to a whole number.

This function is deterministic, context-independent, and focus-independent.

General rules: see .

The function returns the largest (closest to positive infinity) number with no\n fractional part that is not greater than the value of $arg.

If the type of $arg is one of the four numeric types xs:float,\n xs:double, xs:decimal or xs:integer the type\n of the result is the same as the type of $arg. If the type of\n $arg is a type derived from one of the numeric types, the result is an\n instance of the base numeric type.

For xs:float and xs:double arguments, if the argument is\n positive zero, then positive zero is returned. If the argument is negative zero, then\n negative zero is returned.

For detailed type semantics, see [Formal Semantics].

The expression fn:floor(10.5) returns 10.

The expression fn:floor(-10.5) returns -11.

\n", "summary" : "

Rounds $arg downwards to a whole number.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "numeric", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "numeric?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "fold-left", "qname" : "fn:fold-left", "signature" : "($seq as item()*, $zero as item()*, $f as function (item()*, item()) as item()*) as item()* external", "description" : "

Processes the supplied sequence from left to right, applying the supplied\n function repeatedly to each item in turn, together with an accumulated result value.

This function is deterministic, context-independent, and focus-independent.

The effect of the function is equivalent to the following implementation in XQuery:

\n declare function fn:fold-left(\n $seq as item()*\n $zero as item()*,\n $f as function(item()*, item()) as item()*)\n as item()* {\n if (fn:empty($seq))\n then $zero\n else fn:fold-left(fn:tail($seq), $f($zero, fn:head($seq)), $f)\n };

or its equivalent in XSLT:

\n <xsl:function name=\"fn:fold-left\" as=\"item()*\">\n <xsl:param name=\"seq\" as=\"item()*\"/>\n <xsl:param name=\"zero\" as=\"item()*\"/>\n <xsl:param name=\"f\" as=\"function(item()*, item()) as item()*\"/>\n <xsl:choose>\n <xsl:when test=\"fn:empty($seq)\">\n <xsl:sequence select=\"$zero\"/>\n </xsl:when>\n <xsl:otherwise>\n <xsl:sequence select=\"fn:fold-left(fn:tail($seq), $f($zero, fn:head($seq)), $f)\"/>\n </xsl:otherwise>\n </xsl:choose>\n </xsl:function>\n

As a consequence of the function signature and the function calling\n rules, a type error occurs if the supplied function $f cannot be applied to\n two arguments, where the first argument is either the value of $zero or the\n result of a previous application of $f, and the second is $seq or\n any trailing subsequence of $seq.

\n", "summary" : "

Processes the supplied sequence from left to right, applying the supplied\n function repeatedly to each item in turn, together with an accumulated result value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "zero", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "f", "type" : "function (item()*, item()) as item()*", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "fold-right", "qname" : "fn:fold-right", "signature" : "($seq as item()*, $zero as item()*, $f as function (item()*, item()) as item()*) as item()* external", "description" : "

Processes the supplied sequence from right to left, applying the supplied\n function repeatedly to each item in turn, together with an accumulated result value.

This function is deterministic, context-independent, and focus-independent.

The effect of the function is equivalent to the following implementation in XQuery:

\n declare function fn:fold-right(\n $seq as item()*,\n $zero as item()*,\n $f as function(item(), item()*) as item()*)\n as item()* {\n if (fn:empty($seq))\n then $zero\n else $f(fn:head($seq), fn:fold-right(fn:tail($seq), $zero, $f))\n };

or its equivalent in XSLT:

\n <xsl:function name=\"fn:fold-right\" as=\"item()*\">\n <xsl:param name=\"seq\" as=\"item()*\"/>\n <xsl:param name=\"zero\" as=\"item()*\"/>\n <xsl:param name=\"f\" as=\"function(item(), item()*) as item()*\"/>\n <xsl:choose>\n <xsl:when test=\"fn:empty($seq)\">\n <xsl:sequence select=\"$zero\"/>\n </xsl:when>\n <xsl:otherwise>\n <xsl:sequence select=\"$f(fn:head($seq), fn:fold-right(fn:tail($seq), $zero, $f))\"/>\n </xsl:otherwise>\n </xsl:choose>\n </xsl:function>\n

As a consequence of the function signature and the function calling\n rules, a type error occurs if the supplied function $f cannot be applied to\n two arguments, where the first argument is any item in the sequence $seq, and\n the second is either the value of $zero or the result of a previous\n application of $f.

\n", "summary" : "

Processes the supplied sequence from right to left, applying the supplied\n function repeatedly to each item in turn, together with an accumulated result value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "zero", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "f", "type" : "function (item()*, item()) as item()*", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "for-each-pair", "qname" : "fn:for-each-pair", "signature" : "($seq1 as item()*, $seq2 as item()*, $f as function (item(), item()) as item()*) as item()* external", "description" : "

Applies the function item $f to successive pairs of items taken one\n from $seq1 and one from $seq2, returning the concatenation of the\n resulting sequences in order.

This function is deterministic, context-independent, and focus-independent.

The effect of the function is equivalent to the following implementation in XQuery:

\n declare function fn:for-each-pair($seq1, $seq2, $f)\n {\n if(fn:exists($seq1) and fn:exists($seq2))\n then (\n $f(fn:head($seq1), fn:head($seq2)),\n fn:for-each-pair(fn:tail($seq1), fn:tail($seq2), $f)\n )\n else ()\n };

or its equivalent in XSLT:

\n <xsl:function name=\"fn:for-each-pair\">\n <xsl:param name=\"seq1/>\n <xsl:param name=\"seq2/>\n <xsl:param name=\"f\"/>\n <xsl:if test=\"fn:exists($seq1) and fn:exists($seq2)\">\n <xsl:sequence select=\"$f(fn:head($seq1), fn:head($seq2))\"/>\n <xsl:sequence select=\"fn:for-each-pair(fn:tail($seq1), fn:tail($seq2), $f)\"/>\n </xsl:if>\n </xsl:function>\n

The expression fn:for-each-pair((\"a\", \"b\", \"c\"), (\"x\", \"y\", \"z\"), concat#2) returns (\"ax\", \"by\", \"cz\").

The expression fn:for-each-pair(1 to 5, 1 to 5, function($a, $b){10*$a + $b} returns (11, 22, 33, 44, 55).

\n", "summary" : "

Applies the function item $f to successive pairs of items taken one\n from $seq1 and one from $seq2 , returning the concatenation of the\n resulting sequences in order.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq1", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "seq2", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "f", "type" : "function (item(), item()) as item()*", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "for-each", "qname" : "fn:for-each", "signature" : "($seq as item()*, $f as function (item()) as item()*) as item()* external", "description" : "

Applies the function item $f to every item from the sequence\n $seq in turn, returning the concatenation of the resulting sequences in\n order.

This function is deterministic, context-independent, and focus-independent.

The effect of the function is equivalent to the following implementation in XQuery:

\n declare function fn:for-each($seq, $f) {\n if (fn:empty($seq))\n then ()\n else ($f(fn:head($seq)), fn:for-each(fn:tail($seq), $f))\n };

or its equivalent in XSLT:

\n <xsl:function name=\"fn:for-each\">\n <xsl:param name=\"seq\"/>\n <xsl:param name=\"f\"/>\n <xsl:if test=\"fn:exists($seq)\">\n <xsl:sequence select=\"$f(fn:head($seq)), fn:for-each(fn:tail($seq), $f)\"/>\n </xsl:if>\n </xsl:function>\n

The function call fn:for-each($SEQ, $F) is equivalent to the expression\n for $i in $SEQ return $F($i), assuming that\n ordering mode is ordered.

\n", "summary" : "

Applies the function item $f to every item from the sequence\n $seq in turn, returning the concatenation of the resulting sequences in\n order.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "f", "type" : "function (item()) as item()*", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "format-date", "qname" : "fn:format-date", "signature" : "($value as xs:date?, $picture as xs:string) as xs:string? external", "description" : "

Returns a string containing an xs:date value formatted for display.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tdefault calendar, and default language, and default place, and implicit timezone.\n \t

The five-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\timplicit timezone, and namespaces.\n \t

See .

\n", "summary" : "

Returns a string containing an xs:date value formatted for display.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:date", "occurrence" : "?", "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "format-date", "qname" : "fn:format-date", "signature" : "($value as xs:date?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string? external", "description" : "

Returns a string containing an xs:date value formatted for display.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tdefault calendar, and default language, and default place, and implicit timezone.\n \t

The five-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\timplicit timezone, and namespaces.\n \t

See .

\n", "summary" : "

Returns a string containing an xs:date value formatted for display.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:date", "occurrence" : "?", "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "language", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "calendar", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "place", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "format-dateTime", "qname" : "fn:format-dateTime", "signature" : "($value as xs:dateTime?, $picture as xs:string) as xs:string? external", "description" : "

Returns a string containing an xs:dateTime value formatted for display.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tdefault calendar, and default language, and default place, and implicit timezone.\n \t

The five-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\timplicit timezone, and namespaces.\n \t

See .

\n", "summary" : "

Returns a string containing an xs:dateTime value formatted for display.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:dateTime", "occurrence" : "?", "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "format-dateTime", "qname" : "fn:format-dateTime", "signature" : "($value as xs:dateTime?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string? external", "description" : "

Returns a string containing an xs:dateTime value formatted for display.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tdefault calendar, and default language, and default place, and implicit timezone.\n \t

The five-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\timplicit timezone, and namespaces.\n \t

See .

\n", "summary" : "

Returns a string containing an xs:dateTime value formatted for display.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:dateTime", "occurrence" : "?", "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "language", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "calendar", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "place", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "format-integer", "qname" : "fn:format-integer", "signature" : "($value as xs:integer?, $picture as xs:string) as xs:string external", "description" : "

Formats an integer according to a given picture string, using the conventions\n of a given natural language if specified.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tdefault language.\n \t

The three-argument form of this function is deterministic, context-independent, and focus-independent.

If $value is an empty sequence, the function returns a zero-length\n string.

In all other cases, the $picture argument describes the format in which\n $value is output.

The rules that follow describe how non-negative numbers are output. If the value of\n $value is negative, the rules below are applied to the absolute value of\n $value, and a minus sign is prepended to the result.

The value of $picture consists of a primary format token,\n optionally followed\n by a format modifier. The primary format token is always present and must not\n be zero-length. If the string contains one or more semicolons then everything that\n precedes the last semicolon is taken as the primary format token and everything\n that follows is taken as the format modifier; if the string contains no\n semicolon then the entire picture is taken as the primary format token, and the\n format modifier is taken to be absent (which is equivalent to supplying a\n zero-length string).

The primary format token is classified as one of the following:

A decimal-digit-pattern made up of optional-digit-signs,\n mandatory-digit-signs, and grouping-separator-signs.

The optional-digit-sign is the character \"#\".

A mandatory-digit-sign is a character in Unicode category Nd. All\n mandatory-digit-signs within the format token must be from the\n same digit family, where a digit family is a sequence of ten consecutive\n characters in Unicode category Nd, having digit values 0 through 9. Within\n the format token, these digits are interchangeable: a three-digit number may\n thus be indicated equivalently by 000, 001, or\n 999.

a grouping-separator-sign is a non-alphanumeric character, that\n is a character whose Unicode category is\n other than Nd, Nl, No, Lu, Ll, Lt, Lm or Lo.

If the primary format token contains at least one Unicode digit\n then it is taken as a decimal digit pattern, and in this case it must\n match the regular expression ^((\\p{Nd}|#|[^\\p{N}\\p{L}])+?)$. If it contains\n a digit but does not match this pattern, a dynamic error\n is raised .

If a semicolon is to be used as a grouping separator, then the primary\n format token as a whole must be followed by another semicolon, to ensure that\n the grouping separator is not mistaken as a separator between the primary format\n token and the format modifier.

There must be at least one mandatory-digit-sign. There may be zero or\n more optional-digit-signs, and (if present) these must precede all\n mandatory-digit-signs. There may be zero or more\n grouping-separator-signs. A grouping-separator-sign must\n not appear at the start or end of the decimal-digit-pattern, nor\n adjacent to another grouping-separator-sign.

The corresponding output format is a decimal number, using this digit family, with\n at least as many digits as there are mandatory-digit-signs in the\n format token. Thus, a format token 1 generates the sequence 0 1\n 2 ... 10 11 12 ..., and a format token 01 (or equivalently,\n 00 or 99) generates the sequence 00 01 02 ...\n 09 10 11 12 ... 99 100 101. A format token of &#x661;\n (Arabic-Indic digit one) generates the sequence ١ then ٢\n then ٣ ...

The grouping-separator-signs are handled as follows. The position of\n grouping separators within the format token, counting backwards from the last\n digit, indicates the position of grouping separators to appear within the\n formatted number, and the character used as the grouping-separator-sign\n within the format token indicates the character to be used as the corresponding\n grouping separator in the formatted number. If grouping-separator-signs\n appear at regular intervals within the format token, that is if the same grouping\n separator appears at positions forming a sequence N, 2N,\n 3N, ... for some integer value N (including the case\n where there is only one number in the list), then the sequence is extrapolated to\n the left, so grouping separators will be used in the formatted number at every\n multiple of N. For example, if the format token is 0'000\n then the number one million will be formatted as 1'000'000, while the\n number fifteen will be formatted as 0'015.

The only purpose of optional-digit-signs is to mark the position of\n grouping-separator-signs. For example, if the format token is\n #'##0 then the number one million will be formatted as\n 1'000'000, while the number fifteen will be formatted as\n 15. A grouping separator is included in the formatted number only\n if there is a digit to its left, which will only be the case if either (a) the\n number is large enough to require that digit, or (b) the number of\n mandatory-digit-signs in the format token requires insignificant\n leading zeros to be present.

Numbers will never be truncated. Given the decimal-digit-pattern\n 01, the number three hundred will be output as 300,\n despite the absence of any optional-digit-sign.

The format token A, which generates the sequence A B C ... Z AA AB\n AC....

The format token a, which generates the sequence a b c ... z aa ab\n ac....

The format token i, which generates the sequence i ii iii iv v vi vii\n viii ix x ....

The format token I, which generates the sequence I II III IV V VI VII\n VIII IX X ....

The format token w, which generates numbers written as lower-case words, for\n example in English, one two three four ...\n

The format token W, which generates numbers written as upper-case words, for\n example in English, ONE TWO THREE FOUR ...\n

The format token Ww, which generates numbers written as title-case words, for\n example in English, One Two Three Four ...\n

Any other format token, which indicates a numbering sequence in which that token\n represents the number 1 (one) (but see the note below).\n \n It is implementation-defined which\n numbering sequences, additional to those listed above, are supported. If an\n implementation does not support a numbering sequence represented by the given\n token, it must use a format token of 1.

In some traditional numbering sequences additional signs are added to denote\n that the letters should be interpreted as numbers; these are not included in\n the format token. An example (see also the example below) is classical Greek\n where a dexia keraia (x0374, ʹ) and sometimes an aristeri keraia\n (x0375, ͵) is added.

For all format tokens other than the first kind above (one that consists of decimal\n digits), there may be implementation-defined lower and upper bounds on the range of numbers that\n can be formatted using this format token; indeed, for some numbering sequences there may\n be intrinsic limits. For example, the format token &#x2460; (circled\n digit one, ①) has a range imposed by the Unicode character repertoire — 1 to 20 in\n Unicode versions prior to 4.0, increased in subsequent versions. For\n the numbering sequences described above any upper bound imposed by the implementation\n must not be less than 1000 (one thousand) and any lower bound must\n not be greater than 1. Numbers that fall outside this range must be\n formatted using the format token 1.

The above expansions of numbering sequences for format tokens such as a and\n i are indicative but not prescriptive. There are various conventions in\n use for how alphabetic sequences continue when the alphabet is exhausted, and differing\n conventions for how roman numerals are written (for example, IV versus\n IIII as the representation of the number 4). Sometimes alphabetic\n sequences are used that omit letters such as i and o. This\n specification does not prescribe the detail of any sequence other than those sequences\n consisting entirely of decimal digits.

Many numbering sequences are language-sensitive. This applies especially to the sequence\n selected by the tokens w, W and Ww. It also\n applies to other sequences, for example different languages using the Cyrillic alphabet\n use different sequences of characters, each starting with the letter #x410 (Cyrillic\n capital letter A). In such cases, the $lang argument specifies which\n language's conventions are to be used. If the argument\n is specified, the value should be either an empty sequence\n or a value that would be valid for the xml:lang attribute (see ).\n Note that this permits the identification of sublanguages based on country codes (from ISO 3166-1)\n as well as identification of dialects and regions within a country..

The set of languages\n for which numbering is supported is .\n If the $lang argument is absent,\n or is set to an empty sequence, or is invalid, or is not a language supported by the\n implementation, then the number is formatted using the\n default language from the dynamic context.\n

The format modifier must\n be a string that matches the regular expression ^([co](\\(.+\\))?)?[at]?$. \n That is, if it is present it must consist of one or more of\n the following, in any order:

either c or o, optionally followed by\n a sequence of characters enclosed between parentheses, to indicate cardinal or\n ordinal numbering respectively, the default being cardinal numbering

either a or t, to indicate alphabetic\n or traditional numbering respectively, the default being implementation-defined.

If the o modifier is present, this indicates a request to output ordinal\n numbers rather than cardinal numbers. For example, in English, when used with the format\n token 1, this outputs the sequence 1st 2nd 3rd 4th ..., and\n when used with the format token w outputs the sequence first second\n third fourth ....

The string of characters between the parentheses, if present, is used to\n select between other possible variations of cardinal or ordinal numbering sequences.\n The interpretation of this string is implementation-defined. No error occurs\n if the implementation does not define any interpretation for the defined string.

For example, in some languages, ordinal numbers vary depending on the grammatical context:\n they may have different genders and may decline with the noun that they qualify.\n In such cases the string appearing in parentheses after the letter o may be\n used to indicate the variation of the ordinal number required. The way in which the\n variation is indicated will depend on the conventions of the language. For inflected\n languages that vary the ending of the word, the recommended approach is to indicate the\n required ending, preceded by a hyphen: for example in German, appropriate values are\n o(-e), o(-er), o(-es), o(-en).

It is implementation-defined what\n combinations of values of the format token, the language, and the cardinal/ordinal\n modifier are supported. If ordinal numbering is not supported for the combination of the\n format token, the language, and the string appearing in parentheses, the request is\n ignored and cardinal numbers are generated instead.

Ordinal Numbering in Italian

The specification \"1;o(-º)\" with $lang equal to\n it, if supported, should produce the sequence:

1º 2º 3º 4º ...

The specification \"Ww;o\" with $lang equal to\n it, if supported, should produce the sequence:

Primo Secondo Terzo Quarto Quinto ...

The use of the a or t\n modifier disambiguates between numbering sequences that use letters. In many\n languages there are two commonly used numbering sequences that use letters. One\n numbering sequence assigns numeric values to letters in alphabetic sequence, and the\n other assigns numeric values to each letter in some other manner traditional in that\n language. In English, these would correspond to the numbering sequences specified by the\n format tokens a and i. In some languages, the first member of\n each sequence is the same, and so the format token alone would be ambiguous. In the absence of the a or t modifier,\n the default is implementation-defined.

A dynamic error is raised if the format token is invalid,\n that is, if it violates any mandatory rules (indicated by an emphasized must\n or required keyword in the above rules). For example, the error is raised if\n the primary format token contains a digit but does not match the required regular expression.

\n", "summary" : "

Formats an integer according to a given picture string, using the conventions\n of a given natural language if specified.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:integer", "occurrence" : "?", "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "format-integer", "qname" : "fn:format-integer", "signature" : "($value as xs:integer?, $picture as xs:string, $language as xs:string) as xs:string external", "description" : "

Formats an integer according to a given picture string, using the conventions\n of a given natural language if specified.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tdefault language.\n \t

The three-argument form of this function is deterministic, context-independent, and focus-independent.

If $value is an empty sequence, the function returns a zero-length\n string.

In all other cases, the $picture argument describes the format in which\n $value is output.

The rules that follow describe how non-negative numbers are output. If the value of\n $value is negative, the rules below are applied to the absolute value of\n $value, and a minus sign is prepended to the result.

The value of $picture consists of a primary format token,\n optionally followed\n by a format modifier. The primary format token is always present and must not\n be zero-length. If the string contains one or more semicolons then everything that\n precedes the last semicolon is taken as the primary format token and everything\n that follows is taken as the format modifier; if the string contains no\n semicolon then the entire picture is taken as the primary format token, and the\n format modifier is taken to be absent (which is equivalent to supplying a\n zero-length string).

The primary format token is classified as one of the following:

A decimal-digit-pattern made up of optional-digit-signs,\n mandatory-digit-signs, and grouping-separator-signs.

The optional-digit-sign is the character \"#\".

A mandatory-digit-sign is a character in Unicode category Nd. All\n mandatory-digit-signs within the format token must be from the\n same digit family, where a digit family is a sequence of ten consecutive\n characters in Unicode category Nd, having digit values 0 through 9. Within\n the format token, these digits are interchangeable: a three-digit number may\n thus be indicated equivalently by 000, 001, or\n 999.

a grouping-separator-sign is a non-alphanumeric character, that\n is a character whose Unicode category is\n other than Nd, Nl, No, Lu, Ll, Lt, Lm or Lo.

If the primary format token contains at least one Unicode digit\n then it is taken as a decimal digit pattern, and in this case it must\n match the regular expression ^((\\p{Nd}|#|[^\\p{N}\\p{L}])+?)$. If it contains\n a digit but does not match this pattern, a dynamic error\n is raised .

If a semicolon is to be used as a grouping separator, then the primary\n format token as a whole must be followed by another semicolon, to ensure that\n the grouping separator is not mistaken as a separator between the primary format\n token and the format modifier.

There must be at least one mandatory-digit-sign. There may be zero or\n more optional-digit-signs, and (if present) these must precede all\n mandatory-digit-signs. There may be zero or more\n grouping-separator-signs. A grouping-separator-sign must\n not appear at the start or end of the decimal-digit-pattern, nor\n adjacent to another grouping-separator-sign.

The corresponding output format is a decimal number, using this digit family, with\n at least as many digits as there are mandatory-digit-signs in the\n format token. Thus, a format token 1 generates the sequence 0 1\n 2 ... 10 11 12 ..., and a format token 01 (or equivalently,\n 00 or 99) generates the sequence 00 01 02 ...\n 09 10 11 12 ... 99 100 101. A format token of &#x661;\n (Arabic-Indic digit one) generates the sequence ١ then ٢\n then ٣ ...

The grouping-separator-signs are handled as follows. The position of\n grouping separators within the format token, counting backwards from the last\n digit, indicates the position of grouping separators to appear within the\n formatted number, and the character used as the grouping-separator-sign\n within the format token indicates the character to be used as the corresponding\n grouping separator in the formatted number. If grouping-separator-signs\n appear at regular intervals within the format token, that is if the same grouping\n separator appears at positions forming a sequence N, 2N,\n 3N, ... for some integer value N (including the case\n where there is only one number in the list), then the sequence is extrapolated to\n the left, so grouping separators will be used in the formatted number at every\n multiple of N. For example, if the format token is 0'000\n then the number one million will be formatted as 1'000'000, while the\n number fifteen will be formatted as 0'015.

The only purpose of optional-digit-signs is to mark the position of\n grouping-separator-signs. For example, if the format token is\n #'##0 then the number one million will be formatted as\n 1'000'000, while the number fifteen will be formatted as\n 15. A grouping separator is included in the formatted number only\n if there is a digit to its left, which will only be the case if either (a) the\n number is large enough to require that digit, or (b) the number of\n mandatory-digit-signs in the format token requires insignificant\n leading zeros to be present.

Numbers will never be truncated. Given the decimal-digit-pattern\n 01, the number three hundred will be output as 300,\n despite the absence of any optional-digit-sign.

The format token A, which generates the sequence A B C ... Z AA AB\n AC....

The format token a, which generates the sequence a b c ... z aa ab\n ac....

The format token i, which generates the sequence i ii iii iv v vi vii\n viii ix x ....

The format token I, which generates the sequence I II III IV V VI VII\n VIII IX X ....

The format token w, which generates numbers written as lower-case words, for\n example in English, one two three four ...\n

The format token W, which generates numbers written as upper-case words, for\n example in English, ONE TWO THREE FOUR ...\n

The format token Ww, which generates numbers written as title-case words, for\n example in English, One Two Three Four ...\n

Any other format token, which indicates a numbering sequence in which that token\n represents the number 1 (one) (but see the note below).\n \n It is implementation-defined which\n numbering sequences, additional to those listed above, are supported. If an\n implementation does not support a numbering sequence represented by the given\n token, it must use a format token of 1.

In some traditional numbering sequences additional signs are added to denote\n that the letters should be interpreted as numbers; these are not included in\n the format token. An example (see also the example below) is classical Greek\n where a dexia keraia (x0374, ʹ) and sometimes an aristeri keraia\n (x0375, ͵) is added.

For all format tokens other than the first kind above (one that consists of decimal\n digits), there may be implementation-defined lower and upper bounds on the range of numbers that\n can be formatted using this format token; indeed, for some numbering sequences there may\n be intrinsic limits. For example, the format token &#x2460; (circled\n digit one, ①) has a range imposed by the Unicode character repertoire — 1 to 20 in\n Unicode versions prior to 4.0, increased in subsequent versions. For\n the numbering sequences described above any upper bound imposed by the implementation\n must not be less than 1000 (one thousand) and any lower bound must\n not be greater than 1. Numbers that fall outside this range must be\n formatted using the format token 1.

The above expansions of numbering sequences for format tokens such as a and\n i are indicative but not prescriptive. There are various conventions in\n use for how alphabetic sequences continue when the alphabet is exhausted, and differing\n conventions for how roman numerals are written (for example, IV versus\n IIII as the representation of the number 4). Sometimes alphabetic\n sequences are used that omit letters such as i and o. This\n specification does not prescribe the detail of any sequence other than those sequences\n consisting entirely of decimal digits.

Many numbering sequences are language-sensitive. This applies especially to the sequence\n selected by the tokens w, W and Ww. It also\n applies to other sequences, for example different languages using the Cyrillic alphabet\n use different sequences of characters, each starting with the letter #x410 (Cyrillic\n capital letter A). In such cases, the $lang argument specifies which\n language's conventions are to be used. If the argument\n is specified, the value should be either an empty sequence\n or a value that would be valid for the xml:lang attribute (see ).\n Note that this permits the identification of sublanguages based on country codes (from ISO 3166-1)\n as well as identification of dialects and regions within a country..

The set of languages\n for which numbering is supported is .\n If the $lang argument is absent,\n or is set to an empty sequence, or is invalid, or is not a language supported by the\n implementation, then the number is formatted using the\n default language from the dynamic context.\n

The format modifier must\n be a string that matches the regular expression ^([co](\\(.+\\))?)?[at]?$. \n That is, if it is present it must consist of one or more of\n the following, in any order:

either c or o, optionally followed by\n a sequence of characters enclosed between parentheses, to indicate cardinal or\n ordinal numbering respectively, the default being cardinal numbering

either a or t, to indicate alphabetic\n or traditional numbering respectively, the default being implementation-defined.

If the o modifier is present, this indicates a request to output ordinal\n numbers rather than cardinal numbers. For example, in English, when used with the format\n token 1, this outputs the sequence 1st 2nd 3rd 4th ..., and\n when used with the format token w outputs the sequence first second\n third fourth ....

The string of characters between the parentheses, if present, is used to\n select between other possible variations of cardinal or ordinal numbering sequences.\n The interpretation of this string is implementation-defined. No error occurs\n if the implementation does not define any interpretation for the defined string.

For example, in some languages, ordinal numbers vary depending on the grammatical context:\n they may have different genders and may decline with the noun that they qualify.\n In such cases the string appearing in parentheses after the letter o may be\n used to indicate the variation of the ordinal number required. The way in which the\n variation is indicated will depend on the conventions of the language. For inflected\n languages that vary the ending of the word, the recommended approach is to indicate the\n required ending, preceded by a hyphen: for example in German, appropriate values are\n o(-e), o(-er), o(-es), o(-en).

It is implementation-defined what\n combinations of values of the format token, the language, and the cardinal/ordinal\n modifier are supported. If ordinal numbering is not supported for the combination of the\n format token, the language, and the string appearing in parentheses, the request is\n ignored and cardinal numbers are generated instead.

Ordinal Numbering in Italian

The specification \"1;o(-º)\" with $lang equal to\n it, if supported, should produce the sequence:

1º 2º 3º 4º ...

The specification \"Ww;o\" with $lang equal to\n it, if supported, should produce the sequence:

Primo Secondo Terzo Quarto Quinto ...

The use of the a or t\n modifier disambiguates between numbering sequences that use letters. In many\n languages there are two commonly used numbering sequences that use letters. One\n numbering sequence assigns numeric values to letters in alphabetic sequence, and the\n other assigns numeric values to each letter in some other manner traditional in that\n language. In English, these would correspond to the numbering sequences specified by the\n format tokens a and i. In some languages, the first member of\n each sequence is the same, and so the format token alone would be ambiguous. In the absence of the a or t modifier,\n the default is implementation-defined.

A dynamic error is raised if the format token is invalid,\n that is, if it violates any mandatory rules (indicated by an emphasized must\n or required keyword in the above rules). For example, the error is raised if\n the primary format token contains a digit but does not match the required regular expression.

\n", "summary" : "

Formats an integer according to a given picture string, using the conventions\n of a given natural language if specified.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:integer", "occurrence" : "?", "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "language", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "format-number", "qname" : "fn:format-number", "signature" : "($value as numeric?, $picture as xs:string) as xs:string external", "description" : "

Returns a string containing a number formatted according to a given picture\n string, taking account of decimal formats specified in the static context.

The two-argument form of this function is deterministic, context-independent, and focus-independent.

The three-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tdecimal formats, and namespaces.\n \t

The effect of the two-argument form of the function is equivalent to calling\n the three-argument form with an empty sequence as the value of the third argument.

The function formats $value as a string using the picture string specified by the\n $picture argument and the decimal-format named by the\n $decimal-format-name argument, or the default decimal-format, if there\n is no $decimal-format-name argument. The syntax of the picture string is\n described in .

The $value argument may be of any numeric data type\n (xs:double, xs:float, xs:decimal, or their\n subtypes including xs:integer). Note that if an xs:decimal is\n supplied, it is not automatically promoted to an xs:double, as such\n promotion can involve a loss of precision.

If the supplied value of the $value argument is an empty sequence, the\n function behaves as if the supplied value were the xs:double value\n NaN.

The value of $decimal-format-name,\n if present and non-empty, \n must be a string which after removal of leading and trailing whitespace is in the form of an\n an EQName as defined in the XPath 3.0 grammar, that is one of the following:

A lexical QName, which is expanded using the\n statically known namespaces.\n The default namespace is not used (no prefix means no namespace).

A URIQualifiedName using the syntax Q{uri}local,\n where the URI can be zero-length to indicate a name in no namespace.

The decimal format that is used is the decimal format\n in the static context whose name matches $decimal-format-name if supplied,\n or the default decimal format in the static context otherwise.

The evaluation of the format-number function takes place in two\n phases, an analysis phase described in and a\n formatting phase described in .

The analysis phase takes as its inputs the picture\n string and the variables derived from the relevant decimal format in the\n static context, and produces as its output a number of variables with defined values.\n The formatting phase takes as its inputs the number to be formatted and the variables\n produced by the analysis phase, and produces as its output a string containing a\n formatted representation of the number.

The result of the function is the formatted string representation of the supplied\n number.

A dynamic error is raised if the name specified as the\n $decimal-format-name argument is\n neither a valid lexical QName nor a valid URIQualifiedName, or if it\n uses a prefix that is not found in the statically known namespaces, or if the static\n context does not contain a declaration of a decimal-format with a matching expanded\n QName. If the processor is able to detect the error statically (for example, when the\n argument is supplied as a string literal), then the processor may\n optionally signal this as a static error.

\n", "summary" : "

Returns a string containing a number formatted according to a given picture\n string, taking account of decimal formats specified in the static context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "numeric", "occurrence" : "?", "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "format-number", "qname" : "fn:format-number", "signature" : "($value as numeric?, $picture as xs:string, $decimal-format-name as xs:string) as xs:string external", "description" : "

Returns a string containing a number formatted according to a given picture\n string, taking account of decimal formats specified in the static context.

The two-argument form of this function is deterministic, context-independent, and focus-independent.

The three-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tdecimal formats, and namespaces.\n \t

The effect of the two-argument form of the function is equivalent to calling\n the three-argument form with an empty sequence as the value of the third argument.

The function formats $value as a string using the picture string specified by the\n $picture argument and the decimal-format named by the\n $decimal-format-name argument, or the default decimal-format, if there\n is no $decimal-format-name argument. The syntax of the picture string is\n described in .

The $value argument may be of any numeric data type\n (xs:double, xs:float, xs:decimal, or their\n subtypes including xs:integer). Note that if an xs:decimal is\n supplied, it is not automatically promoted to an xs:double, as such\n promotion can involve a loss of precision.

If the supplied value of the $value argument is an empty sequence, the\n function behaves as if the supplied value were the xs:double value\n NaN.

The value of $decimal-format-name,\n if present and non-empty, \n must be a string which after removal of leading and trailing whitespace is in the form of an\n an EQName as defined in the XPath 3.0 grammar, that is one of the following:

A lexical QName, which is expanded using the\n statically known namespaces.\n The default namespace is not used (no prefix means no namespace).

A URIQualifiedName using the syntax Q{uri}local,\n where the URI can be zero-length to indicate a name in no namespace.

The decimal format that is used is the decimal format\n in the static context whose name matches $decimal-format-name if supplied,\n or the default decimal format in the static context otherwise.

The evaluation of the format-number function takes place in two\n phases, an analysis phase described in and a\n formatting phase described in .

The analysis phase takes as its inputs the picture\n string and the variables derived from the relevant decimal format in the\n static context, and produces as its output a number of variables with defined values.\n The formatting phase takes as its inputs the number to be formatted and the variables\n produced by the analysis phase, and produces as its output a string containing a\n formatted representation of the number.

The result of the function is the formatted string representation of the supplied\n number.

A dynamic error is raised if the name specified as the\n $decimal-format-name argument is\n neither a valid lexical QName nor a valid URIQualifiedName, or if it\n uses a prefix that is not found in the statically known namespaces, or if the static\n context does not contain a declaration of a decimal-format with a matching expanded\n QName. If the processor is able to detect the error statically (for example, when the\n argument is supplied as a string literal), then the processor may\n optionally signal this as a static error.

\n", "summary" : "

Returns a string containing a number formatted according to a given picture\n string, taking account of decimal formats specified in the static context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "numeric", "occurrence" : "?", "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "decimal-format-name", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "format-time", "qname" : "fn:format-time", "signature" : "($value as xs:time?, $picture as xs:string) as xs:string? external", "description" : "

Returns a string containing an xs:time value formatted for display.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tdefault calendar, and default language, and default place, and implicit timezone.\n \t

The five-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\timplicit timezone, and namespaces.\n \t

See .

\n", "summary" : "

Returns a string containing an xs:time value formatted for display.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:time", "occurrence" : "?", "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "format-time", "qname" : "fn:format-time", "signature" : "($value as xs:time?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string? external", "description" : "

Returns a string containing an xs:time value formatted for display.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tdefault calendar, and default language, and default place, and implicit timezone.\n \t

The five-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\timplicit timezone, and namespaces.\n \t

See .

\n", "summary" : "

Returns a string containing an xs:time value formatted for display.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:time", "occurrence" : "?", "description" : "" }, { "name" : "picture", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "language", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "calendar", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "place", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "function-arity", "qname" : "fn:function-arity", "signature" : "($func as function (*)) as xs:integer external", "description" : "

Returns the arity of the function identified by a function item.

This function is deterministic, context-independent, and focus-independent.

The fn:function-arity function returns the arity (number of arguments) of\n the function identified by $func.

The expression fn:function-arity(fn:substring#2) returns 2.

The expression fn:function-arity(function($node){name($node)}) returns 1.

The expression let $initial := fn:substring(?, 1, 1) return fn:function-arity($initial) returns 1.

\n", "summary" : "

Returns the arity of the function identified by a function item.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "func", "type" : "function (*)", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "generate-id", "qname" : "fn:generate-id", "signature" : "() as xs:string external", "description" : "

This function returns a string that uniquely identifies a given node.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the argument is omitted, it defaults to the context item (.). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If the argument is the empty sequence, the result is the zero-length string.

In other cases, the function returns a string that uniquely identifies a given node.

The returned identifier must consist of ASCII alphanumeric characters\n and must start with an alphabetic character. Thus, the string is\n syntactically an XML name.

An implementation is free to generate an identifier in any convenient way provided that\n it always generates the same identifier for the same node and that different identifiers\n are always generated from different nodes. An implementation is under no obligation to\n generate the same identifiers each time a document is transformed or queried.

The following errors may be raised when $arg is omitted:

\n", "summary" : "

This function returns a string that uniquely identifies a given node.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "generate-id", "qname" : "fn:generate-id", "signature" : "($arg as node()?) as xs:string external", "description" : "

This function returns a string that uniquely identifies a given node.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the argument is omitted, it defaults to the context item (.). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If the argument is the empty sequence, the result is the zero-length string.

In other cases, the function returns a string that uniquely identifies a given node.

The returned identifier must consist of ASCII alphanumeric characters\n and must start with an alphabetic character. Thus, the string is\n syntactically an XML name.

An implementation is free to generate an identifier in any convenient way provided that\n it always generates the same identifier for the same node and that different identifiers\n are always generated from different nodes. An implementation is under no obligation to\n generate the same identifiers each time a document is transformed or queried.

The following errors may be raised when $arg is omitted:

\n", "summary" : "

This function returns a string that uniquely identifies a given node.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "node()", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "has-children", "qname" : "fn:has-children", "signature" : "() as xs:boolean external", "description" : "

Returns true if the supplied node has one or more child nodes (of any kind).

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the argument is omitted, it defaults to the context item (.). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

Provided that the supplied argument $node matches the expected\n type node()?, the result of the function call fn:has-children($node) is defined to be\n the same as the result of the expression\n fn:exists($node/child::node()).

The following errors may be raised when $node is omitted:

\n", "summary" : "

Returns true if the supplied node has one or more child nodes (of any kind).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "has-children", "qname" : "fn:has-children", "signature" : "($node as node()?) as xs:boolean external", "description" : "

Returns true if the supplied node has one or more child nodes (of any kind).

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the argument is omitted, it defaults to the context item (.). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

Provided that the supplied argument $node matches the expected\n type node()?, the result of the function call fn:has-children($node) is defined to be\n the same as the result of the expression\n fn:exists($node/child::node()).

The following errors may be raised when $node is omitted:

\n", "summary" : "

Returns true if the supplied node has one or more child nodes (of any kind).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "node()", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "head", "qname" : "fn:head", "signature" : "($arg as item()*) as item()? external", "description" : "

Returns the first item in a sequence.

This function is deterministic, context-independent, and focus-independent.

The function returns the value of the expression $arg[1]

If $arg is the empty sequence, the empty sequence is returned. Otherwise\n the first item in the sequence is returned.

\n", "summary" : "

Returns the first item in a sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "item()?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "hours-from-duration", "qname" : "fn:hours-from-duration", "signature" : "($arg as xs:duration?) as xs:integer? external", "description" : "

Returns the number of hours in a duration.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an xs:integer representing the hours\n component in the value of $arg. The result is obtained by casting\n $arg to an xs:dayTimeDuration (see ) and then computing the hours component as described in\n .

If $arg is a negative duration then the result will be negative..

If $arg is an xs:yearMonthDuration the function returns 0.

The expression fn:hours-from-duration(xs:dayTimeDuration(\"P3DT10H\")) returns 10.

The expression fn:hours-from-duration(xs:dayTimeDuration(\"P3DT12H32M12S\")) returns 12.

The expression fn:hours-from-duration(xs:dayTimeDuration(\"PT123H\")) returns 3.

The expression fn:hours-from-duration(xs:dayTimeDuration(\"-P3DT10H\")) returns -10.

\n", "summary" : "

Returns the number of hours in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:duration", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "hours-from-time", "qname" : "fn:hours-from-time", "signature" : "($arg as xs:time?) as xs:integer? external", "description" : "

Returns the hours component of an xs:time.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an xs:integer between 0 and 23, both\n inclusive, representing the value of the hours component in the local value of\n $arg.

Assume that the dynamic context provides an implicit timezone value of\n -05:00.

The expression fn:hours-from-time(xs:time(\"11:23:00\")) returns 11.

The expression fn:hours-from-time(xs:time(\"21:23:00\")) returns 21.

The expression fn:hours-from-time(xs:time(\"01:23:00+05:00\")) returns 1.

The expression fn:hours-from-time(fn:adjust-time-to-timezone(xs:time(\"01:23:00+05:00\"),\n xs:dayTimeDuration(\"PT0S\"))) returns 20.

The expression fn:hours-from-time(xs:time(\"24:00:00\")) returns 0.

\n", "summary" : "

Returns the hours component of an xs:time .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:time", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "id", "qname" : "fn:id", "signature" : "($arg as xs:string*) as element(*)* external", "description" : "

Returns the sequence of element nodes that have an ID value\n matching the value of one or more of the IDREF values supplied in\n $arg.

The one-argument form of this function is deterministic, context-dependent, and focus-dependent.

The two-argument form of this function is deterministic, context-independent, and focus-independent.

The function returns a sequence, in document order with duplicates eliminated,\n containing every element node E that satisfies all the following\n conditions:

\n E is in the target document. The target document is the document\n containing $node, or the document containing the context item\n (.) if the second argument is omitted. The behavior of the\n function if $node is omitted is exactly the same as if the context\n item had been passed as $node.

E has an ID value equal to one of the candidate\n IDREF values, where:

An element has an ID value equal to V if either\n or both of the following conditions are true:

The is-id property (See .) of the element node is true, and the typed value\n of the element node is equal to V under the rules of the\n eq operator using the Unicode codepoint collation\n (http://www.w3.org/2005/xpath-functions/collation/codepoint).

The element has an attribute node whose is-id property\n (See .) is true and whose typed\n value is equal to V under the rules of the\n eq operator using the Unicode code point collation\n (http://www.w3.org/2005/xpath-functions/collation/codepoint).

Each xs:string in $arg is parsed as if it were of\n type IDREFS, that is, each xs:string in\n $arg is treated as a whitespace-separated sequence of\n tokens, each acting as an IDREF. These tokens are then included\n in the list of candidate IDREFs. If any of the tokens is not a\n lexically valid IDREF (that is, if it is not lexically an\n xs:NCName), it is ignored. Formally, the candidate\n IDREF values are the strings in the sequence given by the\n expression:

for $s in $arg return\n fn:tokenize(fn:normalize-space($s), ' ')[. castable as xs:IDREF]

If several elements have the same ID value, then E is\n the one that is first in document order.

A dynamic error is raised if\n $node, or the context item if the second argument is absent, is a node\n in a tree whose root is not a document node.

The following errors may be raised when $node is omitted:

\n", "summary" : "

Returns the sequence of element nodes that have an ID value\n matching the value of one or more of the IDREF values supplied in\n $arg .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "element(*)*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "id", "qname" : "fn:id", "signature" : "($arg as xs:string*, $node as node()) as element(*)* external", "description" : "

Returns the sequence of element nodes that have an ID value\n matching the value of one or more of the IDREF values supplied in\n $arg.

The one-argument form of this function is deterministic, context-dependent, and focus-dependent.

The two-argument form of this function is deterministic, context-independent, and focus-independent.

The function returns a sequence, in document order with duplicates eliminated,\n containing every element node E that satisfies all the following\n conditions:

\n E is in the target document. The target document is the document\n containing $node, or the document containing the context item\n (.) if the second argument is omitted. The behavior of the\n function if $node is omitted is exactly the same as if the context\n item had been passed as $node.

E has an ID value equal to one of the candidate\n IDREF values, where:

An element has an ID value equal to V if either\n or both of the following conditions are true:

The is-id property (See .) of the element node is true, and the typed value\n of the element node is equal to V under the rules of the\n eq operator using the Unicode codepoint collation\n (http://www.w3.org/2005/xpath-functions/collation/codepoint).

The element has an attribute node whose is-id property\n (See .) is true and whose typed\n value is equal to V under the rules of the\n eq operator using the Unicode code point collation\n (http://www.w3.org/2005/xpath-functions/collation/codepoint).

Each xs:string in $arg is parsed as if it were of\n type IDREFS, that is, each xs:string in\n $arg is treated as a whitespace-separated sequence of\n tokens, each acting as an IDREF. These tokens are then included\n in the list of candidate IDREFs. If any of the tokens is not a\n lexically valid IDREF (that is, if it is not lexically an\n xs:NCName), it is ignored. Formally, the candidate\n IDREF values are the strings in the sequence given by the\n expression:

for $s in $arg return\n fn:tokenize(fn:normalize-space($s), ' ')[. castable as xs:IDREF]

If several elements have the same ID value, then E is\n the one that is first in document order.

A dynamic error is raised if\n $node, or the context item if the second argument is absent, is a node\n in a tree whose root is not a document node.

The following errors may be raised when $node is omitted:

\n", "summary" : "

Returns the sequence of element nodes that have an ID value\n matching the value of one or more of the IDREF values supplied in\n $arg .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "*", "description" : "" }, { "name" : "node", "type" : "node()", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "element(*)*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "idref", "qname" : "fn:idref", "signature" : "($arg as xs:string*) as node()* external", "description" : "

Returns the sequence of element or attribute nodes with an IDREF\n value matching the value of one or more of the ID values supplied in\n $arg.

The one-argument form of this function is deterministic, context-dependent, and focus-dependent.

The two-argument form of this function is deterministic, context-independent, and focus-independent.

The function returns a sequence, in document order with duplicates eliminated,\n containing every element or attribute node $N that satisfies all the\n following conditions:

$N is in the target document. The target document is the document\n containing $node or the document containing the context item\n (.) if the second argument is omitted. The behavior of the\n function if $node is omitted is exactly the same as if the context\n item had been passed as $node.

$N has an IDREF value equal to one of the candidate\n ID values, where:

A node $N has an IDREF value equal to\n V if both of the following conditions are true:

The is-idrefs property (see ) of $N is true.

The sequence fn:tokenize(fn:normalize-space(fn:string($N)), ' ')\n contains a string that is\n equal to V under the rules of the eq\n operator using the Unicode code point collation\n (http://www.w3.org/2005/xpath-functions/collation/codepoint).

Each xs:string in $arg is parsed as if it were of\n lexically of type xs:ID. These xs:strings are then\n included in the list of candidate xs:IDs. If any of the strings\n in $arg is not a lexically valid xs:ID (that is,\n if it is not lexically an xs:NCName), it is ignored. More\n formally, the candidate ID values are the strings in the\n sequence:

$arg[. castable as xs:NCName]

A dynamic error is raised if\n $node, or the context item if the second argument is omitted, is a node\n in a tree whose root is not a document node.

The following errors may be raised when $node is omitted:

\n", "summary" : "

Returns the sequence of element or attribute nodes with an IDREF \n value matching the value of one or more of the ID values supplied in\n $arg .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "idref", "qname" : "fn:idref", "signature" : "($arg as xs:string*, $node as node()) as node()* external", "description" : "

Returns the sequence of element or attribute nodes with an IDREF\n value matching the value of one or more of the ID values supplied in\n $arg.

The one-argument form of this function is deterministic, context-dependent, and focus-dependent.

The two-argument form of this function is deterministic, context-independent, and focus-independent.

The function returns a sequence, in document order with duplicates eliminated,\n containing every element or attribute node $N that satisfies all the\n following conditions:

$N is in the target document. The target document is the document\n containing $node or the document containing the context item\n (.) if the second argument is omitted. The behavior of the\n function if $node is omitted is exactly the same as if the context\n item had been passed as $node.

$N has an IDREF value equal to one of the candidate\n ID values, where:

A node $N has an IDREF value equal to\n V if both of the following conditions are true:

The is-idrefs property (see ) of $N is true.

The sequence fn:tokenize(fn:normalize-space(fn:string($N)), ' ')\n contains a string that is\n equal to V under the rules of the eq\n operator using the Unicode code point collation\n (http://www.w3.org/2005/xpath-functions/collation/codepoint).

Each xs:string in $arg is parsed as if it were of\n lexically of type xs:ID. These xs:strings are then\n included in the list of candidate xs:IDs. If any of the strings\n in $arg is not a lexically valid xs:ID (that is,\n if it is not lexically an xs:NCName), it is ignored. More\n formally, the candidate ID values are the strings in the\n sequence:

$arg[. castable as xs:NCName]

A dynamic error is raised if\n $node, or the context item if the second argument is omitted, is a node\n in a tree whose root is not a document node.

The following errors may be raised when $node is omitted:

\n", "summary" : "

Returns the sequence of element or attribute nodes with an IDREF \n value matching the value of one or more of the ID values supplied in\n $arg .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "*", "description" : "" }, { "name" : "node", "type" : "node()", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "implicit-timezone", "qname" : "fn:implicit-timezone", "signature" : "() as xs:dayTimeDuration external", "description" : "

Returns the value of the implicit timezone property from the dynamic context.\n

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\timplicit timezone.\n \t

Returns the value of the implicit timezone property from the dynamic context. Components\n of the dynamic context are discussed in .

\n", "summary" : "

Returns the value of the implicit timezone property from the dynamic context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:dayTimeDuration", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "in-scope-prefixes", "qname" : "fn:in-scope-prefixes", "signature" : "($element as element(*)) as xs:string* external", "description" : "

Returns the prefixes of the in-scope namespaces for an element node.

This function is deterministic, context-independent, and focus-independent.

The function returns a sequence of strings representing the prefixes of the in-scope\n namespaces for $element.

For namespace bindings that have a prefix, the function returns the prefix as an\n xs:NCName. For the default namespace, which has no prefix, it returns\n the zero-length string.

The result sequence contains no duplicates.

The ordering of the result sequence is implementation-dependent.

\n", "summary" : "

Returns the prefixes of the in-scope namespaces for an element node.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "element", "type" : "element(*)", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "index-of", "qname" : "fn:index-of", "signature" : "($seq as xs:anyAtomicType*, $search as xs:anyAtomicType) as xs:integer* external", "description" : "

Returns a sequence of positive integers giving the positions within the\n sequence $seq of items that are equal to $search.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and implicit timezone.\n \t

The three-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri, and implicit timezone.\n \t

The function returns a sequence of positive integers giving the positions within the\n sequence $seq of items that are equal to $search.

The collation used by this function is determined according to the rules in . This collation is used when string comparison is\n required.

The items in the sequence $seq are compared with $search under\n the rules for the eq operator. Values of type xs:untypedAtomic\n are compared as if they were of type xs:string. Values that cannot be\n compared, because the eq operator is not defined for their types, are\n considered to be distinct. If an item compares equal, then the position of that item in\n the sequence $seq is included in the result.

The first item in a sequence is at position 1, not position 0.

The result sequence is in ascending numeric order.

If the value of $seq is the empty sequence, or if no item in\n $seq matches $search, then the function returns the empty\n sequence.

No error occurs if non-comparable values are encountered. So when\n comparing two atomic values, the effective boolean value of fn:index-of($a,\n $b) is true if $a and $b are equal, false if they\n are not equal or not comparable.

\n", "summary" : "

Returns a sequence of positive integers giving the positions within the\n sequence $seq of items that are equal to $search .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "" }, { "name" : "search", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "index-of", "qname" : "fn:index-of", "signature" : "($seq as xs:anyAtomicType*, $search as xs:anyAtomicType, $collation as xs:string) as xs:integer* external", "description" : "

Returns a sequence of positive integers giving the positions within the\n sequence $seq of items that are equal to $search.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and implicit timezone.\n \t

The three-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri, and implicit timezone.\n \t

The function returns a sequence of positive integers giving the positions within the\n sequence $seq of items that are equal to $search.

The collation used by this function is determined according to the rules in . This collation is used when string comparison is\n required.

The items in the sequence $seq are compared with $search under\n the rules for the eq operator. Values of type xs:untypedAtomic\n are compared as if they were of type xs:string. Values that cannot be\n compared, because the eq operator is not defined for their types, are\n considered to be distinct. If an item compares equal, then the position of that item in\n the sequence $seq is included in the result.

The first item in a sequence is at position 1, not position 0.

The result sequence is in ascending numeric order.

If the value of $seq is the empty sequence, or if no item in\n $seq matches $search, then the function returns the empty\n sequence.

No error occurs if non-comparable values are encountered. So when\n comparing two atomic values, the effective boolean value of fn:index-of($a,\n $b) is true if $a and $b are equal, false if they\n are not equal or not comparable.

\n", "summary" : "

Returns a sequence of positive integers giving the positions within the\n sequence $seq of items that are equal to $search .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "" }, { "name" : "search", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "" }, { "name" : "collation", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "innermost", "qname" : "fn:innermost", "signature" : "($nodes as node()*) as node()* external", "description" : "

Returns every node within the input sequence that is not an ancestor of another member\n of the input sequence; the nodes are returned in document order with duplicates\n eliminated.

This function is deterministic, context-independent, and focus-independent.

The effect of the function call fn:innermost($nodes) is defined to be\n equivalent to the result of the expression $nodes except\n $nodes/ancestor::node().

That is, the function takes as input a sequence of nodes, and returns every node within\n the sequence that is not an ancestor of another node within the sequence; the nodes are\n returned in document order with duplicates eliminated.

If the source document contains nested sections represented by div\n elements, the expression innermost(//div) returns those div\n elements that do not contain further div elements.

\n", "summary" : "

Returns every node within the input sequence that is not an ancestor of another member\n of the input sequence; the nodes are returned in document order with duplicates\n eliminated.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "insert-before", "qname" : "fn:insert-before", "signature" : "($target as item()*, $position as xs:integer, $inserts as item()*) as item()* external", "description" : "

Returns a sequence constructed by inserting an item or a sequence of items at a\n given position within an existing sequence.

This function is deterministic, context-independent, and focus-independent.

The value returned by the function consists of all items of $target whose\n index is less than $position, followed by all items of\n $inserts, followed by the remaining elements of $target, in\n that order.

For detailed type semantics, see [Formal Semantics].

If $target is the empty sequence, $inserts is returned. If\n $inserts is the empty sequence, $target is returned.

If $position is less than one (1), the first position, the effective value\n of $position is one (1). If $position is greater than the\n number of items in $target, then the effective value of\n $position is equal to the number of items in $target plus\n 1.

The value of $target is not affected by the sequence construction.

\n", "summary" : "

Returns a sequence constructed by inserting an item or a sequence of items at a\n given position within an existing sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "target", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "position", "type" : "xs:integer", "occurrence" : null, "description" : "" }, { "name" : "inserts", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "iri-to-uri", "qname" : "fn:iri-to-uri", "signature" : "($iri as xs:string?) as xs:string external", "description" : "

Converts a string containing an IRI into a URI according to the rules of\n .

This function is deterministic, context-independent, and focus-independent.

If $iri is the empty sequence, the function returns the zero-length\n string.

Otherwise, the function converts the value of $iri into a URI according to\n the rules given in Section 3.1 of by percent-encoding characters\n that are allowed in an IRI but not in a URI. If $iri contains a character\n that is invalid in an IRI, such as the space character (see note below), the invalid\n character is replaced by its percent-encoded form as described in before the conversion is performed.

Since recommends that, for consistency, URI producers and\n normalizers should use uppercase hexadecimal digits for all percent-encodings, this\n function must always generate hexadecimal values using the upper-case letters A-F.

The function is idempotent but not invertible. Both the inputs My Documents\n and My%20Documents will be converted to the output\n My%20Documents.

This function does not check whether $iri is a valid IRI. It treats it as\n an string and operates on the characters in the string.

The following printable ASCII characters are invalid in an IRI: \"<\", \">\", \n \" (double quote), space, \"{\", \"}\", \"|\", \"\\\", \"^\", and \"`\". Since these\n characters should not appear in an IRI, if they do appear in $iri they will\n be percent-encoded. In addition, characters outside the range x20-x7E will be percent-encoded because they are invalid in a URI.

Since this function does not escape the PERCENT SIGN \"%\" and this character is not\n allowed in data within a URI, users wishing to convert character strings (such as file\n names) that include \"%\" to a URI should manually escape \"%\" by replacing it with \"%25\".\n

\n", "summary" : "

Converts a string containing an IRI into a URI according to the rules of\n .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "iri", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "lang", "qname" : "fn:lang", "signature" : "($testlang as xs:string?) as xs:boolean external", "description" : "

This function tests whether the language of $node, or the context\n item if the second argument is omitted, as specified by xml:lang attributes\n is the same as, or is a sublanguage of, the language specified by\n $testlang.

The one-argument form of this function is deterministic, context-dependent, and focus-dependent.

The two-argument form of this function is deterministic, context-independent, and focus-independent.

The behavior of the function if the second argument is omitted is exactly the same as if\n the context item (.) had been passed as the second argument.

The language of the argument $node, or the context item if the second\n argument is omitted, is determined by the value of the xml:lang attribute\n on the node, or, if the node has no such attribute, by the value of the\n xml:lang attribute on the nearest ancestor of the node that has an\n xml:lang attribute. If there is no such ancestor, then the function\n returns false.

If $testlang is the empty sequence it is interpreted as the zero-length\n string.

The relevant xml:lang attribute is determined by the value of the XPath\n expression:

(ancestor-or-self::*/@xml:lang)[last()]

If this expression returns an empty sequence, the function returns false.

Otherwise, the function returns true if and only if, based on a caseless\n default match as specified in section 3.13 of , either:

\n $testlang is equal to the string-value of the relevant\n xml:lang attribute, or

\n $testlang is equal to some substring of the string-value of the\n relevant xml:lang attribute that starts at the start of the\n string-value and ends immediately before a hyphen, \"-\" (the character \"-\" is\n HYPHEN-MINUS, #x002D).

The following errors may be raised when $arg is omitted:

\n", "summary" : "

This function tests whether the language of $node , or the context\n item if the second argument is omitted, as specified by xml:lang attributes\n is the same as, or is a sublanguage of, the language specified by\n $testlang .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "testlang", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "lang", "qname" : "fn:lang", "signature" : "($testlang as xs:string?, $node as node()) as xs:boolean external", "description" : "

This function tests whether the language of $node, or the context\n item if the second argument is omitted, as specified by xml:lang attributes\n is the same as, or is a sublanguage of, the language specified by\n $testlang.

The one-argument form of this function is deterministic, context-dependent, and focus-dependent.

The two-argument form of this function is deterministic, context-independent, and focus-independent.

The behavior of the function if the second argument is omitted is exactly the same as if\n the context item (.) had been passed as the second argument.

The language of the argument $node, or the context item if the second\n argument is omitted, is determined by the value of the xml:lang attribute\n on the node, or, if the node has no such attribute, by the value of the\n xml:lang attribute on the nearest ancestor of the node that has an\n xml:lang attribute. If there is no such ancestor, then the function\n returns false.

If $testlang is the empty sequence it is interpreted as the zero-length\n string.

The relevant xml:lang attribute is determined by the value of the XPath\n expression:

(ancestor-or-self::*/@xml:lang)[last()]

If this expression returns an empty sequence, the function returns false.

Otherwise, the function returns true if and only if, based on a caseless\n default match as specified in section 3.13 of , either:

\n $testlang is equal to the string-value of the relevant\n xml:lang attribute, or

\n $testlang is equal to some substring of the string-value of the\n relevant xml:lang attribute that starts at the start of the\n string-value and ends immediately before a hyphen, \"-\" (the character \"-\" is\n HYPHEN-MINUS, #x002D).

The following errors may be raised when $arg is omitted:

\n", "summary" : "

This function tests whether the language of $node , or the context\n item if the second argument is omitted, as specified by xml:lang attributes\n is the same as, or is a sublanguage of, the language specified by\n $testlang .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "testlang", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "node", "type" : "node()", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "last", "qname" : "fn:last", "signature" : "() as xs:integer external", "description" : "

Returns the context size from the dynamic context.

This function is deterministic, context-dependent, and focus-dependent.

Returns the context size from the dynamic context. (See .)

A dynamic error is raised if the\n context item is absent.

\n", "summary" : "

Returns the context size from the dynamic context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "local-name-from-QName", "qname" : "fn:local-name-from-QName", "signature" : "($arg as xs:QName?) as xs:NCName? external", "description" : "

Returns the local part of the supplied QName.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence the function returns the empty sequence.

Otherwise, the function returns an xs:NCName representing the local part of\n $arg.

The expression fn:local-name-from-QName(fn:QName(\"http://www.example.com/example\",\n \"person\")) returns \"person\".

\n", "summary" : "

Returns the local part of the supplied QName.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:QName", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:NCName?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "local-name", "qname" : "fn:local-name", "signature" : "() as xs:string external", "description" : "

Returns the local part of the name of $arg as an\n xs:string that is either the zero-length string, or has the lexical form\n of an xs:NCName.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the argument is omitted, it defaults to the context item (.). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If the argument is supplied and is the empty sequence, the function returns the\n zero-length string.

If the node identified by $arg has no name (that is, if it is a document\n node, a comment, a text node, or a namespace node having no name), the function returns\n the zero-length string.

Otherwise, the function returns the local part of the expanded-QName of the node\n identified by $arg, as determined by the dm:node-name accessor\n defined in ). This will be an\n xs:string whose lexical form is an xs:NCName.

The following errors may be raised when $arg is omitted:

\n", "summary" : "

Returns the local part of the name of $arg as an\n xs:string that is either the zero-length string, or has the lexical form\n of an xs:NCName .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "local-name", "qname" : "fn:local-name", "signature" : "($arg as node()?) as xs:string external", "description" : "

Returns the local part of the name of $arg as an\n xs:string that is either the zero-length string, or has the lexical form\n of an xs:NCName.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the argument is omitted, it defaults to the context item (.). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If the argument is supplied and is the empty sequence, the function returns the\n zero-length string.

If the node identified by $arg has no name (that is, if it is a document\n node, a comment, a text node, or a namespace node having no name), the function returns\n the zero-length string.

Otherwise, the function returns the local part of the expanded-QName of the node\n identified by $arg, as determined by the dm:node-name accessor\n defined in ). This will be an\n xs:string whose lexical form is an xs:NCName.

The following errors may be raised when $arg is omitted:

\n", "summary" : "

Returns the local part of the name of $arg as an\n xs:string that is either the zero-length string, or has the lexical form\n of an xs:NCName .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "node()", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "lower-case", "qname" : "fn:lower-case", "signature" : "($arg as xs:string?) as xs:string external", "description" : "

Converts a string to lower case.

This function is deterministic, context-independent, and focus-independent.

If the value of $arg is the empty sequence, the zero-length string is\n returned.

Otherwise, the function returns the value of $arg after translating every\n character to its lower-case correspondent as\n defined in the appropriate case mappings section in the Unicode standard . For versions of Unicode beginning with the 2.1.8 update, only\n locale-insensitive case mappings should be applied. Beginning with version 3.2.0 (and\n likely future versions) of Unicode, precise mappings are described in default case\n operations, which are full case mappings in the absence of tailoring for particular\n languages and environments. Every upper-case character that does not have a lower-case\n correspondent, as well as every lower-case character, is included in the returned value\n in its original form.

Case mappings may change the length of a string. In general, the\n fn:upper-case and fn:lower-case functions are not inverses\n of each other: fn:lower-case(fn:upper-case($arg)) is not guaranteed to\n return $arg, nor is fn:upper-case(fn:lower-case($arg)). The\n Latin small letter dotless i (as used in Turkish) is perhaps the most prominent\n lower-case letter which will not round-trip. The Latin capital letter i with dot above\n is the most prominent upper-case letter which will not round trip; there are others,\n such as Latin capital letter Sharp S (#1E9E) which is introduced in Unicode 5.1.

These functions may not always be linguistically appropriate (e.g. Turkish i without\n dot) or appropriate for the application (e.g. titlecase). In cases such as Turkish, a\n simple translation should be used first.

Because the function is not sensitive to locale, results will not always match user\n expectations. In Quebec, for example, the standard uppercase equivalent of \"è\" is \"È\",\n while in metropolitan France it is more commonly \"E\"; only one of these is supported by\n the functions as defined.

Many characters of class Ll lack uppercase equivalents in the Unicode case mapping\n tables; many characters of class Lu lack lowercase equivalents.

\n", "summary" : "

Converts a string to lower case.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "matches", "qname" : "fn:matches", "signature" : "($input as xs:string?, $pattern as xs:string) as xs:boolean external", "description" : "

Returns true if the supplied string matches a given regular expression.

This function is deterministic, context-independent, and focus-independent.

The effect of calling the first version of this function (omitting the argument\n $flags) is the same as the effect of calling the second version with the\n $flags argument set to a zero-length string. Flags are defined in\n .

If $input is the empty sequence, it is interpreted as the zero-length\n string.

The function returns true if $input or some substring of\n $input matches the regular expression supplied as $pattern.\n Otherwise, the function returns false. The matching rules are influenced by\n the value of $flags if present.

A dynamic error is raised if the value of\n $pattern is invalid according to the rules described in .

A dynamic error is raised if the value of\n $flags is invalid according to the rules described in .

\n", "summary" : "

Returns true if the supplied string matches a given regular expression.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "input", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "pattern", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "matches", "qname" : "fn:matches", "signature" : "($input as xs:string?, $pattern as xs:string, $flags as xs:string) as xs:boolean external", "description" : "

Returns true if the supplied string matches a given regular expression.

This function is deterministic, context-independent, and focus-independent.

The effect of calling the first version of this function (omitting the argument\n $flags) is the same as the effect of calling the second version with the\n $flags argument set to a zero-length string. Flags are defined in\n .

If $input is the empty sequence, it is interpreted as the zero-length\n string.

The function returns true if $input or some substring of\n $input matches the regular expression supplied as $pattern.\n Otherwise, the function returns false. The matching rules are influenced by\n the value of $flags if present.

A dynamic error is raised if the value of\n $pattern is invalid according to the rules described in .

A dynamic error is raised if the value of\n $flags is invalid according to the rules described in .

\n", "summary" : "

Returns true if the supplied string matches a given regular expression.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "input", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "pattern", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "flags", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "max", "qname" : "fn:max", "signature" : "($arg as xs:anyAtomicType*) as xs:anyAtomicType? external", "description" : "

Returns a value that is equal to the highest value appearing in the input\n sequence.

The zero-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and implicit timezone.\n \t

The one-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri, and implicit timezone.\n \t

The following rules are applied to the input sequence $arg:

Values of type xs:untypedAtomic in $arg are cast to\n xs:double.

Numeric and xs:anyURI values are converted to\n the least common type reachable by a combination of type promotion and subtype\n substitution. See and .

The items in the resulting sequence may be reordered in an arbitrary order. The\n resulting sequence is referred to below as the converted sequence. The function returns\n an item from the converted sequence rather than the input sequence.

If the converted sequence is empty, the function returns the empty sequence.

All items in the converted sequence must be\n derived from a single base type for which the le operator is\n defined. In addition, the values in the sequence must have a total order. If date/time\n values do not have a timezone, they are considered to have the implicit timezone\n provided by the dynamic context for the purpose of comparison. Duration values must\n either all be xs:yearMonthDuration values or must all be\n xs:dayTimeDuration values.

If the converted sequence contains the value NaN, the value\n NaN is returned.

If the items in the converted sequence are of\n type xs:string or types derived by restriction from xs:string,\n then the determination of the item with the smallest value is made according to the\n collation that is used. If the type of the items in the converted sequence is not xs:string and\n $collation is specified, the collation is ignored.

The collation used by this function is determined according to the rules in .

The function returns the result of the expression:

\n if (every $v in $c satisfies $c[1] ge $v)\n then $c[1]\n else fn:max(fn:subsequence($c, 2))

evaluated with $collation as the default collation if specified, and with\n $c as the converted sequence.

For detailed type semantics, see [Formal Semantics].

A type error is raised if the input sequence contains\n items of incompatible types, as described above.

\n", "summary" : "

Returns a value that is equal to the highest value appearing in the input\n sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "max", "qname" : "fn:max", "signature" : "($arg as xs:anyAtomicType*, $collation as xs:string) as xs:anyAtomicType? external", "description" : "

Returns a value that is equal to the highest value appearing in the input\n sequence.

The zero-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and implicit timezone.\n \t

The one-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri, and implicit timezone.\n \t

The following rules are applied to the input sequence $arg:

Values of type xs:untypedAtomic in $arg are cast to\n xs:double.

Numeric and xs:anyURI values are converted to\n the least common type reachable by a combination of type promotion and subtype\n substitution. See and .

The items in the resulting sequence may be reordered in an arbitrary order. The\n resulting sequence is referred to below as the converted sequence. The function returns\n an item from the converted sequence rather than the input sequence.

If the converted sequence is empty, the function returns the empty sequence.

All items in the converted sequence must be\n derived from a single base type for which the le operator is\n defined. In addition, the values in the sequence must have a total order. If date/time\n values do not have a timezone, they are considered to have the implicit timezone\n provided by the dynamic context for the purpose of comparison. Duration values must\n either all be xs:yearMonthDuration values or must all be\n xs:dayTimeDuration values.

If the converted sequence contains the value NaN, the value\n NaN is returned.

If the items in the converted sequence are of\n type xs:string or types derived by restriction from xs:string,\n then the determination of the item with the smallest value is made according to the\n collation that is used. If the type of the items in the converted sequence is not xs:string and\n $collation is specified, the collation is ignored.

The collation used by this function is determined according to the rules in .

The function returns the result of the expression:

\n if (every $v in $c satisfies $c[1] ge $v)\n then $c[1]\n else fn:max(fn:subsequence($c, 2))

evaluated with $collation as the default collation if specified, and with\n $c as the converted sequence.

For detailed type semantics, see [Formal Semantics].

A type error is raised if the input sequence contains\n items of incompatible types, as described above.

\n", "summary" : "

Returns a value that is equal to the highest value appearing in the input\n sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "" }, { "name" : "collation", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "min", "qname" : "fn:min", "signature" : "($arg as xs:anyAtomicType*) as xs:anyAtomicType? external", "description" : "

Returns a value that is equal to the lowest value appearing in the input\n sequence.

The zero-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and implicit timezone.\n \t

The one-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri, and implicit timezone.\n \t

The following rules are applied to the input sequence:

Values of type xs:untypedAtomic in $arg are cast to\n xs:double.

Numeric and xs:anyURI values are converted to\n the least common type reachable by a combination of type promotion and subtype\n substitution. See and .

The items in the resulting sequence may be reordered in an arbitrary order. The\n resulting sequence is referred to below as the converted sequence. The function returns\n an item from the converted sequence rather than the input sequence.

If the converted sequence is empty, the empty sequence is returned.

All items in the converted sequence must be\n derived from a single base type for which the le operator is\n defined. In addition, the values in the sequence must have a total order. If date/time\n values do not have a timezone, they are considered to have the implicit timezone\n provided by the dynamic context for the purpose of comparison. Duration values must\n either all be xs:yearMonthDuration values or must all be\n xs:dayTimeDuration values.

If the converted sequence contains the value NaN, the value\n NaN is returned.

If the items in the converted sequence are of\n type xs:string or types derived by restriction from xs:string,\n then the determination of the item with the smallest value is made according to the\n collation that is used. If the type of the items in the converted sequence is not xs:string and\n $collation is specified, the collation is ignored.

The collation used by this function is determined according to the rules in .

The function returns the result of the expression:

\n if (every $v in $c satisfies $c[1] le $v)\n then $c[1]\n else fn:min(fn:subsequence($c, 2))

evaluated with $collation as the default collation if specified, and with\n $c as the converted sequence.

For detailed type semantics, see [Formal Semantics].

A type error is raised if the input sequence contains\n items of incompatible types, as described above.

\n", "summary" : "

Returns a value that is equal to the lowest value appearing in the input\n sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "min", "qname" : "fn:min", "signature" : "($arg as xs:anyAtomicType*, $collation as xs:string) as xs:anyAtomicType? external", "description" : "

Returns a value that is equal to the lowest value appearing in the input\n sequence.

The zero-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and implicit timezone.\n \t

The one-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri, and implicit timezone.\n \t

The following rules are applied to the input sequence:

Values of type xs:untypedAtomic in $arg are cast to\n xs:double.

Numeric and xs:anyURI values are converted to\n the least common type reachable by a combination of type promotion and subtype\n substitution. See and .

The items in the resulting sequence may be reordered in an arbitrary order. The\n resulting sequence is referred to below as the converted sequence. The function returns\n an item from the converted sequence rather than the input sequence.

If the converted sequence is empty, the empty sequence is returned.

All items in the converted sequence must be\n derived from a single base type for which the le operator is\n defined. In addition, the values in the sequence must have a total order. If date/time\n values do not have a timezone, they are considered to have the implicit timezone\n provided by the dynamic context for the purpose of comparison. Duration values must\n either all be xs:yearMonthDuration values or must all be\n xs:dayTimeDuration values.

If the converted sequence contains the value NaN, the value\n NaN is returned.

If the items in the converted sequence are of\n type xs:string or types derived by restriction from xs:string,\n then the determination of the item with the smallest value is made according to the\n collation that is used. If the type of the items in the converted sequence is not xs:string and\n $collation is specified, the collation is ignored.

The collation used by this function is determined according to the rules in .

The function returns the result of the expression:

\n if (every $v in $c satisfies $c[1] le $v)\n then $c[1]\n else fn:min(fn:subsequence($c, 2))

evaluated with $collation as the default collation if specified, and with\n $c as the converted sequence.

For detailed type semantics, see [Formal Semantics].

A type error is raised if the input sequence contains\n items of incompatible types, as described above.

\n", "summary" : "

Returns a value that is equal to the lowest value appearing in the input\n sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "" }, { "name" : "collation", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "minutes-from-dateTime", "qname" : "fn:minutes-from-dateTime", "signature" : "($arg as xs:dateTime?) as xs:integer? external", "description" : "

Returns the minute component of an xs:dateTime.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an xs:integer value between 0 and 59, both\n inclusive, representing the minute component in the local value of\n $arg.

The expression fn:minutes-from-dateTime(xs:dateTime(\"1999-05-31T13:20:00-05:00\")) returns 20.

The expression fn:minutes-from-dateTime(xs:dateTime(\"1999-05-31T13:30:00+05:30\")) returns 30.

\n", "summary" : "

Returns the minute component of an xs:dateTime .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:dateTime", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "minutes-from-duration", "qname" : "fn:minutes-from-duration", "signature" : "($arg as xs:duration?) as xs:integer? external", "description" : "

Returns the number of minutes in a duration.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an xs:integer representing the minutes\n component in the value of $arg. The result is obtained by casting\n $arg to an xs:dayTimeDuration (see ) and then computing the minutes component as described\n in .

If $arg is a negative duration then the result will be negative..

If $arg is an xs:yearMonthDuration the function returns 0.

The expression fn:minutes-from-duration(xs:dayTimeDuration(\"P3DT10H\")) returns 0.

The expression fn:minutes-from-duration(xs:dayTimeDuration(\"-P5DT12H30M\")) returns -30.

\n", "summary" : "

Returns the number of minutes in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:duration", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "minutes-from-time", "qname" : "fn:minutes-from-time", "signature" : "($arg as xs:time?) as xs:integer? external", "description" : "

Returns the minutes component of an xs:time.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an xs:integer value between 0 and 59, both\n inclusive, representing the value of the minutes component in the local value of\n $arg.

The expression fn:minutes-from-time(xs:time(\"13:00:00Z\")) returns 0.

\n", "summary" : "

Returns the minutes component of an xs:time .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:time", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "month-from-date", "qname" : "fn:month-from-date", "signature" : "($arg as xs:date?) as xs:integer? external", "description" : "

Returns the month component of an xs:date.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an xs:integer between 1 and 12, both\n inclusive, representing the month component in the local value of $arg.\n

The expression fn:month-from-date(xs:date(\"1999-05-31-05:00\")) returns 5.

The expression fn:month-from-date(xs:date(\"2000-01-01+05:00\")) returns 1.

\n", "summary" : "

Returns the month component of an xs:date .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:date", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "months-from-duration", "qname" : "fn:months-from-duration", "signature" : "($arg as xs:duration?) as xs:integer? external", "description" : "

Returns the number of months in a duration.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an xs:integer representing the months\n component in the value of $arg. The result is obtained by casting\n $arg to an xs:yearMonthDuration (see ) and then computing the months component as described in\n .

If $arg is a negative duration then the result will be negative..

If $arg is an xs:dayTimeDuration the function returns 0.

The expression fn:months-from-duration(xs:yearMonthDuration(\"P20Y15M\")) returns 3.

The expression fn:months-from-duration(xs:yearMonthDuration(\"-P20Y18M\")) returns -6.

The expression fn:months-from-duration(xs:dayTimeDuration(\"-P2DT15H0M0S\")) returns 0.

\n", "summary" : "

Returns the number of months in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:duration", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "name", "qname" : "fn:name", "signature" : "() as xs:string external", "description" : "

Returns the name of a node, as an xs:string that is either the\n zero-length string, or has the lexical form of an xs:QName.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the argument is omitted, it defaults to the context item (.). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If the argument is supplied and is the empty sequence, the function returns the\n zero-length string.

If the node identified by $arg has no name (that is, if it is a document\n node, a comment, a text node, or a namespace node having no name), the function returns\n the zero-length string.

Otherwise, the function returns the value of the expression\n fn:string(fn:node-name($arg)).

The following errors may be raised when $arg is omitted:

\n", "summary" : "

Returns the name of a node, as an xs:string that is either the\n zero-length string, or has the lexical form of an xs:QName .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "name", "qname" : "fn:name", "signature" : "($arg as node()?) as xs:string external", "description" : "

Returns the name of a node, as an xs:string that is either the\n zero-length string, or has the lexical form of an xs:QName.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the argument is omitted, it defaults to the context item (.). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If the argument is supplied and is the empty sequence, the function returns the\n zero-length string.

If the node identified by $arg has no name (that is, if it is a document\n node, a comment, a text node, or a namespace node having no name), the function returns\n the zero-length string.

Otherwise, the function returns the value of the expression\n fn:string(fn:node-name($arg)).

The following errors may be raised when $arg is omitted:

\n", "summary" : "

Returns the name of a node, as an xs:string that is either the\n zero-length string, or has the lexical form of an xs:QName .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "node()", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "namespace-uri-for-prefix", "qname" : "fn:namespace-uri-for-prefix", "signature" : "($prefix as xs:string?, $element as element(*)) as xs:anyURI? external", "description" : "

Returns the namespace URI of one of the in-scope namespaces for\n $element, identified by its namespace prefix.

This function is deterministic, context-independent, and focus-independent.

If $element has an in-scope namespace whose namespace prefix is equal to\n $prefix, the function returns the namespace URI of that namespace.

If $element has no in-scope namespace whose namespace prefix is equal to\n $prefix, the function returns the empty sequence.

If $prefix is the zero-length string or the empty\n sequence, then if $element has a default namespace (that is, a namespace\n node with no name), the function returns the namespace URI of the default namespace. If\n $element has no default namespace, the function returns the empty\n sequence.

Prefixes are equal only if their Unicode codepoints match exactly.

let $e := \n <z:a xmlns=\"http://example.org/one\" xmlns:z=\"http://example.org/two\">\n <b xmlns=\"\"/>\n </z:a>

The expression fn:namespace-uri-for-prefix(\"z\", $e) returns \"http://example.org/two\".

The expression fn:namespace-uri-for-prefix(\"\", $e) returns \"http://example.org/one\".

The expression fn:namespace-uri-for-prefix((), $e) returns \"http://example.org/one\".

The expression fn:namespace-uri-for-prefix(\"xml\", $e) returns \"http://www.w3.org/XML/1998/namespace\".

The expression fn:namespace-uri-for-prefix(\"xml\", $e) returns \"http://www.w3.org/XML/1998/namespace\".

\n", "summary" : "

Returns the namespace URI of one of the in-scope namespaces for\n $element , identified by its namespace prefix.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "prefix", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "element", "type" : "element(*)", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyURI?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "namespace-uri-from-QName", "qname" : "fn:namespace-uri-from-QName", "signature" : "($arg as xs:QName?) as xs:anyURI? external", "description" : "

Returns the namespace URI part of the supplied QName.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence the function returns the empty sequence.

Otherwise, the function returns an xs:anyURI representing the namespace URI\n part of $arg.

If $arg is in no namespace, the function returns the zero-length\n xs:anyURI.

The expression fn:namespace-uri-from-QName(fn:QName(\"http://www.example.com/example\",\n \"person\")) returns xs:anyURI(\"http://www.example.com/example\").

\n", "summary" : "

Returns the namespace URI part of the supplied QName.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:QName", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:anyURI?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "namespace-uri", "qname" : "fn:namespace-uri", "signature" : "() as xs:anyURI external", "description" : "

Returns the namespace URI part of the name of\n $arg, as an xs:anyURI value.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the argument is omitted, it defaults to the context node (.). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If the node identified by $arg is neither an element nor an attribute node,\n or if it is an element or attribute node whose expanded-QName (as determined by the\n dm:node-name accessor in the )\n is in no namespace, then the function returns the zero-length xs:anyURI\n value.

Otherwise, the result will be the namespace URI part of the expanded-QName of the node\n identified by $arg, as determined by the dm:node-name accessor\n defined in ), returned as an\n xs:anyURI value.

The following errors may be raised when $arg is omitted:

\n", "summary" : "

Returns the namespace URI part of the name of\n $arg , as an xs:anyURI value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:anyURI", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "namespace-uri", "qname" : "fn:namespace-uri", "signature" : "($arg as node()?) as xs:anyURI external", "description" : "

Returns the namespace URI part of the name of\n $arg, as an xs:anyURI value.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the argument is omitted, it defaults to the context node (.). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If the node identified by $arg is neither an element nor an attribute node,\n or if it is an element or attribute node whose expanded-QName (as determined by the\n dm:node-name accessor in the )\n is in no namespace, then the function returns the zero-length xs:anyURI\n value.

Otherwise, the result will be the namespace URI part of the expanded-QName of the node\n identified by $arg, as determined by the dm:node-name accessor\n defined in ), returned as an\n xs:anyURI value.

The following errors may be raised when $arg is omitted:

\n", "summary" : "

Returns the namespace URI part of the name of\n $arg , as an xs:anyURI value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "node()", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:anyURI", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "nilled", "qname" : "fn:nilled", "signature" : "() as xs:boolean external", "description" : "

Returns true for an element that is nilled.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the argument is omitted, it defaults to the context item (.). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise the function returns the result of the dm:nilled accessor as\n defined in (see ).

The following errors may be raised when $arg is omitted:

\n", "summary" : "

Returns true for an element that is nilled .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "nilled", "qname" : "fn:nilled", "signature" : "($arg as node()?) as xs:boolean? external", "description" : "

Returns true for an element that is nilled.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the argument is omitted, it defaults to the context item (.). The\n behavior of the function if the argument is omitted is exactly the same as if the\n context item had been passed as the argument.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise the function returns the result of the dm:nilled accessor as\n defined in (see ).

The following errors may be raised when $arg is omitted:

\n", "summary" : "

Returns true for an element that is nilled .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "node()", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:boolean?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "node-name", "qname" : "fn:node-name", "signature" : "() as xs:QName? external", "description" : "

Returns the name of a node, as an xs:QName.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the argument is omitted, it defaults to the context item\n (.). The behavior of the function if the argument is omitted is exactly\n the same as if the context item had been passed as the argument.

If $arg is the empty sequence, the empty sequence is returned.

Otherwise, the function returns the result of the dm:node-name accessor as\n defined in (see ).

The following errors may be raised when $arg is omitted:

\n", "summary" : "

Returns the name of a node, as an xs:QName .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:QName?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "node-name", "qname" : "fn:node-name", "signature" : "($arg as node()?) as xs:QName? external", "description" : "

Returns the name of a node, as an xs:QName.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the argument is omitted, it defaults to the context item\n (.). The behavior of the function if the argument is omitted is exactly\n the same as if the context item had been passed as the argument.

If $arg is the empty sequence, the empty sequence is returned.

Otherwise, the function returns the result of the dm:node-name accessor as\n defined in (see ).

The following errors may be raised when $arg is omitted:

\n", "summary" : "

Returns the name of a node, as an xs:QName .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "node()", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:QName?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "normalize-space", "qname" : "fn:normalize-space", "signature" : "() as xs:string external", "description" : "

Returns the value of $arg with leading and trailing whitespace\n removed, and sequences of internal whitespace reduced to a single space character.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the value of $arg is the empty sequence, the function returns the\n zero-length string.

The function returns a string constructed by stripping leading and trailing whitespace\n from the value of $arg, and replacing sequences of one or more adjacent\n whitespace characters with a single space, #x20.

The whitespace characters are defined in the metasymbol S (Production 3) of .

If no argument is supplied, then $arg defaults to the\n string value (calculated using fn:string) of the context item\n (.).

If no argument is supplied and the context item is absent then a dynamic error is raised: .

\n", "summary" : "

Returns the value of $arg with leading and trailing whitespace\n removed, and sequences of internal whitespace reduced to a single space character.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "normalize-space", "qname" : "fn:normalize-space", "signature" : "($arg as xs:string?) as xs:string external", "description" : "

Returns the value of $arg with leading and trailing whitespace\n removed, and sequences of internal whitespace reduced to a single space character.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the value of $arg is the empty sequence, the function returns the\n zero-length string.

The function returns a string constructed by stripping leading and trailing whitespace\n from the value of $arg, and replacing sequences of one or more adjacent\n whitespace characters with a single space, #x20.

The whitespace characters are defined in the metasymbol S (Production 3) of .

If no argument is supplied, then $arg defaults to the\n string value (calculated using fn:string) of the context item\n (.).

If no argument is supplied and the context item is absent then a dynamic error is raised: .

\n", "summary" : "

Returns the value of $arg with leading and trailing whitespace\n removed, and sequences of internal whitespace reduced to a single space character.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "normalize-unicode", "qname" : "fn:normalize-unicode", "signature" : "($arg as xs:string?) as xs:string external", "description" : "

Returns the value of $arg after applying Unicode\n normalization.

This function is deterministic, context-independent, and focus-independent.

If the value of $arg is the empty sequence, the function returns the\n zero-length string.

If the single-argument version of the function is used, the result is the same as\n calling the two-argument version with $normalizationForm set to the string\n \"NFC\".

Otherwise, the function returns the value of $arg normalized according to\n the rules of the normalization form identified by the value of\n $normalizationForm.

The effective value of $normalizationForm is the value of the expression\n fn:upper-case(fn:normalize-space($normalizationForm)).

See for a description of the\n normalization forms.

If the effective value of $normalizationForm is NFC,\n then the function returns the value of $arg converted to Unicode\n Normalization Form C (NFC).

If the effective value of $normalizationForm is NFD,\n then the function returns the value of $arg converted to Unicode\n Normalization Form D (NFD).

If the effective value of $normalizationForm is NFKC,\n then the function returns the value of $arg in Unicode Normalization\n Form KC (NFKC).

If the effective value of $normalizationForm is NFKD,\n then the function returns the value of $arg converted to Unicode\n Normalization Form KD (NFKD).

If the effective value of $normalizationForm is\n FULLY-NORMALIZED, then the function returns the value of\n $arg converted to fully normalized form.

If the effective value of $normalizationForm is the zero-length\n string, no normalization is performed and $arg is returned.

Normalization forms NFC, NFD, NFKC, and NFKD, and the algorithms to be\n used for converting a string to each of these forms, are defined in .

The motivation for normalization form FULLY-NORMALIZED is explained in\n . However, as that specification did not\n progress beyond working draft status, the normative specification is as follows:

A string is fully-normalized if (a) it is in normalization form NFC\n as defined in , and (b) it does not start\n with a composing character.

A composing character is a character that is one or both of the following:

the second character in the canonical decomposition mapping of some\n character that is not listed in the Composition Exclusion Table defined in\n ;

of non-zero canonical combining class (as defined in ).

A string is converted to FULLY-NORMALIZED form as follows:

if the first character in the string is a composing character, prepend a\n single space (x20);

convert the resulting string to normalization form NFC.

Conforming implementations must support normalization form \"NFC\" and\n may support normalization forms \"NFD\", \"NFKC\", \"NFKD\", and\n \"FULLY-NORMALIZED\". They may also support other normalization forms\n with implementation-defined semantics.

It is implementation-defined which version of\n Unicode (and therefore, of the normalization algorithms and their underlying\n data) is supported by the implementation. See for details of the\n stability policy regarding changes to the normalization rules in future\n versions of Unicode. If the input string contains codepoints that are\n unassigned in the relevant version of Unicode, or for which no normalization\n rules are defined, the fn:normalize-unicode function leaves such codepoints\n unchanged. If the implementation supports the requested normalization form then\n it must be able to handle every input string without raising an error.

A dynamic error is raised if the effective value of the\n $normalizationForm argument is not one of the values supported by the\n implementation.

\n", "summary" : "

Returns the value of $arg after applying Unicode\n normalization.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "normalize-unicode", "qname" : "fn:normalize-unicode", "signature" : "($arg as xs:string?, $normalizationForm as xs:string) as xs:string external", "description" : "

Returns the value of $arg after applying Unicode\n normalization.

This function is deterministic, context-independent, and focus-independent.

If the value of $arg is the empty sequence, the function returns the\n zero-length string.

If the single-argument version of the function is used, the result is the same as\n calling the two-argument version with $normalizationForm set to the string\n \"NFC\".

Otherwise, the function returns the value of $arg normalized according to\n the rules of the normalization form identified by the value of\n $normalizationForm.

The effective value of $normalizationForm is the value of the expression\n fn:upper-case(fn:normalize-space($normalizationForm)).

See for a description of the\n normalization forms.

If the effective value of $normalizationForm is NFC,\n then the function returns the value of $arg converted to Unicode\n Normalization Form C (NFC).

If the effective value of $normalizationForm is NFD,\n then the function returns the value of $arg converted to Unicode\n Normalization Form D (NFD).

If the effective value of $normalizationForm is NFKC,\n then the function returns the value of $arg in Unicode Normalization\n Form KC (NFKC).

If the effective value of $normalizationForm is NFKD,\n then the function returns the value of $arg converted to Unicode\n Normalization Form KD (NFKD).

If the effective value of $normalizationForm is\n FULLY-NORMALIZED, then the function returns the value of\n $arg converted to fully normalized form.

If the effective value of $normalizationForm is the zero-length\n string, no normalization is performed and $arg is returned.

Normalization forms NFC, NFD, NFKC, and NFKD, and the algorithms to be\n used for converting a string to each of these forms, are defined in .

The motivation for normalization form FULLY-NORMALIZED is explained in\n . However, as that specification did not\n progress beyond working draft status, the normative specification is as follows:

A string is fully-normalized if (a) it is in normalization form NFC\n as defined in , and (b) it does not start\n with a composing character.

A composing character is a character that is one or both of the following:

the second character in the canonical decomposition mapping of some\n character that is not listed in the Composition Exclusion Table defined in\n ;

of non-zero canonical combining class (as defined in ).

A string is converted to FULLY-NORMALIZED form as follows:

if the first character in the string is a composing character, prepend a\n single space (x20);

convert the resulting string to normalization form NFC.

Conforming implementations must support normalization form \"NFC\" and\n may support normalization forms \"NFD\", \"NFKC\", \"NFKD\", and\n \"FULLY-NORMALIZED\". They may also support other normalization forms\n with implementation-defined semantics.

It is implementation-defined which version of\n Unicode (and therefore, of the normalization algorithms and their underlying\n data) is supported by the implementation. See for details of the\n stability policy regarding changes to the normalization rules in future\n versions of Unicode. If the input string contains codepoints that are\n unassigned in the relevant version of Unicode, or for which no normalization\n rules are defined, the fn:normalize-unicode function leaves such codepoints\n unchanged. If the implementation supports the requested normalization form then\n it must be able to handle every input string without raising an error.

A dynamic error is raised if the effective value of the\n $normalizationForm argument is not one of the values supported by the\n implementation.

\n", "summary" : "

Returns the value of $arg after applying Unicode\n normalization.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "normalizationForm", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "not", "qname" : "fn:not", "signature" : "($arg as item()*) as xs:boolean external", "description" : "

Returns true if the effective boolean value of $arg\n is false, or false if it is true.

This function is deterministic, context-independent, and focus-independent.

The value of $arg is first reduced to an effective boolean value by\n applying the fn:boolean() function. The function returns true\n if the effective boolean value is false, or false if the\n effective boolean value is true.

The expression fn:not(fn:true()) returns false().

The expression fn:not(\"false\") returns false().

\n", "summary" : "

Returns true if the effective boolean value of $arg \n is false , or false if it is true .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "number", "qname" : "fn:number", "signature" : "() as xs:double external", "description" : "

Returns the value indicated by $arg or, if $arg is\n not specified, the context item after atomization, converted to an\n xs:double.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

Calling the zero-argument version of the function is defined to give the same result as\n calling the single-argument version with the context item (.). That is,\n fn:number() is equivalent to fn:number(.), as\n defined by the rules that follow.

If $arg is the empty sequence or if $arg or the context item\n cannot be converted to an xs:double, the xs:double value\n NaN is returned.

Otherwise, $arg , or the context item after atomization, is converted to an\n xs:double following the rules of . If\n the conversion to xs:double fails, the xs:double value\n NaN is returned.

A dynamic error is raised if\n $arg is omitted and the context item is absent.

As a consequence of the rules given above, a type error occurs if the context\n item cannot be atomized, or if the result of atomizing the context item is a sequence containing\n more than one atomic value.

\n", "summary" : "

Returns the value indicated by $arg or, if $arg is\n not specified, the context item after atomization, converted to an\n xs:double .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:double", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "number", "qname" : "fn:number", "signature" : "($arg as xs:anyAtomicType?) as xs:double external", "description" : "

Returns the value indicated by $arg or, if $arg is\n not specified, the context item after atomization, converted to an\n xs:double.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

Calling the zero-argument version of the function is defined to give the same result as\n calling the single-argument version with the context item (.). That is,\n fn:number() is equivalent to fn:number(.), as\n defined by the rules that follow.

If $arg is the empty sequence or if $arg or the context item\n cannot be converted to an xs:double, the xs:double value\n NaN is returned.

Otherwise, $arg , or the context item after atomization, is converted to an\n xs:double following the rules of . If\n the conversion to xs:double fails, the xs:double value\n NaN is returned.

A dynamic error is raised if\n $arg is omitted and the context item is absent.

As a consequence of the rules given above, a type error occurs if the context\n item cannot be atomized, or if the result of atomizing the context item is a sequence containing\n more than one atomic value.

\n", "summary" : "

Returns the value indicated by $arg or, if $arg is\n not specified, the context item after atomization, converted to an\n xs:double .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:double", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "one-or-more", "qname" : "fn:one-or-more", "signature" : "($arg as item()*) as item()+ external", "description" : "

Returns $arg if it contains one or more items. Otherwise, raises\n an error.

This function is deterministic, context-independent, and focus-independent.

Except in error cases, the function returns $arg unchanged.

For detailed type semantics, see [Formal Semantics].

A dynamic error is raised if $arg is an empty\n sequence.

\n", "summary" : "

Returns $arg if it contains one or more items.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "item()+", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "outermost", "qname" : "fn:outermost", "signature" : "($nodes as node()*) as node()* external", "description" : "

Returns every node within the input sequence that has no ancestor that is itself a\n member of the input sequence; the nodes are returned in document order with duplicates\n eliminated.

This function is deterministic, context-independent, and focus-independent.

The effect of the function call fn:outermost($nodes) is defined to be\n equivalent to the result of the expression $nodes[not(ancestor::node() intersect\n $nodes)]/..

That is, the function takes as input a sequence of nodes, and returns every node within\n the sequence that does not have another node within the sequence as an ancestor; the nodes are\n returned in document order with duplicates eliminated.

The formulation $nodes except $nodes/descendant::node() might appear to be\n simpler, but does not correctly account for attribute nodes, as these are not\n descendants of their parent element.

The motivation for the function was based on XSLT streaming use cases. There are cases\n where the streaming rules allow the construct\n outermost(//section) but do not allow //section; the\n function can therefore be useful in cases where it is known that sections will not be\n nested, as well as cases where the application actually wishes to process all sections\n except those that are nested within another.

\n", "summary" : "

Returns every node within the input sequence that has no ancestor that is itself a\n member of the input sequence; the nodes are returned in document order with duplicates\n eliminated.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "parse-xml-fragment", "qname" : "fn:parse-xml-fragment", "signature" : "($arg as xs:string?) as document(element(*,xs:untyped)) external", "description" : "

This function takes as input an XML external entity represented as a string,\n and returns the document node at the root of an XDM tree representing the parsed\n document fragment.

This function is nondeterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

If $arg is the empty sequence, the function returns the empty sequence.

The input must be a namespace-well-formed external general parsed entity. More specifically,\n it must be a string conforming to the production rule extParsedEnt in , it must contain no entity references other\n than references to predefined entities,\n and it must satisfy all the rules\n of for namespace-well-formed documents with the exception\n that the rule requiring it to be a well-formed document is replaced by the rule requiring\n it to be a well-formed external general parsed entity.

The string is parsed to form a sequence of nodes which\n become children of the new document node, in the same way as the content of any element\n is converted into a sequence of children for the resulting element node.

Schema validation is not invoked, which means that the nodes in the\n returned document will all be untyped.

The precise process used to construct the XDM instance is . In\n particular, it is implementation-defined whether an XML 1.0 or XML 1.1 parser is\n used.

The Static Base URI from the static context of the fn:parse-xml-fragment function call\n is used as the base URI of the document node\n that is returned.

The document URI of the returned node is absent.

The function is not\n deterministic: that is, if the function is called\n twice with the same arguments, it is implementation-dependent whether the same node is returned on both\n occasions.

A dynamic error is raised if the content of\n $arg is not a well-formed external general parsed entity,\n if it contains entity references other than references to predefined entities, or if a document that\n incorporates this well-formed parsed entity would not be namespace-well-formed.

\n", "summary" : "

This function takes as input an XML external entity represented as a string,\n and returns the document node at the root of an XDM tree representing the parsed\n document fragment.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "document(element(*,xs:untyped))", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "parse-xml", "qname" : "fn:parse-xml", "signature" : "($arg as xs:string?) as document(element(*,xs:untyped)) external", "description" : "

This function takes as input an XML document represented as a string, and\n returns the document node at the root of an XDM tree representing the parsed\n document.

This function is nondeterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

If $arg is the empty sequence, the function returns the\n empty sequence.

The precise process used to construct the XDM instance is . In\n particular, it is implementation-defined whether DTD and/or schema validation is invoked, and it is\n implementation-defined whether an XML 1.0 or XML 1.1 parser is used.

The Static Base URI property from the static context of the\n fn:parse-xml function call is used both as the base URI used by the XML parser to resolve\n relative entity references within the document, and as the base URI of the document node\n that is returned.

The document URI of the returned node is absent.

The function is not\n deterministic: that is, if the function is called\n twice with the same arguments, it is implementation-dependent whether the same node is returned on both\n occasions.

A dynamic error is raised if the content of\n $arg is not a well-formed and namespace-well-formed XML document.

A dynamic error is raised if DTD-based\n validation is carried out and the content of $arg is not valid against its\n DTD.

\n", "summary" : "

This function takes as input an XML document represented as a string, and\n returns the document node at the root of an XDM tree representing the parsed\n document.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "document(element(*,xs:untyped))", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "parse-xml", "qname" : "fn:parse-xml", "signature" : "($arg as xs:string?, $baseURI as xs:string) as document(element(*,xs:untyped)) external", "description" : "

This function takes as input an XML document represented as a string, and\n returns the document node at the root of an XDM tree representing the parsed\n document.

This function is nondeterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

If $arg is the empty sequence, the function returns the\n empty sequence.

The precise process used to construct the XDM instance is . In\n particular, it is implementation-defined whether DTD and/or schema validation is invoked, and it is\n implementation-defined whether an XML 1.0 or XML 1.1 parser is used.

The Static Base URI property from the static context of the\n fn:parse-xml function call is used both as the base URI used by the XML parser to resolve\n relative entity references within the document, and as the base URI of the document node\n that is returned.

The document URI of the returned node is absent.

The function is not\n deterministic: that is, if the function is called\n twice with the same arguments, it is implementation-dependent whether the same node is returned on both\n occasions.

A dynamic error is raised if the content of\n $arg is not a well-formed and namespace-well-formed XML document.

A dynamic error is raised if DTD-based\n validation is carried out and the content of $arg is not valid against its\n DTD.

\n", "summary" : "

This function takes as input an XML document represented as a string, and\n returns the document node at the root of an XDM tree representing the parsed\n document.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "baseURI", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "document(element(*,xs:untyped))", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "position", "qname" : "fn:position", "signature" : "() as xs:integer external", "description" : "

Returns the context position from the dynamic context.

This function is deterministic, context-dependent, and focus-dependent.

Returns the context position from the dynamic context. (See .)

A dynamic error is raised if the\n context item is absent.

\n", "summary" : "

Returns the context position from the dynamic context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "prefix-from-QName", "qname" : "fn:prefix-from-QName", "signature" : "($arg as xs:QName?) as xs:NCName? external", "description" : "

Returns the prefix component of the supplied QName.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence the function returns the empty sequence.

If $arg has no prefix component the function returns the empty\n sequence.

Otherwise, the function returns an xs:NCName representing the prefix\n component of $arg.

\n", "summary" : "

Returns the prefix component of the supplied QName.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:QName", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:NCName?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "remove", "qname" : "fn:remove", "signature" : "($target as item()*, $position as xs:integer) as item()* external", "description" : "

Returns a new sequence containing all the items of $target except\n the item at position $position.

This function is deterministic, context-independent, and focus-independent.

The function returns a sequence consisting of all items of $target whose\n index is less than $position, followed by all items of $target\n whose index is greater than $position.

For detailed type semantics, see [Formal Semantics].

If $position is less than 1 or greater than the number of items in\n $target, $target is returned.

If $target is the empty sequence, the empty sequence is returned.

\n", "summary" : "

Returns a new sequence containing all the items of $target except\n the item at position $position .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "target", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "position", "type" : "xs:integer", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "replace", "qname" : "fn:replace", "signature" : "($input as xs:string?, $pattern as xs:string, $replacement as xs:string) as xs:string external", "description" : "

Returns a string produced from the input string by replacing any substrings\n that match a given regular expression with a supplied replacement string.

This function is deterministic, context-independent, and focus-independent.

The effect of calling the first version of this function (omitting the argument\n $flags) is the same as the effect of calling the second version with the\n $flags argument set to a zero-length string. Flags are defined in\n .

The $flags argument is interpreted in the same manner as for the\n fn:matches function.

If $input is the empty sequence, it is interpreted as the zero-length\n string.

The function returns the xs:string that is obtained by replacing each\n non-overlapping substring of $input that matches the given\n $pattern with an occurrence of the $replacement string.

If two overlapping substrings of $input both match the\n $pattern, then only the first one (that is, the one whose first character comes first in the $input string) is\n replaced.

If the q flag is present, the replacement string is used\n as is.

Otherwise, within the $replacement\n string, a variable $N may be used to refer to the substring captured by the\n Nth parenthesized sub-expression in the regular expression. For each match of the\n pattern, these variables are assigned the value of the content matched by the relevant\n sub-expression, and the modified replacement string is then substituted for the characters in $input that matched the pattern.\n $0 refers to the substring captured by the regular expression as a\n whole.

More specifically, the rules are as follows, where S is the number of\n parenthesized sub-expressions in the regular expression, and N is the\n decimal number formed by taking all the digits that consecutively follow the\n $ character:

If N=0, then the variable is replaced by the substring\n matched by the regular expression as a whole.

If 1<=N<=S, then the variable is\n replaced by the substring captured by the Nth parenthesized sub-expression. If the\n Nth parenthesized sub-expression was not matched, then the\n variable is replaced by the zero-length string.

If S<N<=9, then the variable is\n replaced by the zero-length string.

Otherwise (if N>S and\n N>9), the last digit of N is taken to\n be a literal character to be included \"as is\" in the replacement string, and the\n rules are reapplied using the number N formed by stripping off this\n last digit.

For example, if the replacement string is \n $23\n and there are 5 substrings, the result contains the value of the substring that\n matches the second sub-expression, followed by the digit \n 3\n .

Unless the q flag is used, a literal $\n character within the replacement string must be written as \\$, and a\n literal \\ character must be written as \\\\.

If two alternatives within the pattern both match at the same position in the\n $input, then the match that is chosen is the one matched by the first\n alternative. For example:

fn:replace(\"abcd\", \"(ab)|(a)\", \"[1=$1][2=$2]\") returns \"[1=ab][2=]cd\"

A dynamic error is raised if the value of\n $pattern is invalid according to the rules described in section .

A dynamic error is raised if the value of\n $flags is invalid according to the rules described in section .

A dynamic error is raised if the pattern matches a\n zero-length string, that is, if the expression fn:matches(\"\", $pattern,\n $flags) returns true. It is not an error, however, if a captured\n substring is zero-length.

A dynamic error is raised if the value of\n $replacement contains a \"$\" character that is not\n immediately followed by a digit 0-9 and not immediately preceded by a\n \"\\\".

A dynamic error is raised if the value of\n $replacement contains a \"\\\" character that is not part of a\n \"\\\\\" pair, unless it is immediately followed by a \"$\"\n character.

\n", "summary" : "

Returns a string produced from the input string by replacing any substrings\n that match a given regular expression with a supplied replacement string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "input", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "pattern", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "replacement", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "replace", "qname" : "fn:replace", "signature" : "($input as xs:string?, $pattern as xs:string, $replacement as xs:string, $flags as xs:string) as xs:string external", "description" : "

Returns a string produced from the input string by replacing any substrings\n that match a given regular expression with a supplied replacement string.

This function is deterministic, context-independent, and focus-independent.

The effect of calling the first version of this function (omitting the argument\n $flags) is the same as the effect of calling the second version with the\n $flags argument set to a zero-length string. Flags are defined in\n .

The $flags argument is interpreted in the same manner as for the\n fn:matches function.

If $input is the empty sequence, it is interpreted as the zero-length\n string.

The function returns the xs:string that is obtained by replacing each\n non-overlapping substring of $input that matches the given\n $pattern with an occurrence of the $replacement string.

If two overlapping substrings of $input both match the\n $pattern, then only the first one (that is, the one whose first character comes first in the $input string) is\n replaced.

If the q flag is present, the replacement string is used\n as is.

Otherwise, within the $replacement\n string, a variable $N may be used to refer to the substring captured by the\n Nth parenthesized sub-expression in the regular expression. For each match of the\n pattern, these variables are assigned the value of the content matched by the relevant\n sub-expression, and the modified replacement string is then substituted for the characters in $input that matched the pattern.\n $0 refers to the substring captured by the regular expression as a\n whole.

More specifically, the rules are as follows, where S is the number of\n parenthesized sub-expressions in the regular expression, and N is the\n decimal number formed by taking all the digits that consecutively follow the\n $ character:

If N=0, then the variable is replaced by the substring\n matched by the regular expression as a whole.

If 1<=N<=S, then the variable is\n replaced by the substring captured by the Nth parenthesized sub-expression. If the\n Nth parenthesized sub-expression was not matched, then the\n variable is replaced by the zero-length string.

If S<N<=9, then the variable is\n replaced by the zero-length string.

Otherwise (if N>S and\n N>9), the last digit of N is taken to\n be a literal character to be included \"as is\" in the replacement string, and the\n rules are reapplied using the number N formed by stripping off this\n last digit.

For example, if the replacement string is \n $23\n and there are 5 substrings, the result contains the value of the substring that\n matches the second sub-expression, followed by the digit \n 3\n .

Unless the q flag is used, a literal $\n character within the replacement string must be written as \\$, and a\n literal \\ character must be written as \\\\.

If two alternatives within the pattern both match at the same position in the\n $input, then the match that is chosen is the one matched by the first\n alternative. For example:

fn:replace(\"abcd\", \"(ab)|(a)\", \"[1=$1][2=$2]\") returns \"[1=ab][2=]cd\"

A dynamic error is raised if the value of\n $pattern is invalid according to the rules described in section .

A dynamic error is raised if the value of\n $flags is invalid according to the rules described in section .

A dynamic error is raised if the pattern matches a\n zero-length string, that is, if the expression fn:matches(\"\", $pattern,\n $flags) returns true. It is not an error, however, if a captured\n substring is zero-length.

A dynamic error is raised if the value of\n $replacement contains a \"$\" character that is not\n immediately followed by a digit 0-9 and not immediately preceded by a\n \"\\\".

A dynamic error is raised if the value of\n $replacement contains a \"\\\" character that is not part of a\n \"\\\\\" pair, unless it is immediately followed by a \"$\"\n character.

\n", "summary" : "

Returns a string produced from the input string by replacing any substrings\n that match a given regular expression with a supplied replacement string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "input", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "pattern", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "replacement", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "flags", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "resolve-QName", "qname" : "fn:resolve-QName", "signature" : "($qname as xs:string?, $element as element(*)) as xs:QName? external", "description" : "

Returns an xs:QName value (that is, an expanded-QName) by taking\n an xs:string that has the lexical form of an xs:QName (a\n string in the form \"prefix:local-name\" or \"local-name\") and resolving it using the\n in-scope namespaces for a given element.

This function is deterministic, context-independent, and focus-independent.

If $qname is the empty sequence, returns the empty sequence.

More specifically, the function searches the namespace bindings of $element\n for a binding whose name matches the prefix of $qname, or the zero-length\n string if it has no prefix, and constructs an expanded-QName whose local name is taken\n from the supplied $qname, and whose namespace URI is taken from the string\n value of the namespace binding.

If the $qname has no prefix, and there is no namespace binding for\n $element corresponding to the default (unnamed) namespace, then the\n resulting expanded-QName has no namespace part.

The prefix (or absence of a prefix) in the supplied $qname argument is\n retained in the returned expanded-QName, as discussed in .

A dynamic error is raised if $qname does not\n have the correct lexical form for an instance of xs:QName.

A dynamic error is raised if $qname has a\n prefix and there is no namespace binding for $element that matches this\n prefix.

\n", "summary" : "

Returns an xs:QName value (that is, an expanded-QName) by taking\n an xs:string that has the lexical form of an xs:QName (a\n string in the form \"prefix:local-name\" or \"local-name\") and resolving it using the\n in-scope namespaces for a given element.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "qname", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "element", "type" : "element(*)", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:QName?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "resolve-uri", "qname" : "fn:resolve-uri", "signature" : "($relative as xs:string?) as xs:anyURI? external", "description" : "

Resolves a relative IRI reference against an absolute IRI.

The one-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

The two-argument form of this function is deterministic, context-independent, and focus-independent.

If the second argument is absent, the effect is the same as calling the two-argument\n function with the value of fn:static-base-uri() as the second argument.

The function is defined to operate on IRI references as defined in , and the implementation must permit all arguments that are valid\n according to that specification. In addition, the implementation may\n accept some or all strings that conform to the rules for (absolute or relative) Legacy\n Extended IRI references as defined in . For the purposes of this\n section, the terms IRI and IRI reference include these extensions, insofar as the\n implementation chooses to support them.

If $relative is the empty sequence, the function returns the empty\n sequence.

If $relative is an absolute IRI (as defined above), then it is returned\n unchanged.

Otherwise, the function resolves the relative IRI reference $relative\n against the base IRI $base using the algorithm defined in , adapted by treating any character\n that would not be valid in an RFC3986 URI or relative reference in the same way that\n RFC3986 treats unreserved characters. No percent-encoding takes place.

The first form of this function resolves $relative against the value of the\n base-uri property from the static context. A dynamic error is raised if the base-uri property is not initialized in the static context.

A dynamic error is raised if $relative is not a\n valid IRI according to the rules of RFC3987, extended with an implementation-defined\n subset of the extensions permitted in LEIRI, or if it is not a suitable relative\n reference to use as input to the RFC3986 resolution algorithm extended to handle\n additional unreserved characters.

A dynamic error is raised if $base is not a\n valid IRI according to the rules of RFC3987, extended with an implementation-defined\n subset of the extensions permitted in LEIRI, or if it is not a suitable IRI to use as\n input to the chosen resolution algorithm (for example, if it is a relative IRI\n reference, if it is a non-hierarchic URI, or if it contains a fragment identifier).

A dynamic error is raised if the chosen resolution algorithm\n fails for any other reason.

\n", "summary" : "

Resolves a relative IRI reference against an absolute IRI.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "relative", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:anyURI?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "resolve-uri", "qname" : "fn:resolve-uri", "signature" : "($relative as xs:string?, $base as xs:string) as xs:anyURI? external", "description" : "

Resolves a relative IRI reference against an absolute IRI.

The one-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

The two-argument form of this function is deterministic, context-independent, and focus-independent.

If the second argument is absent, the effect is the same as calling the two-argument\n function with the value of fn:static-base-uri() as the second argument.

The function is defined to operate on IRI references as defined in , and the implementation must permit all arguments that are valid\n according to that specification. In addition, the implementation may\n accept some or all strings that conform to the rules for (absolute or relative) Legacy\n Extended IRI references as defined in . For the purposes of this\n section, the terms IRI and IRI reference include these extensions, insofar as the\n implementation chooses to support them.

If $relative is the empty sequence, the function returns the empty\n sequence.

If $relative is an absolute IRI (as defined above), then it is returned\n unchanged.

Otherwise, the function resolves the relative IRI reference $relative\n against the base IRI $base using the algorithm defined in , adapted by treating any character\n that would not be valid in an RFC3986 URI or relative reference in the same way that\n RFC3986 treats unreserved characters. No percent-encoding takes place.

The first form of this function resolves $relative against the value of the\n base-uri property from the static context. A dynamic error is raised if the base-uri property is not initialized in the static context.

A dynamic error is raised if $relative is not a\n valid IRI according to the rules of RFC3987, extended with an implementation-defined\n subset of the extensions permitted in LEIRI, or if it is not a suitable relative\n reference to use as input to the RFC3986 resolution algorithm extended to handle\n additional unreserved characters.

A dynamic error is raised if $base is not a\n valid IRI according to the rules of RFC3987, extended with an implementation-defined\n subset of the extensions permitted in LEIRI, or if it is not a suitable IRI to use as\n input to the chosen resolution algorithm (for example, if it is a relative IRI\n reference, if it is a non-hierarchic URI, or if it contains a fragment identifier).

A dynamic error is raised if the chosen resolution algorithm\n fails for any other reason.

\n", "summary" : "

Resolves a relative IRI reference against an absolute IRI.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "relative", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "base", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyURI?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "reverse", "qname" : "fn:reverse", "signature" : "($arg as item()*) as item()* external", "description" : "

Reverses the order of items in a sequence.

This function is deterministic, context-independent, and focus-independent.

The function returns a sequence containing the items in $arg in reverse\n order.

For detailed type semantics, see [Formal Semantics].

If $arg is the empty sequence, the empty sequence is returned.

\n", "summary" : "

Reverses the order of items in a sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "root", "qname" : "fn:root", "signature" : "() as node() external", "description" : "

Returns the root of the tree to which $arg belongs. This will\n usually, but not necessarily, be a document node.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the function is called without an argument, the context item (.) is used\n as the default argument. The behavior of the function if the argument is omitted is\n exactly the same as if the context item had been passed as the argument.

The function returns the value of the expression\n ($arg/ancestor-or-self::node())[1].

The following errors may be raised when $arg is omitted:

\n", "summary" : "

Returns the root of the tree to which $arg belongs.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "node()", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "root", "qname" : "fn:root", "signature" : "($arg as node()?) as node()? external", "description" : "

Returns the root of the tree to which $arg belongs. This will\n usually, but not necessarily, be a document node.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

If the function is called without an argument, the context item (.) is used\n as the default argument. The behavior of the function if the argument is omitted is\n exactly the same as if the context item had been passed as the argument.

The function returns the value of the expression\n ($arg/ancestor-or-self::node())[1].

The following errors may be raised when $arg is omitted:

\n", "summary" : "

Returns the root of the tree to which $arg belongs.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "node()", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "node()?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "round-half-to-even", "qname" : "fn:round-half-to-even", "signature" : "($arg as numeric?) as numeric? external", "description" : "

Rounds a value to a specified number of decimal places, rounding to make the\n last digit even if two such values are equally near.

This function is deterministic, context-independent, and focus-independent.

General rules: see .

The function returns the nearest (that is, numerically closest) value to\n $arg that is a multiple of ten to the power of minus\n $precision. If two such values are equally near (e.g. if the fractional\n part in $arg is exactly .500...), the function returns the one whose least\n significant digit is even.

If the type of $arg is one of the four numeric types xs:float,\n xs:double, xs:decimal or xs:integer the type\n of the result is the same as the type of $arg. If the type of\n $arg is a type derived from one of the numeric types, the result is an\n instance of the base numeric type.

The first signature of this function produces the same result as the second signature\n with $precision=0.

For arguments of type xs:float and xs:double:

If the argument is NaN, positive or negative zero, or positive or\n negative infinity, then the result is the same as the argument.

In all other cases, the argument is cast to xs:decimal\n using an implementation of xs:decimal that imposes no\n limits on the number of digits that can be represented. The function\n is applied to this xs:decimal value, and the resulting\n xs:decimal is cast back to xs:float or\n xs:double as appropriate to form the function result. If the\n resulting xs:decimal value is zero, then positive or negative zero is\n returned according to the sign of the original argument.

For detailed type semantics, see [Formal Semantics].

This function is typically used in financial applications where the\n argument is of type xs:decimal. For arguments of type xs:float\n and xs:double the results may be counter-intuitive. For example, consider\n round-half-to-even(xs:float(150.015), 2). The result is not 150.02 as\n might be expected, but 150.01. This is because the conversion of the\n xs:float value represented by the literal 150.015 to an\n xs:decimal produces the xs:decimal value 150.014999389...,\n which is closer to 150.01 than to 150.02.

\n", "summary" : "

Rounds a value to a specified number of decimal places, rounding to make the\n last digit even if two such values are equally near.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "numeric", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "numeric?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "round-half-to-even", "qname" : "fn:round-half-to-even", "signature" : "($arg as numeric?, $precision as xs:integer) as numeric? external", "description" : "

Rounds a value to a specified number of decimal places, rounding to make the\n last digit even if two such values are equally near.

This function is deterministic, context-independent, and focus-independent.

General rules: see .

The function returns the nearest (that is, numerically closest) value to\n $arg that is a multiple of ten to the power of minus\n $precision. If two such values are equally near (e.g. if the fractional\n part in $arg is exactly .500...), the function returns the one whose least\n significant digit is even.

If the type of $arg is one of the four numeric types xs:float,\n xs:double, xs:decimal or xs:integer the type\n of the result is the same as the type of $arg. If the type of\n $arg is a type derived from one of the numeric types, the result is an\n instance of the base numeric type.

The first signature of this function produces the same result as the second signature\n with $precision=0.

For arguments of type xs:float and xs:double:

If the argument is NaN, positive or negative zero, or positive or\n negative infinity, then the result is the same as the argument.

In all other cases, the argument is cast to xs:decimal\n using an implementation of xs:decimal that imposes no\n limits on the number of digits that can be represented. The function\n is applied to this xs:decimal value, and the resulting\n xs:decimal is cast back to xs:float or\n xs:double as appropriate to form the function result. If the\n resulting xs:decimal value is zero, then positive or negative zero is\n returned according to the sign of the original argument.

For detailed type semantics, see [Formal Semantics].

This function is typically used in financial applications where the\n argument is of type xs:decimal. For arguments of type xs:float\n and xs:double the results may be counter-intuitive. For example, consider\n round-half-to-even(xs:float(150.015), 2). The result is not 150.02 as\n might be expected, but 150.01. This is because the conversion of the\n xs:float value represented by the literal 150.015 to an\n xs:decimal produces the xs:decimal value 150.014999389...,\n which is closer to 150.01 than to 150.02.

\n", "summary" : "

Rounds a value to a specified number of decimal places, rounding to make the\n last digit even if two such values are equally near.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "numeric", "occurrence" : "?", "description" : "" }, { "name" : "precision", "type" : "xs:integer", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "numeric?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "round", "qname" : "fn:round", "signature" : "($arg as numeric?) as numeric? external", "description" : "

Rounds a value to a specified number of decimal places, rounding upwards if two\n such values are equally near.

This function is deterministic, context-independent, and focus-independent.

General rules: see .

The function returns the nearest (that is, numerically closest) value to\n $arg that is a multiple of ten to the power of minus\n $precision. If two such values are equally near (for example, if the\n fractional part in $arg is exactly .5), the function returns the one that\n is closest to positive infinity.

If the type of $arg is one of the four numeric types xs:float,\n xs:double, xs:decimal or xs:integer the type\n of the result is the same as the type of $arg. If the type of\n $arg is a type derived from one of the numeric types, the result is an\n instance of the base numeric type.

The single-argument version of this function produces the same result as the\n two-argument version with $precision=0 (that is, it rounds to a whole\n number).

When $arg is of type xs:float and xs:double:

If $arg is NaN, positive or negative zero, or positive or negative\n infinity, then the result is the same as the argument.

For other values, the argument is cast to xs:decimal using an\n implementation of xs:decimal that imposes no limits on the number of\n digits that can be represented. The function is applied to this\n xs:decimal value, and the resulting xs:decimal is\n cast back to xs:float or xs:double as appropriate to\n form the function result. If the resulting xs:decimal value is zero,\n then positive or negative zero is returned according to the sign of\n $arg.

For detailed type semantics, see [Formal Semantics].

This function is typically used with a non-zero $precision in financial\n applications where the argument is of type xs:decimal. For arguments of\n type xs:float and xs:double the results may be\n counter-intuitive. For example, consider round(35.425e0, 2). The result is\n not 35.43, as might be expected, but 35.42. This is because the xs:double written as 35.425e0\n has an exact value equal to 35.42499999999..., which is closer\n to 35.42 than to 35.43.

\n", "summary" : "

Rounds a value to a specified number of decimal places, rounding upwards if two\n such values are equally near.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "numeric", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "numeric?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "round", "qname" : "fn:round", "signature" : "($arg as numeric?, $precision as xs:integer) as numeric? external", "description" : "

Rounds a value to a specified number of decimal places, rounding upwards if two\n such values are equally near.

This function is deterministic, context-independent, and focus-independent.

General rules: see .

The function returns the nearest (that is, numerically closest) value to\n $arg that is a multiple of ten to the power of minus\n $precision. If two such values are equally near (for example, if the\n fractional part in $arg is exactly .5), the function returns the one that\n is closest to positive infinity.

If the type of $arg is one of the four numeric types xs:float,\n xs:double, xs:decimal or xs:integer the type\n of the result is the same as the type of $arg. If the type of\n $arg is a type derived from one of the numeric types, the result is an\n instance of the base numeric type.

The single-argument version of this function produces the same result as the\n two-argument version with $precision=0 (that is, it rounds to a whole\n number).

When $arg is of type xs:float and xs:double:

If $arg is NaN, positive or negative zero, or positive or negative\n infinity, then the result is the same as the argument.

For other values, the argument is cast to xs:decimal using an\n implementation of xs:decimal that imposes no limits on the number of\n digits that can be represented. The function is applied to this\n xs:decimal value, and the resulting xs:decimal is\n cast back to xs:float or xs:double as appropriate to\n form the function result. If the resulting xs:decimal value is zero,\n then positive or negative zero is returned according to the sign of\n $arg.

For detailed type semantics, see [Formal Semantics].

This function is typically used with a non-zero $precision in financial\n applications where the argument is of type xs:decimal. For arguments of\n type xs:float and xs:double the results may be\n counter-intuitive. For example, consider round(35.425e0, 2). The result is\n not 35.43, as might be expected, but 35.42. This is because the xs:double written as 35.425e0\n has an exact value equal to 35.42499999999..., which is closer\n to 35.42 than to 35.43.

\n", "summary" : "

Rounds a value to a specified number of decimal places, rounding upwards if two\n such values are equally near.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "numeric", "occurrence" : "?", "description" : "" }, { "name" : "precision", "type" : "xs:integer", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "numeric?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "seconds-from-dateTime", "qname" : "fn:seconds-from-dateTime", "signature" : "($arg as xs:dateTime?) as xs:decimal? external", "description" : "

Returns the seconds component of an xs:dateTime.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an xs:decimal value greater than or equal\n to zero and less than 60, representing the seconds and fractional seconds in the local\n value of $arg.

The expression fn:seconds-from-dateTime(xs:dateTime(\"1999-05-31T13:20:00-05:00\")) returns 0.

\n", "summary" : "

Returns the seconds component of an xs:dateTime .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:dateTime", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:decimal?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "seconds-from-duration", "qname" : "fn:seconds-from-duration", "signature" : "($arg as xs:duration?) as xs:decimal? external", "description" : "

Returns the number of seconds in a duration.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an xs:decimal representing the seconds\n component in the value of $arg. The result is obtained by casting\n $arg to an xs:dayTimeDuration (see ) and then computing the seconds component as described\n in .

If $arg is a negative duration then the result will be negative..

If $arg is an xs:yearMonthDuration the function returns 0.

The expression fn:seconds-from-duration(xs:dayTimeDuration(\"P3DT10H12.5S\")) returns 12.5.

The expression fn:seconds-from-duration(xs:dayTimeDuration(\"-PT256S\")) returns -16.0.

\n", "summary" : "

Returns the number of seconds in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:duration", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:decimal?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "seconds-from-time", "qname" : "fn:seconds-from-time", "signature" : "($arg as xs:time?) as xs:decimal? external", "description" : "

Returns the seconds component of an xs:time.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an xs:decimal value greater than or equal\n to zero and less than 60, representing the seconds and fractional seconds in the local\n value of $arg.

The expression fn:seconds-from-time(xs:time(\"13:20:10.5\")) returns 10.5.

\n", "summary" : "

Returns the seconds component of an xs:time .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:time", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:decimal?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "serialize", "qname" : "fn:serialize", "signature" : "($arg as item()*) as xs:string external", "description" : "

This function serializes the supplied input\n sequence\n $arg as described in ,\n returning the serialized representation of the\n sequence as a string.

This function is deterministic, context-independent, and focus-independent.

The value of $arg acts as the input sequence to the serialization process,\n which starts with sequence normalization.

The single-argument version of this function has the same effect as\n the two-argument version called with $params set to an empty sequence. This\n in turn is the same as the effect of passing an\n output:serialization-parameters element with no child elements.

The $params argument is used to identify a set of\n serialization parameters. These are supplied in the form of an\n output:serialization-parameters element, having the format described in\n .

The final stage of serialization, that is, encoding, is skipped. If the serializer does\n not allow this phase to be skipped, then the sequence of octets returned by the\n serializer is decoded into a string by reversing the character encoding performed in the\n final stage.

If the host language makes serialization an optional feature and\n the implementation does not support serialization, then a dynamic error\n is raised.

The serialization process will raise an error if $arg is an attribute or\n namespace node.

If any serialization error occurs, including the detection of an invalid value for a\n serialization parameter, this results in the fn:serialize call failing with\n a dynamic error.

\n", "summary" : "

This function serializes the supplied input\n sequence \n $arg as described in ,\n returning the serialized representation of the\n sequence as a string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "serialize", "qname" : "fn:serialize", "signature" : "($arg as item()*, $params as element(output:serialization-parameters)?) as xs:string external", "description" : "

This function serializes the supplied input\n sequence\n $arg as described in ,\n returning the serialized representation of the\n sequence as a string.

This function is deterministic, context-independent, and focus-independent.

The value of $arg acts as the input sequence to the serialization process,\n which starts with sequence normalization.

The single-argument version of this function has the same effect as\n the two-argument version called with $params set to an empty sequence. This\n in turn is the same as the effect of passing an\n output:serialization-parameters element with no child elements.

The $params argument is used to identify a set of\n serialization parameters. These are supplied in the form of an\n output:serialization-parameters element, having the format described in\n .

The final stage of serialization, that is, encoding, is skipped. If the serializer does\n not allow this phase to be skipped, then the sequence of octets returned by the\n serializer is decoded into a string by reversing the character encoding performed in the\n final stage.

If the host language makes serialization an optional feature and\n the implementation does not support serialization, then a dynamic error\n is raised.

The serialization process will raise an error if $arg is an attribute or\n namespace node.

If any serialization error occurs, including the detection of an invalid value for a\n serialization parameter, this results in the fn:serialize call failing with\n a dynamic error.

\n", "summary" : "

This function serializes the supplied input\n sequence \n $arg as described in ,\n returning the serialized representation of the\n sequence as a string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "params", "type" : "element(output:serialization-parameters)", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "starts-with", "qname" : "fn:starts-with", "signature" : "($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean external", "description" : "

Returns true if the string $arg1 contains $arg2 as a\n leading substring, taking collations into account.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations.\n \t

The three-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri.\n \t

If the value of $arg1 or $arg2 is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of $arg2 is the zero-length string, then the function returns\n true. If the value of $arg1 is the zero-length string and\n the value of $arg2 is not the zero-length string, then the function returns\n false.

The collation used by this function is determined according to the rules in .

The function returns an xs:boolean indicating whether or not the value of\n $arg1 starts with a sequence of collation units that provides a\n match to the collation units of $arg2 according to the\n collation that is used.

Match is defined in .

A dynamic error may be raised if the\n specified collation does not support collation units.

\n", "summary" : "

Returns true if the string $arg1 contains $arg2 as a\n leading substring, taking collations into account.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "arg2", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "starts-with", "qname" : "fn:starts-with", "signature" : "($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean external", "description" : "

Returns true if the string $arg1 contains $arg2 as a\n leading substring, taking collations into account.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations.\n \t

The three-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri.\n \t

If the value of $arg1 or $arg2 is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of $arg2 is the zero-length string, then the function returns\n true. If the value of $arg1 is the zero-length string and\n the value of $arg2 is not the zero-length string, then the function returns\n false.

The collation used by this function is determined according to the rules in .

The function returns an xs:boolean indicating whether or not the value of\n $arg1 starts with a sequence of collation units that provides a\n match to the collation units of $arg2 according to the\n collation that is used.

Match is defined in .

A dynamic error may be raised if the\n specified collation does not support collation units.

\n", "summary" : "

Returns true if the string $arg1 contains $arg2 as a\n leading substring, taking collations into account.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "arg2", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "collation", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "static-base-uri", "qname" : "fn:static-base-uri", "signature" : "() as xs:anyURI? external", "description" : "

This function returns the value of the Static Base URI property from the static context.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

The function returns the value of the Static Base URI property from the static context. If the\n property is absent, the empty sequence is returned.

Components of the static context are discussed in .

XQuery 3.0 and XSLT 3.0 give an implementation freedom to use different base URIs during the\n static analysis phase and the dynamic evaluation phase, that is, for compile-time and run-time resources respectively.\n In this situation, the fn:static-base-uri function should return a URI suitable for locating resources needed\n during dynamic evaluation.

\n", "summary" : "

This function returns the value of the Static Base URI property from the static context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:anyURI?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "string-join", "qname" : "fn:string-join", "signature" : "($arg1 as xs:string*) as xs:string external", "description" : "

Returns a string created by concatenating the items in a sequence, with a\n defined separator between adjacent items.

This function is deterministic, context-independent, and focus-independent.

The effect of calling the single-argument version of this function is\n the same as calling the two-argument version with $arg2 set to a\n zero-length string.

The function returns an xs:string created by concatenating the items in the\n sequence $arg1, in order, using the value of $arg2 as a\n separator between adjacent items. If the value of $arg2 is the zero-length\n string, then the members of $arg1 are concatenated without a separator.

If the value of $arg1 is the empty sequence, the function returns the\n zero-length string.

\n", "summary" : "

Returns a string created by concatenating the items in a sequence, with a\n defined separator between adjacent items.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "string-join", "qname" : "fn:string-join", "signature" : "($arg1 as xs:string*, $arg2 as xs:string) as xs:string external", "description" : "

Returns a string created by concatenating the items in a sequence, with a\n defined separator between adjacent items.

This function is deterministic, context-independent, and focus-independent.

The effect of calling the single-argument version of this function is\n the same as calling the two-argument version with $arg2 set to a\n zero-length string.

The function returns an xs:string created by concatenating the items in the\n sequence $arg1, in order, using the value of $arg2 as a\n separator between adjacent items. If the value of $arg2 is the zero-length\n string, then the members of $arg1 are concatenated without a separator.

If the value of $arg1 is the empty sequence, the function returns the\n zero-length string.

\n", "summary" : "

Returns a string created by concatenating the items in a sequence, with a\n defined separator between adjacent items.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurrence" : "*", "description" : "" }, { "name" : "arg2", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "string-length", "qname" : "fn:string-length", "signature" : "() as xs:integer external", "description" : "

Returns the number of characters in a\n string.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

The function returns an xs:integer equal to the length in characters of the value of $arg.

Calling the zero-argument version of the function is equivalent to calling\n fn:string-length(fn:string(.)).

If the value of $arg is the empty sequence, the function returns the\n xs:integer value zero (0).

If $arg is not specified and the context item is absent, a dynamic error is raised: .

\n", "summary" : "

Returns the number of characters in a\n string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "string-length", "qname" : "fn:string-length", "signature" : "($arg as xs:string?) as xs:integer external", "description" : "

Returns the number of characters in a\n string.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

The function returns an xs:integer equal to the length in characters of the value of $arg.

Calling the zero-argument version of the function is equivalent to calling\n fn:string-length(fn:string(.)).

If the value of $arg is the empty sequence, the function returns the\n xs:integer value zero (0).

If $arg is not specified and the context item is absent, a dynamic error is raised: .

\n", "summary" : "

Returns the number of characters in a\n string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "string-to-codepoints", "qname" : "fn:string-to-codepoints", "signature" : "($arg as xs:string?) as xs:integer* external", "description" : "

Returns the sequence of codepoints that\n constitute an xs:string value.

This function is deterministic, context-independent, and focus-independent.

The function returns a sequence of integers, each integer being the Unicode codepoints of the corresponding character in $arg.

If $arg is a zero-length string or the empty sequence, the function returns\n the empty sequence.

The expression fn:string-to-codepoints(\"Thérèse\") returns (84, 104, 233, 114, 232, 115, 101).

\n", "summary" : "

Returns the sequence of codepoints that\n constitute an xs:string value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:integer*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "string-to-codepoints", "qname" : "fn:string-to-codepoints", "signature" : "($arg as xs:string?) as xs:integer* external", "description" : "

Returns the sequence of codepoints that\n constitute an xs:string value.

This function is deterministic, context-independent, and focus-independent.

The function returns a sequence of integers, each integer being the Unicode codepoints of the corresponding character in $arg.

If $arg is a zero-length string or the empty sequence, the function returns\n the empty sequence.

The expression fn:string-to-codepoints(\"Thérèse\") returns (84, 104, 233, 114, 232, 115, 101).

\n", "summary" : "

Returns the sequence of codepoints that\n constitute an xs:string value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:integer*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "string", "qname" : "fn:string", "signature" : "() as xs:string external", "description" : "

Returns the value of $arg represented as an\n xs:string.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

In the zero-argument version of the function, $arg defaults to the context\n item. That is, calling fn:string() is equivalent to calling\n fn:string(.).

If $arg is the empty sequence, the function returns the zero-length\n string.

If $arg is a node, the function returns the string-value of the node, as\n obtained using the dm:string-value accessor defined in (see ).

If $arg is an atomic value, the function returns the result of the\n expression $arg cast as xs:string (see ).

A dynamic error is raised by the\n zero-argument version of the function if the context item is absent.

A type error is raised if\n $arg is a function item.

\n", "summary" : "

Returns the value of $arg represented as an\n xs:string .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "string", "qname" : "fn:string", "signature" : "($arg as item()?) as xs:string external", "description" : "

Returns the value of $arg represented as an\n xs:string.

The zero-argument form of this function is deterministic, context-dependent, and focus-dependent.

The one-argument form of this function is deterministic, context-independent, and focus-independent.

In the zero-argument version of the function, $arg defaults to the context\n item. That is, calling fn:string() is equivalent to calling\n fn:string(.).

If $arg is the empty sequence, the function returns the zero-length\n string.

If $arg is a node, the function returns the string-value of the node, as\n obtained using the dm:string-value accessor defined in (see ).

If $arg is an atomic value, the function returns the result of the\n expression $arg cast as xs:string (see ).

A dynamic error is raised by the\n zero-argument version of the function if the context item is absent.

A type error is raised if\n $arg is a function item.

\n", "summary" : "

Returns the value of $arg represented as an\n xs:string .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "subsequence", "qname" : "fn:subsequence", "signature" : "($sourceSeq as item()*, $startingLoc as xs:double) as item()* external", "description" : "

Returns the contiguous sequence of items in the value of\n $sourceSeq beginning at the position indicated by the value of\n $startingLoc and continuing for the number of items indicated by the\n value of $length.

This function is deterministic, context-independent, and focus-independent.

In the two-argument case, returns:

$sourceSeq[fn:round($startingLoc) le position()]

In the three-argument case, returns:

$sourceSeq[fn:round($startingLoc) le position()\n and position() lt fn:round($startingLoc) + fn:round($length)]

For detailed type semantics, see [Formal Semantics].

The first item of a sequence is located at position 1, not position 0.

If $sourceSeq is the empty sequence, the empty sequence is returned.

If $startingLoc is zero or negative, the subsequence includes items from\n the beginning of the $sourceSeq.

If $length is not specified, the subsequence includes items to the end of\n $sourceSeq.

If $length is greater than the number of items in the value of\n $sourceSeq following $startingLoc, the subsequence includes\n items to the end of $sourceSeq.

As an exception to the previous two notes, if\n $startingLoc is -INF and $length is\n +INF, then fn:round($startingLoc) + fn:round($length) is\n NaN; since position() lt NaN is always false, the result is\n an empty sequence.

The reason the function accepts arguments of type xs:double is that many\n computations on untyped data return an xs:double result; and the reason for\n the rounding rules is to compensate for any imprecision in these floating-point\n computations.

\n", "summary" : "

Returns the contiguous sequence of items in the value of\n $sourceSeq beginning at the position indicated by the value of\n $startingLoc and continuing for the number of items indicated by the\n value of $length .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "sourceSeq", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "startingLoc", "type" : "xs:double", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "subsequence", "qname" : "fn:subsequence", "signature" : "($sourceSeq as item()*, $startingLoc as xs:double, $length as xs:double) as item()* external", "description" : "

Returns the contiguous sequence of items in the value of\n $sourceSeq beginning at the position indicated by the value of\n $startingLoc and continuing for the number of items indicated by the\n value of $length.

This function is deterministic, context-independent, and focus-independent.

In the two-argument case, returns:

$sourceSeq[fn:round($startingLoc) le position()]

In the three-argument case, returns:

$sourceSeq[fn:round($startingLoc) le position()\n and position() lt fn:round($startingLoc) + fn:round($length)]

For detailed type semantics, see [Formal Semantics].

The first item of a sequence is located at position 1, not position 0.

If $sourceSeq is the empty sequence, the empty sequence is returned.

If $startingLoc is zero or negative, the subsequence includes items from\n the beginning of the $sourceSeq.

If $length is not specified, the subsequence includes items to the end of\n $sourceSeq.

If $length is greater than the number of items in the value of\n $sourceSeq following $startingLoc, the subsequence includes\n items to the end of $sourceSeq.

As an exception to the previous two notes, if\n $startingLoc is -INF and $length is\n +INF, then fn:round($startingLoc) + fn:round($length) is\n NaN; since position() lt NaN is always false, the result is\n an empty sequence.

The reason the function accepts arguments of type xs:double is that many\n computations on untyped data return an xs:double result; and the reason for\n the rounding rules is to compensate for any imprecision in these floating-point\n computations.

\n", "summary" : "

Returns the contiguous sequence of items in the value of\n $sourceSeq beginning at the position indicated by the value of\n $startingLoc and continuing for the number of items indicated by the\n value of $length .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "sourceSeq", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "startingLoc", "type" : "xs:double", "occurrence" : null, "description" : "" }, { "name" : "length", "type" : "xs:double", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "substring-after", "qname" : "fn:substring-after", "signature" : "($arg1 as xs:string?, $arg2 as xs:string?) as xs:string external", "description" : "

Returns the part of $arg1 that follows the first occurrence of\n $arg2, taking collations into account.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations.\n \t

The three-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri.\n \t

If the value of $arg1 or $arg2 is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of $arg2 is the zero-length string, then the function returns\n the value of $arg1.

If the value of $arg1 does not contain a string that is equal to the value\n of $arg2, then the function returns the zero-length string.

The collation used by this function is determined according to the rules in .

The function returns the substring of the value of $arg1 that follows in\n the value of $arg1 the first occurrence of a sequence of collation units\n that provides a minimal match to the collation units of $arg2\n according to the collation that is used.

Minimal match is defined in .

A dynamic error may be raised if the\n specified collation does not support collation units.

\n", "summary" : "

Returns the part of $arg1 that follows the first occurrence of\n $arg2 , taking collations into account.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "arg2", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "substring-after", "qname" : "fn:substring-after", "signature" : "($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:string external", "description" : "

Returns the part of $arg1 that follows the first occurrence of\n $arg2, taking collations into account.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations.\n \t

The three-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri.\n \t

If the value of $arg1 or $arg2 is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of $arg2 is the zero-length string, then the function returns\n the value of $arg1.

If the value of $arg1 does not contain a string that is equal to the value\n of $arg2, then the function returns the zero-length string.

The collation used by this function is determined according to the rules in .

The function returns the substring of the value of $arg1 that follows in\n the value of $arg1 the first occurrence of a sequence of collation units\n that provides a minimal match to the collation units of $arg2\n according to the collation that is used.

Minimal match is defined in .

A dynamic error may be raised if the\n specified collation does not support collation units.

\n", "summary" : "

Returns the part of $arg1 that follows the first occurrence of\n $arg2 , taking collations into account.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "arg2", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "collation", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "substring-before", "qname" : "fn:substring-before", "signature" : "($arg1 as xs:string?, $arg2 as xs:string?) as xs:string external", "description" : "

Returns the part of $arg1 that precedes the first occurrence of\n $arg2, taking collations into account.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations.\n \t

The three-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri.\n \t

If the value of $arg1 or $arg2 is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of $arg2 is the zero-length string, then the function returns\n the zero-length string.

If the value of $arg1 does not contain a string that is equal to the value\n of $arg2, then the function returns the zero-length string.

The collation used by this function is determined according to the rules in .

The function returns the substring of the value of $arg1 that precedes in\n the value of $arg1 the first occurrence of a sequence of collation units\n that provides a minimal match to the collation units of $arg2\n according to the collation that is used.

Minimal match is defined in .

A dynamic error may be raised if the\n specified collation does not support collation units.

\n", "summary" : "

Returns the part of $arg1 that precedes the first occurrence of\n $arg2 , taking collations into account.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "arg2", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "substring-before", "qname" : "fn:substring-before", "signature" : "($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:string external", "description" : "

Returns the part of $arg1 that precedes the first occurrence of\n $arg2, taking collations into account.

The two-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations.\n \t

The three-argument form of this function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tcollations, and static base uri.\n \t

If the value of $arg1 or $arg2 is the empty sequence, or\n contains only ignorable collation units, it is interpreted as the zero-length\n string.

If the value of $arg2 is the zero-length string, then the function returns\n the zero-length string.

If the value of $arg1 does not contain a string that is equal to the value\n of $arg2, then the function returns the zero-length string.

The collation used by this function is determined according to the rules in .

The function returns the substring of the value of $arg1 that precedes in\n the value of $arg1 the first occurrence of a sequence of collation units\n that provides a minimal match to the collation units of $arg2\n according to the collation that is used.

Minimal match is defined in .

A dynamic error may be raised if the\n specified collation does not support collation units.

\n", "summary" : "

Returns the part of $arg1 that precedes the first occurrence of\n $arg2 , taking collations into account.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "arg2", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "collation", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "substring", "qname" : "fn:substring", "signature" : "($sourceString as xs:string?, $start as xs:double) as xs:string external", "description" : "

Returns the portion of the value of $sourceString beginning at the\n position indicated by the value of $start and continuing for the number of\n characters indicated by the value of\n $length.

This function is deterministic, context-independent, and focus-independent.

If the value of $sourceString is the empty sequence, the function returns\n the zero-length string.

Otherwise, the function returns a string comprising those characters of $sourceString whose index position (counting\n from one) is greater than or equal to the value of $start (rounded to an\n integer), and (if $length is specified) less than the sum of\n $start and $length (both rounded to integers).

The characters returned do not extend beyond $sourceString. If\n $start is zero or negative, only those characters in positions greater\n than zero are returned.

More specifically, the three argument version of the function returns the characters in\n $sourceString whose position $p satisfies:

\n fn:round($start) <= $p < fn:round($start) + fn:round($length)\n

The two argument version of the function assumes that $length is infinite\n and thus returns the characters in\n $sourceString whose position $p satisfies:

\n fn:round($start) <= $p\n

In the above computations, the rules for op:numeric-less-than and\n op:numeric-greater-than apply.

The first character of a string is located at position 1, not position 0.

\n", "summary" : "

Returns the portion of the value of $sourceString beginning at the\n position indicated by the value of $start and continuing for the number of\n characters indicated by the value of\n $length .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "sourceString", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "start", "type" : "xs:double", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "substring", "qname" : "fn:substring", "signature" : "($sourceString as xs:string?, $start as xs:double, $length as xs:double) as xs:string external", "description" : "

Returns the portion of the value of $sourceString beginning at the\n position indicated by the value of $start and continuing for the number of\n characters indicated by the value of\n $length.

This function is deterministic, context-independent, and focus-independent.

If the value of $sourceString is the empty sequence, the function returns\n the zero-length string.

Otherwise, the function returns a string comprising those characters of $sourceString whose index position (counting\n from one) is greater than or equal to the value of $start (rounded to an\n integer), and (if $length is specified) less than the sum of\n $start and $length (both rounded to integers).

The characters returned do not extend beyond $sourceString. If\n $start is zero or negative, only those characters in positions greater\n than zero are returned.

More specifically, the three argument version of the function returns the characters in\n $sourceString whose position $p satisfies:

\n fn:round($start) <= $p < fn:round($start) + fn:round($length)\n

The two argument version of the function assumes that $length is infinite\n and thus returns the characters in\n $sourceString whose position $p satisfies:

\n fn:round($start) <= $p\n

In the above computations, the rules for op:numeric-less-than and\n op:numeric-greater-than apply.

The first character of a string is located at position 1, not position 0.

\n", "summary" : "

Returns the portion of the value of $sourceString beginning at the\n position indicated by the value of $start and continuing for the number of\n characters indicated by the value of\n $length .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "sourceString", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "start", "type" : "xs:double", "occurrence" : null, "description" : "" }, { "name" : "length", "type" : "xs:double", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "sum", "qname" : "fn:sum", "signature" : "($arg as xs:anyAtomicType*) as xs:anyAtomicType external", "description" : "

Returns a value obtained by adding together the values in\n $arg.

This function is deterministic, context-independent, and focus-independent.

Any values of type xs:untypedAtomic in $arg are cast to\n xs:double. The items in the resulting sequence may be reordered in an\n arbitrary order. The resulting sequence is referred to below as the converted\n sequence.

If the converted sequence is empty, then the single-argument form of the function\n returns the xs:integer value 0; the two-argument form returns\n the value of the argument $zero.

If the converted sequence contains the value NaN, NaN is\n returned.

All items in $arg must be numeric or derived from a single base type. In\n addition, the type must support addition. Duration values must either all be\n xs:yearMonthDuration values or must all be\n xs:dayTimeDuration values. For numeric values, the numeric promotion\n rules defined in are used to promote all values to a single\n common type. The sum of a sequence of integers will therefore be an integer, while the\n sum of a numeric sequence that includes at least one xs:double will be an\n xs:double.

The result of the function, using the second signature, is the result of the\n expression:

\n if (fn:count($c) eq 0) then\n $zero\n else if (fn:count($c) eq 1) then\n $c[1]\n else\n $c[1] + fn:sum(subsequence($c, 2))

where $c is the converted sequence.

The result of the function, using the first signature, is the result of the expression:\n fn:sum($arg, 0).

For detailed type semantics, see [Formal Semantics].

A type error is raised if the input sequence contains\n items of incompatible types, as described above.

\n", "summary" : "

Returns a value obtained by adding together the values in\n $arg .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "sum", "qname" : "fn:sum", "signature" : "($arg as xs:anyAtomicType*, $zero as xs:anyAtomicType?) as xs:anyAtomicType? external", "description" : "

Returns a value obtained by adding together the values in\n $arg.

This function is deterministic, context-independent, and focus-independent.

Any values of type xs:untypedAtomic in $arg are cast to\n xs:double. The items in the resulting sequence may be reordered in an\n arbitrary order. The resulting sequence is referred to below as the converted\n sequence.

If the converted sequence is empty, then the single-argument form of the function\n returns the xs:integer value 0; the two-argument form returns\n the value of the argument $zero.

If the converted sequence contains the value NaN, NaN is\n returned.

All items in $arg must be numeric or derived from a single base type. In\n addition, the type must support addition. Duration values must either all be\n xs:yearMonthDuration values or must all be\n xs:dayTimeDuration values. For numeric values, the numeric promotion\n rules defined in are used to promote all values to a single\n common type. The sum of a sequence of integers will therefore be an integer, while the\n sum of a numeric sequence that includes at least one xs:double will be an\n xs:double.

The result of the function, using the second signature, is the result of the\n expression:

\n if (fn:count($c) eq 0) then\n $zero\n else if (fn:count($c) eq 1) then\n $c[1]\n else\n $c[1] + fn:sum(subsequence($c, 2))

where $c is the converted sequence.

The result of the function, using the first signature, is the result of the expression:\n fn:sum($arg, 0).

For detailed type semantics, see [Formal Semantics].

A type error is raised if the input sequence contains\n items of incompatible types, as described above.

\n", "summary" : "

Returns a value obtained by adding together the values in\n $arg .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "" }, { "name" : "zero", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:anyAtomicType?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "tail", "qname" : "fn:tail", "signature" : "($arg as item()*) as item()* external", "description" : "

Returns all but the first item in a sequence.

This function is deterministic, context-independent, and focus-independent.

The function returns the value of the expression subsequence($arg, 2)

If $arg is the empty sequence, or a sequence containing a single item, then\n the empty sequence is returned.

\n", "summary" : "

Returns all but the first item in a sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "timezone-from-date", "qname" : "fn:timezone-from-date", "signature" : "($arg as xs:date?) as xs:dayTimeDuration? external", "description" : "

Returns the timezone component of an xs:date.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns the timezone component of $arg, if any. If\n $arg has a timezone component, then the result is an\n xs:dayTimeDuration that indicates deviation from UTC; its value may\n range from +14:00 to -14:00 hours, both inclusive. If $arg has no timezone\n component, the result is the empty sequence.

The expression fn:timezone-from-date(xs:date(\"1999-05-31-05:00\")) returns xs:dayTimeDuration(\"-PT5H\").

The expression fn:timezone-from-date(xs:date(\"2000-06-12Z\")) returns xs:dayTimeDuration(\"PT0S\").

\n", "summary" : "

Returns the timezone component of an xs:date .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:date", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:dayTimeDuration?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "timezone-from-dateTime", "qname" : "fn:timezone-from-dateTime", "signature" : "($arg as xs:dateTime?) as xs:dayTimeDuration? external", "description" : "

Returns the timezone component of an xs:dateTime.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns the timezone component of $arg, if any. If\n $arg has a timezone component, then the result is an\n xs:dayTimeDuration that indicates deviation from UTC; its value may\n range from +14:00 to -14:00 hours, both inclusive. If $arg has no timezone\n component, the result is the empty sequence.

The expression fn:timezone-from-dateTime(xs:dateTime(\"1999-05-31T13:20:00-05:00\")) returns xs:dayTimeDuration(\"-PT5H\").

The expression fn:timezone-from-dateTime(xs:dateTime(\"2000-06-12T13:20:00Z\")) returns xs:dayTimeDuration(\"PT0S\").

The expression fn:timezone-from-dateTime(xs:dateTime(\"2004-08-27T00:00:00\")) returns ().

\n", "summary" : "

Returns the timezone component of an xs:dateTime .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:dateTime", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:dayTimeDuration?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "timezone-from-time", "qname" : "fn:timezone-from-time", "signature" : "($arg as xs:time?) as xs:dayTimeDuration? external", "description" : "

Returns the timezone component of an xs:time.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns the timezone component of $arg, if any. If\n $arg has a timezone component, then the result is an\n xs:dayTimeDuration that indicates deviation from UTC; its value may\n range from +14:00 to -14:00 hours, both inclusive. If $arg has no timezone\n component, the result is the empty sequence.

The expression fn:timezone-from-time(xs:time(\"13:20:00-05:00\")) returns xs:dayTimeDuration(\"-PT5H\").

The expression fn:timezone-from-time(xs:time(\"13:20:00\")) returns ().

\n", "summary" : "

Returns the timezone component of an xs:time .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:time", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:dayTimeDuration?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "tokenize", "qname" : "fn:tokenize", "signature" : "($input as xs:string?, $pattern as xs:string) as xs:string* external", "description" : "

Returns a sequence of strings constructed by splitting the input wherever a\n separator is found; the separator is any substring that matches a given regular\n expression.

This function is deterministic, context-independent, and focus-independent.

The effect of calling the first version of this function (omitting the argument\n $flags) is the same as the effect of calling the second version with the\n $flags argument set to a zero-length string. Flags are defined in\n .

The $flags argument is interpreted in the same way as for the\n fn:matches function.

If $input is the empty sequence, or if $input is the\n zero-length string, the function returns the empty sequence.

The function returns a sequence of strings formed by breaking the $input\n string into a sequence of strings, treating any substring that matches\n $pattern as a separator. The separators themselves are not returned.

If a separator occurs at the start of the $input string, the result\n sequence will start with a zero-length string. Zero-length strings will also occur in\n the result sequence if a separator occurs at the end of the $input string,\n or if two adjacent substrings match the supplied $pattern.

If two alternatives within the supplied $pattern both match at the same\n position in the $input string, then the match that is chosen is the first.\n For example:

fn:tokenize(\"abracadabra\", \"(ab)|(a)\") returns (\"\", \"r\", \"c\", \"d\", \"r\", \"\")

A dynamic error is raised if the value of\n $pattern is invalid according to the rules described in section .

A dynamic error is raised if the value of\n $flags is invalid according to the rules described in section .

A dynamic error is raised if the supplied\n $pattern matches a zero-length string, that is, if fn:matches(\"\",\n $pattern, $flags) returns true.

\n", "summary" : "

Returns a sequence of strings constructed by splitting the input wherever a\n separator is found; the separator is any substring that matches a given regular\n expression.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "input", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "pattern", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "tokenize", "qname" : "fn:tokenize", "signature" : "($input as xs:string?, $pattern as xs:string, $flags as xs:string) as xs:string* external", "description" : "

Returns a sequence of strings constructed by splitting the input wherever a\n separator is found; the separator is any substring that matches a given regular\n expression.

This function is deterministic, context-independent, and focus-independent.

The effect of calling the first version of this function (omitting the argument\n $flags) is the same as the effect of calling the second version with the\n $flags argument set to a zero-length string. Flags are defined in\n .

The $flags argument is interpreted in the same way as for the\n fn:matches function.

If $input is the empty sequence, or if $input is the\n zero-length string, the function returns the empty sequence.

The function returns a sequence of strings formed by breaking the $input\n string into a sequence of strings, treating any substring that matches\n $pattern as a separator. The separators themselves are not returned.

If a separator occurs at the start of the $input string, the result\n sequence will start with a zero-length string. Zero-length strings will also occur in\n the result sequence if a separator occurs at the end of the $input string,\n or if two adjacent substrings match the supplied $pattern.

If two alternatives within the supplied $pattern both match at the same\n position in the $input string, then the match that is chosen is the first.\n For example:

fn:tokenize(\"abracadabra\", \"(ab)|(a)\") returns (\"\", \"r\", \"c\", \"d\", \"r\", \"\")

A dynamic error is raised if the value of\n $pattern is invalid according to the rules described in section .

A dynamic error is raised if the value of\n $flags is invalid according to the rules described in section .

A dynamic error is raised if the supplied\n $pattern matches a zero-length string, that is, if fn:matches(\"\",\n $pattern, $flags) returns true.

\n", "summary" : "

Returns a sequence of strings constructed by splitting the input wherever a\n separator is found; the separator is any substring that matches a given regular\n expression.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "input", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "pattern", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "flags", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "trace", "qname" : "fn:trace", "signature" : "($value as item()*, $label as xs:string) as item()* external", "description" : "

Provides an execution trace intended to be used in debugging queries.

This function is deterministic, context-independent, and focus-independent.

The function returns the value of $value, unchanged.

In addition, the values of $value, converted to an xs:string,\n and $label\n may be directed to a trace data set. The destination of the trace\n output is . The format of the trace output is\n . The ordering of output from calls of the\n fn:trace function is .

Consider a situation in which a user wants to investigate the actual value passed to\n a function. Assume that in a particular execution, $v is an\n xs:decimal with value 124.84. Writing fn:trace($v,\n 'the value of $v is:') will put the strings \"124.84\" and\n \"the value of $v is:\" in the trace data set in implementation\n dependent order.

\n", "summary" : "

Provides an execution trace intended to be used in debugging queries.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "label", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "translate", "qname" : "fn:translate", "signature" : "($arg as xs:string?, $mapString as xs:string, $transString as xs:string) as xs:string external", "description" : "

Returns the value of $arg modified by replacing or removing\n individual characters.

This function is deterministic, context-independent, and focus-independent.

If the value of $arg is the empty sequence, the function returns the\n zero-length string.

Otherwise, the function returns a result string constructed by processing each character in the value of $arg, in order,\n according to the following rules:

If the character does not appear in the value of $mapString then it\n is added to the result string unchanged.

If the character first appears in the value of $mapString at some\n position M, where the value of $transString is\n M or more characters in length, then the character at position\n M in $transString is added to the result string.

If the character first appears in the value of $mapString at some\n position M, where the value of $transString is less than\n M characters in length, then the character is omitted from the\n result string.

If $mapString is the zero-length string then the function returns\n $arg unchanged.

If a character occurs more than once in $mapString, then the first\n occurrence determines the action taken.

If $transString is longer than $mapString, the excess\n characters are ignored.

\n", "summary" : "

Returns the value of $arg modified by replacing or removing\n individual characters.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "mapString", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "transString", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "true", "qname" : "fn:true", "signature" : "() as xs:boolean external", "description" : "

Returns the xs:boolean value true.

This function is deterministic, context-independent, and focus-independent.

The result is equivalent to xs:boolean(\"1\").

The expression fn:true() returns xs:boolean(1).

\n", "summary" : "

Returns the xs:boolean value true .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "unordered", "qname" : "fn:unordered", "signature" : "($sourceSeq as item()*) as item()* external", "description" : "

Returns the items of $sourceSeq in an order.

This function is deterministic, context-independent, and focus-independent.

The function returns the items of $sourceSeq in an order.

Query optimizers may be able to do a better job if the order of the output sequence is\n not specified. For example, when retrieving prices from a purchase order, if an index\n exists on prices, it may be more efficient to return the prices in index order rather\n than in document order.

\n", "summary" : "

Returns the items of $sourceSeq in an order.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "sourceSeq", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "unparsed-text-available", "qname" : "fn:unparsed-text-available", "signature" : "($href as xs:string?) as xs:boolean external", "description" : "

Because errors in evaluating the fn:unparsed-text function are\n non-recoverable, these two functions are provided to allow an application to determine\n whether a call with particular arguments would succeed.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

The fn:unparsed-text-available function determines whether a call\n on the fn:unparsed-text function with identical arguments would\n return a string.

If the first argument is an empty sequence, the function returns false. If the second\n argument is an empty sequence, the function behaves as if the second argument were\n omitted.

In other cases, the function returns true if a call on\n fn:unparsed-text with the same arguments would succeed, and\n false if a call on fn:unparsed-text with the same arguments would\n fail with a non-recoverable dynamic error.

The functions fn:unparsed-text and\n fn:unparsed-text-available have the same requirement for\n determinism as the functions\n fn:doc and fn:doc-available. This means that unless the\n user has explicitly stated a requirement for a reduced level of determinism, either of\n these functions if called twice with the same arguments during the course of a\n transformation must return the same results each time; moreover, the\n results of a call on fn:unparsed-text-available\n must be consistent with the results of a subsequent call on\n unparsed-text with the same arguments.

This requires that the unparsed-text-available function should\n actually attempt to read the resource identified by the URI, and check that it is\n correctly encoded and contains no characters that are invalid in XML. Implementations\n may avoid the cost of repeating these checks for example by caching the validated\n contents of the resource, to anticipate a subsequent call on the\n unparsed-text\n or unparsed-text-lines\n function. Alternatively, implementations may be able to rewrite an expression\n such as if (unparsed-text-available(A)) then unparsed-text(A) else ... to\n generate a single call internally.

\n", "summary" : "

Because errors in evaluating the fn:unparsed-text function are\n non-recoverable, these two functions are provided to allow an application to determine\n whether a call with particular arguments would succeed.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "unparsed-text-available", "qname" : "fn:unparsed-text-available", "signature" : "($href as xs:string?) as xs:boolean external", "description" : "

Because errors in evaluating the fn:unparsed-text function are\n non-recoverable, these two functions are provided to allow an application to determine\n whether a call with particular arguments would succeed.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

The fn:unparsed-text-available function determines whether a call\n on the fn:unparsed-text function with identical arguments would\n return a string.

If the first argument is an empty sequence, the function returns false. If the second\n argument is an empty sequence, the function behaves as if the second argument were\n omitted.

In other cases, the function returns true if a call on\n fn:unparsed-text with the same arguments would succeed, and\n false if a call on fn:unparsed-text with the same arguments would\n fail with a non-recoverable dynamic error.

The functions fn:unparsed-text and\n fn:unparsed-text-available have the same requirement for\n determinism as the functions\n fn:doc and fn:doc-available. This means that unless the\n user has explicitly stated a requirement for a reduced level of determinism, either of\n these functions if called twice with the same arguments during the course of a\n transformation must return the same results each time; moreover, the\n results of a call on fn:unparsed-text-available\n must be consistent with the results of a subsequent call on\n unparsed-text with the same arguments.

This requires that the unparsed-text-available function should\n actually attempt to read the resource identified by the URI, and check that it is\n correctly encoded and contains no characters that are invalid in XML. Implementations\n may avoid the cost of repeating these checks for example by caching the validated\n contents of the resource, to anticipate a subsequent call on the\n unparsed-text\n or unparsed-text-lines\n function. Alternatively, implementations may be able to rewrite an expression\n such as if (unparsed-text-available(A)) then unparsed-text(A) else ... to\n generate a single call internally.

\n", "summary" : "

Because errors in evaluating the fn:unparsed-text function are\n non-recoverable, these two functions are provided to allow an application to determine\n whether a call with particular arguments would succeed.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "unparsed-text-available", "qname" : "fn:unparsed-text-available", "signature" : "($href as xs:string?, $encoding as xs:string) as xs:boolean external", "description" : "

Because errors in evaluating the fn:unparsed-text function are\n non-recoverable, these two functions are provided to allow an application to determine\n whether a call with particular arguments would succeed.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

The fn:unparsed-text-available function determines whether a call\n on the fn:unparsed-text function with identical arguments would\n return a string.

If the first argument is an empty sequence, the function returns false. If the second\n argument is an empty sequence, the function behaves as if the second argument were\n omitted.

In other cases, the function returns true if a call on\n fn:unparsed-text with the same arguments would succeed, and\n false if a call on fn:unparsed-text with the same arguments would\n fail with a non-recoverable dynamic error.

The functions fn:unparsed-text and\n fn:unparsed-text-available have the same requirement for\n determinism as the functions\n fn:doc and fn:doc-available. This means that unless the\n user has explicitly stated a requirement for a reduced level of determinism, either of\n these functions if called twice with the same arguments during the course of a\n transformation must return the same results each time; moreover, the\n results of a call on fn:unparsed-text-available\n must be consistent with the results of a subsequent call on\n unparsed-text with the same arguments.

This requires that the unparsed-text-available function should\n actually attempt to read the resource identified by the URI, and check that it is\n correctly encoded and contains no characters that are invalid in XML. Implementations\n may avoid the cost of repeating these checks for example by caching the validated\n contents of the resource, to anticipate a subsequent call on the\n unparsed-text\n or unparsed-text-lines\n function. Alternatively, implementations may be able to rewrite an expression\n such as if (unparsed-text-available(A)) then unparsed-text(A) else ... to\n generate a single call internally.

\n", "summary" : "

Because errors in evaluating the fn:unparsed-text function are\n non-recoverable, these two functions are provided to allow an application to determine\n whether a call with particular arguments would succeed.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "encoding", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "unparsed-text-available", "qname" : "fn:unparsed-text-available", "signature" : "($href as xs:string?, $encoding as xs:string) as xs:boolean external", "description" : "

Because errors in evaluating the fn:unparsed-text function are\n non-recoverable, these two functions are provided to allow an application to determine\n whether a call with particular arguments would succeed.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

The fn:unparsed-text-available function determines whether a call\n on the fn:unparsed-text function with identical arguments would\n return a string.

If the first argument is an empty sequence, the function returns false. If the second\n argument is an empty sequence, the function behaves as if the second argument were\n omitted.

In other cases, the function returns true if a call on\n fn:unparsed-text with the same arguments would succeed, and\n false if a call on fn:unparsed-text with the same arguments would\n fail with a non-recoverable dynamic error.

The functions fn:unparsed-text and\n fn:unparsed-text-available have the same requirement for\n determinism as the functions\n fn:doc and fn:doc-available. This means that unless the\n user has explicitly stated a requirement for a reduced level of determinism, either of\n these functions if called twice with the same arguments during the course of a\n transformation must return the same results each time; moreover, the\n results of a call on fn:unparsed-text-available\n must be consistent with the results of a subsequent call on\n unparsed-text with the same arguments.

This requires that the unparsed-text-available function should\n actually attempt to read the resource identified by the URI, and check that it is\n correctly encoded and contains no characters that are invalid in XML. Implementations\n may avoid the cost of repeating these checks for example by caching the validated\n contents of the resource, to anticipate a subsequent call on the\n unparsed-text\n or unparsed-text-lines\n function. Alternatively, implementations may be able to rewrite an expression\n such as if (unparsed-text-available(A)) then unparsed-text(A) else ... to\n generate a single call internally.

\n", "summary" : "

Because errors in evaluating the fn:unparsed-text function are\n non-recoverable, these two functions are provided to allow an application to determine\n whether a call with particular arguments would succeed.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "encoding", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "unparsed-text-lines", "qname" : "fn:unparsed-text-lines", "signature" : "($href as xs:string?) as xs:string* external", "description" : "

The fn:unparsed-text-lines function reads an external resource (for\n example, a file) and returns its contents as a sequence of strings, one for each line of\n text in the string representation of the resource.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

The unparsed-text-lines function reads an external resource (for example, a\n file) and returns its string representation as a sequence of strings, separated at newline\n boundaries.

The result of the single-argument function is the same as the result of the expression\n fn:tokenize(fn:unparsed-text($href), '\\r\\n|\\r|\\n')[not(position()=last() and\n .='')]. The result of the two-argument function is the same as the result of\n the expression fn:tokenize(fn:unparsed-text($href, $encoding),\n '\\r\\n|\\r|\\n'))[not(position()=last() and .='')].

The result is a thus a sequence of strings containing the text of the resource retrieved\n using the URI, each string representing one line of text. Lines are separated by one of\n the sequences x0A, x0D, or x0Dx0A. The characters representing the newline are not\n included in the returned strings. If there are two adjacent newline sequences, a\n zero-length string will be returned to represent the empty line; but if the external\n resource ends with a newline sequence, no zero-length string will be returned as the\n last item in the result.

Error conditions are the same as for the fn:unparsed-text function.

\n", "summary" : "

The fn:unparsed-text-lines function reads an external resource (for\n example, a file) and returns its contents as a sequence of strings, one for each line of\n text in the string representation of the resource.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "unparsed-text-lines", "qname" : "fn:unparsed-text-lines", "signature" : "($href as xs:string?, $encoding as xs:string) as xs:string* external", "description" : "

The fn:unparsed-text-lines function reads an external resource (for\n example, a file) and returns its contents as a sequence of strings, one for each line of\n text in the string representation of the resource.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

The unparsed-text-lines function reads an external resource (for example, a\n file) and returns its string representation as a sequence of strings, separated at newline\n boundaries.

The result of the single-argument function is the same as the result of the expression\n fn:tokenize(fn:unparsed-text($href), '\\r\\n|\\r|\\n')[not(position()=last() and\n .='')]. The result of the two-argument function is the same as the result of\n the expression fn:tokenize(fn:unparsed-text($href, $encoding),\n '\\r\\n|\\r|\\n'))[not(position()=last() and .='')].

The result is a thus a sequence of strings containing the text of the resource retrieved\n using the URI, each string representing one line of text. Lines are separated by one of\n the sequences x0A, x0D, or x0Dx0A. The characters representing the newline are not\n included in the returned strings. If there are two adjacent newline sequences, a\n zero-length string will be returned to represent the empty line; but if the external\n resource ends with a newline sequence, no zero-length string will be returned as the\n last item in the result.

Error conditions are the same as for the fn:unparsed-text function.

\n", "summary" : "

The fn:unparsed-text-lines function reads an external resource (for\n example, a file) and returns its contents as a sequence of strings, one for each line of\n text in the string representation of the resource.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "encoding", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "unparsed-text-lines", "qname" : "fn:unparsed-text-lines", "signature" : "($href as xs:string?, $encoding as xs:string) as xs:string* external", "description" : "

The fn:unparsed-text-lines function reads an external resource (for\n example, a file) and returns its contents as a sequence of strings, one for each line of\n text in the string representation of the resource.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

The unparsed-text-lines function reads an external resource (for example, a\n file) and returns its string representation as a sequence of strings, separated at newline\n boundaries.

The result of the single-argument function is the same as the result of the expression\n fn:tokenize(fn:unparsed-text($href), '\\r\\n|\\r|\\n')[not(position()=last() and\n .='')]. The result of the two-argument function is the same as the result of\n the expression fn:tokenize(fn:unparsed-text($href, $encoding),\n '\\r\\n|\\r|\\n'))[not(position()=last() and .='')].

The result is a thus a sequence of strings containing the text of the resource retrieved\n using the URI, each string representing one line of text. Lines are separated by one of\n the sequences x0A, x0D, or x0Dx0A. The characters representing the newline are not\n included in the returned strings. If there are two adjacent newline sequences, a\n zero-length string will be returned to represent the empty line; but if the external\n resource ends with a newline sequence, no zero-length string will be returned as the\n last item in the result.

Error conditions are the same as for the fn:unparsed-text function.

\n", "summary" : "

The fn:unparsed-text-lines function reads an external resource (for\n example, a file) and returns its contents as a sequence of strings, one for each line of\n text in the string representation of the resource.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "encoding", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "unparsed-text", "qname" : "fn:unparsed-text", "signature" : "($href as xs:string?) as xs:string? external", "description" : "

The fn:unparsed-text function reads an external resource (for example, a\n file) and returns a string representation of the resource.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

The $href argument must be a string in the form of a URI\n reference, which must contain no fragment identifier, and\n must identify a resource\n for which a string representation is available. If the URI is a\n relative URI reference, then it is resolved relative to the\n Static Base URI property from the static context.

The mapping of URIs to the string representation of a resource is the mapping defined\n in the available text resources\n component of the dynamic context.

If the value of the $href argument is an empty sequence, the function\n returns an empty sequence.

The $encoding argument, if present, is the name of an encoding. The values\n for this attribute follow the same rules as for the encoding attribute in\n an XML declaration. The only values which every implementation is required to recognize are\n utf-8 and utf-16.

The encoding of the external resource is determined as follows:

external encoding information is used if available, otherwise

if the media type of the resource is text/xml or\n application/xml (see ), or if it matches\n the conventions text/*+xml or application/*+xml (see\n and/or its successors), then the encoding is recognized\n as specified in , otherwise

the value of the $encoding argument is used if present, otherwise

the processor may use implementation-defined heuristics to determine the likely encoding,\n otherwise

UTF-8 is assumed.

The result of the function is a string containing the\n string representation of the resource retrieved\n using the URI.

A dynamic error is raised if $href\n contains a fragment identifier, or if it cannot be used to retrieve the\n string representation of a resource.

A dynamic error is raised if the value\n of the $encoding argument is not a valid encoding name, if the processor does not support the specified encoding,\n if the string representation of the retrieved\n resource contains octets that cannot be decoded into Unicode characters using the specified encoding, or if the resulting characters\n are not permitted XML characters.

A dynamic error is raised if\n $encoding is absent and the processor cannot infer the encoding using external information and the\n encoding is not UTF-8.

\n", "summary" : "

The fn:unparsed-text function reads an external resource (for example, a\n file) and returns a string representation of the resource .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "unparsed-text", "qname" : "fn:unparsed-text", "signature" : "($href as xs:string?) as xs:string? external", "description" : "

The fn:unparsed-text function reads an external resource (for example, a\n file) and returns a string representation of the resource.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

The $href argument must be a string in the form of a URI\n reference, which must contain no fragment identifier, and\n must identify a resource\n for which a string representation is available. If the URI is a\n relative URI reference, then it is resolved relative to the\n Static Base URI property from the static context.

The mapping of URIs to the string representation of a resource is the mapping defined\n in the available text resources\n component of the dynamic context.

If the value of the $href argument is an empty sequence, the function\n returns an empty sequence.

The $encoding argument, if present, is the name of an encoding. The values\n for this attribute follow the same rules as for the encoding attribute in\n an XML declaration. The only values which every implementation is required to recognize are\n utf-8 and utf-16.

The encoding of the external resource is determined as follows:

external encoding information is used if available, otherwise

if the media type of the resource is text/xml or\n application/xml (see ), or if it matches\n the conventions text/*+xml or application/*+xml (see\n and/or its successors), then the encoding is recognized\n as specified in , otherwise

the value of the $encoding argument is used if present, otherwise

the processor may use implementation-defined heuristics to determine the likely encoding,\n otherwise

UTF-8 is assumed.

The result of the function is a string containing the\n string representation of the resource retrieved\n using the URI.

A dynamic error is raised if $href\n contains a fragment identifier, or if it cannot be used to retrieve the\n string representation of a resource.

A dynamic error is raised if the value\n of the $encoding argument is not a valid encoding name, if the processor does not support the specified encoding,\n if the string representation of the retrieved\n resource contains octets that cannot be decoded into Unicode characters using the specified encoding, or if the resulting characters\n are not permitted XML characters.

A dynamic error is raised if\n $encoding is absent and the processor cannot infer the encoding using external information and the\n encoding is not UTF-8.

\n", "summary" : "

The fn:unparsed-text function reads an external resource (for example, a\n file) and returns a string representation of the resource .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "unparsed-text", "qname" : "fn:unparsed-text", "signature" : "($href as xs:string?, $encoding as xs:string) as xs:string? external", "description" : "

The fn:unparsed-text function reads an external resource (for example, a\n file) and returns a string representation of the resource.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

The $href argument must be a string in the form of a URI\n reference, which must contain no fragment identifier, and\n must identify a resource\n for which a string representation is available. If the URI is a\n relative URI reference, then it is resolved relative to the\n Static Base URI property from the static context.

The mapping of URIs to the string representation of a resource is the mapping defined\n in the available text resources\n component of the dynamic context.

If the value of the $href argument is an empty sequence, the function\n returns an empty sequence.

The $encoding argument, if present, is the name of an encoding. The values\n for this attribute follow the same rules as for the encoding attribute in\n an XML declaration. The only values which every implementation is required to recognize are\n utf-8 and utf-16.

The encoding of the external resource is determined as follows:

external encoding information is used if available, otherwise

if the media type of the resource is text/xml or\n application/xml (see ), or if it matches\n the conventions text/*+xml or application/*+xml (see\n and/or its successors), then the encoding is recognized\n as specified in , otherwise

the value of the $encoding argument is used if present, otherwise

the processor may use implementation-defined heuristics to determine the likely encoding,\n otherwise

UTF-8 is assumed.

The result of the function is a string containing the\n string representation of the resource retrieved\n using the URI.

A dynamic error is raised if $href\n contains a fragment identifier, or if it cannot be used to retrieve the\n string representation of a resource.

A dynamic error is raised if the value\n of the $encoding argument is not a valid encoding name, if the processor does not support the specified encoding,\n if the string representation of the retrieved\n resource contains octets that cannot be decoded into Unicode characters using the specified encoding, or if the resulting characters\n are not permitted XML characters.

A dynamic error is raised if\n $encoding is absent and the processor cannot infer the encoding using external information and the\n encoding is not UTF-8.

\n", "summary" : "

The fn:unparsed-text function reads an external resource (for example, a\n file) and returns a string representation of the resource .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "encoding", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "unparsed-text", "qname" : "fn:unparsed-text", "signature" : "($href as xs:string?, $encoding as xs:string) as xs:string? external", "description" : "

The fn:unparsed-text function reads an external resource (for example, a\n file) and returns a string representation of the resource.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tstatic base uri.\n \t

The $href argument must be a string in the form of a URI\n reference, which must contain no fragment identifier, and\n must identify a resource\n for which a string representation is available. If the URI is a\n relative URI reference, then it is resolved relative to the\n Static Base URI property from the static context.

The mapping of URIs to the string representation of a resource is the mapping defined\n in the available text resources\n component of the dynamic context.

If the value of the $href argument is an empty sequence, the function\n returns an empty sequence.

The $encoding argument, if present, is the name of an encoding. The values\n for this attribute follow the same rules as for the encoding attribute in\n an XML declaration. The only values which every implementation is required to recognize are\n utf-8 and utf-16.

The encoding of the external resource is determined as follows:

external encoding information is used if available, otherwise

if the media type of the resource is text/xml or\n application/xml (see ), or if it matches\n the conventions text/*+xml or application/*+xml (see\n and/or its successors), then the encoding is recognized\n as specified in , otherwise

the value of the $encoding argument is used if present, otherwise

the processor may use implementation-defined heuristics to determine the likely encoding,\n otherwise

UTF-8 is assumed.

The result of the function is a string containing the\n string representation of the resource retrieved\n using the URI.

A dynamic error is raised if $href\n contains a fragment identifier, or if it cannot be used to retrieve the\n string representation of a resource.

A dynamic error is raised if the value\n of the $encoding argument is not a valid encoding name, if the processor does not support the specified encoding,\n if the string representation of the retrieved\n resource contains octets that cannot be decoded into Unicode characters using the specified encoding, or if the resulting characters\n are not permitted XML characters.

A dynamic error is raised if\n $encoding is absent and the processor cannot infer the encoding using external information and the\n encoding is not UTF-8.

\n", "summary" : "

The fn:unparsed-text function reads an external resource (for example, a\n file) and returns a string representation of the resource .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "encoding", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "upper-case", "qname" : "fn:upper-case", "signature" : "($arg as xs:string?) as xs:string external", "description" : "

Converts a string to upper case.

This function is deterministic, context-independent, and focus-independent.

If the value of $arg is the empty sequence, the zero-length string is\n returned.

Otherwise, the function returns the value of $arg after translating every\n character to its upper-case correspondent as\n defined in the appropriate case mappings section in the Unicode standard . For versions of Unicode beginning with the 2.1.8 update, only\n locale-insensitive case mappings should be applied. Beginning with version 3.2.0 (and\n likely future versions) of Unicode, precise mappings are described in default case\n operations, which are full case mappings in the absence of tailoring for particular\n languages and environments. Every lower-case character that does not have an upper-case\n correspondent, as well as every upper-case character, is included in the returned value\n in its original form.

Case mappings may change the length of a string. In general, the\n fn:upper-case and fn:lower-case functions are not inverses\n of each other: fn:lower-case(fn:upper-case($arg)) is not guaranteed to\n return $arg, nor is fn:upper-case(fn:lower-case($arg)). The\n Latin small letter dotless i (as used in Turkish) is perhaps the most prominent\n lower-case letter which will not round-trip. The Latin capital letter i with dot above\n is the most prominent upper-case letter which will not round trip; there are others,\n such as Latin capital letter Sharp S (#1E9E) which is introduced in Unicode 5.1.

These functions may not always be linguistically appropriate (e.g. Turkish i without\n dot) or appropriate for the application (e.g. titlecase). In cases such as Turkish, a\n simple translation should be used first.

Because the function is not sensitive to locale, results will not always match user\n expectations. In Quebec, for example, the standard uppercase equivalent of \"è\" is \"È\",\n while in metropolitan France it is more commonly \"E\"; only one of these is supported by\n the functions as defined.

Many characters of class Ll lack uppercase equivalents in the Unicode case mapping\n tables; many characters of class Lu lack lowercase equivalents.

\n", "summary" : "

Converts a string to upper case.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "uri-collection", "qname" : "fn:uri-collection", "signature" : "() as xs:anyURI* external", "description" : "

Returns a sequence of xs:anyURI values representing the URIs in a resource collection.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tavailable resource collections, and static base uri.\n \t

The zero-argument form of the function returns the URIs in the Default resource collection\n described in .

If the value of $arg is a relative xs:anyURI, it is resolved\n against the value of the base-URI property from the static context.

If $arg is the empty sequence, the function behaves as if it had been\n called without an argument. See above.

The single-argument form of the function returns the sequence of URIs corresponding to the\n supplied URI in the Available resource collections described in\n .

A dynamic error is raised if no URI is supplied (that is, if the\n the function is called with no arguments, or with a single argument that evaluates to an empty sequence), and the\n value of the default resource collection is absent.

A dynamic error is raised \n if available resource collections provides no mapping for the absolutized URI.

A dynamic error is raised if $arg is not a\n valid xs:anyURI.

\n", "summary" : "

Returns a sequence of xs:anyURI values representing the URIs in a resource collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:anyURI*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "uri-collection", "qname" : "fn:uri-collection", "signature" : "() as xs:anyURI* external", "description" : "

Returns a sequence of xs:anyURI values representing the URIs in a resource collection.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tavailable resource collections, and static base uri.\n \t

The zero-argument form of the function returns the URIs in the Default resource collection\n described in .

If the value of $arg is a relative xs:anyURI, it is resolved\n against the value of the base-URI property from the static context.

If $arg is the empty sequence, the function behaves as if it had been\n called without an argument. See above.

The single-argument form of the function returns the sequence of URIs corresponding to the\n supplied URI in the Available resource collections described in\n .

A dynamic error is raised if no URI is supplied (that is, if the\n the function is called with no arguments, or with a single argument that evaluates to an empty sequence), and the\n value of the default resource collection is absent.

A dynamic error is raised \n if available resource collections provides no mapping for the absolutized URI.

A dynamic error is raised if $arg is not a\n valid xs:anyURI.

\n", "summary" : "

Returns a sequence of xs:anyURI values representing the URIs in a resource collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:anyURI*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "uri-collection", "qname" : "fn:uri-collection", "signature" : "($arg as xs:string?) as xs:anyURI* external", "description" : "

Returns a sequence of xs:anyURI values representing the URIs in a resource collection.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tavailable resource collections, and static base uri.\n \t

The zero-argument form of the function returns the URIs in the Default resource collection\n described in .

If the value of $arg is a relative xs:anyURI, it is resolved\n against the value of the base-URI property from the static context.

If $arg is the empty sequence, the function behaves as if it had been\n called without an argument. See above.

The single-argument form of the function returns the sequence of URIs corresponding to the\n supplied URI in the Available resource collections described in\n .

A dynamic error is raised if no URI is supplied (that is, if the\n the function is called with no arguments, or with a single argument that evaluates to an empty sequence), and the\n value of the default resource collection is absent.

A dynamic error is raised \n if available resource collections provides no mapping for the absolutized URI.

A dynamic error is raised if $arg is not a\n valid xs:anyURI.

\n", "summary" : "

Returns a sequence of xs:anyURI values representing the URIs in a resource collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:anyURI*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "uri-collection", "qname" : "fn:uri-collection", "signature" : "($arg as xs:string?) as xs:anyURI* external", "description" : "

Returns a sequence of xs:anyURI values representing the URIs in a resource collection.

This function is deterministic, context-dependent, and focus-independent. It depends on\n \t\tavailable resource collections, and static base uri.\n \t

The zero-argument form of the function returns the URIs in the Default resource collection\n described in .

If the value of $arg is a relative xs:anyURI, it is resolved\n against the value of the base-URI property from the static context.

If $arg is the empty sequence, the function behaves as if it had been\n called without an argument. See above.

The single-argument form of the function returns the sequence of URIs corresponding to the\n supplied URI in the Available resource collections described in\n .

A dynamic error is raised if no URI is supplied (that is, if the\n the function is called with no arguments, or with a single argument that evaluates to an empty sequence), and the\n value of the default resource collection is absent.

A dynamic error is raised \n if available resource collections provides no mapping for the absolutized URI.

A dynamic error is raised if $arg is not a\n valid xs:anyURI.

\n", "summary" : "

Returns a sequence of xs:anyURI values representing the URIs in a resource collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:anyURI*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "year-from-date", "qname" : "fn:year-from-date", "signature" : "($arg as xs:date?) as xs:integer? external", "description" : "

Returns the year component of an xs:date.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an xs:integer representing the year in the\n local value of $arg. The value may be negative.

The expression fn:year-from-date(xs:date(\"1999-05-31\")) returns 1999.

The expression fn:year-from-date(xs:date(\"2000-01-01+05:00\")) returns 2000.

\n", "summary" : "

Returns the year component of an xs:date .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:date", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "years-from-duration", "qname" : "fn:years-from-duration", "signature" : "($arg as xs:duration?) as xs:integer? external", "description" : "

Returns the number of years in a duration.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise, the function returns an xs:integer representing the years\n component in the value of $arg. The result is obtained by casting\n $arg to an xs:yearMonthDuration (see ) and then computing the years component as described in\n .

If $arg is a negative duration then the result will be negative..

If $arg is an xs:dayTimeDuration the function returns 0.

The expression fn:years-from-duration(xs:yearMonthDuration(\"P20Y15M\")) returns 21.

The expression fn:years-from-duration(xs:yearMonthDuration(\"-P15M\")) returns -1.

The expression fn:years-from-duration(xs:dayTimeDuration(\"-P2DT15H\")) returns 0.

\n", "summary" : "

Returns the number of years in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:duration", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "zero-or-one", "qname" : "fn:zero-or-one", "signature" : "($arg as item()*) as item()? external", "description" : "

Returns $arg if it contains zero or one items. Otherwise, raises\n an error.

This function is deterministic, context-independent, and focus-independent.

Except in error cases, the function returns $arg unchanged.

For detailed type semantics, see [Formal Semantics].

A dynamic error is raised if $arg contains more\n than one item.

\n", "summary" : "

Returns $arg if it contains zero or one items.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "item()?", "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/csv" : { "ns" : "http://zorba.io/modules/csv", "description" : " Function library providing converters from CSV/TXT to XML and back.\n The functions are optimized to work with large amounts of data, in a streaming way.\n", "sees" : [ ], "authors" : [ "Daniel Turcanu" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/csv", "prefix" : "csv" }, { "uri" : "http://zorba.io/modules/csv-options", "prefix" : "csv-options" }, { "uri" : "http://zorba.io/modules/schema", "prefix" : "schemaOptions" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "parse", "qname" : "csv:parse", "signature" : "($csv as xs:string, $options as element(csv-options:options)?) as element(*)*", "description" : " Parse a CSV or fixed size text and convert to XML.
\n By default each line is converted to a <row> element, and each field to a <column> element inside <row>.
\n The format of the param $options is:
\n
\n    <csv-options:options>\n        <csv  [separator=\"default comma ,\"] ?\n          [quote-char=\"default double quotes &quote;\"]?\n          [quote-escape=\"default double double quotes &quote;&quote;\"]? />\n        or\n        <column-widths>\n          <column-width>[column fixed width, unsigned int]<column-width>*\n        </column-widths>\n        or\n        <column-positions>\n          <column-position>[column position on line, unsigned int]<column-position>*\n        </column-positions>\n        <first-row-is-header [line=\"first_line[-last_line]?\"]?/>?\n        <start-from-row line=\"first_line[-last_line]?\"/>?\n        <add-last-void-columns/>?\n        <xml-nodes>\n          [<row-name>\n            [<column-name/>]?\n          </row-name>]?\n        </xml-nodes>?\n    </csv-options:options>\n  
\n All the parameters are optional and can appear in any order.
\n All the parameters are case sensitive. The namespace used is \"http://zorba.io/modules/csv-options\".
\n All strings must have UTF-8 encoding.
\n Parameters csv, column-widths, column-positions are mutually exclusive. If none is specified,\n the input string is assumed to be csv.
\n Description of parameters:\n
\n
csv
\n
Specifies the parameters for parsing a csv string.
\n
\n
separator
\n
The character or group of characters used to separating fields in a row.\n If it is not specified, it defaults to comma ','.\n
\n
quote-char
\n
The character or group of characters used for quoting the fields that may contain special characters,\n like separator, new line or this quote char. The default value is double quote \".
\n
\n
quote-escape
\n
The group of characters used for escaping the quote char inside a field. The whole quote escape group\n is translated to a quote char during parsing. The default value is double double quotes \"\".
\n
\n
\n
\n
\n
column-widths
\n
Specifies the column widths for fixed size text. It contains multiple column-width child elements\n specifying the fixed width of each column, from left to right.
\n If the line has more fields than specified, they are ignored.\n
\n
column-positions
\n
This is an alternative to column-widths, and specifies instead the starting position of each column.\n Column positions are 1 based, and are specified in order from left to right.\n The last column is read until end of line. The first column position can be greater than 1, if you want\n to parse only a part of the input text.\n
\n
first-row-is-header
\n
The presence of this element indicates that the first row is to be treated as the name of the columns.\n If it is not present, then each field is enclosed in a <column> element,\n or how it is specified in <xml-nodes> parameter.
\n If the first row is the header, then each field is enclosed in an element with the corresponding name from the header.
\n For example, the csv:\n
\n        ID,Name,Occupation\n        1,John,student\n        
\n is parsed into:\n
\n        <row>\n        <ID>1</ID>\n        <Name>John</Name>\n        <Occupation>student</Occupation>\n        </row>\n        
\n If the header names contain characters that cannot be used in a QName, they are replaced with underscore '_'.
\n The namespace for the header QNames is taken from the column name specified in xml-nodes parameter, or from\n the row name, or if that doesn't exist either then empty namespace is used.
\n If the header is not the first line in the input string, the starting line can be specified in the line attribute.
\n If a column does not have a name, a new name is constructed in the form columnN where N is the position of the column,\n starting from 1.
\n Subheaders
\n If the header consists of more than one line, this can be specified in the line attribute in the form\n \"first_line - last_line\". Having more lines as the header translates into a hierarchy of elements in the xml.
\n For example, the csv:\n
\n        ID,Name,,Occupation\n        ,First Name,Last Name,\n        1,John,Howard,student\n        
\n is parsed into:\n
\n        <row>\n        <ID>1</ID>\n        <Name>\n          <First_Name>John</First_Name>\n          <Last_Name>Howard</Last_Name>\n        </Name>\n        <Occupation>student</Occupation>\n        </row>\n        
\n This element can have an attribute \"accept-all-lines\" with values \"false\" or \"true\" (default \"false\").\n When set to true it tells the parser to not report lines that do not have the same number of items as\n the header. If set to false, the parser will raise a csv:WrongInput error for these lines.
\n
\n
start-from-row
\n
If the data does not start from line 1 or immediately after the header,\n you can specify the starting line in the line attribute.
\n Also you can use this attribute in the form \"first_line - last_line\" to specify also the last line\n if you don't want the whole csv to be parsed.\n
\n
add-last-void-columns
\n
In the case when using headers and some data lines are shorter than the header, by default the excess columns are ignored\n for those lines. You can set the add-last-void-columns parameter to make all the columns appear in xml even if they are void.\n
\n
xml-nodes
\n
With this parameter you can specify the names for the row element and for the column element if there is no header.
\n The first element child of this element specifies the desired QName of the row element in the output xml.\n The name of this element will be used as the name of the row element.
\n The element child of this row element is the column element, and its name will be used as the name of the column elements\n that enclose the fields in the output xml if there is no header.
\n If the csv has a header, only the namespace is used from the column element.
\n For example, with parameter:\n
\n        <xml-nodes>\n        <r>\n          <c/>\n        </r>\n        </xml-nodes>\n        
\n the output for each line will look like:\n
\n        <r>\n          <c>field1</c>\n          <c>field2</c>\n          .......\n        </r>\n        
\n
\n
\n", "summary" : "

Parse a CSV or fixed size text and convert to XML.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "csv", "type" : "xs:string", "occurrence" : null, "description" : "
the string containing the csv or fixed size text.
" }, { "name" : "options", "type" : "element(csv-options:options)", "occurrence" : "?", "description" : "
this parameter is validated against \"http://zorba.io/modules/csv-options\" schema. If this parameter is not specified, the row name is by default \"row\" and the column name is by default \"column\".
" } ], "returns" : { "type" : "element(*)*", "description" : "a sequence of row elements, one for each line in csv" }, "errors" : [ "csv:CSV001 if the input string is streamable string and cannot be rewinded", "csv:WrongInput if the input string has lines with variable number of items, and the csv has headers and the options do not specify the ignore-foreign-input attribute", "err:XQDY0027 if $options can not be validated against the csv-options schema", "err:XQDY0084 if the options parameter doesn't have the name \"csv-options:options\"." ] }, { "isDocumented" : true, "arity" : 2, "name" : "serialize", "qname" : "csv:serialize", "signature" : "($xml as element(*)*, $options as element(csv-options:options)?) as xs:string", "description" : " Convert XML into CSV or fixed size text.\n Note: if you want to serialize out the result, make sure that the serializer method is set to \"text\".\n For example, in zorba command line, you have to set the param --serialize-text.\n When using the
file:write(...)
function, you have to set the\n method serialization parameter to \"text\":\n
\n <output:serialization-parameters<\n   <output:method value=\"text\"/<\n </output:serialization-parameters<\n 
\n The
$options
parameter must have the following format:\n
\n    <csv-options:options>
\n <csv [separator=\"default comma ,\"] ?
\n [quote-char=\"default double quotes &quote;\"]?
\n [quote-escape=\"default double double quotes &quote;&quote;\"]? />
\n
\n or
\n <column-widths [align=\"left|right\"]?>
\n <column-width [align=\"left|right\"]?>[column fixed width, unsigned int]<column-width>*
\n </column-widths>
\n
\n or
\n <column-positions [align=\"left|right\"]?>
\n <column-position [align=\"left|right\"]?>[column position on line, unsigned int]<column-position>*
\n </column-positions>
\n
\n <first-row-is-header/>?
\n </csv-options:options>\n
\n All the parameters are optional and can appear in any order.
\n All the parameters are case sensitive. The namespace used is \"http://zorba.io/modules/csv-options\".
\n All strings must have UTF-8 encoding.
\n Parameters csv, column-widths, column-positions are mutually exclusive.\n If none is specified, the xml is converted to csv.\n Description of parameters:\n
\n
csv
\n
Specifies the parameters for converting to csv.
\n
\n
separator
\n
The character or group of characters used to separating fields in a row.\n If it is not specified, it defaults to comma ','.\n
\n
quote-char
\n
The character or group of characters used for quoting the fields that may contain special characters,\n like separator, new line or this quote char. The default value is double quote \".
\n
\n
quote-escape
\n
The group of characters used for escaping the quote char inside a field. The whole quote escape group\n is translated to a quote char during parsing. The default value is double double quotes \"\".
\n
\n
\n
\n
\n
column-widths
\n
Specifies the column widths for fixed size text. It contains multiple column-width child elements\n specifying the fixed width of each column, from left to right.
\n With the attribute align you can specify how to align fields that are smaller than the column width.\n The default alignment is left.
\n
\n
column-positions
\n
This is an alternative to column-widths, and specifies instead the starting position of each column.\n Column positions are 1 based, and are specified in order from left to right.\n The last column has a variable length.
\n With the attribute align you can specify how to align fields that are smaller than the column width.\n The default alignment is left. The last column does not need alignment.
\n
\n
first-row-is-header
\n
The presence of this element indicates that the first row will contain the header, that is, the names of\n the column elements. Only the column names from the first row element are taken into account.
\n For example, the row xml:
\n <row>
\n <ID>1</ID>
\n <Name>John</Name>
\n <Occupation>student</Occupation>
\n </row>

\n
\n is converted to
\n ID,Name,Occupation
\n 1,John,student

\n
\n The header names are the localnames of the column elements, and the namespace is ignored.
\n Subheaders
\n If the row-column hierarchy is more complex, then subheaders are also generated on subsequent lines.\n The number of subheaders depends on the depth of the column hierarchy.
\n When generating the subheaders, the non-whitespace text nodes are also taken into account,\n and a separate column is generated for them too.
\n For example, the xml row element:
\n <row>
\n <ID>1</ID>
\n <Name>
\n Mr.
\n <First_Name>John</First_Name>
\n <Last_Name>Howard</Last_Name>
\n </Name>
\n <Occupation>student</Occupation>
\n </row>

\n is converted to
\n ID,Name,,Occupation
\n ,,First Name,Last Name,
\n 1,Mr.,John,Howard,student

\n
\n If first-row-is-header is not specified and the columns have a deeper hierarchy,\n only the first layer of columns is processed, and the fields are the string values of each column.
\n This element can have an attribute \"ignore-foreign-input\" with values \"false\" or \"true\" (default \"false\").\n When set to true it tells the serializer to ignore elements that to not match the header names.\n If set to false, the serializer will raise a csv:ForeignInput error for these elements.
\n
\n
\n", "summary" : "

Convert XML into CSV or fixed size text.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "xml", "type" : "element(*)", "occurrence" : "*", "description" : "
a sequence of elements, each element representing a row. The name of each row element is ignored. The childs of each row are the column fields.
" }, { "name" : "options", "type" : "element(csv-options:options)", "occurrence" : "?", "description" : "
The options parameter. See the function description for details. This parameter is validated against \"http://zorba.io/modules/csv-options\" schema.
" } ], "returns" : { "type" : "xs:string", "description" : "the csv or fixed size text as string containing all the lines" }, "errors" : [ "csv:CSV003 if the serialize output is streamable string and cannot be reset", "csv:ForeignInput if there are input elements in subsequent rows that do not match the headers, and the options specify first-row-is-header and do not specify the ignore-foreign-input attribute", "err:XQDY0027 if $options can not be validated against csv-options schema", "err:XQDY0084 if the options parameter doesn't have the name \"csv-options:options\"." ] } ], "variables" : [ ] }, "http://zorba.io/modules/reference" : { "ns" : "http://zorba.io/modules/reference", "description" : " The module provides functions to compute an immutable and opaque reference\n for nodes, objects, or arrays and to retrieve such items given their\n identifier, respectively.\n The identifiers are immutable, i.e. a identifier does not change\n during the items lifetime and cannot be reused for another item after the\n original item gets deleted.\n Identifiers are unique, in that, two different items will never have the same\n identifier. A item, at any time during its lifetime, can be retrieved by its\n identifier.\n", "sees" : [ ], "authors" : [ "Matthias Brantner" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/reference", "prefix" : "ref" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/errors", "prefix" : "zerr" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "dereference", "qname" : "ref:dereference", "signature" : "($arg as xs:string) as item()? external", "description" : "

Returns the node, object, or array identified by the given reference.

\n

The function returns the empty sequence if the item\n that is referenced does not exist.

\n", "summary" : "

Returns the node, object, or array identified by the given reference.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : null, "description" : "
the URI of the item to retrieve.
" } ], "returns" : { "type" : "item()?", "description" : "the item identified by the URI passed as parameter or the empty-sequence if no item with that URI is found." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "reference", "qname" : "ref:reference", "signature" : "($arg as item()) as xs:string external", "description" : "

Returns an immutable and opaque reference (with type xs:anyURI) for\n a given node, object, or array.

\n

The generated identifier is immutable, i.e. a identifier does not\n change during the item's lifetime and cannot be reused for another node after\n the original item gets deleted.

\n

Identifiers are also unique, in that, two different items will never\n have the same identifier.

\n A item, at any time during its lifetime, can be retrieved by its\n identifier, using the ref:dereference function.\n Please note that a reference can only be retrieved for a JSON object or JSON\n array if the item is a member of a collection.\n", "summary" : "

Returns an immutable and opaque reference (with type xs:anyURI) for\n a given node, object, or array.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurrence" : null, "description" : "
the node, object, or array for which the URI should be computed
" } ], "returns" : { "type" : "xs:string", "description" : "the opaque URI of the item." }, "errors" : [ "zerr::ZAPI0080 is raised if the object or array passed as argument is not a member of a collection." ] } ], "variables" : [ ] }, "http://zorba.io/modules/dctx" : { "ns" : "http://zorba.io/modules/dctx", "description" : " This module provides functions that gets components of the dynamic context.\n", "sees" : [ ], "authors" : [ "Federico Cavalieri" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/dctx", "prefix" : "dctx" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 0, "name" : "snapshot-id", "qname" : "dctx:snapshot-id", "signature" : "() as xs:unsignedLong external", "description" : "

Retrieves the current snapshot id.

\n

The returned id is opaque and should not be used for reasoning about time.\n The only guarantee is that the value returned by this function increases each\n time a snapshot finishes.

\n", "summary" : "

Retrieves the current snapshot id.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:unsignedLong", "description" : "the current snapshot id." }, "errors" : [ ] } ], "variables" : [ ] }, "http://xbrl.io/modules/bizql/facts" : { "ns" : "http://xbrl.io/modules/bizql/facts", "description" : "

This module provides functions for retrieving facts.

\n

Facts are the smallest reportable piece of information.

\n

Facts have a certain number of characteristics: the archive in\n which they were reported, a number of XBRL aspects (concept, entity, period,\n unit, further XBRL dimensions), as well as profile-specific information.

\n

With this module, you can retrieve facts by picking the characteristics\n you would like your results to have. You can retrieve a fact with its FID\n (Fact ID). You can extract information about facts (period, entity, etc).\n You can perform a full-text search on fact values, and obtain footnotes.

\n

If you are interested in the structures in which facts can be organized (such\n as hypercubes), look at the components module.

\n

Facts are stored in a MongoDB datasource called xbrl.

\n

Standard $options Parameter

\n

Most functions in the BizQL package allow an additional $options\n parameter. The options parameter is a JSON object allowing the following\n fields:

\n \n", "sees" : [ ], "authors" : [ "Charles Hoffman", "Matthias Brantner", "Dennis Knochenwefel", "Ghislain Fourny" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://xbrl.io/modules/bizql/archives", "prefix" : "archives" }, { "uri" : "http://xbrl.io/modules/bizql/concept-maps", "prefix" : "concept-maps" }, { "uri" : "http://www.28msec.com/modules/credentials", "prefix" : "credentials" }, { "uri" : "http://xbrl.io/modules/bizql/entities", "prefix" : "entities" }, { "uri" : "http://xbrl.io/modules/bizql/facts", "prefix" : "facts" }, { "uri" : "http://xbrl.io/modules/bizql/footnotes", "prefix" : "footnotes" }, { "uri" : "http://xbrl.io/modules/bizql/hypercubes", "prefix" : "hypercubes" }, { "uri" : "http://jsoniq.org/function-library", "prefix" : "j" }, { "uri" : "http://www.28msec.com/modules/mongodb", "prefix" : "mongo" }, { "uri" : "http://zorba.io/modules/reflection", "prefix" : "reflection" }, { "uri" : "http://xbrl.io/modules/bizql/rules", "prefix" : "rules" }, { "uri" : "http://zorba.io/modules/string", "prefix" : "string" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/modules/zorba-query", "prefix" : "zq" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "concept-for-fact", "qname" : "facts:concept-for-fact", "signature" : "($fact-or-id as item()) as string", "description" : "

Retrieves the concept against which a fact is reported.

\n", "summary" : "

Retrieves the concept against which a fact is reported.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "fact-or-id", "type" : "item()", "occurrence" : null, "description" : "
a fact or its FID.
" } ], "returns" : { "type" : "string", "description" : "the concept name." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "decimal-value", "qname" : "facts:decimal-value", "signature" : "($facts as object()*) as decimal", "description" : "

Returns the value of the given facts in case that it\n is castable to decimal. If no facts are given or a fact value\n is not castable to decimal 0 is returned instead.

\n", "summary" : "

Returns the value of the given facts in case that it\n is castable to decimal.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "facts", "type" : "object()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "decimal", "description" : "the decimal value of the facts or 0." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "duration-for-fact", "qname" : "facts:duration-for-fact", "signature" : "($fact-or-id as item()) as object()?", "description" : "

Retrieves the duration period for which a fact was reported.

\n", "summary" : "

Retrieves the duration period for which a fact was reported.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "fact-or-id", "type" : "item()", "occurrence" : null, "description" : "
a fact or its FID.
" } ], "returns" : { "type" : "object()?", "description" : "the duration period as an object with Start and End, or the empty sequence if it is not instant." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "entity-for-fact", "qname" : "facts:entity-for-fact", "signature" : "($fact-or-id as item()) as string", "description" : "

Retrieves the eid of the entity who reported a fact.

\n", "summary" : "

Retrieves the eid of the entity who reported a fact.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "fact-or-id", "type" : "item()", "occurrence" : null, "description" : "
a fact or its FID.
" } ], "returns" : { "type" : "string", "description" : "the eid." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "facts-for-archives-and-aspects", "qname" : "facts:facts-for-archives-and-aspects", "signature" : "($archives-or-ids as item()*, $aspects as object()) as object()*", "description" : "

Return all facts reported in a given archive, and associated with a\n given entity, concept, period and/or other aspects.

\n", "summary" : "

Return all facts reported in a given archive, and associated with a\n given entity, concept, period and/or other aspects.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archives-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archive or archive IDs to filter (or $facts:ALL_OF_THEM to do not filter on archives).
" }, { "name" : "aspects", "type" : "object()", "occurrence" : null, "description" : "
an object containing aspects to filter, among which xbrl:Concept, xbrl:Entity and xbrl:Period (at least one of them is mandatory).
" } ], "returns" : { "type" : "object()*", "description" : "all facts satisfying all supplied conditions." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "facts-for-archives-and-aspects", "qname" : "facts:facts-for-archives-and-aspects", "signature" : "($archives-or-ids as item()*, $aspects as object(), $options as object()?) as object()*", "description" : "

Return all facts associated with a given entity, concept, period\n and/or other aspects.

\n", "summary" : "

Return all facts associated with a given entity, concept, period\n and/or other aspects.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archives-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archive or archive IDs to filter (or $facts:ALL_OF_THEM to do not filter on archives).
" }, { "name" : "aspects", "type" : "object()", "occurrence" : null, "description" : "
an object containing aspects to filter, among which xbrl:Concept, xbrl:Entity and xbrl:Period (all optional).
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard fact retrieving options.
" } ], "returns" : { "type" : "object()*", "description" : "all facts satisfying all supplied conditions." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "facts-for-archives-and-concepts", "qname" : "facts:facts-for-archives-and-concepts", "signature" : "($archives-or-ids as item()*, $concepts as item()*) as object()*", "description" : "

Return facts associated with given concepts and archives.

\n", "summary" : "

Return facts associated with given concepts and archives.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archives-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archive or archive IDs to filter (or $facts:ALL_OF_THEM to do not filter on archives).
" }, { "name" : "concepts", "type" : "item()", "occurrence" : "*", "description" : "
the concepts (or $facts:ALL_OF_THEM to do no filter on concepts).
" } ], "returns" : { "type" : "object()*", "description" : "facts associated with these concepts and archives." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "facts-for-archives-and-concepts", "qname" : "facts:facts-for-archives-and-concepts", "signature" : "($archives-or-ids as item()*, $concepts as item()*, $options as object()?) as object()*", "description" : "

Return facts associated with given concepts and archives.

\n", "summary" : "

Return facts associated with given concepts and archives.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archives-or-ids", "type" : "item()", "occurrence" : "*", "description" : "" }, { "name" : "concepts", "type" : "item()", "occurrence" : "*", "description" : "
the concepts (or $facts:ALL_OF_THEM to do no filter on concepts).
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard fact retrieving options.
" } ], "returns" : { "type" : "object()*", "description" : "facts associated with these concepts." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "facts-for-archives", "qname" : "facts:facts-for-archives", "signature" : "($archives-or-ids as item()*) as object()*", "description" : "

Return all facts reported within a given archive.

\n", "summary" : "

Return all facts reported within a given archive.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archives-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or AIDs to filter.
" } ], "returns" : { "type" : "object()*", "description" : "all facts reported in these archives." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "facts-for-aspects", "qname" : "facts:facts-for-aspects", "signature" : "($aspects as object()) as object()*", "description" : "

Return all facts associated with the given aspects.

\n", "summary" : "

Return all facts associated with the given aspects.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "aspects", "type" : "object()", "occurrence" : null, "description" : "
an object containing aspects to filter, among which xbrl:Concept, xbrl:Entity and xbrl:Period (at least one of them is mandatory).
" } ], "returns" : { "type" : "object()*", "description" : "all facts associated with these aspects." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "facts-for-aspects", "qname" : "facts:facts-for-aspects", "signature" : "($aspects as object(), $options as object()?) as object()*", "description" : "

Return all facts associated with the given aspects.

\n", "summary" : "

Return all facts associated with the given aspects.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "aspects", "type" : "object()", "occurrence" : null, "description" : "
an object containing aspects to filter, among which xbrl:Concept, xbrl:Entity and xbrl:Period (at least one of them is mandatory).
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard fact retrieving options.
" } ], "returns" : { "type" : "object()*", "description" : "all facts associated with these aspects." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "facts-for-concepts", "qname" : "facts:facts-for-concepts", "signature" : "($concepts as string*) as object()*", "description" : "

Return facts associated with given concepts.

\n", "summary" : "

Return facts associated with given concepts.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "concepts", "type" : "string", "occurrence" : "*", "description" : "
the concepts.
" } ], "returns" : { "type" : "object()*", "description" : "facts associated with these concepts." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "facts-for-concepts", "qname" : "facts:facts-for-concepts", "signature" : "($concepts as string*, $options as object()?) as object()*", "description" : "

Return facts associated with given concepts.

\n", "summary" : "

Return facts associated with given concepts.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "concepts", "type" : "string", "occurrence" : "*", "description" : "
the concepts.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard fact retrieving options.
" } ], "returns" : { "type" : "object()*", "description" : "facts associated with these concepts." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "facts-for-entities", "qname" : "facts:facts-for-entities", "signature" : "($entities-or-ids as item()*) as object()*", "description" : "

Return facts reported by the given entities.

\n", "summary" : "

Return facts reported by the given entities.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "entities-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
the entities or EIDs.
" } ], "returns" : { "type" : "object()*", "description" : "facts reported by the given entities." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "facts-for", "qname" : "facts:facts-for", "signature" : "($options as object()?) as object()*", "description" : "

Return all facts that match a given filter object optionally interpreted\n in the context of an optionally given hypercube.

\n", "summary" : "

Return all facts that match a given filter object optionally interpreted\n in the context of an optionally given hypercube.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard fact retrieving options.
" } ], "returns" : { "type" : "object()*", "description" : "all facts satisfying the filter and options." }, "errors" : [ "facts:FILTER-TOO-GENERIC The filter object must have at least one of the fields Archive, Aspects.xbrl:Concept, Aspects.xbrl:Period, or Aspects.xbrl:Entity." ] }, { "isDocumented" : true, "arity" : 1, "name" : "facts-search", "qname" : "facts:facts-search", "signature" : "($search as string) as object()*", "description" : "

Return all facts that match the given search term.

\n", "summary" : "

Return all facts that match the given search term.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "search", "type" : "string", "occurrence" : null, "description" : "
the search query
" } ], "returns" : { "type" : "object()*", "description" : "all facts matching the given search query" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "facts", "qname" : "facts:facts", "signature" : "($fact-or-ids as item()*) as object()*", "description" : "

Return the fact with the given FIDs.

\n", "summary" : "

Return the fact with the given FIDs.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "fact-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
the FIDs or the facts themselves.
" } ], "returns" : { "type" : "object()*", "description" : "the facts with the given FIDs the empty sequence if no fact was found or if the input is an empty sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "fid", "qname" : "facts:fid", "signature" : "($facts-or-ids as item()*) as atomic*", "description" : "

Converts the input to a normalized fact id (FID). The input\n can be either an FID, or a fact object which contains an _id.

\n", "summary" : "

Converts the input to a normalized fact id (FID).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "facts-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of fact objects or FIDs.
" } ], "returns" : { "type" : "atomic*", "description" : "the normalized FIDs." }, "errors" : [ "facts:INVALID-PARAMETER if the FID or fact is not valid." ] }, { "isDocumented" : true, "arity" : 1, "name" : "instant-for-fact", "qname" : "facts:instant-for-fact", "signature" : "($fact-or-id as item()) as atomic?", "description" : "

Retrieves the instant period for which a fact was reported.

\n", "summary" : "

Retrieves the instant period for which a fact was reported.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "fact-or-id", "type" : "item()", "occurrence" : null, "description" : "
a fact or its FID.
" } ], "returns" : { "type" : "atomic?", "description" : "the instance period, or the empty sequence if it is not instant." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-fact-forever", "qname" : "facts:is-fact-forever", "signature" : "($fact-or-id as item()) as boolean", "description" : "

Tests whether a fact is reported forever.

\n", "summary" : "

Tests whether a fact is reported forever.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "fact-or-id", "type" : "item()", "occurrence" : null, "description" : "
a fact or its FID.
" } ], "returns" : { "type" : "boolean", "description" : "true if its period is forever, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "merge-objects", "qname" : "facts:merge-objects", "signature" : "($o1 as object()?, $o2 as object()?, $prioritize-first-object as boolean) as object()?", "description" : "

Helper function to deep-merge two objects. If the two given objects have\n fields with the same name they are merged, which means:\n 1. if the values of the fields are objects then these are merged\n 2. in any other case the fields are accumulated into an array.

\n

The third parameter can be used to priotitize the first object. If the first\n object is prioritized and both objects contain fields with the same name,\n the fields are either merged (in case of two object values) or the value of\n the first object is taken.

\n", "summary" : "

Helper function to deep-merge two objects.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "o1", "type" : "object()", "occurrence" : "?", "description" : "
first object
" }, { "name" : "o2", "type" : "object()", "occurrence" : "?", "description" : "
second object
" }, { "name" : "prioritize-first-object", "type" : "boolean", "occurrence" : null, "description" : "
boolean flag to give the first object higher priority in the merge
" } ], "returns" : { "type" : "object()?", "description" : "one merge object or an empty-sequence (in case both input objects are empty)." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "populate-with-footnotes", "qname" : "facts:populate-with-footnotes", "signature" : "($fact-or-ids as item()*) as object()*", "description" : "

Populates a sequence of facts with their associated footnotes.\n More in detail, in each returned fact object an additional field\n Footnotes is added which contains all connected footnotes in an\n array.

\n", "summary" : "

Populates a sequence of facts with their associated footnotes.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "fact-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
the FIDs or the facts themselves.
" } ], "returns" : { "type" : "object()*", "description" : "a sequence of facts with populated Footnotes field." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "populate-with-footnotes", "qname" : "facts:populate-with-footnotes", "signature" : "($fact-or-ids as item()*, $options as object()?) as object()*", "description" : "

Populates a sequence of facts with their associated footnotes.\n More in detail, in each returned fact object an additional field\n Footnotes is added which contains all connected footnotes in an\n array.

\n", "summary" : "

Populates a sequence of facts with their associated footnotes.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "fact-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
the FIDs or the facts themselves.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard fact retrieving options.
" } ], "returns" : { "type" : "object()*", "description" : "a sequence of facts with populated Footnotes field." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "prefix-from-fact-concept", "qname" : "facts:prefix-from-fact-concept", "signature" : "($fact as object()) as string?", "description" : "

Helper function to get the prefix of a given fact`s xbrl:Concept aspect.

\n", "summary" : "

Helper function to get the prefix of a given fact`s xbrl:Concept aspect.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "fact", "type" : "object()", "occurrence" : null, "description" : "
a fact object.
" } ], "returns" : { "type" : "string?", "description" : "the prefix of the fact's xbrl:Concept aspect or empty sequence if the concept doesn't have a prefix." }, "errors" : [ ] } ], "variables" : [ { "name" : "facts:col", "type" : "string", "description" : " Name of the collection the facts are stored in.\n" }, { "name" : "facts:ID", "type" : "string", "description" : " Name of the field that points to the facts FID.\n" }, { "name" : "facts:ARCHIVE", "type" : "string", "description" : " Name of the field that points to the archive.\n" }, { "name" : "facts:ASPECTS", "type" : "string", "description" : " Name of the field that stores the aspects.\n" }, { "name" : "facts:CONCEPT", "type" : "string", "description" : " Name of the concept aspect.\n" }, { "name" : "facts:PERIOD", "type" : "string", "description" : " Name of the period aspect.\n" }, { "name" : "facts:ENTITY", "type" : "string", "description" : " Name of the entity aspect.\n" }, { "name" : "facts:UNIT", "type" : "string", "description" : " Name of the unit aspect.\n" }, { "name" : "facts:FOOTNOTES", "type" : "string", "description" : " Name of the field that stores the Footnotes (if populated).\n" }, { "name" : "facts:ALL_OF_THEM", "type" : "boolean", "description" : " Joker for all archives or all concepts.\n" } ] }, "http://www.w3.org/2005/xqt-errors" : { "ns" : "http://www.w3.org/2005/xqt-errors", "description" : " This module contains one variable declaration for each diagnostic of the\n http://www.w3.org/2005/xqt-errors namespace.\n The variables serves as documentation for the errors but can also\n be used in the code. For example, one useful scenario is to compare\n an error caught in the catch clause of a try-catch expression with one of\n the variables.\n", "sees" : [ ], "authors" : [ "Carlos Lopez" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.w3.org/2005/xqt-errors", "prefix" : "err" } ], "functions" : [ ], "variables" : [ { "name" : "err:FORG0006", "type" : "xs:QName", "description" : " Invalid argument type.\n" }, { "name" : "err:FODF1280", "type" : "xs:QName", "description" : " Invalid decimal format name supplied to \\c fn:format-number().\n" }, { "name" : "err:FODF1310", "type" : "xs:QName", "description" : " Invalid decimal/integer format picture string.\n" }, { "name" : "err:FODT0001", "type" : "xs:QName", "description" : " Overflow/underflow in date/time operation.\n" }, { "name" : "err:FODT0002", "type" : "xs:QName", "description" : " Overflow/underflow in duration operation.\n" }, { "name" : "err:FODT0003", "type" : "xs:QName", "description" : " Invalid timezone value.\n" }, { "name" : "err:FONS0004", "type" : "xs:QName", "description" : " No namespace found for prefix.\n" }, { "name" : "err:FONS0005", "type" : "xs:QName", "description" : " Base-URI not defined in static context.\n" }, { "name" : "err:FORG0001", "type" : "xs:QName", "description" : " Invalid value for cast/constructor.\n" }, { "name" : "err:FORG0002", "type" : "xs:QName", "description" : " Invalid argument to \\c fn:resolve-uri().\n" }, { "name" : "err:FORG0003", "type" : "xs:QName", "description" : " \\c fn:zero-or-one() called with a sequence containing more than one\n item.\n" }, { "name" : "err:FORG0004", "type" : "xs:QName", "description" : " \\c fn:one-or-more() called with a sequence containing no items.\n" }, { "name" : "err:FORG0005", "type" : "xs:QName", "description" : " \\c fn:exactly-one() called with a sequence containing zero or more\n than one item.\n" }, { "name" : "err:FODC0007", "type" : "xs:QName", "description" : " Base URI passed to \\c fn:parse() is not a valid absolute URI.\n" }, { "name" : "err:FORG0008", "type" : "xs:QName", "description" : " The two arguments to fn:dateTime() have inconsistent timezones.\n" }, { "name" : "err:FORG0009", "type" : "xs:QName", "description" : " Error in resolving a relative URI against a base URI in\n \\c fn:resolve-uri().\n" }, { "name" : "err:FORX0001", "type" : "xs:QName", "description" : " Invalid regular expression flags.\n" }, { "name" : "err:FORX0002", "type" : "xs:QName", "description" : " Invalid regular expression.\n" }, { "name" : "err:FORX0003", "type" : "xs:QName", "description" : " Regular expression matches zero-length string.\n" }, { "name" : "err:FORX0004", "type" : "xs:QName", "description" : " Invalid replacement string.\n" }, { "name" : "err:FOTY0012", "type" : "xs:QName", "description" : " Argument node does not have a typed value.\n" }, { "name" : "err:FOTY0013", "type" : "xs:QName", "description" : " An argument to \\c fn:data() contains a node that does not have a typed\n value.\n" }, { "name" : "err:FOTY0014", "type" : "xs:QName", "description" : " The argument to \\c fn:string() is a function item.\n" }, { "name" : "err:FOTY0015", "type" : "xs:QName", "description" : " An argument to \\c fn:deep-equal() contains a function item.\n" }, { "name" : "err:FOUT1170", "type" : "xs:QName", "description" : " Identifier cannot be used to retrive a resource containing text\n" }, { "name" : "err:FOCA0005", "type" : "xs:QName", "description" : " NaN supplied as float/double value.\n" }, { "name" : "err:FTDY0016", "type" : "xs:QName", "description" : " It is a dynamic error if a weight value is not within the required range\n of values; it is also a dynamic error if an implementation that does not\n support negative weights encounters a negative weight value.\n" }, { "name" : "err:FTDY0017", "type" : "xs:QName", "description" : " It is a dynamic error if an implementation encounters a mild not\n selection, one of whose operands evaluates to an AllMatches that\n contains a StringExclude.\n" }, { "name" : "err:FTST0018", "type" : "xs:QName", "description" : " It is a static error if, during the static analysis phase, the query is\n found to contain a thesaurus option that refers to a thesaurus that is\n not found in the statically known thesauri.\n" }, { "name" : "err:FTST0019", "type" : "xs:QName", "description" : " It is a static error if, within a single FTMatchOptions, there is more\n than one match option of any given match option group.\n" }, { "name" : "err:FTDY0020", "type" : "xs:QName", "description" : " It is a dynamic error if, when \"wildcards\" is in effect, a query string\n violates wildcard syntax.\n" }, { "name" : "err:FOER0000", "type" : "xs:QName", "description" : " Unidentified error.\n" }, { "name" : "err:FOAR0001", "type" : "xs:QName", "description" : " Division by zero.\n" }, { "name" : "err:FOAR0002", "type" : "xs:QName", "description" : " Numeric operation overflow/underflow.\n" }, { "name" : "err:FOCA0001", "type" : "xs:QName", "description" : " Input value too large for decimal.\n" }, { "name" : "err:FOCA0002", "type" : "xs:QName", "description" : " Invalid lexical value.\n" }, { "name" : "err:FOCA0003", "type" : "xs:QName", "description" : " Input value too large for integer.\n" }, { "name" : "err:FOUT1190", "type" : "xs:QName", "description" : " Retrieved resource contains octets that cannot be decoded into Unicode\n using the specified encoding, the resulting characters are not\n permitted XML characters or requested encoding not supported\n" }, { "name" : "err:FOCA0006", "type" : "xs:QName", "description" : " Raised when casting a string to xs:decimal if the string has more\n digits of precision than the implementation can represent (the\n implementation also has the option of rounding).\n" }, { "name" : "err:FOCH0001", "type" : "xs:QName", "description" : " Code point not valid.\n" }, { "name" : "err:FOCH0002", "type" : "xs:QName", "description" : " Unsupported collation.\n" }, { "name" : "err:FOCH0003", "type" : "xs:QName", "description" : " Unsupported normalization form.\n" }, { "name" : "err:FOCH0004", "type" : "xs:QName", "description" : " Collation does not support collation units.\n" }, { "name" : "err:FODC0001", "type" : "xs:QName", "description" : " No context document.\n" }, { "name" : "err:FODC0002", "type" : "xs:QName", "description" : " Error retrieving resource.\n" }, { "name" : "err:FODC0003", "type" : "xs:QName", "description" : " Raised by fn:doc, fn:collection to indicate that it is not possible to\n return a result that is guaranteed deterministic.\n" }, { "name" : "err:FODC0004", "type" : "xs:QName", "description" : " Invalid argument to \\c fn:collection().\n" }, { "name" : "err:FODC0005", "type" : "xs:QName", "description" : " Invalid argument to \\c fn:doc() or \\c fn:doc-available().\n" }, { "name" : "err:FODC0006", "type" : "xs:QName", "description" : " Invalid content passed to \\c fn:parse().\n" }, { "name" : "err:SERE0005", "type" : "xs:QName", "description" : " It is an error if the serialized result would contain an NCName Names\n that contains a character that is not permitted by the version of\n Namespaces in XML specified by the version parameter.\n" }, { "name" : "err:XUDY0024", "type" : "xs:QName", "description" : " It is a dynamic error if the effect of a set of updating expressions is\n to introduce conflicting namespace bindings into an element node.\n" }, { "name" : "err:XUDY0027", "type" : "xs:QName", "description" : " It is a dynamic error if the target expression of an insert, replace, or\n rename expression evaluates to an empty sequence.\n" }, { "name" : "err:XUST0028", "type" : "xs:QName", "description" : " It is a static error if a function declaration specifies both \\c updating\n and a return type.\n" }, { "name" : "err:XUDY0029", "type" : "xs:QName", "description" : " In an insert expression where \\c before or \\c after is specified, it is\n a dynamic error if the node returned by the target expression does not\n have a parent.\n" }, { "name" : "err:XUDY0030", "type" : "xs:QName", "description" : " It is a dynamic error if an insert expression specifies the insertion of\n an attribute node before or after a child of a document node.\n" }, { "name" : "err:XUDY0031", "type" : "xs:QName", "description" : " It is a dynamic error if multiple calls to \\c fn:put() in the same\n snapshot specify the same URI (after resolution of relative URIs).\n" }, { "name" : "err:FOUP0001", "type" : "xs:QName", "description" : " It is a dynamic error if the first operand of \\c fn:put() is not a node\n of a supported kind.\n" }, { "name" : "err:FOUP0002", "type" : "xs:QName", "description" : " It is a dynamic error if the second operand of \\c fn:put() is not a valid\n lexical representation of the \\c xs:anyURI type.\n" }, { "name" : "err:SENR0001", "type" : "xs:QName", "description" : " It is an error if an item in S6 in sequence normalization is an attribute\n node or a namespace node.\n" }, { "name" : "err:SERE0003", "type" : "xs:QName", "description" : " It is an error if the serializer is unable to satisfy the rules for\n either a well-formed XML document entity or a well-formed XML external\n general parsed entity, or both, except for content modified by the\n character expansion phase of serialization.\n" }, { "name" : "err:SEPM0004", "type" : "xs:QName", "description" : " It is an error to specify the doctype-system parameter, or to specify\n the standalone parameter with a value other than omit, if the instance\n of the data model contains text nodes or multiple element nodes as\n children of the root node.\n" }, { "name" : "err:XUDY0023", "type" : "xs:QName", "description" : " It is a dynamic error if an insert, replace, or rename expression\n affects an element node by introducing a new namespace binding that\n conflicts with one of its existing namespace bindings.\n" }, { "name" : "err:SERE0006", "type" : "xs:QName", "description" : " It is an error if the serialized result would contain a character that is\n not permitted by the version of XML specified by the version parameter.\n" }, { "name" : "err:SESU0007", "type" : "xs:QName", "description" : " It is an error if an output encoding other than UTF-8 or UTF-16 is\n requested and the serializer does not support that encoding.\n" }, { "name" : "err:SERE0008", "type" : "xs:QName", "description" : " It is an error if a character that cannot be represented in the encoding\n that the serializer is using for output appears in a context where\n character references are not allowed (for example if the character\n occurs in the name of an element).\n" }, { "name" : "err:SEPM0009", "type" : "xs:QName", "description" : " It is an error if the omit-xml-declaration parameter has the value yes,\n and the standalone attribute has a value other than omit; or the version\n parameter has a value other than 1.0 and the doctype-system parameter is\n specified.\n" }, { "name" : "err:SEPM0010", "type" : "xs:QName", "description" : " It is an error if the output method is xml, the value of the\n undeclare-prefixes parameter is yes, and the value of the version\n parameter is 1.0.\n" }, { "name" : "err:SESU0011", "type" : "xs:QName", "description" : " It is an error if the value of the normalization-form parameter\n specifies a normalization form that is not supported by the serializer.\n" }, { "name" : "err:SERE0012", "type" : "xs:QName", "description" : " It is an error if the value of the normalization-form parameter is\n fully-normalized and any relevant construct of the result begins with a\n combining character.\n" }, { "name" : "err:SESU0013", "type" : "xs:QName", "description" : " It is an error if the serializer does not support the version of XML or\n HTML specified by the version parameter.\n" }, { "name" : "err:SERE0014", "type" : "xs:QName", "description" : " It is an error to use the HTML output method when characters which are\n legal in XML but not in HTML, specifically the control characters\n #x7F-#x9F, appear in the instance of the data model.\n" }, { "name" : "err:SERE0015", "type" : "xs:QName", "description" : " It is an error to use the HTML output method when \\c > appears within a\n processing instruction in the data model instance being serialized.\n" }, { "name" : "err:SEPM0016", "type" : "xs:QName", "description" : " It is a an error if a parameter value is invalid for the defined domain.\n" }, { "name" : "err:XUTY0010", "type" : "xs:QName", "description" : " In a replace expression where value of is not specified and\n the target is an element, text, comment, or processing instruction node,\n it is a type error if the replacement sequence does not consist of zero\n or more element, text, comment, or processing instruction nodes.\n" }, { "name" : "err:FOFL0001", "type" : "xs:QName", "description" : " This error is raised if the fn:function-lookup returns a context-dependent function and the context-dependent function is then called.\n" }, { "name" : "err:FOCZ0001", "type" : "xs:QName", "description" : " Invalid content passed to \\c x:canonicalize().\n" }, { "name" : "err:XUST0001", "type" : "xs:QName", "description" : " It is a static error if an updating expression is used in any position\n other than one of the following:\n - The topmost expression in the body of a query.\n - The \\c modify clause of a transform expression.\n - The \\c return clause of a FLWOR expression.\n - The \\c return clauses of a typeswitch expression in which every \\c\n return clause contains an updating expression or a vacuous expression.\n - The \\c then and \\c else clauses of a conditional statement in which\n both the \\c then and \\c else clauses contain either an updating\n expression or a vacuous expression.\n - An operand of a comma expression in which each operand is either an\n updating expression or a vacuous expression.\n - The content of a parenthesized expression.\n - The body of a function declaration in which the keyword \\c updating is\n specified.\n" }, { "name" : "err:XUST0002", "type" : "xs:QName", "description" : " It is a static error if a simple expression that is not a vacuous\n expression is used in one of the following positions:\n - The \\c modify clause of a transform expression.\n - The top-level expression in the body of a function declaration in\n which the keyword \\c updating is specified.\n" }, { "name" : "err:XUST0003", "type" : "xs:QName", "description" : " It is a static error if a Prolog contains more than one revalidation\n declaration.\n" }, { "name" : "err:XUTY0004", "type" : "xs:QName", "description" : " It is a type error if the insertion sequence of an insert expression\n contains an attribute node following a node that is not an attribute\n node.\n" }, { "name" : "err:XUTY0005", "type" : "xs:QName", "description" : " In an insert expression where into, as first\n into, or as last into is specified, it is a type\n error if the target expression returns a non-empty result that does not\n consist of a single element or document node.\n" }, { "name" : "err:XUTY0006", "type" : "xs:QName", "description" : " In an insert expression where \\c before or \\c after is specified, it is\n a type error if the target expression returns a non-empty result that\n does not consist of a single element, text, comment, or processing\n instruction node.\n" }, { "name" : "err:XUTY0007", "type" : "xs:QName", "description" : " It is a type error if the target expression of a delete expression does\n not return a sequence of zero or more nodes.\n" }, { "name" : "err:XUTY0008", "type" : "xs:QName", "description" : " In a replace expression, it is a type error if the target expression\n returns a non-empty result that does not consist of a single element,\n attribute, text, comment, or processing instruction node.\n" }, { "name" : "err:XUDY0009", "type" : "xs:QName", "description" : " In a replace expression where value of is not specified, it\n is a dynamic error if the node returned by the target expression does\n not have a parent.\n" }, { "name" : "err:FTST0009", "type" : "xs:QName", "description" : " It may be a static error if, during the static analysis phase, the query\n is found to contain a language identifier in a language option that the\n implementation does not support. The implementation may choose not to\n raise this error and instead provide some other implementation-defined\n behavior.\n" }, { "name" : "err:XUTY0011", "type" : "xs:QName", "description" : " In a replace expression where value of is not specified and\n the target is an attribute node, it is a type error if the replacement\n sequence does not consist of zero or more attribute nodes.\n" }, { "name" : "err:XUTY0012", "type" : "xs:QName", "description" : " In a rename expression, it is a type error if the target expression\n returns a non-empty result that does not consist of a single element,\n attribute, or processing instruction node.\n" }, { "name" : "err:XUTY0013", "type" : "xs:QName", "description" : " In a transform expression, it is a type error if a source expression in\n the \\c copy clause does not return a single node.\n" }, { "name" : "err:XUDY0014", "type" : "xs:QName", "description" : " In a transform expression, it is a dynamic error if the \\c modify clause\n modifies any node that was not created by the \\c copy clause.\n" }, { "name" : "err:XUDY0015", "type" : "xs:QName", "description" : " It is a dynamic error if any node is the target of more than one \\c\n rename expression within the same query.\n" }, { "name" : "err:XUDY0016", "type" : "xs:QName", "description" : " It is a dynamic error if any node is the target of more than one \\c\n replace expression (without value of being specified)\n within the same query.\n" }, { "name" : "err:XUDY0017", "type" : "xs:QName", "description" : " It is a dynamic error if any node is the target of more than one\n replace value of expression within the same query.\n" }, { "name" : "err:XUDY0018", "type" : "xs:QName", "description" : " It is a dynamic error if a function that was declared to be \\c external\n but not \\c updating returns a non-empty pending update list.\n" }, { "name" : "err:XUDY0019", "type" : "xs:QName", "description" : " It is a dynamic error if a function that was declared to be both \\c\n external and \\c updating returns a non-empty data model instance.\n" }, { "name" : "err:XUDY0021", "type" : "xs:QName", "description" : " It is a dynamic error if the XDM instance that would result from\n applying all the updates in a query violates any constraint specified in\n [XQuery 1.0 and XPath 2.0 Data Model]. In this case, none of the updates\n in the query are made effective.\n" }, { "name" : "err:XUTY0022", "type" : "xs:QName", "description" : " It is a type error if an insert expression specifies the insertion of an\n attribute node into a document node.\n" }, { "name" : "err:XQST0052", "type" : "xs:QName", "description" : " The type must be the name of a type defined in the in-scope schema types,\n and the {variety} of the type must be simple.\n" }, { "name" : "err:XQST0033", "type" : "xs:QName", "description" : " It is a static error if a module contains multiple bindings for the same\n namespace prefix.\n" }, { "name" : "err:XQST0034", "type" : "xs:QName", "description" : " It is a static error if multiple functions declared or imported by a\n module have the same number of arguments and their expanded QNames are\n equal (as defined by the eq operator).\n" }, { "name" : "err:XQST0035", "type" : "xs:QName", "description" : " It is a static error to import two schema components that both define the\n same name in the same symbol space and in the same scope.\n" }, { "name" : "err:XQST0036", "type" : "xs:QName", "description" : " It is a static error to import a module if the in-scope schema\n definitions of the importing module do not include all of the following:\n -# An in-scope schema type for each type-name that appears:\n - in the type of a variable that is declared in the imported module\n and referenced in the importing module, OR\n - in a parameter-type or result-type of a function that is declared in\n the imported module and referenced in the importing module.\n -# An in-scope element declaration for each element-name \\c EN such that:\n - \\c schema-element(EN) appears in the declared type of a variable in\n the imported module, and that variable is referenced in the\n importing module, OR\n - \\c schema-element(EN) appears in a parameter-type or result-type\n of a function declared in the imported module, and that function is\n referenced in the importing module.\n -# An in-scope attribute declaration for each attribute-name \\c AN such\n that:\n - \\c schema-attribute(AN) appears in the declared type of a variable\n in the imported module, and that variable is referenced in the\n importing module, OR\n - \\c schema-attribute(AN) appears in a parameter-type or result-type\n of a function declared in the imported module, and that function is\n referenced in the importing module.\n" }, { "name" : "err:XQST0038", "type" : "xs:QName", "description" : " It is a static error if a Prolog contains more than one default collation\n declaration, or the value specified by a default collation declaration is\n not present in statically known collations.\n" }, { "name" : "err:XQST0039", "type" : "xs:QName", "description" : " It is a static error for a function declaration to have more than one\n parameter with the same name.\n" }, { "name" : "err:XQST0040", "type" : "xs:QName", "description" : " It is a static error if the attributes specified by a direct element\n constructor do not have distinct expanded QNames.\n" }, { "name" : "err:XQST0045", "type" : "xs:QName", "description" : " It is a static error if the function name in a function declaration is in\n one of the following namespaces:\n http://www.w3.org/XML/1998/namespace,\n http://www.w3.org/2001/XMLSchema,\n http://www.w3.org/2001/XMLSchema-instance,\n http://www.w3.org/2005/xpath-functions.\n" }, { "name" : "err:XQST0046", "type" : "xs:QName", "description" : " An implementation MAY raise a static error if the value of a URILiteral\n is of nonzero length and is not in the lexical space of \\c xs:anyURI.\n" }, { "name" : "err:XQST0047", "type" : "xs:QName", "description" : " It is a static error if multiple module imports in the same Prolog\n specify the same target namespace.\n" }, { "name" : "err:XQST0048", "type" : "xs:QName", "description" : " It is a static error if a function or variable declared in a library\n module is not in the target namespace of the library module.\n" }, { "name" : "err:XQST0049", "type" : "xs:QName", "description" : " It is a static error if two or more variables declared or imported by a\n module have equal expanded QNames (as defined by the eq operator.)\n" }, { "name" : "err:XQST0032", "type" : "xs:QName", "description" : " A static error is raised if a Prolog contains more than one base URI\n declaration.\n" }, { "name" : "err:XQST0054", "type" : "xs:QName", "description" : " It is a static error if a variable depends on itself.\n" }, { "name" : "err:XQST0055", "type" : "xs:QName", "description" : " It is a static error if a Prolog contains more than one copy-namespaces\n declaration.\n" }, { "name" : "err:XQST0057", "type" : "xs:QName", "description" : " It is a static error if a schema import binds a namespace prefix but\n does not specify a target namespace other than a zero-length string.\n" }, { "name" : "err:XQST0058", "type" : "xs:QName", "description" : " It is a static error if multiple schema imports specify the same target\n namespace.\n" }, { "name" : "err:XQST0059", "type" : "xs:QName", "description" : " It is a static error if an implementation is unable to process a schema\n or module import by finding a schema or module with the specified\n target namespace.\n" }, { "name" : "err:XQST0060", "type" : "xs:QName", "description" : " It is a static error if the name of a function in a function declaration\n is not in a namespace (expanded QName has a null namespace URI).\n" }, { "name" : "err:XQST0065", "type" : "xs:QName", "description" : " A static error is raised if a Prolog contains more than one ordering mode\n declaration.\n" }, { "name" : "err:XQST0066", "type" : "xs:QName", "description" : " A static error is raised if a Prolog contains more than one default\n element/type namespace declaration, or more than one default function\n namespace declaration.\n" }, { "name" : "err:XQST0067", "type" : "xs:QName", "description" : " A static error is raised if a Prolog contains more than one construction\n declaration.\n" }, { "name" : "err:XQST0068", "type" : "xs:QName", "description" : " A static error is raised if a Prolog contains more than one\n boundary-space declaration.\n" }, { "name" : "err:XQST0069", "type" : "xs:QName", "description" : " A static error is raised if a Prolog contains more than one empty order\n declaration.\n" }, { "name" : "err:XPTY0019", "type" : "xs:QName", "description" : " It is a type error if the result of a step (other than the last step) in a\n path expression contains an atomic value.\n" }, { "name" : "err:XPST0001", "type" : "xs:QName", "description" : " It is a static error if analysis of an expression relies on some\n component of the static context that has not been assigned a value.\n" }, { "name" : "err:XPST0003", "type" : "xs:QName", "description" : " It is a static error if an expression is not a valid instance of the\n grammar.\n" }, { "name" : "err:XPST0005", "type" : "xs:QName", "description" : " During the analysis phase, it is a static error if the static type\n assigned to an expression other than the expression \\c () or \\c data(())\n is \\c empty-sequence().\n" }, { "name" : "err:XPST0008", "type" : "xs:QName", "description" : " It is a static error if an expression refers to an element name,\n attribute name, schema type name, namespace prefix, or variable name\n that is not defined in the static context, except for an ElementName in\n an ElementTest or an AttributeName in an AttributeTest.\n" }, { "name" : "err:XPST0017", "type" : "xs:QName", "description" : " It is a static error if the expanded QName and number of arguments in a\n function call do not match the name and arity of a function signature in\n the static context.\n" }, { "name" : "err:XPST0051", "type" : "xs:QName", "description" : " It is a static error if a QName that is used as an AtomicType in a\n SequenceType is not defined in the in-scope schema types as an atomic\n type.\n" }, { "name" : "err:XPST0080", "type" : "xs:QName", "description" : " It is a static error if the target type of a \\c cast or \\c castable\n expression is \\c xs:NOTATION or \\c xs:anyAtomicType.\n" }, { "name" : "err:XPST0081", "type" : "xs:QName", "description" : " It is a static error if a QName used in a query contains a namespace\n prefix that cannot be expanded into a namespace URI by using the\n statically known namespaces.\n" }, { "name" : "err:XPST0083", "type" : "xs:QName", "description" : " It is a static error if the target type of a \\c cast expression or\n constructor function is \\c xs:QName or a type derived from \\c xs:QName\n or \\c xs:NOTATION, and the argument of the cast expression or\n constructor function is not a string literal.\n" }, { "name" : "err:XPTY0004", "type" : "xs:QName", "description" : " It is a type error if, during the static analysis phase, an expression\n is found to have a static type that is not appropriate for the context\n in which the expression occurs, or during the dynamic evaluation phase,\n the dynamic type of a value does not match a required type as specified\n by the matching rules in 2.5.4 SequenceType Matching.\n" }, { "name" : "err:XPTY0018", "type" : "xs:QName", "description" : " It is a type error if the result of the last step in a path expression\n contains both nodes and non-nodes.\n" }, { "name" : "err:XQST0070", "type" : "xs:QName", "description" : " A static error is raised if one of the predefined prefixes \\c xml or \\c\n xmlns appears in a namespace declaration, or if any of the following\n conditions is statically detected in any expression or declaration:\n - The prefix \\c xml is bound to some namespace URI other than\n http://www.w3.org/XML/1998/namespace.\n - A prefix other than \\c xml is bound to the namespace URI\n http://www.w3.org/XML/1998/namespace.\n - The prefix \\c xmlns is bound to any namespace URI.\n - A prefix other than \\c xmlns is bound to the namespace URI\n http://www.w3.org/2000/xmlns/.\n" }, { "name" : "err:XPTY0020", "type" : "xs:QName", "description" : " It is a type error if, in an axis step, the context item is not a node.\n" }, { "name" : "err:XPTY0117", "type" : "xs:QName", "description" : " Attempt to cast to a namespace-sensitive type failed because the namespace\n bindings for the result can not be determined.\n" }, { "name" : "err:XQTY0024", "type" : "xs:QName", "description" : " It is a type error if the content sequence in an element constructor\n contains an attribute node following a node that is not an attribute node.\n" }, { "name" : "err:XQTY0030", "type" : "xs:QName", "description" : " It is a type error if the argument of a validate expression does not\n evaluate to exactly one document or element node.\n" }, { "name" : "err:XQTY0086", "type" : "xs:QName", "description" : " It is a type error if the typed value of a copied element or attribute\n node is namespace-sensitive when construction mode is \\c preserve and\n copy-namespaces mode is \\c no-preserve.\n" }, { "name" : "err:XQTY0105", "type" : "xs:QName", "description" : " It is a type error if the content sequence in an element constructor contains a function item.\n" }, { "name" : "err:XQST0009", "type" : "xs:QName", "description" : " An implementation that does not support the Schema Import Feature must\n raise a static error if a Prolog contains a schema import.\n" }, { "name" : "err:XQST0012", "type" : "xs:QName", "description" : " It is a static error if the set of definitions contained in all schemas\n imported by a Prolog do not satisfy the conditions for schema validity\n specified in Sections 3 and 5 of [XML Schema] Part 1--i.e., each\n definition must be valid, complete, and unique.\n" }, { "name" : "err:XQST0013", "type" : "xs:QName", "description" : " It is a static error if an implementation recognizes a pragma but\n determines that its content is invalid.\n" }, { "name" : "err:XQST0022", "type" : "xs:QName", "description" : " It is a static error if the value of a namespace declaration attribute is\n not a URILiteral.\n" }, { "name" : "err:XQST0031", "type" : "xs:QName", "description" : " It is a static error if the version number specified in a version\n declaration is not supported by the implementation.\n" }, { "name" : "err:XQDY0072", "type" : "xs:QName", "description" : " It is a dynamic error if the result of the content expression of a\n computed comment constructor contains two adjacent hyphens or ends with\n a hyphen.\n" }, { "name" : "err:XQST0128", "type" : "xs:QName", "description" : " It is a static error if a feature name that an implementation supports appears\n in a prohibit-feature option declaration, and the implementation is unable to\n disable the feature.\n" }, { "name" : "err:XPDY0002", "type" : "xs:QName", "description" : " It is a dynamic error if evaluation of an expression relies on some part\n of the dynamic context that has not been assigned a value.\n" }, { "name" : "err:XPDY0050", "type" : "xs:QName", "description" : " It is a dynamic error if the dynamic type of the operand of a treat\n expression does not match the sequence type specified by the treat\n expression. This error might also be raised by a path expression\n beginning with \"/\" or \"//\" if the context node\n is not in a tree that is rooted at a document node. This is because a\n leading \"/\" or \"//\" in a path expression is an\n abbreviation for an initial step that includes the clause \\c treat as \\c\n document-node().\n" }, { "name" : "err:XQDY0025", "type" : "xs:QName", "description" : " It is a dynamic error if any attribute of a constructed element does not\n have a name that is distinct from the names of all other attributes of\n the constructed element.\n" }, { "name" : "err:XQDY0026", "type" : "xs:QName", "description" : " It is a dynamic error if the result of the content expression of a\n computed processing instruction constructor contains the string \"?>\".\n" }, { "name" : "err:XQDY0027", "type" : "xs:QName", "description" : " In a validate expression, it is a dynamic error if the root element\n information item in the PSVI resulting from validation does not have the\n expected validity property: \\c valid if validation mode is \\c strict, or\n either \\c valid or \\c notKnown if validation mode is \\c lax.\n" }, { "name" : "err:XQDY0041", "type" : "xs:QName", "description" : " It is a dynamic error if the value of the name expression in a computed\n processing instruction constructor cannot be cast to the type\n \\c xs:NCName.\n" }, { "name" : "err:XQDY0044", "type" : "xs:QName", "description" : " It is a static error the node-name of a node constructed by a computed\n attribute constructor has any of the following properties:\n - Its namespace prefix is \\c xmlns.\n - It has no namespace prefix and its local name is \\c xmlns.\n - Its namespace URI is http://www.w3.org/2000/xmlns/.\n - Its namespace prefix is \\c xml and its namespace URI is not\n http://www.w3.org/XML/1998/namespace.\n - Its namespace prefix is other than \\c xml and its namespace URI is\n http://www.w3.org/XML/1998/namespace.\n" }, { "name" : "err:XQDY0054", "type" : "xs:QName", "description" : " It is a dynamic error if a cycle is encountered in the definition of a\n module's dynamic context components, for example because of a cycle in\n variable declarations.\n" }, { "name" : "err:XQDY0061", "type" : "xs:QName", "description" : " It is a dynamic error if the operand of a validate expression is a\n document node whose children do not consist of exactly one element node\n and zero or more comment and processing instruction nodes, in any order.\n" }, { "name" : "err:XQDY0064", "type" : "xs:QName", "description" : " It is a dynamic error if the value of the name expression in a computed\n processing instruction constructor is equal to \"XML\" (in any combination\n of upper and lower case).\n" }, { "name" : "err:XQST0127", "type" : "xs:QName", "description" : " It is a static error if a given feature is both required and prohibited, directly or indirectly, in a module.\n" }, { "name" : "err:XQDY0074", "type" : "xs:QName", "description" : " It is a dynamic error if the value of the name expression in a computed\n element or attribute constructor cannot be converted to an expanded\n QName (for example, because it contains a namespace prefix not found in\n statically known namespaces).\n" }, { "name" : "err:XQDY0084", "type" : "xs:QName", "description" : " It is a dynamic error if the element validated by a \\c validate statement\n does not have a top-level element declaration in the in-scope element\n declarations, if validation mode is \\c strict.\n" }, { "name" : "err:XQDY0091", "type" : "xs:QName", "description" : " An implementation MAY raise a dynamic error if an \\c xml:id error, as\n defined in [XML ID], is encountered during construction of an attribute\n named \\c xml:id.\n" }, { "name" : "err:XQDY0092", "type" : "xs:QName", "description" : " An implementation MAY raise a dynamic error if a constructed attribute\n named \\c xml:space has a value other than \\c preserve or \\c default.\n" }, { "name" : "err:XQDY0096", "type" : "xs:QName", "description" : " It is a dynamic error the node-name of a node constructed by a computed\n element constructor has any of the following properties:\n - Its namespace prefix is \\c xmlns.\n - Its namespace URI is http://www.w3.org/2000/xmlns/.\n - Its namespace prefix is \\c xml and its namespace URI is not\n http://www.w3.org/XML/1998/namespace.\n - Its namespace prefix is other than \\c xml and its namespace URI is\n http://www.w3.org/XML/1998/namespace.\n" }, { "name" : "err:XQDY0101", "type" : "xs:QName", "description" : " Invalid prefix and/or uri in computed namespace constructor\n" }, { "name" : "err:XQDY0102", "type" : "xs:QName", "description" : " In an element constructor, if two or more namespace bindings in the in-scope bindings would have the same prefix, then an error is raised if they have different URIs; if they would have the same prefix and URI, duplicate bindings are ignored.\n" }, { "name" : "err:XTDE1310", "type" : "xs:QName", "description" : " It is a non-recoverable dynamic error if the picture string does not\n satisfy the format-number function rules.\n" }, { "name" : "err:FOFD1340", "type" : "xs:QName", "description" : " It is a non-recoverable dynamic error if the $picture, $language,\n $calendar, or $place argument for fn:format-date, fn:format-time, or\n fn:format-dateTime is invalid.\n" }, { "name" : "err:FOFD1350", "type" : "xs:QName", "description" : " It is a non-recoverable dynamic error if a component specifier within\n the picture refers to components that are not available in the given\n type of $value.\n" }, { "name" : "err:FTST0008", "type" : "xs:QName", "description" : " It is a static error if, during the static analysis phase, the query is\n found to contain a stop word option that refers to a stop word list that\n is not found in the statically known stop word lists.\n" }, { "name" : "err:XQST0098", "type" : "xs:QName", "description" : " It is a static error if, for any named or unnamed decimal format, the\n properties representing characters used in a picture string do not each\n have distinct values. These properties are decimal-separator-sign,\n grouping-separator, percent-sign, per-mille-sign, zero-digit,\n digit-sign, and pattern-separator-sign.\n" }, { "name" : "err:XQST0071", "type" : "xs:QName", "description" : " A static error is raised if the namespace declaration attributes of a\n direct element constructor do not have distinct names.\n" }, { "name" : "err:XQST0076", "type" : "xs:QName", "description" : " It is a static error if a \\c collation subclause in an order by clause\n of a FLWOR expression does not identify a collation that is present in\n statically known collations.\n" }, { "name" : "err:XQST0079", "type" : "xs:QName", "description" : " It is a static error if an extension expression contains neither a\n pragma that is recognized by the implementation nor an expression\n enclosed in curly braces.\n" }, { "name" : "err:XQST0085", "type" : "xs:QName", "description" : " It is a static error if the namespace URI in a namespace declaration\n attribute is a zero-length string, and the implementation does not\n support [XML Names 1.1].\n" }, { "name" : "err:XQST0087", "type" : "xs:QName", "description" : " It is a static error if the encoding specified in a Version Declaration\n does not conform to the definition of \\c EncName specified in [XML 1.0]\n" }, { "name" : "err:XQST0088", "type" : "xs:QName", "description" : " It is a static error if the literal that specifies the target namespace\n in a module import or a module declaration is of zero length.\n" }, { "name" : "err:XQST0089", "type" : "xs:QName", "description" : " It is a static error if a variable bound in a \\c for or \\c window clause\n of a FLWOR expression, and its associated positional variable, do not\n have distinct names (expanded QNames).\n" }, { "name" : "err:XQST0090", "type" : "xs:QName", "description" : " It is a static error if a character reference does not identify a valid\n character in the version of XML that is in use.\n" }, { "name" : "err:XQST0093", "type" : "xs:QName", "description" : " It is a static error to import a module M1 if there exists a sequence of\n modules M1 ... Mi ... M1 such that each module directly depends on the\n next module in the sequence (informally, if M1 depends on itself through\n some chain of module dependencies.)\n" }, { "name" : "err:XQST0094", "type" : "xs:QName", "description" : " In the group by clause of a FLWOR expression, it is a static error if the\n name of a grouping variable is not equal (by the eq operator on expanded\n QNames) to the name of a variable that is bound by a for or let clause\n that precedes the group by clause.\n" }, { "name" : "err:XQST0097", "type" : "xs:QName", "description" : " It is a static error for a decimal-format to specify a value that is\n not valid for a given property.\n" }, { "name" : "err:NS", "type" : "item()*", "description" : "" }, { "name" : "err:XQST0099", "type" : "xs:QName", "description" : " If a module contains more than one context item declaration, a static error is raised [err:XQST0099].\n" }, { "name" : "err:XQST0103", "type" : "xs:QName", "description" : " All variables in a window clause must have distinct names.\n" }, { "name" : "err:XQST0106", "type" : "xs:QName", "description" : " It is a static error if a function's annotations contain more than one\n annotation named \\c private or \\c public. It is a static error if a\n function's annotations contain more than one annotation named \\c\n deterministic or \\c nondeterministic.\n" }, { "name" : "err:XQST0111", "type" : "xs:QName", "description" : " It is a static error for a query prolog to contain two decimal formats\n with the same name, or to contain two default decimal formats.\n" }, { "name" : "err:XQST0113", "type" : "xs:QName", "description" : " Specifying a VarValue or VarDefaultValue for a context item declaration\n in a library module is a static error.\n" }, { "name" : "err:XQST0114", "type" : "xs:QName", "description" : " It is a static error for a decimal format declaration to define the\n same property more than once.\n" }, { "name" : "err:XQST0116", "type" : "xs:QName", "description" : " It is a static error if a variable declaration contains both a %private\n and a %public annotation, more than one %private annotation, or more\n than one %public annotation.\n" }, { "name" : "err:XQST0120", "type" : "xs:QName", "description" : " It is a static error if a feature required by require-feature is not\n supported by the implementation.\n" }, { "name" : "err:XQST0122", "type" : "xs:QName", "description" : " It is a static error if the name of a feature in require-feature or\n prohibit-feature is not in the lexical space of QName.\n" }, { "name" : "err:XQST0123", "type" : "xs:QName", "description" : " It is a static error if the name of a feature in require-feature is not\n recognized by the implementation.\n" }, { "name" : "err:XQST0126", "type" : "xs:QName", "description" : " It is a static error if all-extensions appears in a require-feature option declaration.\n" } ] }, "http://zorba.io/modules/excel/math" : { "ns" : "http://zorba.io/modules/excel/math", "description" : " This is a library module offering a part of the set of functions\n defined by Microsoft Excel 2003.\n", "sees" : [ "Excel 2003 Documentation: Math Functions" ], "authors" : [ "Daniel Turcanu" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/excel/math", "prefix" : "excel" }, { "uri" : "http://zorba.io/modules/excel/errors", "prefix" : "excel-err" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "abs", "qname" : "excel:abs", "signature" : "($arg as xs:anyAtomicType) as xs:anyAtomicType", "description" : " Compute the abs of a numeric value.\n The value can also be a string and it will be casted to the appropriate numeric first.\n", "summary" : "

Compute the abs of a numeric value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The parameter can be a number, string, boolean value.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The abs value as a numeric type." }, "errors" : [ "excel-err:Value if arg cannot be casted to numeric type." ] }, { "isDocumented" : true, "arity" : 1, "name" : "cast-as-numeric", "qname" : "excel:cast-as-numeric", "signature" : "($number as xs:anyAtomicType) as xs:anyAtomicType", "description" : " Cast the xs:anyAtomicType to a numeric type.\n If the value is already of a numeric type then nothing is changed.\n Otherwise the value is casted to the numeric type that is most appropriate.\n", "summary" : "

Cast the xs:anyAtomicType to a numeric type.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The parameter can be a number, string, boolean value.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The casted value." }, "errors" : [ "excel-err:Value if the value cannot be casted to numeric type." ] }, { "isDocumented" : true, "arity" : 2, "name" : "ceiling", "qname" : "excel:ceiling", "signature" : "($number as xs:anyAtomicType, $significance as xs:anyAtomicType) as xs:anyAtomicType", "description" : " Returns number rounded up, away from zero, to the nearest multiple of significance.\n Significance must have the same sign as number.\n Number and significance must be of a numeric type or castable to numeric.\n Significance must not be zero.\n", "summary" : "

Returns number rounded up, away from zero, to the nearest multiple of significance.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The value you want to round.
" }, { "name" : "significance", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The multiple to which you want to round.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The rounded value." }, "errors" : [ "excel-err:Value if parameters cannot be casted to numeric type.", "excel-err:Num if significance is zero or it doesn't have the same sign as number." ] }, { "isDocumented" : true, "arity" : 1, "name" : "degrees", "qname" : "excel:degrees", "signature" : "($radian as xs:double) as xs:integer", "description" : " Converts radians into degrees.\n", "summary" : "

Converts radians into degrees.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "radian", "type" : "xs:double", "occurrence" : null, "description" : "
The value in radians.
" } ], "returns" : { "type" : "xs:integer", "description" : "The value in degrees 0 .. 360 or 0 .. -360." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "even", "qname" : "excel:even", "signature" : "($number as xs:anyAtomicType) as xs:anyAtomicType", "description" : " Returns number rounded up to the nearest even integer.\n Regardless of the sign of number, a value is rounded up when adjusted away from zero.\n", "summary" : "

Returns number rounded up to the nearest even integer.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The value to round.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The rounded value casted as numeric type." }, "errors" : [ "excel-err:Value if parameters cannot be casted to numeric type." ] }, { "isDocumented" : true, "arity" : 1, "name" : "fact", "qname" : "excel:fact", "signature" : "($number as xs:anyAtomicType) as xs:integer", "description" : " Returns the factorial of a number.\n", "summary" : "

Returns the factorial of a number.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The nonnegative number you want the factorial of. If number is not an integer, it is truncated.
" } ], "returns" : { "type" : "xs:integer", "description" : "Returns the factorial of a number. The factorial of a number is equal to 1*2*3*...* number." }, "errors" : [ "excel-err:Num if the number is smaller than zero" ] }, { "isDocumented" : true, "arity" : 1, "name" : "factdouble", "qname" : "excel:factdouble", "signature" : "($number as xs:integer) as xs:integer", "description" : " Returns the double factorial of a number.\n Computes the double factorial of n as n(n-2)(n-4)...\n", "summary" : "

Returns the double factorial of a number.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:integer", "occurrence" : null, "description" : "
The positive integer value.
" } ], "returns" : { "type" : "xs:integer", "description" : "The result as integer." }, "errors" : [ "excel-err:Num if the number is negative." ] }, { "isDocumented" : true, "arity" : 2, "name" : "floor", "qname" : "excel:floor", "signature" : "($number as xs:anyAtomicType, $significance as xs:anyAtomicType) as xs:anyAtomicType", "description" : " Rounds number down, toward zero, to the nearest multiple of significance.\n Significance must have the same sign as number.\n", "summary" : "

Rounds number down, toward zero, to the nearest multiple of significance.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The value you want to round. The value is casted to numeric.
" }, { "name" : "significance", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The multiple to which you want to round.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The rounded value as numeric type." }, "errors" : [ "excel-err:Value if parameters cannot be casted to numeric type.", "excel-err:Num if significance is zero or it doesn't have the same sign as number." ] }, { "isDocumented" : true, "arity" : 1, "name" : "gcd", "qname" : "excel:gcd", "signature" : "($numbers as xs:integer+) as xs:integer", "description" : " Returns the greatest common divisor GCD of a sequence of integers.\n The sequence can have one or more positive integers.\n", "summary" : "

Returns the greatest common divisor GCD of a sequence of integers.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "numbers", "type" : "xs:integer", "occurrence" : "+", "description" : "
The sequence of positive integers.
" } ], "returns" : { "type" : "xs:integer", "description" : "The GCD as integer." }, "errors" : [ "excel-err:Num if any number is smaller than zero." ] }, { "isDocumented" : true, "arity" : 1, "name" : "int", "qname" : "excel:int", "signature" : "($number as xs:anyAtomicType) as xs:integer", "description" : " Rounds a number down to the nearest integer.\n Positive numbers are rounded toward zero, negative numbers are rounded away from zero.\n", "summary" : "

Rounds a number down to the nearest integer.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The value to be rounded.
" } ], "returns" : { "type" : "xs:integer", "description" : "The rounded integer." }, "errors" : [ "excel-err:Value if parameter cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-a-number", "qname" : "excel:is-a-number", "signature" : "($value as xs:anyAtomicType) as xs:boolean", "description" : " Checks if the xs:anyAtomicType argument is actually a numeric type\n or can be converted to numeric.\n", "summary" : "

Checks if the xs:anyAtomicType argument is actually a numeric type\n or can be converted to numeric.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
Parameter to be checked.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the value can be casted to numeric." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "lcm", "qname" : "excel:lcm", "signature" : "($numbers as xs:integer+) as xs:integer", "description" : " Returns the least common multiple of integers.

\n LCM for two numbers is computed by multiplying them and dividing with GCD.

\n The function is applied recursively replacing the first two numbers in the sequence with their LCM.\n", "summary" : "

Returns the least common multiple of integers.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "numbers", "type" : "xs:integer", "occurrence" : "+", "description" : "
The sequence of one or more positive integers.
" } ], "returns" : { "type" : "xs:integer", "description" : "The LCM as integer." }, "errors" : [ "excel-err:Num if any number is smaller than zero." ] }, { "isDocumented" : true, "arity" : 2, "name" : "mod", "qname" : "excel:mod", "signature" : "($number as xs:anyAtomicType, $divisor as xs:anyAtomicType) as xs:anyAtomicType", "description" : " Returns the remainder after number is divided by divisor.\n The result has the same sign as divisor.\n", "summary" : "

Returns the remainder after number is divided by divisor.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The number for which you want to find the remainder.
" }, { "name" : "divisor", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The number by which you want to divide number. This cannot be zero.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The remainder from division as numeric type." }, "errors" : [ "excel-err:Value if parameters cannot be casted to numeric type.", "excel-err:Div0 if divisor is zero after casting to numeric." ] }, { "isDocumented" : true, "arity" : 2, "name" : "mround", "qname" : "excel:mround", "signature" : "($number as xs:anyAtomicType, $multiple as xs:anyAtomicType) as xs:anyAtomicType", "description" : " Returns a number rounded to the desired multiple.\n MROUND rounds up, away from zero, if the remainder of dividing number by multiple\n is greater than or equal to half the value of multiple.\n MROUND is computed through floor function.\n", "summary" : "

Returns a number rounded to the desired multiple.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The value to round, castable to numeric type.
" }, { "name" : "multiple", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The multiple to which you want to round number.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The rounded number up to the desired multiple." }, "errors" : [ "excel-err:Value if parameters cannot be casted to numeric type." ] }, { "isDocumented" : true, "arity" : 1, "name" : "odd", "qname" : "excel:odd", "signature" : "($number as xs:anyAtomicType) as xs:integer", "description" : " Returns number rounded up to the nearest odd integer, away from zero.\n", "summary" : "

Returns number rounded up to the nearest odd integer, away from zero.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The value to round.
" } ], "returns" : { "type" : "xs:integer", "description" : "The odd integer." }, "errors" : [ "excel-err:Value if parameter cannot be casted to numeric type." ] }, { "isDocumented" : true, "arity" : 0, "name" : "pi", "qname" : "excel:pi", "signature" : "() as xs:decimal", "description" : " Return the value of PI as decimal with 15 digits.\n", "summary" : "

Return the value of PI as decimal with 15 digits.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:decimal", "description" : "The value of PI with 15 digits." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "power", "qname" : "excel:power", "signature" : "($number as xs:anyAtomicType, $power as xs:integer) as xs:anyAtomicType", "description" : " Returns the result of a number raised to a power.\n The result is computed through successive multiplications.\n", "summary" : "

Returns the result of a number raised to a power.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The base number.
" }, { "name" : "power", "type" : "xs:integer", "occurrence" : null, "description" : "
The exponent as integer (cannot be floating point like in Excel).
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The result as numeric type." }, "errors" : [ "excel-err:Value if parameter cannot be casted to numeric type.", "excel-err:Value if power is smaller than zero." ] }, { "isDocumented" : true, "arity" : 1, "name" : "product", "qname" : "excel:product", "signature" : "($numbers as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies all the numbers given as arguments and returns the product.\n", "summary" : "

Multiplies all the numbers given as arguments and returns the product.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "numbers", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
The sequence of arguments convertable to numeric types. The sequence can be of any length.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The multiplication result as numeric type." }, "errors" : [ "excel-err:Value if parameters cannot be casted to numeric type." ] }, { "isDocumented" : true, "arity" : 2, "name" : "quotient", "qname" : "excel:quotient", "signature" : "($numerator as xs:anyAtomicType, $denominator as xs:anyAtomicType) as xs:integer", "description" : " Returns the integer portion of a division.\n", "summary" : "

Returns the integer portion of a division.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "numerator", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The divident.
" }, { "name" : "denominator", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The divisor. It cannot be zero.
" } ], "returns" : { "type" : "xs:integer", "description" : "The result value as numeric type." }, "errors" : [ "excel-err:Value if parameters cannot be casted to numeric type.", "excel-err:Div0 if denominator casted as numeric type has value zero." ] }, { "isDocumented" : true, "arity" : 1, "name" : "radians", "qname" : "excel:radians", "signature" : "($degree as xs:integer) as xs:decimal", "description" : " Converts degrees to radians.\n", "summary" : "

Converts degrees to radians.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "degree", "type" : "xs:integer", "occurrence" : null, "description" : "
An angle in degrees that you want to convert.
" } ], "returns" : { "type" : "xs:decimal", "description" : "The value in radians." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "roman", "qname" : "excel:roman", "signature" : "($number as xs:integer) as xs:string", "description" : " Converts an arabic numeral to roman, as text.\n Only the clasic format is supported (out of all formats Excel requires).

\n M is the largest digit, it represents 1000.\n Numbers bigger than 2000 will be represented by a sequence of \"M\".

\n D = 500, C = 100, L = 50, X = 10, V = 5, I = 1.\n", "summary" : "

Converts an arabic numeral to roman, as text.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:integer", "occurrence" : null, "description" : "
A positive integer.
" } ], "returns" : { "type" : "xs:string", "description" : "The roman string representation." }, "errors" : [ "excel-err:Num if the input integer is negative" ] }, { "isDocumented" : true, "arity" : 2, "name" : "round", "qname" : "excel:round", "signature" : "($number as xs:anyAtomicType, $precision as xs:integer) as xs:anyAtomicType", "description" : " Rounds a number to a specified number of digits.\n If precision is greater than 0 (zero), then number is rounded\n to the specified number of decimal places.\n If num_digits is 0, then number is rounded to the nearest integer.\n If num_digits is less than 0, then number is rounded to the left of the decimal point.\n The 0.5 is rounded away from zero.\n", "summary" : "

Rounds a number to a specified number of digits.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The number to round, castable to a numeric type.
" }, { "name" : "precision", "type" : "xs:integer", "occurrence" : null, "description" : "
The number of decimal places to keep.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The rounded number as numeric type." }, "errors" : [ "excel-err:Value if parameters cannot be casted to numeric type." ] }, { "isDocumented" : true, "arity" : 2, "name" : "rounddown", "qname" : "excel:rounddown", "signature" : "($number as xs:anyAtomicType, $precision as xs:integer) as xs:anyAtomicType", "description" : " Rounds a number down, toward zero.\n If num_digits is greater than 0 (zero), then number is rounded down\n to the specified number of decimal places.\n If num_digits is 0, then number is rounded down to the nearest integer.\n If num_digits is less than 0, then number is rounded down to the left of the decimal point.\n", "summary" : "

Rounds a number down, toward zero.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The number to round, castable to numeric type.
" }, { "name" : "precision", "type" : "xs:integer", "occurrence" : null, "description" : "
The number of decimal places to keep.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the truncated number toward zero, as numeric type." }, "errors" : [ "excel-err:Value if parameters cannot be casted to numeric type." ] }, { "isDocumented" : true, "arity" : 2, "name" : "roundup", "qname" : "excel:roundup", "signature" : "($number as xs:anyAtomicType, $precision as xs:integer) as xs:anyAtomicType", "description" : " Rounds a number up, away from 0 (zero).\n If num_digits is greater than 0 (zero), then number is rounded down\n to the specified number of decimal places.\n If num_digits is 0, then number is rounded down to the nearest integer.\n If num_digits is less than 0, then number is rounded down to the left of the decimal point.\n", "summary" : "

Rounds a number up, away from 0 (zero).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The number to round, castable to numeric type.
" }, { "name" : "precision", "type" : "xs:integer", "occurrence" : null, "description" : "
The number of decimal places to keep.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The truncated number away from zero, as numeric type." }, "errors" : [ "excel-err:Value if parameters cannot be casted to numeric type." ] }, { "isDocumented" : true, "arity" : 1, "name" : "sign", "qname" : "excel:sign", "signature" : "($number as xs:anyAtomicType) as xs:integer", "description" : " Determines the sign of a number.\n Returns 1 if the number is positive, zero (0) if the number is 0,\n and -1 if the number is negative.\n", "summary" : "

Determines the sign of a number.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The argument castable to numeric type.
" } ], "returns" : { "type" : "xs:integer", "description" : "The sign as (-1, 0, 1)." }, "errors" : [ "excel-err:Value if parameters cannot be casted to numeric type." ] }, { "isDocumented" : true, "arity" : 1, "name" : "sort-numbers", "qname" : "excel:sort-numbers", "signature" : "($numbers as xs:anyAtomicType*) as xs:anyAtomicType*", "description" : " Helper function.

\n Sorts a sequence of numbers or arguments castable to numeric.\n It first casts all arguments to numeric and then sorts ascending.\n", "summary" : "

Helper function.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "numbers", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
The sequence of arguments castable to numeric.
" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "The sorted sequence as numeric types." }, "errors" : [ "excel-err:Value if parameters cannot be casted to numeric type." ] }, { "isDocumented" : true, "arity" : 1, "name" : "sum", "qname" : "excel:sum", "signature" : "($numbers as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Adds all the numbers in the sequence.\n", "summary" : "

Adds all the numbers in the sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "numbers", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
The sequence of arguments castable to numeric types. The sequence can be of any length.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The sum as numeric type." }, "errors" : [ "excel-err:Value if parameters cannot be casted to numeric type." ] }, { "isDocumented" : true, "arity" : 1, "name" : "trunc", "qname" : "excel:trunc", "signature" : "($number as xs:anyAtomicType) as xs:integer", "description" : " Truncates a number to an integer by removing the fractional part of the number.\n", "summary" : "

Truncates a number to an integer by removing the fractional part of the number.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The argument castable to numeric type.
" } ], "returns" : { "type" : "xs:integer", "description" : "The integer value." }, "errors" : [ "excel-err:Value if parameter cannot be casted to numeric type." ] }, { "isDocumented" : true, "arity" : 2, "name" : "trunc", "qname" : "excel:trunc", "signature" : "($number as xs:anyAtomicType, $precision as xs:integer) as xs:anyAtomicType", "description" : " Truncates a number down to precision.\n This behaves exactly like rounddown.\n", "summary" : "

Truncates a number down to precision.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The argument castable to numeric type.
" }, { "name" : "precision", "type" : "xs:integer", "occurrence" : null, "description" : "
The number of decimal places to keep .
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The integer value." }, "errors" : [ "excel-err:Value if parameter cannot be casted to numeric type." ] } ], "variables" : [ ] }, "http://api.28.io/browserview" : { "ns" : "http://api.28.io/browserview", "description" : "", "sees" : [ ], "authors" : [ ], "version" : null, "encoding" : null, "namespaces" : [ { "uri" : "", "prefix" : "an" }, { "uri" : "http://api.28.io/browserview", "prefix" : "browserview" }, { "uri" : "http://api.28.io/model", "prefix" : "model" }, { "uri" : "http://zorba.io/modules/reference", "prefix" : "ref" } ], "functions" : [ { "isDocumented" : false, "arity" : 1, "name" : "node-path", "qname" : "browserview:node-path", "signature" : "($node)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "node-reference", "qname" : "browserview:node-reference", "signature" : "($node, $short as xs:boolean)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "short", "type" : "xs:boolean", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "serialize", "qname" : "browserview:serialize", "signature" : "($json)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "json", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "serializeMulti", "qname" : "browserview:serializeMulti", "signature" : "($json)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "json", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "show-namespaces", "qname" : "browserview:show-namespaces", "signature" : "($namespaces)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "show-node", "qname" : "browserview:show-node", "signature" : "($node, $namespaces, $short as xs:boolean)", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "node", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "short", "type" : "xs:boolean", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "show-nodes", "qname" : "browserview:show-nodes", "signature" : "($nodes)", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/json-csv" : { "ns" : "http://zorba.io/modules/json-csv", "description" : " This module provides an API for parsing and serializing CSV (comma-separated\n values) files.\n See RFC 4180,\n \"Common Format and MIME Type for Comma-Separated Values (CSV) Files.\"\n", "sees" : [ ], "authors" : [ "Paul J. Lucas" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/json-csv", "prefix" : "csv" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "parse", "qname" : "csv:parse", "signature" : "($csv as string) as object()*", "description" : " Parses a CSV (comma-separated values) string using the default options.\n A newline (U+000A), optionally preceeded by a carriage-return (U+000D),\n terminates lines, aka, \"records.\"\n

\n Quoted values are always considered strings;\n unquoted values are attempted to be cast to other types, e.g., integer\n (unless the cast-unquoted-values option is false).\n Casting is attempted in the following order:\n integer, decimal, double, and boolean.\n If casting fails, the value is considered a string.\n Header field names are always considered strings even if unquoted.\n

\n In addition to the \"normal\" values of\n true and false for boolean,\n T and Y are also considered \"true\"\n and F and N are also considered \"false.\"\n

\n The default options are:\n

\n
cast-unquoted-values
\n
\n Whether to attempt to cast unquoted values to\n integer, decimal, double, or boolean;\n default: true.\n
\n
extra-name
\n
\n The field name for extra values, if any;\n default: none (error csv:EXTRA_VALUE is raised).\n
\n
field-names
\n
\n A JSON array of strings denoting field names;\n default: none.\n The first CSV line is assumed to be a header line\n and the field names are taken from this line.\n
\n
missing-value
\n
\n What should happen when a missing value is detected;\n default: \"null\".\n A \"missing\" value is one of:\n
    \n
  • Two consecutive quote-char characters.
  • \n
  • A quote-char character as either the first\n or last character on a line.
  • \n
  • Fewer values than the number of field names.
  • \n
\n When a missing value is detected,\n the value is set to null.\n
\n
quote-char
\n
\n The single ASCII character that may be used to quote values;\n default: \" (U+0022).\n
\n
quote-escape
\n
\n The single ASCII character used to escape quote-char;\n default: same as quote-char.\n This means that an escaped quote is doubled as \"\".\n
\n
separator
\n
\n The single ASCII character used to separate values;\n default: , (U+002C).\n
\n
\n", "summary" : "

Parses a CSV (comma-separated values) string using the default options.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "csv", "type" : "string", "occurrence" : null, "description" : "
The CSV string to parse.
" } ], "returns" : { "type" : "object()*", "description" : "a sequence of zero or more JSON objects where each key is a field name and each value is a parsed value." }, "errors" : [ "csv:EXTRA_VALUE if an extra value is detected." ] }, { "isDocumented" : true, "arity" : 2, "name" : "parse", "qname" : "csv:parse", "signature" : "($csv as string, $options as object()) as object()* external", "description" : " Parses a CSV (comma-separated values) string using the given options.\n A newline (U+000A), optionally preceeded by a carriage-return (U+000D),\n terminates lines, aka, \"records.\"\n

\n Quoted values are always considered strings;\n unquoted values are attempted to be cast to other types, e.g., integer\n (unless the cast-unquoted-values option is false).\n Casting is attempted in the following order:\n integer, decimal, double, and boolean.\n If casting fails, the value is considered a string.\n Header field names are always considered strings even if unquoted.\n

\n In addition to the \"normal\" values of\n true and false for boolean,\n T and Y are also considered \"true\"\n and F and N are also considered \"false.\"\n", "summary" : "

Parses a CSV (comma-separated values) string using the given options.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "csv", "type" : "string", "occurrence" : null, "description" : "
The CSV string to parse.
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
The options to use:
cast-unquoted-values
Whether to attempt to cast unquoted values to integer, decimal, double, or boolean; default: true.
extra-name
The field name for extra values, if any; default: none (error csv:EXTRA_VALUE is raised). If this option is given and a line contains one or more extra values (that is, values that have no corresponding field names), then the extra values are assigned as the values for fields having extra-name as their names.

If extra-name contains a # (U+0023), then the # is substituted with the field number (where field numbers start at 1). If extra-name does not contains a #, then the field number is appended.

field-names
A JSON array of strings denoting field names; default: none. If this option is given, then the first CSV line is assumed not to be a header line; if omitted, then the first CSV line is assumed to be a header line and the field names are taken from this line.
missing-value
What should happen when a missing value is detected; default: \"null\". A \"missing\" value is one of:
  • Two consecutive separator characters.
  • A separator character as either the first or last character on a line.
  • Fewer values than the number of field names.
When a missing value is detected, the value of this option determines what happens:
\"error\"
Error csv:MISSING_VALUE is raised.
\"omit\"
Both the value and its key are omitted from the result object.
\"null\"
The value is set to null.
quote-char
The single ASCII character that may be used to quote values; default: \" (U+0022).
quote-escape
The single ASCII character used to escape quote-char; default: same as quote-char. If quote-escape equals quote-char, it means that quote-char must be doubled to escape it. If quote-escape does not equal quote-char, it means that quote-escape is used to escape quote-char. For example, a quote-char of \" (U+0022) and a quote-escape of \\ (U+005C) means that quotes will be escaped by \\\".
separator
The single ASCII character used to separate values; default: , (U+002C).
" } ], "returns" : { "type" : "object()*", "description" : "a sequence of zero or more JSON objects where each key is a field name and each value is a parsed value." }, "errors" : [ "csv:INVALID_OPTION if the quote-char, quote-escape, or separator option is given and it's not a single ASCII character.", "csv:MISSING_VALUE if a missing value is detected and the missing-value option is \"error\".", "csv:EXTRA_VALUE if an extra value is detected and the extra-name option is not set." ] }, { "isDocumented" : true, "arity" : 1, "name" : "serialize", "qname" : "csv:serialize", "signature" : "($obj as object()*) as string*", "description" : " Serializes a sequence of JSON objects as CSV (comma-separated values) using\n the default options.\n The default options are:\n
\n
field-names
\n
\n A JSON array of strings denoting field names;\n default: none.\n The field names are taken from the first JSON object\n and the order of the fields is implementation dependent.\n
\n
serialize-boolean-as
\n
\n What strings to serialize true and false as;\n default: true and false.\n
\n
serialize-header
\n
\n Whether a header line is included;\n default: true.\n The first string result is the header line\n comprised of all the objects' keys' names.\n
\n
serialize-null-as
\n
\n What string to serialize JSON null values as;\n default: null.\n
\n
quote-char
\n
\n The single ASCII character that may be used to quote values;\n default: \" (U+0022).\n
\n
quote-escape
\n
\n The single ASCII character used to escape quote-char;\n default: same as quote-char.\n This means that quote-char is doubled to escape it.\n
\n
separator
\n
\n The single ASCII character used to separate values;\n default: , (U+002C).\n
\n
\n", "summary" : "

Serializes a sequence of JSON objects as CSV (comma-separated values) using\n the default options.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "obj", "type" : "object()", "occurrence" : "*", "description" : "
The sequence of JSON objects to serialize.
" } ], "returns" : { "type" : "string*", "description" : "a sequence of strings where each string corresponds to a JSON object, aka, \"record.\"" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "serialize", "qname" : "csv:serialize", "signature" : "($obj as object()*, $options as object()) as string* external", "description" : " Serializes a sequence of JSON objects as CSV (comma-separated values) using\n the given options.\n", "summary" : "

Serializes a sequence of JSON objects as CSV (comma-separated values) using\n the given options.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "obj", "type" : "object()", "occurrence" : "*", "description" : "
The sequence of JSON objects to serialize.
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
The options to use:
field-names
A JSON array of strings denoting field names; default: none. If this option is not set, the field names are taken from the first JSON object and the order of the fields is implementation dependent. If this option is set, the fields are serielized in the order they are in the array. In either case, every JSON object must have the same keys as the first object.
serialize-boolean-as
What strings to serialize true and false as; default: true and false. This must be a sub-object with the two keys \"true\" and \"false\", e.g.: { \"true\" : \"Y\", \"false\" : \"N\" }.
serialize-header
Whether a header line is included; default: true. If true, the first string result is the header line comprised of all the objects' keys' names; if false, the heder line is not returned.
serialize-null-as
What string to serialize JSON null values as; default: null.
quote-char
The single ASCII character that may be used to quote values; default: \" (U+0022).
quote-escape
The single ASCII character used to escape quote-char; default: same as quote-char. If quote-escape equals quote-char, it means that quote-char must be doubled to escape it. If quote-escape does not equal quote-char, it means that quote-escape is used to escape quote-char. For example, a quote-char of \" (U+0022) and a quote-escape of \\ (U+005C) means that quotes will be escaped by \\\".
separator
The single ASCII character used to separate values; default: , (U+002C).
" } ], "returns" : { "type" : "string*", "description" : "a sequence of strings where each string corresponds to a JSON object, aka, \"record.\"" }, "errors" : [ ] } ], "variables" : [ ] }, "http://www.zorba-xquery.com/modules/email/imap" : { "ns" : "http://www.zorba-xquery.com/modules/email/imap", "description" : " This module provides functions for accessing and manipulating emails on mail\n servers through the IMAP protocol.\n All functions in this module receive as the first argument the IMAP host and user\n information. This is an element with the type hostInfoType as defined\n in the email schema: http://www.zorba-xquery.com/modules/email.\n For example:\n
\n <email:hostInfo>\n   <email:hostName>imap.example.com</email:hostName>\n   <email:userName>myuser</email:userName>\n   <email:password>mypassword</email:password>\n </email:hostInfo>\n 
\n The hostInfoType only needs to be in the email schema namespace\n (http://www.zorba-xquery.com/modules/email). It does not need\n to be validated since it's validated by the module.\n", "sees" : [ "c-client library part of UW IMAP toolkit" ], "authors" : [ "Daniel Thomas, Gabriel Petrovay" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.zorba-xquery.com/modules/email", "prefix" : "email" }, { "uri" : "http://www.zorba-xquery.com/modules/email/imap", "prefix" : "imap" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 5, "name" : "copy", "qname" : "imap:copy", "signature" : "($host-info as element(email:hostInfo), $mailbox-from as xs:string, $mailbox-to as xs:string, $messages as xs:long+, $uid as xs:boolean?) as empty-sequence()", "description" : " Copies messages between mailboxes.\n Depending on the value of $uid, the messages are either specified\n through their sequence number or through their unique id. Both mailboxes must exist.\n", "summary" : "

Copies messages between mailboxes.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox-from", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox in which the messages reside.
" }, { "name" : "mailbox-to", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox in to which the messages are copied.
" }, { "name" : "messages", "type" : "xs:long", "occurrence" : "+", "description" : "
The messages to be copied, specified either by their sequence number or their unique id.
" }, { "name" : "uid", "type" : "xs:boolean", "occurrence" : "?", "description" : "
If true, $messages are treated as sequence numbers. Else as unique identifiers.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "The function is declared as sequential and has side-effects. It returns the empty sequence." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 2, "name" : "create", "qname" : "imap:create", "signature" : "($host-info as element(email:hostInfo), $mailbox-name as xs:string) as empty-sequence()", "description" : " Creates a new mailbox for the given user.\n", "summary" : "

Creates a new mailbox for the given user.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox-name", "type" : "xs:string", "occurrence" : null, "description" : "
The name for the new mailbox.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "The function is declared as sequential and has side-effects. It returns the empty sequence." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 2, "name" : "delete", "qname" : "imap:delete", "signature" : "($host-info as element(email:hostInfo), $mailbox-name as xs:string) as empty-sequence()", "description" : " Deletes a mailbox for the given user.\n", "summary" : "

Deletes a mailbox for the given user.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox-name", "type" : "xs:string", "occurrence" : null, "description" : "
The name of the mailbox to delete.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "The function is declared as sequential and has side-effects. It returns the empty sequence." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 2, "name" : "expunge", "qname" : "imap:expunge", "signature" : "($host-info as element(email:hostInfo), $mailbox as xs:string) as empty-sequence()", "description" : " Permanently deletes all messages of the given mailbox that have the \"deleted\" flag set.\n", "summary" : "

Permanently deletes all messages of the given mailbox that have the \"deleted\" flag set.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox for which all messages that have the \\Deleted flag set should be permanently deleted.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "The function is declared as sequential and has side-effects. It returns the empty sequence." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 4, "name" : "fetch-envelope", "qname" : "imap:fetch-envelope", "signature" : "($host-info as element(email:hostInfo), $mailbox as xs:string, $message-number as xs:long, $uid as xs:boolean?) as element(email:envelope)", "description" : " Fetches the envelope of a message.\n", "summary" : "

Fetches the envelope of a message.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox in which to search for the message.
" }, { "name" : "message-number", "type" : "xs:long", "occurrence" : null, "description" : "
The message for which to fetch the envelope (depending on $uid either as message sequence number or unique identifier).
" }, { "name" : "uid", "type" : "xs:boolean", "occurrence" : "?", "description" : "
If true, $message-number is treated as sequence number. Else as unique identifier.
" } ], "returns" : { "type" : "element(email:envelope)", "description" : "The envelope of the requested message. The result is validated against the schema: http://www.zorba-xquery.com/modules/email." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 4, "name" : "fetch-flags", "qname" : "imap:fetch-flags", "signature" : "($host-info as element(email:hostInfo), $mailbox as xs:string, $message-number as xs:long, $uid as xs:boolean?) as element(email:flags)", "description" : " Fetches the flags of a message.\n", "summary" : "

Fetches the flags of a message.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox containing the specified message.
" }, { "name" : "message-number", "type" : "xs:long", "occurrence" : null, "description" : "
Either the message sequence number or the unique identifier of the message.
" }, { "name" : "uid", "type" : "xs:boolean", "occurrence" : "?", "description" : "
If true, $message-number is treated as sequence number. Else as unique identifier.
" } ], "returns" : { "type" : "element(email:flags)", "description" : "The flags of the specified message. The result is validated against the schema: http://www.zorba-xquery.com/modules/email." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 3, "name" : "fetch-from", "qname" : "imap:fetch-from", "signature" : "($host-info as element(email:hostInfo), $mailbox as xs:string, $message-number as xs:long) as xs:string", "description" : " Fetches the 'from' string of a message.\n Please note that this function only words with message sequence numbers,\n not with unique identifiers. Only the first 255 characters of a 'from'\n string are fetched.\n", "summary" : "

Fetches the 'from' string of a message.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox for which we want to get the 'from' string of a message.
" }, { "name" : "message-number", "type" : "xs:long", "occurrence" : null, "description" : "
Denotes the message for which we want the 'from' string.
" } ], "returns" : { "type" : "xs:string", "description" : "The 'from' string of the specified message." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 3, "name" : "fetch-message-sequence-number", "qname" : "imap:fetch-message-sequence-number", "signature" : "($host-info as element(email:hostInfo), $mailbox as xs:string, $message-number as xs:long) as xs:long", "description" : " Fetches the message sequence number for a given unique identifier.\n", "summary" : "

Fetches the message sequence number for a given unique identifier.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox for which we want to get the message sequence number of an unique identifier.
" }, { "name" : "message-number", "type" : "xs:long", "occurrence" : null, "description" : "
The unique identifier for which we want the message sequence number.
" } ], "returns" : { "type" : "xs:long", "description" : "The message sequence number of the of the given unique identifier." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 4, "name" : "fetch-message", "qname" : "imap:fetch-message", "signature" : "($host-info as element(email:hostInfo), $mailbox as xs:string, $message-number as xs:long, $uid as xs:boolean) as element(email:message)", "description" : " Fetches a whole message.\n", "summary" : "

Fetches a whole message.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox in which to search for the message.
" }, { "name" : "message-number", "type" : "xs:long", "occurrence" : null, "description" : "
The message to fetch, denoted either by its sequence number or unique identifier.
" }, { "name" : "uid", "type" : "xs:boolean", "occurrence" : null, "description" : "
If true, $message-number is treated as sequence number. Else as unique identifier.
" } ], "returns" : { "type" : "element(email:message)", "description" : "the message with the given $message-number. The result is validated against the schema: http://www.zorba-xquery.com/modules/email." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 3, "name" : "fetch-subject", "qname" : "imap:fetch-subject", "signature" : "($host-info as element(email:hostInfo), $mailbox as xs:string, $message-number as xs:long) as xs:string", "description" : " Fetches the subject for a message.\n Please note that this function only works with message sequence numbers,\n not with unique identifiers. Only the first 255 characters of a subject\n are fetched.\n", "summary" : "

Fetches the subject for a message.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox for which we want to get the subject of a message.
" }, { "name" : "message-number", "type" : "xs:long", "occurrence" : null, "description" : "
Denotes the message for which we want the subject.
" } ], "returns" : { "type" : "xs:string", "description" : "The subject of the specified message." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 3, "name" : "fetch-uid", "qname" : "imap:fetch-uid", "signature" : "($host-info as element(email:hostInfo), $mailbox as xs:string, $message-number as xs:long) as xs:long", "description" : " Fetches the unique identifier for a given message sequence number.\n", "summary" : "

Fetches the unique identifier for a given message sequence number.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox for which we want to get the unique identifier of a message sequence number.
" }, { "name" : "message-number", "type" : "xs:long", "occurrence" : null, "description" : "
The message sequence number for which we want the unique identifier.
" } ], "returns" : { "type" : "xs:long", "description" : "The unique identifier of the given message sequence number." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 4, "name" : "list", "qname" : "imap:list", "signature" : "($host-info as element(email:hostInfo), $mailbox-ref as xs:string, $pattern as xs:string, $only-subscribed as xs:boolean) as element(email:mailbox)*", "description" : " Lists IMAP folders for the specified user on the host that match the pattern.\n", "summary" : "

Lists IMAP folders for the specified user on the host that match the pattern.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox-ref", "type" : "xs:string", "occurrence" : null, "description" : "
is applied to pattern in an implementation dependent fashion to search for matching mailbox names.
" }, { "name" : "pattern", "type" : "xs:string", "occurrence" : null, "description" : "
The pattern for mailboxes to look for (can include wildcards '*' and '%').
" }, { "name" : "only-subscribed", "type" : "xs:boolean", "occurrence" : null, "description" : "
If set true, only mailboxes are listed to which the user is subscribed.
" } ], "returns" : { "type" : "element(email:mailbox)*", "description" : "A sequence of mailbox elements. The result elements are validated against the schema: http://www.zorba-xquery.com/modules/email." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 5, "name" : "move", "qname" : "imap:move", "signature" : "($host-info as element(email:hostInfo), $mailbox-from as xs:string, $mailbox-to as xs:string, $messages as xs:long+, $uid as xs:boolean?) as empty-sequence()", "description" : " Moves messages between mailboxes.\n Depending on the value of $uid, the messages are either specified through\n their sequence number or through their unique id. Both mailboxes must exist.\n", "summary" : "

Moves messages between mailboxes.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox-from", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox in which the messages reside.
" }, { "name" : "mailbox-to", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox in to which the messages should be moved.
" }, { "name" : "messages", "type" : "xs:long", "occurrence" : "+", "description" : "
The messages to be copied, specified either by their sequence number or their unique id.
" }, { "name" : "uid", "type" : "xs:boolean", "occurrence" : "?", "description" : "
If true, $messages are treated as sequence numbers. Else as unique identifiers.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "The function is declared as sequential and has side-effects. It returns the empty sequence." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 3, "name" : "rename", "qname" : "imap:rename", "signature" : "($host-info as element(email:hostInfo), $mailbox-old as xs:string, $mailbox-new as xs:string) as empty-sequence()", "description" : " Renames a mailbox.\n", "summary" : "

Renames a mailbox.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox-old", "type" : "xs:string", "occurrence" : null, "description" : "
The name of the mailbox we want to rename.
" }, { "name" : "mailbox-new", "type" : "xs:string", "occurrence" : null, "description" : "
The new name for the mailbox.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "The function is declared as sequential and has side-effects. It returns the empty sequence." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 4, "name" : "search", "qname" : "imap:search", "signature" : "($host-info as element(email:hostInfo), $mailbox as xs:string, $criteria as xs:string, $uid as xs:boolean?) as xs:long*", "description" : " Searches a mailbox for messages that match the given criteria.\n The criteria should be a string as defined in the RFC3501 (IMAP4rev1).\n A valid example would be: 'FROM zorba@gmail.com OR NOT SUBJECT Bug'.\n Depending on the value of $uid, the function will either\n return matching sequence numbers or unique identifiers.\n", "summary" : "

Searches a mailbox for messages that match the given criteria.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox to search.
" }, { "name" : "criteria", "type" : "xs:string", "occurrence" : null, "description" : "
The searching criteria.
" }, { "name" : "uid", "type" : "xs:boolean", "occurrence" : "?", "description" : "
If true, the function returns the sequence of unique identifiers corresponding to the matching mails, else the corresponding sequence numbers are returned.
" } ], "returns" : { "type" : "xs:long*", "description" : "Either the sequence of matching sequence numbers or the sequence of matching unique identifiers." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 5, "name" : "set-flags", "qname" : "imap:set-flags", "signature" : "($host-info as element(email:hostInfo), $mailbox as xs:string, $message-number as xs:long, $flags as element(email:flags), $uid as xs:boolean?) as empty-sequence()", "description" : " Sets the flags for a given message.\n The flags are set and unset according to the passed $flags.\n", "summary" : "

Sets the flags for a given message.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox containing the specified message.
" }, { "name" : "message-number", "type" : "xs:long", "occurrence" : null, "description" : "
Either the message sequence number or the unique identifier of the message (depending on the value of $uid).
" }, { "name" : "flags", "type" : "element(email:flags)", "occurrence" : null, "description" : "
Defines which flags should be set for this message. The possibilities are \"seen\", \"deleted\", \"flagged\", \"answered\", and \"draft\". Setting all flags at once is done by passing the element: <email:flags> <email:seen/> <email:deleted/> <email:flagged/> <email:answered/> <email:draft/> </email:flags> . Setting \"flagged\" only and unsetting all other at once can be done by passing: <email:flags> <email:flagged/> </email:flags> .
" }, { "name" : "uid", "type" : "xs:boolean", "occurrence" : "?", "description" : "
If true, $message-number is treated as sequence number. Else as unique identifier.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "The function is declared as sequential and has side-effects. It returns the empty sequence." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 2, "name" : "status", "qname" : "imap:status", "signature" : "($host-info as element(email:hostInfo), $mailbox as xs:string) as element(email:status)", "description" : " Returns the status of the given mailbox.\n The status of a mailbox contains:\n \n", "summary" : "

Returns the status of the given mailbox.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox for which we want to have the status.
" } ], "returns" : { "type" : "element(email:status)", "description" : "The status of the specified $mailbox. The result is validated against the schema: http://www.zorba-xquery.com/modules/email." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 2, "name" : "subscribe", "qname" : "imap:subscribe", "signature" : "($host-info as element(email:hostInfo), $mailbox as xs:string) as empty-sequence()", "description" : " Subscribes the user to the specified mailbox.\n", "summary" : "

Subscribes the user to the specified mailbox.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox the user wants to subscribe to.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "The function is declared as sequential and has side-effects. It returns the empty sequence." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] }, { "isDocumented" : true, "arity" : 2, "name" : "unsubscribe", "qname" : "imap:unsubscribe", "signature" : "($host-info as element(email:hostInfo), $mailbox as xs:string) as empty-sequence()", "description" : " Unsubscribes the user from the specified mailbox.\n", "summary" : "

Unsubscribes the user from the specified mailbox.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The IMAP host, user name, and password.
" }, { "name" : "mailbox", "type" : "xs:string", "occurrence" : null, "description" : "
The mailbox the user wants to unsubscribe from.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "The function is declared as sequential and has side-effects. It returns the empty sequence." }, "errors" : [ "imap:IMAP0001 If the IMAP operation failed.", "imap:IMAP0002 If the connection to the IMAP server is refused.", "err:XQDY0027 If the value of $host-info is not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] } ], "variables" : [ ] }, "http://zorba.io/errors" : { "ns" : "http://zorba.io/errors", "description" : " This module contains one variable declaration for each diagnostic of the\n http://zorba.io/errors namespace.\n The variables serves as documentation for the errors but can also\n be used in the code. For example, one useful scenario is to compare\n an error caught in the catch clause of a try-catch expression with one of\n the variables.\n", "sees" : [ ], "authors" : [ "Carlos Lopez" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/errors", "prefix" : "zerr" } ], "functions" : [ ], "variables" : [ { "name" : "zerr:ZDST0032", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0004", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0006", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0007", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0021", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0022", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0023", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0024", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0025", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0026", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0027", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0028", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0029", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0030", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0031", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0003", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0033", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0034", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0035", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0036", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0041", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0044", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0048", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0060", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDTY0001", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDTY0010", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDTY0011", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDTY0012", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZGDB0001", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZOSE0001", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0038", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0024", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0025", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0026", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0027", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0028", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0029", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0030", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0031", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0032", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0033", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0034", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0035", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0036", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0037", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZOSE0002", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0039", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0040", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0041", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0042", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0043", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY1000", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY1001", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY1003", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY1004", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY1005", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY1006", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0001", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDST0002", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJPE0005", "type" : "item()*", "description" : "" }, { "name" : "zerr:XSST0001", "type" : "item()*", "description" : "" }, { "name" : "zerr:XSST0002", "type" : "item()*", "description" : "" }, { "name" : "zerr:XSST0003", "type" : "item()*", "description" : "" }, { "name" : "zerr:XSST0004", "type" : "item()*", "description" : "" }, { "name" : "zerr:XSST0005", "type" : "item()*", "description" : "" }, { "name" : "zerr:XSST0006", "type" : "item()*", "description" : "" }, { "name" : "zerr:XSST0007", "type" : "item()*", "description" : "" }, { "name" : "zerr:XSST0008", "type" : "item()*", "description" : "" }, { "name" : "zerr:XSST0009", "type" : "item()*", "description" : "" }, { "name" : "zerr:XSST0010", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJPE0001", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJPE0002", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJPE0003", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJPE0004", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0066", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJPE0006", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJPE0007", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJPE0008", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJPE0009", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJPE0010", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJSE0001", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJSE0002", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJSE0003", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJSE0004", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJSE0007", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJSE0008", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJSE0009", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZJ2X0001", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0012", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZOSE0003", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZOSE0004", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZOSE0005", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZOSE0006", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZOSE0007", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0001", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0002", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0003", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0004", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0007", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0008", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0009", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0010", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0011", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0023", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0013", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0015", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0016", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0020", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0021", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0030", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0040", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0041", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0045", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0050", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0055", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0060", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZSTR0065", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQD0004", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0036", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0037", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0038", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0039", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0040", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0050", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0060", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0061", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP8401", "type" : "xs:QName", "description" : " The version of the thesaurus is not the expected version.\n" }, { "name" : "zerr:ZXQP8402", "type" : "xs:QName", "description" : " The thesaurus data file's endianness does not match that of the CPU.\n" }, { "name" : "zerr:ZXQP8403", "type" : "xs:QName", "description" : " The thesaurus data contains an unexpected value.\n" }, { "name" : "zerr:ZXQD0001", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQD0002", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQD0003", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0035", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQD0005", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQD0006", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0002", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0003", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0004", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0005", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0006", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0007", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0008", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0009", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0011", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0014", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0015", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0019", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0014", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0000", "type" : "xs:QName", "description" : " An \"error\" constant for \"no error.\"\n" }, { "name" : "zerr:ZXQP0001", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0002", "type" : "xs:QName", "description" : " A Zorba programming assertion failed. If this error occurs, it is a bug\n and should be reported.\n" }, { "name" : "zerr:ZXQP0003", "type" : "xs:QName", "description" : " Something unexpected occurred in Zorba. If this error occurs, it is a\n bug and should be reported.\n" }, { "name" : "zerr:ZXQP0004", "type" : "xs:QName", "description" : " A particular XQuery feature has not been implemented by Zorba.\n" }, { "name" : "zerr:ZXQP0005", "type" : "xs:QName", "description" : " A particular XQuery feature has been implemented by Zorba, but the\n feature has not been enabled in the current build.\n" }, { "name" : "zerr:ZXQP0006", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0007", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0008", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0009", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0010", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0011", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0012", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0013", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0020", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0016", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0017", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0020", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0021", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0024", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0025", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0026", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0028", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0029", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0030", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0031", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0032", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZXQP0033", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0009", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0012", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0013", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0014", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0015", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0016", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0017", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0001", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0002", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0003", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0004", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0005", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0006", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0007", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0008", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0011", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0010", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0011", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0012", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0013", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0014", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0015", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0016", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0017", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0018", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0020", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0019", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0021", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZDDY0022", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0045", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0021", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0023", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0024", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0025", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0026", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0027", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0028", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0029", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0030", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0039", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0040", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0041", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0042", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0043", "type" : "item()*", "description" : "" }, { "name" : "zerr:NS", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0070", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0080", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZAPI0090", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0001", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0002", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0003", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0004", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0005", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0006", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0007", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0008", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0009", "type" : "item()*", "description" : "" }, { "name" : "zerr:ZCSE0010", "type" : "item()*", "description" : "" } ] }, "http://zorba.io/modules/sequence" : { "ns" : "http://zorba.io/modules/sequence", "description" : " This module provides an XQuery API to perform set operations on sequences.\n", "sees" : [ ], "authors" : [ "Paul J. Lucas" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/sequence", "prefix" : "seq" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "value-except", "qname" : "seq:value-except", "signature" : "($seq1 as xs:anyAtomicType*, $seq2 as xs:anyAtomicType*) as xs:anyAtomicType* external", "description" : " Filters the first sequence of atomic items such that they are not in the\n second sequence based on their values.\n", "summary" : "

Filters the first sequence of atomic items such that they are not in the\n second sequence based on their values.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
The first sequence.
" }, { "name" : "seq2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
The second sequence.
" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "a sequence only containing items from $seq1 that are not in $seq2." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "value-intersect", "qname" : "seq:value-intersect", "signature" : "($seq1 as xs:anyAtomicType*, $seq2 as xs:anyAtomicType*) as xs:anyAtomicType* external", "description" : " Performs a set intersection of two sequences of atomic items based on their\n values.\n", "summary" : "

Performs a set intersection of two sequences of atomic items based on their\n values.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
The first sequence.
" }, { "name" : "seq2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
The second sequence.
" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "a sequence containing only items from $seq1 that are also in $seq2." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "value-union", "qname" : "seq:value-union", "signature" : "($seq1 as xs:anyAtomicType*, $seq2 as xs:anyAtomicType*) as xs:anyAtomicType* external", "description" : " Performs a set union of two sequences of atomic items based on their values.\n", "summary" : "

Performs a set union of two sequences of atomic items based on their values.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
The first sequence.
" }, { "name" : "seq2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
The second sequence.
" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "a sequence containing all items from $seq1 and seq2$ but without duplicates." }, "errors" : [ ] } ], "variables" : [ ] }, "http://api.28.io/functions" : { "ns" : "http://api.28.io/functions", "description" : "", "sees" : [ ], "authors" : [ ], "version" : null, "encoding" : null, "namespaces" : [ { "uri" : "", "prefix" : "an" }, { "uri" : "http://api.28.io/functions", "prefix" : "functions" }, { "uri" : "http://api.28.io/model", "prefix" : "model" }, { "uri" : "http://www.zorba-xquery.com/schemas/pul", "prefix" : "pul" }, { "uri" : "http://zorba.io/modules/reference", "prefix" : "ref" }, { "uri" : "http://www.28msec.com/modules/http/request", "prefix" : "req" }, { "uri" : "http://www.28msec.com/modules/http/response", "prefix" : "response" }, { "uri" : "http://api.28.io/sandbox", "prefix" : "sandbox" }, { "uri" : "http://www.zorba-xquery.com/schemas/xdm", "prefix" : "xdm" } ], "functions" : [ { "isDocumented" : false, "arity" : 1, "name" : "apply-pul", "qname" : "functions:apply-pul", "signature" : "($pul)", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "pul", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 0, "name" : "collections", "qname" : "functions:collections", "signature" : "()", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "decodeURI", "qname" : "functions:decodeURI", "signature" : "($str as xs:string) as xs:anyURI", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "str", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:anyURI", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "encode-for-js", "qname" : "functions:encode-for-js", "signature" : "($str as xs:string) as xs:string", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "str", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 5, "name" : "entries", "qname" : "functions:entries", "signature" : "($collection as xs:string?, $node as xs:anyURI?, $index as xs:string?, $value as xs:string?, $format as xs:string)", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "collection", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "node", "type" : "xs:anyURI", "occurrence" : "?", "description" : "" }, { "name" : "index", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "value", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "format", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 0, "name" : "indexes", "qname" : "functions:indexes", "signature" : "()", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "key", "qname" : "functions:key", "signature" : "($collection as xs:string, $condition as xs:string, $namespaces)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "collection", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "condition", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "namesearch", "qname" : "functions:namesearch", "signature" : "($collection as xs:string, $path as xs:string, $namespaces)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "collection", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "path", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "node-to-js", "qname" : "functions:node-to-js", "signature" : "($node) as xs:string*", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "parse-namespaces", "qname" : "functions:parse-namespaces", "signature" : "($namespaces as xs:string)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "namespaces", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "pksearch", "qname" : "functions:pksearch", "signature" : "($collection as xs:string)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "collection", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 0, "name" : "startpage", "qname" : "functions:startpage", "signature" : "()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "strip-whitespaces", "qname" : "functions:strip-whitespaces", "signature" : "($xml)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "xml", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "tuple", "qname" : "functions:tuple", "signature" : "($collection as xs:string, $condition as xs:string, $namespaces)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "collection", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "condition", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "valuesearch", "qname" : "functions:valuesearch", "signature" : "($collection as xs:string, $path as xs:string, $namespaces)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "collection", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "path", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "xmltojs", "qname" : "functions:xmltojs", "signature" : "($content)", "description" : " Internal function. Converts the XML contents of a POST BODY to JavaScript calls that rebuild the given XML for the collection browser frontend\n", "summary" : "

Internal function.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "content", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "JavaScript calls for collection browser frontend" }, "errors" : [ ] } ], "variables" : [ ] }, "http://xbrl.io/modules/bizql/profiles/sec/companies" : { "ns" : "http://xbrl.io/modules/bizql/profiles/sec/companies", "description" : "

This module provides functionality for querying companies (XBRL entities)\n submitting to the SEC.

\n

SEC Companies are nothing else than XBRL entities. For XBRL-generic requests on\n entities, use the generic entities module.

\n

With this module, you can retrieve a company with its CIK (without converting\n it to an EID). You can also retrieve companies by sector, by SIC code, by types,\n by tags, by tickers.

\n", "sees" : [ ], "authors" : [ "Charles Hoffman", "Matthias Brantner", "Dennis Knochenwefel", "Ghislain Fourny" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://xbrl.io/modules/bizql/archives", "prefix" : "archives" }, { "uri" : "http://xbrl.io/modules/bizql/profiles/sec/companies", "prefix" : "companies" }, { "uri" : "http://www.28msec.com/modules/credentials", "prefix" : "credentials" }, { "uri" : "http://xbrl.io/modules/bizql/entities", "prefix" : "entities" }, { "uri" : "http://www.28msec.com/modules/mongodb", "prefix" : "mongo" }, { "uri" : "http://xbrl.io/modules/bizql/profiles/sec/core", "prefix" : "sec" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "companies-by-types", "qname" : "companies:companies-by-types", "signature" : "($company-types as string*) as object()*", "description" : "

Retrieves all companies whose company type matches the passed string(s).

\n", "summary" : "

Retrieves all companies whose company type matches the passed string(s).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "company-types", "type" : "string", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "object()*", "description" : "all companies with matching company type." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "companies-for-SIC", "qname" : "companies:companies-for-SIC", "signature" : "($sic-codes as string*) as object()*", "description" : "

Retrieves all companies whose type of business\n matches the SIC (Standard Industrial Classification) code.

\n", "summary" : "

Retrieves all companies whose type of business\n matches the SIC (Standard Industrial Classification) code.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "sic-codes", "type" : "string", "occurrence" : "*", "description" : "
a sequence of SIC codes.
" } ], "returns" : { "type" : "object()*", "description" : "all companies with one of these SIC codes." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "companies-for-sector", "qname" : "companies:companies-for-sector", "signature" : "($sectors as string*) as object()*", "description" : "

Retrieves all companies in the given sectors.

\n", "summary" : "

Retrieves all companies in the given sectors.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "sectors", "type" : "string", "occurrence" : "*", "description" : "
a sequence of sectors as strings.
" } ], "returns" : { "type" : "object()*", "description" : "all companies in these sectors." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "companies-for-tags", "qname" : "companies:companies-for-tags", "signature" : "($tags as string*) as object()*", "description" : "

Return all companies with any of the given tags.

\n", "summary" : "

Return all companies with any of the given tags.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "tags", "type" : "string", "occurrence" : "*", "description" : "
the tags to filter.
" } ], "returns" : { "type" : "object()*", "description" : "all companies with the given tags." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "companies-for-tickers", "qname" : "companies:companies-for-tickers", "signature" : "($tickers as string*) as object()*", "description" : "

Return all companies with any of the given ticker symbols.

\n

Tickers are case insensitive

\n", "summary" : "

Return all companies with any of the given ticker symbols.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "tickers", "type" : "string", "occurrence" : "*", "description" : "
the tickers to filter.
" } ], "returns" : { "type" : "object()*", "description" : "all companies with the given tickers." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "companies", "qname" : "companies:companies", "signature" : "() as object()*", "description" : "

Return all companies

\n", "summary" : "

Return all companies \n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()*", "description" : "all companies." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "companies", "qname" : "companies:companies", "signature" : "($companies-or-ids as item()*) as object()*", "description" : "

Return the companies with the given identifiers.

\n", "summary" : "

Return the companies with the given identifiers.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "companies-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
the ids of the companies or the companies themselves.
" } ], "returns" : { "type" : "object()*", "description" : "the companies with the given identifiers the empty sequence if no company was found or if the input is an empty sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "company-type", "qname" : "companies:company-type", "signature" : "($company-name as string) as string", "description" : "

Return company type for a given company name. Company type can be one of:

\n

\n

\n

\n", "summary" : "

Return company type for a given company name.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "company-name", "type" : "string", "occurrence" : null, "description" : "
the name of a company
" } ], "returns" : { "type" : "string", "description" : "the company type string or \"unknown\" if the type can not be inferred" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "eid", "qname" : "companies:eid", "signature" : "($companies-or-eids-or-ciks as item()*) as string*", "description" : "

Converts the input to a normalized CIK. The input\n can be either a pure CIK without scheme, or an already\n normalized CIK, or an entity object which contains a CIK\n in its id field.

\n", "summary" : "

Converts the input to a normalized CIK.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "companies-or-eids-or-ciks", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "string*", "description" : "the normalized CIK." }, "errors" : [ "sec:INVALID_PARAMETER if the CIK or entity is not valid" ] }, { "isDocumented" : true, "arity" : 1, "name" : "types", "qname" : "companies:types", "signature" : "($companies-or-ciks as item()*) as string*", "description" : "

Retrieves the type of a company.

\n", "summary" : "

Retrieves the type of a company.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "companies-or-ciks", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of companies or their identifiers (CIKs).
" } ], "returns" : { "type" : "string*", "description" : "all company types." }, "errors" : [ ] } ], "variables" : [ ] }, "http://api.28.io/collections" : { "ns" : "http://api.28.io/collections", "description" : "", "sees" : [ ], "authors" : [ ], "version" : null, "encoding" : null, "namespaces" : [ { "uri" : "", "prefix" : "an" }, { "uri" : "http://api.28.io/collections", "prefix" : "cm" }, { "uri" : "http://www.28msec.com/modules/http/request", "prefix" : "req" }, { "uri" : "http://www.28msec.com/modules/http/response", "prefix" : "resp" }, { "uri" : "http://api.28.io/util", "prefix" : "util" }, { "uri" : "http://api.28.io/validation", "prefix" : "validate" } ], "functions" : [ { "isDocumented" : false, "arity" : 1, "name" : "definition-for-dynamic-collection", "qname" : "cm:definition-for-dynamic-collection", "signature" : "($name as xs:string) as object()", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "object()", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "delete-collection-property", "qname" : "cm:delete-collection-property", "signature" : "($name as xs:string, $property as xs:string) as empty-sequence()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "property", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "empty-sequence()", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "delete-collection", "qname" : "cm:delete-collection", "signature" : "($name) as empty-sequence()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : "empty-sequence()", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 0, "name" : "dispatch", "qname" : "cm:dispatch", "signature" : "()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "get-collection-property", "qname" : "cm:get-collection-property", "signature" : "($name as xs:string, $property as xs:string)", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "property", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "get-collection", "qname" : "cm:get-collection", "signature" : "($name as xs:string) as object()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "object()", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "get-or-create-collection-dynamic", "qname" : "cm:get-or-create-collection-dynamic", "signature" : "($name as xs:string) as object()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "object()", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 0, "name" : "list-collections", "qname" : "cm:list-collections", "signature" : "() as array()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "array()", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 0, "name" : "metadata", "qname" : "cm:metadata", "signature" : "()", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "put-collection-property", "qname" : "cm:put-collection-property", "signature" : "($name as xs:string, $property as xs:string, $value) as empty-sequence()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "property", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "value", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : "empty-sequence()", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "put-collection", "qname" : "cm:put-collection", "signature" : "($name as xs:string, $collection as object()) as empty-sequence()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "collection", "type" : "object()", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "empty-sequence()", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "validate-collection", "qname" : "cm:validate-collection", "signature" : "($collection as object()) as empty-sequence()", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "collection", "type" : "object()", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "empty-sequence()", "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/excel/math-sumproduct" : { "ns" : "http://zorba.io/modules/excel/math-sumproduct", "description" : " Module implementing the sumproduct functions from Excel 2003 math library.\n There are 30 functions defined, implementing the same function\n but with 1 to 30 parameters.\n Each parameter can be a sequence of infinite length.\n", "sees" : [ "Excel 2003 Documentation: Math-sumproduct Functions" ], "authors" : [ "Daniel Turcanu" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/excel/math-sumproduct", "prefix" : "excel" }, { "uri" : "http://zorba.io/modules/excel/errors", "prefix" : "excel-err" }, { "uri" : "http://zorba.io/modules/excel/math", "prefix" : "excel-math" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Sums the values in the sequence.\n The sequence can be of any length.\n", "summary" : "

Sums the values in the sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequence of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 10, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 11, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 12, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 13, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 14, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 15, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array15", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 16, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array15", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array16", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 17, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array15", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array16", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array17", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 18, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array15", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array16", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array17", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array18", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 19, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array15", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array16", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array17", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array18", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array19", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 2, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 20, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array15", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array16", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array17", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array18", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array19", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array20", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 21, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array15", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array16", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array17", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array18", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array19", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array20", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array21", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 22, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array15", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array16", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array17", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array18", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array19", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array20", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array21", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array22", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 23, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*, $array23 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array15", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array16", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array17", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array18", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array19", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array20", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array21", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array22", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array23", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 24, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*, $array23 as xs:anyAtomicType*, $array24 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array15", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array16", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array17", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array18", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array19", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array20", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array21", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array22", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array23", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array24", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 25, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*, $array23 as xs:anyAtomicType*, $array24 as xs:anyAtomicType*, $array25 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array15", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array16", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array17", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array18", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array19", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array20", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array21", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array22", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array23", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array24", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array25", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 26, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*, $array23 as xs:anyAtomicType*, $array24 as xs:anyAtomicType*, $array25 as xs:anyAtomicType*, $array26 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array15", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array16", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array17", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array18", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array19", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array20", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array21", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array22", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array23", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array24", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array25", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array26", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 27, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*, $array23 as xs:anyAtomicType*, $array24 as xs:anyAtomicType*, $array25 as xs:anyAtomicType*, $array26 as xs:anyAtomicType*, $array27 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array15", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array16", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array17", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array18", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array19", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array20", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array21", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array22", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array23", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array24", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array25", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array26", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array27", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 28, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*, $array23 as xs:anyAtomicType*, $array24 as xs:anyAtomicType*, $array25 as xs:anyAtomicType*, $array26 as xs:anyAtomicType*, $array27 as xs:anyAtomicType*, $array28 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array15", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array16", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array17", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array18", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array19", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array20", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array21", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array22", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array23", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array24", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array25", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array26", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array27", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array28", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 29, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*, $array23 as xs:anyAtomicType*, $array24 as xs:anyAtomicType*, $array25 as xs:anyAtomicType*, $array26 as xs:anyAtomicType*, $array27 as xs:anyAtomicType*, $array28 as xs:anyAtomicType*, $array29 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array15", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array16", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array17", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array18", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array19", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array20", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array21", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array22", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array23", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array24", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array25", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array26", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array27", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array28", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array29", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 3, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 30, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*, $array23 as xs:anyAtomicType*, $array24 as xs:anyAtomicType*, $array25 as xs:anyAtomicType*, $array26 as xs:anyAtomicType*, $array27 as xs:anyAtomicType*, $array28 as xs:anyAtomicType*, $array29 as xs:anyAtomicType*, $array30 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array10", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array11", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array12", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array13", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array14", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array15", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array16", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array17", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array18", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array19", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array20", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array21", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array22", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array23", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array24", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array25", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array26", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array27", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array28", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array29", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array30", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 4, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 5, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 6, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 7, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 8, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 9, "name" : "sumproduct", "qname" : "excel:sumproduct", "signature" : "($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Multiplies the elements on the same position in each sequence\n and sums up the results.\n", "summary" : "

Multiplies the elements on the same position in each sequence\n and sums up the results.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array3", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array4", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array5", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array6", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array7", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array8", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" }, { "name" : "array9", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequences of numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of products" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 1, "name" : "sumsq", "qname" : "excel:sumsq", "signature" : "($numbers as xs:anyAtomicType+) as xs:anyAtomicType", "description" : " Returns the sum of the squares of the arguments.\n It used the sumproduct function.\n", "summary" : "

Returns the sum of the squares of the arguments.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "numbers", "type" : "xs:anyAtomicType", "occurrence" : "+", "description" : "
the sequence of one or more numbers or arguments castable to numeric
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the sum of squared values, as numeric type" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] } ], "variables" : [ ] }, "http://zorba.io/modules/item" : { "ns" : "http://zorba.io/modules/item", "description" : " This module provides utility functions on items. For example,\n it provides a function that allows estimating the size in bytes\n that a given item allocates in memory.\n", "sees" : [ ], "authors" : [ "Matthias Brantner" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/item", "prefix" : "item" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "size", "qname" : "item:size", "signature" : "($item as item()) as xs:integer external", "description" : " Computes the size in bytes of the given item in main memory.

\n", "summary" : "

Computes the size in bytes of the given item in main memory.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "item", "type" : "item()", "occurrence" : null, "description" : "
the item whose size to compute.
" } ], "returns" : { "type" : "xs:integer", "description" : "the size allocated by the item in bytes." }, "errors" : [ ] } ], "variables" : [ ] }, "http://www.zorba-xquery.com/modules/xqdoc/menu" : { "ns" : "http://www.zorba-xquery.com/modules/xqdoc/menu", "description" : " Generate navigation for XQDoc batches.\n", "sees" : [ ], "authors" : [ "William Candillon" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.zorba-xquery.com/modules/xqdoc/menu", "prefix" : "menu" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : false, "arity" : 2, "name" : "categories-as-js", "qname" : "menu:categories-as-js", "signature" : "($url-prefix as xs:string, $cats as element(*)) as xs:string", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "url-prefix", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cats", "type" : "element(*)", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "categories", "qname" : "menu:categories", "signature" : "($top as element(*)) as xs:string*", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "top", "type" : "element(*)", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "closed-tabs", "qname" : "menu:closed-tabs", "signature" : "($item as element(section), $url-prefix as xs:string) as element(li)*", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "item", "type" : "element(section)", "occurrence" : null, "description" : "" }, { "name" : "url-prefix", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "element(li)*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "closed-tabs", "qname" : "menu:closed-tabs", "signature" : "($item as element(*)?, $result as element(*)*, $url-prefix as xs:string) as element(li)*", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "item", "type" : "element(*)", "occurrence" : "?", "description" : "" }, { "name" : "result", "type" : "element(*)", "occurrence" : "*", "description" : "" }, { "name" : "url-prefix", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "element(li)*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "item-uri", "qname" : "menu:item-uri", "signature" : "($item as element(*)) as xs:string", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "item", "type" : "element(*)", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "item-uri", "qname" : "menu:item-uri", "signature" : "($item as element(*)?, $result as xs:string*) as xs:string+", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "item", "type" : "element(*)", "occurrence" : "?", "description" : "" }, { "name" : "result", "type" : "xs:string", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "xs:string+", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "item", "qname" : "menu:item", "signature" : "($ctx as element(*)?, $path as xs:string*) as element(*)?", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "ctx", "type" : "element(*)", "occurrence" : "?", "description" : "" }, { "name" : "path", "type" : "xs:string", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "element(*)?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "menu", "qname" : "menu:menu", "signature" : "($item as element(*), $url-prefix as xs:string)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "item", "type" : "element(*)", "occurrence" : null, "description" : "" }, { "name" : "url-prefix", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] } ], "variables" : [ { "name" : "menu:not-found", "type" : "item()*", "description" : "" } ] }, "http://zorba.io/modules/dbgp-message-handler" : { "ns" : "http://zorba.io/modules/dbgp-message-handler", "description" : " Zorba debugger module.\n", "sees" : [ ], "authors" : [ "Gabriel Petrovay" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/base64", "prefix" : "base64" }, { "uri" : "http://zorba.io/modules/dbgp-message-handler", "prefix" : "dmh" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "process", "qname" : "dmh:process", "signature" : "($message as element(*)) as xs:anyAtomicType*", "description" : " Process one message received from the Zorba debugger server.\n", "summary" : "

Process one message received from the Zorba debugger server.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "message", "type" : "element(*)", "occurrence" : null, "description" : "
the message.
" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "()." }, "errors" : [ ] } ], "variables" : [ { "name" : "dmh:debug", "type" : "xs:boolean", "description" : " Set this variale to true if you want to have mode debug information when\n an error occurs.\n" } ] }, "http://www.28msec.com/modules/ws/mailchimp" : { "ns" : "http://www.28msec.com/modules/ws/mailchimp", "description" : " Mailchimp Client Module.\n", "sees" : [ "http://apidocs.mailchimp.com" ], "authors" : [ "William Candillon {william.candillon@28msec.com}" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://expath.org/ns/http-client", "prefix" : "http-client" }, { "uri" : "http://www.28msec.com/modules/ws/mailchimp", "prefix" : "mailchimp" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://www.28msec.com/modules/xmlrpc", "prefix" : "xmlrpc" } ], "functions" : [ { "isDocumented" : true, "arity" : 3, "name" : "apikey-add", "qname" : "mailchimp:apikey-add", "signature" : "($username as xs:string, $password as xs:string, $apikey as xs:string) as item()*", "description" : " Convenience function for apikey-add#4.\n", "summary" : "

Convenience function for apikey-add#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "username", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "password", "type" : "xs:string", "occurrence" : null, "description" : "
Your MailChimp password
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
Any valid API Key
" } ], "returns" : { "type" : "item()*", "description" : "A new API Key that can be immediately used." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "apikey-add", "qname" : "mailchimp:apikey-add", "signature" : "($endpoint-url as xs:string, $username as xs:string, $password as xs:string, $apikey as xs:string) as item()*", "description" : " Add an API Key to your account. We will generate a new key for you and return it.\n", "summary" : "

Add an API Key to your account.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "username", "type" : "xs:string", "occurrence" : null, "description" : "
Your MailChimp user name
" }, { "name" : "password", "type" : "xs:string", "occurrence" : null, "description" : "
Your MailChimp password
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
Any valid API Key
" } ], "returns" : { "type" : "item()*", "description" : "A new API Key that can be immediately used." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "apikey-expire", "qname" : "mailchimp:apikey-expire", "signature" : "($username as xs:string, $password as xs:string, $apikey as xs:string) as item()*", "description" : " Convenience function for apikey-expire#4.\n", "summary" : "

Convenience function for apikey-expire#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "username", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "password", "type" : "xs:string", "occurrence" : null, "description" : "
Your MailChimp password
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
Any valid API Key that you wish to expire
" } ], "returns" : { "type" : "item()*", "description" : "True if it worked, otherwise an error is thrown." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "apikey-expire", "qname" : "mailchimp:apikey-expire", "signature" : "($endpoint-url as xs:string, $username as xs:string, $password as xs:string, $apikey as xs:string) as item()*", "description" : " Expire a Specific API Key. Note that if you expire all of your keys, just visit your API dashboard to create a new one. If you are trying to shut off access to your account for an old developer, change your MailChimp password, then expire all of the keys they had access to. Note that this takes effect immediately, so make sure you replace the keys in any working application before expiring them! Consider yourself warned...\n", "summary" : "

Expire a Specific API Key.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "username", "type" : "xs:string", "occurrence" : null, "description" : "
Your MailChimp user name
" }, { "name" : "password", "type" : "xs:string", "occurrence" : null, "description" : "
Your MailChimp password
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
Any valid API Key that you wish to expire
" } ], "returns" : { "type" : "item()*", "description" : "True if it worked, otherwise an error is thrown." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "apikeys", "qname" : "mailchimp:apikeys", "signature" : "($username as xs:string, $password as xs:string, $apikey as xs:string, $expired as xs:boolean) as item()*", "description" : " Convenience function for apikeys#5.\n", "summary" : "

Convenience function for apikeys#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "username", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "password", "type" : "xs:string", "occurrence" : null, "description" : "
Your MailChimp password
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
Any valid API Key for your account
" }, { "name" : "expired", "type" : "xs:boolean", "occurrence" : null, "description" : "
optional - whether or not to include expired keys, defaults to false
" } ], "returns" : { "type" : "item()*", "description" : "An array of API keys." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "apikeys", "qname" : "mailchimp:apikeys", "signature" : "($endpoint-url as xs:string, $username as xs:string, $password as xs:string, $apikey as xs:string, $expired as xs:boolean) as item()*", "description" : " Retrieve a list of all MailChimp API Keys for this User.\n", "summary" : "

Retrieve a list of all MailChimp API Keys for this User.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "username", "type" : "xs:string", "occurrence" : null, "description" : "
Your MailChimp user name
" }, { "name" : "password", "type" : "xs:string", "occurrence" : null, "description" : "
Your MailChimp password
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
Any valid API Key for your account
" }, { "name" : "expired", "type" : "xs:boolean", "occurrence" : null, "description" : "
optional - whether or not to include expired keys, defaults to false
" } ], "returns" : { "type" : "item()*", "description" : "An array of API keys." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "campaign-abuse-reports", "qname" : "mailchimp:campaign-abuse-reports", "signature" : "($apikey as xs:string, $cid as xs:string, $since as xs:integer, $start as xs:integer, $limit as xs:string) as item()*", "description" : " Convenience function for campaign-abuse-reports#6.\n", "summary" : "

Convenience function for campaign-abuse-reports#6 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull abuse reports for (can be gathered using campaigns())
" }, { "name" : "since", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the number of results to return - defaults to 500, upper limit set at 1000
" }, { "name" : "limit", "type" : "xs:string", "occurrence" : null, "description" : "
optional pull only messages since this time - use YYYY-MM-DD HH:II:SS format in GMT
" } ], "returns" : { "type" : "item()*", "description" : "Reports the abuse reports for this campaign" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "campaign-abuse-reports", "qname" : "mailchimp:campaign-abuse-reports", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $since as xs:integer, $start as xs:integer, $limit as xs:string) as item()*", "description" : " Get all email addresses that complained about a given campaign.\n", "summary" : "

Get all email addresses that complained about a given campaign.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull abuse reports for (can be gathered using campaigns())
" }, { "name" : "since", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the number of results to return - defaults to 500, upper limit set at 1000
" }, { "name" : "limit", "type" : "xs:string", "occurrence" : null, "description" : "
optional pull only messages since this time - use YYYY-MM-DD HH:II:SS format in GMT
" } ], "returns" : { "type" : "item()*", "description" : "Reports the abuse reports for this campaign" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "campaign-advice", "qname" : "mailchimp:campaign-advice", "signature" : "($apikey as xs:string, $cid as xs:string) as item()*", "description" : " Convenience function for campaign-advice#3.\n", "summary" : "

Convenience function for campaign-advice#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull advice text for (can be gathered using campaigns())
" } ], "returns" : { "type" : "item()*", "description" : "Advice on the campaign's performance" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-advice", "qname" : "mailchimp:campaign-advice", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*", "description" : " Retrieve the text presented in our app for how a campaign performed and any advice we may have for you - best suited for display in customized reports pages.\n Note: some messages will contain HTML - clean tags as necessary.\n", "summary" : "

Retrieve the text presented in our app for how a campaign performed and any advice we may have for you - best suited for display in customized reports pages.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull advice text for (can be gathered using campaigns())
" } ], "returns" : { "type" : "item()*", "description" : "Advice on the campaign's performance" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "campaign-analytics", "qname" : "mailchimp:campaign-analytics", "signature" : "($apikey as xs:string, $cid as xs:string) as item()*", "description" : " Convenience function for campaign-analytics#3.\n", "summary" : "

Convenience function for campaign-analytics#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" } ], "returns" : { "type" : "item()*", "description" : "Analytics we've collected for the passed campaign." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-analytics", "qname" : "mailchimp:campaign-analytics", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*", "description" : " Retrieve the Google Analytics data we've collected for this campaign. Note, requires Google Analytics Add-on to be installed and configured.\n", "summary" : "

Retrieve the Google Analytics data we've collected for this campaign.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" } ], "returns" : { "type" : "item()*", "description" : "Analytics we've collected for the passed campaign." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-bounce-message", "qname" : "mailchimp:campaign-bounce-message", "signature" : "($apikey as xs:string, $cid as xs:string, $email as xs:string) as item()*", "description" : " Convenience function for campaign-bounce-message#4.\n", "summary" : "

Convenience function for campaign-bounce-message#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" }, { "name" : "email", "type" : "xs:string", "occurrence" : null, "description" : "
the email address or unique id of the member to pull a bounce message for.
" } ], "returns" : { "type" : "item()*", "description" : "The full bounce message for this email+campaign along with some extra data." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "campaign-bounce-message", "qname" : "mailchimp:campaign-bounce-message", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $email as xs:string) as item()*", "description" : " Retrieve the most recent full bounce message for a specific email address on the given campaign. Messages over 30 days old are subject to being removed.\n", "summary" : "

Retrieve the most recent full bounce message for a specific email address on the given campaign.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" }, { "name" : "email", "type" : "xs:string", "occurrence" : null, "description" : "
the email address or unique id of the member to pull a bounce message for.
" } ], "returns" : { "type" : "item()*", "description" : "The full bounce message for this email+campaign along with some extra data." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "campaign-bounce-messages", "qname" : "mailchimp:campaign-bounce-messages", "signature" : "($apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer, $since as xs:string) as item()*", "description" : " Convenience function for campaign-bounce-messages#6.\n", "summary" : "

Convenience function for campaign-bounce-messages#6 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the number of results to return - defaults to 25, upper limit set at 50
" }, { "name" : "since", "type" : "xs:string", "occurrence" : null, "description" : "
optional pull only messages since this time - use YYYY-MM-DD format in GMT (we only store the date, not the time)
" } ], "returns" : { "type" : "item()*", "description" : "Bounces the full bounce messages for this campaign" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "campaign-bounce-messages", "qname" : "mailchimp:campaign-bounce-messages", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer, $since as xs:string) as item()*", "description" : " Retrieve the full bounce messages for the given campaign. Note that this can return very large amounts of data depending on how large the campaign was and how much cruft the bounce provider returned.\n", "summary" : "

Retrieve the full bounce messages for the given campaign.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the number of results to return - defaults to 25, upper limit set at 50
" }, { "name" : "since", "type" : "xs:string", "occurrence" : null, "description" : "
optional pull only messages since this time - use YYYY-MM-DD format in GMT (we only store the date, not the time)
" } ], "returns" : { "type" : "item()*", "description" : "Bounces the full bounce messages for this campaign" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "campaign-click-detail-AIM", "qname" : "mailchimp:campaign-click-detail-AIM", "signature" : "($apikey as xs:string, $cid as xs:string, $url as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Convenience function for campaign-click-detail-AIM#6.\n", "summary" : "

Convenience function for campaign-click-detail-AIM#6 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to get click stats for (can be gathered using campaigns())
" }, { "name" : "url", "type" : "xs:string", "occurrence" : null, "description" : "
the URL of the link that was clicked on
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000
" } ], "returns" : { "type" : "item()*", "description" : "Array containing the total records matched and the specific records for this page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "campaign-click-detail-AIM", "qname" : "mailchimp:campaign-click-detail-AIM", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $url as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Return the list of email addresses that clicked on a given url, and how many times they clicked.\n", "summary" : "

Return the list of email addresses that clicked on a given url, and how many times they clicked.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to get click stats for (can be gathered using campaigns())
" }, { "name" : "url", "type" : "xs:string", "occurrence" : null, "description" : "
the URL of the link that was clicked on
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000
" } ], "returns" : { "type" : "item()*", "description" : "Array containing the total records matched and the specific records for this page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "campaign-click-stats", "qname" : "mailchimp:campaign-click-stats", "signature" : "($apikey as xs:string, $cid as xs:string) as item()*", "description" : " Convenience function for campaign-click-stats#3.\n", "summary" : "

Convenience function for campaign-click-stats#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull stats for (can be gathered using campaigns())
" } ], "returns" : { "type" : "item()*", "description" : "URLs will be keys and contain their associated statistics: clicks (number of times a specific link was clicked) and unique (number of unique people who clicked on the specific link)." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-click-stats", "qname" : "mailchimp:campaign-click-stats", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*", "description" : " Get an array of the urls being tracked, and their click counts for a given campaign.\n", "summary" : "

Get an array of the urls being tracked, and their click counts for a given campaign.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull stats for (can be gathered using campaigns())
" } ], "returns" : { "type" : "item()*", "description" : "URLs will be keys and contain their associated statistics: clicks (number of times a specific link was clicked) and unique (number of unique people who clicked on the specific link)." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-content", "qname" : "mailchimp:campaign-content", "signature" : "($apikey as xs:string, $cid as xs:string, $for_archive as xs:boolean) as item()*", "description" : " Convenience function for campaign-content#4.\n", "summary" : "

Convenience function for campaign-content#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to get content for (can be gathered using campaigns())
" }, { "name" : "for_archive", "type" : "xs:boolean", "occurrence" : null, "description" : "
optional controls whether we return the Archive version (true) or the Raw version (false), defaults to true
" } ], "returns" : { "type" : "item()*", "description" : "Struct containing all content for the campaign" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "campaign-content", "qname" : "mailchimp:campaign-content", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $for_archive as xs:boolean) as item()*", "description" : " Get the content (both html and text) for a campaign either as it would appear in the campaign archive or as the raw, original content.\n", "summary" : "

Get the content (both html and text) for a campaign either as it would appear in the campaign archive or as the raw, original content.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to get content for (can be gathered using campaigns())
" }, { "name" : "for_archive", "type" : "xs:boolean", "occurrence" : null, "description" : "
optional controls whether we return the Archive version (true) or the Raw version (false), defaults to true
" } ], "returns" : { "type" : "item()*", "description" : "Struct containing all content for the campaign" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "campaign-create", "qname" : "mailchimp:campaign-create", "signature" : "($apikey as xs:string, $type as xs:string, $options as element(array), $content as element(array), $segment_opts as element(array), $type_opts as element(array)) as item()*", "description" : " Convenience function for campaign-create#7.\n", "summary" : "

Convenience function for campaign-create#7 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the Campaign Type to create - one of \"regular\", \"plaintext\", \"absplit\", \"rss\", \"trans\", \"auto\"
" }, { "name" : "options", "type" : "element(array)", "occurrence" : null, "description" : "
a hash of the standard options for this campaign. See Mailchimp API documentation for more information about the parameter structure.
" }, { "name" : "content", "type" : "element(array)", "occurrence" : null, "description" : "
the content for this campaign - use a struct with the following keys. See Mailchimp API documentation for more information about the parameter structure.
" }, { "name" : "segment_opts", "type" : "element(array)", "occurrence" : null, "description" : "
optional - if you wish to do Segmentation with this campaign this array should contain: see campaign-segment-test(). It's suggested that you test your options against campaign-segment-test(). Also, \"trans\" campaigns do not support segmentation.
" }, { "name" : "type_opts", "type" : "element(array)", "occurrence" : null, "description" : "
optional -
" } ], "returns" : { "type" : "item()*", "description" : "The ID for the created campaign" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 7, "name" : "campaign-create", "qname" : "mailchimp:campaign-create", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $type as xs:string, $options as element(array), $content as element(array), $segment_opts as element(array), $type_opts as element(array)) as item()*", "description" : " Create a new draft campaign to send. You can not have more than 32,000 campaigns in your account.\n", "summary" : "

Create a new draft campaign to send.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the Campaign Type to create - one of \"regular\", \"plaintext\", \"absplit\", \"rss\", \"trans\", \"auto\"
" }, { "name" : "options", "type" : "element(array)", "occurrence" : null, "description" : "
a hash of the standard options for this campaign. See Mailchimp API documentation for more information about the parameter structure.
" }, { "name" : "content", "type" : "element(array)", "occurrence" : null, "description" : "
the content for this campaign - use a struct with the following keys. See Mailchimp API documentation for more information about the parameter structure.
" }, { "name" : "segment_opts", "type" : "element(array)", "occurrence" : null, "description" : "
optional - if you wish to do Segmentation with this campaign this array should contain: see campaign-segment-test(). It's suggested that you test your options against campaign-segment-test(). Also, \"trans\" campaigns do not support segmentation.
" }, { "name" : "type_opts", "type" : "element(array)", "occurrence" : null, "description" : "
optional
" } ], "returns" : { "type" : "item()*", "description" : "The ID for the created campaign" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "campaign-delete", "qname" : "mailchimp:campaign-delete", "signature" : "($apikey as xs:string, $cid as xs:string) as item()*", "description" : " Convenience function for campaign-delete#3.\n", "summary" : "

Convenience function for campaign-delete#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the Campaign Id to delete
" } ], "returns" : { "type" : "item()*", "description" : "True if the delete succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-delete", "qname" : "mailchimp:campaign-delete", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*", "description" : " Delete a campaign. Seriously, \"poof, gone!\" - be careful!.\n", "summary" : "

Delete a campaign.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the Campaign Id to delete
" } ], "returns" : { "type" : "item()*", "description" : "True if the delete succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "campaign-ecomm-order-add", "qname" : "mailchimp:campaign-ecomm-order-add", "signature" : "($apikey as xs:string, $order as element(array)) as item()*", "description" : " Convenience function for campaign-ecomm-order-add#3.\n", "summary" : "

Convenience function for campaign-ecomm-order-add#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "order", "type" : "element(array)", "occurrence" : null, "description" : "
an array of information pertaining to the order that has completed. Use the following keys. See Mailchimp API documentation for more information about the parameter structure.
" } ], "returns" : { "type" : "item()*", "description" : "True if the data is saved, otherwise an error is thrown." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-ecomm-order-add", "qname" : "mailchimp:campaign-ecomm-order-add", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $order as element(array)) as item()*", "description" : " Attach Ecommerce Order Information to a Campaign.\n", "summary" : "

Attach Ecommerce Order Information to a Campaign.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "order", "type" : "element(array)", "occurrence" : null, "description" : "
an array of information pertaining to the order that has completed. Use the following keys. See Mailchimp API documentation for more information about the parameter structure.
" } ], "returns" : { "type" : "item()*", "description" : "True if the data is saved, otherwise an error is thrown." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "campaign-ecomm-orders", "qname" : "mailchimp:campaign-ecomm-orders", "signature" : "($apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer, $since as xs:string) as item()*", "description" : " Convenience function for campaign-ecomm-orders#6.\n", "summary" : "

Convenience function for campaign-ecomm-orders#6 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the number of results to return - defaults to 100, upper limit set at 500
" }, { "name" : "since", "type" : "xs:string", "occurrence" : null, "description" : "
optional pull only messages since this time - use YYYY-MM-DD HH:II:SS format in GMT
" } ], "returns" : { "type" : "item()*", "description" : "The total matching orders and the specific orders for the requested page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "campaign-ecomm-orders", "qname" : "mailchimp:campaign-ecomm-orders", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer, $since as xs:string) as item()*", "description" : " Retrieve the Ecommerce Orders tracked by campaign-ecomm-order-add().\n", "summary" : "

Retrieve the Ecommerce Orders tracked by campaign-ecomm-order-add() .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the number of results to return - defaults to 100, upper limit set at 500
" }, { "name" : "since", "type" : "xs:string", "occurrence" : null, "description" : "
optional pull only messages since this time - use YYYY-MM-DD HH:II:SS format in GMT
" } ], "returns" : { "type" : "item()*", "description" : "The total matching orders and the specific orders for the requested page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "campaign-eep-url-stats", "qname" : "mailchimp:campaign-eep-url-stats", "signature" : "($apikey as xs:string, $cid as xs:string) as item()*", "description" : " Convenience function for campaign-eep-url-stats#3.\n", "summary" : "

Convenience function for campaign-eep-url-stats#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" } ], "returns" : { "type" : "item()*", "description" : "Stats an array containing tweets, retweets, clicks, and referrer related to using the campaign's eepurl" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-eep-url-stats", "qname" : "mailchimp:campaign-eep-url-stats", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*", "description" : " Retrieve the tracked eepurl mentions on Twitter.\n", "summary" : "

Retrieve the tracked eepurl mentions on Twitter.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" } ], "returns" : { "type" : "item()*", "description" : "Stats an array containing tweets, retweets, clicks, and referrer related to using the campaign's eepurl" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "campaign-email-domain-performance", "qname" : "mailchimp:campaign-email-domain-performance", "signature" : "($apikey as xs:string, $cid as xs:string) as item()*", "description" : " Convenience function for campaign-email-domain-performance#3.\n", "summary" : "

Convenience function for campaign-email-domain-performance#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull email domain performance for (can be gathered using campaigns())
" } ], "returns" : { "type" : "item()*", "description" : "Domains email domains and their associated stats" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-email-domain-performance", "qname" : "mailchimp:campaign-email-domain-performance", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*", "description" : " Get the top 5 performing email domains for this campaign. Users want more than 5 should use campaign campaign-email-stats-AIM() or campaign-email-stats-AIM-all() and generate any additional stats they require.\n", "summary" : "

Get the top 5 performing email domains for this campaign.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull email domain performance for (can be gathered using campaigns())
" } ], "returns" : { "type" : "item()*", "description" : "Domains email domains and their associated stats" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "campaign-email-stats-AIM-all", "qname" : "mailchimp:campaign-email-stats-AIM-all", "signature" : "($apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Convenience function for campaign-email-stats-AIM-all#5.\n", "summary" : "

Convenience function for campaign-email-stats-AIM-all#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to get stats for (can be gathered using campaigns())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the number of results to return - defaults to 100, upper limit set at 1000
" } ], "returns" : { "type" : "item()*", "description" : "Array containing a total record count and data including the actions (opens and clicks) for each email, with timestamps" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "campaign-email-stats-AIM-all", "qname" : "mailchimp:campaign-email-stats-AIM-all", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Given a campaign and correct paging limits, return the entire click and open history with timestamps, ordered by time, for every user a campaign was delivered to.\n", "summary" : "

Given a campaign and correct paging limits, return the entire click and open history with timestamps, ordered by time, for every user a campaign was delivered to.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to get stats for (can be gathered using campaigns())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the number of results to return - defaults to 100, upper limit set at 1000
" } ], "returns" : { "type" : "item()*", "description" : "Array containing a total record count and data including the actions (opens and clicks) for each email, with timestamps" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-email-stats-AIM", "qname" : "mailchimp:campaign-email-stats-AIM", "signature" : "($apikey as xs:string, $cid as xs:string, $email_address as element(array)) as item()*", "description" : " Convenience function for campaign-email-stats-AIM#4.\n", "summary" : "

Convenience function for campaign-email-stats-AIM#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to get stats for (can be gathered using campaigns())
" }, { "name" : "email_address", "type" : "element(array)", "occurrence" : null, "description" : "
an array of up to 50 email addresses to check OR the email \"id\" returned from listMemberInfo, Webhooks, and Campaigns. For backwards compatibility, if a string is passed, it will be treated as an array with a single element (will not work with XML-RPC).
" } ], "returns" : { "type" : "item()*", "description" : "Array an array with the keys listed in Returned Fields below" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "campaign-email-stats-AIM", "qname" : "mailchimp:campaign-email-stats-AIM", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $email_address as element(array)) as item()*", "description" : " Given a campaign and email address, return the entire click and open history with timestamps, ordered by time.\n", "summary" : "

Given a campaign and email address, return the entire click and open history with timestamps, ordered by time.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to get stats for (can be gathered using campaigns())
" }, { "name" : "email_address", "type" : "element(array)", "occurrence" : null, "description" : "
an array of up to 50 email addresses to check OR the email \"id\" returned from listMemberInfo, Webhooks, and Campaigns. For backwards compatibility, if a string is passed, it will be treated as an array with a single element (will not work with XML-RPC).
" } ], "returns" : { "type" : "item()*", "description" : "Array an array with the keys listed in Returned Fields below" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-geo-opens-for-country", "qname" : "mailchimp:campaign-geo-opens-for-country", "signature" : "($apikey as xs:string, $cid as xs:string, $code as xs:string) as item()*", "description" : " Convenience function for campaign-geo-opens-for-country#4.\n", "summary" : "

Convenience function for campaign-geo-opens-for-country#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" }, { "name" : "code", "type" : "xs:string", "occurrence" : null, "description" : "
An ISO3166 2 digit country code
" } ], "returns" : { "type" : "item()*", "description" : "Regions an array of regions within the provided country where opens occurred." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "campaign-geo-opens-for-country", "qname" : "mailchimp:campaign-geo-opens-for-country", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $code as xs:string) as item()*", "description" : " Retrieve the regions and number of opens tracked for a certain country. Email address are not returned.\n", "summary" : "

Retrieve the regions and number of opens tracked for a certain country.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" }, { "name" : "code", "type" : "xs:string", "occurrence" : null, "description" : "
An ISO3166 2 digit country code
" } ], "returns" : { "type" : "item()*", "description" : "Regions an array of regions within the provided country where opens occurred." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "campaign-geo-opens", "qname" : "mailchimp:campaign-geo-opens", "signature" : "($apikey as xs:string, $cid as xs:string) as item()*", "description" : " Convenience function for campaign-geo-opens#3.\n", "summary" : "

Convenience function for campaign-geo-opens#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" } ], "returns" : { "type" : "item()*", "description" : "Countries an array of countries where opens occurred" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-geo-opens", "qname" : "mailchimp:campaign-geo-opens", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*", "description" : " Retrieve the countries and number of opens tracked for each. Email address are not returned.\n", "summary" : "

Retrieve the countries and number of opens tracked for each.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" } ], "returns" : { "type" : "item()*", "description" : "Countries an array of countries where opens occurred" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "campaign-hard-bounces", "qname" : "mailchimp:campaign-hard-bounces", "signature" : "($apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Convenience function for campaign-hard-bounces#5.\n", "summary" : "

Convenience function for campaign-hard-bounces#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000
" } ], "returns" : { "type" : "item()*", "description" : "array a total of all hard bounced emails and the specific emails for this page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "campaign-hard-bounces", "qname" : "mailchimp:campaign-hard-bounces", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " DEPRECATED Get all email addresses with Hard Bounces for a given campaign the email address that bounced.\n", "summary" : "

DEPRECATED Get all email addresses with Hard Bounces for a given campaign the email address that bounced.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000
" } ], "returns" : { "type" : "item()*", "description" : "array a total of all hard bounced emails and the specific emails for this page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "campaign-members", "qname" : "mailchimp:campaign-members", "signature" : "($apikey as xs:string, $cid as xs:string, $status as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Convenience function for campaign-members#6.\n", "summary" : "

Convenience function for campaign-members#6 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull members for (can be gathered using campaigns())
" }, { "name" : "status", "type" : "xs:string", "occurrence" : null, "description" : "
optional the status to pull - one of 'sent', 'hard' (bounce), or 'soft' (bounce). By default, all records are returned
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000
" } ], "returns" : { "type" : "item()*", "description" : "A total of all matching emails and the specific emails for this page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "campaign-members", "qname" : "mailchimp:campaign-members", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $status as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Get all email addresses the campaign was successfully sent to (ie, no bounces).\n", "summary" : "

Get all email addresses the campaign was successfully sent to (ie, no bounces).

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull members for (can be gathered using campaigns())
" }, { "name" : "status", "type" : "xs:string", "occurrence" : null, "description" : "
optional the status to pull - one of 'sent', 'hard' (bounce), or 'soft' (bounce). By default, all records are returned
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000
" } ], "returns" : { "type" : "item()*", "description" : "A total of all matching emails and the specific emails for this page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "campaign-not-opened-AIM", "qname" : "mailchimp:campaign-not-opened-AIM", "signature" : "($apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Convenience function for campaign-not-opened-AIM#5.\n", "summary" : "

Convenience function for campaign-not-opened-AIM#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to get no opens for (can be gathered using campaigns())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000
" } ], "returns" : { "type" : "item()*", "description" : "Array containing the total records matched and the specific records for this page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "campaign-not-opened-AIM", "qname" : "mailchimp:campaign-not-opened-AIM", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Retrieve the list of email addresses that did not open a given campaign string email Email address that opened the campaign.\n", "summary" : "

Retrieve the list of email addresses that did not open a given campaign string email Email address that opened the campaign.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to get no opens for (can be gathered using campaigns())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000
" } ], "returns" : { "type" : "item()*", "description" : "array array containing the total records matched and the specific records for this page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "campaign-opened-AIM", "qname" : "mailchimp:campaign-opened-AIM", "signature" : "($apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Convenience function for campaign-openedAIM#5.\n", "summary" : "

Convenience function for campaign-openedAIM#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to get opens for (can be gathered using campaigns())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000
" } ], "returns" : { "type" : "item()*", "description" : "Array containing the total records matched and the specific records for this page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "campaign-opened-AIM", "qname" : "mailchimp:campaign-opened-AIM", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Retrieve the list of email addresses that opened a given campaign with how many times they opened.\n", "summary" : "

Retrieve the list of email addresses that opened a given campaign with how many times they opened.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to get opens for (can be gathered using campaigns())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000
" } ], "returns" : { "type" : "item()*", "description" : "Array containing the total records matched and the specific records for this page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "campaign-pause", "qname" : "mailchimp:campaign-pause", "signature" : "($apikey as xs:string, $cid as xs:string) as item()*", "description" : " Convenience function for campaign-pause#3.\n", "summary" : "

Convenience function for campaign-pause#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the campaign to pause
" } ], "returns" : { "type" : "item()*", "description" : "True on success" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-pause", "qname" : "mailchimp:campaign-pause", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*", "description" : " Pause an AutoResponder or RSS campaign from sending.\n", "summary" : "

Pause an AutoResponder or RSS campaign from sending.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the campaign to pause
" } ], "returns" : { "type" : "item()*", "description" : "True on success" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "campaign-replicate", "qname" : "mailchimp:campaign-replicate", "signature" : "($apikey as xs:string, $cid as xs:string) as item()*", "description" : " Convenience function for campaign-replicate#3.\n", "summary" : "

Convenience function for campaign-replicate#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the Campaign Id to replicate
" } ], "returns" : { "type" : "item()*", "description" : "The id of the replicated Campaign created, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-replicate", "qname" : "mailchimp:campaign-replicate", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*", "description" : " Replicate a campaign.\n", "summary" : "

Replicate a campaign.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the Campaign Id to replicate
" } ], "returns" : { "type" : "item()*", "description" : "The id of the replicated Campaign created, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "campaign-resume", "qname" : "mailchimp:campaign-resume", "signature" : "($apikey as xs:string, $cid as xs:string) as item()*", "description" : " Convenience function for campaign-resume#3.\n", "summary" : "

Convenience function for campaign-resume#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the campaign to pause
" } ], "returns" : { "type" : "item()*", "description" : "True on success" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-resume", "qname" : "mailchimp:campaign-resume", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*", "description" : " Resume sending an AutoResponder or RSS campaign.\n", "summary" : "

Resume sending an AutoResponder or RSS campaign.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the campaign to pause
" } ], "returns" : { "type" : "item()*", "description" : "True on success" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "campaign-schedule", "qname" : "mailchimp:campaign-schedule", "signature" : "($apikey as xs:string, $cid as xs:string, $schedule_time as xs:string, $schedule_time_b as xs:string) as item()*", "description" : " Convenience function for campaign-schedule#5.\n", "summary" : "

Convenience function for campaign-schedule#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the campaign to schedule
" }, { "name" : "schedule_time", "type" : "xs:string", "occurrence" : null, "description" : "
the time to schedule the campaign. For A/B Split \"schedule\" campaigns, the time for Group A - in YYYY-MM-DD HH:II:SS format in GMT
" }, { "name" : "schedule_time_b", "type" : "xs:string", "occurrence" : null, "description" : "
optional -the time to schedule Group B of an A/B Split \"schedule\" campaign - in YYYY-MM-DD HH:II:SS format in GMT
" } ], "returns" : { "type" : "item()*", "description" : "boolean True on success" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "campaign-schedule", "qname" : "mailchimp:campaign-schedule", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $schedule_time as xs:string, $schedule_time_b as xs:string) as item()*", "description" : " Schedule a campaign to be sent in the future.\n", "summary" : "

Schedule a campaign to be sent in the future.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the campaign to schedule
" }, { "name" : "schedule_time", "type" : "xs:string", "occurrence" : null, "description" : "
the time to schedule the campaign. For A/B Split \"schedule\" campaigns, the time for Group A - in YYYY-MM-DD HH:II:SS format in GMT
" }, { "name" : "schedule_time_b", "type" : "xs:string", "occurrence" : null, "description" : "
optional -the time to schedule Group B of an A/B Split \"schedule\" campaign - in YYYY-MM-DD HH:II:SS format in GMT
" } ], "returns" : { "type" : "item()*", "description" : "boolean True on success" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-segment-test", "qname" : "mailchimp:campaign-segment-test", "signature" : "($apikey as xs:string, $list_id as xs:string, $options as element(array)) as item()*", "description" : " Convenience function for campaign-segment-test#4.\n", "summary" : "

Convenience function for campaign-segment-test#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "list_id", "type" : "xs:string", "occurrence" : null, "description" : "
the list to test segmentation on - get lists using lists()
" }, { "name" : "options", "type" : "element(array)", "occurrence" : null, "description" : "
with 2 keys. See Mailchimp API documentation for more information about the parameter structure.
" } ], "returns" : { "type" : "item()*", "description" : "The total number of subscribers matching your segmentation options" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "campaign-segment-test", "qname" : "mailchimp:campaign-segment-test", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $list_id as xs:string, $options as element(array)) as item()*", "description" : " Allows one to test their segmentation rules before creating a campaign using them.\n", "summary" : "

Allows one to test their segmentation rules before creating a campaign using them.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "list_id", "type" : "xs:string", "occurrence" : null, "description" : "
the list to test segmentation on - get lists using lists()
" }, { "name" : "options", "type" : "element(array)", "occurrence" : null, "description" : "
with 2 keys. See Mailchimp API documentation for more information about the parameter structure.
" } ], "returns" : { "type" : "item()*", "description" : "The total number of subscribers matching your segmentation options" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "campaign-send-now", "qname" : "mailchimp:campaign-send-now", "signature" : "($apikey as xs:string, $cid as xs:string) as item()*", "description" : " Convenience function for campaign-send-now#3.\n", "summary" : "

Convenience function for campaign-send-now#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the campaign to send
" } ], "returns" : { "type" : "item()*", "description" : "True on success" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-send-now", "qname" : "mailchimp:campaign-send-now", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*", "description" : " Send a given campaign immediately. For RSS campaigns, this will \"start\" them.\n", "summary" : "

Send a given campaign immediately.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the campaign to send
" } ], "returns" : { "type" : "item()*", "description" : "True on success" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "campaign-send-test", "qname" : "mailchimp:campaign-send-test", "signature" : "($apikey as xs:string, $cid as xs:string, $test_emails as element(array), $send_type as xs:string) as item()*", "description" : " Convenience function for campaign-send-test#5.\n", "summary" : "

Convenience function for campaign-send-test#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the campaign to test
" }, { "name" : "test_emails", "type" : "element(array)", "occurrence" : null, "description" : "
an array of email address to receive the test message
" }, { "name" : "send_type", "type" : "xs:string", "occurrence" : null, "description" : "
optional by default (null) both formats are sent - \"html\" or \"text\" send just that format
" } ], "returns" : { "type" : "item()*", "description" : "True on success" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "campaign-send-test", "qname" : "mailchimp:campaign-send-test", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $test_emails as element(array), $send_type as xs:string) as item()*", "description" : " Send a test of this campaign to the provided email address.\n", "summary" : "

Send a test of this campaign to the provided email address.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the campaign to test
" }, { "name" : "test_emails", "type" : "element(array)", "occurrence" : null, "description" : "
an array of email address to receive the test message
" }, { "name" : "send_type", "type" : "xs:string", "occurrence" : null, "description" : "
optional by default (null) both formats are sent - \"html\" or \"text\" send just that format
" } ], "returns" : { "type" : "item()*", "description" : "True on success" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-share-report", "qname" : "mailchimp:campaign-share-report", "signature" : "($apikey as xs:string, $cid as xs:string, $opts as element(array)) as item()*", "description" : " Convenience function for campaign-share-report#4.\n", "summary" : "

Convenience function for campaign-share-report#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to share a report for (can be gathered using campaigns())
" }, { "name" : "opts", "type" : "element(array)", "occurrence" : null, "description" : "
s optional various parameters which can be used to configure the shared report
" } ], "returns" : { "type" : "item()*", "description" : "Struct containing details for the shared report" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "campaign-share-report", "qname" : "mailchimp:campaign-share-report", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $opts as element(array)) as item()*", "description" : " Get the URL to a customized VIP Report for the specified campaign and optionally send an email to someone with links to it. Note subsequent calls will overwrite anything already set for the same campign (eg, the password).\n", "summary" : "

Get the URL to a customized VIP Report for the specified campaign and optionally send an email to someone with links to it.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to share a report for (can be gathered using campaigns())
" }, { "name" : "opts", "type" : "element(array)", "occurrence" : null, "description" : "
s optional various parameters which can be used to configure the shared report
" } ], "returns" : { "type" : "item()*", "description" : "Struct containing details for the shared report" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "campaign-soft-bounces", "qname" : "mailchimp:campaign-soft-bounces", "signature" : "($apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Convenience function for campaign-soft-bounces#5.\n", "summary" : "

Convenience function for campaign-soft-bounces#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000
" } ], "returns" : { "type" : "item()*", "description" : "A total of all soft bounced emails and the specific emails for this page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "campaign-soft-bounces", "qname" : "mailchimp:campaign-soft-bounces", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " DEPRECATED Get all email addresses with Soft Bounces for a given campaign the email address that bounced.\n", "summary" : "

DEPRECATED Get all email addresses with Soft Bounces for a given campaign the email address that bounced.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000
" } ], "returns" : { "type" : "item()*", "description" : "A total of all soft bounced emails and the specific emails for this page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "campaign-stats", "qname" : "mailchimp:campaign-stats", "signature" : "($apikey as xs:string, $cid as xs:string) as item()*", "description" : " Convenience function for campaign-stats#3.\n", "summary" : "

Convenience function for campaign-stats#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull stats for (can be gathered using campaigns())
" } ], "returns" : { "type" : "item()*", "description" : "array struct of the statistics for this campaign" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-stats", "qname" : "mailchimp:campaign-stats", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*", "description" : " Given a list and a campaign, get all the relevant campaign statistics (opens, bounces, clicks, etc.)\n", "summary" : "

Given a list and a campaign, get all the relevant campaign statistics (opens, bounces, clicks, etc.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull stats for (can be gathered using campaigns())
" } ], "returns" : { "type" : "item()*", "description" : "array struct of the statistics for this campaign" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "campaign-template-content", "qname" : "mailchimp:campaign-template-content", "signature" : "($apikey as xs:string, $cid as xs:string) as item()*", "description" : " Convenience function for campaign-template-content#3.\n", "summary" : "

Convenience function for campaign-template-content#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to get content for (can be gathered using campaigns())
" } ], "returns" : { "type" : "item()*", "description" : "Array containing all content section for the campaign -" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-template-content", "qname" : "mailchimp:campaign-template-content", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*", "description" : " Get the HTML template content sections for a campaign. Note that this will return very jagged, non-standard results based on the template a campaign is using. You only want to use this if you want to allow editing template sections in your applicaton.\n", "summary" : "

Get the HTML template content sections for a campaign.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to get content for (can be gathered using campaigns())
" } ], "returns" : { "type" : "item()*", "description" : "Array containing all content section for the campaign -" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "campaign-unschedule", "qname" : "mailchimp:campaign-unschedule", "signature" : "($apikey as xs:string, $cid as xs:string) as item()*", "description" : " Convenience function for campaign-unschedule#3.\n", "summary" : "

Convenience function for campaign-unschedule#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the campaign to unschedule
" } ], "returns" : { "type" : "item()*", "description" : "True on success" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaign-unschedule", "qname" : "mailchimp:campaign-unschedule", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*", "description" : " Unschedule a campaign that is scheduled to be sent in the future.\n", "summary" : "

Unschedule a campaign that is scheduled to be sent in the future.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the campaign to unschedule
" } ], "returns" : { "type" : "item()*", "description" : "True on success" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "campaign-unsubscribes", "qname" : "mailchimp:campaign-unsubscribes", "signature" : "($apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Convenience function for campaign-unsubscribes#5.\n", "summary" : "

Convenience function for campaign-unsubscribes#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000
" } ], "returns" : { "type" : "item()*", "description" : "array email addresses that unsubscribed from this campaign along with reasons, if given array a total of all unsubscribed emails and the specific emails for this page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "campaign-unsubscribes", "qname" : "mailchimp:campaign-unsubscribes", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Get all unsubscribed email addresses for a given campaign.\n", "summary" : "

Get all unsubscribed email addresses for a given campaign.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the campaign id to pull bounces for (can be gathered using campaigns())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000
" } ], "returns" : { "type" : "item()*", "description" : "array email addresses that unsubscribed from this campaign along with reasons, if given array a total of all unsubscribed emails and the specific emails for this page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "campaign-update", "qname" : "mailchimp:campaign-update", "signature" : "($apikey as xs:string, $cid as xs:string, $name as xs:string, $value as item()) as item()*", "description" : " Convenience function for campaign-update#5.\n", "summary" : "

Convenience function for campaign-update#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the Campaign Id to update
" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the parameter name (see campaigncreate()). For items in the options array, this will be that parameter's name (subject, from_email, etc.). Additional parameters will be that option name (content, segment_opts). \"type_opts\" will be the name of the type - rss, auto, trans, etc.
" }, { "name" : "value", "type" : "item()", "occurrence" : null, "description" : "
e an appropriate value for the parameter ( see campaigncreate()). For items in the options array, this will be that parameter's value. For additional parameters, this is the same value passed to them.
" } ], "returns" : { "type" : "item()*", "description" : "boolean true if the update succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "campaign-update", "qname" : "mailchimp:campaign-update", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $name as xs:string, $value as item()) as item()*", "description" : " Update just about any setting for a campaign that has not been sent. See campaigncreate() for details.\n Caveats:
\n .\n", "summary" : "

Update just about any setting for a campaign that has not been sent.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "cid", "type" : "xs:string", "occurrence" : null, "description" : "
the Campaign Id to update
" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the parameter name ( see campaigncreate()). For items in the options array, this will be that parameter's name (subject, from_email, etc.). Additional parameters will be that option name (content, segment_opts). \"type_opts\" will be the name of the type - rss, auto, trans, etc.
" }, { "name" : "value", "type" : "item()", "occurrence" : null, "description" : "
An appropriate value for the parameter ( see campaigncreate()). For items in the options array, this will be that parameter's value. For additional parameters, this is the same value passed to them.
" } ], "returns" : { "type" : "item()*", "description" : "True if the update succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "campaigns-for-email", "qname" : "mailchimp:campaigns-for-email", "signature" : "($apikey as xs:string, $email_address as xs:string) as item()*", "description" : " Convenience function for campaigns-for-email#3.\n", "summary" : "

Convenience function for campaigns-for-email#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "email_address", "type" : "xs:string", "occurrence" : null, "description" : "
the email address to unsubscribe OR the email \"id\" returned from listMemberInfo, Webhooks, and Campaigns
" } ], "returns" : { "type" : "item()*", "description" : "An array of campaign_ids the member received" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "campaigns-for-email", "qname" : "mailchimp:campaigns-for-email", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $email_address as xs:string) as item()*", "description" : " Retrieve all Campaigns Ids a member was sent.\n", "summary" : "

Retrieve all Campaigns Ids a member was sent.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "email_address", "type" : "xs:string", "occurrence" : null, "description" : "
the email address to unsubscribe OR the email \"id\" returned from listMemberInfo, Webhooks, and Campaigns
" } ], "returns" : { "type" : "item()*", "description" : "An array of campaign_ids the member received" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "campaigns", "qname" : "mailchimp:campaigns", "signature" : "($apikey as xs:string, $filters as element(array), $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Convenience function for campaigns#5.\n", "summary" : "

Convenience function for campaigns#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "filters", "type" : "element(array)", "occurrence" : null, "description" : "
a hash of filters to apply to this query - all are optional. See Mailchimp API documentation for more information about the parameter structure.
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional - control paging of campaigns, start results at this campaign #, defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
optional - control paging of campaigns, number of campaigns to return with each call, defaults to 25 (max=1000)
" } ], "returns" : { "type" : "item()*", "description" : "An array containing a count of all matching campaigns and the specific ones for the current page (see Mailchimp API documentation for more information about the return type)" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "campaigns", "qname" : "mailchimp:campaigns", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $filters as element(array), $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Get the list of campaigns and their details matching the specified filters.\n", "summary" : "

Get the list of campaigns and their details matching the specified filters.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "filters", "type" : "element(array)", "occurrence" : null, "description" : "
a hash of filters to apply to this query - all are optional. See Mailchimp API documentation for more information about the parameter structure.
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional - control paging of campaigns, start results at this campaign #, defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
optional - control paging of campaigns, number of campaigns to return with each call, defaults to 25 (max=1000)
" } ], "returns" : { "type" : "item()*", "description" : "An array containing a count of all matching campaigns and the specific ones for the current page (see Mailchimp API documentation for more information about the return type)" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "chimp-chatter", "qname" : "mailchimp:chimp-chatter", "signature" : "($apikey as xs:string) as item()*", "description" : " Convenience function for chimp-chatter#2.\n", "summary" : "

Convenience function for chimp-chatter#2 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "An array of chatter messages and properties" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "chimp-chatter", "qname" : "mailchimp:chimp-chatter", "signature" : "($endpoint-url as xs:string, $apikey as xs:string) as item()*", "description" : " Return the current Chimp Chatter messages for an account.\n", "summary" : "

Return the current Chimp Chatter messages for an account.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" } ], "returns" : { "type" : "item()*", "description" : "An array of chatter messages and properties" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "ecomm-order-add", "qname" : "mailchimp:ecomm-order-add", "signature" : "($apikey as xs:string, $order as element(array)) as item()*", "description" : " Convenience function for ecomm-order-add#3.\n", "summary" : "

Convenience function for ecomm-order-add#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "order", "type" : "element(array)", "occurrence" : null, "description" : "
an array of information pertaining to the order that has completed. Use the following keys. See Mailchimp API documentation for more information about the parameter structure.
" } ], "returns" : { "type" : "item()*", "description" : "True if the data is saved, otherwise an error is thrown." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "ecomm-order-add", "qname" : "mailchimp:ecomm-order-add", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $order as element(array)) as item()*", "description" : " Import Ecommerce Order Information to be used for Segmentation.\n", "summary" : "

Import Ecommerce Order Information to be used for Segmentation.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "order", "type" : "element(array)", "occurrence" : null, "description" : "
an array of information pertaining to the order that has completed. Use the following keys. See Mailchimp API documentation for more information about the parameter structure.
" } ], "returns" : { "type" : "item()*", "description" : "True if the data is saved, otherwise an error is thrown." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "ecomm-order-del", "qname" : "mailchimp:ecomm-order-del", "signature" : "($apikey as xs:string, $store_id as xs:string, $order_id as xs:string) as item()*", "description" : " Convenience function for ecomm-order-del#4.\n", "summary" : "

Convenience function for ecomm-order-del#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "store_id", "type" : "xs:string", "occurrence" : null, "description" : "
the store id the order belongs to
" }, { "name" : "order_id", "type" : "xs:string", "occurrence" : null, "description" : "
the order id (generated by the store) to delete
" } ], "returns" : { "type" : "item()*", "description" : "True if an order is deleted, otherwise an error is thrown." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "ecomm-order-del", "qname" : "mailchimp:ecomm-order-del", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $store_id as xs:string, $order_id as xs:string) as item()*", "description" : " Delete Ecommerce Order Information used for segmentation. This will generally be used by ecommerce package plugins that we provide or by 3rd part system developers.\n", "summary" : "

Delete Ecommerce Order Information used for segmentation.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "store_id", "type" : "xs:string", "occurrence" : null, "description" : "
the store id the order belongs to
" }, { "name" : "order_id", "type" : "xs:string", "occurrence" : null, "description" : "
the order id (generated by the store) to delete
" } ], "returns" : { "type" : "item()*", "description" : "True if an order is deleted, otherwise an error is thrown." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "ecomm-orders", "qname" : "mailchimp:ecomm-orders", "signature" : "($apikey as xs:string, $start as xs:integer, $limit as xs:integer, $since as xs:string) as item()*", "description" : " Convenience function for ecomm-orders#5.\n", "summary" : "

Convenience function for ecomm-orders#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the number of results to return - defaults to 100, upper limit set at 500
" }, { "name" : "since", "type" : "xs:string", "occurrence" : null, "description" : "
optional pull only messages since this time - use YYYY-MM-DD HH:II:SS format in GMT
" } ], "returns" : { "type" : "item()*", "description" : "Array the total matching orders and the specific orders for the requested page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "ecomm-orders", "qname" : "mailchimp:ecomm-orders", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $start as xs:integer, $limit as xs:integer, $since as xs:string) as item()*", "description" : " Retrieve the Ecommerce Orders for an account.\n", "summary" : "

Retrieve the Ecommerce Orders for an account.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the number of results to return - defaults to 100, upper limit set at 500
" }, { "name" : "since", "type" : "xs:string", "occurrence" : null, "description" : "
optional pull only messages since this time - use YYYY-MM-DD HH:II:SS format in GMT
" } ], "returns" : { "type" : "item()*", "description" : "Array the total matching orders and the specific orders for the requested page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "folder-add", "qname" : "mailchimp:folder-add", "signature" : "($apikey as xs:string, $name as xs:string, $type as xs:string) as item()*", "description" : " Convenience function for folder-add#4.\n", "summary" : "

Convenience function for folder-add#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
a unique name for a folder (max 100 bytes)
" }, { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
optional the type of folder to create - either \"campaign\" or \"autoresponder\". Defaults to \"campaign\"
" } ], "returns" : { "type" : "item()*", "description" : "The folder_id of the newly created folder." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "folder-add", "qname" : "mailchimp:folder-add", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $name as xs:string, $type as xs:string) as item()*", "description" : " Add a new folder to file campaigns or autoresponders in.\n", "summary" : "

Add a new folder to file campaigns or autoresponders in.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
a unique name for a folder (max 100 bytes)
" }, { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
optional the type of folder to create - either \"campaign\" or \"autoresponder\". Defaults to \"campaign\"
" } ], "returns" : { "type" : "item()*", "description" : "The folder_id of the newly created folder." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "folder-del", "qname" : "mailchimp:folder-del", "signature" : "($apikey as xs:string, $fid as xs:integer, $type as xs:string) as item()*", "description" : " Convenience function for folder-del#4.\n", "summary" : "

Convenience function for folder-del#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "fid", "type" : "xs:integer", "occurrence" : null, "description" : "
the folder id to update - retrieve from folders()
" }, { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
optional the type of folder to create - either \"campaign\" or \"autoresponder\". Defaults to \"campaign\"
" } ], "returns" : { "type" : "item()*", "description" : "True if the delete worked, otherwise an exception is thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "folder-del", "qname" : "mailchimp:folder-del", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $fid as xs:integer, $type as xs:string) as item()*", "description" : " Delete a campaign or autoresponder folder. Note that this will simply make campaigns in the folder appear unfiled, they are not removed.\n", "summary" : "

Delete a campaign or autoresponder folder.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "fid", "type" : "xs:integer", "occurrence" : null, "description" : "
the folder id to update - retrieve from folders()
" }, { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
optional the type of folder to create - either \"campaign\" or \"autoresponder\". Defaults to \"campaign\"
" } ], "returns" : { "type" : "item()*", "description" : "True if the delete worked, otherwise an exception is thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "folder-update", "qname" : "mailchimp:folder-update", "signature" : "($apikey as xs:string, $fid as xs:integer, $name as xs:string, $type as xs:string) as item()*", "description" : " Convenience function for folder-update#5.\n", "summary" : "

Convenience function for folder-update#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "fid", "type" : "xs:integer", "occurrence" : null, "description" : "
the folder id to update - retrieve from folders()
" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
a new, unique name for the folder (max 100 bytes)
" }, { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
optional the type of folder to create - either \"campaign\" or \"autoresponder\". Defaults to \"campaign\"
" } ], "returns" : { "type" : "item()*", "description" : "True if the update worked, otherwise an exception is thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "folder-update", "qname" : "mailchimp:folder-update", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $fid as xs:integer, $name as xs:string, $type as xs:string) as item()*", "description" : " Update the name of a folder for campaigns or autoresponders.\n", "summary" : "

Update the name of a folder for campaigns or autoresponders.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "fid", "type" : "xs:integer", "occurrence" : null, "description" : "
the folder id to update - retrieve from folders()
" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
a new, unique name for the folder (max 100 bytes)
" }, { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
optional the type of folder to create - either \"campaign\" or \"autoresponder\". Defaults to \"campaign\"
" } ], "returns" : { "type" : "item()*", "description" : "True if the update worked, otherwise an exception is thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "folders", "qname" : "mailchimp:folders", "signature" : "($apikey as xs:string, $type as xs:string) as item()*", "description" : " Convenience function for folders#3.\n", "summary" : "

Convenience function for folders#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
optional the type of folders to return - either \"campaign\" or \"autoresponder\". Defaults to \"campaign\"
" } ], "returns" : { "type" : "item()*", "description" : "Array of folder structs (see Returned Fields for details)" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "folders", "qname" : "mailchimp:folders", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $type as xs:string) as item()*", "description" : " List all the folders for a user account.\n", "summary" : "

List all the folders for a user account.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
optional the type of folders to return - either \"campaign\" or \"autoresponder\". Defaults to \"campaign\"
" } ], "returns" : { "type" : "item()*", "description" : "Array of folder structs (see Returned Fields for details)" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "generate-text", "qname" : "mailchimp:generate-text", "signature" : "($apikey as xs:string, $type as xs:string, $content as item()) as item()*", "description" : " Convenience function for generate-text#4.\n", "summary" : "

Convenience function for generate-text#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
The type of content to parse. Must be one of: \"html\", \"template\", \"url\", \"cid\" (Campaign Id), or \"tid\" (Template Id)
" }, { "name" : "content", "type" : "item()", "occurrence" : null, "description" : "
The content to use. For \"html\" expects a single string value, \"template\" expects an array like you send to campaignCreate, \"url\" expects a valid & public URL to pull from, \"cid\" expects a valid Campaign Id, and \"tid\" expects a valid Template Id on your account.
" } ], "returns" : { "type" : "item()*", "description" : "The content pass in converted to text." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "generate-text", "qname" : "mailchimp:generate-text", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $type as xs:string, $content as item()) as item()*", "description" : " Have HTML content auto-converted to a text-only format. You can send: plain HTML, an array of Template content, an existing Campaign Id, or an existing Template Id. Note that this will not save anything to or update any of your lists, campaigns, or templates.\n", "summary" : "

Have HTML content auto-converted to a text-only format.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
The type of content to parse. Must be one of: \"html\", \"template\", \"url\", \"cid\" (Campaign Id), or \"tid\" (Template Id)
" }, { "name" : "content", "type" : "item()", "occurrence" : null, "description" : "
The content to use. For \"html\" expects a single string value, \"template\" expects an array like you send to campaignCreate, \"url\" expects a valid & public URL to pull from, \"cid\" expects a valid Campaign Id, and \"tid\" expects a valid Template Id on your account.
" } ], "returns" : { "type" : "item()*", "description" : "The content pass in converted to text." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "get-account-details", "qname" : "mailchimp:get-account-details", "signature" : "($apikey as xs:string) as item()*", "description" : " Convenience function for get-account-details#2.\n", "summary" : "

Convenience function for get-account-details#2 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "array containing the details for the account tied to this API Key" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "get-account-details", "qname" : "mailchimp:get-account-details", "signature" : "($endpoint-url as xs:string, $apikey as xs:string) as item()*", "description" : " Retrieve lots of account information including payments made, plan info, some account stats, installed modules, contact info, and more.\n", "summary" : "

Retrieve lots of account information including payments made, plan info, some account stats, installed modules, contact info, and more.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" } ], "returns" : { "type" : "item()*", "description" : "Array containing the details for the account tied to this API Key" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "inline-css", "qname" : "mailchimp:inline-css", "signature" : "($apikey as xs:string, $html as xs:string, $strip_css as xs:boolean) as item()*", "description" : " Convenience function for inline-css#4.\n", "summary" : "

Convenience function for inline-css#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "html", "type" : "xs:string", "occurrence" : null, "description" : "
Your HTML content
" }, { "name" : "strip_css", "type" : "xs:boolean", "occurrence" : null, "description" : "
optional Whether you want the CSS &lt;style&gt; tags stripped from the returned document. Defaults to false.
" } ], "returns" : { "type" : "item()*", "description" : "Your HTML content with all CSS inlined, just like if we sent it." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "inline-css", "qname" : "mailchimp:inline-css", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $html as xs:string, $strip_css as xs:boolean) as item()*", "description" : " Send your HTML content to have the CSS inlined and optionally remove the original styles.\n", "summary" : "

Send your HTML content to have the CSS inlined and optionally remove the original styles.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "html", "type" : "xs:string", "occurrence" : null, "description" : "
Your HTML content
" }, { "name" : "strip_css", "type" : "xs:boolean", "occurrence" : null, "description" : "
optional Whether you want the CSS &lt;style&gt; tags stripped from the returned document. Defaults to false.
" } ], "returns" : { "type" : "item()*", "description" : "Your HTML content with all CSS inlined, just like if we sent it." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "list-abuse-reports", "qname" : "mailchimp:list-abuse-reports", "signature" : "($apikey as xs:string, $id as xs:string, $start as xs:integer, $limit as xs:integer, $since as xs:string) as item()*", "description" : " Convenience function for list-abuse-reports#6.\n", "summary" : "

Convenience function for list-abuse-reports#6 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to pull abuse reports for (can be gathered using lists())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the number of results to return - defaults to 500, upper limit set at 1000
" }, { "name" : "since", "type" : "xs:string", "occurrence" : null, "description" : "
optional pull only messages since this time - use YYYY-MM-DD HH:II:SS format in GMT
" } ], "returns" : { "type" : "item()*", "description" : "The total of all reports and the specific reports reports this page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "list-abuse-reports", "qname" : "mailchimp:list-abuse-reports", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $start as xs:integer, $limit as xs:integer, $since as xs:string) as item()*", "description" : " Get all email addresses that complained about a given campaign.\n", "summary" : "

Get all email addresses that complained about a given campaign.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to pull abuse reports for (can be gathered using lists())
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the number of results to return - defaults to 500, upper limit set at 1000
" }, { "name" : "since", "type" : "xs:string", "occurrence" : null, "description" : "
optional pull only messages since this time - use YYYY-MM-DD HH:II:SS format in GMT
" } ], "returns" : { "type" : "item()*", "description" : "The total of all reports and the specific reports reports this page" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "list-activity", "qname" : "mailchimp:list-activity", "signature" : "($apikey as xs:string, $id as xs:string) as item()*", "description" : " Convenience function for list-activity#3.\n", "summary" : "

Convenience function for list-activity#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" } ], "returns" : { "type" : "item()*", "description" : "Array of array of daily values." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "list-activity", "qname" : "mailchimp:list-activity", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string) as item()*", "description" : " Access up to the previous 180 days of daily detailed aggregated activity stats for a given list.\n", "summary" : "

Access up to the previous 180 days of daily detailed aggregated activity stats for a given list.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" } ], "returns" : { "type" : "item()*", "description" : "array array of array of daily values." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "list-batch-subscribe", "qname" : "mailchimp:list-batch-subscribe", "signature" : "($apikey as xs:string, $id as xs:string, $batch as element(array), $double_optin as xs:boolean, $update_existing as xs:boolean, $replace_interests as xs:boolean) as item()*", "description" : " Convenience function for list-batch-subscribe#7.\n", "summary" : "

Convenience function for list-batch-subscribe#7 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "batch", "type" : "element(array)", "occurrence" : null, "description" : "
an array of structs for each address to import with two special keys: \"EMAIL\" for the email address, and \"EMAIL_TYPE\" for the email type option (html, text, or mobile)
" }, { "name" : "double_optin", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to control whether to send an opt-in confirmation email - defaults to true
" }, { "name" : "update_existing", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to control whether to update members that are already subscribed to the list or to return an error, defaults to false (return error)
" }, { "name" : "replace_interests", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to determine whether we replace the interest groups with the updated groups provided, or we add the provided groups to the member's interest groups (optional, defaults to true)
" } ], "returns" : { "type" : "item()*", "description" : "Array of result counts and any errors that occurred" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 7, "name" : "list-batch-subscribe", "qname" : "mailchimp:list-batch-subscribe", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $batch as element(array), $double_optin as xs:boolean, $update_existing as xs:boolean, $replace_interests as xs:boolean) as item()*", "description" : " Subscribe a batch of email addresses to a list at once. If you are using a serialized version of the API, we strongly suggest that you only run this method as a POST request, and not a GET request. Maximum batch sizes vary based on the amount of data in each record, though you should cap them at 5k - 10k records, depending on your experience. These calls are also long, so be sure you increase your timeout values.\n", "summary" : "

Subscribe a batch of email addresses to a list at once.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "batch", "type" : "element(array)", "occurrence" : null, "description" : "
an array of structs for each address to import with two special keys: \"EMAIL\" for the email address, and \"EMAIL_TYPE\" for the email type option (html, text, or mobile)
" }, { "name" : "double_optin", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to control whether to send an opt-in confirmation email - defaults to true
" }, { "name" : "update_existing", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to control whether to update members that are already subscribed to the list or to return an error, defaults to false (return error)
" }, { "name" : "replace_interests", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to determine whether we replace the interest groups with the updated groups provided, or we add the provided groups to the member's interest groups (optional, defaults to true)
" } ], "returns" : { "type" : "item()*", "description" : "Array of result counts and any errors that occurred" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "list-batch-unsubscribe", "qname" : "mailchimp:list-batch-unsubscribe", "signature" : "($apikey as xs:string, $id as xs:string, $emails as element(array), $delete_member as xs:boolean, $send_goodbye as xs:boolean, $send_notify as xs:boolean) as item()*", "description" : " Convenience function for list-batch-unsubscribe#7.\n", "summary" : "

Convenience function for list-batch-unsubscribe#7 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "emails", "type" : "element(array)", "occurrence" : null, "description" : "
array of email addresses to unsubscribe
" }, { "name" : "delete_member", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to completely delete the member from your list instead of just unsubscribing, default to false
" }, { "name" : "send_goodbye", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to send the goodbye email to the email addresses, defaults to true
" }, { "name" : "send_notify", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to send the unsubscribe notification email to the address defined in the list email notification settings, defaults to false
" } ], "returns" : { "type" : "item()*", "description" : "Array of result counts and any errors that occurred" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 7, "name" : "list-batch-unsubscribe", "qname" : "mailchimp:list-batch-unsubscribe", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $emails as element(array), $delete_member as xs:boolean, $send_goodbye as xs:boolean, $send_notify as xs:boolean) as item()*", "description" : " Unsubscribe a batch of email addresses to a list.\n", "summary" : "

Unsubscribe a batch of email addresses to a list.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "emails", "type" : "element(array)", "occurrence" : null, "description" : "
array of email addresses to unsubscribe
" }, { "name" : "delete_member", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to completely delete the member from your list instead of just unsubscribing, default to false
" }, { "name" : "send_goodbye", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to send the goodbye email to the email addresses, defaults to true
" }, { "name" : "send_notify", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to send the unsubscribe notification email to the address defined in the list email notification settings, defaults to false
" } ], "returns" : { "type" : "item()*", "description" : "Array of result counts and any errors that occurred" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "list-clients", "qname" : "mailchimp:list-clients", "signature" : "($apikey as xs:string, $id as xs:string) as item()*", "description" : " Convenience function for list-clients#3.\n", "summary" : "

Convenience function for list-clients#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" } ], "returns" : { "type" : "item()*", "description" : "array the desktop and mobile user agents in use on the list" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "list-clients", "qname" : "mailchimp:list-clients", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string) as item()*", "description" : " Retrieve the clients that the list's subscribers have been tagged as being used based on user agents seen. Made possible by user-agent-string.info double penetration the percent of desktop clients in use array clients a record containing the 'client', an 'icon' image url, the 'percent' using the client, and the total 'members' represented double penetration the percent of mobile clients in use array clients a record containing the 'client', an 'icon' image url, the 'percent' using the client, and the total 'members' represented.\n", "summary" : "

Retrieve the clients that the list's subscribers have been tagged as being used based on user agents seen.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" } ], "returns" : { "type" : "item()*", "description" : "Array the desktop and mobile user agents in use on the list" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "list-growth-history", "qname" : "mailchimp:list-growth-history", "signature" : "($apikey as xs:string, $id as xs:string) as item()*", "description" : " Convenience function for list-growth-history#3.\n", "summary" : "

Convenience function for list-growth-history#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" } ], "returns" : { "type" : "item()*", "description" : "Array of months and growth" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "list-growth-history", "qname" : "mailchimp:list-growth-history", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string) as item()*", "description" : " Access the Growth History by Month for a given list.\n", "summary" : "

Access the Growth History by Month for a given list.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" } ], "returns" : { "type" : "item()*", "description" : "Array of months and growth" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "list-interest-group-add", "qname" : "mailchimp:list-interest-group-add", "signature" : "($apikey as xs:string, $id as xs:string, $group_name as xs:string, $grouping_id as xs:integer) as item()*", "description" : " Convenience function for list-interest-group-add#5.\n", "summary" : "

Convenience function for list-interest-group-add#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "group_name", "type" : "xs:string", "occurrence" : null, "description" : "
the interest group to add - group names must be unique within a grouping
" }, { "name" : "grouping_id", "type" : "xs:integer", "occurrence" : null, "description" : "
ouping_id The grouping to add the new group to - get using list-interest-groupings(). If not supplied, the first grouping on the list is used.
" } ], "returns" : { "type" : "item()*", "description" : "True if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "list-interest-group-add", "qname" : "mailchimp:list-interest-group-add", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $group_name as xs:string, $grouping_id as xs:integer) as item()*", "description" : " Add a single Interest Group - if interest groups for the List are not yet enabled, adding the first group will automatically turn them on.\n", "summary" : "

Add a single Interest Group - if interest groups for the List are not yet enabled, adding the first group will automatically turn them on.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "group_name", "type" : "xs:string", "occurrence" : null, "description" : "
the interest group to add - group names must be unique within a grouping
" }, { "name" : "grouping_id", "type" : "xs:integer", "occurrence" : null, "description" : "
ouping_id The grouping to add the new group to - get using list-interest-groupings() . If not supplied, the first grouping on the list is used.
" } ], "returns" : { "type" : "item()*", "description" : "bool true if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "list-interest-group-del", "qname" : "mailchimp:list-interest-group-del", "signature" : "($apikey as xs:string, $id as xs:string, $group_name as xs:string, $grouping_id as xs:integer) as item()*", "description" : " Convenience function for list-interest-group-del#5.\n", "summary" : "

Convenience function for list-interest-group-del#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "group_name", "type" : "xs:string", "occurrence" : null, "description" : "
the interest group to delete
" }, { "name" : "grouping_id", "type" : "xs:integer", "occurrence" : null, "description" : "
The grouping to delete the group from - get using list-interest-groupings() . If not supplied, the first grouping on the list is used.
" } ], "returns" : { "type" : "item()*", "description" : "True if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "list-interest-group-del", "qname" : "mailchimp:list-interest-group-del", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $group_name as xs:string, $grouping_id as xs:integer) as item()*", "description" : " Delete a single Interest Group - if the last group for a list is deleted, this will also turn groups for the list off.\n", "summary" : "

Delete a single Interest Group - if the last group for a list is deleted, this will also turn groups for the list off.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "group_name", "type" : "xs:string", "occurrence" : null, "description" : "
the interest group to delete
" }, { "name" : "grouping_id", "type" : "xs:integer", "occurrence" : null, "description" : "
The grouping to delete the group from - get using list-interest-groupings() . If not supplied, the first grouping on the list is used.
" } ], "returns" : { "type" : "item()*", "description" : "True if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "list-interest-group-update", "qname" : "mailchimp:list-interest-group-update", "signature" : "($apikey as xs:string, $id as xs:string, $old_name as xs:string, $new_name as xs:string, $grouping_id as xs:integer) as item()*", "description" : " Convenience function for list-interest-group-update#6.\n", "summary" : "

Convenience function for list-interest-group-update#6 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "old_name", "type" : "xs:string", "occurrence" : null, "description" : "
the interest group name to be changed
" }, { "name" : "new_name", "type" : "xs:string", "occurrence" : null, "description" : "
the new interest group name to be set
" }, { "name" : "grouping_id", "type" : "xs:integer", "occurrence" : null, "description" : "
ouping_id The grouping to delete the group from - get using list-interest-groupings() . If not supplied, the first grouping on the list is used.
" } ], "returns" : { "type" : "item()*", "description" : "True if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "list-interest-group-update", "qname" : "mailchimp:list-interest-group-update", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $old_name as xs:string, $new_name as xs:string, $grouping_id as xs:integer) as item()*", "description" : " Change the name of an Interest Group.\n", "summary" : "

Change the name of an Interest Group.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "old_name", "type" : "xs:string", "occurrence" : null, "description" : "
the interest group name to be changed
" }, { "name" : "new_name", "type" : "xs:string", "occurrence" : null, "description" : "
the new interest group name to be set
" }, { "name" : "grouping_id", "type" : "xs:integer", "occurrence" : null, "description" : "
ouping_id The grouping to delete the group from - get using list-interest-groupings() . If not supplied, the first grouping on the list is used.
" } ], "returns" : { "type" : "item()*", "description" : "True if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "list-interest-grouping-add", "qname" : "mailchimp:list-interest-grouping-add", "signature" : "($apikey as xs:string, $id as xs:string, $name as xs:string, $type as xs:string, $groups as element(array)) as item()*", "description" : " Convenience function for list-interest-grouping-add#6.\n", "summary" : "

Convenience function for list-interest-grouping-add#6 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the interest grouping to add - grouping names must be unique
" }, { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
The type of the grouping to add - one of \"checkboxes\", \"hidden\", \"dropdown\", \"radio\"
" }, { "name" : "groups", "type" : "element(array)", "occurrence" : null, "description" : "
The lists of initial group names to be added - at least 1 is required and the names must be unique within a grouping. If the number takes you over the 60 group limit, an error will be thrown.
" } ], "returns" : { "type" : "item()*", "description" : "The new grouping id if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "list-interest-grouping-add", "qname" : "mailchimp:list-interest-grouping-add", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $name as xs:string, $type as xs:string, $groups as element(array)) as item()*", "description" : " Add a new Interest Grouping - if interest groups for the List are not yet enabled, adding the first grouping will automatically turn them on.\n", "summary" : "

Add a new Interest Grouping - if interest groups for the List are not yet enabled, adding the first grouping will automatically turn them on.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the interest grouping to add - grouping names must be unique
" }, { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
The type of the grouping to add - one of \"checkboxes\", \"hidden\", \"dropdown\", \"radio\"
" }, { "name" : "groups", "type" : "element(array)", "occurrence" : null, "description" : "
The lists of initial group names to be added - at least 1 is required and the names must be unique within a grouping. If the number takes you over the 60 group limit, an error will be thrown.
" } ], "returns" : { "type" : "item()*", "description" : "The new grouping id if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "list-interest-grouping-del", "qname" : "mailchimp:list-interest-grouping-del", "signature" : "($apikey as xs:string, $grouping_id as xs:integer) as item()*", "description" : " Convenience function for list-interest-grouping-del#3.\n", "summary" : "

Convenience function for list-interest-grouping-del#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "grouping_id", "type" : "xs:integer", "occurrence" : null, "description" : "
the interest grouping id - get from list-interest-groupings()
" } ], "returns" : { "type" : "item()*", "description" : "True if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "list-interest-grouping-del", "qname" : "mailchimp:list-interest-grouping-del", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $grouping_id as xs:integer) as item()*", "description" : " Delete an existing Interest Grouping - this will permanently delete all contained interest groups and will remove those selections from all list members.\n", "summary" : "

Delete an existing Interest Grouping - this will permanently delete all contained interest groups and will remove those selections from all list members.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "grouping_id", "type" : "xs:integer", "occurrence" : null, "description" : "
the interest grouping id - get from list-interest-groupings()
" } ], "returns" : { "type" : "item()*", "description" : "True if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "list-interest-grouping-update", "qname" : "mailchimp:list-interest-grouping-update", "signature" : "($apikey as xs:string, $grouping_id as xs:integer, $name as xs:string, $value as xs:string) as item()*", "description" : " Convenience function for list-interest-grouping-update#5.\n", "summary" : "

Convenience function for list-interest-grouping-update#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "grouping_id", "type" : "xs:integer", "occurrence" : null, "description" : "
the interest grouping id - get from list-interest-groupings()
" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
The name of the field to update - either \"name\" or \"type\". Groups with in the grouping should be manipulated using the standard listInterestGroup* methods
" }, { "name" : "value", "type" : "xs:string", "occurrence" : null, "description" : "
The new value of the field. Grouping names must be unique - only \"hidden\" and \"checkboxes\" grouping types can be converted between each other.
" } ], "returns" : { "type" : "item()*", "description" : "True if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "list-interest-grouping-update", "qname" : "mailchimp:list-interest-grouping-update", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $grouping_id as xs:integer, $name as xs:string, $value as xs:string) as item()*", "description" : " Update an existing Interest Grouping.\n", "summary" : "

Update an existing Interest Grouping.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "grouping_id", "type" : "xs:integer", "occurrence" : null, "description" : "
the interest grouping id - get from list-interest-groupings()
" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
The name of the field to update - either \"name\" or \"type\". Groups with in the grouping should be manipulated using the standard listInterestGroup* methods
" }, { "name" : "value", "type" : "xs:string", "occurrence" : null, "description" : "
The new value of the field. Grouping names must be unique - only \"hidden\" and \"checkboxes\" grouping types can be converted between each other.
" } ], "returns" : { "type" : "item()*", "description" : "True if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "list-interest-groupings", "qname" : "mailchimp:list-interest-groupings", "signature" : "($apikey as xs:string, $id as xs:string) as item()*", "description" : " Convenience function for list-interest-groupings#3.\n", "summary" : "

Convenience function for list-interest-groupings#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" } ], "returns" : { "type" : "item()*", "description" : "List of interest groups for the list" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "list-interest-groupings", "qname" : "mailchimp:list-interest-groupings", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string) as item()*", "description" : " Get the list of interest groupings for a given list, including the label, form information, and included groups for each.\n", "summary" : "

Get the list of interest groupings for a given list, including the label, form information, and included groups for each.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" } ], "returns" : { "type" : "item()*", "description" : "List of interest groups for the list" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "list-locations", "qname" : "mailchimp:list-locations", "signature" : "($apikey as xs:string, $id as xs:string) as item()*", "description" : " Convenience function for list-locations#3.\n", "summary" : "

Convenience function for list-locations#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" } ], "returns" : { "type" : "item()*", "description" : "Array of locations" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "list-locations", "qname" : "mailchimp:list-locations", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string) as item()*", "description" : " Retrieve the locations (countries) that the list's subscribers have been tagged to based on geocoding their IP address.\n", "summary" : "

Retrieve the locations (countries) that the list's subscribers have been tagged to based on geocoding their IP address.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" } ], "returns" : { "type" : "item()*", "description" : "Array of locations" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "list-member-activity", "qname" : "mailchimp:list-member-activity", "signature" : "($apikey as xs:string, $id as xs:string, $email_address as element(array)) as item()*", "description" : " Convenience function for list-member-activity#4.\n", "summary" : "

Convenience function for list-member-activity#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "email_address", "type" : "element(array)", "occurrence" : null, "description" : "
an array of up to 50 email addresses to get information for OR the \"id\"(s) for the member returned from listMembers, Webhooks, and Campaigns.
" } ], "returns" : { "type" : "item()*", "description" : "Array of data and success/error counts" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "list-member-activity", "qname" : "mailchimp:list-member-activity", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $email_address as element(array)) as item()*", "description" : " Get the most recent 100 activities for particular list members (open, click, bounce, unsub, abuse, sent to).\n", "summary" : "

Get the most recent 100 activities for particular list members (open, click, bounce, unsub, abuse, sent to).

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "email_address", "type" : "element(array)", "occurrence" : null, "description" : "
an array of up to 50 email addresses to get information for OR the \"id\"(s) for the member returned from listMembers, Webhooks, and Campaigns.
" } ], "returns" : { "type" : "item()*", "description" : "Array of data and success/error counts" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "list-member-info", "qname" : "mailchimp:list-member-info", "signature" : "($apikey as xs:string, $id as xs:string, $email_address as element(array)) as item()*", "description" : " Convenience function for list-member-info#4.\n", "summary" : "

Convenience function for list-member-info#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "email_address", "type" : "element(array)", "occurrence" : null, "description" : "
an array of up to 50 email addresses to get information for OR the \"id\"(s) for the member returned from listMembers, Webhooks, and Campaigns. For backwards compatibility, if a string is passed, it will be treated as an array with a single element (will not work with XML-RPC).
" } ], "returns" : { "type" : "item()*", "description" : "Array of list members with their info in an array (see Returned Fields for details)" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "list-member-info", "qname" : "mailchimp:list-member-info", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $email_address as element(array)) as item()*", "description" : " Get all the information for particular members of a list.\n", "summary" : "

Get all the information for particular members of a list.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "email_address", "type" : "element(array)", "occurrence" : null, "description" : "
an array of up to 50 email addresses to get information for OR the \"id\"(s) for the member returned from listMembers, Webhooks, and Campaigns. For backwards compatibility, if a string is passed, it will be treated as an array with a single element (will not work with XML-RPC).
" } ], "returns" : { "type" : "item()*", "description" : "Array of list members with their info in an array (see Returned Fields for details)" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "list-members", "qname" : "mailchimp:list-members", "signature" : "($apikey as xs:string, $id as xs:string, $status as xs:string, $since as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Convenience function for list-members#7.\n", "summary" : "

Convenience function for list-members#7 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "status", "type" : "xs:string", "occurrence" : null, "description" : "
the status to get members for - one of(subscribed, unsubscribed, cleaned, updated), defaults to subscribed
" }, { "name" : "since", "type" : "xs:string", "occurrence" : null, "description" : "
optional pull all members whose status (subscribed/unsubscribed/cleaned) has changed or whose profile (updated) has changed since this date/time (in GMT) - format is YYYY-MM-DD HH:mm:ss (24hr)
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the number of results to return - defaults to 100, upper limit set at 15000
" } ], "returns" : { "type" : "item()*", "description" : "Array of a the total records match and matching list member data for this page (see Returned Fields for details)" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 7, "name" : "list-members", "qname" : "mailchimp:list-members", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $status as xs:string, $since as xs:string, $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Get all of the list members for a list that are of a particular status.\n", "summary" : "

Get all of the list members for a list that are of a particular status.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "status", "type" : "xs:string", "occurrence" : null, "description" : "
the status to get members for - one of(subscribed, unsubscribed, cleaned, updated), defaults to subscribed
" }, { "name" : "since", "type" : "xs:string", "occurrence" : null, "description" : "
optional pull all members whose status (subscribed/unsubscribed/cleaned) has changed or whose profile (updated) has changed since this date/time (in GMT) - format is YYYY-MM-DD HH:mm:ss (24hr)
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
optional for large data sets, the number of results to return - defaults to 100, upper limit set at 15000
" } ], "returns" : { "type" : "item()*", "description" : "Array of a the total records match and matching list member data for this page (see Returned Fields for details)" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "list-merge-var-add", "qname" : "mailchimp:list-merge-var-add", "signature" : "($apikey as xs:string, $id as xs:string, $tag as xs:string, $name as xs:string, $options as element(array)) as item()*", "description" : " Convenience function for list-merge-var-add#6.\n", "summary" : "

Convenience function for list-merge-var-add#6 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "tag", "type" : "xs:string", "occurrence" : null, "description" : "
The merge tag to add, e.g. FNAME
" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
The long description of the tag being added, used for user displays
" }, { "name" : "options", "type" : "element(array)", "occurrence" : null, "description" : "
optional Various options for this merge var. note: for historical purposes this can also take a \"boolean\"
" } ], "returns" : { "type" : "item()*", "description" : "True if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "list-merge-var-add", "qname" : "mailchimp:list-merge-var-add", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $tag as xs:string, $name as xs:string, $options as element(array)) as item()*", "description" : " Add a new merge tag to a given list.\n", "summary" : "

Add a new merge tag to a given list.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "tag", "type" : "xs:string", "occurrence" : null, "description" : "
The merge tag to add, e.g. FNAME
" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
The long description of the tag being added, used for user displays
" }, { "name" : "options", "type" : "element(array)", "occurrence" : null, "description" : "
optional Various options for this merge var. note: for historical purposes this can also take a \"boolean\"
" } ], "returns" : { "type" : "item()*", "description" : "True if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "list-merge-var-del", "qname" : "mailchimp:list-merge-var-del", "signature" : "($apikey as xs:string, $id as xs:string, $tag as xs:string) as item()*", "description" : " Convenience function for list-merge-var-del#4.\n", "summary" : "

Convenience function for list-merge-var-del#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "tag", "type" : "xs:string", "occurrence" : null, "description" : "
The merge tag to delete
" } ], "returns" : { "type" : "item()*", "description" : "bool true if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "list-merge-var-del", "qname" : "mailchimp:list-merge-var-del", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $tag as xs:string) as item()*", "description" : " Delete a merge tag from a given list and all its members. Seriously - the data is removed from all members as well! Note that on large lists this method may seem a bit slower than calls you typically make.\n", "summary" : "

Delete a merge tag from a given list and all its members.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "tag", "type" : "xs:string", "occurrence" : null, "description" : "
The merge tag to delete
" } ], "returns" : { "type" : "item()*", "description" : "True if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "list-merge-var-update", "qname" : "mailchimp:list-merge-var-update", "signature" : "($apikey as xs:string, $id as xs:string, $tag as xs:string, $options as element(array)) as item()*", "description" : " Convenience function for list-merge-var-update#5.\n", "summary" : "

Convenience function for list-merge-var-update#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "tag", "type" : "xs:string", "occurrence" : null, "description" : "
The merge tag to update
" }, { "name" : "options", "type" : "element(array)", "occurrence" : null, "description" : "
The options to change for a merge var. See list-merge-var-add() for valid options
" } ], "returns" : { "type" : "item()*", "description" : "True if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "list-merge-var-update", "qname" : "mailchimp:list-merge-var-update", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $tag as xs:string, $options as element(array)) as item()*", "description" : " Update most parameters for a merge tag on a given list. You cannot currently change the merge type.\n", "summary" : "

Update most parameters for a merge tag on a given list.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "tag", "type" : "xs:string", "occurrence" : null, "description" : "
The merge tag to update
" }, { "name" : "options", "type" : "element(array)", "occurrence" : null, "description" : "
The options to change for a merge var. See list-merge-var-add() for valid options
" } ], "returns" : { "type" : "item()*", "description" : "True if the request succeeds, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "list-merge-vars", "qname" : "mailchimp:list-merge-vars", "signature" : "($apikey as xs:string, $id as xs:string) as item()*", "description" : " Convenience function for list-merge-vars#3.\n", "summary" : "

Convenience function for list-merge-vars#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" } ], "returns" : { "type" : "item()*", "description" : "List of merge tags for the list" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "list-merge-vars", "qname" : "mailchimp:list-merge-vars", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string) as item()*", "description" : " Get the list of merge tags for a given list, including their name, tag, and required setting.\n", "summary" : "

Get the list of merge tags for a given list, including their name, tag, and required setting.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" } ], "returns" : { "type" : "item()*", "description" : "List of merge tags for the list" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "list-static-segment-add", "qname" : "mailchimp:list-static-segment-add", "signature" : "($apikey as xs:string, $id as xs:string, $name as xs:string) as item()*", "description" : " Convenience function for list-static-segment-add#4.\n", "summary" : "

Convenience function for list-static-segment-add#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
a unique name per list for the segment - 50 byte maximum length, anything longer will throw an error
" } ], "returns" : { "type" : "item()*", "description" : "The id of the new segment, otherwise an error will be thrown." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "list-static-segment-add", "qname" : "mailchimp:list-static-segment-add", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $name as xs:string) as item()*", "description" : " Save a segment against a list for later use. There is no limit to the number of segments which can be saved. Static Segments are not tied to any merge data, interest groups, etc. They essentially allow you to configure an unlimited number of custom segments which will have standard performance. When using proper segments, Static Segments are one of the available options for segmentation just as if you used a merge var (and they can be used with other segmentation options), though performance may degrade at that point.\n", "summary" : "

Save a segment against a list for later use.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
a unique name per list for the segment - 50 byte maximum length, anything longer will throw an error
" } ], "returns" : { "type" : "item()*", "description" : "The id of the new segment, otherwise an error will be thrown." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "list-static-segment-del", "qname" : "mailchimp:list-static-segment-del", "signature" : "($apikey as xs:string, $id as xs:string, $seg_id as xs:integer) as item()*", "description" : " Convenience function for list-static-segment-del#4.\n", "summary" : "

Convenience function for list-static-segment-del#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "seg_id", "type" : "xs:integer", "occurrence" : null, "description" : "
the id of the static segment to delete - get from list-static-segments()
" } ], "returns" : { "type" : "item()*", "description" : "True if it worked, otherwise an error is thrown." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "list-static-segment-del", "qname" : "mailchimp:list-static-segment-del", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $seg_id as xs:integer) as item()*", "description" : " Delete a static segment. Note that this will, of course, remove any member affiliations with the segment.\n", "summary" : "

Delete a static segment.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "seg_id", "type" : "xs:integer", "occurrence" : null, "description" : "
the id of the static segment to delete - get from list-static-segments()
" } ], "returns" : { "type" : "item()*", "description" : "True if it worked, otherwise an error is thrown." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "list-static-segment-members-add", "qname" : "mailchimp:list-static-segment-members-add", "signature" : "($apikey as xs:string, $id as xs:string, $seg_id as xs:integer, $batch as element(array)) as item()*", "description" : " Convenience function for list-static-segment-members-add#5.\n", "summary" : "

Convenience function for list-static-segment-members-add#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "seg_id", "type" : "xs:integer", "occurrence" : null, "description" : "
the id of the static segment to modify - get from list-static-segments()
" }, { "name" : "batch", "type" : "element(array)", "occurrence" : null, "description" : "
an array of email addresses and/or unique_ids to add to the segment
" } ], "returns" : { "type" : "item()*", "description" : "An array with the results of the operation" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "list-static-segment-members-add", "qname" : "mailchimp:list-static-segment-members-add", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $seg_id as xs:integer, $batch as element(array)) as item()*", "description" : " Add list members to a static segment. It is suggested that you limit batch size to no more than 10,000 addresses per call. Email addresses must exist on the list in order to be included - this will not subscribe them to the list!.\n", "summary" : "

Add list members to a static segment.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "seg_id", "type" : "xs:integer", "occurrence" : null, "description" : "
the id of the static segment to modify - get from list-static-segments()
" }, { "name" : "batch", "type" : "element(array)", "occurrence" : null, "description" : "
an array of email addresses and/or unique_ids to add to the segment
" } ], "returns" : { "type" : "item()*", "description" : "array an array with the results of the operation" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "list-static-segment-members-del", "qname" : "mailchimp:list-static-segment-members-del", "signature" : "($apikey as xs:string, $id as xs:string, $seg_id as xs:integer, $batch as element(array)) as item()*", "description" : " Convenience function for list-static-segment-members-del#5.\n", "summary" : "

Convenience function for list-static-segment-members-del#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "seg_id", "type" : "xs:integer", "occurrence" : null, "description" : "
the id of the static segment to delete - get from list-static-segments()
" }, { "name" : "batch", "type" : "element(array)", "occurrence" : null, "description" : "
an array of email addresses and/or unique_ids to remove from the segment
" } ], "returns" : { "type" : "item()*", "description" : "An array with the results of the operation" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "list-static-segment-members-del", "qname" : "mailchimp:list-static-segment-members-del", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $seg_id as xs:integer, $batch as element(array)) as item()*", "description" : " Remove list members from a static segment. It is suggested that you limit batch size to no more than 10,000 addresses per call. Email addresses must exist on the list in order to be removed - this will not unsubscribe them from the list!.\n", "summary" : "

Remove list members from a static segment.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "seg_id", "type" : "xs:integer", "occurrence" : null, "description" : "
the id of the static segment to delete - get from list-static-segments()
" }, { "name" : "batch", "type" : "element(array)", "occurrence" : null, "description" : "
an array of email addresses and/or unique_ids to remove from the segment
" } ], "returns" : { "type" : "item()*", "description" : "An array with the results of the operation" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "list-static-segment-reset", "qname" : "mailchimp:list-static-segment-reset", "signature" : "($apikey as xs:string, $id as xs:string, $seg_id as xs:integer) as item()*", "description" : " Convenience function for list-static-segment-reset#4.\n", "summary" : "

Convenience function for list-static-segment-reset#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "seg_id", "type" : "xs:integer", "occurrence" : null, "description" : "
the id of the static segment to reset - get from list-static-segments()
" } ], "returns" : { "type" : "item()*", "description" : "True if it worked, otherwise an error is thrown." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "list-static-segment-reset", "qname" : "mailchimp:list-static-segment-reset", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $seg_id as xs:integer) as item()*", "description" : " Resets a static segment - removes all members from the static segment. Note: does not actually affect list member data.\n", "summary" : "

Resets a static segment - removes all members from the static segment.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "seg_id", "type" : "xs:integer", "occurrence" : null, "description" : "
the id of the static segment to reset - get from list-static-segments()
" } ], "returns" : { "type" : "item()*", "description" : "True if it worked, otherwise an error is thrown." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "list-static-segments", "qname" : "mailchimp:list-static-segments", "signature" : "($apikey as xs:string, $id as xs:string) as item()*", "description" : " Convenience function for list-static-segments#3.\n", "summary" : "

Convenience function for list-static-segments#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" } ], "returns" : { "type" : "item()*", "description" : "An array of parameters for each static segment" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "list-static-segments", "qname" : "mailchimp:list-static-segments", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string) as item()*", "description" : " Retrieve all of the Static Segments for a list.\n", "summary" : "

Retrieve all of the Static Segments for a list.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" } ], "returns" : { "type" : "item()*", "description" : "An array of parameters for each static segment" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 10, "name" : "list-subscribe", "qname" : "mailchimp:list-subscribe", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $email_address as xs:string, $merge_vars as element(array), $email_type as xs:string, $double_optin as xs:boolean, $update_existing as xs:boolean, $replace_interests as xs:boolean, $send_welcome as xs:boolean) as item()*", "description" : " Subscribe the provided email to a list.\n", "summary" : "

Subscribe the provided email to a list.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "email_address", "type" : "xs:string", "occurrence" : null, "description" : "
the email address to subscribe
" }, { "name" : "merge_vars", "type" : "element(array)", "occurrence" : null, "description" : "
optional merges for the email (FNAME, LNAME, etc.) (see examples below for handling \"blank\" arrays). Note that a merge field can only hold up to 255 bytes. Also, there are a few \"special\" keys. See Mailchimp API documentation for more information about the parameter structure.
" }, { "name" : "email_type", "type" : "xs:string", "occurrence" : null, "description" : "
optional email type preference for the email (html, text, or mobile defaults to html)
" }, { "name" : "double_optin", "type" : "xs:boolean", "occurrence" : null, "description" : "
optional flag to control whether a double opt-in confirmation message is sent, defaults to true. Abusing this may cause your account to be suspended.
" }, { "name" : "update_existing", "type" : "xs:boolean", "occurrence" : null, "description" : "
optional flag to control whether a existing subscribers should be updated instead of throwing and error, defaults to false
" }, { "name" : "replace_interests", "type" : "xs:boolean", "occurrence" : null, "description" : "
optional flag to determine whether we replace the interest groups with the groups provided, or we add the provided groups to the member's interest groups (optional, defaults to true)
" }, { "name" : "send_welcome", "type" : "xs:boolean", "occurrence" : null, "description" : "
optional if your double_optin is false and this is true, we will send your lists Welcome Email if this subscribe succeeds - this will *not* fire if we end up updating an existing subscriber. If double_optin is true, this has no effect. defaults to false.
" } ], "returns" : { "type" : "item()*", "description" : "True on success, false on failure." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 9, "name" : "list-subscribe", "qname" : "mailchimp:list-subscribe", "signature" : "($apikey as xs:string, $id as xs:string, $email_address as xs:string, $merge_vars as element(array), $email_type as xs:string, $double_optin as xs:boolean, $update_existing as xs:boolean, $replace_interests as xs:boolean, $send_welcome as xs:boolean) as item()*", "description" : " Convenience function for list-subscribe#10.\n", "summary" : "

Convenience function for list-subscribe#10 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "email_address", "type" : "xs:string", "occurrence" : null, "description" : "
the email address to subscribe
" }, { "name" : "merge_vars", "type" : "element(array)", "occurrence" : null, "description" : "
optional merges for the email (FNAME, LNAME, etc.) (see examples below for handling \"blank\" arrays). Note that a merge field can only hold up to 255 bytes. Also, there are a few \"special\" keys. See Mailchimp API documentation for more information about the parameter structure.
" }, { "name" : "email_type", "type" : "xs:string", "occurrence" : null, "description" : "
optional email type preference for the email (html, text, or mobile defaults to html)
" }, { "name" : "double_optin", "type" : "xs:boolean", "occurrence" : null, "description" : "
optional flag to control whether a double opt-in confirmation message is sent, defaults to true. Abusing this may cause your account to be suspended.
" }, { "name" : "update_existing", "type" : "xs:boolean", "occurrence" : null, "description" : "
optional flag to control whether a existing subscribers should be updated instead of throwing and error, defaults to false
" }, { "name" : "replace_interests", "type" : "xs:boolean", "occurrence" : null, "description" : "
optional flag to determine whether we replace the interest groups with the groups provided, or we add the provided groups to the member's interest groups (optional, defaults to true)
" }, { "name" : "send_welcome", "type" : "xs:boolean", "occurrence" : null, "description" : "
optional if your double_optin is false and this is true, we will send your lists Welcome Email if this subscribe succeeds - this will *not* fire if we end up updating an existing subscriber. If double_optin is true, this has no effect. defaults to false.
" } ], "returns" : { "type" : "item()*", "description" : "True on success, false on failure." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "list-unsubscribe", "qname" : "mailchimp:list-unsubscribe", "signature" : "($apikey as xs:string, $id as xs:string, $email_address as xs:string, $delete_member as xs:boolean, $send_goodbye as xs:boolean, $send_notify as xs:boolean) as item()*", "description" : " Convenience function for list-unsubscribe#7.\n", "summary" : "

Convenience function for list-unsubscribe#7 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "email_address", "type" : "xs:string", "occurrence" : null, "description" : "
the email address to unsubscribe OR the email \"id\" returned from listMemberInfo, Webhooks, and Campaigns
" }, { "name" : "delete_member", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to completely delete the member from your list instead of just unsubscribing, default to false
" }, { "name" : "send_goodbye", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to send the goodbye email to the email address, defaults to true
" }, { "name" : "send_notify", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to send the unsubscribe notification email to the address defined in the list email notification settings, defaults to true
" } ], "returns" : { "type" : "item()*", "description" : "True on success, false on failure." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 7, "name" : "list-unsubscribe", "qname" : "mailchimp:list-unsubscribe", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $email_address as xs:string, $delete_member as xs:boolean, $send_goodbye as xs:boolean, $send_notify as xs:boolean) as item()*", "description" : " Unsubscribe the given email address from the list.\n", "summary" : "

Unsubscribe the given email address from the list.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "email_address", "type" : "xs:string", "occurrence" : null, "description" : "
the email address to unsubscribe OR the email \"id\" returned from listMemberInfo, Webhooks, and Campaigns
" }, { "name" : "delete_member", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to completely delete the member from your list instead of just unsubscribing, default to false
" }, { "name" : "send_goodbye", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to send the goodbye email to the email address, defaults to true
" }, { "name" : "send_notify", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to send the unsubscribe notification email to the address defined in the list email notification settings, defaults to true
" } ], "returns" : { "type" : "item()*", "description" : "True on success, false on failure." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "list-update-member", "qname" : "mailchimp:list-update-member", "signature" : "($apikey as xs:string, $id as xs:string, $email_address as xs:string, $merge_vars as element(array), $email_type as xs:string, $replace_interests as xs:boolean) as item()*", "description" : " Convenience function for list-update-member#7.\n", "summary" : "

Convenience function for list-update-member#7 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "email_address", "type" : "xs:string", "occurrence" : null, "description" : "
the current email address of the member to update OR the \"id\" for the member returned from listMemberInfo, Webhooks, and Campaigns
" }, { "name" : "merge_vars", "type" : "element(array)", "occurrence" : null, "description" : "
array of new field values to update the member with. See merge_vars in list-subscribe() for details.
" }, { "name" : "email_type", "type" : "xs:string", "occurrence" : null, "description" : "
change the email type preference for the member (\"html\", \"text\", or \"mobile\"). Leave blank to keep the existing preference (optional)
" }, { "name" : "replace_interests", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to determine whether we replace the interest groups with the updated groups provided, or we add the provided groups to the member's interest groups (optional, defaults to true)
" } ], "returns" : { "type" : "item()*", "description" : "True on success, false on failure." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 7, "name" : "list-update-member", "qname" : "mailchimp:list-update-member", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $email_address as xs:string, $merge_vars as element(array), $email_type as xs:string, $replace_interests as xs:boolean) as item()*", "description" : " Edit the email address, merge fields, and interest groups for a list member. If you are doing a batch update on lots of users, consider using #list-batch-subscribe() with the update_existing and possible replace_interests parameter.\n", "summary" : "

Edit the email address, merge fields, and interest groups for a list member.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "email_address", "type" : "xs:string", "occurrence" : null, "description" : "
the current email address of the member to update OR the \"id\" for the member returned from listMemberInfo, Webhooks, and Campaigns
" }, { "name" : "merge_vars", "type" : "element(array)", "occurrence" : null, "description" : "
array of new field values to update the member with. See merge_vars in list-subscribe() for details.
" }, { "name" : "email_type", "type" : "xs:string", "occurrence" : null, "description" : "
change the email type preference for the member (\"html\", \"text\", or \"mobile\"). Leave blank to keep the existing preference (optional)
" }, { "name" : "replace_interests", "type" : "xs:boolean", "occurrence" : null, "description" : "
flag to determine whether we replace the interest groups with the updated groups provided, or we add the provided groups to the member's interest groups (optional, defaults to true)
" } ], "returns" : { "type" : "item()*", "description" : "True on success, false on failure." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "list-webhook-add", "qname" : "mailchimp:list-webhook-add", "signature" : "($apikey as xs:string, $id as xs:string, $url as xs:string, $actions as element(array), $sources as element(array)) as item()*", "description" : " Convenience function for list-webhook-add#6.\n", "summary" : "

Convenience function for list-webhook-add#6 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "url", "type" : "xs:string", "occurrence" : null, "description" : "
a valid URL for the Webhook - it will be validated. note that a url may only exist on a list once.
" }, { "name" : "actions", "type" : "element(array)", "occurrence" : null, "description" : "
optional a hash of actions to fire this Webhook for
" }, { "name" : "sources", "type" : "element(array)", "occurrence" : null, "description" : "
optional a hash of sources to fire this Webhook for
" } ], "returns" : { "type" : "item()*", "description" : "True if the call succeeds, otherwise an exception will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "list-webhook-add", "qname" : "mailchimp:list-webhook-add", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $url as xs:string, $actions as element(array), $sources as element(array)) as item()*", "description" : " Add a new Webhook URL for the given list.\n", "summary" : "

Add a new Webhook URL for the given list.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "url", "type" : "xs:string", "occurrence" : null, "description" : "
a valid URL for the Webhook - it will be validated. note that a url may only exist on a list once.
" }, { "name" : "actions", "type" : "element(array)", "occurrence" : null, "description" : "
optional a hash of actions to fire this Webhook for
" }, { "name" : "sources", "type" : "element(array)", "occurrence" : null, "description" : "
optional a hash of sources to fire this Webhook for
" } ], "returns" : { "type" : "item()*", "description" : "True if the call succeeds, otherwise an exception will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "list-webhook-del", "qname" : "mailchimp:list-webhook-del", "signature" : "($apikey as xs:string, $id as xs:string, $url as xs:string) as item()*", "description" : " Convenience function for list-webhook-del#4.\n", "summary" : "

Convenience function for list-webhook-del#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "url", "type" : "xs:string", "occurrence" : null, "description" : "
the URL of a Webhook on this list
" } ], "returns" : { "type" : "item()*", "description" : "True if the call succeeds, otherwise an exception will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "list-webhook-del", "qname" : "mailchimp:list-webhook-del", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $url as xs:string) as item()*", "description" : " Delete an existing Webhook URL from a given list.\n", "summary" : "

Delete an existing Webhook URL from a given list.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" }, { "name" : "url", "type" : "xs:string", "occurrence" : null, "description" : "
the URL of a Webhook on this list
" } ], "returns" : { "type" : "item()*", "description" : "True if the call succeeds, otherwise an exception will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "list-webhooks", "qname" : "mailchimp:list-webhooks", "signature" : "($apikey as xs:string, $id as xs:string) as item()*", "description" : " Convenience function for list-webhooks#3.\n", "summary" : "

Convenience function for list-webhooks#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" } ], "returns" : { "type" : "item()*", "description" : "List of webhooks" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "list-webhooks", "qname" : "mailchimp:list-webhooks", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string) as item()*", "description" : " Return the Webhooks configured for the given list.\n", "summary" : "

Return the Webhooks configured for the given list.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the list id to connect to. Get by calling lists()
" } ], "returns" : { "type" : "item()*", "description" : "List of webhooks" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "lists-for-email", "qname" : "mailchimp:lists-for-email", "signature" : "($apikey as xs:string, $email_address as xs:string) as item()*", "description" : " Convenience function for lists-for-email#3.\n", "summary" : "

Convenience function for lists-for-email#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "email_address", "type" : "xs:string", "occurrence" : null, "description" : "
the email address to check OR the email \"id\" returned from listMemberInfo, Webhooks, and Campaigns
" } ], "returns" : { "type" : "item()*", "description" : "An array of list_ids the member is subscribed to." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "lists-for-email", "qname" : "mailchimp:lists-for-email", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $email_address as xs:string) as item()*", "description" : " Retrieve all List Ids a member is subscribed to.\n", "summary" : "

Retrieve all List Ids a member is subscribed to.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "email_address", "type" : "xs:string", "occurrence" : null, "description" : "
the email address to check OR the email \"id\" returned from listMemberInfo, Webhooks, and Campaigns
" } ], "returns" : { "type" : "item()*", "description" : "An array of list_ids the member is subscribed to." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "lists", "qname" : "mailchimp:lists", "signature" : "($apikey as xs:string, $filters as element(array), $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Convenience function for lists#5.\n", "summary" : "

Convenience function for lists#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "filters", "type" : "element(array)", "occurrence" : null, "description" : "
a hash of filters to apply to this query - all are optional. See Mailchimp API documentation for more information about the parameter structure.
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional - control paging of lists, start results at this list #, defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
optional - control paging of lists, number of lists to return with each call, defaults to 25 (max=100)
" } ], "returns" : { "type" : "item()*", "description" : "Array with keys listed in Returned Fields below" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "lists", "qname" : "mailchimp:lists", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $filters as element(array), $start as xs:integer, $limit as xs:integer) as item()*", "description" : " Retrieve all of the lists defined for your user account.\n", "summary" : "

Retrieve all of the lists defined for your user account.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "filters", "type" : "element(array)", "occurrence" : null, "description" : "
a hash of filters to apply to this query - all are optional. See Mailchimp API documentation for more information about the parameter structure.
" }, { "name" : "start", "type" : "xs:integer", "occurrence" : null, "description" : "
optional - control paging of lists, start results at this list #, defaults to 1st page of data (page 0)
" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "
optional - control paging of lists, number of lists to return with each call, defaults to 25 (max=100)
" } ], "returns" : { "type" : "item()*", "description" : "Array with keys listed in Returned Fields below" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "ping", "qname" : "mailchimp:ping", "signature" : "($apikey as xs:string) as item()*", "description" : " Convenience function for ping#2.\n", "summary" : "

Convenience function for ping#2 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "Returns \"Everything's Chimpy!\" if everything is chimpy, otherwise returns an error message" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "ping", "qname" : "mailchimp:ping", "signature" : "($endpoint-url as xs:string, $apikey as xs:string) as item()*", "description" : " \"Ping\" the MailChimp API - a simple method you can call that will return a constant value as long as everything is good. Note than unlike most all of our methods, we don't throw an Exception if we are having issues. You will simply receive a different string back that will explain our view on what is going on.\n", "summary" : "

\"Ping\" the MailChimp API - a simple method you can call that will return a constant value as long as everything is good.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" } ], "returns" : { "type" : "item()*", "description" : "Returns \"Everything's Chimpy!\" if everything is chimpy, otherwise returns an error message" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "template-add", "qname" : "mailchimp:template-add", "signature" : "($apikey as xs:string, $name as xs:string, $html as xs:string) as item()*", "description" : " Convenience function for template-add#4.\n", "summary" : "

Convenience function for template-add#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the name for the template - names must be unique and a max of 50 bytes
" }, { "name" : "html", "type" : "xs:string", "occurrence" : null, "description" : "
a string specifying the entire template to be created. This is NOT campaign content. They are intended to utilize our template language.
" } ], "returns" : { "type" : "item()*", "description" : "The new template id, otherwise an error is thrown." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "template-add", "qname" : "mailchimp:template-add", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $name as xs:string, $html as xs:string) as item()*", "description" : " Create a new user template, NOT campaign content. These templates can then be applied while creating campaigns.\n", "summary" : "

Create a new user template, NOT campaign content.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the name for the template - names must be unique and a max of 50 bytes
" }, { "name" : "html", "type" : "xs:string", "occurrence" : null, "description" : "
a string specifying the entire template to be created. This is NOT campaign content. They are intended to utilize our template language.
" } ], "returns" : { "type" : "item()*", "description" : "The new template id, otherwise an error is thrown." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "template-del", "qname" : "mailchimp:template-del", "signature" : "($apikey as xs:string, $id as xs:integer) as item()*", "description" : " Convenience function for template-del#3.\n", "summary" : "

Convenience function for template-del#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:integer", "occurrence" : null, "description" : "
the id of the user template to delete
" } ], "returns" : { "type" : "item()*", "description" : "True if the template was deleted, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "template-del", "qname" : "mailchimp:template-del", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:integer) as item()*", "description" : " Delete (deactivate) a user template.\n", "summary" : "

Delete (deactivate) a user template.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:integer", "occurrence" : null, "description" : "
the id of the user template to delete
" } ], "returns" : { "type" : "item()*", "description" : "True if the template was deleted, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "template-info", "qname" : "mailchimp:template-info", "signature" : "($apikey as xs:string, $tid as xs:integer, $type as xs:string) as item()*", "description" : " Convenience function for template-info#4.\n", "summary" : "

Convenience function for template-info#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "tid", "type" : "xs:integer", "occurrence" : null, "description" : "
the template id - get from templates()
" }, { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the template type to load - one of 'user', 'gallery', 'base'
" } ], "returns" : { "type" : "item()*", "description" : "An array of info to be used when editing" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "template-info", "qname" : "mailchimp:template-info", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $tid as xs:integer, $type as xs:string) as item()*", "description" : " Pull details for a specific template to help support editing.\n", "summary" : "

Pull details for a specific template to help support editing.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "tid", "type" : "xs:integer", "occurrence" : null, "description" : "
the template id - get from templates()
" }, { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the template type to load - one of 'user', 'gallery', 'base'
" } ], "returns" : { "type" : "item()*", "description" : "An array of info to be used when editing" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "template-undel", "qname" : "mailchimp:template-undel", "signature" : "($apikey as xs:string, $id as xs:integer) as item()*", "description" : " Convenience function for template-undel#3.\n", "summary" : "

Convenience function for template-undel#3 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:integer", "occurrence" : null, "description" : "
the id of the user template to reactivate
" } ], "returns" : { "type" : "item()*", "description" : "boolean true if the template was deleted, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "template-undel", "qname" : "mailchimp:template-undel", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:integer) as item()*", "description" : " Undelete (reactivate) a user template.\n", "summary" : "

Undelete (reactivate) a user template.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:integer", "occurrence" : null, "description" : "
the id of the user template to reactivate
" } ], "returns" : { "type" : "item()*", "description" : "boolean true if the template was deleted, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "template-update", "qname" : "mailchimp:template-update", "signature" : "($apikey as xs:string, $id as xs:integer, $values as element(array)) as item()*", "description" : " Convenience function for template-update#4.\n", "summary" : "

Convenience function for template-update#4 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "id", "type" : "xs:integer", "occurrence" : null, "description" : "
the id of the user template to update
" }, { "name" : "values", "type" : "element(array)", "occurrence" : null, "description" : "
s the values to updates - while both are optional, at least one should be provided. Both can be updated at the same time.
" } ], "returns" : { "type" : "item()*", "description" : "True if the template was updated, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "template-update", "qname" : "mailchimp:template-update", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $id as xs:integer, $values as element(array)) as item()*", "description" : " Replace the content of a user template, NOT campaign content.\n", "summary" : "

Replace the content of a user template, NOT campaign content.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "id", "type" : "xs:integer", "occurrence" : null, "description" : "
the id of the user template to update
" }, { "name" : "values", "type" : "element(array)", "occurrence" : null, "description" : "
s the values to updates - while both are optional, at least one should be provided. Both can be updated at the same time.
" } ], "returns" : { "type" : "item()*", "description" : "True if the template was updated, otherwise an error will be thrown" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "templates", "qname" : "mailchimp:templates", "signature" : "($apikey as xs:string, $types as element(array), $category as xs:string, $inactives as element(array)) as item()*", "description" : " Convenience function for templates#5.\n", "summary" : "

Convenience function for templates#5 .

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "types", "type" : "element(array)", "occurrence" : null, "description" : "
optional the types of templates to return
" }, { "name" : "category", "type" : "xs:string", "occurrence" : null, "description" : "
optional for Gallery templates only, limit to a specific template category
" }, { "name" : "inactives", "type" : "element(array)", "occurrence" : null, "description" : "
optional options to control how inactive templates are returned, if at all
" } ], "returns" : { "type" : "item()*", "description" : "An array of structs, one for each template (see Returned Fields for details)" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "templates", "qname" : "mailchimp:templates", "signature" : "($endpoint-url as xs:string, $apikey as xs:string, $types as element(array), $category as xs:string, $inactives as element(array)) as item()*", "description" : " Retrieve various templates available in the system, allowing some thing similar to our template gallery to be created. boolean user Customer template for this user account. Defaults to true. boolean gallery Templates from our Gallery. Note that some templates that require extra configuration are withheld. (eg, the Etsy template). Defaults to false. boolean base Our \"start from scratch\" extremely basic templates boolean include user templates are not deleted, only set inactive. defaults to false. boolean only only include inactive templates. defaults to false.\n", "summary" : "

Retrieve various templates available in the system, allowing some thing similar to our template gallery to be created.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint-url", "type" : "xs:string", "occurrence" : null, "description" : "
Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/
" }, { "name" : "apikey", "type" : "xs:string", "occurrence" : null, "description" : "
a valid API Key for your user account. Get by visiting your API dashboard
" }, { "name" : "types", "type" : "element(array)", "occurrence" : null, "description" : "
optional the types of templates to return
" }, { "name" : "category", "type" : "xs:string", "occurrence" : null, "description" : "
optional for Gallery templates only, limit to a specific template category
" }, { "name" : "inactives", "type" : "element(array)", "occurrence" : null, "description" : "
optional options to control how inactive templates are returned, if at all
" } ], "returns" : { "type" : "item()*", "description" : "An array of structs, one for each template (see Returned Fields for details)" }, "errors" : [ ] } ], "variables" : [ { "name" : "mailchimp:gateway", "type" : "item()*", "description" : " Mailchimp gateway where the client data is stored.\n" }, { "name" : "mailchimp:version", "type" : "item()*", "description" : " Mailchimp API version.\n" }, { "name" : "mailchimp:endpoint", "type" : "item()*", "description" : " Endpoint URL for the XML-RPC requests.\n" } ] }, "http://www.zorba-xquery.com/modules/couchbase" : { "ns" : "http://www.zorba-xquery.com/modules/couchbase", "description" : " This module provides minimal functionality to interact with the\n Couchbase NoSQL database.\n The module is built using the libcouchbase C client library and\n exposes most of its functionality in XQuery with JSONiq extensions.\n Beyond just allowing for basic key-value store operations (e.g.\n put-/get-text or put-/get-binary, this module also allows to work\n with Couchbase views in order to allow for complex JSON query\n operations.\n", "sees" : [ ], "authors" : [ "Juan Zacarias" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.zorba-xquery.com/modules/couchbase", "prefix" : "cb" }, { "uri" : "http://jsoniq.org/functions", "prefix" : "jn" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "connect", "qname" : "cb:connect", "signature" : "($options as object()) as xs:anyURI external", "description" : " Connect to the Couchbase server and return an opaque identifier\n representing the established connection.\n", "summary" : "

Connect to the Couchbase server and return an opaque identifier\n representing the established connection.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
a JSONiq object that contains the host, bucket, and user information.
" } ], "returns" : { "type" : "xs:anyURI", "description" : "an identifier for the established connection. Example: { \"host\": \"localhost:8091\", \"username\" : null, \"password\" : null, \"bucket\" : \"default\" } " }, "errors" : [ "cb:LCB0001 if the connection to the given host/bucket could not be established.", "cb:CB0001 if mandatory connection information is missing.", "cb:CB0007 if a given option is not supported." ] }, { "isDocumented" : true, "arity" : 4, "name" : "connect", "qname" : "cb:connect", "signature" : "($host as xs:string, $username as xs:string?, $password as xs:string?, $bucket as xs:string) as xs:anyURI", "description" : " Connect to the Couchbase server and return an opaque identifier\n representing the established connection.\n", "summary" : "

Connect to the Couchbase server and return an opaque identifier\n representing the established connection.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host", "type" : "xs:string", "occurrence" : null, "description" : "
address of the couchbase server (e.g. \"localhost:8091\")
" }, { "name" : "username", "type" : "xs:string", "occurrence" : "?", "description" : "
username used for the connection
" }, { "name" : "password", "type" : "xs:string", "occurrence" : "?", "description" : "
password used for the connection
" }, { "name" : "bucket", "type" : "xs:string", "occurrence" : null, "description" : "
name of the bucket to use (e.g. \"default\")
" } ], "returns" : { "type" : "xs:anyURI", "description" : "an identifier for the established connection." }, "errors" : [ "cb:LCB0001 if the connection to the given host/bucket could not be established." ] }, { "isDocumented" : true, "arity" : 3, "name" : "create-view", "qname" : "cb:create-view", "signature" : "($db as xs:anyURI, $doc-name as xs:string, $view-names as xs:string*) as xs:string* external", "description" : " Create a document/view.\n If the document already exists, it is replaced. A document can hold several\n views that must be specified in the same call of cb:create-view.\n", "summary" : "

Create a document/view.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "db", "type" : "xs:anyURI", "occurrence" : null, "description" : "
connection reference
" }, { "name" : "doc-name", "type" : "xs:string", "occurrence" : null, "description" : "
name of the document to create.
" }, { "name" : "view-names", "type" : "xs:string", "occurrence" : "*", "description" : "
names of the views to create in the document.
" } ], "returns" : { "type" : "xs:string*", "description" : "the names of the paths for the views that have been created." }, "errors" : [ "cb:LCB0002 if any error occurs in the communication with the server." ] }, { "isDocumented" : true, "arity" : 4, "name" : "create-view", "qname" : "cb:create-view", "signature" : "($db as xs:anyURI, $doc-name as xs:string, $view-names as xs:string*, $options as object()*) as xs:string* external", "description" : " Create a document/view.\n If the document already exists, it is replaced. A document can hold several\n views that must be specified in the same call of cb:create-view.\n", "summary" : "

Create a document/view.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "db", "type" : "xs:anyURI", "occurrence" : null, "description" : "
connection reference
" }, { "name" : "doc-name", "type" : "xs:string", "occurrence" : null, "description" : "
name of the document to create.
" }, { "name" : "view-names", "type" : "xs:string", "occurrence" : "*", "description" : "
names of the views to create in the document.
" }, { "name" : "options", "type" : "object()", "occurrence" : "*", "description" : "
options describing how to create the view.
" } ], "returns" : { "type" : "xs:string*", "description" : "the names of the paths for the views that have been created." }, "errors" : [ "cb:LCB0002 if any error occurs in the communication with the server.", "cb:CB0005 if the number of options doesn't match the number of view-names.", "cb:CB0007 if any of the options is not supported.", "cb:CB0010 if any of the given options has an invalid type." ] }, { "isDocumented" : true, "arity" : 2, "name" : "delete-view", "qname" : "cb:delete-view", "signature" : "($db as xs:anyURI, $doc as xs:string*) as xs:string* external", "description" : " Delete a document/view.\n If the document doesn't exists, function does nothing. All the views hold in the\n Document are deleted, this function can't delete single views.\n", "summary" : "

Delete a document/view.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "db", "type" : "xs:anyURI", "occurrence" : null, "description" : "
connection reference
" }, { "name" : "doc", "type" : "xs:string", "occurrence" : "*", "description" : "
-name name of the document to create.
" } ], "returns" : { "type" : "xs:string*", "description" : "empty sequence." }, "errors" : [ "cb:LCB0002 if any error occurs in the communication with the server." ] }, { "isDocumented" : true, "arity" : 1, "name" : "flush", "qname" : "cb:flush", "signature" : "($db as xs:anyURI) as empty-sequence() external", "description" : " Remove all key/value pairs from the cluster\n", "summary" : "

Remove all key/value pairs from the cluster\n

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "db", "type" : "xs:anyURI", "occurrence" : null, "description" : "
connection reference
" } ], "returns" : { "type" : "empty-sequence()", "description" : "a empty sequence." }, "errors" : [ "cb:LCB0002 if any error occurs in the communication with the server." ] }, { "isDocumented" : true, "arity" : 2, "name" : "get-binary", "qname" : "cb:get-binary", "signature" : "($db as xs:anyURI, $key as xs:string*) as xs:base64Binary* external", "description" : " Return the values of the given keys (type xs:string) as base64Binary.\n", "summary" : "

Return the values of the given keys (type xs:string) as base64Binary.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "db", "type" : "xs:anyURI", "occurrence" : null, "description" : "
connection reference
" }, { "name" : "key", "type" : "xs:string", "occurrence" : "*", "description" : "
the requested keys
" } ], "returns" : { "type" : "xs:base64Binary*", "description" : "a sequence of xs:base64Binary items for the given keys." }, "errors" : [ "cb:LCB0002 if any error occurs in the communication with the server." ] }, { "isDocumented" : true, "arity" : 3, "name" : "get-binary", "qname" : "cb:get-binary", "signature" : "($db as xs:anyURI, $key as xs:string*, $options as object()) as xs:base64Binary* external", "description" : " Return the values of the given keys (type xs:string) as base64Binary.\n", "summary" : "

Return the values of the given keys (type xs:string) as base64Binary.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "db", "type" : "xs:anyURI", "occurrence" : null, "description" : "
connection reference
" }, { "name" : "key", "type" : "xs:string", "occurrence" : "*", "description" : "
the requested keys
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
JSONiq object with additional options
" } ], "returns" : { "type" : "xs:base64Binary*", "description" : "a sequence of xs:base64Binary items for the given keys." }, "errors" : [ "cb:LCB0002 if any error occurs in the communication with the server.", "cb:CB0007 if any of the options is not supported.", "cb:CB0009 if the given expiration time is not an xs:integer." ] }, { "isDocumented" : true, "arity" : 2, "name" : "get-text", "qname" : "cb:get-text", "signature" : "($db as xs:anyURI, $key as xs:string*) as xs:string* external", "description" : " Return the values of the given keys (type xs:string) as string.\n", "summary" : "

Return the values of the given keys (type xs:string) as string.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "db", "type" : "xs:anyURI", "occurrence" : null, "description" : "
connection reference
" }, { "name" : "key", "type" : "xs:string", "occurrence" : "*", "description" : "
the requested keys
" } ], "returns" : { "type" : "xs:string*", "description" : "A sequence of string Items corresponding to the key" }, "errors" : [ "cb:LCB0002 if any error occurs in the communication with the server." ] }, { "isDocumented" : true, "arity" : 3, "name" : "get-text", "qname" : "cb:get-text", "signature" : "($db as xs:anyURI, $key as xs:string*, $options as object()) as xs:string* external", "description" : " Return the values of the given keys (type xs:string) as string.\n", "summary" : "

Return the values of the given keys (type xs:string) as string.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "db", "type" : "xs:anyURI", "occurrence" : null, "description" : "
connection reference
" }, { "name" : "key", "type" : "xs:string", "occurrence" : "*", "description" : "
the requested keys
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
JSONiq object with additional options
" } ], "returns" : { "type" : "xs:string*", "description" : "a sequence of strings for the given keys." }, "errors" : [ "cb:LCB0002 if any error occurs in the communication with the server.", "cb:CB0006 if the given encoding is not supported.", "cb:CB0007 if any of the options is not supported.", "cb:CB0009 if the given expiration time is not an xs:integer." ] }, { "isDocumented" : true, "arity" : 3, "name" : "put-binary", "qname" : "cb:put-binary", "signature" : "($db as xs:anyURI, $key as xs:string*, $value as xs:base64Binary*) as empty-sequence()", "description" : " Store the given key-value bindings.\n", "summary" : "

Store the given key-value bindings.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "db", "type" : "xs:anyURI", "occurrence" : null, "description" : "
connection reference
" }, { "name" : "key", "type" : "xs:string", "occurrence" : "*", "description" : "
the keys to store
" }, { "name" : "value", "type" : "xs:base64Binary", "occurrence" : "*", "description" : "
the values (as xs:base64binary) to be stored.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "a empty sequence." }, "errors" : [ "cb:LCB0002 if any error occurs in the communication with the server.", "cb:CB0005 if the number of keys doesn't match the number of values." ] }, { "isDocumented" : true, "arity" : 4, "name" : "put-binary", "qname" : "cb:put-binary", "signature" : "($db as xs:anyURI, $key as xs:string*, $value as xs:base64Binary*, $options as object()) as empty-sequence() external", "description" : " Store the given key-value bindings.\n", "summary" : "

Store the given key-value bindings.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "db", "type" : "xs:anyURI", "occurrence" : null, "description" : "
connection reference
" }, { "name" : "key", "type" : "xs:string", "occurrence" : "*", "description" : "
the keys to store
" }, { "name" : "value", "type" : "xs:base64Binary", "occurrence" : "*", "description" : "
the values (as xs:base64binary) to be stored.
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
JSONiq object with additional options
" } ], "returns" : { "type" : "empty-sequence()", "description" : "a empty sequence." }, "errors" : [ "cb:LCB0002 if any error occurs in the communication with the server.", "cb:CB0005 if the number of keys doesn't match the number of values.", "cb:CB0007 if any of the options is not supported.", "cb:CB0009 if the given expiration time is not an xs:integer.", "cb:CB0011 if the stored Variable was not stored" ] }, { "isDocumented" : true, "arity" : 3, "name" : "put-text", "qname" : "cb:put-text", "signature" : "($db as xs:anyURI, $key as xs:string*, $value as xs:string*) as empty-sequence()", "description" : " Store the given key-value bindings.\n The values are stored with the UTF-8 encoding and a default\n expiration time of 60 seconds.\n", "summary" : "

Store the given key-value bindings.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "db", "type" : "xs:anyURI", "occurrence" : null, "description" : "
connection reference
" }, { "name" : "key", "type" : "xs:string", "occurrence" : "*", "description" : "
the keys to store
" }, { "name" : "value", "type" : "xs:string", "occurrence" : "*", "description" : "
the values (as xs:string) to be stored.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "a empty sequence." }, "errors" : [ "cb:LCB0002 if any error occurs in the communication with the server.", "cb:CB0005 if the number of keys doesn't match the number of values." ] }, { "isDocumented" : true, "arity" : 4, "name" : "put-text", "qname" : "cb:put-text", "signature" : "($db as xs:anyURI, $key as xs:string*, $value as xs:string*, $options as object()) as empty-sequence() external", "description" : " Store the given key-value bindings.\n", "summary" : "

Store the given key-value bindings.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "db", "type" : "xs:anyURI", "occurrence" : null, "description" : "
connection reference
" }, { "name" : "key", "type" : "xs:string", "occurrence" : "*", "description" : "
the keys to store
" }, { "name" : "value", "type" : "xs:string", "occurrence" : "*", "description" : "
the values (as xs:string) to be stored.
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
JSONiq object with additional options
" } ], "returns" : { "type" : "empty-sequence()", "description" : "a empty sequence." }, "errors" : [ "cb:LCB0002 if any error occurs in the communication with the server.", "cb:CB0005 if the number of keys doesn't match the number of values.", "cb:CB0006 if the given encoding is not supported.", "cb:CB0007 if any of the options is not supported.", "cb:CB0009 if the given expiration time is not an xs:integer.", "cb:CB0011 if the stored Variable was not stored" ] }, { "isDocumented" : true, "arity" : 2, "name" : "remove", "qname" : "cb:remove", "signature" : "($db as xs:anyURI, $key as xs:string*) as empty-sequence() external", "description" : " Remove the values matching the given keys (xs:string) from the server.\n", "summary" : "

Remove the values matching the given keys (xs:string) from the server.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "db", "type" : "xs:anyURI", "occurrence" : null, "description" : "
connection reference
" }, { "name" : "key", "type" : "xs:string", "occurrence" : "*", "description" : "
the keys of the values that should be removed.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "a empty sequence." }, "errors" : [ "cb:LCB0002 if any error occurs in the communication with the server." ] }, { "isDocumented" : true, "arity" : 3, "name" : "touch", "qname" : "cb:touch", "signature" : "($db as xs:anyURI, $key as xs:string*, $exp-time as xs:integer) as empty-sequence() external", "description" : " Refresh the expiration time of the given keys.\n", "summary" : "

Refresh the expiration time of the given keys.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "db", "type" : "xs:anyURI", "occurrence" : null, "description" : "
connection reference
" }, { "name" : "key", "type" : "xs:string", "occurrence" : "*", "description" : "
the keys to touch
" }, { "name" : "exp-time", "type" : "xs:integer", "occurrence" : null, "description" : "
new expieration time in seconds
" } ], "returns" : { "type" : "empty-sequence()", "description" : "a empty sequence." }, "errors" : [ "cb:LCB0002 if any error occurs in the communication with the server." ] }, { "isDocumented" : true, "arity" : 2, "name" : "view", "qname" : "cb:view", "signature" : "($db as xs:anyURI, $path as xs:string*) as object()*", "description" : " Retrieve the content of existing views.\n", "summary" : "

Retrieve the content of existing views.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "db", "type" : "xs:anyURI", "occurrence" : null, "description" : "
connection reference
" }, { "name" : "path", "type" : "xs:string", "occurrence" : "*", "description" : "
contains the string of a view path (e.g. \"_design/test/_view/vies\").
" } ], "returns" : { "type" : "object()*", "description" : "a sequence of strings (as JSON) containing information of the views." }, "errors" : [ "cb:LCB0002 if any error occurs in the communication with the server." ] }, { "isDocumented" : true, "arity" : 3, "name" : "view", "qname" : "cb:view", "signature" : "($db as xs:anyURI, $path as xs:string*, $options as object()) as object()*", "description" : " Retrieve the content of existing views.\n", "summary" : "

Retrieve the content of existing views.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "db", "type" : "xs:anyURI", "occurrence" : null, "description" : "
connection reference
" }, { "name" : "path", "type" : "xs:string", "occurrence" : "*", "description" : "
contains the string of a view path (e.g. \"_design/test/_view/vies\").
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
JSONiq object with additional options
" } ], "returns" : { "type" : "object()*", "description" : "a sequence of strings (as JSON) containing information of the views." }, "errors" : [ "cb:LCB0002 if any error occurs in the communication with the server.", "cb:CB0007 if any of the options is not supported." ] } ], "variables" : [ ] }, "http://zorba.io/modules/excel/text" : { "ns" : "http://zorba.io/modules/excel/text", "description" : " This is a library module offering the same set of functions\n defined by Microsoft Excel, under Text and Data Functions.\n", "sees" : [ "Excel Documentation: Text Functions" ], "authors" : [ "Sorin Nasoi" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/excel/errors", "prefix" : "excel-err" }, { "uri" : "http://zorba.io/modules/excel/math", "prefix" : "excel-math" }, { "uri" : "http://zorba.io/modules/excel/text", "prefix" : "excel-text" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "asc", "qname" : "excel-text:asc", "signature" : "($text as xs:string) as xs:string", "description" : " Returns the given $text unchanged.\n", "summary" : "

Returns the given $text unchanged.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "text", "type" : "xs:string", "occurrence" : null, "description" : "
the time
" } ], "returns" : { "type" : "xs:string", "description" : "The given $text unchanged." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "char", "qname" : "excel-text:char", "signature" : "($number as xs:integer) as xs:string", "description" : " Returns the character specified by a certain codepoint.\n", "summary" : "

Returns the character specified by a certain codepoint.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:integer", "occurrence" : null, "description" : "
the codepoint.
" } ], "returns" : { "type" : "xs:string", "description" : "the character specified by a certain codepoint." }, "errors" : [ "excel-err:Value provided $number must be in range [1,255]." ] }, { "isDocumented" : true, "arity" : 1, "name" : "clean", "qname" : "excel-text:clean", "signature" : "($arg as xs:string?) as xs:string?", "description" : " Removes all nonprintable characters from text.\n", "summary" : "

Removes all nonprintable characters from text.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string.
" } ], "returns" : { "type" : "xs:string?", "description" : "Removes all nonprintable characters from text. The CLEAN function was designed. to remove the first 32 nonprinting characters in the 7-bit ASCII code (values 0 through 31) from text.

In the Unicode character set, there are additional nonprinting characters (values 127, 129, 141, 143, 144, and 157).

By itself, the CLEAN function does not remove these additional nonprinting characters." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "code", "qname" : "excel-text:code", "signature" : "($arg as xs:string) as xs:integer", "description" : " Returns a codepoint for the first character in a text string.\n", "summary" : "

Returns a codepoint for the first character in a text string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : null, "description" : "
the string.
" } ], "returns" : { "type" : "xs:integer", "description" : "A codepoint for the first character in a text string." }, "errors" : [ "excel-err:Value Provided $arg was empty." ] }, { "isDocumented" : true, "arity" : 1, "name" : "concatenate", "qname" : "excel-text:concatenate", "signature" : "($args as xs:anyAtomicType*) as xs:string", "description" : " Joins several text strings into one text string.\n", "summary" : "

Joins several text strings into one text string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "args", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
a sequence of strings.
" } ], "returns" : { "type" : "xs:string", "description" : "Joins several text strings into one text string." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "concatenate", "qname" : "excel-text:concatenate", "signature" : "($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:string", "description" : " Joins two text strings into one text string.\n", "summary" : "

Joins two text strings into one text string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the first string.
" }, { "name" : "arg2", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the second string.
" } ], "returns" : { "type" : "xs:string", "description" : "Joins two text strings into one text string." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "dollar", "qname" : "excel-text:dollar", "signature" : "($number as xs:decimal) as xs:string", "description" : " Converts a number to text format and applies a currency symbol. The number of\ndigits to the right of the decimal point is 2.\n", "summary" : "

Converts a number to text format and applies a currency symbol.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:decimal", "occurrence" : null, "description" : "
is the number.
" } ], "returns" : { "type" : "xs:string", "description" : "Converts a number to text format and applies a currency symbol. The number of digits to the right of the decimal point is 2." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "dollar", "qname" : "excel-text:dollar", "signature" : "($number as xs:decimal, $decimals as xs:decimal) as xs:string", "description" : " Converts a number to text format and applies a currency symbol.\n", "summary" : "

Converts a number to text format and applies a currency symbol.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:decimal", "occurrence" : null, "description" : "
is the number.
" }, { "name" : "decimals", "type" : "xs:decimal", "occurrence" : null, "description" : "
is the number of digits to the right of the decimal point.

If decimals is negative, number is rounded to the left of the decimal point.

" } ], "returns" : { "type" : "xs:string", "description" : "Converts a number to text format and applies a currency symbol." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "exact", "qname" : "excel-text:exact", "signature" : "($arg1 as xs:string, $arg2 as xs:string) as xs:boolean", "description" : " Compares two text strings and returns TRUE if they are exactly the same,\nFALSE otherwise. EXACT is case-sensitive but ignores formatting differences.\n", "summary" : "

Compares two text strings and returns TRUE if they are exactly the same,\nFALSE otherwise.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:string", "occurrence" : null, "description" : "
the first string.
" }, { "name" : "arg2", "type" : "xs:string", "occurrence" : null, "description" : "
the second string.
" } ], "returns" : { "type" : "xs:boolean", "description" : "Compares two text strings and returns TRUE if they are exactly the same, FALSE otherwise. EXACT is case-sensitive but ignores formatting differences." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "find", "qname" : "excel-text:find", "signature" : "($find_text as xs:string, $within_text as xs:string) as xs:integer?", "description" : " Locate one text string within a second text string, and return the number of the\n starting position of the first text string from the first character of the second text string.

\n The search is case sensitive.\n", "summary" : "

Locate one text string within a second text string, and return the number of the\n starting position of the first text string from the first character of the second text string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "find_text", "type" : "xs:string", "occurrence" : null, "description" : "
text you want to find.
" }, { "name" : "within_text", "type" : "xs:string", "occurrence" : null, "description" : "
text in which you want to search for $find_text.
" } ], "returns" : { "type" : "xs:integer?", "description" : "Locate one text string within a second text string, and return the number of the starting position of the first text string from the first character of the second text string.

The search is case sensitive." }, "errors" : [ "excel-err:Value the value is not greater than zero or is greater than the length of within_text.", "excel-err:Value value was not found." ] }, { "isDocumented" : true, "arity" : 3, "name" : "find", "qname" : "excel-text:find", "signature" : "($find_text as xs:string, $within_text as xs:string, $start_num as xs:integer) as xs:integer?", "description" : " Locate one text string within a second text string, and return the number of the\n starting position of the first text string from the first character of the second text string.

\n The search is case sensitive.\n", "summary" : "

Locate one text string within a second text string, and return the number of the\n starting position of the first text string from the first character of the second text string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "find_text", "type" : "xs:string", "occurrence" : null, "description" : "
text you want to find.
" }, { "name" : "within_text", "type" : "xs:string", "occurrence" : null, "description" : "
text in which you want to search for $find_text.
" }, { "name" : "start_num", "type" : "xs:integer", "occurrence" : null, "description" : "
specifies the character at which to start the search.
" } ], "returns" : { "type" : "xs:integer?", "description" : "Locate one text string within a second text string, and return the number of the starting position of the first text string from the first character of the second text string.

The search is case sensitive." }, "errors" : [ "excel-err:Value the value is not greater than zero or is greater than the length of within_text.", "excel-err:Value value was not found." ] }, { "isDocumented" : true, "arity" : 2, "name" : "fixed", "qname" : "excel-text:fixed", "signature" : "($number as xs:decimal, $decimals as xs:decimal) as xs:string", "description" : " Rounds a number to the specified number of decimals, formats the number in\n decimal format using a period and commas, and returns the result as text.\n", "summary" : "

Rounds a number to the specified number of decimals, formats the number in\n decimal format using a period and commas, and returns the result as text.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:decimal", "occurrence" : null, "description" : "
is the number you want to round and convert to text.
" }, { "name" : "decimals", "type" : "xs:decimal", "occurrence" : null, "description" : "
is the number of digits to the right of the decimal point.
" } ], "returns" : { "type" : "xs:string", "description" : "Rounds a number to the specified number of decimals, formats the number in decimal format using a period and commas, and returns the result as text." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "fixed", "qname" : "excel-text:fixed", "signature" : "($number as xs:decimal, $decimals as xs:decimal, $no_commas as xs:boolean) as xs:string", "description" : " Rounds a number to the specified number of decimals, formats the number in\ndecimal format using a period and commas, and returns the result as text.\n", "summary" : "

Rounds a number to the specified number of decimals, formats the number in\ndecimal format using a period and commas, and returns the result as text.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "number", "type" : "xs:decimal", "occurrence" : null, "description" : "
is the number you want to round and convert to text.
" }, { "name" : "decimals", "type" : "xs:decimal", "occurrence" : null, "description" : "
is the number of digits to the right of the decimal point.
" }, { "name" : "no_commas", "type" : "xs:boolean", "occurrence" : null, "description" : "
is a logical value that, if TRUE, prevents FIXED from including commas in the returned text.
" } ], "returns" : { "type" : "xs:string", "description" : "Rounds a number to the specified number of decimals, formats the number in decimal format using a period and commas, and returns the result as text." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "left", "qname" : "excel-text:left", "signature" : "($arg as xs:string) as xs:string", "description" : " Returns the first character in a text string.\n", "summary" : "

Returns the first character in a text string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : null, "description" : "
is the text string that contains the characters you want to extract.
" } ], "returns" : { "type" : "xs:string", "description" : "The first character in a text string." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "left", "qname" : "excel-text:left", "signature" : "($text as xs:string, $num_chars as xs:integer) as xs:string", "description" : " Returns the first character or characters in $text, based on the number of $num_chars you specify.\n", "summary" : "

Returns the first character or characters in $text, based on the number of $num_chars you specify.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "text", "type" : "xs:string", "occurrence" : null, "description" : "
is the text string that contains the characters you want to extract.
" }, { "name" : "num_chars", "type" : "xs:integer", "occurrence" : null, "description" : "
specifies the number of characters you want to extract.
" } ], "returns" : { "type" : "xs:string", "description" : "The first character or characters in $text, based on the number of $num_chars you specify." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "len", "qname" : "excel-text:len", "signature" : "($arg as xs:string?) as xs:integer", "description" : " Returns the number of characters in a text string.\n", "summary" : "

Returns the number of characters in a text string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string.
" } ], "returns" : { "type" : "xs:integer", "description" : "The number of characters in a text string." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "lower", "qname" : "excel-text:lower", "signature" : "($arg as xs:string?) as xs:string?", "description" : " Converts all uppercase letters in a text string to lowercase.\n", "summary" : "

Converts all uppercase letters in a text string to lowercase.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string.
" } ], "returns" : { "type" : "xs:string?", "description" : "Converts all uppercase letters in a text string to lowercase." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "mid", "qname" : "excel-text:mid", "signature" : "($text as xs:string?, $start_num as xs:integer, $num_chars as xs:integer) as xs:string?", "description" : " Returns a specific number of characters from a text string, starting at\nthe position you specify, based on the number of characters you specify.\n", "summary" : "

Returns a specific number of characters from a text string, starting at\nthe position you specify, based on the number of characters you specify.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "text", "type" : "xs:string", "occurrence" : "?", "description" : "
the text string containing the characters you want to extract.
" }, { "name" : "start_num", "type" : "xs:integer", "occurrence" : null, "description" : "
the position of the first character you want to extract in text. The first character in text has start_num 1, and so on.
" }, { "name" : "num_chars", "type" : "xs:integer", "occurrence" : null, "description" : "
the number of characters you want to return from text.
" } ], "returns" : { "type" : "xs:string?", "description" : "A specific number of characters from a text string, starting at the position you specify, based on the number of characters you specify." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "pad-integer-to-length", "qname" : "excel-text:pad-integer-to-length", "signature" : "($toPad as xs:anyAtomicType?, $padChar as xs:string, $length as xs:integer) as xs:string", "description" : " Returns $toPad appended with enough repetitions of $padChar to make its length $length, the characters are added before the string.\n", "summary" : "

Returns $toPad appended with enough repetitions of $padChar to make its length $length, the characters are added before the string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "toPad", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the value to be padded.
" }, { "name" : "padChar", "type" : "xs:string", "occurrence" : null, "description" : "
the character used for padding.
" }, { "name" : "length", "type" : "xs:integer", "occurrence" : null, "description" : "
the desired length.
" } ], "returns" : { "type" : "xs:string", "description" : "$toPad appended with enough repetitions of $padChar to make its length $length, the characters are added before the string." }, "errors" : [ "excel-err:Value if the length of the $toPad is greater than the desired length." ] }, { "isDocumented" : true, "arity" : 4, "name" : "replace", "qname" : "excel-text:replace", "signature" : "($old_text as xs:string?, $start_num as xs:integer, $num_chars as xs:integer, $new_text as xs:string) as xs:string", "description" : " Replaces part of a text string, based on the number of characters you specify, with a different text string.\n", "summary" : "

Replaces part of a text string, based on the number of characters you specify, with a different text string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "old_text", "type" : "xs:string", "occurrence" : "?", "description" : "
is text in which you want to replace some characters.
" }, { "name" : "start_num", "type" : "xs:integer", "occurrence" : null, "description" : "
the position of the character in old_text that you want to replace with new_text.
" }, { "name" : "num_chars", "type" : "xs:integer", "occurrence" : null, "description" : "
the number of characters in old_text that you want REPLACE to replace with new_text.
" }, { "name" : "new_text", "type" : "xs:string", "occurrence" : null, "description" : "
the text that will replace characters in old_text.
" } ], "returns" : { "type" : "xs:string", "description" : "Replaces part of a text string, based on the number of characters you specify, with a different text string." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "right", "qname" : "excel-text:right", "signature" : "($arg as xs:string) as xs:string", "description" : " Returns the last character in a text string.\n", "summary" : "

Returns the last character in a text string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : null, "description" : "
the text string containing the characters you want to extract.
" } ], "returns" : { "type" : "xs:string", "description" : "The last character in a text string." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "right", "qname" : "excel-text:right", "signature" : "($text as xs:string, $num_chars as xs:integer) as xs:string", "description" : " Returns the last character or characters in a text string, based on the number of characters you specify.\n", "summary" : "

Returns the last character or characters in a text string, based on the number of characters you specify.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "text", "type" : "xs:string", "occurrence" : null, "description" : "
the text string containing the characters you want to extract.
" }, { "name" : "num_chars", "type" : "xs:integer", "occurrence" : null, "description" : "
specifies the number of characters you want RIGHT to extract.
" } ], "returns" : { "type" : "xs:string", "description" : "The last character or characters in a text string, based on the number of characters you specify." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "search", "qname" : "excel-text:search", "signature" : "($find_text as xs:string, $within_text as xs:string) as xs:integer?", "description" : " Locate one text string within a second text string, and return the number of\n the starting position of the first text string from the first character of the\n second text string.

The search starts at position 1, and it is not case sensitive.\n", "summary" : "

Locate one text string within a second text string, and return the number of\n the starting position of the first text string from the first character of the\n second text string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "find_text", "type" : "xs:string", "occurrence" : null, "description" : "
text you want to find.
" }, { "name" : "within_text", "type" : "xs:string", "occurrence" : null, "description" : "
text in which you want to search for $find_text.
" } ], "returns" : { "type" : "xs:integer?", "description" : "Locate one text string within a second text string, and return the number of the starting position of the first text string from the first character of the second text string.

The search starts at position 1, and it is not case sensitive." }, "errors" : [ "excel-err:Value the value is not greater than zero or is greater than the length of within_text.", "excel-err:Value value was not found." ] }, { "isDocumented" : true, "arity" : 3, "name" : "search", "qname" : "excel-text:search", "signature" : "($find_text as xs:string, $within_text as xs:string, $start_num as xs:integer) as xs:integer?", "description" : " Locate one text string within a second text string, and return the number of\n the starting position of the first text string from the first character of the\n second text string.

The search starts at $start_num, and it is not case sensitive.\n", "summary" : "

Locate one text string within a second text string, and return the number of\n the starting position of the first text string from the first character of the\n second text string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "find_text", "type" : "xs:string", "occurrence" : null, "description" : "
text you want to find.
" }, { "name" : "within_text", "type" : "xs:string", "occurrence" : null, "description" : "
text in which you want to search for $find_text.
" }, { "name" : "start_num", "type" : "xs:integer", "occurrence" : null, "description" : "
the character number in within_text at which you want to start searching.
" } ], "returns" : { "type" : "xs:integer?", "description" : "Locate one text string within a second text string, and return the number of the starting position of the first text string from the first character of the second text string.

The search starts at $start_num, and it is not case sensitive." }, "errors" : [ "excel-err:Value the value is not greater than zero or is greater than the length of within_text.", "excel-err:Value value was not found." ] }, { "isDocumented" : true, "arity" : 3, "name" : "substitute", "qname" : "excel-text:substitute", "signature" : "($text as xs:string, $old_text as xs:string, $new_text as xs:string) as xs:string?", "description" : " Substitutes new_text for old_text in a text string. Every occurrence of old_text in text is changed to new_text.\n", "summary" : "

Substitutes new_text for old_text in a text string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "text", "type" : "xs:string", "occurrence" : null, "description" : "
the text or the reference to a cell containing text for which you want to substitute characters.
" }, { "name" : "old_text", "type" : "xs:string", "occurrence" : null, "description" : "
text you want to replace.
" }, { "name" : "new_text", "type" : "xs:string", "occurrence" : null, "description" : "
text you want to replace old_text with.
" } ], "returns" : { "type" : "xs:string?", "description" : "Substitutes new_text for old_text in a text string. Every occurrence of old_text in text is changed to new_text." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "substitute", "qname" : "excel-text:substitute", "signature" : "($text as xs:string, $old_text as xs:string, $new_text as xs:string, $instance_num as xs:integer?) as xs:string", "description" : " Substitutes new_text for old_text in a text string.\n", "summary" : "

Substitutes new_text for old_text in a text string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "text", "type" : "xs:string", "occurrence" : null, "description" : "
the text or the reference to a cell containing text for which you want to substitute characters.
" }, { "name" : "old_text", "type" : "xs:string", "occurrence" : null, "description" : "
text you want to replace.
" }, { "name" : "new_text", "type" : "xs:string", "occurrence" : null, "description" : "
text you want to replace old_text with.
" }, { "name" : "instance_num", "type" : "xs:integer", "occurrence" : "?", "description" : "
specifies which occurrence of old_text you want to replace with new_text.

Only that instance of old_text is replaced.

" } ], "returns" : { "type" : "xs:string", "description" : "Substitutes new_text for old_text in a text string.

Use SUBSTITUTE when you want to replace specific text in a text string; use REPLACE when you want to replace any text that occurs in a specific location in a text string." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "t", "qname" : "excel-text:t", "signature" : "($value as xs:anyAtomicType?) as xs:string", "description" : " Converts the $value to string.\n", "summary" : "

Converts the $value to string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the value
" } ], "returns" : { "type" : "xs:string", "description" : "Converts the $value to string." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "trim", "qname" : "excel-text:trim", "signature" : "($text as xs:string?) as xs:string?", "description" : " Removes all spaces from text except for single spaces between words.\n", "summary" : "

Removes all spaces from text except for single spaces between words.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "text", "type" : "xs:string", "occurrence" : "?", "description" : "
from which you want spaces removed.
" } ], "returns" : { "type" : "xs:string?", "description" : "Removes all spaces from text except for single spaces between words." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "upper", "qname" : "excel-text:upper", "signature" : "($text as xs:string?) as xs:string?", "description" : " Converts text to uppercase.\n", "summary" : "

Converts text to uppercase.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "text", "type" : "xs:string", "occurrence" : "?", "description" : "
text you want converted to uppercase.
" } ], "returns" : { "type" : "xs:string?", "description" : "Converts text to uppercase." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "value-except", "qname" : "excel-text:value-except", "signature" : "($arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType*) as xs:anyAtomicType*", "description" : " Returns the values in one sequence that do not appear in the second sequence in an implementation-defined order.\n", "summary" : "

Returns the values in one sequence that do not appear in the second sequence in an implementation-defined order.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the first sequence.
" }, { "name" : "arg2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the second sequence.
" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "The values in one sequence that do not appear in the second sequence in an implementation-defined order." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "value", "qname" : "excel-text:value", "signature" : "($arg as xs:anyAtomicType?) as xs:anyAtomicType?", "description" : " Converts a text string that represents a number to a number.\n", "summary" : "

Converts a text string that represents a number to a number.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the value.
" } ], "returns" : { "type" : "xs:anyAtomicType?", "description" : "Converts a text string that represents a number to a number." }, "errors" : [ "excel-err:Value provided value is not a number." ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/http/response" : { "ns" : "http://www.28msec.com/modules/http/response", "description" : " The Sausalito response module can be used to modify the HTTP response\n that will be send as a result of this request. For example, the\n set-content-type function can be used to set the Content-Type\n header and determine the encoding of data in the response.\n", "sees" : [ ], "authors" : [ "28msec" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.28msec.com/modules/http/response", "prefix" : "http" }, { "uri" : "http://www.w3.org/2010/xslt-xquery-serialization", "prefix" : "output" }, { "uri" : "http://www.28msec.com/modules/http/response", "prefix" : "resp" }, { "uri" : "http://zorba.io/modules/schema", "prefix" : "s" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "code-for-status", "qname" : "resp:code-for-status", "signature" : "($status as xs:QName) as xs:int", "description" : " Convert between the HTTP status code as QName and\n the integer value of that status code.\n", "summary" : "

Convert between the HTTP status code as QName and\n the integer value of that status code.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "status", "type" : "xs:QName", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:int", "description" : "the integer value of the given QName as xs:int" }, "errors" : [ "http:invalid-status if the given QName does not represent a valid http status code" ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-type-binary", "qname" : "resp:content-type-binary", "signature" : "($type as xs:string) as xs:boolean external", "description" : "

Test if a given content-type is a binary content-type. A\n content-type is considered to be binary if it's not a text\n content-type.

\n", "summary" : "

Test if a given content-type is a binary content-type.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to test.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the given content-type is a binary content-type, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-type-html", "qname" : "resp:content-type-html", "signature" : "($type as xs:string) as xs:boolean external", "description" : "

Test if a given content-type is a HTML content-type, i.e.\n the content-type is the string \"text/html\".

\n", "summary" : "

Test if a given content-type is a HTML content-type, i.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to test.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the given content-type is the HTML content-type, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-type-json", "qname" : "resp:content-type-json", "signature" : "($type as xs:string) as xs:boolean external", "description" : "

Test if a given content-type is a JSON content-type, i.e.\n the content-type is the string \"application/json\".

\n", "summary" : "

Test if a given content-type is a JSON content-type, i.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to test.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the given content-type is the JSON content-type, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-type-mixed-json-xml", "qname" : "resp:content-type-mixed-json-xml", "signature" : "($type as xs:string) as xs:boolean external", "description" : "

Test if a given content-type is a mixed JSON-XML content-type, i.e.\n the content-type is the string \"application/mixed-json-xml\".

\n", "summary" : "

Test if a given content-type is a mixed JSON-XML content-type, i.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to test.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the given content-type is a mixed JSON-XML content-type, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-type-text", "qname" : "resp:content-type-text", "signature" : "($type as xs:string) as xs:boolean external", "description" : "

Test if a given content-type is a text content-type.

\n

A text content-type starts with \"text/\" or contains either of\n the strings \"xml\" or \"json\".

\n", "summary" : "

Test if a given content-type is a text content-type.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to test.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the given content-type is a text content-type, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-type-xhtml", "qname" : "resp:content-type-xhtml", "signature" : "($type as xs:string) as xs:boolean external", "description" : "

Test if a given content-type is a XHTML content-type, i.e.\n the content-type is the string \"application/xhtml+xml\".

\n", "summary" : "

Test if a given content-type is a XHTML content-type, i.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to test.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the given content-type is the XHTML content-type, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-type-xml", "qname" : "resp:content-type-xml", "signature" : "($type as xs:string) as xs:boolean external", "description" : "

Test if a given content-type is a XML content-type

\n

A XML content-type is a content-type that is \"application/xml\"\n or ends : with the string \"+xml\".

\n", "summary" : "

Test if a given content-type is a XML content-type \n A XML content-type is a content-type that is \"application/xml\"\n or ends : with the string \"+xml\".

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to test.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the given content-type is a XML content-type, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "decode-binary", "qname" : "resp:decode-binary", "signature" : "() as xs:boolean external", "description" : "

Returns the boolean indiciating whether base64Binaries returned by\n this request will be decoded.

\n

The default if not modified using resp:set-decode-binary is false.

\n", "summary" : "

Returns the boolean indiciating whether base64Binaries returned by\n this request will be decoded.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "the said boolean value" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "message-for-status", "qname" : "resp:message-for-status", "signature" : "($status as xs:QName) as xs:string", "description" : " Convert between the HTTP status code as QName and\n the name/message of that status code.\n", "summary" : "

Convert between the HTTP status code as QName and\n the name/message of that status code.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "status", "type" : "xs:QName", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "the message of the given QName as xs:string" }, "errors" : [ "http:invalid-status if the given QName does not represent a valid http status code" ] }, { "isDocumented" : true, "arity" : 0, "name" : "serialization-parameters", "qname" : "resp:serialization-parameters", "signature" : "() as element(output:serialization-parameters)", "description" : "

Returns the serialization parameters that are currently\n active, i.e. the ones that will be used to serialize the result\n of this request.

\n

This will either be the default, the defaults set when\n calling resp:set-content-type(), or the ones set by\n resp:set-serialization-parameters().

\n", "summary" : "

Returns the serialization parameters that are currently\n active, i.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "element(output:serialization-parameters)", "description" : "the said serialization parameters" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "serializer-defaults-html", "qname" : "resp:serializer-defaults-html", "signature" : "() as element(*)*", "description" : "

Returns an element that can be used to specify the\n settings of serialization parameters for the HTML serialization\n method.

\n

The defaults are\n

\n

\n

For example, those defaults are used when setting\n the content-type to some HTML content-type (i.e. text/html).

\n", "summary" : "

Returns an element that can be used to specify the\n settings of serialization parameters for the HTML serialization\n method.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "element(*)*", "description" : "an element that can be used to specify the above serialization parameters." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "serializer-defaults-json-xml-hybrid", "qname" : "resp:serializer-defaults-json-xml-hybrid", "signature" : "() as element(output:serialization-parameters)", "description" : "

Returns an element that can be used to specify the\n settings of serialization parameters for the json-xml-hybrid\n serialization method.

\n

The defaults are\n

\n

\n

For example, those defaults are used when setting\n the content-type to application/mixed-json-xml.

\n", "summary" : "

Returns an element that can be used to specify the\n settings of serialization parameters for the json-xml-hybrid\n serialization method.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "element(output:serialization-parameters)", "description" : "an element that can be used to specify the above serialization parameters." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "serializer-defaults-json", "qname" : "resp:serializer-defaults-json", "signature" : "() as element(output:serialization-parameters)", "description" : "

Returns an element that can be used to specify the\n settings of serialization parameters for the json\n serialization method.

\n

The defaults are\n

\n

\n

For example, those defaults are used when setting\n the content-type to some JSON content-type (e.g. application/json).

\n", "summary" : "

Returns an element that can be used to specify the\n settings of serialization parameters for the json\n serialization method.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "element(output:serialization-parameters)", "description" : "an element that can be used to specify the above serialization parameters." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "serializer-defaults-text", "qname" : "resp:serializer-defaults-text", "signature" : "() as element(*)*", "description" : "

Returns an element that can be used to specify the\n settings of serialization parameters for the text serialization\n method.

\n

The only default used is\n

\n

\n

For example, this default is used when setting\n the content-type to some text content-type (e.g. text/plain).

\n", "summary" : "

Returns an element that can be used to specify the\n settings of serialization parameters for the text serialization\n method.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "element(*)*", "description" : "an element that can be used to specify the above serialization parameters." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "serializer-defaults-xhtml", "qname" : "resp:serializer-defaults-xhtml", "signature" : "() as element(*)*", "description" : "

Returns an element that can be used to specify the\n settings of serialization parameters for the XHTML serialization\n method.

\n

The defaults are\n

\n

\n

For example, those defaults are used when setting\n the content-type to some XHTML content-type (i.e. application/xhtml+xml).

\n", "summary" : "

Returns an element that can be used to specify the\n settings of serialization parameters for the XHTML serialization\n method.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "element(*)*", "description" : "an element that can be used to specify the above serialization parameters." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "serializer-defaults-xml", "qname" : "resp:serializer-defaults-xml", "signature" : "() as element(output:serialization-parameters)", "description" : "

Returns an element that can be used to specify the\n settings of serialization parameters for the XML serialization\n method.

\n

The defaults are\n

\n

\n

For example, those defaults are used when setting\n the content-type to some XML content-type (e.g. application/atom+xml).

\n", "summary" : "

Returns an element that can be used to specify the\n settings of serialization parameters for the XML serialization\n method.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "element(output:serialization-parameters)", "description" : "an element that can be used to specify the above serialization parameters." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "set-content-type", "qname" : "resp:set-content-type", "signature" : "($type as xs:string) as empty-sequence()", "description" : "

Sets the Content-Type header for the response.

\n

\n For example,\n resp:set-content-type(\"text/plain\") will cause the\n header\n Content-Type: text/plain to be added for the response.

\n

In addtion to setting the Content-Type header, the function also\n sets the serialization parameters to the default values for serialization\n method for the given content-type. For example, if the content-type is set to\n text/plain, the default serialization parameters for the text\n serialization method will be used. For application/atom+xml, the default\n serialization parameters for the XML serialization method will be used.

\n

The functions resp:content-type-text/xml/html/xhtml/binary may be used\n to figure out which serialization method will be used for a specific\n content-type.

\n

If the given content-type contains a charset declaration (e.g.\n resp:set-content-type(\"text/plain;charset=ISO-8859-1\")), the\n content of the response will be transcoded to the given encoding.

\n

The default serialization parameters set by this function can\n be overwritten using the resp:set-serialization-parameters() function.

\n", "summary" : "

Sets the Content-Type header for the response.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to be set
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function is sequential and returns the empty sequence" }, "errors" : [ "http:invalid-encoding if the given encoding is invalid or not supported." ] }, { "isDocumented" : true, "arity" : 2, "name" : "set-content-type", "qname" : "resp:set-content-type", "signature" : "($type as xs:string, $params as element(output:serialization-parameters)) as empty-sequence()", "description" : "

Sets the Content-Type header for the response.

\n

For example,\n resp:set-content-type(\"text/plain\") will cause the\n header\n Content-Type: text/plain to be added for the response.

\n

In addition to the content-type, the function also allows to\n specify the serialization method and parameters that will be used\n for serializing the result. For details about this parameter, please\n refer to resp:set-serialization-parameters().

\n

If the given content-type contains a charset declaration (e.g.\n resp:set-content-type(\"text/plain;charset=ISO-8859-1\")), the\n content of the response will be transcoded to the given encoding.\n If the serialization parameters also contain a charset declaration,\n the charset contained in the content-type will be used. to transcode\n the result.

\n", "summary" : "

Sets the Content-Type header for the response.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to be set
" }, { "name" : "params", "type" : "element(output:serialization-parameters)", "occurrence" : null, "description" : "
the serialization parameters that will be used for serialization the result.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function is sequential and returns the empty sequence" }, "errors" : [ "http:invalid-encoding if the given encoding is invalid or not supported." ] }, { "isDocumented" : true, "arity" : 1, "name" : "set-decode-binary", "qname" : "resp:set-decode-binary", "signature" : "($decode as xs:boolean) as empty-sequence() external", "description" : "

If this function is invoked with true, the result of the request\n will not be serialized. Instead, the result will be the binary values\n of any item that is of type xs:base64Binary. The values of all other\n items will not be part of the result.

\n

Please note that all serialization parameters which have been set using\n resp:set-serialization-parameters will be ignored. Also, the output encoding\n is ignored for binaries.

\n", "summary" : "

If this function is invoked with true, the result of the request\n will not be serialized.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "decode", "type" : "xs:boolean", "occurrence" : null, "description" : "
boolean value indicating whether base64Binaries should be decoded.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function is sequential and returns the empty sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "set-encoding", "qname" : "resp:set-encoding", "signature" : "($encoding as xs:string) as empty-sequence() external", "description" : "

The function sets the output encoding that will be\n used for the payload of the response.

\n

For example,\n resp:set-encoding(\"ISO-8859-1\") will cause the\n content in the response to be encoded using ISO-8859-1.

\n

Please note that the encoding only applies to textual data.\n It is not used if the function set-decode-binary()\n was invoked passing true as parameter.

\n", "summary" : "

The function sets the output encoding that will be\n used for the payload of the response.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "encoding", "type" : "xs:string", "occurrence" : null, "description" : "
the encoding to be used for the payload of the response.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function is sequential and returns the empty sequence" }, "errors" : [ "http:invalid-encoding if the given encoding is invalid or not supported." ] }, { "isDocumented" : true, "arity" : 2, "name" : "set-header-impl", "qname" : "resp:set-header-impl", "signature" : "($name as xs:string, $value as xs:string) as xs:string? external", "description" : "

Set an HTTP header in the response.

\n

This function is only used for internal purposes and should\n not be called by the user.

\n", "summary" : "

Set an HTTP header in the response.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the name for the header to set
" }, { "name" : "value", "type" : "xs:string", "occurrence" : null, "description" : "
the value for the header to set
" } ], "returns" : { "type" : "xs:string?", "description" : "the value of the header previously set or the empty sequence if no header has been set with the same name." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "set-header", "qname" : "resp:set-header", "signature" : "($name as xs:string, $value as xs:string) as xs:string?", "description" : "

Set a HTTP header in the response.

\n

If a header with the same name was already set, the\n value is overwritten and the function returns the old value. As defined\n in the HTTP specification, multiple headers with the same name\n can be combined into one header whose value is a comma-separated\n list of the values.

\n

The following headers must not be set using this function.\n Instead, other functions of this module should be used in order\n to implemented the required semantics:\n

\n

\n", "summary" : "

Set a HTTP header in the response.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the header to set
" }, { "name" : "value", "type" : "xs:string", "occurrence" : null, "description" : "
the value of the header to set `
" } ], "returns" : { "type" : "xs:string?", "description" : "the value of the header previously set or the empty sequence if no header has been set with the same name." }, "errors" : [ "resp:invalid-header-name if an invalid name is used for the header." ] }, { "isDocumented" : true, "arity" : 1, "name" : "set-redirect", "qname" : "resp:set-redirect", "signature" : "($url as xs:string) as empty-sequence()", "description" : " This function sets the HTTP 302 redirect status code in the response. As\n a result, a redirect to the URL given as parameter will be made.\n", "summary" : "

This function sets the HTTP 302 redirect status code in the response.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "url", "type" : "xs:string", "occurrence" : null, "description" : "
The URL to which the redirect will be made.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "The empty-sequence is returned." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "set-serialization-parameters", "qname" : "resp:set-serialization-parameters", "signature" : "($params as element(output:serialization-parameters)) as empty-sequence()", "description" : "

Set the serialization parameters used for serializing the result\n of the request.

\n

The following example shows how to set several options\n for the HTML serialization method. Specifically, it sets the\n HTML method to HTML 4.01, set the doctype-system and\n doctype-public makes sure that the output is indented. In addition,\n the output is UTF-8 encoded and\n

\n <output:serialization-parameters>\n   <output:encoding value=\"UTF-8\"/>\n   <output:doctype-system value=\"http://www.w3.org/TR/html4/loose.dtd\"/>\n   <output:doctype-public value=\"-//W3C//DTD HTML 4.01 Transitional//EN\"/>\n </output:serialization-parameters>\n 
\n

\n

The element passed as parameter need to be valid according\n to the schema http://www.w3.org/2010/xslt-xquery-serialization. This\n function validates its input (if it has not already been validated)\n and may raise an error if the input is not valid.

\n

Please note that serialization options set by this function can\n be overwritten by a subsequent call to resp:set-content-type. In this\n case, the options will be reset to the default for the given\n content-type. Also note, that the output encoding can be overwritten\n by subsequently calling the resp:set-encoding function.

\n", "summary" : "

Set the serialization parameters used for serializing the result\n of the request.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "params", "type" : "element(output:serialization-parameters)", "occurrence" : null, "description" : "
the serialization parameters that will be used to serialize the result of the request
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function is sequential and, on success, returns the empty sequence." }, "errors" : [ "err:XQDY0027 if the input is not valid according to the schema http://www.w3.org/2010/xslt-xquery-serialization.", "http:invalid-encoding if the encoding specified in the serialization options is invalid or not supported." ] }, { "isDocumented" : true, "arity" : 1, "name" : "set-status-code", "qname" : "resp:set-status-code", "signature" : "($status as xs:integer) as empty-sequence() external", "description" : "

Sets the status code of the HTTP response to the integer given as\n parameter.

\n For example,\n resp:set-status(204)\n will result in \"HTTP/1.1 204 No Content\".\n", "summary" : "

Sets the status code of the HTTP response to the integer given as\n parameter.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "status", "type" : "xs:integer", "occurrence" : null, "description" : "
The status code of the HTTP response as integer.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "On success, the empty-sequence is returned" }, "errors" : [ "http:invalid-status-code if the given integer does not reflect a valid HTTP status code" ] }, { "isDocumented" : true, "arity" : 1, "name" : "set-status", "qname" : "resp:set-status", "signature" : "($status as xs:QName) as empty-sequence()", "description" : "

Sets the status code of the HTTP response to the QName given as\n parameter.

\n For example,\n resp:set-status($http:no-content)\n will result in \"HTTP/1.1 204 No Content\".\n", "summary" : "

Sets the status code of the HTTP response to the QName given as\n parameter.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "status", "type" : "xs:QName", "occurrence" : null, "description" : "
The status code of the HTTP response as a QName (e.g. $http:no-content)
" } ], "returns" : { "type" : "empty-sequence()", "description" : "On success, the empty-sequence is returned" }, "errors" : [ "http:invalid-status if the given QName does not represent a valid HTTP status code;" ] }, { "isDocumented" : true, "arity" : 1, "name" : "valid-status", "qname" : "resp:valid-status", "signature" : "($status as xs:QName) as xs:boolean", "description" : " Test whether the given QName refers to a valid HTTP status code.\n", "summary" : "

Test whether the given QName refers to a valid HTTP status code.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "status", "type" : "xs:QName", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the given QName refers to a valid HTTP status code, false otherwise." }, "errors" : [ ] } ], "variables" : [ { "name" : "http:precondition-required", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 428 Precondition Required (RFC 6585)\n" }, { "name" : "http:gone", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 410 GONE\n" }, { "name" : "http:length-required", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 411 Length Required\n" }, { "name" : "http:precondition-failed", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 412 Precondition Failed\n" }, { "name" : "http:request-entity-too-large", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 413 Request Entity Too Large\n" }, { "name" : "http:request-entity-too-long", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 414 Request Entity Too Long\n" }, { "name" : "http:unsupported-media-type", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 415 Unsupported Media Type\n" }, { "name" : "http:request-range-not-satisfiable", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 416 Request Range Not Satisfiable\n" }, { "name" : "http:expectation-failed", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 417 Expectation Failed\n" }, { "name" : "http:im-a-teapot", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 418 I'm a teapot (RFC 2324)\n" }, { "name" : "http:enhance-your-calm", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 420 Enhance Your Calm\n" }, { "name" : "http:unprocessable-entity", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 422 Unprocessable Entity (WebDAV; RFC 4918)\n" }, { "name" : "http:locked", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 423 Locked (WebDAV; RFC 4918)\n" }, { "name" : "http:failed-dependency", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 424 Failed Dependency (WebDAV; RFC 4918)\n" }, { "name" : "http:unordered-collection", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 425 Unordered Collection\n" }, { "name" : "http:upgrade-required", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 426 Upgrade Required\n" }, { "name" : "http:conflict", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 409 Conflict\n" }, { "name" : "http:too-many-requests", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 429 Too Many Requests (RFC 6585)\n" }, { "name" : "http:request-header-fields-too-large", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 431 Request Header Fields Too Large (RFC 6585)\n" }, { "name" : "http:internal-server-error", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 500 Internal Server Error\n" }, { "name" : "http:not-implemented", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 501 Not Implemented\n" }, { "name" : "http:bad-gateway", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 502 Bad Gateway\n" }, { "name" : "http:service-unavailable", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 503 Service Unavailable\n" }, { "name" : "http:gateway-timeout", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 504 Gateway Timeout\n" }, { "name" : "http:http-version-not-supported", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 505 HTTP Version Not Supported\n" }, { "name" : "http:variant-also-negotiates", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 506 Variant Also Negotiates (RFC 2295)\n" }, { "name" : "http:insufficient-storage", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 507 Insufficient Storage (WebDAV; RFC 4918)\n" }, { "name" : "http:loop-detected", "type" : "xs:QName", "description" : " QName representing the HTTP status code 508 Loop Detected (webdav; rfc 5842)\n" }, { "name" : "http:not-extended", "type" : "xs:QName", "description" : " QName representing the HTTP status code 510 Not Extended (RFC 2774)\n" }, { "name" : "http:network-authentication-required", "type" : "xs:QName", "description" : " QName representing the HTTP status code 511 Network Authentication Required (RFC 6585)\n" }, { "name" : "resp:status-info", "type" : "item()*", "description" : " Variable containing a description for all the HTTP Status Codes\n" }, { "name" : "http:see-other", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 303 See Other\n" }, { "name" : "http:switching-protocols", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 101 Switching Protocols\n" }, { "name" : "http:processing", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 102 Processing (Web; RFC 2518)\n" }, { "name" : "http:ok", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 200 OK\n" }, { "name" : "http:created", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 201 Created\n" }, { "name" : "http:accepted", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 202 Accepted\n" }, { "name" : "http:non-authoritative", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 203 Non-Authoritative\n" }, { "name" : "http:no-content", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 204 No Content\n" }, { "name" : "http:reset-content", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 205 Reset Content\n" }, { "name" : "http:partial-content", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 206 Partial Content\n" }, { "name" : "http:multi-status", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 207 Multi-Status (WebDAV; RFC 5842)\n" }, { "name" : "http:already-reported", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 208 Already Reported (WebDAV; RFC 5842)\n" }, { "name" : "http:im-used", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 226 IM Used (RFC 3229)\n" }, { "name" : "http:multiple-choices", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 300 Multiple Choices\n" }, { "name" : "http:moved-permanently", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 301 Moved Permantently\n" }, { "name" : "http:found", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 302 Found\n" }, { "name" : "http:continue", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 100 Continue\n" }, { "name" : "http:not-modified", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 304 Not Modified\n" }, { "name" : "http:use-proxy", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 305 Use Proxy\n" }, { "name" : "http:switch-proxy", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 306 Switch Proxy\n" }, { "name" : "http:temporary-redirect", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 307 Temporary Redirect\n" }, { "name" : "http:permanent-redirect", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 308 Permanent Redirect (http://tools.ietf.org/html/draft-reschke-http-status-308-07)\n" }, { "name" : "http:bad-request", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 400 Bad Request\n" }, { "name" : "http:unauthorized", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 401 Unauthorized\n" }, { "name" : "http:payment-required", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 402 Payment Required\n" }, { "name" : "http:forbidden", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 403 Forbidden\n" }, { "name" : "http:not-found", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 404 Not Found\n" }, { "name" : "http:not-allowed", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 405 Not Allowed\n" }, { "name" : "http:not-acceptable", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 406 Not Acceptable\n" }, { "name" : "http:proxy-authentication-required", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 407 Proxy Authentication Required\n" }, { "name" : "http:request-timeout", "type" : "xs:QName", "description" : " QName representing the HTTP Status Code 408 Request Timeout\n" } ] }, "http://zorba.io/modules/uri" : { "ns" : "http://zorba.io/modules/uri", "description" : " This module provides functions for processing URIs and URLs.\n", "sees" : [ ], "authors" : [ "Matthias Brantner, Luis Rodriguez Gonzalez" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/uri", "prefix" : "uri" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/errors", "prefix" : "zerr" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "decode", "qname" : "uri:decode", "signature" : "($u as xs:string) as xs:string", "description" : " Percent-decodes (aka URL decoding) the given string.\n All percent encoded octets will be translated into their\n decoded UTF-8 representation.\n Please note that the percent encoding guarantees that a string\n consists of ASCII characters only. Passing a string that contains\n non-ASCII characters results in undefined behavior.\n", "summary" : "

Percent-decodes (aka URL decoding) the given string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "u", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "the percent decoded string" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "decode", "qname" : "uri:decode", "signature" : "($u as xs:string, $decode-plus as xs:boolean) as xs:string", "description" : " Percent-decodes (aka URL decoding) the given string.\n All percent encoded octets will be translated into their\n decoded UTF-8 representation.\n If $decode-plus is specified all occurrences of the char '+'\n will be replaced with a space ' ' before the percent decoding\n happens.\n Please note that the percent encoding guarantees that a string\n consists of ASCII characters only. Passing a string that contains\n non-ASCII characters results in undefined behavior.\n", "summary" : "

Percent-decodes (aka URL decoding) the given string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "u", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "decode-plus", "type" : "xs:boolean", "occurrence" : null, "description" : "
whether '+' chars will be replaced with spaces
" } ], "returns" : { "type" : "xs:string", "description" : "the percent decoded string" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "decode", "qname" : "uri:decode", "signature" : "($s as xs:string, $decode-plus as xs:boolean, $charset as xs:string) as xs:string external", "description" : " Percent-decodes (aka URL decoding) the given string.\n All percent encoded octets will be translated into their\n decoded UTF-8 representation.\n If $decode-plus is specified all occurrences of the char '+'\n will be replaced with a space ' ' before the percent decoding\n happens.\n The $charset parameter specifies the source charset after precent\n decoding. It is used to convert the decoded string into UTF-8.\n Please note that the percent encoding guarantees that a string\n consists of ASCII characters only. Passing a string that contains\n non-ASCII characters results in undefined behavior.\n", "summary" : "

Percent-decodes (aka URL decoding) the given string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "xs:string", "occurrence" : null, "description" : "
the string to decode
" }, { "name" : "decode-plus", "type" : "xs:boolean", "occurrence" : null, "description" : "
whether '+' chars will be replaced with spaces
" }, { "name" : "charset", "type" : "xs:string", "occurrence" : null, "description" : "
the source charset of the string after percent decoding
" } ], "returns" : { "type" : "xs:string", "description" : "the percent decoded string" }, "errors" : [ "uri:CHARSET_UNKNOWN if the given charset is unknown or not supported", "zerr:ZOSE0006 if there is an error transcoding the string" ] }, { "isDocumented" : true, "arity" : 1, "name" : "parse", "qname" : "uri:parse", "signature" : "($uri as xs:string) as object() external", "description" : " Parses the URI passed as string. The returned object\n contains only members with field names declared as constants in\n this module.\n For example,\n
\n let my-uri := \"http://www.my.project.com/a/b/c?user=john;pass=1234#profile\"\n return uri:parse(my-uri)\n 
\n returns\n
\n { \"squeme\" : \"http\", \"host\" : \"www.my.project.com\", \"path\" : \"/a/b/c\",\n   \"query\" : \"user=john;pass=123\", \"fragment\" : \"profile\" }\n 
\n", "summary" : "

Parses the URI passed as string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurrence" : null, "description" : "
the URI to parse
" } ], "returns" : { "type" : "object()", "description" : "the JSON object" }, "errors" : [ "err:XQST0046 if the URI is textually invalid" ] }, { "isDocumented" : true, "arity" : 1, "name" : "serialize", "qname" : "uri:serialize", "signature" : "($uri as object()) as xs:string external", "description" : " Serialize the URI passed as object into a string.\n", "summary" : "

Serialize the URI passed as object into a string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "object()", "occurrence" : null, "description" : "
the object representing the URI
" } ], "returns" : { "type" : "xs:string", "description" : "the URI as string" }, "errors" : [ "uri:OPAQUE_COMB_NOT_VALID if opaque part is specified in conjunction with host/port/path/user-info/query.", "uri:OPAQUE_WITHOUT_SCHEME if opaque part is present but no scheme is present.", "uri:INVALID_ABSOLUTE_PATH if a path component for an absolute URI doesn't start with \"/\"." ] } ], "variables" : [ { "name" : "uri:SCHEME", "type" : "xs:string", "description" : " Constant for the \"scheme\" part of a URI object.\n" }, { "name" : "uri:AUTHORITY", "type" : "xs:string", "description" : " Constant for the \"authority\" part of a URI object.\n" }, { "name" : "uri:USER-INFO", "type" : "xs:string", "description" : " Constant for the \"user-info\" part of a URI object.\n" }, { "name" : "uri:HOST", "type" : "xs:string", "description" : " Constant for the \"host\" part of a URI object.\n" }, { "name" : "uri:PORT", "type" : "xs:string", "description" : " Constant for the \"port\" part of a URI object.\n" }, { "name" : "uri:PATH", "type" : "xs:string", "description" : " Constant for the \"path\" part of a URI object.\n" }, { "name" : "uri:QUERY", "type" : "xs:string", "description" : " Constant for the \"query\" part of a URI object.\n" }, { "name" : "uri:FRAGMENT", "type" : "xs:string", "description" : " Constant for the \"fragment\" part of a URI object.\n" }, { "name" : "uri:OPAQUE-PART", "type" : "xs:string", "description" : " Constant for the \"opaque-part\" part of a URI object.\n If this is set in a URI object, then none of $uri:PATH, $uri:HOST,\n $uri:PORT, $uri:USER-INFO, or : $uri:QUERY may be specified.\n If this is set in a URI object, $uri:SCHEME must also be specified\n (ie, it must be an absolute URI).\n" } ] }, "http://xbrl.io/modules/bizql/profiles/sec/fiscal/core" : { "ns" : "http://xbrl.io/modules/bizql/profiles/sec/fiscal/core", "description" : "

This module provides functionality for querying fiscal reports (10-K, 10-Q)\n submitted to the SEC.

\n", "sees" : [ ], "authors" : [ "Charles Hoffman", "Matthias Brantner", "Dennis Knochenwefel", "Ghislain Fourny" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://xbrl.io/modules/bizql/archives", "prefix" : "archives" }, { "uri" : "http://xbrl.io/modules/bizql/profiles/sec/companies", "prefix" : "companies" }, { "uri" : "http://xbrl.io/modules/bizql/components", "prefix" : "components" }, { "uri" : "http://www.28msec.com/modules/credentials", "prefix" : "credentials" }, { "uri" : "http://xbrl.io/modules/bizql/facts", "prefix" : "facts" }, { "uri" : "http://xbrl.io/modules/bizql/profiles/sec/filings", "prefix" : "filings" }, { "uri" : "http://xbrl.io/modules/bizql/profiles/sec/fiscal/core", "prefix" : "fiscal-core" }, { "uri" : "http://jsoniq.org/function-library", "prefix" : "j" }, { "uri" : "http://www.28msec.com/modules/mongodb", "prefix" : "mongo" }, { "uri" : "http://xbrl.io/modules/bizql/profiles/sec/core", "prefix" : "sec" }, { "uri" : "http://xbrl.io/modules/bizql/profiles/sec/networks", "prefix" : "sec-networks" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 3, "name" : "balance-sheets-for-fiscal-periods-and-years", "qname" : "fiscal-core:balance-sheets-for-fiscal-periods-and-years", "signature" : "($entity-or-ids as item()*, $fiscal-period-focus as string*, $fiscal-year-focus as integer*) as object()*", "description" : "

Retrieves the balance sheet for the given entities and fiscal periods and years.

\n", "summary" : "

Retrieves the balance sheet for the given entities and fiscal periods and years.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "entity-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
a list of entities or their EIDs.
" }, { "name" : "fiscal-period-focus", "type" : "string", "occurrence" : "*", "description" : "
the periods (YTD1, YTD2, YTD3, Q1, Q2, Q3 or FY) or $fiscal-core:ALL_FISCAL_PERIODS to accept all.
" }, { "name" : "fiscal-year-focus", "type" : "integer", "occurrence" : "*", "description" : "
the years (2012) or $fiscal-core:ALL_FISCAL_YEARS to accept all.
" } ], "returns" : { "type" : "object()*", "description" : "the balance sheet at that date and for that formType." }, "errors" : [ "entities:INVALID_PARAMETER if the CIK or entity is not valid." ] }, { "isDocumented" : true, "arity" : 3, "name" : "facts-for-aspects-and-fiscal-periods-and-years", "qname" : "fiscal-core:facts-for-aspects-and-fiscal-periods-and-years", "signature" : "($aspects as object()?, $fiscal-period-focus as string*, $fiscal-year-focus as integer*) as object()*", "description" : "

Retrieves facts for the given aspects, fiscal periods and years.

\n", "summary" : "

Retrieves facts for the given aspects, fiscal periods and years.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "aspects", "type" : "object()", "occurrence" : "?", "description" : "
an object containing aspects to filter, among which xbrl:Concept, xbrl:Entity and xbrl:Period (all optional).
" }, { "name" : "fiscal-period-focus", "type" : "string", "occurrence" : "*", "description" : "
the periods (YTD1, YTD2, YTD3, Q1, Q2, Q3 or FY).
" }, { "name" : "fiscal-year-focus", "type" : "integer", "occurrence" : "*", "description" : "
the years (2012)
" } ], "returns" : { "type" : "object()*", "description" : "all facts matching the given aspects, fiscal period and year." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "facts-for-aspects-and-fiscal-periods-and-years", "qname" : "fiscal-core:facts-for-aspects-and-fiscal-periods-and-years", "signature" : "($aspects as object()?, $fiscal-period-focus as string*, $fiscal-year-focus as integer*, $options as object()?) as object()*", "description" : "

Retrieves facts for the given aspects, fiscal periods and years.

\n", "summary" : "

Retrieves facts for the given aspects, fiscal periods and years.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "aspects", "type" : "object()", "occurrence" : "?", "description" : "
an object containing aspects to filter, among which xbrl:Concept, xbrl:Entity and xbrl:Period (all optional).
" }, { "name" : "fiscal-period-focus", "type" : "string", "occurrence" : "*", "description" : "
the periods (YTD1, YTD2, YTD3, Q1, Q2, Q3 or FY) or $fiscal-core:ALL_FISCAL_PERIODS to accept all.
" }, { "name" : "fiscal-year-focus", "type" : "integer", "occurrence" : "*", "description" : "
the years (2012) or $fiscal-core:ALL_FISCAL_YEARS to accept all.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard SEC BizQL options.
" } ], "returns" : { "type" : "object()*", "description" : "all facts matching the given aspects, fiscal period and year." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "facts-for-entities-and-concepts-and-fiscal-periods-and-years", "qname" : "fiscal-core:facts-for-entities-and-concepts-and-fiscal-periods-and-years", "signature" : "($entities-or-ids as item()*, $concepts as string*, $fiscal-period-focus as string*, $fiscal-year-focus as integer*) as object()*", "description" : "

Retrieves facts for the given entities, concepts, fiscal periods and years.

\n", "summary" : "

Retrieves facts for the given entities, concepts, fiscal periods and years.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "entities-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
a list of entities or their EIDs.
" }, { "name" : "concepts", "type" : "string", "occurrence" : "*", "description" : "
a list of concept names (us-gaap:Assets)
" }, { "name" : "fiscal-period-focus", "type" : "string", "occurrence" : "*", "description" : "
the periods (YTD1, YTD2, YTD3, Q1, Q2, Q3 or FY) or $fiscal-core:ALL_FISCAL_PERIODS to accept all.
" }, { "name" : "fiscal-year-focus", "type" : "integer", "occurrence" : "*", "description" : "
the years (2012) or $fiscal-core:ALL_FISCAL_YEARS to accept all.
" } ], "returns" : { "type" : "object()*", "description" : "all facts matching entities, concepts, fiscal periods and years" }, "errors" : [ "entities:INVALID_PARAMETER if the CIK or entity is not valid." ] }, { "isDocumented" : true, "arity" : 5, "name" : "facts-for-entities-and-concepts-and-fiscal-periods-and-years", "qname" : "fiscal-core:facts-for-entities-and-concepts-and-fiscal-periods-and-years", "signature" : "($entities-or-ids as item()*, $concepts as string*, $fiscal-period-focus as string*, $fiscal-year-focus as integer*, $options as object()?) as object()*", "description" : "

Retrieves facts for the given entities, concepts, fiscal periods and years.

\n", "summary" : "

Retrieves facts for the given entities, concepts, fiscal periods and years.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "entities-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
a list of entities or their EIDs.
" }, { "name" : "concepts", "type" : "string", "occurrence" : "*", "description" : "
a list of concept names (us-gaap:Assets)
" }, { "name" : "fiscal-period-focus", "type" : "string", "occurrence" : "*", "description" : "
the periods (YTD1, YTD2, YTD3, Q1, Q2, Q3 or FY) or $fiscal-core:ALL_FISCAL_PERIODS to accept all.
" }, { "name" : "fiscal-year-focus", "type" : "integer", "occurrence" : "*", "description" : "
the years (2012) or $fiscal-core:ALL_FISCAL_YEARS to accept all.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard SEC BizQL options.
" } ], "returns" : { "type" : "object()*", "description" : "all facts matching entities, concepts, fiscal periods and years" }, "errors" : [ "entities:INVALID_PARAMETER if the CIK or entity is not valid." ] }, { "isDocumented" : true, "arity" : 3, "name" : "filings-for-entities-and-fiscal-periods-and-years", "qname" : "fiscal-core:filings-for-entities-and-fiscal-periods-and-years", "signature" : "($entities-or-ids as item()*, $fiscal-period-focus as string*, $fiscal-year-focus as integer*) as object()*", "description" : "

Retrieves all filings by entities and for given fiscal periods and years.

\n", "summary" : "

Retrieves all filings by entities and for given fiscal periods and years.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "entities-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
entities or their ids.
" }, { "name" : "fiscal-period-focus", "type" : "string", "occurrence" : "*", "description" : "
fiscal periods (FY, YTD1, YTD2, YTD3, Q1, Q2, Q3, Q4) or $fiscal-core:ALL_FISCAL_PERIODS to accept all..
" }, { "name" : "fiscal-year-focus", "type" : "integer", "occurrence" : "*", "description" : "
fiscal years or $fiscal-core:ALL_FISCAL_YEARS to accept all..
" } ], "returns" : { "type" : "object()*", "description" : "all filings that match the criteria." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "fiscal-period", "qname" : "fiscal-core:fiscal-period", "signature" : "($filing-fact-or-id as item()?) as string?", "description" : "

Retrieves the fiscal period of a filing or a fact.

\n", "summary" : "

Retrieves the fiscal period of a filing or a fact.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filing-fact-or-id", "type" : "item()", "occurrence" : "?", "description" : "
a filing, a fact, or its id.
" } ], "returns" : { "type" : "string?", "description" : "the fiscal period (FY, YTD2, YTD3, Q1, Q2 or Q3)." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "fiscal-year", "qname" : "fiscal-core:fiscal-year", "signature" : "($filing-fact-or-id as item()?) as integer?", "description" : "

Retrieves the fiscal year of a filing or a fact.

\n", "summary" : "

Retrieves the fiscal year of a filing or a fact.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filing-fact-or-id", "type" : "item()", "occurrence" : "?", "description" : "
a filing, a fact, or its id.
" } ], "returns" : { "type" : "integer?", "description" : "the fiscal year (e.g., 2012)." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "latest-reported-fiscal-period", "qname" : "fiscal-core:latest-reported-fiscal-period", "signature" : "($entity-or-id as item()) as object()*", "description" : "

Retrieves the latest reported fiscal period and year for the\n supplied entity.

\n", "summary" : "

Retrieves the latest reported fiscal period and year for the\n supplied entity.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "entity-or-id", "type" : "item()", "occurrence" : null, "description" : "
an entity or its EID.
" } ], "returns" : { "type" : "object()*", "description" : "an object with two fields: period and year." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "latest-reported-fiscal-period", "qname" : "fiscal-core:latest-reported-fiscal-period", "signature" : "($entity-or-id as item(), $type as string) as object()*", "description" : "

Retrieves the latest fiscal period and year for the\n supplied entity.

\n", "summary" : "

Retrieves the latest fiscal period and year for the\n supplied entity.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "entity-or-id", "type" : "item()", "occurrence" : null, "description" : "
an entity or its EID.
" }, { "name" : "type", "type" : "string", "occurrence" : null, "description" : "
10-K or 10-Q or FY, YTD1, YTD2, YTD3, Q1, Q2, or Q3.
" } ], "returns" : { "type" : "object()*", "description" : "an object with two fields: period and year." }, "errors" : [ ] } ], "variables" : [ { "name" : "fiscal-core:ALL_FISCAL_PERIODS", "type" : "string", "description" : " Joker for all fiscal periods.\n" }, { "name" : "fiscal-core:ALL_FISCAL_YEARS", "type" : "integer", "description" : " Joker for all fiscal years.\n" } ] }, "http://zorba.io/modules/base64" : { "ns" : "http://zorba.io/modules/base64", "description" : "

Base64 encoding and decoding.

\n", "sees" : [ ], "authors" : [ "Matthias Brantner" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/base64", "prefix" : "base64" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/errors", "prefix" : "zerr" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "decode", "qname" : "base64:decode", "signature" : "($base64 as base64Binary) as string external", "description" : "

Decode a base64Binary.

\n

The function assumes that the content after decoding is valid\n UTF-8.

\n", "summary" : "

Decode a base64Binary.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "base64", "type" : "base64Binary", "occurrence" : null, "description" : "
The base64Binary item to decode
" } ], "returns" : { "type" : "string", "description" : "the base64-decoded value as string" }, "errors" : [ "zerr:ZOSE0006 if $base64 contains invalid base-64 data." ] }, { "isDocumented" : true, "arity" : 2, "name" : "decode", "qname" : "base64:decode", "signature" : "($base64 as base64Binary, $encoding as string) as string external", "description" : "

Decode a base64Binary.

\n

The function assumes that the content after decoding has\n the given encoding.

\n", "summary" : "

Decode a base64Binary.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "base64", "type" : "base64Binary", "occurrence" : null, "description" : "
The base64Binary item to decode
" }, { "name" : "encoding", "type" : "string", "occurrence" : null, "description" : "
The encoding of the string after base64-decoding it. The encoding parameter is case insensitive.
" } ], "returns" : { "type" : "string", "description" : "the base64-decoded value as a string" }, "errors" : [ "zerr:ZXQP0006 if the given encoding is invalid or not supported. \"ASCII\" and \"UTF-8\" are guaranteed to be supported; other encodings may be supported depending on the installation.", "zerr:ZOSE0006 if $base64 contains invalid base-64 data." ] }, { "isDocumented" : true, "arity" : 1, "name" : "encode", "qname" : "base64:encode", "signature" : "($string as string) as base64Binary external", "description" : "

Encode a string as base64Binary.

\n", "summary" : "

Encode a string as base64Binary.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "string", "type" : "string", "occurrence" : null, "description" : "
The item whose string-value should be encoded
" } ], "returns" : { "type" : "base64Binary", "description" : "the base64-encoded string-value of the item parameter" }, "errors" : [ ] } ], "variables" : [ ] }, "http://xbrl.io/modules/bizql/networks" : { "ns" : "http://xbrl.io/modules/bizql/networks", "description" : "

This module provides functionality for handling networks.

\n

A network is a graph of concepts and resources, of which the edges\n share the same semantics.

\n

There are several kinds of networks.\n A network can be a tree or a DAG of concepts. It can be a bipartite\n graph mapping concepts to resources.

\n

XBRL defines a number of standard networks: presentation, calculation,\n definition (essence-alias, general-special, requires-element, similar-tuples, domain-member),\n and label networks.

\n

With this module, you can retrieve the networks contained in a component, and you\n can retrieve a standard XBRL network with the provided short names.

\n", "sees" : [ ], "authors" : [ "Charles Hoffman", "Matthias Brantner", "Dennis Knochenwefel", "Ghislain Fourny" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://xbrl.io/modules/bizql/components", "prefix" : "components" }, { "uri" : "http://xbrl.io/modules/bizql/networks", "prefix" : "networks" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "networks-for-components-and-short-names", "qname" : "networks:networks-for-components-and-short-names", "signature" : "($components as item()*, $short-name as string*) as object()*", "description" : "

Retrieves the standardized networks in the supplied components with the given short names.

\n", "summary" : "

Retrieves the standardized networks in the supplied components with the given short names.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "components", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of components.
" }, { "name" : "short-name", "type" : "string", "occurrence" : "*", "description" : "
the short names of the networks.
" } ], "returns" : { "type" : "object()*", "description" : "the standardized networks with these short names." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "networks-for-components", "qname" : "networks:networks-for-components", "signature" : "($components as item()*) as object()*", "description" : "

Retrieves all networks in the supplied components.

\n", "summary" : "

Retrieves all networks in the supplied components.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "components", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of components.
" } ], "returns" : { "type" : "object()*", "description" : "all networks." }, "errors" : [ ] } ], "variables" : [ { "name" : "networks:PRESENTATION_NETWORK", "type" : "xs:string", "description" : " Short name of the presentation network.\n" }, { "name" : "networks:CALCULATION_NETWORK", "type" : "xs:string", "description" : " Short name of the calculation network.\n" }, { "name" : "networks:ESSENCE_ALIAS_NETWORK", "type" : "xs:string", "description" : " Short name of the essence-alias definition network.\n" }, { "name" : "networks:GENERAL_SPECIAL_NETWORK", "type" : "xs:string", "description" : " Short name of the general-special definition network.\n" }, { "name" : "networks:REQUIRES_ELEMENT_NETWORK", "type" : "xs:string", "description" : " Short name of the requires-element definition network.\n" }, { "name" : "networks:SIMILAR_TUPLES_NETWORK", "type" : "xs:string", "description" : " Short name of the similar-tuples definition network.\n" }, { "name" : "networks:DOMAIN_MEMBER_NETWORK", "type" : "xs:string", "description" : " Short name of the domain-member definition network.\n" } ] }, "http://jsound.io/modules/validate/map" : { "ns" : "http://jsound.io/modules/validate/map", "description" : " Map utility\n", "sees" : [ ], "authors" : [ "Chris Hillery, Cezar Andrei" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://jsound.io/modules/validate/map", "prefix" : "map" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "get", "qname" : "map:get", "signature" : "($map as object(), $key as string) as item()", "description" : " Returns the value under the key.\n", "summary" : "

Returns the value under the key.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "map", "type" : "object()", "occurrence" : null, "description" : "
the map JSON object
" }, { "name" : "key", "type" : "string", "occurrence" : null, "description" : "
the key
" } ], "returns" : { "type" : "item()", "description" : "the value under the $key, () if empty Example:" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "has-key", "qname" : "map:has-key", "signature" : "($map as object(), $key as string) as boolean", "description" : " Returns true if $key exists in the map.\n", "summary" : "

Returns true if $key exists in the map.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "map", "type" : "object()", "occurrence" : null, "description" : "
the map JSON object
" }, { "name" : "key", "type" : "string", "occurrence" : null, "description" : "
the key
" } ], "returns" : { "type" : "boolean", "description" : "true if $key exists, false otherwise Example:" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "set-if-empty", "qname" : "map:set-if-empty", "signature" : "($map as object(), $key as xs:string, $value as item()) as boolean", "description" : " Only if key doesn't exist, inserts new key and value into the map and\n returns true. Otherwise returns false.\n", "summary" : "

Only if key doesn't exist, inserts new key and value into the map and\n returns true.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "map", "type" : "object()", "occurrence" : null, "description" : "
the map JSON object
" }, { "name" : "key", "type" : "xs:string", "occurrence" : null, "description" : "
the key
" }, { "name" : "value", "type" : "item()", "occurrence" : null, "description" : "
the value
" } ], "returns" : { "type" : "boolean", "description" : "true if $key is empty, false otherwise Example:" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "set", "qname" : "map:set", "signature" : "($map as object(), $key as xs:string, $value as item()) as boolean", "description" : " Inserts new key and value into the map or replaces value under the exiting key.\n Returns true all the time.\n", "summary" : "

Inserts new key and value into the map or replaces value under the exiting key.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "map", "type" : "object()", "occurrence" : null, "description" : "
the map JSON object
" }, { "name" : "key", "type" : "xs:string", "occurrence" : null, "description" : "
the key
" }, { "name" : "value", "type" : "item()", "occurrence" : null, "description" : "
the value
" } ], "returns" : { "type" : "boolean", "description" : "true Example:" }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/xml" : { "ns" : "http://zorba.io/modules/xml", "description" : "

\n This module provides functions for reading XML files from string inputs.\n It allows reading of well-formed XML documents as well as well-formed\n external parsed entities, described by\n XML 1.0 Well-Formed\n Parsed Entities. The functions can also perform Schema and DTD\n validation of the input documents.\n

\n

The following example parses a sequence of XML elements and returns\n them in a streaming fashion - each at a time:

\n
\n import module namespace x = \"http://zorba.io/modules/xml\";\n import schema namespace opt = \"http://zorba.io/modules/xml-options\";\n x:parse(\n   \"<from1>Jani</from1><from2>Jani</from2><from3>Jani</from3>\",\n   <opt:options>\n     <opt:parse-external-parsed-entity/>\n   </opt:options>\n )\n 
\n

Another useful option allows to skip an arbitrary number of levels\n before returning a sequence of nodes as shown in the following example:

\n
\n import module namespace x = \"http://zorba.io/modules/xml\";\n import schema namespace opt = \"http://zorba.io/modules/xml-options\";\n x:parse(\n   \"<root>\n     <from1>Jani1</from1>\n     <from2>Jani2</from2>\n     <from3>Jani3</from3>\n   </root>\",\n   <opt:options>\n     <opt:parse-external-parsed-entity opt:skip-root-nodes=\"1\"/>\n   </opt:options>\n )\n 
\n", "sees" : [ "XML 1.0 Well-Formed Parsed Entities", " fn:parse-xml() function in XPath and XQuery Functions and Operators 3.0", "LibXml2 parser" ], "authors" : [ "Nicolae Brinza, Juan Zacarias" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.w3.org/xqt-errors", "prefix" : "err" }, { "uri" : "http://zorba.io/modules/xml-options", "prefix" : "opt" }, { "uri" : "http://zorba.io/modules/schema", "prefix" : "schema" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/modules/xml", "prefix" : "x" }, { "uri" : "http://zorba.io/errors", "prefix" : "zerr" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "canonicalize", "qname" : "x:canonicalize", "signature" : "($xml-string as xs:string) as xs:string", "description" : "

A function to canonicalize the given XML string, that is, transform\n it into Canonical XML as defined by Canonical XML.

\n

Note: This function is not streamable. If a streamable string is used\n as input for the function it will be materialized.

\n

Note: This function sets the\n XML_PARSE_NOERROR\n option when parsing the XML input.

\n", "summary" : "

A function to canonicalize the given XML string, that is, transform\n it into Canonical XML as defined by Canonical XML .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "xml-string", "type" : "xs:string", "occurrence" : null, "description" : "
a string representation of a well formed XML to canonicalize. XML fragments are not allowed.
" } ], "returns" : { "type" : "xs:string", "description" : "the canonicalized XML string." }, "errors" : [ "err:CANO0001 invalid input." ] }, { "isDocumented" : true, "arity" : 2, "name" : "canonicalize", "qname" : "x:canonicalize", "signature" : "($xml-string as xs:string, $options as element(opt:options)) as xs:string", "description" : "

A function to canonicalize the given XML string, that is, transform\n it into Canonical XML as defined by Canonical XML.

\n

This version of the function allows specifying certain options to be\n used when initially parsing the XML string. These are of the same form\n as the options to x:parse#2(), although the following options are\n currently ignored for this function:\n

\n

\n

Note: This function is not streamable, if a streamable string is used\n as input for the function it will be materialized.

\n

Note: This function sets the\n XML_PARSE_NOERROR\n option when parsing the XML input.

\n", "summary" : "

A function to canonicalize the given XML string, that is, transform\n it into Canonical XML as defined by Canonical XML .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "xml-string", "type" : "xs:string", "occurrence" : null, "description" : "
a string representation of a well formed XML to canonicalize. XML fragments are not allowed.
" }, { "name" : "options", "type" : "element(opt:options)", "occurrence" : null, "description" : "
an XML containg options for the canonicalize function.
" } ], "returns" : { "type" : "xs:string", "description" : "the canonicalized XML string." }, "errors" : [ "err:CANO0001 invalid input." ] }, { "isDocumented" : true, "arity" : 2, "name" : "parse", "qname" : "x:parse", "signature" : "($xml-string as xs:string?, $options as element(opt:options)?) as node()* external", "description" : "

A function to parse XML files and fragments (i.e.\n external general parsed\n entities).

\n

The functions takes two arguments: the first one is the\n string to be parsed and the second argument is an <options/> element that\n passes a list of options to the parsing function. They are described below.\n The options element must conform to the xml-options:options element type\n from the xml-options.xsd schema. Some of these\n will be passed to the underlying library (LibXml2) and further documentation\n for them can be found at \n LibXml2 parser.

\n The list of available options:\n \n

\n An example that sets the base-uri of the parsed external entities:\n

\n
\n   import module namespace x = \"http://zorba.io/modules/xml\";\n   import schema namespace opt = \"http://zorba.io/modules/xml-options\";\n   x:parse(\"<from1>Jani</from1><from2>Jani</from2><from3>Jani</from3>\",\n     <opt:options>\n       <opt:base-uri opt:value=\"urn:test\"/>\n       <opt:parse-external-parsed-entity/>\n     </opt:options>\n   )\n 
\n", "summary" : "

A function to parse XML files and fragments (i.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "xml-string", "type" : "xs:string", "occurrence" : "?", "description" : "
The string that holds the XML to be parsed. If empty, the function will return an empty sequence
" }, { "name" : "options", "type" : "element(opt:options)", "occurrence" : "?", "description" : "
The options for the parsing
" } ], "returns" : { "type" : "node()*", "description" : "The parsed XML as a document node or a list of nodes, or an empty sequence." }, "errors" : [ "zerr:ZXQD0003 The error will be raised if the options to the function are inconsistent.", "err:FODC0006 The error will be raised if the input string is not a valid XML document or fragment (external general parsed entity) or if DTD validation was enabled and the document has not passed it.", "err:XQDY0027 The error will be raised if schema validation was enabled and the input document has not passed it or if the parsing options are not conformant to the xml-options.xsd schema." ] } ], "variables" : [ ] }, "http://www.zorba-xquery.com/modules/process" : { "ns" : "http://www.zorba-xquery.com/modules/process", "description" : " This module provides functions to create a native process and return the result\n (i.e. exit code, result on standard out and error).\n

\n Example:\n

\n  import module namespace proc = \"http://www.zorba-xquery.com/modules/process\";\n  proc:exec(\"ls\")\n
\n

\n

\n Potential result:\n

\n <result xmlns=\"http://www.zorba-xquery.com/modules/process\">\n   <stdout>myfile.txt</stout>\n   <stderr/>\n   <exit-code>0</exit-code>\n </result>\n 
\n

\n", "sees" : [ ], "authors" : [ "Cezar Andrei" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.zorba-xquery.com/modules/process", "prefix" : "process" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "exec", "qname" : "process:exec", "signature" : "($cmd as xs:string) as element(process:result) external", "description" : " Executes the specified string command in a separate process.\n This function does not allow arguments to be passed to\n the command.\n", "summary" : "

Executes the specified string command in a separate process.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "cmd", "type" : "xs:string", "occurrence" : null, "description" : "
command to be executed (without arguments)
" } ], "returns" : { "type" : "element(process:result)", "description" : "the result of the execution as an element as shown in the documentation of this module. The exit-code element returns the exit code of the child process. For POSIX compliant platforms: returns the process exit code. If process is terminated or stopped: 128 + termination signal code. For Windows platforms: returns the return value of the process or the exit or terminate process specified value." }, "errors" : [ "process:PROC01 if an error occurred while communicating with the executed process." ] }, { "isDocumented" : true, "arity" : 2, "name" : "exec", "qname" : "process:exec", "signature" : "($cmd as xs:string, $args as xs:string*) as element(process:result) external", "description" : " Executes the specified string command in a separate process.\n Each of the strings in the sequence passed in as the second\n argument is passed as an argument to the executed command.\n", "summary" : "

Executes the specified string command in a separate process.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "cmd", "type" : "xs:string", "occurrence" : null, "description" : "
command to be executed (without arguments)
" }, { "name" : "args", "type" : "xs:string", "occurrence" : "*", "description" : "
the arguments passed to the executed command (e.g. \"-la\")
" } ], "returns" : { "type" : "element(process:result)", "description" : "the result of the execution as an element as shown in the documentation of this module. The exit-code element returns the exit code of the child process. For POSIX compliant platforms: returns the process exit code. If process is terminated or stopped: 128 + termination signal code. For Windows platforms: returns the return value of the process or the exit or terminate process specified value." }, "errors" : [ "process:PROC01 if an error occurred while communicating with the executed process." ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/maps" : { "ns" : "http://www.28msec.com/modules/maps", "description" : "

This module defines a set of functions for working with maps. A map\n is identified by a string and can be created using the map:create function\n and dropped using the map:drop function.

\n

It is possible to create persistent and transient maps. The lifetime of a\n transient map is limited by the execution of the current query.\n A persistent map lives until it is explicitly dropped.\n Accordingly, it is also available to other requests.

\n

For example,\n

map:create(\"my-map\", [\"string\", \"integer\"], { \"persistent\" : false })
\n will create a transient map named my-map having two keys.\n The types of the keys are string and integer.\n

\n

The key of a particular entry in the map can consist of a tuple of\n atomic values (called key attributes). The actual type of each attribute\n is determined when the map is created. The value of each entry is a\n sequence of items. If an item in this sequence is a object or array,\n this item needs to belong to a collection, otherwise, an error is raised.

\n

For every persistent map, 28.io will create a new collection\n in your MongoDB database. The collection will have the prefix _28.map.\n For example, if your map is called foo, the according collection will\n be named _28.map.foo.

\n", "sees" : [ ], "authors" : [ "28msec" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.28msec.com/modules/maps", "prefix" : "map" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/errors", "prefix" : "zerr" } ], "functions" : [ { "isDocumented" : true, "arity" : 0, "name" : "available-maps", "qname" : "map:available-maps", "signature" : "() as string* external", "description" : " The function returns a sequence of names of the maps that are\n available (persistent and non-persistent). The sequence will be\n empty if there are no maps.\n", "summary" : "

The function returns a sequence of names of the maps that are\n available (persistent and non-persistent).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "string*", "description" : "A sequence of string, one for each available map, or an emtpy sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "create", "qname" : "map:create", "signature" : "($name as string, $key-types as item()) as empty-sequence() external", "description" : " Create a persistent map with a given name and type identifiers for the key\n attributes.\n If the map has only one key attribute, a single type identifier is given,\n for more than one key attribute an array of type identifiers is given.\n Calling this function is equivalent to calling create with the options\n
{ \"persistent\" : true }
\n Note that the function is sequential and immediately creates the map.\n

Each key-type should be specified as string (e.g. \"integer\",\n \"string\", \"boolean\", \"double\", or \"datetime\").

\n

For example,\n

map:create(\"my-map\", \"string\")
or\n
map:create(\"my-map\", [\"string\", \"integer\"])
.

\n", "summary" : "

Create a persistent map with a given name and type identifiers for the key\n attributes.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "string", "occurrence" : null, "description" : "
the name of the map (the restrictons on collection names apply)
" }, { "name" : "key-types", "type" : "item()", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function is sequential and immediately creates the corresponding map. It returns the empty-sequence." }, "errors" : [ "err:XPTY0004 if any of the key attribute types is not a subtype of anyAtomicType.", "zerr:ZSTR0001 if a map with the given name already exists.", "zerr:ZDDY1000 if the given name is not a legal collection name", "zerr:ZDDY0043 if any of the given options has an invalid type" ] }, { "isDocumented" : true, "arity" : 3, "name" : "create", "qname" : "map:create", "signature" : "($name as string, $key-types as item(), $options as object()) as empty-sequence() external", "description" : " Create a map with a given name, type identifiers for the key attributes, and\n options.\n If the map has only one key attribute, a single type identifier is given,\n for more than one key attribute an array of type identifiers is given.\n Currently only one option is supported: To create a transient map the object\n { \"persistent\" : false }\n has to be passed to the $options parameter.\n Note that the function is sequential and immediately creates the map in the\n store.\n", "summary" : "

Create a map with a given name, type identifiers for the key attributes, and\n options.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "string", "occurrence" : null, "description" : "
the name of the map (the restrictons on collection names apply)
" }, { "name" : "key-types", "type" : "item()", "occurrence" : null, "description" : "" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
an object describing options for the map
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function is sequential and immediately creates the corresponding map but returns the empty-sequence." }, "errors" : [ "err:XPTY0004 if any of the attribute types is not a subtype of anyAtomicType.", "zerr:ZSTR0001 if a map with the given name already exists.", "zerr:ZDDY1000 if the given name is not a legal collection name", "zerr:ZDDY0043 if any of the given options has an invalid type" ] }, { "isDocumented" : true, "arity" : 2, "name" : "delete", "qname" : "map:delete", "signature" : "($name as string, $key as item()) as empty-sequence() external", "description" : " Removes an entry identified by the given key from the map.\n If the map has only one key attribute, a single key value is given, for\n more than one key attribute an array of key values is given.\n Note that it is possible to insert entries with empty key attributes.\n However as the removing the entries is based on the \"eq\" comparison and\n as \"eq\" with an empty sequence always return false, it is not possible\n to delete these entries.\n", "summary" : "

Removes an entry identified by the given key from the map.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "string", "occurrence" : null, "description" : "
the name of the map
" }, { "name" : "key", "type" : "item()", "occurrence" : null, "description" : "
either a single attribute key or an array of keys
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function is sequential and immediately deletes the entry into the map but returns the empty-sequence." }, "errors" : [ "zerr:ZDDY0023 if a map with the given name does not exist.", "zerr:ZDDY0025 if the given number of key attributes does not match the number of key attributes specified when creating the map (see the map:create function).", "zerr:ZXQD0005 if any of the given key attributes can not be cast (or is not a subtype) of the corresponding key attribute specified when creating the map." ] }, { "isDocumented" : true, "arity" : 1, "name" : "drop", "qname" : "map:drop", "signature" : "($name as string) as empty-sequence() external", "description" : " Deletes the map with the given name.\n", "summary" : "

Deletes the map with the given name.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "string", "occurrence" : null, "description" : "
the name of the map to drop
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function is sequential and immediately drops the map. It returns the empty-sequence." }, "errors" : [ "zerr:ZDDY0023 if a map with the given name does not exist." ] }, { "isDocumented" : true, "arity" : 2, "name" : "get", "qname" : "map:get", "signature" : "($name as string, $key as item()) as item()* external", "description" : " Returns the value of the entry with the given key from the map.\n If the map has only one key attribute, a single key value is given, for\n more than one key attribute an array of key values is given.\n Note that it is possible to insert entries with empty key attributes.\n However as the getting the entries is based on the \"eq\" comparison and\n as \"eq\" with an empty sequence always return false, it is not possible\n to retrieve these entries.\n

For example,\n

map:get(\"my-map\", \"key\")
or\n
map:get(\"my-map\", [ \"key1\", \"key2\" ])
.

\n", "summary" : "

Returns the value of the entry with the given key from the map.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "string", "occurrence" : null, "description" : "
the name of the map
" }, { "name" : "key", "type" : "item()", "occurrence" : null, "description" : "
either a single attribute key or an array of keys
" } ], "returns" : { "type" : "item()*", "description" : "the value of the entry in the map identified by the given key. The empty-sequence will be returned if no entry with the given key is contained in the map." }, "errors" : [ "zerr:ZDDY0023 if a map with the given name does not exist.", "zerr:ZDDY0025 if the given number of key attributes does not match the number of key attributes specified when creating the map (see the map:create function).", "zerr:ZXQD0005 if any of the given key attributes can not be cast (or is not a subtype) of the corresponding key attribute specified when creating the map." ] }, { "isDocumented" : true, "arity" : 3, "name" : "insert", "qname" : "map:insert", "signature" : "($name as string, $key as item(), $value as item()*) as empty-sequence() external", "description" : " Inserts a new entry into the map with the given name.\n If the map has only one key attribute, a single key value is given, for\n more than one key attribute an array of key values is given.\n If an entry with the given key already exists in the map, the value\n sequences of the existing entry and the sequence passed using $value\n argument are concatenated.\n

If a map is persistent and if an item in the value sequence\n is an object or array, this item needs to belong to a collection,\n otherwise, an an error is raised.

\n Note that it is possible to insert entries with empty key attributes\n or key attributes having the value null. However, as\n the comparison with an empty sequence or null always returns false,\n it is not possible to retrieve these entries.\n

For example,\n

map:insert(\"my-map\", \"key\", \"value\")
or\n
map:insert(\"my-map\", [ \"key1\", \"key2\" ] , (42, \"value\"))
.

\n", "summary" : "

Inserts a new entry into the map with the given name.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "string", "occurrence" : null, "description" : "
the name of the map
" }, { "name" : "key", "type" : "item()", "occurrence" : null, "description" : "
either a single attribute key or an array of keys
" }, { "name" : "value", "type" : "item()", "occurrence" : "*", "description" : "
the value of the entry to insert
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function is sequential and immediately inserts the entry into the map. It returns the empty-sequence." }, "errors" : [ "zerr:ZDDY0023 if a map with the given name does not exist.", "zerr:ZDDY0025 if the given number of key attributes does not match the number of key attributes specified when creating the map (see the map:create function).", "zerr:ZXQD0005 if any of the given key attributes can not be cast (or is not a subtype) of the corresponding key attribute specified when creating the map.", "zerr:ZDDY1003 if the value to insert is an object or array it must belong to a collection." ] }, { "isDocumented" : true, "arity" : 1, "name" : "keys", "qname" : "map:keys", "signature" : "($name as string) as array()* external", "description" : " Returns the keys of all entries of a map. The keys\n are returned as sequence of arrays.\n The following condition always holds:\n map:size($name) eq count(map:keys($name))\n", "summary" : "

Returns the keys of all entries of a map.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "string", "occurrence" : null, "description" : "
the name of the map
" } ], "returns" : { "type" : "array()*", "description" : "an sequence of arrays each array containing the values of all attributes of one key." }, "errors" : [ "zerr:ZDDY0023 if a map with the given name does not exist." ] }, { "isDocumented" : true, "arity" : 1, "name" : "options", "qname" : "map:options", "signature" : "($name as string) as object() external", "description" : " The function returns the options that were passed during creation or the\n default options if no options were passed.\n", "summary" : "

The function returns the options that were passed during creation or the\n default options if no options were passed.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "string", "occurrence" : null, "description" : "
the name of the map
" } ], "returns" : { "type" : "object()", "description" : "an options object" }, "errors" : [ "zerr:ZDDY0023 if a map with the given name does not exist." ] }, { "isDocumented" : true, "arity" : 1, "name" : "size", "qname" : "map:size", "signature" : "($name as string) as integer external", "description" : " The number of entries in a map.\n The following condition always holds:\n map:size($name) eq count(map:keys($name))\n", "summary" : "

The number of entries in a map.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "string", "occurrence" : null, "description" : "
the name of the map
" } ], "returns" : { "type" : "integer", "description" : "the number of entries in the map." }, "errors" : [ "zerr:ZDDY0023 if a map with the given name does not exist." ] } ], "variables" : [ ] }, "http://www.w3.org/2005/xpath-functions/math" : { "ns" : "http://www.w3.org/2005/xpath-functions/math", "description" : " This module contains all the functions part of the\n W3C XPath and XQuery Functions and Operators 3.0\n section \"4.7 Trigonometric and exponential functions\".\n", "sees" : [ "http://www.w3.org/TR/xpath-functions-30/#trigonometry" ], "authors" : [ "www.w3c.org" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.w3.org/2005/xpath-functions/math", "prefix" : "math" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "acos", "qname" : "math:acos", "signature" : "($arg as xs:double?) as xs:double? external", "description" : "

Returns the arc cosine of the argument, the result being in the range zero to\n +π radians.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise the result is the arc cosine of $θ,\n treated as an angle in radians, as defined in the \n specification of the acos function applied to 64-bit binary floating point\n values.

The treatment of the invalidOperation exception is defined in .

If $arg is NaN, or if its absolute value is greater than one,\n then the result is NaN.

In other cases the result is an xs:double value representing an angle\n θ in radians in the range 0 <= $θ <=\n +π.

\n", "summary" : "

Returns the arc cosine of the argument, the result being in the range zero to\n + π radians.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "asin", "qname" : "math:asin", "signature" : "($arg as xs:double?) as xs:double? external", "description" : "

Returns the arc sine of the argument, the result being in the range\n -π/2 to +π/2 radians.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise the result is the arc sine of $θ,\n treated as an angle in radians, as defined in the \n specification of the asin function applied to 64-bit binary floating point\n values.

The treatment of the invalidOperation and underflow exceptions\n is defined in .

If $arg is positive or negative zero, the result is $arg.

If $arg is NaN, or if its absolute value is greater than one,\n then the result is NaN.

In other cases the result is an xs:double value representing an angle\n θ in radians in the range -π/2 <=\n $θ <= +π/2.

\n", "summary" : "

Returns the arc sine of the argument, the result being in the range\n - π /2 to + π /2 radians.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "atan", "qname" : "math:atan", "signature" : "($arg as xs:double?) as xs:double? external", "description" : "

Returns the arc tangent of the argument, the result being in the range\n -π/2 to +π/2 radians.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise the result is the arc tangent of $θ,\n treated as an angle in radians, as defined in the \n specification of the atan function applied to 64-bit binary floating point\n values.

The treatment of the underflow exception is defined in .

If $arg is positive or negative zero, the result is $arg.

If $arg is NaN then the result is NaN.

In other cases the result is an xs:double value representing an angle\n θ in radians in the range -π/2 <=\n $θ <= +π/2.

\n", "summary" : "

Returns the arc tangent of the argument, the result being in the range\n - π /2 to + π /2 radians.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "atan2", "qname" : "math:atan2", "signature" : "($y as xs:double, $x as xs:double) as xs:double external", "description" : "

Returns the angle in radians subtended at the origin by the point on a plane\n with coordinates (x, y) and the positive x-axis, the result being in the range\n -π to +π.

This function is deterministic, context-independent, and focus-independent.

The result is the value of atan2(y, x) as defined in the\n specification of the atan2 function applied\n to 64-bit binary floating point values.

The treatment of the underflow exception is defined in .

If either argument is NaN\n then the result is NaN.

If $y is positive and $x is positive and finite, then\n (subject to rules for overflow, underflow and approximation)\n the value of atan2($y, $x) is atan($y div $x).

If $y is positive and $x is negative and finite, then\n (subject to the same caveats)\n the value of atan2($y, $x) is π - atan($y div $x).

Some results for special values of the arguments are shown in the examples below.

\n", "summary" : "

Returns the angle in radians subtended at the origin by the point on a plane\n with coordinates (x, y) and the positive x-axis, the result being in the range\n - π to + π .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "y", "type" : "xs:double", "occurrence" : null, "description" : "" }, { "name" : "x", "type" : "xs:double", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:double", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "cos", "qname" : "math:cos", "signature" : "($theta as xs:double?) as xs:double? external", "description" : "

Returns the cosine of the argument, expressed in radians.

This function is deterministic, context-independent, and focus-independent.

If $θ is the empty sequence, the function returns the empty\n sequence.

If $θ is positive or negative infinity, or NaN,\n then the result is NaN.

Otherwise the result is the cosine of $θ,\n treated as an angle in radians, as defined in the \n specification of the cos function applied to 64-bit binary floating point\n values.

The treatment of the invalidOperation exception is defined in .

If $θ is positive or negative zero, the result is\n $θ.

If $θ is positive or negative infinity, or NaN,\n then the result is NaN.

Otherwise the result is always in the range -1.0e0 to +1.0e0

\n", "summary" : "

Returns the cosine of the argument, expressed in radians.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "theta", "type" : "xs:double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "exp", "qname" : "math:exp", "signature" : "($arg as xs:double?) as xs:double? external", "description" : "

Returns the value of ex.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise the result is the mathematical constant e\n raised to the power of $arg, as defined in the \n specification of the exp function applied to 64-bit binary floating point\n values.

The treatment of overflow and underflow is defined in .

\n", "summary" : "

Returns the value of e x .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "exp10", "qname" : "math:exp10", "signature" : "($arg as xs:double?) as xs:double? external", "description" : "

Returns the value of 10x.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise the result is ten raised to the power of $arg,\n as defined in the specification of the exp10\n function applied to 64-bit binary floating point values.

The treatment of overflow and underflow is defined in .

\n", "summary" : "

Returns the value of 10 x .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "log", "qname" : "math:log", "signature" : "($arg as xs:double?) as xs:double? external", "description" : "

Returns the natural logarithm of the argument.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise the result is the natural logarithm of $arg, as\n defined in the specification of the log\n function applied to 64-bit binary floating point values.

The treatment of divideByZero and invalidOperation exceptions\n is defined in . The effect is that if the argument is less\n than or equal to zero, the result is NaN.

\n", "summary" : "

Returns the natural logarithm of the argument.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "log10", "qname" : "math:log10", "signature" : "($arg as xs:double?) as xs:double? external", "description" : "

Returns the base-ten logarithm of the argument.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise the result is the base-10 logarithm of $arg, as\n defined in the specification of the log10\n function applied to 64-bit binary floating point values.

The treatment of divideByZero and invalidOperation exceptions\n is defined in . The effect is that if the argument is less\n than or equal to zero, the result is NaN.

\n", "summary" : "

Returns the base-ten logarithm of the argument.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "pi", "qname" : "math:pi", "signature" : "() as xs:double external", "description" : "

Returns an approximation to the mathematical constant π.

This function is deterministic, context-independent, and focus-independent.

This function returns the xs:double value whose lexical representation is\n 3.141592653589793e0

The expression 2*math:pi() returns 6.283185307179586e0.

The expression 60 * (math:pi() div 180) converts an angle of 60 degrees\n to radians.

\n", "summary" : "

Returns an approximation to the mathematical constant π .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:double", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "pow", "qname" : "math:pow", "signature" : "($x as xs:double?, $y as numeric) as xs:double? external", "description" : "

Returns the result of raising the first argument to the power of the\n second.

This function is deterministic, context-independent, and focus-independent.

If $x is the empty sequence, the function returns the empty sequence.

If $y is an instance of xs:integer, the result is\n $x raised to the power of $y as defined in the specification of the pown function applied to a\n 64-bit binary floating point value and an integer.

Otherwise $y is converted to an xs:double by numeric\n promotion, and the result is the value of $x raised to the power of\n $y as defined in the specification of the\n pow function applied to two 64-bit binary floating point values.

The treatment of the divideByZero and invalidOperation\n exceptions is defined in . Some of the consequences are\n illustrated in the examples below.

\n", "summary" : "

Returns the result of raising the first argument to the power of the\n second.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "x", "type" : "xs:double", "occurrence" : "?", "description" : "" }, { "name" : "y", "type" : "numeric", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "sin", "qname" : "math:sin", "signature" : "($theta as xs:double?) as xs:double? external", "description" : "

Returns the sine of the argument, expressed in radians.

This function is deterministic, context-independent, and focus-independent.

If $θ is the empty sequence, the function returns the empty\n sequence.

Otherwise the result is the sine of $θ,\n treated as an angle in radians, as defined in the \n specification of the sin function applied to 64-bit binary floating point\n values.

The treatment of the invalidOperation and underflow exceptions\n is defined in .

If $θ is positive or negative zero, the result is\n $θ.

If $θ is positive or negative infinity, or NaN,\n then the result is NaN.

Otherwise the result is always in the range -1.0e0 to +1.0e0

\n", "summary" : "

Returns the sine of the argument, expressed in radians.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "theta", "type" : "xs:double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "sqrt", "qname" : "math:sqrt", "signature" : "($arg as xs:double?) as xs:double? external", "description" : "

Returns the non-negative square root of the argument.

This function is deterministic, context-independent, and focus-independent.

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise the result is the mathematical non-negative square root of\n $arg as defined in the specification of the\n squareRoot function applied to 64-bit binary floating point values.

The treatment of the invalidOperation exception is defined in . The effect is that if the argument is less than zero, the result\n is NaN.

If $arg is positive or negative zero, positive infinity, or\n NaN, then the result is $arg. (Negative zero is the only\n case where the result can have negative sign)

\n", "summary" : "

Returns the non-negative square root of the argument.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "tan", "qname" : "math:tan", "signature" : "($theta as xs:double?) as xs:double? external", "description" : "

Returns the tangent of the argument, expressed in radians.

This function is deterministic, context-independent, and focus-independent.

If $θ is the empty sequence, the function returns the empty\n sequence.

Otherwise the result is the tangent of $θ,\n treated as an angle in radians, as defined in the \n specification of the tan function applied to 64-bit binary floating point\n values.

The treatment of the invalidOperation and underflow exceptions\n is defined in .

If $θ is positive or negative infinity, or NaN,\n then the result is NaN.

\n", "summary" : "

Returns the tangent of the argument, expressed in radians.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "theta", "type" : "xs:double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:double?", "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }, "http://www.zorba-xquery.com/modules/oauth/client" : { "ns" : "http://www.zorba-xquery.com/modules/oauth/client", "description" : " This module provides the functions necessary to acquire access to the personal\n resources of a user through the open standard called\n OAuth.\n The application/mashup creator does not need to know the\n specifics of OAuth to use this module.\n", "sees" : [ "OAuth Website" ], "authors" : [ "Stephanie Russell", "William Candillon" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://zorba.io/modules/base64", "prefix" : "base64" }, { "uri" : "http://zorba.io/features", "prefix" : "f" }, { "uri" : "http://zorba.io/modules/hmac", "prefix" : "hmac" }, { "uri" : "http://expath.org/ns/http-client", "prefix" : "http" }, { "uri" : "http://expath.org/ns/http-client", "prefix" : "http-client" }, { "uri" : "http://www.zorba-xquery.com/modules/oauth/client", "prefix" : "oauth" }, { "uri" : "http://www.zorba-xquery.com/modules/oauth/error", "prefix" : "oerr" }, { "uri" : "http://zorba.io/options/features", "prefix" : "op" }, { "uri" : "http://www.zorba-xquery.com/schemas/oauth/parameters", "prefix" : "p" }, { "uri" : "http://zorba.io/modules/random", "prefix" : "ra" }, { "uri" : "http://www.zorba-xquery.com/schemas/oauth/service-provider", "prefix" : "sp" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "access-token", "qname" : "oauth:access-token", "signature" : "($service-provider as schema-element(sp:service-provider), $parameters as schema-element(p:parameters)) as schema-element(p:parameters)", "description" : " This function allows the client to obtain a set of token credentials from the service provider by making an authenticated HTTP request to the Token Request endpoint.\n This function is provided for convenience.\n", "summary" : "

This function allows the client to obtain a set of token credentials from the service provider by making an authenticated HTTP request to the Token Request endpoint.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "service-provider", "type" : "schema-element(sp:service-provider)", "occurrence" : null, "description" : "
Contains service provider information
" }, { "name" : "parameters", "type" : "schema-element(p:parameters)", "occurrence" : null, "description" : "
parameters
" } ], "returns" : { "type" : "schema-element(p:parameters)", "description" : "token credentials correctly parsed as parameter elements, or an error if http response status is not 200 OK
 let $service-provider := oauth:service-provider(...) let $parameters := oauth:parameters(\"oauth_token\", \"#\") let $parameters := oauth:add-parameter($parameters, \"oauth_token_secret\", \"#\") let $tokens := oauth:access-token($service-provider, $parameters) ... 
" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "add-parameter", "qname" : "oauth:add-parameter", "signature" : "($parameters as schema-element(p:parameters)?, $name as xs:string, $value as xs:string) as schema-element(p:parameters)", "description" : " Adds an OAuth parameter to an OAuth Parameters instance.\n Instances of OAuth parameters are used to\n contain value/pair data such as oauth_token\n and oauth_token_secret.\n For instance the following code snippet:\n
\n  let $params := oauth:parameters(\"oauth_token\", \"#\")\n  let $params := oauth:add-parameter($params, \"oauth_token_secret\", \"#\")\n  return $params\n 
\n Returns the following XML schema instance:\n
\n \n   \n   \n \n 
\n", "summary" : "

Adds an OAuth parameter to an OAuth Parameters instance.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "parameters", "type" : "schema-element(p:parameters)", "occurrence" : "?", "description" : "
parameters
" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
parameter name
" }, { "name" : "value", "type" : "xs:string", "occurrence" : null, "description" : "
parameter value
" } ], "returns" : { "type" : "schema-element(p:parameters)", "description" : "instance of the OAuth parameters XML schema." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "parameter", "qname" : "oauth:parameter", "signature" : "($params as schema-element(p:parameters), $string as xs:string) as xs:string", "description" : " This function returns the string value of the parameters whose key matches a $string input.\n", "summary" : "

This function returns the string value of the parameters whose key matches a $string input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "params", "type" : "schema-element(p:parameters)", "occurrence" : null, "description" : "
element parameters
" }, { "name" : "string", "type" : "xs:string", "occurrence" : null, "description" : "
string as the \"key\" name
" } ], "returns" : { "type" : "xs:string", "description" : "string value of the parameter with key $string
 let $params := oauth:parameters(\"oauth_token\", \"token\") let $params := oauth:add-parameter($params, \"oauth_token_secret\", \"secret\") let $token-secret := oauth:parameter($params, \"oauth_token_secret\") return $token-secret 
" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "parameters", "qname" : "oauth:parameters", "signature" : "($name as xs:string, $value as xs:string) as element(p:parameters)", "description" : " Create an OAuth Parameters instance.\n Instances of OAuth parameters are used to\n contain value/pair data such as oauth_token\n and oauth_token_secret.\n For instance the following code snippet:\n
\n  oauth:parameters(\"oauth_token\", \"#\")\n 
\n Returns the following XML schema instance:\n
\n \n   \n \n 
\n", "summary" : "

Create an OAuth Parameters instance.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
parameter name
" }, { "name" : "value", "type" : "xs:string", "occurrence" : null, "description" : "
parameter value
" } ], "returns" : { "type" : "element(p:parameters)", "description" : "instance of the OAuth parameters XML schema." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "protected-resource", "qname" : "oauth:protected-resource", "signature" : "($protected-resource as schema-element(http:request), $service-provider as schema-element(sp:service-provider), $parameters as schema-element(p:parameters)) as item()*", "description" : " This function allows the client access to the protected resources of the user.\n This function is provided for convenience.\n", "summary" : "

This function allows the client access to the protected resources of the user.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "protected-resource", "type" : "schema-element(http:request)", "occurrence" : null, "description" : "
(Not schema-validated) http:request element with http method and href.
" }, { "name" : "service-provider", "type" : "schema-element(sp:service-provider)", "occurrence" : null, "description" : "
Information about the service provider
" }, { "name" : "parameters", "type" : "schema-element(p:parameters)", "occurrence" : null, "description" : "
parameters
" } ], "returns" : { "type" : "item()*", "description" : "protected resources parsed as parameter elements, or an error if http response status is not 200 OK
 let $tokens := oauth:parameters(\"oauth_token\", \"#\") let $tokens := oauth:add-parameter($tokens, \"oauth_token_secret\", \"#\") let $service-provider := oauth:service-provider(...) let $request := validate {  } return oauth:protected-resource($request, $service-provider, $tokens) 
" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "request-token", "qname" : "oauth:request-token", "signature" : "($service-provider as schema-element(sp:service-provider)) as schema-element(p:parameters)", "description" : " This function allows the client to obtain a set of temporary credentials from the service provider by making an authenticated HTTP request to the Temporary Credential Request endpoint.\n This function is provided for convenience for request-token#2.\n Invoking this function is equivalent to:\n
\n oauth:request-token($service-provider, ())\n 
\n", "summary" : "

This function allows the client to obtain a set of temporary credentials from the service provider by making an authenticated HTTP request to the Temporary Credential Request endpoint.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "service-provider", "type" : "schema-element(sp:service-provider)", "occurrence" : null, "description" : "
Information about the service provider
" } ], "returns" : { "type" : "schema-element(p:parameters)", "description" : "temporary credentials correctly parsed as parameter elements, or an error if http response status is not 200 OK" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "request-token", "qname" : "oauth:request-token", "signature" : "($service-provider as schema-element(sp:service-provider), $parameters as schema-element(p:parameters)?) as schema-element(p:parameters)", "description" : " This function allows the client to obtain a set of temporary credentials from the service provider by making an authenticated HTTP request to the Temporary Credential Request endpoint.\n This function is provided for convenience.\n", "summary" : "

This function allows the client to obtain a set of temporary credentials from the service provider by making an authenticated HTTP request to the Temporary Credential Request endpoint.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "service-provider", "type" : "schema-element(sp:service-provider)", "occurrence" : null, "description" : "
Information about the service provider
" }, { "name" : "parameters", "type" : "schema-element(p:parameters)", "occurrence" : "?", "description" : "
Additionnal parameters to the request
" } ], "returns" : { "type" : "schema-element(p:parameters)", "description" : "temporary credentials correctly parsed as parameter elements, or an error if http response status is not 200 OK
 let $twitter-config := oauth:service-provider(...) let $additional-parameter := oauth:parameters(\"foo\", \"bar\") let $tokens := oauth:request-token($twitter-config, $additional-parameter) let $token := oauth:parameter($tokens, \"oauth_token\") let $token-secret := oauth:parameter($tokens, \"oauth_token_secret\") ... 
" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 10, "name" : "service-provider", "qname" : "oauth:service-provider", "signature" : "($consumer-key as xs:string, $consumer-secret as xs:string, $signature-method as xs:string, $realm as xs:string, $authorize-url as xs:string, $request-token-method as xs:string, $request-token-url as xs:string, $request-token-callback-url as xs:string, $access-token-method as xs:string, $access-token-url as xs:string) as schema-element(sp:service-provider)", "description" : " Utility function to build a service provider object.\n This object contains the information required by the\n OAuth client to interact with an OAuth service provider.\n For instance the following expression:\n
\n let $consumer-key     := \"#\"\n let $consumer-secret  := \"#\"\n let $signature-method := \"HMAC-SHA1\"\n let $realm            := \"twitter.com\"\n let $authorize-url    := \"http://api.twitter.com/oauth/authorize\"\n let $request-token-method := \"POST\"\n let $request-token-url := \"https://twitter.com/oauth/request_token\"\n let $request-token-callback-url := \"https://twitter.com/oauth/request_token\"\n let $access-token-method := \"POST\"\n let $access-token-url := \"https://api.twitter.com/oauth/access_token\"\n return oauth:service-provider(\n   $consumer-key, $consumer-secret, $signature-method,\n   $realm, $authorize-url, $request-token-method,\n   $request-token-url, $request-token-callback-url,\n   $access-token-method, $access-token-url\n )\n 
\n Will return the following XML schema instance:\n
\n \n   \n   \n \n 
\n", "summary" : "

Utility function to build a service provider object.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "consumer-key", "type" : "xs:string", "occurrence" : null, "description" : "
Client Identifier, also known as the consumer-key
" }, { "name" : "consumer-secret", "type" : "xs:string", "occurrence" : null, "description" : "
Client Shared-Secret, also known as the consumer-secret
" }, { "name" : "signature-method", "type" : "xs:string", "occurrence" : null, "description" : "
Method with which the signing key is signed (typically HMAC-SHA1)
" }, { "name" : "realm", "type" : "xs:string", "occurrence" : null, "description" : "
Realm that defines the protection space
" }, { "name" : "authorize-url", "type" : "xs:string", "occurrence" : null, "description" : "
authorize-url
" }, { "name" : "request-token-method", "type" : "xs:string", "occurrence" : null, "description" : "
request-token-method
" }, { "name" : "request-token-url", "type" : "xs:string", "occurrence" : null, "description" : "
request-token-url
" }, { "name" : "request-token-callback-url", "type" : "xs:string", "occurrence" : null, "description" : "
request-token-callback-url
" }, { "name" : "access-token-method", "type" : "xs:string", "occurrence" : null, "description" : "
access-token-method
" }, { "name" : "access-token-url", "type" : "xs:string", "occurrence" : null, "description" : "
access-token-url
" } ], "returns" : { "type" : "schema-element(sp:service-provider)", "description" : "instance of the OAuth service provider XML schema." }, "errors" : [ ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/http/util/multipart" : { "ns" : "http://www.28msec.com/modules/http/util/multipart", "description" : " This module provides utility functions to help dealing with the\n content of multipart requests.\n In their implementation, all the functions use the multipart\n related functions of the request module (e.g. parts() or text-part()).\n", "sees" : [ ], "authors" : [ "28msec" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.28msec.com/modules/http/util/multipart", "prefix" : "multipart" }, { "uri" : "http://www.28msec.com/modules/http/request", "prefix" : "req" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "binary-content", "qname" : "multipart:binary-content", "signature" : "($name as xs:string) as xs:base64Binary*", "description" : " Returns the contents of the parts/files in the multipart requests with\n the given part name as xs:base64Binary.\n", "summary" : "

Returns the contents of the parts/files in the multipart requests with\n the given part name as xs:base64Binary.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the requested part.
" } ], "returns" : { "type" : "xs:base64Binary*", "description" : "the said content or the empty sequence if no part with the given name exists." }, "errors" : [ "request:non-multipart if the current request does not contain multipart content", "request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)" ] }, { "isDocumented" : true, "arity" : 1, "name" : "binary-file", "qname" : "multipart:binary-file", "signature" : "($filename as xs:string) as xs:base64Binary*", "description" : " Returns the contents of the part/file in the multipart requests with\n the given filename as xs:base64Binary.\n Please note that the file is identified by the filename (and not the\n name of the part) that is contained in the Content-Disposition header\n of the part.\n", "summary" : "

Returns the contents of the part/file in the multipart requests with\n the given filename as xs:base64Binary.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filename", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the requested file.
" } ], "returns" : { "type" : "xs:base64Binary*", "description" : "the said content or the empty sequence if no part with the given filename exists." }, "errors" : [ "request:non-multipart if the current request does not contain multipart content", "request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)" ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-length", "qname" : "multipart:content-length", "signature" : "($name as xs:string) as xs:integer*", "description" : " Returns the content length of the parts/files in the multipart requests with\n the given part name as xs:integer.\n", "summary" : "

Returns the content length of the parts/files in the multipart requests with\n the given part name as xs:integer.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the requested part.
" } ], "returns" : { "type" : "xs:integer*", "description" : "The content-length in bytes of the parts/files or the empty sequence if the part does not exist" }, "errors" : [ "request:non-multipart if the current request does not contain multipart content", "request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)" ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-type", "qname" : "multipart:content-type", "signature" : "($name as xs:string) as xs:string*", "description" : " Returns the content type of the parts/files in the multipart requests with\n the given part name as xs:string.\n", "summary" : "

Returns the content type of the parts/files in the multipart requests with\n the given part name as xs:string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the requested part.
" } ], "returns" : { "type" : "xs:string*", "description" : "The content-types of the parts/files or the empty sequence if the part does not exist" }, "errors" : [ "request:non-multipart if the current request does not contain multipart content", "request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)" ] }, { "isDocumented" : true, "arity" : 1, "name" : "filename", "qname" : "multipart:filename", "signature" : "($name as xs:string) as xs:string*", "description" : " Returns the filenames of the parts/files in the multipart requests with\n the given part name as xs:string.\n", "summary" : "

Returns the filenames of the parts/files in the multipart requests with\n the given part name as xs:string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the requested part.
" } ], "returns" : { "type" : "xs:string*", "description" : "The filename of the parts/files or the empty sequence if the part does not exist" }, "errors" : [ "request:non-multipart if the current request does not contain multipart content", "request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)" ] }, { "isDocumented" : true, "arity" : 0, "name" : "filenames", "qname" : "multipart:filenames", "signature" : "() as xs:string*", "description" : " Returns the filenames of all the parts contained in the multipart\n content of the given request.\n", "summary" : "

Returns the filenames of all the parts contained in the multipart\n content of the given request.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string*", "description" : "the said filenames" }, "errors" : [ "request:non-multipart if the current request does not contain multipart content", "request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)" ] }, { "isDocumented" : true, "arity" : 0, "name" : "names", "qname" : "multipart:names", "signature" : "() as xs:string*", "description" : " Returns the names of all the parts contained in the multipart\n content of the given request.\n", "summary" : "

Returns the names of all the parts contained in the multipart\n content of the given request.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string*", "description" : "the said names" }, "errors" : [ "request:non-multipart if the current request does not contain multipart content", "request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)" ] }, { "isDocumented" : true, "arity" : 1, "name" : "part", "qname" : "multipart:part", "signature" : "($name as xs:string) as element(req:part)*", "description" : " Returns the req:part element among all the parts contained\n in the multipart requests with the given name.\n", "summary" : "

Returns the req:part element among all the parts contained\n in the multipart requests with the given name.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the requested part.
" } ], "returns" : { "type" : "element(req:part)*", "description" : "the said part elements or the empty sequence if no part with the given name exists." }, "errors" : [ "request:non-multipart if the current request does not contain multipart content", "request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)" ] }, { "isDocumented" : true, "arity" : 1, "name" : "text-content", "qname" : "multipart:text-content", "signature" : "($name as xs:string) as xs:string*", "description" : " Returns the contents of the parts/files in the multipart requests with\n the given part name as a string.\n It is assumed that the character set of the file is UTF-8.\n", "summary" : "

Returns the contents of the parts/files in the multipart requests with\n the given part name as a string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the requested part.
" } ], "returns" : { "type" : "xs:string*", "description" : "the said content or the empty sequence if no part with the given filename exists." }, "errors" : [ "request:no-text-content if the value of the part cannot be treated as text", "request:non-multipart if the current request does not contain multipart content", "request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)" ] }, { "isDocumented" : true, "arity" : 1, "name" : "text-file", "qname" : "multipart:text-file", "signature" : "($filename as xs:string) as xs:string*", "description" : " Returns the contents of the part/file in the multipart requests with\n the given filename as a string.\n It is assumed that the character set of the file is UTF-8.\n Please note that the file is identified by the filename (and not the\n name of the part) that is contained in the Content-Disposition header\n of the part.\n", "summary" : "

Returns the contents of the part/file in the multipart requests with\n the given filename as a string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filename", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the requested file.
" } ], "returns" : { "type" : "xs:string*", "description" : "the said content or the empty sequence if no part with the given filename exists." }, "errors" : [ "request:no-text-content if the value of the part cannot be treated as text", "request:non-multipart if the current request does not contain multipart content", "request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)" ] } ], "variables" : [ ] }, "http://zorba.io/modules/excel/statistical-zorba" : { "ns" : "http://zorba.io/modules/excel/statistical-zorba", "description" : " This module implements some Excel 2003 statistical functions\n that cannot be implemented with standard XQuery functions.\n It uses Zorba specific functions.\n", "sees" : [ "http://office.microsoft.com/en-us/excel/CH062528311033.aspx" ], "authors" : [ "Daniel Turcanu" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/excel/statistical-zorba", "prefix" : "excel" }, { "uri" : "http://zorba.io/modules/excel/errors", "prefix" : "excel-err" }, { "uri" : "http://zorba.io/modules/excel/math", "prefix" : "excel-math" }, { "uri" : "http://zorba.io/modules/excel/statistical", "prefix" : "excel-statistical" }, { "uri" : "http://www.w3.org/2005/xpath-functions/math", "prefix" : "math" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "stdev", "qname" : "excel:stdev", "signature" : "($numbers as xs:anyAtomicType+) as xs:anyAtomicType", "description" : " Estimates standard deviation based on a sample.\n The standard deviation is a measure of how widely values are dispersed\n from the average value (the mean).\n It is computed with formula:\n sqrt( sum((x-average_x)^2) / (n-1) ) = sqrt ( VAR(numbers) )\n", "summary" : "

Estimates standard deviation based on a sample.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "numbers", "type" : "xs:anyAtomicType", "occurrence" : "+", "description" : "
the sequence of numbers or values castable to numeric The sequence can be of any length, from 1 up.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the standard deviation, as numeric type" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 1, "name" : "stdeva", "qname" : "excel:stdeva", "signature" : "($numbers as xs:anyAtomicType+) as xs:anyAtomicType", "description" : " Estimates standard deviation based on a sample.\n The standard deviation is a measure of how widely values are dispersed\n from the average value (the mean).\n It is computed with formula:\n sqrt( sum((x-average_x)^2) / (n-1) ) = sqrt ( VARA(numbers) )\n", "summary" : "

Estimates standard deviation based on a sample.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "numbers", "type" : "xs:anyAtomicType", "occurrence" : "+", "description" : "
the sequence of numbers or values castable to numeric The sequence can be of any length, from 1 up.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the standard deviation, as numeric type" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 1, "name" : "stdevp", "qname" : "excel:stdevp", "signature" : "($numbers as xs:anyAtomicType+) as xs:anyAtomicType", "description" : " Calculates standard deviation based on the entire population given as arguments.\n The standard deviation is a measure of how widely values are dispersed from\n the average value (the mean).\n It is computed with formula:\n sqrt( sum((x-average_x)^2) / n ) = sqrt ( VARP(numbers) )\n", "summary" : "

Calculates standard deviation based on the entire population given as arguments.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "numbers", "type" : "xs:anyAtomicType", "occurrence" : "+", "description" : "
the sequence of numbers or values castable to numeric The sequence can be of any length, from 1 up.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the standard deviation, as numeric type" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 1, "name" : "stdevpa", "qname" : "excel:stdevpa", "signature" : "($numbers as xs:anyAtomicType+) as xs:anyAtomicType", "description" : " Calculates standard deviation based on the entire population given as arguments.\n The standard deviation is a measure of how widely values are dispersed from\n the average value (the mean).\n It is computed with formula:\n sqrt( sum((x-average_x)^2) / n ) = sqrt ( VARPA(numbers) )\n", "summary" : "

Calculates standard deviation based on the entire population given as arguments.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "numbers", "type" : "xs:anyAtomicType", "occurrence" : "+", "description" : "
the sequence of numbers or values castable to numeric The sequence can be of any length, from 1 up.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "the standard deviation, as numeric type" }, "errors" : [ "excel-err:Value if the parameters cannot be casted to numeric type" ] }, { "isDocumented" : true, "arity" : 2, "name" : "subtotal", "qname" : "excel:subtotal", "signature" : "($function_num as xs:integer, $numbers as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Moved from math module.\n Returns a subtotal in a sequence of numbers.\n The function applied is given by $function_num.\n", "summary" : "

Moved from math module.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "function_num", "type" : "xs:integer", "occurrence" : null, "description" : "
defines the function to be applied on sequence values. The possible values are:
1 or 101
AVERAGE
2 or 102
COUNT
3 or 103
COUNTA
4 or 104
MAX
5 or 105
MIN
6 or 106
PRODUCT
7 or 107
STDEV
8 or 108
STDEVP
9 or 109
SUM
10 or 110
VAR
11 or 111
VARP
In this implementation there is no difference between x and 10x.

" }, { "name" : "numbers", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequence of numbers or values castable to numeric. The sequence can be of any length.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The function result, as numeric type" }, "errors" : [ "depends on the function called", "excel-err:Num if $function_num is not a value between 1 .. 11 or 101 .. 111" ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/debug" : { "ns" : "http://www.28msec.com/modules/debug", "description" : " This module contains internal debug functions.\n", "sees" : [ ], "authors" : [ "Federico Cavalieri" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.28msec.com/modules/debug", "prefix" : "debug" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 0, "name" : "non-seeakable-streamable-string", "qname" : "debug:non-seeakable-streamable-string", "signature" : "() as string external", "description" : " Returns a non seekable streamable string\n", "summary" : "

Returns a non seekable streamable string\n

", "annotation_str" : " %an:deterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "deterministic", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "string", "description" : "a non seekable streamable string" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "test-01-cache", "qname" : "debug:test-01-cache", "signature" : "($arg as xs:integer) as item()* external", "description" : " Equivalent to:\n declare %an:cache function local:test-01-cache($x as xs:integer)\n {\n if ($x < 10)\n then $x * $x\n else if ($x < 20)\n then ()\n else ($x, \" == \", $x * $x)\n };\n", "summary" : "

Equivalent to:\n declare %an:cache function local:test-01-cache($x as xs:integer)\n {\n if ($x < 10)\n then $x * $x\n else if ($x < 20)\n then ()\n else ($x, \" == \", $x * $x)\n };\n

", "annotation_str" : " %an:cache", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "cache", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:integer", "occurrence" : null, "description" : "
as described above
" } ], "returns" : { "type" : "item()*", "description" : "as described above" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "test-01-sd", "qname" : "debug:test-01-sd", "signature" : "($arg as xs:integer) as item()* external", "description" : " Equivalent to:\n declare %an:strictlydeterministic function local:test-01-sd($x as xs:integer)\n {\n if ($x < 10)\n then $x * $x\n else if ($x < 20)\n then ()\n else ($x, \" == \", $x * $x)\n };\n", "summary" : "

Equivalent to:\n declare %an:strictlydeterministic function local:test-01-sd($x as xs:integer)\n {\n if ($x < 10)\n then $x * $x\n else if ($x < 20)\n then ()\n else ($x, \" == \", $x * $x)\n };\n

", "annotation_str" : " %an:strictlydeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "strictlydeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:integer", "occurrence" : null, "description" : "
as described above
" } ], "returns" : { "type" : "item()*", "description" : "as described above" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "test-02-cache", "qname" : "debug:test-02-cache", "signature" : "($arg) as item()* external", "description" : " Equivalent to:\n declare %an:cache function local:test-02-cache($arg)\n {\n serialize($arg),\n uuid:uuid()\n };\n", "summary" : "

Equivalent to:\n declare %an:cache function local:test-02-cache($arg)\n {\n serialize($arg),\n uuid:uuid()\n };\n

", "annotation_str" : " %an:cache", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "cache", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : null, "occurrence" : null, "description" : "
as described above
" } ], "returns" : { "type" : "item()*", "description" : "as described above" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "test-02-sd", "qname" : "debug:test-02-sd", "signature" : "($arg) as item()* external", "description" : " Equivalent to:\n declare %an:strictlydeterministic function local:test-02-sd($arg)\n {\n serialize($arg),\n uuid:uuid()\n };\n", "summary" : "

Equivalent to:\n declare %an:strictlydeterministic function local:test-02-sd($arg)\n {\n serialize($arg),\n uuid:uuid()\n };\n

", "annotation_str" : " %an:strictlydeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "strictlydeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : null, "occurrence" : null, "description" : "
as described above
" } ], "returns" : { "type" : "item()*", "description" : "as described above" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "test-03-cache", "qname" : "debug:test-03-cache", "signature" : "() as item()* external", "description" : " Equivalent to:\n declare %an:cache function local:test-03-cache()\n {\n { \"a\" : 1 },\n [1],\n <a/>,\n 1\n };\n", "summary" : "

Equivalent to:\n declare %an:cache function local:test-03-cache()\n {\n { \"a\" : 1 },\n [1],\n <a/>,\n 1\n };\n

", "annotation_str" : " %an:cache", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "cache", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "item()*", "description" : "as described above" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "test-03-sd", "qname" : "debug:test-03-sd", "signature" : "() as item()* external", "description" : " Equivalent to:\n declare %an:strictlydeterministic function local:test-03-sd()\n {\n { \"a\" : 1 },\n [1],\n <a/>,\n 1\n };\n", "summary" : "

Equivalent to:\n declare %an:strictlydeterministic function local:test-03-sd()\n {\n { \"a\" : 1 },\n [1],\n <a/>,\n 1\n };\n

", "annotation_str" : " %an:strictlydeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "strictlydeterministic", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "item()*", "description" : "as described above" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "test-04-cache", "qname" : "debug:test-04-cache", "signature" : "($x, $y) as item()* external", "description" : " Equivalent to:\n declare %an:cache function local:test-04-cache($x, $y)\n {\n debug:non-seeakable-streamable-string(),\n {\"key\" : debug:non-seeakable-streamable-string()},\n [debug:non-seeakable-streamable-string()],\n <a>{debug:non-seeakable-streamable-string()}</a>\n serialize($x),\n serialize($y)\n };\n", "summary" : "

Equivalent to:\n declare %an:cache function local:test-04-cache($x, $y)\n {\n debug:non-seeakable-streamable-string(),\n {\"key\" : debug:non-seeakable-streamable-string()},\n [debug:non-seeakable-streamable-string()],\n <a>{debug:non-seeakable-streamable-string()}</a>\n serialize($x),\n serialize($y)\n };\n

", "annotation_str" : " %an:cache", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "cache", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "x", "type" : null, "occurrence" : null, "description" : "
as described above
" }, { "name" : "y", "type" : null, "occurrence" : null, "description" : "
as described above
" } ], "returns" : { "type" : "item()*", "description" : "as described above" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "test-04-sd", "qname" : "debug:test-04-sd", "signature" : "($x, $y) as item()* external", "description" : " Equivalent to:\n declare %an:strictlydeterministic function local:test-04-sd($x, $y)\n {\n debug:non-seeakable-streamable-string(),\n {\"key\" : debug:non-seeakable-streamable-string()},\n [debug:non-seeakable-streamable-string()],\n <a>{debug:non-seeakable-streamable-string()}</a>\n serialize($x),\n serialize($y)\n };\n", "summary" : "

Equivalent to:\n declare %an:strictlydeterministic function local:test-04-sd($x, $y)\n {\n debug:non-seeakable-streamable-string(),\n {\"key\" : debug:non-seeakable-streamable-string()},\n [debug:non-seeakable-streamable-string()],\n <a>{debug:non-seeakable-streamable-string()}</a>\n serialize($x),\n serialize($y)\n };\n

", "annotation_str" : " %an:strictlydeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "strictlydeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "x", "type" : null, "occurrence" : null, "description" : "
as described above
" }, { "name" : "y", "type" : null, "occurrence" : null, "description" : "
as described above
" } ], "returns" : { "type" : "item()*", "description" : "as described above" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "test-05-cache", "qname" : "debug:test-05-cache", "signature" : "($x as xs:boolean, $y) as item()* external", "description" : " Equivalent to:\n declare %an:cache function local:test-05-cache($x as xs:boolean, $y)\n {\n if ($x)\n then $y\n else $x\n };\n", "summary" : "

Equivalent to:\n declare %an:cache function local:test-05-cache($x as xs:boolean, $y)\n {\n if ($x)\n then $y\n else $x\n };\n

", "annotation_str" : " %an:cache", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "cache", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "x", "type" : "xs:boolean", "occurrence" : null, "description" : "
as described above
" }, { "name" : "y", "type" : null, "occurrence" : null, "description" : "
as described above
" } ], "returns" : { "type" : "item()*", "description" : "as described above" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "test-05-sd", "qname" : "debug:test-05-sd", "signature" : "($x as xs:boolean, $y) as item()* external", "description" : " Equivalent to:\n declare %an:strictlydeterministic function local:test-05-sd($x as xs:boolean, $y)\n {\n if ($x)\n then $y\n else $x\n };\n", "summary" : "

Equivalent to:\n declare %an:strictlydeterministic function local:test-05-sd($x as xs:boolean, $y)\n {\n if ($x)\n then $y\n else $x\n };\n

", "annotation_str" : " %an:strictlydeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "strictlydeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "x", "type" : "xs:boolean", "occurrence" : null, "description" : "
as described above
" }, { "name" : "y", "type" : null, "occurrence" : null, "description" : "
as described above
" } ], "returns" : { "type" : "item()*", "description" : "as described above" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "uuid", "qname" : "debug:uuid", "signature" : "() as string external", "description" : " This function is not deterministic despite the annotation\n", "summary" : "

This function is not deterministic despite the annotation\n

", "annotation_str" : " %an:deterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "deterministic", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "string", "description" : "a uuid" }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/json-xml" : { "ns" : "http://zorba.io/modules/json-xml", "description" : " Using this module, you can parse JSON data into XML, manipulate it like any\n other XML data using XQuery, and serialize the result back as JSON.

\n There are many ways to represent JSON data in XML, some loss-less (\"round\n tripable\") and some lossy (\"one way\"). Loss-less representations preserve\n the JSON data types boolean, number, and null; lossy\n representations convert all data to strings.\n

\n For a loss-less representation, this module implements that proposed by\n John Snelson.\n For example:\n

\n   {\n     \"firstName\" : \"John\",\n     \"lastName\" : \"Smith\",\n     \"address\" : {\n       \"streetAddress\" : \"21 2nd Street\",\n       \"city\" : \"New York\",\n       \"state\" : \"NY\",\n       \"postalCode\" : 10021\n     },\n     \"phoneNumbers\" : [ \"212 732-1234\", \"646 123-4567\" ]\n   }\n 
\n would be represented as:\n
\n   <json type=\"object\">\n     <pair name=\"firstName\" type=\"string\">John</pair>\n     <pair name=\"lastName\" type=\"string\">Smith</pair>\n     <pair name=\"address\" type=\"object\">\n       <pair name=\"streetAddress\" type=\"string\">21 2nd Street</pair>\n       <pair name=\"city\" type=\"string\">New York</pair>\n       <pair name=\"state\" type=\"string\">NY</pair>\n       <pair name=\"postalCode\" type=\"number\">10021</pair>\n     </pair>\n     <pair name=\"phoneNumbers\" type=\"array\">\n       <item type=\"string\">212 732-1234</item>\n       <item type=\"string\">646 123-4567</item>\n     </pair>\n   </json>\n 
\n For a lossy representation, this module implements\n JsonML (the array form).\n For example:\n
\n   [ \"person\",\n     { \"created\" : \"2006-11-11T19:23\",\n       \"modified\" : \"2006-12-31T23:59\" },\n     [ \"firstName\", \"Robert\" ],\n     [ \"lastName\", \"Smith\" ],\n     [ \"address\",\n       { \"type\" : \"home\" },\n       [ \"street\", \"12345 Sixth Ave\" ],\n       [ \"city\", \"Anytown\" ],\n       [ \"state\", \"CA\" ],\n       [ \"postalCode\", \"98765-4321\" ]\n     ]\n   ]\n 
\n would be represented as:\n
\n   <person created=\"2006-11-11T19:23\" modified=\"2006-12-31T23:59\">\n     <firstName>Robert</firstName>\n     <lastName>Smith</lastName>\n     <address type=\"home\">\n       <street>12345 Sixth Ave</street>\n       <city>Anytown</city>\n       <state>CA</state>\n       <postalCode>98765-4321</postalCode>\n     </address>\n   </person>\n 
\n", "sees" : [ ], "authors" : [ "Paul J. Lucas" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.w3.org/2005/xqt-errors", "prefix" : "err" }, { "uri" : "http://zorba.io/modules/json-xml", "prefix" : "jx" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/errors", "prefix" : "zerr" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "json-to-xml", "qname" : "jx:json-to-xml", "signature" : "($json as json-item()?) as element(*,xs:untyped)?", "description" : " Converts JSON data into an XDM instance using the Snelson representation\n described above.

\n", "summary" : "

Converts JSON data into an XDM instance using the Snelson representation\n described above.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "json", "type" : "json-item()", "occurrence" : "?", "description" : "
The JSON data.
" } ], "returns" : { "type" : "element(*,xs:untyped)?", "description" : "said XDM instance." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "json-to-xml", "qname" : "jx:json-to-xml", "signature" : "($json as json-item()?, $options as object()) as element(*,xs:untyped)?", "description" : " Converts JSON data into an XDM instance using one of the representations\n described above.

\n", "summary" : "

Converts JSON data into an XDM instance using one of the representations\n described above.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "json", "type" : "json-item()", "occurrence" : "?", "description" : "
The JSON data.
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
The JSON conversion options, for example:
 { \"json-format\" : \"JsonML-array\" } 
" } ], "returns" : { "type" : "element(*,xs:untyped)?", "description" : "said XDM instance." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "xml-to-json", "qname" : "jx:xml-to-json", "signature" : "($xml as item()*) as json-item()*", "description" : " Converts XML data into a JSON item using the Snelson representation\n described above.

\n", "summary" : "

Converts XML data into a JSON item using the Snelson representation\n described above.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "xml", "type" : "item()", "occurrence" : "*", "description" : "
The XML data to convert.
" } ], "returns" : { "type" : "json-item()*", "description" : "said JSON items." }, "errors" : [ "zerr:ZJSE0001 if $xml is not a document or element node.", "zerr:ZJSE0002 if $xml contains an element that is missing a required attribute.", "zerr:ZJSE0003 if $xml contains an attribute having an illegal value.", "zerr:ZJSE0004 if $xml contains an illegal element. type.", "zerr:ZJSE0007 if $xml contains an element that is missing a required value.", "zerr:ZJSE0008 if $xml contains an illegal value for a JSON type." ] }, { "isDocumented" : true, "arity" : 2, "name" : "xml-to-json", "qname" : "jx:xml-to-json", "signature" : "($xml as item()*, $options as object()) as json-item()*", "description" : " Converts XML data into a JSON item using one of the respresentations\n described above.

\n", "summary" : "

Converts XML data into a JSON item using one of the respresentations\n described above.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "xml", "type" : "item()", "occurrence" : "*", "description" : "
The XML data to convert.
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
The conversion options, for example:
 { \"json-format\" : \"JsonML-array\" } 
" } ], "returns" : { "type" : "json-item()*", "description" : "said JSON items." }, "errors" : [ "zerr:ZJSE0001 if $xml is not a document or element node.", "zerr:ZJSE0002 if $xml contains an element that is missing a required attribute.", "zerr:ZJSE0003 if $xml contains an attribute having an illegal value.", "zerr:ZJSE0004 if $xml contains an illegal element. type.", "zerr:ZJSE0007 if $xml contains an element that is missing a required value.", "zerr:ZJSE0008 if $xml contains an illegal value for a JSON type." ] } ], "variables" : [ ] }, "http://www.zorba-xquery.com/modules/image/manipulation" : { "ns" : "http://www.zorba-xquery.com/modules/image/manipulation", "description" : " This module provides functions to handle image manipulations like resizing, zooming,\n special effects etc.\n

The errors raised by functions of this module have the namespace\n http://www.zorba-xquery.com/modules/image/error (associated with prefix ierr).

\n", "sees" : [ ], "authors" : [ "Daniel Thomas" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.w3.org/2005/xqt-errors", "prefix" : "err" }, { "uri" : "http://www.zorba-xquery.com/modules/image/error", "prefix" : "ierr" }, { "uri" : "http://www.zorba-xquery.com/modules/image/image", "prefix" : "image" }, { "uri" : "http://www.zorba-xquery.com/modules/image/manipulation", "prefix" : "man" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "add-noise", "qname" : "man:add-noise", "signature" : "($image as xs:base64Binary, $noise-type as xs:string) as xs:base64Binary", "description" : " Add noise to an image.\n Allowed noise types are:\n \n", "summary" : "

Add noise to an image.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" }, { "name" : "noise-type", "type" : "xs:string", "occurrence" : null, "description" : "
specifies the type of noise to add
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A copy of $image with added noise" }, "errors" : [ "ierr:IM001 passed image is invalid", "err:FORG0001 unsupported noise type" ] }, { "isDocumented" : true, "arity" : 3, "name" : "blur", "qname" : "man:blur", "signature" : "($image as xs:base64Binary, $radius as xs:int, $sigma as xs:int) as xs:base64Binary external", "description" : " Blur an image.\n", "summary" : "

Blur an image.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" }, { "name" : "radius", "type" : "xs:int", "occurrence" : null, "description" : "
is the radius of the Gaussian in pixels.
" }, { "name" : "sigma", "type" : "xs:int", "occurrence" : null, "description" : "
is the standard deviation of the Laplacian in pixels.
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A blured copy of $image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 3, "name" : "charcoal", "qname" : "man:charcoal", "signature" : "($image as xs:base64Binary, $radius as xs:double, $sigma as xs:double) as xs:base64Binary external", "description" : " Apply a charcoal effect to the image (looks like a charcoal sketch).\n", "summary" : "

Apply a charcoal effect to the image (looks like a charcoal sketch).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" }, { "name" : "radius", "type" : "xs:double", "occurrence" : null, "description" : "
radius of the Gaussian in pixels
" }, { "name" : "sigma", "type" : "xs:double", "occurrence" : null, "description" : "
standard deviation of the Laplacian in pixels
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A charcoaled copy of $image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 3, "name" : "chop", "qname" : "man:chop", "signature" : "($image as xs:base64Binary, $upper-left-x as xs:unsignedInt, $upper-left-y as xs:unsignedInt) as xs:base64Binary external", "description" : " Copy a part of a source image as new image.\n The copied part is all right of $upper-left-x and below $upper-left-y.\n", "summary" : "

Copy a part of a source image as new image.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
source image
" }, { "name" : "upper-left-x", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
x position of the upper left corner of the part to copy
" }, { "name" : "upper-left-y", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
y position of the upper left corner of the part to copy
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A new image copied from a part of source image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 2, "name" : "contrast", "qname" : "man:contrast", "signature" : "($image as xs:base64Binary, $sharpen as xs:double) as xs:base64Binary external", "description" : " Contrast an image (enhances image intensity differences) by a given value.\n", "summary" : "

Contrast an image (enhances image intensity differences) by a given value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" }, { "name" : "sharpen", "type" : "xs:double", "occurrence" : null, "description" : "
defines how much the image is contrasted.
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A contrasted copy of $image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 3, "name" : "crop", "qname" : "man:crop", "signature" : "($image as xs:base64Binary, $lower-right-x as xs:unsignedInt, $lower-right-y as xs:unsignedInt) as xs:base64Binary external", "description" : " Copy a part of a source image as new image.\n The copied part is all left of $lower-right-x and above $lower-right-y.\n", "summary" : "

Copy a part of a source image as new image.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
source image
" }, { "name" : "lower-right-x", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
x position of the lower right corner of the part to copy
" }, { "name" : "lower-right-y", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
y position of the lower right corner of the part to copy
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A new image copied from a part of source image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 1, "name" : "despeckle", "qname" : "man:despeckle", "signature" : "($image as xs:base64Binary) as xs:base64Binary external", "description" : " Despeckle an image.\n", "summary" : "

Despeckle an image.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A despeckled copy of $image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 2, "name" : "edge", "qname" : "man:edge", "signature" : "($image as xs:base64Binary, $radius as xs:unsignedInt) as xs:base64Binary external", "description" : " Highlight edges in an image.\n", "summary" : "

Highlight edges in an image.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" }, { "name" : "radius", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
radius of the pixel neighborhood (0 for automatic selection)
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "An edged copy of $image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 3, "name" : "emboss", "qname" : "man:emboss", "signature" : "($image as xs:base64Binary, $radius as xs:double, $sigma as xs:double) as xs:base64Binary external", "description" : " Emboss an images (highlights edges with 3D effect).\n", "summary" : "

Emboss an images (highlights edges with 3D effect).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" }, { "name" : "radius", "type" : "xs:double", "occurrence" : null, "description" : "
radius of the Gaussian in pixels
" }, { "name" : "sigma", "type" : "xs:double", "occurrence" : null, "description" : "
standard deviation of the Laplacian in pixels
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "An embossed copy of $image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 1, "name" : "enhance", "qname" : "man:enhance", "signature" : "($image as xs:base64Binary) as xs:base64Binary external", "description" : " Enhance an images (minimizes noise).\n", "summary" : "

Enhance an images (minimizes noise).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "An enhanced copy of $image." }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 1, "name" : "equalize", "qname" : "man:equalize", "signature" : "($image as xs:base64Binary) as xs:base64Binary external", "description" : " Equalize an images (histogramm equalization).\n", "summary" : "

Equalize an images (histogramm equalization).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "An equalized copy of $image." }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 1, "name" : "erase", "qname" : "man:erase", "signature" : "($image as xs:base64Binary) as xs:base64Binary external", "description" : " Set all pixels of the image to the current backround color.\n In most cases, this will result in all pixels to be set to white.\n", "summary" : "

Set all pixels of the image to the current backround color.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
image to erase
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A copy of image with all pixels set to the current background color" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 1, "name" : "flip", "qname" : "man:flip", "signature" : "($image as xs:base64Binary) as xs:base64Binary external", "description" : " Flip an image (vertical rotation).\n", "summary" : "

Flip an image (vertical rotation).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
source image
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A vertically rotated copy of $image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 1, "name" : "flop", "qname" : "man:flop", "signature" : "($image as xs:base64Binary) as xs:base64Binary external", "description" : " Flop an image (horizontal rotation).\n", "summary" : "

Flop an image (horizontal rotation).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
source image
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A horizontally rotated copy of $image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 2, "name" : "gamma", "qname" : "man:gamma", "signature" : "($image as xs:base64Binary, $gamma-value as xs:double) as xs:base64Binary external", "description" : " Gamma correct an image.\n Gamma values less than zero will erase the image.\n", "summary" : "

Gamma correct an image.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" }, { "name" : "gamma-value", "type" : "xs:double", "occurrence" : null, "description" : "
value for which to gamma correct the image
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A gamma corrected copy of $image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 4, "name" : "gamma", "qname" : "man:gamma", "signature" : "($image as xs:base64Binary, $gamma-red as xs:double, $gamma-green as xs:double, $gamma-blue as xs:double) as xs:base64Binary external", "description" : " Gamma correct an image for every color channel seperately.\n Gamma values less than zero for any color will erase the corresponding color.\n", "summary" : "

Gamma correct an image for every color channel seperately.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" }, { "name" : "gamma-red", "type" : "xs:double", "occurrence" : null, "description" : "
value to gamma correct the red channel of the image
" }, { "name" : "gamma-green", "type" : "xs:double", "occurrence" : null, "description" : "
value to gamma correct the green channel of the image
" }, { "name" : "gamma-blue", "type" : "xs:double", "occurrence" : null, "description" : "
value to gamma correct the blue channel of the image
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A gamma corrected copy of $image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 2, "name" : "implode", "qname" : "man:implode", "signature" : "($image as xs:base64Binary, $factor as xs:double) as xs:base64Binary external", "description" : " Apply an implode effect to an image (a sort of special effect).\n", "summary" : "

Apply an implode effect to an image (a sort of special effect).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" }, { "name" : "factor", "type" : "xs:double", "occurrence" : null, "description" : "
factor to implode to
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "An imploded copy of $image." }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 2, "name" : "oil-paint", "qname" : "man:oil-paint", "signature" : "($image as xs:base64Binary, $radius as xs:double) as xs:base64Binary external", "description" : " Apply an oil paint effect to an image (makes the image look as if it was\n an oil paint).\n", "summary" : "

Apply an oil paint effect to an image (makes the image look as if it was\n an oil paint).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" }, { "name" : "radius", "type" : "xs:double", "occurrence" : null, "description" : "
radius with which to oil paint
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A oil-painted copy of $image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 5, "name" : "overlay", "qname" : "man:overlay", "signature" : "($image as xs:base64Binary, $overlay-image as xs:base64Binary, $overlay-upper-left-x as xs:unsignedInt, $overlay-upper-left-y as xs:unsignedInt, $operator as xs:string) as xs:base64Binary", "description" : " Overlay $image with $overlay-image at the specfied position.\n The $operator defines the details of the overlay and can have one of the\n following values:\n \n", "summary" : "

Overlay $image with $overlay-image at the specfied position.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
base image
" }, { "name" : "overlay-image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
image to overlay.
" }, { "name" : "overlay-upper-left-x", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
horizontal position within $image where the left upper edge of the $overlay-image is placed
" }, { "name" : "overlay-upper-left-y", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
vertical position within $image where the left upper edge of the $overlay-image is placed
" }, { "name" : "operator", "type" : "xs:string", "occurrence" : null, "description" : "
defines how the overlay image should be overlayed (see details in operator listing above)
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A new image consisting of $image overlayed with $overlay-image." }, "errors" : [ "ierr:IM001 passed image is invalid", "err:FORG0001 unsupported operator" ] }, { "isDocumented" : true, "arity" : 2, "name" : "reduce-noise", "qname" : "man:reduce-noise", "signature" : "($image as xs:base64Binary, $order as xs:double) as xs:base64Binary external", "description" : " Reduce noise of an image using a noise peak elemination filter.\n", "summary" : "

Reduce noise of an image using a noise peak elemination filter.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" }, { "name" : "order", "type" : "xs:double", "occurrence" : null, "description" : "
defines how much the noise is reduced
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A copy of $image with reduced noise" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 3, "name" : "resize", "qname" : "man:resize", "signature" : "($image as xs:base64Binary, $width as xs:unsignedInt, $height as xs:unsignedInt) as xs:base64Binary external", "description" : " Get a copy of the passed image with changed width and height (without\n zooming the image's content).\n To change the size of the actual contents of an image, use the zoom function.\n More in detail: If the new dimensions are greater than the current dimensions\n the new image will have the passed image in the upper left corner and the rest\n will be filled with the current background color.\n If the passed dimensions are less than the current dimensions, the new image\n will contain the specified rectangle of the passed image beginning at the upper\n left corner.\n", "summary" : "

Get a copy of the passed image with changed width and height (without\n zooming the image's content).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
image to resize
" }, { "name" : "width", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
new width
" }, { "name" : "height", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
new height
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "resized copy of the source image" }, "errors" : [ "ierr:IM001 passed image is invalid." ] }, { "isDocumented" : true, "arity" : 2, "name" : "rotate", "qname" : "man:rotate", "signature" : "($image as xs:base64Binary, $angle as xs:int) as xs:base64Binary external", "description" : " Get a new image as rotated copy of a passed source image (rotated by -360 to\n 360 degrees).\n The image is enlarged if this is required for containing the rotated image,\n but never shrunk even if the rotation would make a smaller image possible.\n", "summary" : "

Get a new image as rotated copy of a passed source image (rotated by -360 to\n 360 degrees).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
source image.
" }, { "name" : "angle", "type" : "xs:int", "occurrence" : null, "description" : "
between -360 to 360 degrees. Other values will be adjusted by modulo 360
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A rotated copy of $image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 2, "name" : "solarize", "qname" : "man:solarize", "signature" : "($image as xs:base64Binary, $factor as xs:double) as xs:base64Binary external", "description" : " Apply a solarize effect to the image (similar to the effect seen when\n exposing a photographic film to light during the development process).\n", "summary" : "

Apply a solarize effect to the image (similar to the effect seen when\n exposing a photographic film to light during the development process).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" }, { "name" : "factor", "type" : "xs:double", "occurrence" : null, "description" : "
strength of the solarization (0 to 65535; 65535=100%)
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A solarized copy of $image." }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 2, "name" : "stereo", "qname" : "man:stereo", "signature" : "($left-image as xs:base64Binary, $right-image as xs:base64Binary) as xs:base64Binary external", "description" : " Make two passed images appear as stereo image when viewed with red-blue glasses.\n Both images should be same but from a slightly different angle for this to work.\n Both images should have the same size, if not, the size of the left image will\n be taken.\n", "summary" : "

Make two passed images appear as stereo image when viewed with red-blue glasses.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "left-image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
left image for the stereo image.
" }, { "name" : "right-image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
right image for the stereo image.
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A new image as combined stereo image of both source images" }, "errors" : [ "ierr:IM001 one of the passed images is invalid" ] }, { "isDocumented" : true, "arity" : 5, "name" : "sub-image", "qname" : "man:sub-image", "signature" : "($image as xs:base64Binary, $left-upper-x as xs:unsignedInt, $left-upper-y as xs:unsignedInt, $width as xs:unsignedInt, $height as xs:unsignedInt) as xs:base64Binary external", "description" : " Copy a part of the source image specified by a rectangle.\n If the passed parameters for the sub-image specify a rectangle that isn't\n entirely within the source image only the area that lies within the image\n boundaries will be returned.\n", "summary" : "

Copy a part of the source image specified by a rectangle.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the image from which to extract a sub-image
" }, { "name" : "left-upper-x", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
is the x value of the upper left corner of the rectangle to cut out
" }, { "name" : "left-upper-y", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
is the y value of the upper left corner of the rectangle to cut out.
" }, { "name" : "width", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
width of the rectangle to cut out
" }, { "name" : "height", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
height of the rectangle to cut out
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A new image containing parts of the source image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 2, "name" : "swirl", "qname" : "man:swirl", "signature" : "($image as xs:base64Binary, $degree as xs:double) as xs:base64Binary external", "description" : " Swirl an image (image pixels are rotated by degree).\n", "summary" : "

Swirl an image (image pixels are rotated by degree).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" }, { "name" : "degree", "type" : "xs:double", "occurrence" : null, "description" : "
degree to swirl image pixels
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A swirled copy of $image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 2, "name" : "transparent", "qname" : "man:transparent", "signature" : "($image as xs:base64Binary, $color as xs:string) as xs:base64Binary", "description" : " Make all pixels of the specfied color transparent.\n This works correctly only with image types supporting transparency\n (e.g GIF or PNG).\n", "summary" : "

Make all pixels of the specfied color transparent.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" }, { "name" : "color", "type" : "xs:string", "occurrence" : null, "description" : "
color to make transparent (e.g. '#FFFFFF')
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A copy of $image with the specified color made transparent." }, "errors" : [ "ierr:IM001 passed image is invalid", "err:FORG0001 unsupported color" ] }, { "isDocumented" : true, "arity" : 1, "name" : "trim", "qname" : "man:trim", "signature" : "($image as xs:base64Binary) as xs:base64Binary external", "description" : " Trim edges of the image's background color from the image.\n", "summary" : "

Trim edges of the image's background color from the image.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A trimmed copy of $image" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 2, "name" : "watermark", "qname" : "man:watermark", "signature" : "($image as xs:base64Binary, $watermark as xs:base64Binary) as xs:base64Binary external", "description" : " Add a $watermark image to $image.\n", "summary" : "

Add a $watermark image to $image.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the source image
" }, { "name" : "watermark", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the watermark image
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A watermarked copy of $image" }, "errors" : [ "ierr:IM001 one of the passed images is invalid" ] }, { "isDocumented" : true, "arity" : 2, "name" : "zoom-by-height", "qname" : "man:zoom-by-height", "signature" : "($image as xs:base64Binary, $height as xs:unsignedInt) as xs:base64Binary external", "description" : " Zoom the passed image to a given new height while keeping the ratio between\n width and height.\n So, the width is scaled accordingly.\n Important note: this function does not change the size information stored\n in the image (e.g. basic:width will not show a different value).\n", "summary" : "

Zoom the passed image to a given new height while keeping the ratio between\n width and height.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
image to resize
" }, { "name" : "height", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
new height for the image in pixels
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A copy of $image with given $height and width adjusted accordingly" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 2, "name" : "zoom-by-width", "qname" : "man:zoom-by-width", "signature" : "($image as xs:base64Binary, $width as xs:unsignedInt) as xs:base64Binary external", "description" : " Zoom the passed image to a given new width while keeping the ratio between\n width and height.\n So, the height is scaled accordingly.\n Important note: this function does not change the size information stored\n in the image (e.g. basic:width will not show a different value).\n", "summary" : "

Zoom the passed image to a given new width while keeping the ratio between\n width and height.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
image to resize
" }, { "name" : "width", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
new width for the image in pixels
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A copy of $image with given $width and height changed accordingly" }, "errors" : [ "ierr:IM001 passed image is invalid" ] }, { "isDocumented" : true, "arity" : 2, "name" : "zoom", "qname" : "man:zoom", "signature" : "($image as xs:base64Binary, $ratio as xs:double) as xs:base64Binary external", "description" : " Zoom the passed image by the specified factor while keeping the ratio between\n width and height.\n A ratio of less than 1 will make the image smaller.\n A ratio of less or equal than 0 will not effect the image.\n Important note: this function does not change the size information stored in the\n image (e.g. basic:width will not show a different value).\n", "summary" : "

Zoom the passed image by the specified factor while keeping the ratio between\n width and height.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "image", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
image to resize
" }, { "name" : "ratio", "type" : "xs:double", "occurrence" : null, "description" : "
ratio to zoom width and height by
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "A copy of $image with resized content" }, "errors" : [ "ierr:IM001 passed image is invalid" ] } ], "variables" : [ ] }, "http://zorba.io/modules/http-client-wrapper" : { "ns" : "http://zorba.io/modules/http-client-wrapper", "description" : "

This module provides conversion functions between the\n XML Expath http-client request and response formats and the\n JSON http-client request and response formats used by the\n http://zorba.io/modules/http-client module.\n

\n

This module is reserved for internal use by the\n http://www.zorba-xquery.com/modules/http-client and the\n http://expath.org/ns/http-client modules.\n This module may be removed at any time. Method signature and\n semantics may change.\n

\n", "sees" : [ ], "authors" : [ "Federico Cavalieri" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.w3.org/2005/xqt-errors", "prefix" : "err" }, { "uri" : "http://expath.org/ns/error", "prefix" : "error" }, { "uri" : "http://expath.org/ns/http-client", "prefix" : "http-schema" }, { "uri" : "http://zorba.io/modules/http-client-wrapper", "prefix" : "http-wrapper" }, { "uri" : "http://jsoniq.org/functions", "prefix" : "jn" }, { "uri" : "http://zorba.io/modules/http-client", "prefix" : "json-http" }, { "uri" : "http://jsoniq.org/function-library", "prefix" : "libjn" }, { "uri" : "http://www.w3.org/2010/xslt-xquery-serialization", "prefix" : "ser" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 3, "name" : "http-nondeterministic-request", "qname" : "http-wrapper:http-nondeterministic-request", "signature" : "($request as element(*)?, $href as xs:string?, $bodies as item()*) as item()+", "description" : "

This function sends an HTTP request and returns the corresponding response.\n This function is declared non-deterministic and should only be used to issue\n requests which do not change the state of the server.

\n

Its inputs, outputs, and behavior are identical to the\n EXPath http-client's\n send-request() function (except that HTML responses are not tidied\n into XML - see the note above). It\n is provided here for use in Zorba installations that do not have\n the EXPath module available. If you have the option of using the\n EXPath module instead of this function, please do so, as it will\n allow your application to be more interoperable between different\n XQuery engines.

\n

Full documentation of the $request parameter can be found in\n the EXPath\n specification.

\n", "summary" : "

This function sends an HTTP request and returns the corresponding response.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "request", "type" : "element(*)", "occurrence" : "?", "description" : "
Contains the various parameters of the request (see above).
" }, { "name" : "href", "type" : "xs:string", "occurrence" : "?", "description" : "
The URL to which the request will be made (see note above). If this parameter is specified, it will override the \"href\" attribute of $request.
" }, { "name" : "bodies", "type" : "item()", "occurrence" : "*", "description" : "
is the request body content, for HTTP methods that can contain a body in the request (i.e. POST and PUT). It is an error if this param is not the empty sequence for methods
" } ], "returns" : { "type" : "item()+", "description" : "standard http-client return type." }, "errors" : [ "error:HC001 An HTTP error occurred.", "error:HC002 Error parsing the response content as XML.", "error:HC003 With a multipart response, the override-media-type must be either a multipart media type or application/octet-stream.", "error:HC004 The src attribute on the body element is mutually exclusive with all other attribute (except the media-type).", "error:HC005 The input request element is not valid.", "error:HC006 A timeout occurred waiting for the response.", "error:HCV02 Trying to follow a redirect of a POST, PUT, or DELETE request" ] }, { "isDocumented" : true, "arity" : 3, "name" : "http-sequential-request", "qname" : "http-wrapper:http-sequential-request", "signature" : "($request as element(*)?, $href as xs:string?, $bodies as item()*) as item()+", "description" : "

This function sends an HTTP request and returns the corresponding response.\n This function is declared sequential and can be used to issue\n requests which change the state of the server.

\n

Its inputs, outputs, and behavior are identical to the\n EXPath http-client's\n send-request() function (except that HTML responses are not tidied\n into XML - see the note above). It\n is provided here for use in Zorba installations that do not have\n the EXPath module available. If you have the option of using the\n EXPath module instead of this function, please do so, as it will\n allow your application to be more interoperable between different\n XQuery engines.

\n

Full documentation of the $request parameter can be found in\n the EXPath\n specification.

\n", "summary" : "

This function sends an HTTP request and returns the corresponding response.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "request", "type" : "element(*)", "occurrence" : "?", "description" : "
Contains the various parameters of the request (see above).
" }, { "name" : "href", "type" : "xs:string", "occurrence" : "?", "description" : "
The URL to which the request will be made (see note above). If this parameter is specified, it will override the \"href\" attribute of $request.
" }, { "name" : "bodies", "type" : "item()", "occurrence" : "*", "description" : "
is the request body content, for HTTP methods that can contain a body in the request (i.e. POST and PUT). It is an error if this param is not the empty sequence for methods
" } ], "returns" : { "type" : "item()+", "description" : "standard http-client return type." }, "errors" : [ "error:HC001 An HTTP error occurred.", "error:HC002 Error parsing the response content as XML.", "error:HC003 With a multipart response, the override-media-type must be either a multipart media type or application/octet-stream.", "error:HC004 The src attribute on the body element is mutually exclusive with all other attribute (except the media-type).", "error:HC005 The input request element is not valid.", "error:HC006 A timeout occurred waiting for the response.", "error:HCV02 Trying to follow a redirect of a POST, PUT, or DELETE request" ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/cloudsearch" : { "ns" : "http://www.28msec.com/modules/cloudsearch", "description" : "

This module offers functionality to search, add, update and remove documents in\n an Amazon CloudSearch domain.

\n

For each functionality two methods are provided\n

\n

\n

Important Notice Regarding Function Determinism

\n

The search functions (search#1 and\n search#2) are declared deterministic, which means that\n their results could be cached when invoked multiple times with the same arguments\n in the same query execution.

\n

To not use cached results you can use two alternative search functions\n (search-nondeterministic#1 and\n search-nondeterministic#2), which have\n been declared as being non deterministic.

\n

Search options

\n

The search settings are specified by means of an object whose form\n is described in the following. The two most important fields are the\n \"q\" and \"bq\" fields. At least one of them must be specified. If the \"bq\"\n field is specified in conjunction with the \"q\" parameter, the values\n are joined with a top-level AND.\n

\n

\n

Additional documentation on the format of the query and boolean query strings can\n be found at:\n \n Expression Syntax for Boolean Queries.

\n

The following additional optional parameters can be specified.\n

\n For additional details on the search parameters you can refer to the\n \n Amazon CloudSearch search requests documentation.

\n

Search Results

\n

The format of the returned object is the following:\n

\n {\n   \"rank\" : \"-text_relevance\",\n   \"match-expr\" : \"(label 'star wars')\",\n   \"hits\" :\n   {\n     \"found\" : 2,\n     \"start\" : 0,\n     \"hit\" :\n     [\n       {\n         \"id\" : \"tt1185834\",\n         \"data\" :\n         {\n           \"actor\" : [\"Abercrombie, Ian\",\"Baker, Dee\",\"Burton, Corey\"],\n           \"title\" : [\"Star Wars: The Clone Wars\"]\n         }\n       },\n       {\n         \"id\" :\"tt0121766\",\n         \"data\" :\n         {\n           \"actor\" : [\"Bai, Ling\",\"Bryant, Gene\",\"Castle-Hughes, Keisha\"],\n           \"title\" : [\"Star Wars: Episode III - Revenge of the Sith\"]\n         }\n       }\n     ]\n   },\n   \"info\" :\n   {\n     \"rid\" : \"b7c167f6c2da6d93531b9a7b314ad030b3a74803b4b7797edb905ba5a6a08\",\n     \"time-ms\" : 2,\n     \"cpu-time-ms\" : 0\n   }\n }\n 
\n

\n

The returned object fields have the following meaning:\n

\n

\n", "sees" : [ ], "authors" : [ "Federico Cavalieri" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.28msec.com/modules/cloudsearch", "prefix" : "cloudsearch" }, { "uri" : "http://www.28msec.com/modules/credentials", "prefix" : "credentials" }, { "uri" : "http://zorba.io/modules/http-client", "prefix" : "http" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "add-document", "qname" : "cloudsearch:add-document", "signature" : "($options as object()) as object()", "description" : "

Adds or replaces a document in the default Amazon CloudSearch domain.

\n

An add operation is applied only if a document with the same id is not\n present or if the version number specified in the operation is greater than\n the existing document's version number.

\n

The document to add or replace is specified through an object with\n the following form:\n

\n {\n   \"id\" : \"tt0484562\",\n   \"version\" : 1,\n   \"lang\" : \"en\",\n   \"fields\" :\n   {\n     \"title\" : \"The Seeker: The Dark Is Rising\",\n     \"genre\" : [\"Adventure\",\"Drama\",\"Fantasy\",\"Thriller\"]\n   }\n }\n 
\n

\n

Specifically, the fields in the request object have the following meaning:\n

\n

\n

The returned object lists all warnings that were generated.\n

\n {\n   \"status\" : \"success\",\n   \"warning\" :\n   [\n     {\"message\" : \"Warning message.\"}\n   ]\n }\n 
\n

\n

Specifically, the fields in the response object have the following meaning:\n

\n

\n

Example, specifying endpoint URI:\n

\n cloudsearch:add-document(\n anyURI(\"http://doc-movies-h2pc7ftfnsdlqh6pqqawbftrhu.us-east-1.cloudsearch.amazonaws.com\"),\n {\n   \"id\" : \"tt0484562\",\n   \"version\" : 1,\n   \"lang\" : \"en\",\n   \"fields\" :\n   {\n     \"title\" : \"The Seeker: The Dark Is Rising\",\n     \"genre\" : [\"Adventure\",\"Drama\",\"Fantasy\",\"Thriller\"]\n   }\n });\n 
\n

\n

Example, using stored credentials:\n

\n cloudsearch:add-document(\"movies\",\n {\n   \"id\" : \"tt0484562\",\n   \"version\" : 1,\n   \"lang\" : \"en\",\n   \"fields\" :\n   {\n     \"title\" : \"The Seeker: The Dark Is Rising\",\n     \"genre\" : [\"Adventure\",\"Drama\",\"Fantasy\",\"Thriller\"]\n   }\n });\n 
\n

\n", "summary" : "

Adds or replaces a document in the default Amazon CloudSearch domain.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying the request options
" } ], "returns" : { "type" : "object()", "description" : "The request response" }, "errors" : [ "cloudsearch:ENDPOINT if the default credentials endpoint is invalid or not present", "cloudsearch:AUTHORIZATION if the request was unauthorized", "cloudsearch:HTTP if an HTTP error has occurred", "cloudsearch:REQUEST if the request is malformed", "cloudsearch:RESOURCES if the server storage or bandwidth resources are insufficient to execute the request", "cloudsearch:INTERNAL if an internal server error occurred", "cloudsearch:RESPONSE if the CloudSearch response cannot be parsed" ] }, { "isDocumented" : true, "arity" : 2, "name" : "add-document", "qname" : "cloudsearch:add-document", "signature" : "($endpoint as atomic, $options as object()) as object()", "description" : "

Adds or replaces a document in the specified Amazon CloudSearch domain.

\n

An add operation is applied only if a document with the same id is not\n present or if the version number specified in the operation is greater than\n the existing document's version number.

\n

The document to add or replace is specified through an object with\n the following form:\n

\n {\n   \"id\" : \"tt0484562\",\n   \"version\" : 1,\n   \"lang\" : \"en\",\n   \"fields\" :\n   {\n     \"title\" : \"The Seeker: The Dark Is Rising\",\n     \"genre\" : [\"Adventure\",\"Drama\",\"Fantasy\",\"Thriller\"]\n   }\n }\n 
\n

\n

Specifically, the fields in the request object have the following meaning:\n

\n

\n

The returned object lists all warnings that were generated.\n

\n {\n   \"status\" : \"success\",\n   \"warning\" :\n   [\n     {\"message\" : \"Warning message.\"}\n   ]\n }\n 
\n

\n

Specifically, the fields in the response object have the following meaning:\n

\n

\n

Example, specifying endpoint URI:\n

\n cloudsearch:add-document(\n anyURI(\"http://doc-movies-h2pc7ftfnsdlqh6pqqawbftrhu.us-east-1.cloudsearch.amazonaws.com\"),\n {\n   \"id\" : \"tt0484562\",\n   \"version\" : 1,\n   \"lang\" : \"en\",\n   \"fields\" :\n   {\n     \"title\" : \"The Seeker: The Dark Is Rising\",\n     \"genre\" : [\"Adventure\",\"Drama\",\"Fantasy\",\"Thriller\"]\n   }\n });\n 
\n

\n

Example, using stored credentials:\n

\n cloudsearch:add-document(\"movies\",\n {\n   \"id\" : \"tt0484562\",\n   \"version\" : 1,\n   \"lang\" : \"en\",\n   \"fields\" :\n   {\n     \"title\" : \"The Seeker: The Dark Is Rising\",\n     \"genre\" : [\"Adventure\",\"Drama\",\"Fantasy\",\"Thriller\"]\n   }\n });\n 
\n

\n", "summary" : "

Adds or replaces a document in the specified Amazon CloudSearch domain.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint", "type" : "atomic", "occurrence" : null, "description" : "
The endpoint URI or the name of a stored CloudSearch credentials
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying the request options
" } ], "returns" : { "type" : "object()", "description" : "The request response" }, "errors" : [ "cloudsearch:ENDPOINT if the specified endpoint is invalid", "cloudsearch:AUTHORIZATION if the request was unauthorized", "cloudsearch:HTTP if an HTTP error has occurred", "cloudsearch:REQUEST if the request is malformed", "cloudsearch:RESOURCES if the server storage or bandwidth resources are insufficient to execute the request", "cloudsearch:INTERNAL if an internal server error occurred", "cloudsearch:RESPONSE if the CloudSearch response cannot be parsed" ] }, { "isDocumented" : true, "arity" : 1, "name" : "batch-document", "qname" : "cloudsearch:batch-document", "signature" : "($options as array()) as object()", "description" : "

Adds, replaces or removes one or more documents from the default Amazon\n CloudSearch domain.

\n

An add or delete operation is only applied to an existing document if the\n version number specified in the operation is greater than the existing document\n version number.\n If multiple add or delete operations for the same document are specified, the\n operation with the highest version number is applied. If multiple operations in\n a batch specify the same document and version number, the document service\n arbitrarily picks which one to apply.

\n

The documents to add, replace or delete can be specified through an array with\n the following form:\n

\n [\n   {\n     \"type\" : \"add\",\n     \"id\" :   \"tt0484562\",\n     \"version\" : 1,\n     \"lang\" : \"en\",\n     \"fields\" :\n     {\n       \"title\" : \"The Seeker: The Dark Is Rising\",\n       \"genre\" : [\"Adventure\",\"Drama\",\"Fantasy\",\"Thriller\"],\n     }\n   },\n   {\n     \"type\" : \"delete\",\n     \"id\" :   \"tt0484575\",\n     \"version\" : 2\n   }\n ]\n 
\n

\n

Specifically, the fields in the request array have the following meaning:\n

\n

\n

The response body lists any warning that was generated.\n

\n {\n   \"status\" : \"success\",\n   \"adds\" : 1,\n   \"deletes: 1,\n   \"warning\" :\n   [\n     {\"message\" : \"Warning message.\"}\n   ]\n }\n 
\n

\n

Specifically, the fields in the response object have the following meaning:\n

\n

\n

Example, using specified endpoint URI:\n

\n cloudsearch:batch-document(\n anyURI(\"http://doc-movies-h2pc7ftfnsdlqh6pqqawbftrhu.us-east-1.cloudsearch.amazonaws.com\"),\n [\n   {\n     \"type\" : \"add\",\n     \"id\" :   \"tt0484562\",\n     \"version\" : 1,\n     \"lang\" : \"en\",\n     \"fields\" :\n     {\n       \"title\" : \"The Seeker: The Dark Is Rising\",\n       \"genre\" : [\"Adventure\",\"Drama\",\"Fantasy\",\"Thriller\"],\n     }\n   },\n   {\n     \"type\" : \"delete\",\n     \"id\" :   \"tt0484575\",\n     \"version\" : 2\n   }\n ]);\n 
\n

\n

Example, using specified endpoint URI:\n

\n cloudsearch:batch-document(\"movies\",\n [\n   {\n     \"type\" : \"add\",\n     \"id\" :   \"tt0484562\",\n     \"version\" : 1,\n     \"lang\" : \"en\",\n     \"fields\" :\n     {\n       \"title\" : \"The Seeker: The Dark Is Rising\",\n       \"genre\" : [\"Adventure\",\"Drama\",\"Fantasy\",\"Thriller\"],\n     }\n   },\n   {\n     \"type\" : \"delete\",\n     \"id\" :   \"tt0484575\",\n     \"version\" : 2\n   }\n ]);\n 
\n

\n", "summary" : "

Adds, replaces or removes one or more documents from the default Amazon\n CloudSearch domain.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "options", "type" : "array()", "occurrence" : null, "description" : "
An object specifying the request options
" } ], "returns" : { "type" : "object()", "description" : "The request response" }, "errors" : [ "cloudsearch:ENDPOINT if the default credentials endpoint is invalid or not present", "cloudsearch:AUTHORIZATION if the request was unauthorized", "cloudsearch:HTTP if an HTTP error has occurred", "cloudsearch:REQUEST if the request is malformed", "cloudsearch:RESOURCES if the server storage or bandwidth resources are insufficient to execute the request", "cloudsearch:INTERNAL if an internal server error occurred", "cloudsearch:RESPONSE if the CloudSearch response cannot be parsed" ] }, { "isDocumented" : true, "arity" : 2, "name" : "batch-document", "qname" : "cloudsearch:batch-document", "signature" : "($endpoint as atomic, $options as array()) as object()", "description" : "

Adds, replaces or removes one or more documents from the specified Amazon\n CloudSearch domain.

\n

An add or delete operation is only applied to an existing document if the\n version number specified in the operation is greater than the existing document\n version number.\n If multiple add or delete operations for the same document are specified, the\n operation with the highest version number is applied. If multiple operations in\n a batch specify the same document and version number, the document service\n arbitrarily picks which one to apply.

\n

The documents to add, replace or delete can be specified through an array with\n the following form:\n

\n [\n   {\n     \"type\" : \"add\",\n     \"id\" :   \"tt0484562\",\n     \"version\" : 1,\n     \"lang\" : \"en\",\n     \"fields\" :\n     {\n       \"title\" : \"The Seeker: The Dark Is Rising\",\n       \"genre\" : [\"Adventure\",\"Drama\",\"Fantasy\",\"Thriller\"],\n     }\n   },\n   {\n     \"type\" : \"delete\",\n     \"id\" :   \"tt0484575\",\n     \"version\" : 2\n   }\n ]\n 
\n

\n

Specifically, the fields in the request array have the following meaning:\n

\n

\n

The response body lists any warning that was generated.\n

\n {\n   \"status\" : \"success\",\n   \"adds\" : 1,\n   \"deletes: 1,\n   \"warning\" :\n   [\n     {\"message\" : \"Warning message.\"}\n   ]\n }\n 
\n

\n

Specifically, the fields in the response object have the following meaning:\n

\n

\n

Example, using specified endpoint URI:\n

\n cloudsearch:batch-document(\n anyURI(\"http://doc-movies-h2pc7ftfnsdlqh6pqqawbftrhu.us-east-1.cloudsearch.amazonaws.com\"),\n [\n   {\n     \"type\" : \"add\",\n     \"id\" :   \"tt0484562\",\n     \"version\" : 1,\n     \"lang\" : \"en\",\n     \"fields\" :\n     {\n       \"title\" : \"The Seeker: The Dark Is Rising\",\n       \"genre\" : [\"Adventure\",\"Drama\",\"Fantasy\",\"Thriller\"],\n     }\n   },\n   {\n     \"type\" : \"delete\",\n     \"id\" :   \"tt0484575\",\n     \"version\" : 2\n   }\n ]);\n 
\n

\n

Example, using specified endpoint URI:\n

\n cloudsearch:batch-document(\"movies\",\n [\n   {\n     \"type\" : \"add\",\n     \"id\" :   \"tt0484562\",\n     \"version\" : 1,\n     \"lang\" : \"en\",\n     \"fields\" :\n     {\n       \"title\" : \"The Seeker: The Dark Is Rising\",\n       \"genre\" : [\"Adventure\",\"Drama\",\"Fantasy\",\"Thriller\"],\n     }\n   },\n   {\n     \"type\" : \"delete\",\n     \"id\" :   \"tt0484575\",\n     \"version\" : 2\n   }\n ]);\n 
\n

\n", "summary" : "

Adds, replaces or removes one or more documents from the specified Amazon\n CloudSearch domain.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint", "type" : "atomic", "occurrence" : null, "description" : "
The endpoint URI or the name of a stored CloudSearch credentials
" }, { "name" : "options", "type" : "array()", "occurrence" : null, "description" : "
An object specifying the request options
" } ], "returns" : { "type" : "object()", "description" : "The request response" }, "errors" : [ "cloudsearch:ENDPOINT if the specified endpoint is invalid", "cloudsearch:AUTHORIZATION if the request was unauthorized", "cloudsearch:HTTP if an HTTP error has occurred", "cloudsearch:REQUEST if the request is malformed", "cloudsearch:RESOURCES if the server storage or bandwidth resources are insufficient to execute the request", "cloudsearch:INTERNAL if an internal server error occurred", "cloudsearch:RESPONSE if the CloudSearch response cannot be parsed" ] }, { "isDocumented" : true, "arity" : 1, "name" : "delete-document", "qname" : "cloudsearch:delete-document", "signature" : "($options as object()) as object()", "description" : "

Deletes a document from the default Amazon CloudSearch domain.

\n

A delete operation is only applied to an existing document if the\n version number specified in the operation is greater than the existing\n document's version number.

\n

The document to remove is specified through an object with the\n following form:\n

\n {\n   \"id\" : \"tt0484562\",\n   \"version\" : 2\n }\n 
\n

\n

Specifically, the fields in the request object have the following meaning:\n

\n

\n

The response body lists any warning that was generated.\n

\n {\n   \"status\" : \"success\",\n   \"warning\" :\n   [\n     {\"message\" : \"Warning message.\"}\n   ]\n }\n 
\n

\n

Specifically, the fields in the response object have the following meaning:\n

\n

\n

Example, using specified endpoint URI:\n

\n cloudsearch:delete-document(\n anyURI(\"http://doc-movies-h2pc7ftfnsdlqh6pqqawbftrhu.us-east-1.cloudsearch.amazonaws.com\"),\n {\n   \"id\" : \"tt0484562\",\n   \"version\" : 2\n });\n 
\n

\n

Example, using specified stored endpoing:\n

\n cloudsearch:delete-document(\"movies\",\n {\n   \"id\" : \"tt0484562\",\n   \"version\" : 2\n });\n 
\n

\n", "summary" : "

Deletes a document from the default Amazon CloudSearch domain.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying the request options
" } ], "returns" : { "type" : "object()", "description" : "The request response" }, "errors" : [ "cloudsearch:ENDPOINT if the default credentials endpoint is invalid or not present", "cloudsearch:AUTHORIZATION if the request was unauthorized", "cloudsearch:HTTP if an HTTP error has occurred", "cloudsearch:REQUEST if the request is malformed", "cloudsearch:RESOURCES if the server storage or bandwidth resources are insufficient to execute the request", "cloudsearch:INTERNAL if an internal server error occurred", "cloudsearch:RESPONSE if the CloudSearch response cannot be parsed" ] }, { "isDocumented" : true, "arity" : 2, "name" : "delete-document", "qname" : "cloudsearch:delete-document", "signature" : "($endpoint as atomic, $options as object()) as object()", "description" : "

Deletes a document from the specified Amazon CloudSearch domain.

\n

A delete operation is only applied to an existing document if the\n version number specified in the operation is greater than the existing\n document's version number.

\n

The document to remove is specified through an object with the\n following form:\n

\n {\n   \"id\" : \"tt0484562\",\n   \"version\" : 2\n }\n 
\n

\n

Specifically, the fields in the request object have the following meaning:\n

\n

\n

The response body lists any warning that was generated.\n

\n {\n   \"status\" : \"success\",\n   \"warning\" :\n   [\n     {\"message\" : \"Warning message.\"}\n   ]\n }\n 
\n

\n

Specifically, the fields in the response object have the following meaning:\n

\n

\n

Example, using specified endpoint URI:\n

\n cloudsearch:delete-document(\n anyURI(\"http://doc-movies-h2pc7ftfnsdlqh6pqqawbftrhu.us-east-1.cloudsearch.amazonaws.com\"),\n {\n   \"id\" : \"tt0484562\",\n   \"version\" : 2\n });\n 
\n

\n

Example, using specified stored endpoing:\n

\n cloudsearch:delete-document(\"movies\",\n {\n   \"id\" : \"tt0484562\",\n   \"version\" : 2\n });\n 
\n

\n", "summary" : "

Deletes a document from the specified Amazon CloudSearch domain.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint", "type" : "atomic", "occurrence" : null, "description" : "
The endpoint URI or the name of a stored CloudSearch credentials
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying the request options
" } ], "returns" : { "type" : "object()", "description" : "The request response" }, "errors" : [ "cloudsearch:ENDPOINT if the specified endpoint is invalid", "cloudsearch:AUTHORIZATION if the request was unauthorized", "cloudsearch:HTTP if an HTTP error has occurred", "cloudsearch:REQUEST if the request is malformed", "cloudsearch:RESOURCES if the server storage or bandwidth resources are insufficient to execute the request", "cloudsearch:INTERNAL if an internal server error occurred", "cloudsearch:RESPONSE if the CloudSearch response cannot be parsed" ] }, { "isDocumented" : true, "arity" : 1, "name" : "search-nondeterministic", "qname" : "cloudsearch:search-nondeterministic", "signature" : "($options as object()) as object()", "description" : "

Searches the documents in the default Amazon CloudSearch domain.

\n

This function has the same semantics as search#1,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Searches the documents in the default Amazon CloudSearch domain.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
The search options object
" } ], "returns" : { "type" : "object()", "description" : "The search results object" }, "errors" : [ "cloudsearch:ENDPOINT if the default credentials endpoint is invalid or not present", "cloudsearch:AUTHORIZATION if the request was unauthorized", "cloudsearch:HTTP if an HTTP error has occurred", "cloudsearch:REQUEST if the request is malformed", "cloudsearch:INTERNAL if an internal server error occurred", "cloudsearch:RESPONSE if the CloudSearch response cannot be parsed" ] }, { "isDocumented" : true, "arity" : 2, "name" : "search-nondeterministic", "qname" : "cloudsearch:search-nondeterministic", "signature" : "($endpoint as atomic, $options as object()) as object()", "description" : "

Searches the documents in the specified Amazon CloudSearch domain.

\n

This function has the same semantics as search#2,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Searches the documents in the specified Amazon CloudSearch domain.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "endpoint", "type" : "atomic", "occurrence" : null, "description" : "
The endpoint URI or the name of a stored CloudSearch credentials
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
The search options object
" } ], "returns" : { "type" : "object()", "description" : "The search results object" }, "errors" : [ "cloudsearch:ENDPOINT if the specified endpoint is invalid", "cloudsearch:AUTHORIZATION if the request was unauthorized", "cloudsearch:HTTP if an HTTP error has occurred", "cloudsearch:REQUEST if the request is malformed", "cloudsearch:INTERNAL if an internal server error occurred", "cloudsearch:RESPONSE if the CloudSearch response cannot be parsed" ] }, { "isDocumented" : true, "arity" : 1, "name" : "search", "qname" : "cloudsearch:search", "signature" : "($options as object()) as object()", "description" : "

Searches the documents in the default Amazon CloudSearch domain.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

The format of the search options object and\n of the search results object is documented in\n the module introduction.

\n

Example:\n

\n cloudsearch:search({\"q\" : \"star+wars\", \"return-fields\" : \"title\"})\n 
\n

\n

Example returned object:\n

\n {\n   \"rank\" : \"-text_relevance\",\n   \"match-expr\" : \"(label 'star wars')\",\n   \"hits\" :\n   {\n     \"found\" : 2,\n     \"start\" : 0,\n     \"hit\" :\n     [\n       {\n         \"id\" : \"tt1185834\",\n         \"data\" :\n         {\n           \"actor\" : [\"Abercrombie, Ian\",\"Baker, Dee\",\"Burton, Corey\"],\n           \"title\" : [\"Star Wars: The Clone Wars\"]\n         }\n       },\n       {\n         \"id\" :\"tt0121766\",\n         \"data\" :\n         {\n           \"actor\" : [\"Bai, Ling\",\"Bryant, Gene\",\"Castle-Hughes, Keisha\"],\n           \"title\" : [\"Star Wars: Episode III - Revenge of the Sith\"]\n         }\n       }\n     ]\n   },\n   \"info\" :\n   {\n     \"rid\" : \"b7c167f6c2da6d93531b9a7b314ad030b3a74803b4b7797edb905ba5a6a08\",\n     \"time-ms\" : 2,\n     \"cpu-time-ms\" : 0\n   }\n }\n 
\n

\n", "summary" : "

Searches the documents in the default Amazon CloudSearch domain.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
The search options object
" } ], "returns" : { "type" : "object()", "description" : "The search results object" }, "errors" : [ "cloudsearch:ENDPOINT if the default credentials endpoint is invalid or not present", "cloudsearch:AUTHORIZATION if the request was unauthorized", "cloudsearch:HTTP if an HTTP error has occurred", "cloudsearch:REQUEST if the request is malformed", "cloudsearch:INTERNAL if an internal server error occurred", "cloudsearch:RESPONSE if the CloudSearch response cannot be parsed" ] }, { "isDocumented" : true, "arity" : 2, "name" : "search", "qname" : "cloudsearch:search", "signature" : "($endpoint as atomic, $options as object()) as object()", "description" : "

Searches the documents in the specified Amazon CloudSearch domain.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

The format of the search options object and\n of the search results object is documented in\n the module introduction.

\n

The following examples performs a simple text search for all documents\n containing both the word \"star\" and \"trek\" and returns the matching document\n title field.

\n

Example, using specified endpoint URI:\n

\n cloudsearch:search(\n anyURI(\"http://doc-movies-h2pc7ftfnsdlqh6pqqawbftrhu.us-east-1.cloudsearch.amazonaws.com\"),\n {\"q\" : \"star+wars\", \"return-fields\" : \"title\"})\n 
\n

\n

Example, using a stored endpoint:\n

\n cloudsearch:search(\"movies\",\n {\"q\" : \"star+wars\", \"return-fields\" : \"title\"})\n 
\n

\n", "summary" : "

Searches the documents in the specified Amazon CloudSearch domain.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "endpoint", "type" : "atomic", "occurrence" : null, "description" : "
The endpoint URI or the name of a stored CloudSearch credentials
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
The search options object
" } ], "returns" : { "type" : "object()", "description" : "The search results object" }, "errors" : [ "cloudsearch:ENDPOINT if the specified endpoint is invalid", "cloudsearch:AUTHORIZATION if the request was unauthorized", "cloudsearch:HTTP if an HTTP error has occurred", "cloudsearch:REQUEST if the request is malformed", "cloudsearch:INTERNAL if an internal server error occurred", "cloudsearch:RESPONSE if the CloudSearch response cannot be parsed" ] } ], "variables" : [ ] }, "http://zorba.io/modules/store/static/indexes/ddl" : { "ns" : "http://zorba.io/modules/store/static/indexes/ddl", "description" : " This modules defines a set of functions for managing indexes that are\n declared in the prolog of a module.\n

\n This module is part of\n Zorba's XQuery Data Definition Facility.\n All the indexes managed by this module have to be pre-declared in the prolog\n of a module.\n Please refer to the\n general documentation\n for more information and examples.\n", "sees" : [ "Data Lifecycle", "XQuery Data Definition Facility", "http://zorba.io/modules/store/static/indexes/dml", "http://zorba.io/modules/store/static/collections/dml", "http://zorba.io/modules/store/static/collections/ddl", "http://zorba.io/modules/store/static/integrity-constraints/ddl", "http://zorba.io/modules/store/static/integrity-constraints/dml", "http://zorba.io/errors" ], "authors" : [ "Nicolae Brinza, Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/store/static/indexes/ddl", "prefix" : "iddl" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/errors", "prefix" : "zerr" } ], "functions" : [ { "isDocumented" : true, "arity" : 0, "name" : "available-indexes", "qname" : "iddl:available-indexes", "signature" : "() as xs:QName* external", "description" : " Gets the available indexes.\n", "summary" : "

Gets the available indexes.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:QName*", "description" : "A sequence of QNames, one for each available index, or an empty sequence if none are." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "create", "qname" : "iddl:create", "signature" : "($name as xs:QName) external", "description" : " Creates an index.\n", "summary" : "

Creates an index.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the index to create.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, creates the index with the given name." }, "errors" : [ "zerr:ZDDY0021 if $name is not equal to the name of any resource in the statically known indexes.", "zerr:ZDDY0022 if an index with $name already exists." ] }, { "isDocumented" : true, "arity" : 0, "name" : "declared-indexes", "qname" : "iddl:declared-indexes", "signature" : "() as xs:QName* external", "description" : " Gets a sequence of QNames representing the indexes that have been declared\n in the prolog of the static context.\n", "summary" : "

Gets a sequence of QNames representing the indexes that have been declared\n in the prolog of the static context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:QName*", "description" : "A sequence of QNames, one for each created collection, or an emtpy sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "delete", "qname" : "iddl:delete", "signature" : "($name as xs:QName) external", "description" : " Deletes an index.\n", "summary" : "

Deletes an index.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the index to delete.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, deletes the index with the given name." }, "errors" : [ "zerr:ZDDY0009 if the index does not exist." ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-available-index", "qname" : "iddl:is-available-index", "signature" : "($name as xs:QName) as xs:boolean external", "description" : " Gets whether an index exists.\n", "summary" : "

Gets whether an index exists.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the index that is being checked.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the index is available; false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-declared-index", "qname" : "iddl:is-declared-index", "signature" : "($name as xs:QName) as xs:boolean external", "description" : " Gets whether an index has been declared in the prolog of the static context.\n", "summary" : "

Gets whether an index has been declared in the prolog of the static context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the index that is being checked.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the index was declared; false otherwise." }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/excel/datetime" : { "ns" : "http://zorba.io/modules/excel/datetime", "description" : " This is a library module offering the same set of functions\n defined by Microsoft Excel.\n", "sees" : [ "Excel Documentation: Datetime Functions" ], "authors" : [ "Sorin Nasoi" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/excel/datetime", "prefix" : "excel-datetime" }, { "uri" : "http://zorba.io/modules/excel/errors", "prefix" : "excel-err" }, { "uri" : "http://zorba.io/modules/excel/text", "prefix" : "excel-text" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 3, "name" : "date", "qname" : "excel-datetime:date", "signature" : "($year as xs:integer, $month as xs:integer, $day as xs:integer) as xs:date?", "description" : " Constructs a date given the hours, months and days.\n", "summary" : "

Constructs a date given the hours, months and days.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "year", "type" : "xs:integer", "occurrence" : null, "description" : "
the year
" }, { "name" : "month", "type" : "xs:integer", "occurrence" : null, "description" : "
the month
" }, { "name" : "day", "type" : "xs:integer", "occurrence" : null, "description" : "
the day
" } ], "returns" : { "type" : "xs:date?", "description" : "A date given the hours, months and days" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "day", "qname" : "excel-datetime:day", "signature" : "($date as xs:date) as xs:integer?", "description" : " Returns the day of a $date, represented by a serial number.\n", "summary" : "

Returns the day of a $date, represented by a serial number.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:date", "occurrence" : null, "description" : "
the date.
" } ], "returns" : { "type" : "xs:integer?", "description" : "The day of a $date, represented by a serial number. The day is given as an integer ranging from 1 to 31." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "days360", "qname" : "excel-datetime:days360", "signature" : "($start_date as xs:date, $end_date as xs:date) as xs:integer", "description" : " Returns the number of days between two dates based on a 360-day year.\n", "summary" : "

Returns the number of days between two dates based on a 360-day year.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "start_date", "type" : "xs:date", "occurrence" : null, "description" : "
the start date.
" }, { "name" : "end_date", "type" : "xs:date", "occurrence" : null, "description" : "
the end date.
" } ], "returns" : { "type" : "xs:integer", "description" : "The number of days between two dates based on a 360-day year (twelve 30-day months), which is used in some accounting calculations.

Use this function to help compute payments if your accounting system is based on twelve 30-day months.

The metod used is U.S. (NASD). If the starting date is the last day of a month, it becomes equal to the 30th of the same month.

If the ending date is the last day of a month and the starting date is earlier than the 30th of a month, the ending date becomes equal to the 1st of the next month; otherwise the ending date becomes equal to the 30th of the same month." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "days360", "qname" : "excel-datetime:days360", "signature" : "($start_date as xs:date, $end_date as xs:date, $method as xs:boolean) as xs:integer", "description" : " Returns the number of days between two dates based on a 360-day year.\n", "summary" : "

Returns the number of days between two dates based on a 360-day year.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "start_date", "type" : "xs:date", "occurrence" : null, "description" : "
the start date.
" }, { "name" : "end_date", "type" : "xs:date", "occurrence" : null, "description" : "
the end date.
" }, { "name" : "method", "type" : "xs:boolean", "occurrence" : null, "description" : "
if false then US/NASD Method is used, otherwise the European Method is used.
" } ], "returns" : { "type" : "xs:integer", "description" : "The number of days between two dates based on a 360-day year (twelve 30-day months), which is used in some accounting calculations. Use this function to help compute payments if your accounting system is based on twelve 30-day months.

The European Method (30E/360)

- If either date A or B falls on the 31st of the month, that date will be changed to the 30th;

- Where date B falls on the last day of February, the actual date B will be used.

The US/NASD Method (30US/360)

- If both date A and B fall on the last day of February, then date B will be changed to the 30th.

- If date A falls on the 31st of a month or last day of February, then date A will be changed to the 30th.

- If date A falls on the 30th of a month after applying (2) above and date B falls on the 31st of a month, then date B will be changed to the 30th." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "hour", "qname" : "excel-datetime:hour", "signature" : "($time as xs:time) as xs:integer?", "description" : " Returns the hour of a time value.\n", "summary" : "

Returns the hour of a time value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "time", "type" : "xs:time", "occurrence" : null, "description" : "
the time.
" } ], "returns" : { "type" : "xs:integer?", "description" : "The hour of a time value. The hour is as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.)." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "minute", "qname" : "excel-datetime:minute", "signature" : "($time as xs:time) as xs:integer?", "description" : " Returns the minutes of a time value.\n", "summary" : "

Returns the minutes of a time value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "time", "type" : "xs:time", "occurrence" : null, "description" : "
the time.
" } ], "returns" : { "type" : "xs:integer?", "description" : "The minutes of a time value. The minute is given as an integer, ranging from 0 to 59." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "month", "qname" : "excel-datetime:month", "signature" : "($date as xs:date) as xs:integer?", "description" : " Returns the month of a $date.\n", "summary" : "

Returns the month of a $date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:date", "occurrence" : null, "description" : "
the date.
" } ], "returns" : { "type" : "xs:integer?", "description" : "the month of a $date. The month is given as an integer, ranging from 1 (January) to 12 (December)." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "networkdays", "qname" : "excel-datetime:networkdays", "signature" : "($start_date as xs:date, $end_date as xs:date) as xs:integer*", "description" : " Returns the number of whole working days between $start_date and $end_date.\n", "summary" : "

Returns the number of whole working days between $start_date and $end_date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "start_date", "type" : "xs:date", "occurrence" : null, "description" : "
the start date.
" }, { "name" : "end_date", "type" : "xs:date", "occurrence" : null, "description" : "
the end date.
" } ], "returns" : { "type" : "xs:integer*", "description" : "The number of whole working days between start_date and end_date.

Working days exclude weekends and any dates identified in holidays.

Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days worked during a specific term." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "networkdays", "qname" : "excel-datetime:networkdays", "signature" : "($start_date as xs:date, $end_date as xs:date, $holidays as xs:date*) as xs:integer*", "description" : " Returns the number of whole working days between $start_date and $end_date.\n", "summary" : "

Returns the number of whole working days between $start_date and $end_date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "start_date", "type" : "xs:date", "occurrence" : null, "description" : "
the start date.
" }, { "name" : "end_date", "type" : "xs:date", "occurrence" : null, "description" : "
the end date.
" }, { "name" : "holidays", "type" : "xs:date", "occurrence" : "*", "description" : "
one or more dates to exclude from the working calendar, such as state and federal holidays and floating holidays.
" } ], "returns" : { "type" : "xs:integer*", "description" : "The number of whole working days between start_date and end_date.

Working days exclude weekends and any dates identified in holidays.

Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days worked during a specific term." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "now", "qname" : "excel-datetime:now", "signature" : "() as xs:dateTime?", "description" : " Returns the current date and time.\n", "summary" : "

Returns the current date and time.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:dateTime?", "description" : "The current date and time." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "second", "qname" : "excel-datetime:second", "signature" : "($time as xs:time) as xs:decimal?", "description" : " Returns the seconds of a $time value.\n", "summary" : "

Returns the seconds of a $time value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "time", "type" : "xs:time", "occurrence" : null, "description" : "
the time.
" } ], "returns" : { "type" : "xs:decimal?", "description" : "The seconds of a $time value. The second is given as an integer in the range 0 (zero) to 59." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "time", "qname" : "excel-datetime:time", "signature" : "($hour as xs:integer, $minute as xs:integer, $second as xs:integer) as xs:time?", "description" : " Constructs a time given the hours, minutes and seconds.\n", "summary" : "

Constructs a time given the hours, minutes and seconds.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "hour", "type" : "xs:integer", "occurrence" : null, "description" : "
the hour.
" }, { "name" : "minute", "type" : "xs:integer", "occurrence" : null, "description" : "
the minute.
" }, { "name" : "second", "type" : "xs:integer", "occurrence" : null, "description" : "
the second.
" } ], "returns" : { "type" : "xs:time?", "description" : "A time given the hours, minutes and seconds." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "today", "qname" : "excel-datetime:today", "signature" : "() as xs:date?", "description" : " Returns the current date.\n", "summary" : "

Returns the current date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:date?", "description" : "The current date." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "weekday", "qname" : "excel-datetime:weekday", "signature" : "($date as xs:date) as xs:integer?", "description" : " Returns the day of the week corresponding to a $date.\n", "summary" : "

Returns the day of the week corresponding to a $date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:date", "occurrence" : null, "description" : "
the date.
" } ], "returns" : { "type" : "xs:integer?", "description" : "The day of the week corresponding to a $date. The day is given as an integer, ranging from 1 (Sunday) to 7 (Saturday)." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "weekday", "qname" : "excel-datetime:weekday", "signature" : "($date as xs:date, $return_type as xs:integer) as xs:integer?", "description" : " Returns the day of the week corresponding to a $date depending on $return_type.\n", "summary" : "

Returns the day of the week corresponding to a $date depending on $return_type.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:date", "occurrence" : null, "description" : "
the date.
" }, { "name" : "return_type", "type" : "xs:integer", "occurrence" : null, "description" : "
1 for Numbers 1 (Sunday) through 7 (Saturday). 2 for Numbers 1 (Monday) through 7 (Sunday). 3 for Numbers 0 (Monday) through 6 (Sunday).
" } ], "returns" : { "type" : "xs:integer?", "description" : "The day of the week corresponding to a $date depending on $return_type." }, "errors" : [ "excel-err:Value if $return_type is outside the range [1,3]." ] }, { "isDocumented" : true, "arity" : 1, "name" : "year", "qname" : "excel-datetime:year", "signature" : "($date as xs:date) as xs:integer?", "description" : " Returns the year corresponding to a date.\n", "summary" : "

Returns the year corresponding to a date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:date", "occurrence" : null, "description" : "
the date.
" } ], "returns" : { "type" : "xs:integer?", "description" : "The year corresponding to a date." }, "errors" : [ ] } ], "variables" : [ ] }, "http://xbrl.io/modules/bizql/profiles/sec/filings" : { "ns" : "http://xbrl.io/modules/bizql/profiles/sec/filings", "description" : "

This module provides functionality for querying financial reports (filings)\n submitted to the SEC.

\n

SEC Filings are nothing else than XBRL archives. For XBRL-generic requests on archives,\n use the generic archives module.

\n

With this module, you can access a number of properties of an SEC filing, such as\n its document type. You can also retrieve an SEC filing given an SEC company (or its CIK).

\n

You can also access SEC filings statistics (the number of SEC Networks, of SEC Axes, etc).

\n", "sees" : [ ], "authors" : [ "Charles Hoffman", "Matthias Brantner", "Dennis Knochenwefel", "Ghislain Fourny" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://xbrl.io/modules/bizql/archives", "prefix" : "archives" }, { "uri" : "http://xbrl.io/modules/bizql/profiles/sec/companies", "prefix" : "companies" }, { "uri" : "http://www.28msec.com/modules/credentials", "prefix" : "credentials" }, { "uri" : "http://zorba.io/modules/datetime", "prefix" : "datetime" }, { "uri" : "http://xbrl.io/modules/bizql/facts", "prefix" : "facts" }, { "uri" : "http://xbrl.io/modules/bizql/profiles/sec/filings", "prefix" : "filings" }, { "uri" : "http://www.28msec.com/modules/mongodb", "prefix" : "mongo" }, { "uri" : "http://xbrl.io/modules/bizql/profiles/sec/core", "prefix" : "sec" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "acceptance-dateTimes", "qname" : "filings:acceptance-dateTimes", "signature" : "($filings-or-ids as item()*) as dateTime*", "description" : "

Retrieves the acceptance date of filings.

\n", "summary" : "

Retrieves the acceptance date of filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of filings or their IDs.
" } ], "returns" : { "type" : "dateTime*", "description" : "the acceptance dateTimes." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "document-types", "qname" : "filings:document-types", "signature" : "($filings-or-ids as item()*) as string?", "description" : "

Retrieves the document type of the filings.

\n", "summary" : "

Retrieves the document type of the filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of filings or their ids.
" } ], "returns" : { "type" : "string?", "description" : "the document types (10-K, 10-Q)." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "filing-dates", "qname" : "filings:filing-dates", "signature" : "($filings-or-ids as item()*) as date*", "description" : "

Retrieves the submission date of filings.

\n", "summary" : "

Retrieves the submission date of filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of filings or their IDs.
" } ], "returns" : { "type" : "date*", "description" : "the submission dates." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "filings-for-companies", "qname" : "filings:filings-for-companies", "signature" : "($companies-or-ciks as item()*) as object()*", "description" : "

Return all filings submitted by the supplied companies.

\n", "summary" : "

Return all filings submitted by the supplied companies.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "companies-or-ciks", "type" : "item()", "occurrence" : "*", "description" : "
arbitrary number of company objects or CIKs.
" } ], "returns" : { "type" : "object()*", "description" : "all filings submitted by these companies." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "generators", "qname" : "filings:generators", "signature" : "($filings-or-ids as item()*) as string*", "description" : "

Retrieves the generators of filings.

\n", "summary" : "

Retrieves the generators of filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of filings or their IDs.
" } ], "returns" : { "type" : "string*", "description" : "the generators used." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "num-abstracts", "qname" : "filings:num-abstracts", "signature" : "($filings-or-ids) as integer*", "description" : " Return the number of (distinct) abstracts in each of the given filings.\n", "summary" : "

Return the number of (distinct) abstracts in each of the given filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : null, "occurrence" : null, "description" : "
list of filings or IDs
" } ], "returns" : { "type" : "integer*", "description" : "the said number of abstracts" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "num-axes", "qname" : "filings:num-axes", "signature" : "($filings-or-ids) as integer*", "description" : " Return the number of (distinct) axes in each of the given filings.\n", "summary" : "

Return the number of (distinct) axes in each of the given filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : null, "occurrence" : null, "description" : "
list of filings or IDs
" } ], "returns" : { "type" : "integer*", "description" : "the said number of axes" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "num-concepts", "qname" : "filings:num-concepts", "signature" : "($filings-or-ids) as integer*", "description" : " Return the number of (distinct) concepts in each of the given filings.\n", "summary" : "

Return the number of (distinct) concepts in each of the given filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : null, "occurrence" : null, "description" : "
list of filings or IDs
" } ], "returns" : { "type" : "integer*", "description" : "the said number of concepts" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "num-extension-abstracts", "qname" : "filings:num-extension-abstracts", "signature" : "($filings-or-ids) as integer*", "description" : " Return the number of extension abstracts in each of the given filings.\n", "summary" : "

Return the number of extension abstracts in each of the given filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : null, "occurrence" : null, "description" : "
list of filings or IDs
" } ], "returns" : { "type" : "integer*", "description" : "the said number of abstracts" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "num-extension-concepts", "qname" : "filings:num-extension-concepts", "signature" : "($filings-or-ids) as integer*", "description" : " Return the number of extension concepts in each of the given filings.\n", "summary" : "

Return the number of extension concepts in each of the given filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : null, "occurrence" : null, "description" : "
list of filings or IDs
" } ], "returns" : { "type" : "integer*", "description" : "the said number of concepts" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "num-extension-facts", "qname" : "filings:num-extension-facts", "signature" : "($filings-or-ids) as integer*", "description" : " Return the number of extension facts in each of the given filings.\n", "summary" : "

Return the number of extension facts in each of the given filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : null, "occurrence" : null, "description" : "
list of filings or IDs
" } ], "returns" : { "type" : "integer*", "description" : "the said number of facts" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "num-facts", "qname" : "filings:num-facts", "signature" : "($filings-or-ids) as integer*", "description" : " Return the number of facts in each of the given filings.\n", "summary" : "

Return the number of facts in each of the given filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : null, "occurrence" : null, "description" : "
list of filings or IDs
" } ], "returns" : { "type" : "integer*", "description" : "the said number of facts" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "num-footnotes", "qname" : "filings:num-footnotes", "signature" : "($filings-or-ids) as integer*", "description" : " Return the number of footnotes in each of the given filings.\n", "summary" : "

Return the number of footnotes in each of the given filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : null, "occurrence" : null, "description" : "
list of filings or IDs
" } ], "returns" : { "type" : "integer*", "description" : "the said number of facts" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "num-line-items", "qname" : "filings:num-line-items", "signature" : "($filings-or-ids) as integer*", "description" : " Return the number of (distinct) line items in each of the given filings.\n", "summary" : "

Return the number of (distinct) line items in each of the given filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : null, "occurrence" : null, "description" : "
list of filings or IDs
" } ], "returns" : { "type" : "integer*", "description" : "the said number of line items" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "num-members", "qname" : "filings:num-members", "signature" : "($filings-or-ids) as integer*", "description" : " Return the number of (distinct) members in each of the given filings.\n", "summary" : "

Return the number of (distinct) members in each of the given filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : null, "occurrence" : null, "description" : "
list of filings or IDs
" } ], "returns" : { "type" : "integer*", "description" : "the said number of members" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "num-networks", "qname" : "filings:num-networks", "signature" : "($filings-or-ids) as integer*", "description" : " Return the number of networks in each of the given filings.\n", "summary" : "

Return the number of networks in each of the given filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : null, "occurrence" : null, "description" : "
list of filings or IDs
" } ], "returns" : { "type" : "integer*", "description" : "the said number of networks" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "num-report-elements", "qname" : "filings:num-report-elements", "signature" : "($filings-or-ids) as integer*", "description" : " Return the number of (distinct) report elements in each of the given filings.\n", "summary" : "

Return the number of (distinct) report elements in each of the given filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : null, "occurrence" : null, "description" : "
list of filings or IDs
" } ], "returns" : { "type" : "integer*", "description" : "the said number of report elements" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "num-tables", "qname" : "filings:num-tables", "signature" : "($filings-or-ids) as integer*", "description" : " Return the number of tables in each of the given filings.\n", "summary" : "

Return the number of tables in each of the given filings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filings-or-ids", "type" : null, "occurrence" : null, "description" : "
list of filings or IDs
" } ], "returns" : { "type" : "integer*", "description" : "the said number of tables" }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/string" : { "ns" : "http://zorba.io/modules/string", "description" : "

This module provides string related functions.

\n

Mostly, the functions in this module provide primitives\n to work with streamable strings. For example, it allows to\n check whether a given string is streamable or seekable.

\n", "sees" : [ ], "authors" : [ "Matthias Brantner" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/string", "prefix" : "string" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "analyze-string", "qname" : "string:analyze-string", "signature" : "($input as xs:string?, $pattern as xs:string) as array()", "description" : " Analyzes a string using a regular expression, returning sequence of JSON\n objects that identify which parts of the input string matched or failed to\n match the regular expression; and in the case of matched substrings, which\n substrings matched each capturing group in the regular expression.\n

\n This function behaves like\n fn:analyze-string\n but returns a JSON array rather than an XML element.\n", "summary" : "

Analyzes a string using a regular expression, returning sequence of JSON\n objects that identify which parts of the input string matched or failed to\n match the regular expression; and in the case of matched substrings, which\n substrings matched each capturing group in the regular expression.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "input", "type" : "xs:string", "occurrence" : "?", "description" : "
The string to analyze. If the empty sequence, the function behaves as if $input were a zero-length string.
" }, { "name" : "pattern", "type" : "xs:string", "occurrence" : null, "description" : "
The regular expression.
" } ], "returns" : { "type" : "array()", "description" : "a JSON array of objects where each object contains a single key/value pair. Each key is either match or non-match. For non-match, the value is a string that is the part of $input that did not match; for match, the value is either a string that is the part of $input that matched (when $pattern contains no capturing groups) or an array containing values for both capturing groups and other matches.

Capturing group matches are themselves arrays where the first element is the group number (1-based) and subsequent elements are either a string that is the part of $input that matched or sub-arrays for nested capturing groups." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "analyze-string", "qname" : "string:analyze-string", "signature" : "($input as xs:string?, $pattern as xs:string, $flags as xs:string) as array() external", "description" : " Analyzes a string using a regular expression, returning sequence of JSON\n objects that identify which parts of the input string matched or failed to\n match the regular expression; and in the case of matched substrings, which\n substrings matched each capturing group in the regular expression.\n

\n This function behaves like\n fn:analyze-string\n but returns a JSON array rather than an XML element.\n", "summary" : "

Analyzes a string using a regular expression, returning sequence of JSON\n objects that identify which parts of the input string matched or failed to\n match the regular expression; and in the case of matched substrings, which\n substrings matched each capturing group in the regular expression.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "input", "type" : "xs:string", "occurrence" : "?", "description" : "
The string to analyze. If the empty sequence, the function behaves as if $input were a zero-length string.
" }, { "name" : "pattern", "type" : "xs:string", "occurrence" : null, "description" : "
The regular expression.
" }, { "name" : "flags", "type" : "xs:string", "occurrence" : null, "description" : "
The argument is interpreted in the same way as for the fn:matches function.
" } ], "returns" : { "type" : "array()", "description" : "a JSON array of objects where each object contains a single key/value pair. Each key is either match or non-match. For non-match, the value is a string that is the part of $input that did not match; for match, the value is either a string that is the part of $input that matched (when $pattern contains no capturing groups) or an array containing values for both capturing groups and other matches.

Capturing group matches are themselves arrays where the first element is the group number (1-based) and subsequent elements are either a string that is the part of $input that matched or sub-arrays for nested capturing groups." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-seekable", "qname" : "string:is-seekable", "signature" : "($s as string) as boolean external", "description" : "

This function checks whether a given string item is a\n seekable stream string.

\n

For example, a seekable streamable string is returned by the\n file module.

\n", "summary" : "

This function checks whether a given string item is a\n seekable stream string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "string", "occurrence" : null, "description" : "
the string to check
" } ], "returns" : { "type" : "boolean", "description" : "true if the given item is a seekable stream string or false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-streamable", "qname" : "string:is-streamable", "signature" : "($s as string) as boolean external", "description" : "

This function checks whether a given string item is implemented by a\n streamable string.

\n

A streamable string is produced by some functions of a module.\n It's an optimized implementation of an string to handle arbitrary\n sized data. The drawback is that its value can only be consumed once.\n That is, only one function can access the value of a streamable string\n item.

\n", "summary" : "

This function checks whether a given string item is implemented by a\n streamable string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "string", "occurrence" : null, "description" : "
the string to check
" } ], "returns" : { "type" : "boolean", "description" : "true if the given item is implemented using a streamable string or false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "materialize", "qname" : "string:materialize", "signature" : "($s as string) as string external", "description" : "

This function materializes a streamable string.

\n

The drawback of a streamable (non-seekable) string is that\n its value can only be consumed once. That is, only one function\n can access the value of a streamable string item.

\n

In order to remedy this situation, this function can be used to\n convert a streamable string into its non-streamable counterpart. As a\n result, the string returned by this function has the same value as its\n input but is materialized and, hence, can be consumed multiple times.

\n", "summary" : "

This function materializes a streamable string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "string", "occurrence" : null, "description" : "
the streamable string item to materialize
" } ], "returns" : { "type" : "string", "description" : "a materialized string of its input or the input if the input item was not a streamable string." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "split", "qname" : "string:split", "signature" : "($s as string, $separator as string) as string* external", "description" : "

Returns a sequence of strings constructed by splitting the input wherever\n the given separator is found.

\n

The function is different from tokenize. It doesn't allow\n the separator to be a regular expression. This restriction allows for more\n performant implementation. Specifically, the function processes\n streamable strings as input in a streamable way which is particularly useful\n to tokenize huge strings.

\n", "summary" : "

Returns a sequence of strings constructed by splitting the input wherever\n the given separator is found.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "string", "occurrence" : null, "description" : "
the input string to split
" }, { "name" : "separator", "type" : "string", "occurrence" : null, "description" : "
the separator used for splitting the input string $s
" } ], "returns" : { "type" : "string*", "description" : "a sequence of strings constructed by splitting the input" }, "errors" : [ ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/store" : { "ns" : "http://www.28msec.com/modules/store", "description" : " This module provides functions to perform MongoDB query operations\n (i.e. find and aggregate) on the database associated with the\n project.\n

The module is always imported so you don't need to import it explicitly.\n Also, you don't need to fully qualify the function if you want to invoke it.

\n", "sees" : [ ], "authors" : [ "28msec" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.28msec.com/modules/mongodb/types", "prefix" : "mongo" }, { "uri" : "http://www.28msec.com/modules/store", "prefix" : "store" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "aggregate", "qname" : "store:aggregate", "signature" : "($collection as string, $pipeline as array()) as object() external", "description" : " Performs a MongoDB aggregation framework job on the given collection.\n The $pipeline parameter needs to specify a valid aggregation\n framework pipeline. For example,\n
\n  [\n    { $project : {\n       author : 1,\n       tags : 1,\n    } },\n    { $unwind : \"$tags\" },\n    { $group : {\n       _id : { tags : \"$tags\" },\n       authors : { $addToSet : \"$author\" }\n    } }\n ]\n 
\n The function returns the result as one object. The object contains\n the field named \"ok\" with value 0 if the execution failed or 1 if\n it succeeded. If it succeeded, the result is contained as an array\n in the result field. Otherwise, the errmsg field contains the description\n of the error. For exampl,e\n
\n {\n   \"result\" : [ ... ],\n   \"ok\" : 1\n }\n 
\n", "summary" : "

Performs a MongoDB aggregation framework job on the given collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "collection", "type" : "string", "occurrence" : null, "description" : "
the name of the collection to execute the job on
" }, { "name" : "pipeline", "type" : "array()", "occurrence" : null, "description" : "
the specification of the pipeline to execute
" } ], "returns" : { "type" : "object()", "description" : "an object with the result or the error message." }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "clear-if", "qname" : "store:clear-if", "signature" : "($cond as boolean) as integer", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "cond", "type" : "boolean", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "integer", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 0, "name" : "clear", "qname" : "store:clear", "signature" : "() as integer external", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "integer", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "collection-chunk-specs", "qname" : "store:collection-chunk-specs", "signature" : "($name as string) as object()*", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "object()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "collection-chunk-specs", "qname" : "store:collection-chunk-specs", "signature" : "($name as string, $chunk-size as integer) as object()* external", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "string", "occurrence" : null, "description" : "" }, { "name" : "chunk-size", "type" : "integer", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "object()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "collection-chunk", "qname" : "store:collection-chunk", "signature" : "($name as string, $chunk as object()) as item()* external", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "string", "occurrence" : null, "description" : "" }, { "name" : "chunk", "type" : "object()", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "find", "qname" : "store:find", "signature" : "($coll as string, $query as object()) as object()*", "description" : " Performs a MongoDB query operation on the given collection and\n returns all matches.\n", "summary" : "

Performs a MongoDB query operation on the given collection and\n returns all matches.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "coll", "type" : "string", "occurrence" : null, "description" : "" }, { "name" : "query", "type" : "object()", "occurrence" : null, "description" : "
the query operation to perform
" } ], "returns" : { "type" : "object()*", "description" : "all matches returned by the given query operation" }, "errors" : [ "zerr:ZSTR0009 if the given collection does not exist" ] }, { "isDocumented" : true, "arity" : 3, "name" : "find", "qname" : "store:find", "signature" : "($coll as string, $query as object(), $options as object()) as object()* external", "description" : " Performs a MongoDB query operation on the given collection and\n returns all matches.\n Available options:\n \n", "summary" : "

Performs a MongoDB query operation on the given collection and\n returns all matches.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "coll", "type" : "string", "occurrence" : null, "description" : "
the name of the collection
" }, { "name" : "query", "type" : "object()", "occurrence" : null, "description" : "
the query operation to perform
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
the options for this operation
" } ], "returns" : { "type" : "object()*", "description" : "all matches returned by the given query operation" }, "errors" : [ "zerr:ZSTR0009 if the given collection does not exist" ] }, { "isDocumented" : false, "arity" : 1, "name" : "flush-if", "qname" : "store:flush-if", "signature" : "($cond as boolean) as empty-sequence()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "cond", "type" : "boolean", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "empty-sequence()", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 0, "name" : "flush", "qname" : "store:flush", "signature" : "() as empty-sequence() external", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "empty-sequence()", "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/hash" : { "ns" : "http://zorba.io/modules/hash", "description" : " This module provides functions that perform different hash operations.\n For example, they compute MD5 and various SHA functions on either\n strings or binary. The result is the base64 encoded value of the hash.\n", "sees" : [ ], "authors" : [ "Gabriel Petrovay, Markus Pilman, Matthias Brantner" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/hash", "prefix" : "hash" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "hash-binary", "qname" : "hash:hash-binary", "signature" : "($value as xs:base64Binary, $alg as xs:string) as xs:base64Binary external", "description" : " This function computes a hash value of the binary form of the given\n base64Binary item, i.e. the item is base64-decoded before hashing.\n", "summary" : "

This function computes a hash value of the binary form of the given\n base64Binary item, i.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
The binary item to be hashed.
" }, { "name" : "alg", "type" : "xs:string", "occurrence" : null, "description" : "
The algorithm to use for this hashing operation. Supported algorithms are \"md5\", \"sha1\", and \"sha256\".
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "The hash as xs:base64Binary of the provided binary" }, "errors" : [ "hash:UNSUPPORTED-ALGORITHM if the given hash algorithm is not supported" ] }, { "isDocumented" : true, "arity" : 2, "name" : "hash", "qname" : "hash:hash", "signature" : "($value as xs:string, $alg as xs:string) as xs:base64Binary external", "description" : " This function computes a hash value of the string provided as parameter.\n The function expects the hash algorithm to be used as parameter.\n", "summary" : "

This function computes a hash value of the string provided as parameter.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:string", "occurrence" : null, "description" : "
The string to be hashed.
" }, { "name" : "alg", "type" : "xs:string", "occurrence" : null, "description" : "
The algorithm to use for this hashing operation. Supported algorithms are \"md5\", \"sha1\", and \"sha256\".
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "The hash as xs:base64binary of the provided string" }, "errors" : [ "hash:UNSUPPORTED-ALGORITHM if the given hash algorithm is not supported" ] }, { "isDocumented" : true, "arity" : 1, "name" : "md5-binary", "qname" : "hash:md5-binary", "signature" : "($value as xs:base64Binary) as xs:base64Binary", "description" : " This function computes the MD5 hash value of the binary form of the given\n base64Binary item, i.e. the item is base64-decoded before hashing.\n", "summary" : "

This function computes the MD5 hash value of the binary form of the given\n base64Binary item, i.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
The binary item to hash.
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "The MD5 hash of the provided binary." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "md5", "qname" : "hash:md5", "signature" : "($value as xs:string) as xs:base64Binary", "description" : " Computes the MD5 hash of the string provided as parameter.\n", "summary" : "

Computes the MD5 hash of the string provided as parameter.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:string", "occurrence" : null, "description" : "
The string to hash
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "The MD5 hash as xs:base64Binary" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "sha1-binary", "qname" : "hash:sha1-binary", "signature" : "($value as xs:base64Binary) as xs:base64Binary", "description" : " This function computes the SHA1 hash value of the binary form of the given\n base64Binary item, i.e. the item is base64-decoded before hashing.\n", "summary" : "

This function computes the SHA1 hash value of the binary form of the given\n base64Binary item, i.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
The binary item to hash.
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "The base64 encoded SHA1 hash of the provided binary." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "sha1", "qname" : "hash:sha1", "signature" : "($value as xs:string) as xs:base64Binary", "description" : " Computes the SHA1 hash of the string provided as parameter.\n", "summary" : "

Computes the SHA1 hash of the string provided as parameter.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:string", "occurrence" : null, "description" : "
The string to hash.
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "The SHA1 hash as xs:base64Binary" }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/xsl-fo" : { "ns" : "http://zorba.io/modules/xsl-fo", "description" : " This module converts XSL-FO documents\n to various formats such as PDF, EPS, PCL, AFP, Text, PNG, Postscript, RTF, and TIFF.\n For instance, the following example converts a simple XSL-FO document to PDF:\n

\n

import module namespace fop = \"http://zorba.io/modules/xsl-fo\";\n import module namespace file = \"http://expath.org/ns/file\";\n declare namespace fo = \"http://www.w3.org/1999/XSL/Format\";\n let $xsl-fo := <fo:root xmlns:fo=\"http://www.w3.org/1999/XSL/Format\">\n   <fo:layout-master-set>\n     <fo:simple-page-master master-name=\"my-page\">\n       <fo:region-body margin=\"1in\"/>\n     </fo:simple-page-master>\n   </fo:layout-master-set>\n   <fo:page-sequence master-reference=\"my-page\">\n     <fo:flow flow-name=\"xsl-region-body\">\n       <fo:block>Hello, world!</fo:block>\n     </fo:flow>\n   </fo:page-sequence>\n  </fo:root>\n let $pdf := fop:generator($fop:PDF, $xsl-fo)\n return file:write-binary(\"simple.pdf\", $pdf)
\n

\n This module uses Apache-FOP to generate content from an XSL-FO document.\n See the Apache FOP documentation for further information.\n

\n Note for Windows users: On Windows, this module won't work out of the box, since\n this module uses Java. But the Java VM dll is not in the system path by default. To make\n this module work, you need to add the directory where the jvm.dll is located to the\n system path. This dll is located at JRE_DIR\\bin\\client. On a standard installation, this would\n be something a path like \"C:\\Program Files\\Java\\jre6\\bin\\client\".\n", "sees" : [ "http://xmlgraphics.apache.org/fop/" ], "authors" : [ "Markus Pilman" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.w3.org/2005/xqt-errors", "prefix" : "err" }, { "uri" : "http://www.zorba-xquery.com/modules/util-jvm", "prefix" : "util-jvm" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/modules/xsl-fo", "prefix" : "xsl-fo" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "generator", "qname" : "xsl-fo:generator", "signature" : "($output-format as xs:string, $xsl-fo-document as node()) as xs:base64Binary", "description" : " The generator function takes an XSL-FO document as input and generates output\n in the format given as input.\n The output format can be given as a MIME type - for example \"application/pdf\"\n - or one of the predefined variables can be used - like $xsl-fo:PDF. Please\n refer to the Apache FOP documentation for\n supported output formats.\n Apache FOP does not support 100% of the XSL-FO standard.\n Please consult the official\n documentation for further information.\n This function tries to find the needed Java libraries itself.

\n On a Mac OS X computer, it should be sufficient to install Apache FOP via Mac\n Ports.

\n On Ubuntu it should be sufficient to install the fop packages via apt-get.

\n On Windows, the classpath needs to be set manually using\n generator#3.

\n This function tries to find the jar files via environment variables. The user can set the\n variable FOP_HOME to the root directory of an Apache FOP distribution. If you have all\n JAR files in the same directory, you can set the environment variable FOP_LIB_DIR to this\n directory.\n", "summary" : "

The generator function takes an XSL-FO document as input and generates output\n in the format given as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "output-format", "type" : "xs:string", "occurrence" : null, "description" : "
The mime of the output format, to tell Apache FOP which kind of document it should create.
" }, { "name" : "xsl-fo-document", "type" : "node()", "occurrence" : null, "description" : "
The XSL-FO document from which the output should be generated.
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "The generated output document." }, "errors" : [ "xsl-fo:JVM-NOT-STARTED If zorba was unable to start the JVM.", "xsl-fo:JAVA-EXCEPTION If Apache FOP throws an exception - i.e. if the input format is not correct/supported.", "xsl-fo:JAR-NOT-FOUND If a needed Java library could not be found." ] } ], "variables" : [ { "name" : "xsl-fo:AFP", "type" : "xs:string", "description" : " The mime type of IBMs AFP format (application/x-afp).\n" }, { "name" : "xsl-fo:EPS", "type" : "xs:string", "description" : " The mime type of the EPS format (application/postscript).\n" }, { "name" : "xsl-fo:PCL", "type" : "xs:string", "description" : " The mime type of the PCL format (application/x-pcl).\n" }, { "name" : "xsl-fo:PDF", "type" : "xs:string", "description" : " The mime type of the PDF format (application/pdf).\n" }, { "name" : "xsl-fo:PLAIN_TEXT", "type" : "xs:string", "description" : " The mime type for plain text files (text/plain).\n" }, { "name" : "xsl-fo:PNG", "type" : "xs:string", "description" : " The mime type of the PNG format (image/png).\n" }, { "name" : "xsl-fo:POSTSCRIPT", "type" : "xs:string", "description" : " The mime type of the postscript format (application/postscript).\n" }, { "name" : "xsl-fo:RTF", "type" : "xs:string", "description" : " The mime type of the RTF format (application/rtf).\n" }, { "name" : "xsl-fo:TIFF", "type" : "xs:string", "description" : " The mime type of TIFF format (application/tiff).\n" } ] }, "http://zorba.io/warnings" : { "ns" : "http://zorba.io/warnings", "description" : " This module contains one variable declaration for each diagnostic of the\n http://zorba.io/warnings namespace.\n The variables serves as documentation for the errors but can also\n be used in the code. For example, one useful scenario is to compare\n an error caught in the catch clause of a try-catch expression with one of\n the variables.\n", "sees" : [ ], "authors" : [ "Carlos Lopez" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/warnings", "prefix" : "zwarn" } ], "functions" : [ ], "variables" : [ { "name" : "zwarn:NS", "type" : "item()*", "description" : "" }, { "name" : "zwarn:ZWST0002", "type" : "xs:QName", "description" : " This warning is reported if the declaration of a function, variable,\n collection, or index contains an annotation that is not in the\n http://zorba.io/annotations namespace and Zorba doesn't know how to\n handle.\n" }, { "name" : "zwarn:ZWST0003", "type" : "item()*", "description" : "" }, { "name" : "zwarn:ZWST0004", "type" : "item()*", "description" : "" }, { "name" : "zwarn:ZWST0005", "type" : "xs:QName", "description" : " This warning is raised if the user explicitly enables caching\n of function results (using the %an:cache or %an:strictlydeterministic\n annotation) but the function cannot be cached.\n For %an:cache this happens if the function is updating or variadic.\n For %an:strictlydeterministic this happens if the function is updating,\n variadic or sequential.\n" }, { "name" : "zwarn:ZWST0006", "type" : "xs:QName", "description" : " This warning is raised if the user explicitly enables caching\n of function results (using the %an:cache annotation) and the function\n is annotated as sequential or nondeterministic.\n" }, { "name" : "zwarn:ZWST0007", "type" : "item()*", "description" : "" }, { "name" : "zwarn:ZWST0008", "type" : "item()*", "description" : "" }, { "name" : "zwarn:ZWST0009", "type" : "xs:QName", "description" : " This warning is enabled when the \"common-language\" option is employed. It will raise warnings\n for language features that are not supported by both XQuery and JSONiq grammars.\n" } ] }, "http://www.28msec.com/modules/sparql" : { "ns" : "http://www.28msec.com/modules/sparql", "description" : " This module contains functions to interact with a SPARQL endpoint.\n Requests to an endpoint are made using HTTP.\n Specifically, this module allows SELECT, ASK, CONSTRUCT and DESCRIBE queries. Additionally, it also allows for UPDATE statements.\n Various result formats are supported (e.g. XML, JSON, CSV)\n

Configuration

\n For this module you may use a preconfigured default or named datasource of the SPARQL category.\n You can also provide a configuration object directly.\n

As config parameter you can either pass a string that will be interpreted as a SPARQL endpoint datasource name or\n an object with the following properties:\n

\n

\n

Options

\n

The options object that can be passed to plenty of the functions in this module. It may have the following properties:\n

\n

All those properties are optional.

\n

\n", "sees" : [ ], "authors" : [ "Alexander.Kreutz@28msec.com" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "", "prefix" : "an" }, { "uri" : "http://www.28msec.com/modules/credentials", "prefix" : "credentials" }, { "uri" : "http://zorba.io/modules/http-client", "prefix" : "http-client" }, { "uri" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "prefix" : "rdf" }, { "uri" : "http://www.w3.org/2005/sparql-results#", "prefix" : "s" }, { "uri" : "http://www.28msec.com/modules/sparql", "prefix" : "sparql" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "ask", "qname" : "sparql:ask", "signature" : "($query as string) as xs:boolean", "description" : "

\n This function sends a SPARQL ASK query to an endpoint and returns the result as boolean value.\n The default datasource for SPARQL will be used.\n

\n", "summary" : "

\n This function sends a SPARQL ASK query to an endpoint and returns the result as boolean value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A SPARQL ASK query as string.
" } ], "returns" : { "type" : "xs:boolean", "description" : "The boolean ASK query result." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "ask", "qname" : "sparql:ask", "signature" : "($query as string, $options as object()?) as xs:boolean", "description" : "

\n This function sends a SPARQL ASK query to an endpoint and returns the result as boolean value.\n The default datasource for SPARQL will be used.\n

\n

\n

\n

\n", "summary" : "

\n This function sends a SPARQL ASK query to an endpoint and returns the result as boolean value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A SPARQL ASK query as string.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
An optional options object as described in the module description.
" } ], "returns" : { "type" : "xs:boolean", "description" : "The boolean ASK query result." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "ask", "qname" : "sparql:ask", "signature" : "($config as item()?, $query as string, $options as object()?) as xs:boolean", "description" : "

\n This function sends a SPARQL ASK query to an endpoint and returns the result as boolean value.\n

\n

\n

\n

\n", "summary" : "

\n This function sends a SPARQL ASK query to an endpoint and returns the result as boolean value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "config", "type" : "item()", "occurrence" : "?", "description" : "
The name of the credentials to use as string or a config object as described in the module description.
" }, { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A SPARQL ASK query as string.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
An optional options object as described in the module description.
" } ], "returns" : { "type" : "xs:boolean", "description" : "The boolean ASK query result." }, "errors" : [ "sparql:INVALID-RESPONSE-TYPE if the response format cannot be handled by this function", "sparql:ERROR if any http or endpoint error occurs", "sparql:INVALID-PARAMETER invalid option specification", "sparql:CREDENTIALS-NOT-FOUND credential information not found", "sparql:CREDENTIALS-INVALID credential information not valid" ] }, { "isDocumented" : true, "arity" : 1, "name" : "query-json", "qname" : "sparql:query-json", "signature" : "($query as string) as object()", "description" : "

\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL JSON format object.\n If the endpoint fails to deliver SPARQL JSON result format this function will try to convert the results to JSON if possible.\n The default datasource for SPARQL will be used.\n

\n

Link to the specification of the result format at W3C: SPARQL 1.1 Query Results JSON Format

\n", "summary" : "

\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL JSON format object.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A SPARQL SELECT or ASK query as string.
" } ], "returns" : { "type" : "object()", "description" : "The query result in SPARQL JSON format." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "query-json", "qname" : "sparql:query-json", "signature" : "($query as string, $options as object()?) as object()", "description" : "

\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL JSON format object.\n If the endpoint fails to deliver SPARQL JSON result format this function will try to convert the results to JSON if possible.\n The default datasource for SPARQL will be used.\n

\n

Link to the specification of the result format at W3C: SPARQL 1.1 Query Results JSON Format

\n

\n

\n

\n", "summary" : "

\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL JSON format object.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A SPARQL SELECT or ASK query as string.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
An optional options object as described in the module description.
" } ], "returns" : { "type" : "object()", "description" : "The query result in SPARQL JSON format." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "query-json", "qname" : "sparql:query-json", "signature" : "($config as item()?, $query as string, $options as object()?) as object()", "description" : "

\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL JSON format object.\n If the endpoint fails to deliver SPARQL JSON result format this function will try to convert the results to JSON if possible.\n

\n

Link to the specification of the result format at W3C: SPARQL 1.1 Query Results JSON Format

\n

\n

\n

\n", "summary" : "

\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL JSON format object.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "config", "type" : "item()", "occurrence" : "?", "description" : "
The name of the credentials to use as string or a config object as described in the module description.
" }, { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A SPARQL SELECT or ASK query as string.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
An optional options object as described in the module description.
" } ], "returns" : { "type" : "object()", "description" : "The query result in SPARQL JSON format." }, "errors" : [ "sparql:INVALID-RESPONSE-TYPE if the response format cannot be handled by this function", "sparql:ERROR if any http or endpoint error occurs", "sparql:INVALID-PARAMETER invalid option specification", "sparql:CREDENTIALS-NOT-FOUND credential information not found", "sparql:CREDENTIALS-INVALID credential information not valid" ] }, { "isDocumented" : true, "arity" : 1, "name" : "query-rdf", "qname" : "sparql:query-rdf", "signature" : "($query as string) as element(rdf:RDF)", "description" : "

\n This function sends a SPARQL CONSTRUCT or DESCRIBE query to an endpoint and returns the query response as RDF.\n The default datasource for SPARQL will be used.\n

\n

Link to the specification of the result format at W3C: RDF/XML Syntax Specification

\n", "summary" : "

\n This function sends a SPARQL CONSTRUCT or DESCRIBE query to an endpoint and returns the query response as RDF.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A SPARQL CONSTRUCT or DESCRIBE query as string.
" } ], "returns" : { "type" : "element(rdf:RDF)", "description" : "The query result as RDF XML element." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "query-rdf", "qname" : "sparql:query-rdf", "signature" : "($query as string, $options as object()?) as element(rdf:RDF)", "description" : "

\n This function sends a SPARQL CONSTRUCT or DESCRIBE query to an endpoint and returns the query response as RDF.\n The default datasource for SPARQL will be used.\n

\n

Link to the specification of the result format at W3C: RDF/XML Syntax Specification

\n

\n

\n

\n", "summary" : "

\n This function sends a SPARQL CONSTRUCT or DESCRIBE query to an endpoint and returns the query response as RDF.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A SPARQL CONSTRUCT or DESCRIBE query as string.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
An optional options object as described in the module description.
" } ], "returns" : { "type" : "element(rdf:RDF)", "description" : "The query result as RDF XML element." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "query-rdf", "qname" : "sparql:query-rdf", "signature" : "($config as item()?, $query as string, $options as object()?) as element(rdf:RDF)", "description" : "

\n This function sends a SPARQL CONSTRUCT or DESCRIBE query to an endpoint and returns the query response as RDF.\n

\n

Link to the specification of the result format at W3C: RDF/XML Syntax Specification

\n

\n

\n

\n", "summary" : "

\n This function sends a SPARQL CONSTRUCT or DESCRIBE query to an endpoint and returns the query response as RDF.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "config", "type" : "item()", "occurrence" : "?", "description" : "
The name of the credentials to use as string or a config object as described in the module description.
" }, { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A SPARQL CONSTRUCT or DESCRIBE query as string.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
An optional options object as described in the module description.
" } ], "returns" : { "type" : "element(rdf:RDF)", "description" : "The query result as RDF XML element." }, "errors" : [ "sparql:INVALID-RESPONSE-TYPE if the response format cannot be handled by this function", "sparql:ERROR if any http or endpoint error occurs", "sparql:INVALID-PARAMETER invalid option specification", "sparql:CREDENTIALS-NOT-FOUND credential information not found", "sparql:CREDENTIALS-INVALID credential information not valid" ] }, { "isDocumented" : true, "arity" : 1, "name" : "query-xml", "qname" : "sparql:query-xml", "signature" : "($query as string) as element(s:sparql)", "description" : "

\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL XML format element.\n If the endpoint fails to deliver SPARQL XML result format this function will try to convert the results to XML if possible.\n The default datasource for SPARQL will be used.\n

\n

Link to the specification of the result format at W3C: SPARQL Query Results XML Format

\n", "summary" : "

\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL XML format element.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A SPARQL SELECT or ASK query as string.
" } ], "returns" : { "type" : "element(s:sparql)", "description" : "The query result in SPARQL XML format." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "query-xml", "qname" : "sparql:query-xml", "signature" : "($query as string, $options as object()?) as element(s:sparql)", "description" : "

\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL XML format element.\n If the endpoint fails to deliver SPARQL XML result format this function will try to convert the results to XML if possible.\n The default datasource for SPARQL will be used.\n

\n

Link to the specification of the result format at W3C: SPARQL Query Results XML Format

\n

\n

\n

\n", "summary" : "

\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL XML format element.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A SPARQL SELECT or ASK query as string.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
An optional options object as described in the module description.
" } ], "returns" : { "type" : "element(s:sparql)", "description" : "The query result in SPARQL XML format." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "query-xml", "qname" : "sparql:query-xml", "signature" : "($config as item()?, $query as string, $options as object()?) as element(s:sparql)", "description" : "

\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL XML format element.\n If the endpoint fails to deliver SPARQL XML result format this function will try to convert the results to XML if possible.\n

\n

Link to the specification of the result format at W3C: SPARQL Query Results XML Format

\n

\n

\n

\n", "summary" : "

\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL XML format element.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "config", "type" : "item()", "occurrence" : "?", "description" : "
The name of the credentials to use as string or a config object as described in the module description.
" }, { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A SPARQL SELECT or ASK query as string.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
An optional options object as described in the module description.
" } ], "returns" : { "type" : "element(s:sparql)", "description" : "The query result in SPARQL XML format." }, "errors" : [ "sparql:INVALID-RESPONSE-TYPE if the response format cannot be handled by this function", "sparql:ERROR if any http or endpoint error occurs", "sparql:INVALID-PARAMETER invalid option specification", "sparql:CREDENTIALS-NOT-FOUND credential information not found", "sparql:CREDENTIALS-INVALID credential information not valid" ] }, { "isDocumented" : true, "arity" : 1, "name" : "query", "qname" : "sparql:query", "signature" : "($query as string) as object()", "description" : "

\n This function sends a SPARQL query to an endpoint and directly returns the corresponding HTTP response.\n The default datasource for SPARQL will be used.\n

\n", "summary" : "

\n This function sends a SPARQL query to an endpoint and directly returns the corresponding HTTP response.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A SPARQL query as string. May be any kind of query but not an update.
" } ], "returns" : { "type" : "object()", "description" : "The endpoints response. This function returns the plain response object from the http-client." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "query", "qname" : "sparql:query", "signature" : "($query as string, $options as object()?) as object()", "description" : "

\n This function sends a SPARQL query to an endpoint and directly returns the corresponding HTTP response.\n The default datasource for SPARQL will be used.\n

\n

\n

\n

\n", "summary" : "

\n This function sends a SPARQL query to an endpoint and directly returns the corresponding HTTP response.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A SPARQL query as string. May be any kind of query but not an update.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
An optional options object as described in the module description.
" } ], "returns" : { "type" : "object()", "description" : "The endpoints response. This function returns the plain response object from the http-client." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "query", "qname" : "sparql:query", "signature" : "($config as item()?, $query as string, $options as object()?) as object()", "description" : "

\n This function sends a SPARQL query to an endpoint and directly returns the corresponding HTTP response.\n

\n

\n

\n

\n", "summary" : "

\n This function sends a SPARQL query to an endpoint and directly returns the corresponding HTTP response.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "config", "type" : "item()", "occurrence" : "?", "description" : "
The name of the credentials to use as string or a config object as described in the module description.
" }, { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A SPARQL query as string. May be any kind of query but not an update.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
An optional options object as described in the module description.
" } ], "returns" : { "type" : "object()", "description" : "The endpoints response. This function returns the plain response object from the http-client." }, "errors" : [ "sparql:INVALID-PARAMETER invalid option specification", "sparql:CREDENTIALS-NOT-FOUND credential information not found", "sparql:CREDENTIALS-INVALID credential information not valid" ] }, { "isDocumented" : true, "arity" : 1, "name" : "update", "qname" : "sparql:update", "signature" : "($update-statement as string) as object()", "description" : "

\n This function sends a SPARQL update statement to an endpoint and directly returns the corresponding HTTP response.\n The default datasource for SPARQL will be used.\n

\n", "summary" : "

\n This function sends a SPARQL update statement to an endpoint and directly returns the corresponding HTTP response.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "update-statement", "type" : "string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "object()", "description" : "The endpoints response. This function returns the plain response object from the http-client." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "update", "qname" : "sparql:update", "signature" : "($update-statement as string, $options as object()?) as object()", "description" : "

\n This function sends a SPARQL update statement to an endpoint and directly returns the corresponding HTTP response.\n The default datasource for SPARQL will be used.\n

\n

\n

\n

\n", "summary" : "

\n This function sends a SPARQL update statement to an endpoint and directly returns the corresponding HTTP response.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "update-statement", "type" : "string", "occurrence" : null, "description" : "" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
An optional options object as described in the module description.
" } ], "returns" : { "type" : "object()", "description" : "The endpoints response. This function returns the plain response object from the http-client." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "update", "qname" : "sparql:update", "signature" : "($config as item()?, $update-statement as string, $options as object()?) as object()", "description" : "

\n This function sends a SPARQL update statement to an endpoint and directly returns the corresponding HTTP response.\n

\n

\n

\n

\n", "summary" : "

\n This function sends a SPARQL update statement to an endpoint and directly returns the corresponding HTTP response.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "config", "type" : "item()", "occurrence" : "?", "description" : "
The name of the credentials to use as string or a config object as described in the module description.
" }, { "name" : "update-statement", "type" : "string", "occurrence" : null, "description" : "" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
An optional options object as described in the module description.
" } ], "returns" : { "type" : "object()", "description" : "The endpoints response. This function returns the plain response object from the http-client." }, "errors" : [ "sparql:INVALID-PARAMETER invalid option specification", "sparql:CREDENTIALS-NOT-FOUND credential information not found", "sparql:CREDENTIALS-INVALID credential information not valid" ] } ], "variables" : [ { "name" : "sparql:CREDENTIALS-CATEGORY", "type" : "string", "description" : " This variable represents the category of the datasource.\n" }, { "name" : "sparql:METHOD-GET", "type" : "string", "description" : " This variable represents the request method using HTTP GET requests. May be used for the method property of the options object.\n" }, { "name" : "sparql:METHOD-POST-URLENCODED", "type" : "string", "description" : " This variable represents the request method using HTTP POST with URL-encoded parameters. May be used for the method property of the options object.\n" }, { "name" : "sparql:METHOD-POST-SPARQL", "type" : "string", "description" : " This variable represents the request method using HTTP POST with the application/sparql-query content type. May be used for the method property of the options object.\n" }, { "name" : "sparql:FORMAT-XML", "type" : "string", "description" : " This variable represents the SPARQL XML result format.May be used for the format property of the options object.\n" }, { "name" : "sparql:FORMAT-JSON", "type" : "string", "description" : " This variable represents the SPARQL JSON result format.May be used for the format property of the options object.\n" }, { "name" : "sparql:FORMAT-RDF", "type" : "string", "description" : " This variable represents the RDF+XML result format.May be used for the format property of the options object.\n" }, { "name" : "sparql:FORMAT-CSV", "type" : "string", "description" : " This variable represents the CSV result format.May be used for the format property of the options object.\n" }, { "name" : "sparql:FORMAT-TSV", "type" : "string", "description" : " This variable represents the TSV result format.May be used for the format property of the options object.\n" }, { "name" : "sparql:FORMAT-ANY", "type" : "string", "description" : " This variable represents any result format. May be used for the format property of the options object to not specify a requested format.\n" } ] }, "http://api.28.io/dispatcher" : { "ns" : "http://api.28.io/dispatcher", "description" : "", "sees" : [ ], "authors" : [ ], "version" : null, "encoding" : null, "namespaces" : [ { "uri" : "", "prefix" : "an" }, { "uri" : "http://api.28.io/browserview", "prefix" : "browserview" }, { "uri" : "http://api.28.io/csvview", "prefix" : "csvview" }, { "uri" : "http://api.28.io/dispatcher", "prefix" : "dispatcher" }, { "uri" : "http://api.28.io/functions", "prefix" : "functions" }, { "uri" : "http://api.28.io/model", "prefix" : "model" }, { "uri" : "http://zorba.io/modules/xml", "prefix" : "parse-xml" }, { "uri" : "http://www.zorba-xquery.com/schemas/pul", "prefix" : "pul" }, { "uri" : "http://www.28msec.com/modules/http/request", "prefix" : "req" }, { "uri" : "http://www.28msec.com/modules/http/response", "prefix" : "response" }, { "uri" : "http://www.zorba-xquery.com/schemas/xdm", "prefix" : "xdm" }, { "uri" : "http://api.28.io/xdmview", "prefix" : "xdmview" } ], "functions" : [ { "isDocumented" : true, "arity" : 0, "name" : "restapi", "qname" : "dispatcher:restapi", "signature" : "()", "description" : " Main function for the collection browser. May be called from a handler function.\n Uses the call URL to determine which page needs to be returned.\n The URL for the initial page needs to end with /index\n", "summary" : "

Main function for the collection browser.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : null, "description" : "the requested page of the collection browser" }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/store/static/collections/ddl" : { "ns" : "http://zorba.io/modules/store/static/collections/ddl", "description" : " This modules defines a set of functions for managing collections that are\n declared in the prolog of a module.\n For example, it provides functions to create, delete, or introspect\n collections.\n

\n This module is part of Zorba's XQuery Data\n Definition Facility. All the collections managed by this module\n have to be pre-declared in the prolog of a module. Please refer to the\n general documentation\n for more information and examples.\n", "sees" : [ "Data Lifecycle", "XQuery Data Definition Facility", "http://zorba.io/modules/store/static/collections/dml", "http://zorba.io/modules/store/static/indexes/ddl", "http://zorba.io/modules/store/static/indexes/dml", "http://zorba.io/modules/store/static/integrity-constraints/ddl", "http://zorba.io/modules/store/static/integrity-constraints/dml", "http://zorba.io/errors" ], "authors" : [ "Nicolae Brinza, Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/store/static/collections/ddl", "prefix" : "cddl" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/errors", "prefix" : "zerr" } ], "functions" : [ { "isDocumented" : true, "arity" : 0, "name" : "available-collections", "qname" : "cddl:available-collections", "signature" : "() as xs:QName* external", "description" : " Gets the QNames of the collections that have been statically declared and\n are available, if any.\n", "summary" : "

Gets the QNames of the collections that have been statically declared and\n are available, if any.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:QName*", "description" : "A sequence comprising one QName for each statically declared and available collection or an emtpy sequence if no such collections are available." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "create", "qname" : "cddl:create", "signature" : "($name as xs:QName) external", "description" : " Creates a collection.\n", "summary" : "

Creates a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The of the collection to create.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, creates a collection with the given name." }, "errors" : [ "zerr:ZDDY0001 if $name is not equal to any of the declared collections in the static context.", "zerr:ZDDY0002 if a collection with $name already exists." ] }, { "isDocumented" : true, "arity" : 2, "name" : "create", "qname" : "cddl:create", "signature" : "($name as xs:QName, $content as item()*) external", "description" : " Creates a collection and adds the given sequence as content to the new\n collection.\n", "summary" : "

Creates a collection and adds the given sequence as content to the new\n collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to create.
" }, { "name" : "content", "type" : "item()", "occurrence" : "*", "description" : "
The sequences of items (nodes or JSON items) to be added to the new collection.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, creates a collection with the given name and inserts the given items into it." }, "errors" : [ "zerr:ZDDY0001 if $name is not equal to any of the declared collections in the static context.", "zerr:ZDDY0002 if a collection with $name already exists.", "zerr:ZDTY0001 if $content does not match the expected type declared by the collection according to the rules for SequenceType Matching." ] }, { "isDocumented" : true, "arity" : 0, "name" : "declared-collections", "qname" : "cddl:declared-collections", "signature" : "() as xs:QName* external", "description" : " Gets the collections that have been declared in the prolog of the static\n context.\n", "summary" : "

Gets the collections that have been declared in the prolog of the static\n context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:QName*", "description" : "A sequence of QNames, one for each collection created in the static context, or an emtpy sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "delete", "qname" : "cddl:delete", "signature" : "($name as xs:QName) external", "description" : " Deletes a collection.\n", "summary" : "

Deletes a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The collection to delete.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, deletes the collection with the given name." }, "errors" : [ "zerr:ZDDY0001 if $name is not equal to any of the declared collections in the static context.", "zerr:ZDDY0003 if the collection identified by $name is not available.", "zerr:ZDDY0013 if the domain or key expression of any of the available indexes access the collection having $name.", "zerr:ZDDY0015 if any of the in-scope variables references an item that belongs to the collection having $name" ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-available-collection", "qname" : "cddl:is-available-collection", "signature" : "($name as xs:QName) as xs:boolean external", "description" : " Gets whether a collection is statically declared and available.\n", "summary" : "

Gets whether a collection is statically declared and available.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to check.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the collection was statically declared and is available; false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-declared-collection", "qname" : "cddl:is-declared-collection", "signature" : "($name as xs:QName) as xs:boolean external", "description" : " Gers whether a collection was declared in the prolog of the static context.\n", "summary" : "

Gers whether a collection was declared in the prolog of the static context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to check.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the collection was declared; false otherwise." }, "errors" : [ ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/math" : { "ns" : "http://www.28msec.com/modules/math", "description" : " The functions in this module perform trigonometric and other mathematical\n calculations on double values.\n For a more detailed description of the semantics of each function, please\n refer to \n Trigonometric and exponential functions.\n", "sees" : [ ], "authors" : [ ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.w3.org/2005/xpath-functions/math", "prefix" : "fnmath" }, { "uri" : "http://www.28msec.com/modules/math", "prefix" : "math" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "acos", "qname" : "math:acos", "signature" : "($arg as double?) as double?", "description" : " Returns the arc cosine of the argument, the result being in the range zero to +π radians.\n", "summary" : "

Returns the arc cosine of the argument, the result being in the range zero to +π radians.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "asin", "qname" : "math:asin", "signature" : "($arg as double?) as double?", "description" : " Returns the arc sine of the argument, the result being in the range -π/2 to +π/2 radians.\n", "summary" : "

Returns the arc sine of the argument, the result being in the range -π/2 to +π/2 radians.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "atan", "qname" : "math:atan", "signature" : "($arg as double?) as double?", "description" : " Returns the arc tangent of the argument, the result being in the range -π/2 to +π/2 radians.\n", "summary" : "

Returns the arc tangent of the argument, the result being in the range -π/2 to +π/2 radians.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "atan2", "qname" : "math:atan2", "signature" : "($y as double, $x as double) as double", "description" : " Returns the angle in radians subtended at the origin by the point on a plane with\n coordinates (x, y) and the positive x-axis, the result being in the range -π to +π.\n", "summary" : "

Returns the angle in radians subtended at the origin by the point on a plane with\n coordinates (x, y) and the positive x-axis, the result being in the range -π to +π.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "y", "type" : "double", "occurrence" : null, "description" : "" }, { "name" : "x", "type" : "double", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "double", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "cos", "qname" : "math:cos", "signature" : "($theta as double?) as double?", "description" : " Returns the cosine of the argument, expressed in radians.\n", "summary" : "

Returns the cosine of the argument, expressed in radians.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "theta", "type" : "double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "exp", "qname" : "math:exp", "signature" : "($arg as double?) as double?", "description" : " Returns the value of ex.\n", "summary" : "

Returns the value of ex.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "exp10", "qname" : "math:exp10", "signature" : "($arg as double?) as double?", "description" : " Returns the value of 10x.\n", "summary" : "

Returns the value of 10x.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "log", "qname" : "math:log", "signature" : "($arg as double?) as double?", "description" : " Returns the natural logarithm of the argument.\n", "summary" : "

Returns the natural logarithm of the argument.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "log10", "qname" : "math:log10", "signature" : "($arg as double?) as double?", "description" : " Returns the base-ten logarithm of the argument.\n", "summary" : "

Returns the base-ten logarithm of the argument.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "pi", "qname" : "math:pi", "signature" : "() as double", "description" : " Returns an approximation to the mathematical constant π.\n", "summary" : "

Returns an approximation to the mathematical constant π.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "double", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "pow", "qname" : "math:pow", "signature" : "($x as double?, $y) as double?", "description" : " Returns the result of raising the first argument to the power of the second.\n", "summary" : "

Returns the result of raising the first argument to the power of the second.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "x", "type" : "double", "occurrence" : "?", "description" : "" }, { "name" : "y", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : "double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "sin", "qname" : "math:sin", "signature" : "($theta as double?) as double?", "description" : " Returns the sine of the argument, expressed in radians.\n", "summary" : "

Returns the sine of the argument, expressed in radians.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "theta", "type" : "double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "sqrt", "qname" : "math:sqrt", "signature" : "($arg as double?) as double?", "description" : " Returns the non-negative square root of the argument.\n", "summary" : "

Returns the non-negative square root of the argument.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "double?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "tan", "qname" : "math:tan", "signature" : "($theta as double?) as double?", "description" : " Returns the tangent of the argument, expressed in radians.\n", "summary" : "

Returns the tangent of the argument, expressed in radians.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "theta", "type" : "double", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "double?", "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/data-cleaning/normalization" : { "ns" : "http://zorba.io/modules/data-cleaning/normalization", "description" : "

This library module provides data normalization functions for processing calendar dates,\n temporal values, currency values, units of measurement, location names and postal addresses.\n These functions are particularly useful for converting different data representations into cannonical formats.

\n

The logic contained in this module is not specific to any particular XQuery implementation.

\n", "sees" : [ ], "authors" : [ "Bruno Martins and Diogo Simões" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.zorba-xquery.com/modules/http-client", "prefix" : "http" }, { "uri" : "http://zorba.io/modules/data-cleaning/normalization", "prefix" : "normalization" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "normalize-address", "qname" : "normalization:normalize-address", "signature" : "($addr as xs:string*) as xs:string*", "description" : "

Uses an address normalization Web service to convert a postal address given as input into a\n cannonical representation format.

\n", "summary" : "

Uses an address normalization Web service to convert a postal address given as input into a\n cannonical representation format.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "addr", "type" : "xs:string", "occurrence" : "*", "description" : "
A sequence of strings encoding an address, where each string in the sequence corresponds to a different component (e.g., street, city, country, etc.) of the address.
" } ], "returns" : { "type" : "xs:string*", "description" : "A sequence of strings with the address encoded in a cannonical format, where each string in the sequence corresponds to a different component (e.g., street, city, country, etc.) of the address." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "normalize-phone", "qname" : "normalization:normalize-phone", "signature" : "($addr as xs:string*) as xs:string*", "description" : "

Uses an phone number normalization Web service to convert a phone number given as input into a\n cannonical representation.

\n", "summary" : "

Uses an phone number normalization Web service to convert a phone number given as input into a\n cannonical representation.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "addr", "type" : "xs:string", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "A strings with the phone number encoded in a cannonical format.

Attention : This function is still not implemented.

" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "to-date", "qname" : "normalization:to-date", "signature" : "($sd as xs:string, $format as xs:string?) as xs:string", "description" : "

Converts a given string representation of a date value into a date representation valid according\n to the corresponding XML Schema type.

\n", "summary" : "

Converts a given string representation of a date value into a date representation valid according\n to the corresponding XML Schema type.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "sd", "type" : "xs:string", "occurrence" : null, "description" : "
The string representation for the date
" }, { "name" : "format", "type" : "xs:string", "occurrence" : "?", "description" : "
An optional parameter denoting the format used to represent the date in the string, according to a sequence of conversion specifications. In the format string, a conversion specification is introduced by '%', usually followed by a single letter or 'O' or 'E' and then a single letter. Any character in the format string that is not part of a conversion specification is interpreted literally, and the string '%%' gives '%'. The supported conversion specifications are as follows:
 '%b' Abbreviated month name in the current locale. '%B' Full month name in the current locale. '%d' Day of the month as decimal number (01-31). '%m' Month as decimal number (01-12). '%x' Date, locale-specific. '%y' Year without century (00-99). '%Y' Year with century. '%C' Century (00-99): the integer part of the year divided by 100. '%D' Locale-specific date format such as '%m/%d/%y'. '%e' Day of the month as decimal number (1-31), with a leading pace for a single-digit number. '%F' Equivalent to %Y-%m-%d (the ISO 8601 date format). '%h' Equivalent to '%b'. 
" } ], "returns" : { "type" : "xs:string", "description" : "The date value resulting from the conversion." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "to-dateTime", "qname" : "normalization:to-dateTime", "signature" : "($sd as xs:string, $format as xs:string?) as xs:string", "description" : "

Converts a given string representation of a dateTime value into a dateTime representation\n valid according to the corresponding XML Schema type.

\n", "summary" : "

Converts a given string representation of a dateTime value into a dateTime representation\n valid according to the corresponding XML Schema type.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "sd", "type" : "xs:string", "occurrence" : null, "description" : "
The string representation for the dateTime.
" }, { "name" : "format", "type" : "xs:string", "occurrence" : "?", "description" : "
An optional parameter denoting the format used to represent the dateTime in the string, according to a sequence of conversion specifications. In the format string, a conversion specification is introduced by '%', usually followed by a single letter or 'O' or 'E' and then a single letter. Any character in the format string that is not part of a conversion specification is interpreted literally, and the string '%%' gives '%'. The supported conversion specifications are as follows:

 '%b' Abbreviated month name in the current locale. '%B' Full month name in the current locale. '%c' Date and time, locale-specific. '%C' Century (00-99): the integer part of the year divided by 100. '%d' Day of the month as decimal number (01-31). '%H' Hours as decimal number (00-23). '%I' Hours as decimal number (01-12). '%j' Day of year as decimal number (001-366). '%m' Month as decimal number (01-12). '%M' Minute as decimal number (00-59). '%p' AM/PM indicator in the locale. Used in conjunction with '%I' and *not* with '%H'. '%S' Second as decimal number (00-61), allowing for up to two leap-seconds. '%x' Date, locale-specific. '%X' Time, locale-specific. '%y' Year without century (00-99). '%Y' Year with century. '%z' Offset from Greenwich, so '-0900' is 9 hours west of Greenwich. '%Z' Time zone as a character string. '%D' Locale-specific date format such as '%m/%d/%y': ISO C99 says it should be that exact format. '%e' Day of the month as decimal number (1-31), with a leading pace for a single-digit number. '%F' Equivalent to %Y-%m-%d (the ISO 8601 date format). '%g' The last two digits of the week-based year (see '%V'). '%G' The week-based year (see '%V') as a decimal number. '%h' Equivalent to '%b'. '%k' The 24-hour clock time with single digits preceded by a blank. '%l' The 12-hour clock time with single digits preceded by a blank. '%r' The 12-hour clock time (using the locale's AM or PM). '%R' Equivalent to '%H:%M'. '%T' Equivalent to '%H:%M:%S'. 
" } ], "returns" : { "type" : "xs:string", "description" : "The dateTime value resulting from the conversion." }, "errors" : [ "normalization:NOTSUPPORTED if the dateTime type is not known to the service." ] }, { "isDocumented" : true, "arity" : 2, "name" : "to-time", "qname" : "normalization:to-time", "signature" : "($sd as xs:string, $format as xs:string?) as xs:string?", "description" : "

Converts a given string representation of a time value into a time representation valid according to\n the corresponding XML Schema type.

\n", "summary" : "

Converts a given string representation of a time value into a time representation valid according to\n the corresponding XML Schema type.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "sd", "type" : "xs:string", "occurrence" : null, "description" : "
The string representation for the time.
" }, { "name" : "format", "type" : "xs:string", "occurrence" : "?", "description" : "
An optional parameter denoting the format used to represent the time in the string, according to a sequence of conversion specifications. In the format string, a conversion specification is introduced by '%', usually followed by a single letter or 'O' or 'E' and then a single letter. Any character in the format string that is not part of a conversion specification is interpreted literally, and the string '%%' gives '%'. The supported conversion specifications are as follows:

 '%H' Hours as decimal number (00-23). '%I' Hours as decimal number (01-12). '%M' Minute as decimal number (00-59). '%p' AM/PM indicator in the locale. Used in conjunction with '%I' and *not* with '%H'. '%S' Second as decimal number (00-61), allowing for up to two leap-seconds. '%X' Time, locale-specific. '%z' Offset from Greenwich, so '-0900' is 9 hours west of Greenwich. '%Z' Time zone as a character string. '%k' The 24-hour clock time with single digits preceded by a blank. '%l' The 12-hour clock time with single digits preceded by a blank. '%r' The 12-hour clock time (using the locale's AM or PM). '%R' Equivalent to '%H:%M'. '%T' Equivalent to '%H:%M:%S'. 
" } ], "returns" : { "type" : "xs:string?", "description" : "The time value resulting from the conversion." }, "errors" : [ "normalization:NOTSUPPORTED if the date type is not known to the service." ] } ], "variables" : [ ] }, "http://zorba.io/modules/excel/engineering" : { "ns" : "http://zorba.io/modules/excel/engineering", "description" : " This is a library module offering the same set of functions\n defined by Microsoft Excel, under Engineering Functions.\n", "sees" : [ "Excel Documentation: Engineering Functions" ], "authors" : [ "Sorin Nasoi" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/excel/engineering", "prefix" : "excel-engineering" }, { "uri" : "http://zorba.io/modules/excel/errors", "prefix" : "excel-err" }, { "uri" : "http://zorba.io/modules/excel/math", "prefix" : "excel-math" }, { "uri" : "http://zorba.io/modules/excel/text", "prefix" : "excel-text" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "bin2dec", "qname" : "excel-engineering:bin2dec", "signature" : "($arg as xs:anyAtomicType) as xs:integer", "description" : " Converts a binary number to decimal.\n", "summary" : "

Converts a binary number to decimal.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" } ], "returns" : { "type" : "xs:integer", "description" : "A decimal representation of a number given it's binary representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not a binary representation of a number.", "excel-err:Value if provided value for $arg contains more than 10 characters." ] }, { "isDocumented" : true, "arity" : 1, "name" : "bin2hex", "qname" : "excel-engineering:bin2hex", "signature" : "($arg as xs:anyAtomicType) as xs:string", "description" : " Converts a binary number to hexadecimal.\n", "summary" : "

Converts a binary number to hexadecimal.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" } ], "returns" : { "type" : "xs:string", "description" : "A hexadecimal representation of a number given it's binary representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not a binary representation of a number.", "excel-err:Value if provided value for $arg contains more than 10 characters." ] }, { "isDocumented" : true, "arity" : 2, "name" : "bin2hex", "qname" : "excel-engineering:bin2hex", "signature" : "($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string", "description" : " Converts a binary number to hexadecimal.\n", "summary" : "

Converts a binary number to hexadecimal.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" }, { "name" : "places", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).
" } ], "returns" : { "type" : "xs:string", "description" : "A hexadecimal representation of a number given it's binary representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not a binary representation of a number.", "excel-err:Value if provided value for $arg contains more than 10 characters.", "excel-err:Value if provided value for $places is not numeric.", "excel-err:Num if provided value for $places is zero or negative.", "excel-err:Num if provided value for $places is too small." ] }, { "isDocumented" : true, "arity" : 1, "name" : "bin2oct", "qname" : "excel-engineering:bin2oct", "signature" : "($arg as xs:anyAtomicType) as xs:string", "description" : " Converts a binary number to octal.\n", "summary" : "

Converts a binary number to octal.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" } ], "returns" : { "type" : "xs:string", "description" : "A octal representation of a number given it's binary representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not a binary representation of a number.", "excel-err:Value if provided value for $arg contains more than 10 characters." ] }, { "isDocumented" : true, "arity" : 2, "name" : "bin2oct", "qname" : "excel-engineering:bin2oct", "signature" : "($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string", "description" : " Converts a binary number to octal.\n", "summary" : "

Converts a binary number to octal.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" }, { "name" : "places", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).
" } ], "returns" : { "type" : "xs:string", "description" : "A octal representation of a number given it's binary representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not a binary representation of a number.", "excel-err:Value if provided value for $arg contains more than 10 characters.", "excel-err:Value if provided value for $places is not numeric.", "excel-err:Num if provided value for $places is zero or negative.", "excel-err:Num if provided value for $places is too small." ] }, { "isDocumented" : true, "arity" : 1, "name" : "dec2bin", "qname" : "excel-engineering:dec2bin", "signature" : "($arg as xs:anyAtomicType) as xs:string", "description" : " Converts a decimal number to binary.\n", "summary" : "

Converts a decimal number to binary.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" } ], "returns" : { "type" : "xs:string", "description" : "A binary representation of a number given it's decimal representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not numeric.", "excel-err:Num if provided value for $arg is smaller than -512 or bigger than 511." ] }, { "isDocumented" : true, "arity" : 2, "name" : "dec2bin", "qname" : "excel-engineering:dec2bin", "signature" : "($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string", "description" : " Converts a decimal number to binary.\n", "summary" : "

Converts a decimal number to binary.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" }, { "name" : "places", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).
" } ], "returns" : { "type" : "xs:string", "description" : "A binary representation of a number given it's decimal representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not numeric.", "excel-err:Value if provided value for $places is not numeric.", "excel-err:Num if provided value for $places is zero or negative.", "excel-err:Num if provided value for $places is too small.", "excel-err:Num if provided value for $arg is smaller than -512 or bigger than 511." ] }, { "isDocumented" : true, "arity" : 1, "name" : "dec2hex", "qname" : "excel-engineering:dec2hex", "signature" : "($arg as xs:anyAtomicType) as xs:string", "description" : " Converts a decimal number to hexadecimal.\n", "summary" : "

Converts a decimal number to hexadecimal.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" } ], "returns" : { "type" : "xs:string", "description" : "A hexadecimal representation of a number given it's decimal representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not numeric.", "excel-err:Num if provided value for $arg is smaller than -549755813888 or bigger than 549755813887" ] }, { "isDocumented" : true, "arity" : 2, "name" : "dec2hex", "qname" : "excel-engineering:dec2hex", "signature" : "($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string", "description" : " Converts a decimal number to hexadecimal.\n", "summary" : "

Converts a decimal number to hexadecimal.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" }, { "name" : "places", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).
" } ], "returns" : { "type" : "xs:string", "description" : "A hexadecimal representation of a number given it's decimal representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not numeric.", "excel-err:Value if provided value for $places is not numeric.", "excel-err:Num if provided value for $places is zero or negative.", "excel-err:Num if provided value for $places is too small.", "excel-err:Num if provided value for $arg is smaller than -549755813888 or bigger than 549755813887." ] }, { "isDocumented" : true, "arity" : 1, "name" : "dec2oct", "qname" : "excel-engineering:dec2oct", "signature" : "($arg as xs:anyAtomicType) as xs:string", "description" : " Converts a decimal number to octal.\n", "summary" : "

Converts a decimal number to octal.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" } ], "returns" : { "type" : "xs:string", "description" : "An octal representation of a number given it's decimal representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not numeric.", "excel-err:Num if provided value for $arg is smaller than -536870912 or bigger than 536870911." ] }, { "isDocumented" : true, "arity" : 2, "name" : "dec2oct", "qname" : "excel-engineering:dec2oct", "signature" : "($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string", "description" : " Converts a decimal number to octal.\n", "summary" : "

Converts a decimal number to octal.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number
" }, { "name" : "places", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).
" } ], "returns" : { "type" : "xs:string", "description" : "An octal representation of a number given it's decimal representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not numeric", "excel-err:Value if provided value for $places is not numeric", "excel-err:Num if provided value for $places is zero or negative", "excel-err:Num if provided value for $places is too small", "excel-err:Num if provided value for $arg is smaller than -536870912 or bigger than 536870911" ] }, { "isDocumented" : true, "arity" : 1, "name" : "hex2bin", "qname" : "excel-engineering:hex2bin", "signature" : "($arg as xs:anyAtomicType) as xs:string", "description" : " Converts a hexadecimal number to binary.\n", "summary" : "

Converts a hexadecimal number to binary.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" } ], "returns" : { "type" : "xs:string", "description" : "A binary representation of a number given it's hexadecimal representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not a hexadecimal representation of a number.", "excel-err:Value if provided value for $arg contains more than 10 characters." ] }, { "isDocumented" : true, "arity" : 2, "name" : "hex2bin", "qname" : "excel-engineering:hex2bin", "signature" : "($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string", "description" : " Converts a hexadecimal number to binary.\n", "summary" : "

Converts a hexadecimal number to binary.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" }, { "name" : "places", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).
" } ], "returns" : { "type" : "xs:string", "description" : "A binary representation of a number given it's hexadecimal representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not a hexadecimal representation of a number.", "excel-err:Value if provided value for $arg contains more than 10 characters.", "excel-err:Value if provided value for $places is not numeric.", "excel-err:Num if provided value for $places is zero or negative.", "excel-err:Num if provided value for $places is too small." ] }, { "isDocumented" : true, "arity" : 1, "name" : "hex2dec", "qname" : "excel-engineering:hex2dec", "signature" : "($arg as xs:string) as xs:integer", "description" : " Converts a hexadecimal number to decimal.\n", "summary" : "

Converts a hexadecimal number to decimal.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : null, "description" : "
the number.
" } ], "returns" : { "type" : "xs:integer", "description" : "A decimal representation of a number given it's hexadecimal representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not a hexadecimal representation of a number.", "excel-err:Value if provided value for $arg contains more than 10 characters." ] }, { "isDocumented" : true, "arity" : 1, "name" : "hex2oct", "qname" : "excel-engineering:hex2oct", "signature" : "($arg as xs:anyAtomicType) as xs:string", "description" : " Converts a hexadecimal number to octal.\n", "summary" : "

Converts a hexadecimal number to octal.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" } ], "returns" : { "type" : "xs:string", "description" : "A octal representation of a number given it's hexadecimal representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not a hexadecimal representation of a number.", "excel-err:Value if provided value for $arg contains more than 10 characters." ] }, { "isDocumented" : true, "arity" : 2, "name" : "hex2oct", "qname" : "excel-engineering:hex2oct", "signature" : "($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string", "description" : " Converts a hexadecimal number to octal.\n", "summary" : "

Converts a hexadecimal number to octal.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" }, { "name" : "places", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).
" } ], "returns" : { "type" : "xs:string", "description" : "A octal representation of a number given it's hexadecimal representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not a hexadecimal representation of a number.", "excel-err:Value if provided value for $arg contains more than 10 characters.", "excel-err:Value if provided value for $places is not numeric.", "excel-err:Num if provided value for $places is zero or negative.", "excel-err:Num if provided value for $places is too small." ] }, { "isDocumented" : true, "arity" : 1, "name" : "oct2bin", "qname" : "excel-engineering:oct2bin", "signature" : "($arg as xs:anyAtomicType) as xs:string", "description" : " Converts an octal number to binary.\n", "summary" : "

Converts an octal number to binary.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" } ], "returns" : { "type" : "xs:string", "description" : "A binary representation of a number given it's octal representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not an octal representation of a number.", "excel-err:Value if provided value for $arg contains more than 10 characters." ] }, { "isDocumented" : true, "arity" : 2, "name" : "oct2bin", "qname" : "excel-engineering:oct2bin", "signature" : "($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string", "description" : " Converts an octal number to binary.\n", "summary" : "

Converts an octal number to binary.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" }, { "name" : "places", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).
" } ], "returns" : { "type" : "xs:string", "description" : "A binary representation of a number given it's octal representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not an octal representation of a number.", "excel-err:Value if provided value for $arg contains more than 10 characters.", "excel-err:Value if provided value for $places is not numeric.", "excel-err:Num if provided value for $places is zero or negative.", "excel-err:Num if provided value for $places is too small." ] }, { "isDocumented" : true, "arity" : 1, "name" : "oct2dec", "qname" : "excel-engineering:oct2dec", "signature" : "($arg as xs:anyAtomicType) as xs:integer", "description" : " Converts an octal number to decimal.\n", "summary" : "

Converts an octal number to decimal.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" } ], "returns" : { "type" : "xs:integer", "description" : "A decimal representation of a number given it's octal representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not an octal representation of a number.", "excel-err:Value if provided value for $arg contains more than 10 characters." ] }, { "isDocumented" : true, "arity" : 1, "name" : "oct2hex", "qname" : "excel-engineering:oct2hex", "signature" : "($arg as xs:anyAtomicType) as xs:string", "description" : " Converts an octal number to hexadecimal.\n", "summary" : "

Converts an octal number to hexadecimal.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" } ], "returns" : { "type" : "xs:string", "description" : "A hexadecimal representation of a number given it's octal representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not an octal representation of a number.", "excel-err:Value if provided value for $arg contains more than 10 characters." ] }, { "isDocumented" : true, "arity" : 2, "name" : "oct2hex", "qname" : "excel-engineering:oct2hex", "signature" : "($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string", "description" : " Converts an octal number to hexadecimal.\n", "summary" : "

Converts an octal number to hexadecimal.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the number.
" }, { "name" : "places", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).
" } ], "returns" : { "type" : "xs:string", "description" : "A hexadecimal representation of a number given it's octal representation." }, "errors" : [ "excel-err:Value if provided value for $arg is not an octal representation of a number.", "excel-err:Value if provided value for $arg contains more than 10 characters.", "excel-err:Value if provided value for $places is not numeric.", "excel-err:Num if provided value for $places is zero or negative.", "excel-err:Num if provided value for $places is too small." ] } ], "variables" : [ ] }, "http://www.zorba-xquery.com/modules/util-jvm" : { "ns" : "http://www.zorba-xquery.com/modules/util-jvm", "description" : " This module provides common functionality for modules that use java\n implementations.\n
\n
\n Modules using java implementations must import this module\n to specify the dependency.\n
\n
\n Note: Since this module has a Java library dependency a JVM is required\n to be installed on the system. For Windows: jvm.dll is required on the system\n path (usually located in \"C:\\Program Files\\Java\\jre\\bin\\client\").\n", "sees" : [ ], "authors" : [ "Cezar Andrei" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.zorba-xquery.com/modules/util-jvm", "prefix" : "util-jvm" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ ], "variables" : [ ] }, "http://www.28msec.com/modules/asynchronous-jobs" : { "ns" : "http://www.28msec.com/modules/asynchronous-jobs", "description" : "

This module provides functionality for executing asynchronous jobs.\n There are three kinds of jobs: (1) a job for executing a (public or private)\n query of your project, (2) a job for mapping an input\n collection into an output collection, and (3) a job for shuffling the items\n of an input collection to several output collections.\n Map and Shuffle jobs are mostly used within\n the parallelism framework and are not meant to be created directly.

\n

Jobs that have been scheduled for execution can be referred to by\n an opaque identifier being returned by the corresponding scheduling\n function (e.g. job:execute or job:map). Specifically,\n the job's identifier can be used to retrieve the status of a job\n (e.g. job:status) or the names of its input and output collections.

\n", "sees" : [ ], "authors" : [ "Ghislain Fourny", "Julien Ribon", "Matthias Brantner" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "", "prefix" : "an" }, { "uri" : "http://zorba.io/modules/base64", "prefix" : "base64" }, { "uri" : "http://zorba.io/modules/fetch", "prefix" : "fetch" }, { "uri" : "http://www.zorba-xquery.com/modules/http-client", "prefix" : "http-client" }, { "uri" : "http://www.28msec.com/modules/asynchronous-jobs", "prefix" : "job" }, { "uri" : "http://www.28msec.com/modules/project", "prefix" : "project" }, { "uri" : "http://zorba.io/modules/random", "prefix" : "rand" }, { "uri" : "http://www.28msec.com/modules/http/request", "prefix" : "request" }, { "uri" : "http://www.28msec.com/modules/store", "prefix" : "store" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "build-map-shuffle", "qname" : "job:build-map-shuffle", "signature" : "($input-collection as xs:string, $options as object()?) as object()", "description" : "

Builds an object describing an asynchronous job (map or shuffle).

\n

This object can then be sent to the scheduler.

\n

The $options parameter allows for the specification of properties for\n the shuffle job. Allowed options are:\n

\n

\n", "summary" : "

Builds an object describing an asynchronous job (map or shuffle).

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "input-collection", "type" : "xs:string", "occurrence" : null, "description" : "
The name of the collection that the job processes.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
An object specifying above options for the asynchronous job.
" } ], "returns" : { "type" : "object()", "description" : "the id of the scheduled job, which can be used to pull for the status and results." }, "errors" : [ "err:XPTY0004 if the type of a supplied option is incorrect.", "job:JBDY0005 if the supplied function does not have a name.", "job:JBDY0006 if the supplied function is in the local namespace.", "job:JBDY0008 if the supplied input collection is not available." ] }, { "isDocumented" : true, "arity" : 1, "name" : "error", "qname" : "job:error", "signature" : "($id as xs:string) as object()?", "description" : "

Returns the error object output by an asynchronous job, in case of a failed job.

\n", "summary" : "

Returns the error object output by an asynchronous job, in case of a failed job.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the asynchronous job to query.
" } ], "returns" : { "type" : "object()?", "description" : "the error object output by the corresponding asynchronous job." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "execute", "qname" : "job:execute", "signature" : "($query as xs:string) as xs:string", "description" : "

Schedules an asynchronous job executing the given (public or private)\n query from your project.

\n

The result of the query will be stored in a collection withing the\n MongoDB database associated with the project. The name of the collection\n is randomly generated and starts with _28.temporary.

\n", "summary" : "

Schedules an asynchronous job executing the given (public or private)\n query from your project.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "query", "type" : "xs:string", "occurrence" : null, "description" : "
The path of the query to execute, which must begin with /public or /private. (examples: /public/query.xq, /private/query.jq).
" } ], "returns" : { "type" : "xs:string", "description" : "The id of the scheduled job." }, "errors" : [ "job:JBDY0003 if the supplied query path does not begin with /public or /private.", "job:JBDY0004 if the supplied query path cannot be resolved." ] }, { "isDocumented" : true, "arity" : 2, "name" : "execute", "qname" : "job:execute", "signature" : "($query as xs:string, $options as object()?) as xs:string", "description" : "

Schedules an asynchronous job executing the given (public or private)\n query from your project.

\n

The $options parameter allows for the specification of properties for\n the asynchronously executed job. Allowed options are:\n

\n

\n", "summary" : "

Schedules an asynchronous job executing the given (public or private)\n query from your project.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "query", "type" : "xs:string", "occurrence" : null, "description" : "
The path of the query to execute, which must begin with /public or /private. (examples: /public/query.xq, /private/query.jq).
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
An object specifying above options for the asynchronous job.
" } ], "returns" : { "type" : "xs:string", "description" : "The id of the scheduled job." }, "errors" : [ "err:XPTY0004 if the type of a supplied option is incorrect.", "job:JBDY0003 if the supplied query path does not begin with /public or /private.", "job:JBDY0004 if the supplied query path cannot be resolved." ] }, { "isDocumented" : true, "arity" : 1, "name" : "function", "qname" : "job:function", "signature" : "($id as xs:string) as xs:string?", "description" : "

Returns the name of the map or shuffle function used by an asynchronous job.

\n", "summary" : "

Returns the name of the map or shuffle function used by an asynchronous job.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the asynchronous job to query.
" } ], "returns" : { "type" : "xs:string?", "description" : "the name of the map or shuffle function of the corresponding asynchronous job." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "get", "qname" : "job:get", "signature" : "($id as xs:string) as object()*", "description" : "

Returns the asynchronous job associated with the supplied asynchronous job id,\n or the asynchronous jobs associated with the supplied parallel job id.

\n

This function is internal and should only be used by the parallelism module.

\n", "summary" : "

Returns the asynchronous job associated with the supplied asynchronous job id,\n or the asynchronous jobs associated with the supplied parallel job id.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the asynchronous or parallel job to query.
" } ], "returns" : { "type" : "object()*", "description" : "the objects describing the asynchronous jobs." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "input-collection", "qname" : "job:input-collection", "signature" : "($id as xs:string) as xs:string?", "description" : "

Returns the name of the input collection of a mapping asynchronous job.

\n", "summary" : "

Returns the name of the input collection of a mapping asynchronous job.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the asynchronous job to query.
" } ], "returns" : { "type" : "xs:string?", "description" : "the name of the input collection of the corresponding asynchronous job." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "jobs", "qname" : "job:jobs", "signature" : "() as object()*", "description" : "

Returns the ids of all jobs created by this project.

\n", "summary" : "

Returns the ids of all jobs created by this project.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()*", "description" : "the sequence of the ids of all jobs created so far." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "kind", "qname" : "job:kind", "signature" : "($id as xs:string) as xs:string?", "description" : "

Returns the kind of the asynchronous job.

\n", "summary" : "

Returns the kind of the asynchronous job.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the asynchronous job to query.
" } ], "returns" : { "type" : "xs:string?", "description" : "the kind of the asynchronous job." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "map", "qname" : "job:map", "signature" : "($input-collection as xs:string, $map-function as function (item()*) as item()*) as xs:string", "description" : "

Schedules an asynchronous job mapping the input collection\n to an output collection with the specified function.

\n

The name of the output collection is randomly generated and\n starts with _28.temporary.

\n", "summary" : "

Schedules an asynchronous job mapping the input collection\n to an output collection with the specified function.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "input-collection", "type" : "xs:string", "occurrence" : null, "description" : "
The name of the collection that the job processes.
" }, { "name" : "map-function", "type" : "function (item()*) as item()*", "occurrence" : null, "description" : "
The function which is run on the input collection's contents.
" } ], "returns" : { "type" : "xs:string", "description" : "The id of the scheduled job, which can be used to pull for the status and results." }, "errors" : [ "job:JBDY0005 if the supplied function does not have a name.", "job:JBDY0006 if the supplied function is in the local namespace.", "job:JBDY0008 if the supplied input collection does not exist." ] }, { "isDocumented" : true, "arity" : 3, "name" : "map", "qname" : "job:map", "signature" : "($input-collection as xs:string, $map-function as function (item()*) as item()*, $options as object()?) as xs:string", "description" : "

Schedules an asynchronous job mapping the input collection\n to an output collection with the specified function.

\n

The $options parameter allows for the specification of properties for\n the map job. Allowed options are:\n

\n

\n", "summary" : "

Schedules an asynchronous job mapping the input collection\n to an output collection with the specified function.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "input-collection", "type" : "xs:string", "occurrence" : null, "description" : "
The name of the collection that the job processes.
" }, { "name" : "map-function", "type" : "function (item()*) as item()*", "occurrence" : null, "description" : "
The function which is run on the collection's contents.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
An object specifying above options for the asynchronous job.
" } ], "returns" : { "type" : "xs:string", "description" : "the id of the scheduled job, which can be used to pull for the status and results." }, "errors" : [ "err:XPTY0004 if the type of a supplied option is incorrect.", "job:JBDY0005 if the supplied function does not have a name.", "job:JBDY0006 if the supplied function is in the local namespace.", "job:JBDY0008 if the supplied input collection does not exist." ] }, { "isDocumented" : true, "arity" : 1, "name" : "output-collection", "qname" : "job:output-collection", "signature" : "($id as xs:string) as xs:string?", "description" : "

Returns the name of the output collection of a mapping or executing asynchronous job.

\n", "summary" : "

Returns the name of the output collection of a mapping or executing asynchronous job.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the asynchronous job to query.
" } ], "returns" : { "type" : "xs:string?", "description" : "the name of the output collection of the corresponding asynchronous job." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "output-collections", "qname" : "job:output-collections", "signature" : "($id as xs:string) as xs:string*", "description" : " Returns the name of the output collections of a shuffle asynchronous job.\n", "summary" : "

Returns the name of the output collections of a shuffle asynchronous job.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "the name of the output collections of the corresponding asynchronous job." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "properties", "qname" : "job:properties", "signature" : "($id as xs:string) as object()", "description" : "

Returns the properties of an asynchronous job as an object with the following\n fields:

\n \n", "summary" : "

Returns the properties of an asynchronous job as an object with the following\n fields: \n \n accessed : the time at which the job was last accessed.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the asynchronous job to query.
" } ], "returns" : { "type" : "object()", "description" : "the time at which the corresponding asynchronous job was last accessed." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "query-name", "qname" : "job:query-name", "signature" : "($id as xs:string) as xs:string?", "description" : "

Returns the name of the query executed by an executing asynchronous job.

\n", "summary" : "

Returns the name of the query executed by an executing asynchronous job.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "id", "type" : "xs:string", "occurrence" : null, "description" : "
the id of the asynchronous job to query.
" } ], "returns" : { "type" : "xs:string?", "description" : "the name of the query executed by the corresponding asynchronous job." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "schedule", "qname" : "job:schedule", "signature" : "($jobs as object()*) as object()*", "description" : "

Sends jobs to the job queue.

\n

This function is internal and should only be used by this and the parallelism module.

\n", "summary" : "

Sends jobs to the job queue.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "jobs", "type" : "object()", "occurrence" : "*", "description" : "
The job to send, as generated by job:build-map-shuffle().
" } ], "returns" : { "type" : "object()*", "description" : "Objects containing the new ids." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "shuffle", "qname" : "job:shuffle", "signature" : "($input-collection as xs:string, $shuffle-function as function (item()) as xs:integer, $options as object()?) as xs:string", "description" : "

Schedules an asynchronous job shuffling the items of the input collections to output collections\n using the specified shuffle function.

\n

The $options parameter allows for the specification of properties for\n the shuffle job. Allowed options are:\n

\n

\n", "summary" : "

Schedules an asynchronous job shuffling the items of the input collections to output collections\n using the specified shuffle function.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "input-collection", "type" : "xs:string", "occurrence" : null, "description" : "
The name of the collection that the job processes.
" }, { "name" : "shuffle-function", "type" : "function (item()) as xs:integer", "occurrence" : null, "description" : "" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
An object specifying above options for the asynchronous job.
" } ], "returns" : { "type" : "xs:string", "description" : "the id of the scheduled job, which can be used to pull for the status and results." }, "errors" : [ "err:XPTY0004 if the type of a supplied option is incorrect.", "job:JBDY0005 if the supplied function does not have a name.", "job:JBDY0006 if the supplied function is in the local namespace.", "job:JBDY0008 if the supplied input collection does not exist." ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/datetime" : { "ns" : "http://www.28msec.com/modules/datetime", "description" : " This modules contains function that operate on items of type date, time,\n dateTime, and duration.\n

The module is always imported so you don't need to import it explicitly.\n Also, you don't need to fully qualify a function to invoke it.

\n", "sees" : [ ], "authors" : [ ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.28msec.com/modules/datetime", "prefix" : "datetime" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "adjust-date-to-timezone", "qname" : "datetime:adjust-date-to-timezone", "signature" : "($arg as date?) as date?", "description" : " Adjusts a date value to the implicit timezone.\n", "summary" : "

Adjusts a date value to the implicit timezone.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "date", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "date?", "description" : "the date in the implicit timezone that contains the starting instant of the supplied date. For a detailed description of the semantics of this function, please see adjust-date-to-timezone." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "adjust-date-to-timezone", "qname" : "datetime:adjust-date-to-timezone", "signature" : "($arg as date?, $timezone as dayTimeDuration?) as date?", "description" : " Adjusts a date value to a specific timezone, or to no timezone at all.\n", "summary" : "

Adjusts a date value to a specific timezone, or to no timezone at all.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "date", "occurrence" : "?", "description" : "" }, { "name" : "timezone", "type" : "dayTimeDuration", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "date?", "description" : "the date in the target timezone that contains the starting instant of the supplied date. For a detailed description of the semantics of this function, please see adjust-date-to-timezone" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "adjust-dateTime-to-timezone", "qname" : "datetime:adjust-dateTime-to-timezone", "signature" : "($arg as dateTime?) as dateTime", "description" : " Adjusts a dateTime value to the implicit timezone.\n", "summary" : "

Adjusts a dateTime value to the implicit timezone.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "dateTime", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "dateTime", "description" : "the dateTime in the implicit timezone. For a detailed description of the semantics of this function, please see adjust-dateTime-to-timezone" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "adjust-dateTime-to-timezone", "qname" : "datetime:adjust-dateTime-to-timezone", "signature" : "($arg as dateTime?, $timezone as dayTimeDuration?) as dateTime", "description" : " Adjusts a dateTime value to the specified timezone, or to no timezone at all.\n", "summary" : "

Adjusts a dateTime value to the specified timezone, or to no timezone at all.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "dateTime", "occurrence" : "?", "description" : "" }, { "name" : "timezone", "type" : "dayTimeDuration", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "dateTime", "description" : "the dateTime in the specified timezone. For a detailed description of the semantics of this function, please see adjust-dateTime-to-timezone" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "adjust-time-to-timezone", "qname" : "datetime:adjust-time-to-timezone", "signature" : "($arg as time?) as time?", "description" : " Adjusts a time value to an implicit timezone.\n", "summary" : "

Adjusts a time value to an implicit timezone.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "time", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "time?", "description" : "the time in the implicit timezone. For a detailed description of the semantics of this function, please see adjust-time-to-timezone" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "adjust-time-to-timezone", "qname" : "datetime:adjust-time-to-timezone", "signature" : "($arg as time?, $timezone as dayTimeDuration?) as time?", "description" : " Adjusts a time value to a specific timezone, or to no timezone at all.\n", "summary" : "

Adjusts a time value to a specific timezone, or to no timezone at all.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "time", "occurrence" : "?", "description" : "" }, { "name" : "timezone", "type" : "dayTimeDuration", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "time?", "description" : "the time in the specified timezone. For a detailed description of the semantics of this function, please see adjust-time-to-timezone" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "current-date", "qname" : "datetime:current-date", "signature" : "() as date external", "description" : " Returns the current date.\n For a detailed description of the semantics of this function, please see\n current-date\n", "summary" : "

Returns the current date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "date", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "current-dateTime", "qname" : "datetime:current-dateTime", "signature" : "() as dateTimeStamp external", "description" : " Returns the current dateTime.\n For a detailed description of the semantics of this function, please see\n current-dateTime\n", "summary" : "

Returns the current dateTime.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "dateTimeStamp", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "current-time", "qname" : "datetime:current-time", "signature" : "() as time external", "description" : " Returns the current time.\n For a detailed description of the semantics of this function, please see\n current-time\n", "summary" : "

Returns the current time.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "time", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "dateTime", "qname" : "datetime:dateTime", "signature" : "($arg1 as date?, $arg2 as time?) as dateTime?", "description" : " Returns a dateTime value created by combining a date and a time.\n", "summary" : "

Returns a dateTime value created by combining a date and a time.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "date", "occurrence" : "?", "description" : "" }, { "name" : "arg2", "type" : "time", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "dateTime?", "description" : "the dateTime value created by combinding the given date and time. For a detailed description of the semantics of this function, please see dateTime" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "day-from-date", "qname" : "datetime:day-from-date", "signature" : "($arg as date?) as integer?", "description" : " Returns the day component of a date.\n", "summary" : "

Returns the day component of a date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "date", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "integer?", "description" : "the day component of the given date. For a detailed description of the semantics of this function, please see day-from-date" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "day-from-dateTime", "qname" : "datetime:day-from-dateTime", "signature" : "($arg as dateTime?) as integer?", "description" : " Returns the day component of a dateTime.\n", "summary" : "

Returns the day component of a dateTime.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "dateTime", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "integer?", "description" : "the day component of the given dateTime. For a detailed description of the semantics of this function, please see day-from-dateTime" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "days-from-duration", "qname" : "datetime:days-from-duration", "signature" : "($arg as duration?) as integer?", "description" : " Returns the number of days in a duration.\n", "summary" : "

Returns the number of days in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "duration", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "integer?", "description" : "the number of days in the given duration. For a detailed description of the semantics of this function, please see days-from-duration" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "format-date", "qname" : "datetime:format-date", "signature" : "($value as date?, $picture as string) as string?", "description" : " Returns a string containing a date value formatted for display.\n", "summary" : "

Returns a string containing a date value formatted for display.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "date", "occurrence" : "?", "description" : "" }, { "name" : "picture", "type" : "string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "string?", "description" : "the string formatted according to the given picture. The following examples assume let $d := date(\"2002-12-31\") and the Gregorian calendar as the default calendar. For a detailed description of the semantics of this function, please see format-date" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "format-date", "qname" : "datetime:format-date", "signature" : "($value as date?, $picture as string, $language as string?, $calendar as string?, $place as string?) as string?", "description" : " Returns a string containing a date value formatted for display.\n", "summary" : "

Returns a string containing a date value formatted for display.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "date", "occurrence" : "?", "description" : "" }, { "name" : "picture", "type" : "string", "occurrence" : null, "description" : "" }, { "name" : "language", "type" : "string", "occurrence" : "?", "description" : "" }, { "name" : "calendar", "type" : "string", "occurrence" : "?", "description" : "" }, { "name" : "place", "type" : "string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "string?", "description" : "the string formatted according to the given picture. The following examples assume let $d := date(\"2002-12-31\") and the Gregorian calendar as the default calendar. For a detailed description of the semantics of this function, please see format-date" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "format-dateTime", "qname" : "datetime:format-dateTime", "signature" : "($value as dateTime?, $picture as string) as string?", "description" : " Returns a string containing a dateTime value formatted for display.\n", "summary" : "

Returns a string containing a dateTime value formatted for display.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "dateTime", "occurrence" : "?", "description" : "" }, { "name" : "picture", "type" : "string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "string?", "description" : "the string formatted according to the given picture. The following examples assume let $dt := dateTime(\"2002-12-31T15:58:45\") and the Gregorian calendar as the default calendar. For a detailed description of the semantics of this function, please see format-dateTime" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 5, "name" : "format-dateTime", "qname" : "datetime:format-dateTime", "signature" : "($value as dateTime?, $picture as string, $language as string?, $calendar as string?, $place as string?) as string?", "description" : " Returns a string containing a dateTime value formatted for display.\n", "summary" : "

Returns a string containing a dateTime value formatted for display.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "dateTime", "occurrence" : "?", "description" : "" }, { "name" : "picture", "type" : "string", "occurrence" : null, "description" : "" }, { "name" : "language", "type" : "string", "occurrence" : "?", "description" : "" }, { "name" : "calendar", "type" : "string", "occurrence" : "?", "description" : "" }, { "name" : "place", "type" : "string", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "string?", "description" : "the string formatted according to the given picture. For a detailed description of the semantics of this function, please see format-dateTime" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "hours-from-dateTime", "qname" : "datetime:hours-from-dateTime", "signature" : "($arg as dateTime?) as integer?", "description" : " Returns the hours component of a dateTime.\n", "summary" : "

Returns the hours component of a dateTime.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "dateTime", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "integer?", "description" : "the hours component of the given dateTime. For a detailed description of the semantics of this function, please see hours-from-dateTime" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "hours-from-duration", "qname" : "datetime:hours-from-duration", "signature" : "($arg as duration?) as integer?", "description" : " Returns the number of hours in a duration.\n", "summary" : "

Returns the number of hours in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "duration", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "integer?", "description" : "the number of hours in the given duration. For a detailed description of the semantics of this function, please see hours-from-duration" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "hours-from-time", "qname" : "datetime:hours-from-time", "signature" : "($arg as time?) as integer?", "description" : " Returns the hours component of a time.\n", "summary" : "

Returns the hours component of a time.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "time", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "integer?", "description" : "the hours component of the given time. For a detailed description of the semantics of this function, please see hours-from-time" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "implicit-timezone", "qname" : "datetime:implicit-timezone", "signature" : "() as dayTimeDuration", "description" : " Returns the value of the implicit timezone property set in the platform.\n", "summary" : "

Returns the value of the implicit timezone property set in the platform.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "dayTimeDuration", "description" : "the implicit timezone property. For a detailed description of the semantics of this function, please see implicit-timezone" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "minutes-from-dateTime", "qname" : "datetime:minutes-from-dateTime", "signature" : "($arg as dateTime?) as integer?", "description" : " Returns the minute component of a dateTime.\n", "summary" : "

Returns the minute component of a dateTime.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "dateTime", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "integer?", "description" : "the minute component of the given dateTime. For a detailed description of the semantics of this function, please see minutes-from-dateTime" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "minutes-from-duration", "qname" : "datetime:minutes-from-duration", "signature" : "($arg as duration?) as integer?", "description" : " Returns the number of minutes in a duration.\n", "summary" : "

Returns the number of minutes in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "duration", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "integer?", "description" : "the number of minutes of the given duration. For a detailed description of the semantics of this function, please see minutes-from-duration" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "minutes-from-time", "qname" : "datetime:minutes-from-time", "signature" : "($arg as time?) as integer?", "description" : " Returns the minutes component of a time.\n", "summary" : "

Returns the minutes component of a time.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "time", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "integer?", "description" : "the minutes component of the given time. For a detailed description of the semantics of this function, please see minutes-from-time" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "month-from-date", "qname" : "datetime:month-from-date", "signature" : "($arg as date?) as integer?", "description" : " Returns the month component of a date.\n", "summary" : "

Returns the month component of a date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "date", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "integer?", "description" : "the month component of the given date. For a detailed description of the semantics of this function, please see month-from-date" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "month-from-dateTime", "qname" : "datetime:month-from-dateTime", "signature" : "($arg as dateTime?) as integer?", "description" : " Returns the month component of a dateTime.\n", "summary" : "

Returns the month component of a dateTime.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "dateTime", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "integer?", "description" : "the month component of the given dateTime. For a detailed description of the semantics of this function, please see month-from-dateTime" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "months-from-duration", "qname" : "datetime:months-from-duration", "signature" : "($arg as duration?) as integer?", "description" : " Returns the number of months in a duration.\n", "summary" : "

Returns the number of months in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "duration", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "integer?", "description" : "the number of months in the given duration. For a detailed description of the semantics of this function, please see months-from-duration" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "seconds-from-dateTime", "qname" : "datetime:seconds-from-dateTime", "signature" : "($arg as dateTime?) as decimal?", "description" : " Returns the seconds component of a dateTime.\n", "summary" : "

Returns the seconds component of a dateTime.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "dateTime", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "decimal?", "description" : "the seconds component of the given dateTime. For a detailed description of the semantics of this function, please see seconds-from-dateTime" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "seconds-from-duration", "qname" : "datetime:seconds-from-duration", "signature" : "($arg as duration?) as decimal?", "description" : " Returns the number of seconds in a duration.\n", "summary" : "

Returns the number of seconds in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "duration", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "decimal?", "description" : "the number of seconds in the given duration. For a detailed description of the semantics of this function, please see seconds-from-duration" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "seconds-from-time", "qname" : "datetime:seconds-from-time", "signature" : "($arg as time?) as decimal?", "description" : " Returns the seconds component of a time.\n", "summary" : "

Returns the seconds component of a time.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "time", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "decimal?", "description" : "the seconds component of the given time. For a detailed description of the semantics of this function, please see seconds-from-time" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "timezone-from-date", "qname" : "datetime:timezone-from-date", "signature" : "($arg as date?) as dayTimeDuration?", "description" : " Returns the timezone component of a date.\n", "summary" : "

Returns the timezone component of a date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "date", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "dayTimeDuration?", "description" : "the timezone component of the given date. For a detailed description of the semantics of this function, please see timezone-from-date" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "timezone-from-dateTime", "qname" : "datetime:timezone-from-dateTime", "signature" : "($arg as dateTime?) as dayTimeDuration?", "description" : " Returns the timezone component of a dateTime.\n", "summary" : "

Returns the timezone component of a dateTime.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "dateTime", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "dayTimeDuration?", "description" : "the timezone component of the given dateTime. For a detailed description of the semantics of this function, please see timezone-from-dateTime" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "timezone-from-time", "qname" : "datetime:timezone-from-time", "signature" : "($arg as time?) as dayTimeDuration?", "description" : " Returns the timezone component of a time.\n", "summary" : "

Returns the timezone component of a time.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "time", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "dayTimeDuration?", "description" : "the timezone component of the given time. For a detailed description of the semantics of this function, please see timezone-from-time" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "year-from-date", "qname" : "datetime:year-from-date", "signature" : "($arg as date?) as integer?", "description" : " Returns the year component of a date.\n", "summary" : "

Returns the year component of a date.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "date", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "integer?", "description" : "the year component of the given date. For a detailed description of the semantics of this function, please see year-from-date" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "year-from-dateTime", "qname" : "datetime:year-from-dateTime", "signature" : "($arg as dateTime?) as integer?", "description" : " Returns the year component of a dateTime.\n", "summary" : "

Returns the year component of a dateTime.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "dateTime", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "integer?", "description" : "the year component of the given dateTime. For a detailed description of the semantics of this function, please see year-from-dateTime" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "years-from-duration", "qname" : "datetime:years-from-duration", "signature" : "($arg as duration?) as integer?", "description" : " Returns the number of years in a duration.\n", "summary" : "

Returns the number of years in a duration.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "duration", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "integer?", "description" : "the number of years in the given duration. For a detailed description of the semantics of this function, please see years-from-duration" }, "errors" : [ ] } ], "variables" : [ ] }, "http://api.28.io/jdbc" : { "ns" : "http://api.28.io/jdbc", "description" : "", "sees" : [ ], "authors" : [ ], "version" : null, "encoding" : null, "namespaces" : [ { "uri" : "", "prefix" : "an" }, { "uri" : "http://api.28.io/jdbc", "prefix" : "api" }, { "uri" : "http://www.28msec.com/modules/jdbc", "prefix" : "jdbc" }, { "uri" : "http://www.28msec.com/modules/http/request", "prefix" : "req" }, { "uri" : "http://www.28msec.com/modules/http/response", "prefix" : "res" }, { "uri" : "http://www.28msec.com/modules/store", "prefix" : "store" }, { "uri" : "http://zorba.io/errors", "prefix" : "zerr" } ], "functions" : [ { "isDocumented" : false, "arity" : 0, "name" : "dispatch", "qname" : "api:dispatch", "signature" : "()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 0, "name" : "import", "qname" : "api:import", "signature" : "()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 0, "name" : "tables", "qname" : "api:tables", "signature" : "()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/excel/information" : { "ns" : "http://zorba.io/modules/excel/information", "description" : " This is a library module offering the same set of functions\n defined by Microsoft Excel, under Information Functions.\n", "sees" : [ "Excel Documentation: Information Functions" ], "authors" : [ "Sorin Nasoi" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/excel/errors", "prefix" : "excel-err" }, { "uri" : "http://zorba.io/modules/excel/information", "prefix" : "excel-information" }, { "uri" : "http://zorba.io/modules/excel/math", "prefix" : "excel-math" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "is-blank", "qname" : "excel-information:is-blank", "signature" : "($value as xs:anyAtomicType?) as xs:boolean", "description" : " Test if the passed argument is empty of not.\n", "summary" : "

Test if the passed argument is empty of not.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the value.
" } ], "returns" : { "type" : "xs:boolean", "description" : "If the value of $arg is the empty sequence, the function returns true, otherwise the function returns false." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-even", "qname" : "excel-information:is-even", "signature" : "($value as xs:anyAtomicType?) as xs:boolean", "description" : " Test is a number is even.\n", "summary" : "

Test is a number is even.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the value.
" } ], "returns" : { "type" : "xs:boolean", "description" : "TRUE if number is even, FALSE if number is odd." }, "errors" : [ "excel-err:Value if provided value is not a number." ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-odd", "qname" : "excel-information:is-odd", "signature" : "($value as xs:anyAtomicType?) as xs:boolean", "description" : " Test is a number is odd.\n", "summary" : "

Test is a number is odd.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the value.
" } ], "returns" : { "type" : "xs:boolean", "description" : "TRUE if number is odd, FALSE if number is even." }, "errors" : [ "excel-err:Value if provided value is not a number." ] }, { "isDocumented" : true, "arity" : 1, "name" : "islogical", "qname" : "excel-information:islogical", "signature" : "($value as xs:anyAtomicType?) as xs:boolean", "description" : " Tests if the passed $value is a logical value.\n", "summary" : "

Tests if the passed $value is a logical value.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the value.
" } ], "returns" : { "type" : "xs:boolean", "description" : "TRUE if $value refers to a logical value." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "isnumber", "qname" : "excel-information:isnumber", "signature" : "($value as xs:anyAtomicType?) as xs:boolean", "description" : " Tests if the passed $value is a number.\n", "summary" : "

Tests if the passed $value is a number.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the value.
" } ], "returns" : { "type" : "xs:boolean", "description" : "TRUE if $value refers to a number." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "istext", "qname" : "excel-information:istext", "signature" : "($value as xs:anyAtomicType?) as xs:boolean", "description" : " Tests if the passed $value is a string.\n", "summary" : "

Tests if the passed $value is a string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the value.
" } ], "returns" : { "type" : "xs:boolean", "description" : "TRUE if $value refers to text." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "n", "qname" : "excel-information:n", "signature" : "($value as xs:anyAtomicType?) as xs:anyAtomicType", "description" : " Converts a $value to a number.\n", "summary" : "

Converts a $value to a number.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the value.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "A $value converted to a number." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "na", "qname" : "excel-information:na", "signature" : "() as xs:anyAtomicType", "description" : " Raises the error value #N/A.\n", "summary" : "

Raises the error value #N/A.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The error value #N/A. #N/A is the error value that means \"no value is available.\"" }, "errors" : [ "excel-err:NA the purpose of this function is to raise this error" ] } ], "variables" : [ ] }, "http://www.zorba-xquery.com/modules/image/animation" : { "ns" : "http://www.zorba-xquery.com/modules/image/animation", "description" : " This module provides functions to create animated GIF images.\n", "sees" : [ ], "authors" : [ "Daniel Thomas" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.zorba-xquery.com/modules/image/animation", "prefix" : "anim" }, { "uri" : "http://www.zorba-xquery.com/modules/image/error", "prefix" : "ierr" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 3, "name" : "create-animated-gif", "qname" : "anim:create-animated-gif", "signature" : "($images as xs:base64Binary+, $delay as xs:unsignedInt, $iterations as xs:unsignedInt) as xs:base64Binary external", "description" : " Creates an animated GIF image.\n The resulting animated GIF shows the passed images consecutively.\n It has the same width and height as the first passed image.\n", "summary" : "

Creates an animated GIF image.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "images", "type" : "xs:base64Binary", "occurrence" : "+", "description" : "
the image sequence
" }, { "name" : "delay", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
the hundredths of seconds an image is shown
" }, { "name" : "iterations", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
the amount of times all images are shown. 0 for infinite.
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "the animated GIF" }, "errors" : [ "ierr:IM001 one of the passed images is invalid." ] }, { "isDocumented" : true, "arity" : 4, "name" : "create-morphed-gif", "qname" : "anim:create-morphed-gif", "signature" : "($images as xs:base64Binary+, $delay as xs:unsignedInt, $iterations as xs:unsignedInt, $nr-of-morph-images as xs:unsignedInt) as xs:base64Binary external", "description" : " Creates an animated GIF image with morph effect.\n The resulting animated GIF shows the passed images consecutively with morph effect between the changes.\n It has the same width and height as the first passed image.\n", "summary" : "

Creates an animated GIF image with morph effect.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "images", "type" : "xs:base64Binary", "occurrence" : "+", "description" : "
the image sequence
" }, { "name" : "delay", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
the hundredths of seconds an image is shown
" }, { "name" : "iterations", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
the amount of times all images are shown. 0 for infinite.
" }, { "name" : "nr-of-morph-images", "type" : "xs:unsignedInt", "occurrence" : null, "description" : "
the number of additionally added images to create the morph effect between two passed images.
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "the animated GIF" }, "errors" : [ "ierr:IM001 one of the passed images is invalid." ] } ], "variables" : [ ] }, "http://28.io/modules/error" : { "ns" : "http://28.io/modules/error", "description" : "

Applications written with Sausalito use this default error module\n if an error happens inside a Sausalito project.

\n

An error can occur during the run time of a Sausalito project on one\n of the following cases:

\n
    \n
  1. If the XQuery code raises a dynamic error that is not caught in a\n try-catch block.
  2. \n
  3. If the given XQuery program is syntactically incorrect or contains\n other static errors.
  4. \n
  5. If an explicit call to fn:error() was made and the error is not\n caught in a try-catch block.
  6. \n
  7. If a request is made to a module or a function which does\n not exist.
  8. \n
  9. If any other unexpected error happens during the processing of\n the request.
  10. \n
\n", "sees" : [ ], "authors" : [ "28msec" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://28.io/modules/error", "prefix" : "err" }, { "uri" : "http://www.28msec.com/modules/http/request", "prefix" : "request" }, { "uri" : "http://www.28msec.com/modules/http/response", "prefix" : "resp" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 4, "name" : "handle", "qname" : "err:handle", "signature" : "($code as xs:QName, $description as xs:string?, $value as item()*, $stack) as item()*", "description" : "

This is the default function that is called if an error happens.\n The default can be overridden by adding an error.xq library module\n into the Sausalito project. This module needs to declare a function\n with the same signature as the err:handle function in this module.

\n

The value returned by this function is sent to the client. If the\n default is overridden, the implementation is free to define all\n parameters of the response (e.g. set the corresponding HTTP status\n code or an arbitrary header).

\n

If the default is used, the status code is 500 if the $code QName\n is not equal to one of the status code QNames declared in HTTP module.\n Otherwise, the corresponding status code is set.

\n", "summary" : "

This is the default function that is called if an error happens.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "code", "type" : "xs:QName", "occurrence" : null, "description" : "
the error code that triggered the problem as a QName
" }, { "name" : "description", "type" : "xs:string", "occurrence" : "?", "description" : "
a description of the error
" }, { "name" : "value", "type" : "item()", "occurrence" : "*", "description" : "
a potentially empty list of items that were involved in causing the error
" }, { "name" : "stack", "type" : null, "occurrence" : null, "description" : "
the stacktrace leading to the error as an element. For example, <stack> <call ns=\"http://www.example.com/\" localName=\"my-function\" arity=\"3\"/> </stack>
" } ], "returns" : { "type" : "item()*", "description" : "content of the response message" }, "errors" : [ ] } ], "variables" : [ ] }, "http://www.zorba-xquery.com/modules/internal-debug" : { "ns" : "http://www.zorba-xquery.com/modules/internal-debug", "description" : " This internal module provides functions for testing error handling and\n internal function caching.\n", "sees" : [ ], "authors" : [ "Federico Cavalieri" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.zorba-xquery.com/modules/internal-debug", "prefix" : "debug" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 0, "name" : "cpp-error", "qname" : "debug:cpp-error", "signature" : "() as empty-sequence() external", "description" : " Raises a c++ exception.\n", "summary" : "

Raises a c++ exception.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "empty-sequence()", "description" : "empty sequence" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "cpp-exit", "qname" : "debug:cpp-exit", "signature" : "() as empty-sequence() external", "description" : " C++ exit is invoked.\n", "summary" : "

C++ exit is invoked.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "empty-sequence()", "description" : "empty sequence" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "user-error-no-location", "qname" : "debug:user-error-no-location", "signature" : "() as empty-sequence() external", "description" : " Raises a user error without query location.\n", "summary" : "

Raises a user error without query location.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "empty-sequence()", "description" : "empty sequence" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "user-error", "qname" : "debug:user-error", "signature" : "() as empty-sequence() external", "description" : " Raises a user error.\n", "summary" : "

Raises a user error.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "empty-sequence()", "description" : "empty sequence" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "zorba-error", "qname" : "debug:zorba-error", "signature" : "() as empty-sequence() external", "description" : " Raises a zorba error.\n", "summary" : "

Raises a zorba error.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "empty-sequence()", "description" : "empty sequence" }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/reflection" : { "ns" : "http://zorba.io/modules/reflection", "description" : " This module provides functions to dynamically invoke functions or main modules,\n respectively. Each of the functions (invoke or eval) come in four variants depending\n whether the expression being invoked is simple, nondeterministic, updating,\n or sequential.\n", "sees" : [ ], "authors" : [ "Nicolae Brinza" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.w3.org/2005/xqt-errors", "prefix" : "err" }, { "uri" : "http://zorba.io/modules/reflection", "prefix" : "reflection" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "eval-n", "qname" : "reflection:eval-n", "signature" : "($query as xs:string) as item()* external", "description" : " See documentation of reflection:eval() except the main module that is to\n be executed may be nondeterministc.\n", "summary" : "

See documentation of reflection:eval() except the main module that is to\n be executed may be nondeterministc.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "query", "type" : "xs:string", "occurrence" : null, "description" : "
the query string to be evaluated
" } ], "returns" : { "type" : "item()*", "description" : "the result of evaluating the query" }, "errors" : [ "whatever error the evaluated XQuery may return", "err:XQST0031 If the XQuery version of the inner program is greater than the version of the outer program." ] }, { "isDocumented" : true, "arity" : 1, "name" : "eval-s", "qname" : "reflection:eval-s", "signature" : "($query as xs:string) as item()* external", "description" : " See documentation of reflection:eval() except the main module that is to\n be executed may be sequential, i.e. may have side-effects.\n", "summary" : "

See documentation of reflection:eval() except the main module that is to\n be executed may be sequential, i.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "query", "type" : "xs:string", "occurrence" : null, "description" : "
the query string to be evaluated
" } ], "returns" : { "type" : "item()*", "description" : "the result of evaluating the query (the result is not supposed to contain any PUL)." }, "errors" : [ "whatever error the evaluated XQuery may return", "err:XQST0031 If the XQuery version of the inner program is greater than the version of the outer program." ] }, { "isDocumented" : true, "arity" : 1, "name" : "eval-u", "qname" : "reflection:eval-u", "signature" : "($query as xs:string) external", "description" : " See documentation of reflection:eval() except the main module that is to\n be executed may be updating, i.e. return a pending update list.\n", "summary" : "

See documentation of reflection:eval() except the main module that is to\n be executed may be updating, i.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : true, "parameters" : [ { "name" : "query", "type" : "xs:string", "occurrence" : null, "description" : "
the query string to be evaluated
" } ], "returns" : { "type" : null, "description" : "the PUL resulting from evaluating the query" }, "errors" : [ "whatever error the evaluated XQuery may return", "err:XQST0031 If the XQuery version of the inner program is greater than the version of the outer program." ] }, { "isDocumented" : true, "arity" : 1, "name" : "eval", "qname" : "reflection:eval", "signature" : "($query as xs:string) as item()* external", "description" : " The purpose of this function is to (dynamically) execute an XQuery program\n from inside another XQuery program.

\n The XQuery program that invokes the\n eval function will be referred to as the \"outer\" program and the XQuery\n program that is executed by the eval invocation will be referred to as\n the \"inner\" program. The function is given as a string argument.\n Typically, the outer program constructs this string dynamically,\n e.g., based on data extracted from documents and/or the values of\n external variables. The eval function treats this string as\n an XQuery main module. That is, it parses the string, compiles the\n resulting parse tree, executes the resulting execution plan, and finally\n returns the result or error (if any) to the outer program.

\n The given XQuery program needs to be a valid according to XQuery's\n MainModule production (see \n http://www.w3.org/TR/xquery/#doc-xquery-MainModule. Please note\n that the inner pogram must at least have the XQuery version of the\n outer program [err:XQST0031].

\n The inner program \"inherits\" the static and dynamic context of the outer\n program. Specifically, evaluation of the inner program is done in static and\n dynamic contextes that are initialized as copies of the static and dynamic\n contextes of the outer program at the place where the eval invocation appears\n at. This means that, for example, all variables that are in-scope at the place\n where the eval function is invoked from, are also in-scope inside the inner\n program and can be referenced there without having to be re-declared. On the other\n hand, declarations that appear in the prolog of the inner main module or are\n imported by the inner main module from library modules, hide their corresponding\n inherited declarations. For example, if the inner main module declares\n a variable or function with the same name as an inherited variable or function,\n the inner variable/function hides the inherited one.

\n If the inner program declares an external variable with the same name as an\n inherited variable, the value of the inherited variable is used to initialize\n the inner external variable. If, however, an inner external variable has no\n default initializer and no corresponding inherited variable, it will remain\n uninitialized, causing the inner program to raise an error when executed.\n", "summary" : "

The purpose of this function is to (dynamically) execute an XQuery program\n from inside another XQuery program.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query", "type" : "xs:string", "occurrence" : null, "description" : "
the query string to be evaluated
" } ], "returns" : { "type" : "item()*", "description" : "the result of evaluating the query" }, "errors" : [ "whatever error the evaluated XQuery may return.", "err:XQST0031 If the XQuery version of the inner program is greater than the version of the outer program." ] }, { "isDocumented" : true, "arity" : 1, "name" : "invoke-n", "qname" : "reflection:invoke-n", "signature" : "($name as xs:QName) as item()* external", "description" : " See documentation for reflection:invoke except the function that\n is to be invoked may be nondeterministic.\n", "summary" : "

See documentation for reflection:invoke except the function that\n is to be invoked may be nondeterministic.

", "annotation_str" : " %an:nondeterministic %an:variadic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" }, { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "variadic", "value" : "" } ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
the QName of the function that is to be invoked
" } ], "returns" : { "type" : "item()*", "description" : "the result that is returned by the invoked function" }, "errors" : [ "whatever error the invoked function may return" ] }, { "isDocumented" : true, "arity" : 1, "name" : "invoke-s", "qname" : "reflection:invoke-s", "signature" : "($name as xs:QName) as item()* external", "description" : " See documentation for reflection:invoke except the function that\n is to be invoked may be sequential, i.e. may have side-effects.\n", "summary" : "

See documentation for reflection:invoke except the function that\n is to be invoked may be sequential, i.

", "annotation_str" : " %an:variadic %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "variadic", "value" : "" }, { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
the QName of the function that is to be invoked
" } ], "returns" : { "type" : "item()*", "description" : "the result that is returned by the invoked function" }, "errors" : [ "whatever error the invoked function may return" ] }, { "isDocumented" : true, "arity" : 1, "name" : "invoke-u", "qname" : "reflection:invoke-u", "signature" : "($name as xs:QName) external", "description" : " See documentation for reflection:invoke-n except the function that\n is to be invoked may be updating, i.e. return a pending update list.\n", "summary" : "

See documentation for reflection:invoke-n except the function that\n is to be invoked may be updating, i.

", "annotation_str" : " %an:nondeterministic %an:variadic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" }, { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "variadic", "value" : "" } ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
the QName of the function that is to be invoked
" } ], "returns" : { "type" : null, "description" : "the result that is returned by the invoked function" }, "errors" : [ "whatever error the invoked function may return" ] }, { "isDocumented" : true, "arity" : 1, "name" : "invoke", "qname" : "reflection:invoke", "signature" : "($name as xs:QName) as item()* external", "description" : " The invoke function allows to dynamically call a function given its QName\n and parameters.

\n It is possible to invoke a function whose name is not known\n at compilation time -- it can be computed, passed through an external\n variable, taken from a file, etc. The first parameter must always be a\n QName identifying a known function.

\n The function is declared with the %an:variadic annotation. Hence, it allows\n for an arbitrary number of parameters. All of these parameters (except the\n first one) will be passed to the function that is called.\n
\n Example usage :

 reflection:invoke ( xs:QName(\"fn:max\"), (1,2,3) ) 
\n
\n Returns
 3 
.\n", "summary" : "

The invoke function allows to dynamically call a function given its QName\n and parameters.

", "annotation_str" : " %an:variadic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "variadic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
the QName of the function that is to be invoked
" } ], "returns" : { "type" : "item()*", "description" : "the result that is returned by the invoked function" }, "errors" : [ "whatever error the invoked function may return" ] } ], "variables" : [ ] }, "http://zorba.io/modules/hmac" : { "ns" : "http://zorba.io/modules/hmac", "description" : " This module provides functions that perform HMAC\n (hash-based message authentication code) operations.\n For example, they calculate message codes involving hash functions such\n as MD5 and various SHA variants. The result is the base64 encoded value\n of the hash. A hash may be used to verify the data integrity and\n the authenticity of a message.\n", "sees" : [ ], "authors" : [ "William Candillon, Matthias Brantner" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/hmac", "prefix" : "hmac" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 3, "name" : "compute-binary", "qname" : "hmac:compute-binary", "signature" : "($message as xs:base64Binary, $secret-key as xs:string, $hash-algo as xs:string) as xs:base64Binary external", "description" : " Calculate the HMAC for the given message and secret-key involving\n an custom hash function. Before calculating the code, the given\n base64-encoded message is base64-decoded.\n", "summary" : "

Calculate the HMAC for the given message and secret-key involving\n an custom hash function.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "message", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the message to be authenticated
" }, { "name" : "secret-key", "type" : "xs:string", "occurrence" : null, "description" : "
the secret key used for calculating the authentication
" }, { "name" : "hash-algo", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:base64Binary", "description" : "the base64 encoded message authentication code" }, "errors" : [ "hash:UNSUPPORTED-ALGORITHM if the given hash algorithm is not supported" ] }, { "isDocumented" : true, "arity" : 3, "name" : "compute", "qname" : "hmac:compute", "signature" : "($message as xs:string, $secret-key as xs:string, $alg as xs:string) as xs:base64Binary external", "description" : " Calculate the HMAC for the given message and secret-key involving\n an custom hash function.\n", "summary" : "

Calculate the HMAC for the given message and secret-key involving\n an custom hash function.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "message", "type" : "xs:string", "occurrence" : null, "description" : "
the message to be authenticated
" }, { "name" : "secret-key", "type" : "xs:string", "occurrence" : null, "description" : "
the secret key used for calculating the authentication
" }, { "name" : "alg", "type" : "xs:string", "occurrence" : null, "description" : "
The algorithm to use for the hashing operation. Supported algorithms are \"md5\", \"sha1\", and \"sha256\".
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "the base64 encoded message authentication code" }, "errors" : [ "hash:UNSUPPORTED-ALGORITHM if the given hash algorithm is not supported" ] }, { "isDocumented" : true, "arity" : 2, "name" : "md5-binary", "qname" : "hmac:md5-binary", "signature" : "($message as xs:base64Binary, $secret-key as xs:string) as xs:base64Binary", "description" : " Calculate the HMAC for the given message and secret-key involving\n the MD5 hash function. Before calculating the code, the given\n base64-encoded message is base64-decoded.\n", "summary" : "

Calculate the HMAC for the given message and secret-key involving\n the MD5 hash function.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "message", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the message to be authenticated
" }, { "name" : "secret-key", "type" : "xs:string", "occurrence" : null, "description" : "
the secret key used for calculating the authentication
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "the base64 encoded message authentication code" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "md5", "qname" : "hmac:md5", "signature" : "($message as xs:string, $secret-key as xs:string) as xs:base64Binary", "description" : " Calculate the HMAC for the given message and secret-key involving\n the MD5 hash function.\n", "summary" : "

Calculate the HMAC for the given message and secret-key involving\n the MD5 hash function.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "message", "type" : "xs:string", "occurrence" : null, "description" : "
the message to be authenticated
" }, { "name" : "secret-key", "type" : "xs:string", "occurrence" : null, "description" : "
the secret key used for calculating the authentication
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "the base64 encoded message authentication code" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "sha1-binary", "qname" : "hmac:sha1-binary", "signature" : "($message as xs:base64Binary, $secret-key as xs:string) as xs:base64Binary", "description" : " Calculate the HMAC for the given message and secret-key involving\n the SHA1 hash function. Before calculating the code, the given\n base64-encoded message is base64-decoded.\n", "summary" : "

Calculate the HMAC for the given message and secret-key involving\n the SHA1 hash function.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "message", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the message to be authenticated
" }, { "name" : "secret-key", "type" : "xs:string", "occurrence" : null, "description" : "
the secret key used for calculating the authentication
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "the base64 encoded message authentication code" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "sha1", "qname" : "hmac:sha1", "signature" : "($message as xs:string, $secret-key as xs:string) as xs:base64Binary", "description" : " Calculate the HMAC for the given message and secret-key involving\n the SHA1 hash function.\n", "summary" : "

Calculate the HMAC for the given message and secret-key involving\n the SHA1 hash function.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "message", "type" : "xs:string", "occurrence" : null, "description" : "
the message to be authenticated
" }, { "name" : "secret-key", "type" : "xs:string", "occurrence" : null, "description" : "
the secret key used for calculating the authentication
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "the base64 encoded message authentication code" }, "errors" : [ ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/sleep" : { "ns" : "http://www.28msec.com/modules/sleep", "description" : " This module provides a function to put the currently executing request\n to sleep.\n", "sees" : [ ], "authors" : [ "28msec" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.28msec.com/modules/sleep", "prefix" : "sleep" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "millis", "qname" : "sleep:millis", "signature" : "($millis as xs:integer) as empty-sequence() external", "description" : " Puts the currently executing request to sleep.\n This function is mainly useful in development e.g. to simulate the\n effects of long-running tasks wrt. the concurrent execution of\n requests.\n Here the function is used to simulate a request that runs for 1 second\n
\n declare $acquired := lock:try-acquire(\"my-lock\");\n if ($acquired)\n   sleep:millis(1000);\n else\n   fn:error(xs:QName(\"...\"), \"failed to acquire lock\");\n 
\n", "summary" : "

Puts the currently executing request to sleep.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "millis", "type" : "xs:integer", "occurrence" : null, "description" : "
the number of milliseconds to sleep
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function is sequential and returns the empty sequence" }, "errors" : [ ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/cloudant" : { "ns" : "http://www.28msec.com/modules/cloudant", "description" : "

This module provides functionality for creating, reading, updating,\n deleting and searching data in Cloudant\n databases.

\n

Before issuing a request to Cloudant it is mandatory to create\n a new connection through one of the connect functions.\n These functions return a connection identifier which needs to be used\n to access data in Cloudant through the other functions.

\n

In these functions Cloudant databases will be identified through\n their names. By default, the functions will assume that the database is owned by\n the user for which the given connection has been created.\n To specify a different database owner, most functions accept an\n $options parameter that allows a database-owner\n option to specify a different database owner for a single request.\n Moreover, when connecting, it is possible to specify the default\n database owner using the connect#3 function.

\n

Additional information on the Cloudant APIs can be found\n on the Cloudant website.

\n

Important Notice Regarding Function Determinism

\n

The non side-effecting functions:\n

\n are declared deterministic, which means that their results could be cached\n when invoked multiple times with the same arguments in the same query execution.

\n

To not use cached results you can use the following alternative functions:\n

\n which have been declared as being non deterministic.

\n", "sees" : [ ], "authors" : [ "Federico Cavalieri" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.28msec.com/modules/cloudant", "prefix" : "cloudant" }, { "uri" : "http://www.28msec.com/modules/credentials", "prefix" : "credentials" }, { "uri" : "http://www.w3.org/2005/xqt-errors", "prefix" : "err" }, { "uri" : "http://zorba.io/modules/http-client", "prefix" : "http" }, { "uri" : "http://www.28msec.com/modules/maps", "prefix" : "map" }, { "uri" : "http://zorba.io/modules/random", "prefix" : "random" }, { "uri" : "http://www.zorba-xquery.com/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "all-documents-nondeterministic", "qname" : "cloudant:all-documents-nondeterministic", "signature" : "($connection as anyURI, $database as string) as object()", "description" : "

Lists all the documents in a given database.

\n

This function has the same semantics as\n all-documents#2,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Lists all the documents in a given database.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" } ], "returns" : { "type" : "object()", "description" : "An object listing the documents in the specified database" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 3, "name" : "all-documents-nondeterministic", "qname" : "cloudant:all-documents-nondeterministic", "signature" : "($connection as anyURI, $database as string, $options as object()) as object()", "description" : "

Lists all the documents in a given database.

\n

This function has the same semantics as\n all-documents#3,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Lists all the documents in a given database.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object listing the documents in the specified database" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 2, "name" : "all-documents", "qname" : "cloudant:all-documents", "signature" : "($connection as anyURI, $database as string) as object()", "description" : "

Lists all the documents in a given database.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.

\n

For example,\n

cloudant:all-documents($connection, \"db\")
.\n

\n

An object with the following format is returned:\n

\n {\n   \"total_rows\":3,\n   \"offset\":0,\n   \"rows\":[\n   {\n     \"id\":\"5a049246-179f-42ad-87ac-8f080426c17c\",\n     \"key\":\"5a049246-179f-42ad-87ac-8f080426c17c\",\n     \"value\":\n     {\n       \"rev\":\"2-9d5401898196997853b5ac4163857a29\"\n     }\n   },\n   {\n     \"id\":\"96f898f0-f6ff-4a9b-aac4-503992f31b01\",\n     \"key\":\"96f898f0-f6ff-4a9b-aac4-503992f31b01\",\n     \"value\":\n     {\n       \"rev\":\"2-ff7b85665c4c297838963c80ecf481a3\"\n      }\n   },\n   {\n     \"id\":\"d1f61e66-7708-4da6-aa05-7cbc33b44b7e\",\n     \"key\":\"d1f61e66-7708-4da6-aa05-7cbc33b44b7e\",\n     \"value\":\n     {\n       \"rev\":\"2-cbdef49ef3ddc127eff86350844a6108\"\n     }\n   }]\n }\n 
\n

\n

The fields have the following meaning:\n

\n

\n", "summary" : "

Lists all the documents in a given database.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" } ], "returns" : { "type" : "object()", "description" : "An object listing the documents in the specified database" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 3, "name" : "all-documents", "qname" : "cloudant:all-documents", "signature" : "($connection as anyURI, $database as string, $options as object()) as object()", "description" : "

Lists all the documents in a given database.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.

\n

This function allows to specify an additional options object.\n The following options are supported:\n

\n

\n

For example,\n

cloudant:all-documents($connection, \"db\", {\"database-owner\": \"username\"})
.\n

\n

An object with the following format is returned:\n

\n {\n   \"total_rows\":3,\n   \"offset\":0,\n   \"rows\":[\n   {\n     \"id\":\"5a049246-179f-42ad-87ac-8f080426c17c\",\n     \"key\":\"5a049246-179f-42ad-87ac-8f080426c17c\",\n     \"value\":\n     {\n       \"rev\":\"2-9d5401898196997853b5ac4163857a29\"\n     }\n   },\n   {\n     \"id\":\"96f898f0-f6ff-4a9b-aac4-503992f31b01\",\n     \"key\":\"96f898f0-f6ff-4a9b-aac4-503992f31b01\",\n     \"value\":\n     {\n       \"rev\":\"2-ff7b85665c4c297838963c80ecf481a3\"\n      }\n   },\n   {\n     \"id\":\"d1f61e66-7708-4da6-aa05-7cbc33b44b7e\",\n     \"key\":\"d1f61e66-7708-4da6-aa05-7cbc33b44b7e\",\n     \"value\":\n     {\n       \"rev\":\"2-cbdef49ef3ddc127eff86350844a6108\"\n     }\n   }]\n }\n 
\n

\n

The fields have the following meaning:\n

\n

\n", "summary" : "

Lists all the documents in a given database.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object listing the documents in the specified database" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 4, "name" : "all-view-documents-nondeterministic", "qname" : "cloudant:all-view-documents-nondeterministic", "signature" : "($connection as anyURI, $database as string, $design-document as string, $view as string) as object()", "description" : "

Returns a JSON object describing all the documents in a given view.

\n

This function has the same semantics as\n all-view-documents#4,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Returns a JSON object describing all the documents in a given view.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "design-document", "type" : "string", "occurrence" : null, "description" : "
A design document name
" }, { "name" : "view", "type" : "string", "occurrence" : null, "description" : "
A view name
" } ], "returns" : { "type" : "object()", "description" : "An object listing all documents in the specified view" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 5, "name" : "all-view-documents-nondeterministic", "qname" : "cloudant:all-view-documents-nondeterministic", "signature" : "($connection as anyURI, $database as string, $design-document as string, $view as string, $options as object()) as object()", "description" : "

Returns a JSON object describing all the documents in a given view.

\n

This function has the same semantics as\n all-view-documents#5,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Returns a JSON object describing all the documents in a given view.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "design-document", "type" : "string", "occurrence" : null, "description" : "
A design document name
" }, { "name" : "view", "type" : "string", "occurrence" : null, "description" : "
A view name
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object listing all documents in the specified view" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 4, "name" : "all-view-documents", "qname" : "cloudant:all-view-documents", "signature" : "($connection as anyURI, $database as string, $design-document as string, $view as string) as object()", "description" : "

Returns a JSON object describing all the documents in a given view.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.

\n

For example,\n

cloudant:all-view-documents($connection, \"db\", \"recipes\", \"by_title\")
.\n

\n

An object with the following format is returned:\n

\n {\n   \"offset\" : 0,\n   \"rows\" :\n   [\n     {\n       \"id\" : \"3-tiersalmonspinachandavocadoterrine\",\n       \"key\" : \"3-tier salmon, spinach and avocado terrine\",\n       \"value\" : [\"3-tier salmon, spinach and avocado terrine\"]\n     },\n     {\n       \"id\" : \"Aberffrawcake\",\n       \"key\" : \"Aberffraw cake\",\n       \"value\" : [\"Aberffraw cake\"]\n     },\n     {\n       \"id\" : \"Adukiandorangecasserole-microwave\",\n       \"key\" : \"Aduki and orange casserole - microwave\",\n       \"value\" : [\"Aduki and orange casserole - microwave\"]\n     }\n   ],\n   \"total_rows\" : 3\n }\n 
\n

\n

The fields have the following meaning:\n

\n

\n", "summary" : "

Returns a JSON object describing all the documents in a given view.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "design-document", "type" : "string", "occurrence" : null, "description" : "
A design document name
" }, { "name" : "view", "type" : "string", "occurrence" : null, "description" : "
A view name
" } ], "returns" : { "type" : "object()", "description" : "An object listing all documents in the specified view" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 5, "name" : "all-view-documents", "qname" : "cloudant:all-view-documents", "signature" : "($connection as anyURI, $database as string, $design-document as string, $view as string, $options as object()) as object()", "description" : "

Returns a JSON object describing all the documents in a given view.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.

\n

This function allows to specify an additional options object.\n The following options are supported:\n

\n

\n

For example,\n

cloudant:all-view-documents($connection, \"db\", \"recipes\", \"by_title\",\n   {\"database-owner\" : \"username\"})
.\n

\n

An object with the following format is returned:\n

\n {\n   \"offset\" : 0,\n   \"rows\" :\n   [\n     {\n       \"id\" : \"3-tiersalmonspinachandavocadoterrine\",\n       \"key\" : \"3-tier salmon, spinach and avocado terrine\",\n       \"value\" : [\"3-tier salmon, spinach and avocado terrine\"]\n     },\n     {\n       \"id\" : \"Aberffrawcake\",\n       \"key\" : \"Aberffraw cake\",\n       \"value\" : [\"Aberffraw cake\"]\n     },\n     {\n       \"id\" : \"Adukiandorangecasserole-microwave\",\n       \"key\" : \"Aduki and orange casserole - microwave\",\n       \"value\" : [\"Aduki and orange casserole - microwave\"]\n     }\n   ],\n   \"total_rows\" : 3\n }\n 
\n

\n

The fields have the following meaning:\n

\n

\n", "summary" : "

Returns a JSON object describing all the documents in a given view.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "design-document", "type" : "string", "occurrence" : null, "description" : "
A design document name
" }, { "name" : "view", "type" : "string", "occurrence" : null, "description" : "
A view name
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object listing all documents in the specified view" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 4, "name" : "attachment-nondeterministic", "qname" : "cloudant:attachment-nondeterministic", "signature" : "($connection as anyURI, $database as string, $document-id as string, $attachment-name as string) as object()", "description" : "

Retrieves the specified document attachment.

\n

This function has the same semantics as\n attachment#4,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Retrieves the specified document attachment.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" }, { "name" : "attachment-name", "type" : "string", "occurrence" : null, "description" : "
An attchment name
" } ], "returns" : { "type" : "object()", "description" : "The specified document attachment" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 5, "name" : "attachment-nondeterministic", "qname" : "cloudant:attachment-nondeterministic", "signature" : "($connection as anyURI, $database as string, $document-id as string, $attachment-name as string, $options as object()) as object()", "description" : "

Retrieves the specified document attachment.

\n

This function has the same semantics as attachment#5,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Retrieves the specified document attachment.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" }, { "name" : "attachment-name", "type" : "string", "occurrence" : null, "description" : "
An attchment name
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "The specified document attachment" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:ATTACHMENT-NOT-EXISTS Attachment does not exists", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 4, "name" : "attachment", "qname" : "cloudant:attachment", "signature" : "($connection as anyURI, $database as string, $document-id as string, $attachment-name as string) as object()", "description" : "

Retrieves the specified document attachment.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

For example,\n

cloudant:attachment($connection, \"db\", \"DocID\", \"Attachment\")
.\n

\n

Retrieving a design document attachment.

\n

To retrieve a design document attachment the document id must\n start with _design/.

\n

For example,\n

cloudant:attachment($connection, \"db\", \"_design/DocID\", \"Attachment\")
.\n

\n

Return value

\n

The returned object reports the media-type of the attachment as\n it was specified when the attachment was submitted to the database and\n its raw content.\n The format of the returned object is the following:\n

\n {\n   \"media-type\": \"text/plain\",\n   \"content\" : \"Hello World\"\n }\n 
\n

\n

The type of the content field is determined by the media-type returned by the\n server. If the media-type indicates that the body content is textual,\n then the content has type string, base64Binary otherwise.\n Specifically, the body content is considered textual only if the MIME-type specified in\n the media-type is one of:\n

\n or if the MIME-type starts with \"text/\" or ends with \"+xml\".

\n", "summary" : "

Retrieves the specified document attachment.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" }, { "name" : "attachment-name", "type" : "string", "occurrence" : null, "description" : "
An attchment name
" } ], "returns" : { "type" : "object()", "description" : "The specified document attachment" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 5, "name" : "attachment", "qname" : "cloudant:attachment", "signature" : "($connection as anyURI, $database as string, $document-id as string, $attachment-name as string, $options as object()) as object()", "description" : "

Retrieves the specified document attachment.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

This function allows to specify an additional options object.\n The following options are supported:\n

\n

\n

For example,\n

cloudant:attachment($connection, \"db\", \"DocID\", \"Attachment\",\n   {\"database-owner\": \"username\"})
.\n

\n

Retrieving a design document attachment.

\n

To retrieve a design document attachment the document id must\n start with _design/.

\n

For example,\n

cloudant:attachment($connection, \"db\", \"_design/DocID\", \"Attachment\",\n   {\"database-owner\": \"username\"})
.\n

\n

Return value

\n

The returned object reports the media-type of the attachment as\n it was specified when the attachment was submitted to the database and\n its raw content.\n The format of the returned object is the following:\n

\n {\n   \"media-type\": \"text/plain\",\n   \"content\" : \"Hello World\"\n }\n 
\n

\n

The type of the content field is determined by the media-type returned by the\n server. If the media-type indicates that the body content is textual,\n then the content has type string, base64Binary otherwise.\n Specifically, the body content is considered textual only if the MIME-type specified in\n the media-type is one of:\n

\n or if the MIME-type starts with \"text/\" or ends with \"+xml\".

\n", "summary" : "

Retrieves the specified document attachment.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" }, { "name" : "attachment-name", "type" : "string", "occurrence" : null, "description" : "
An attchment name
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "The specified document attachment" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:ATTACHMENT-NOT-EXISTS Attachment does not exists", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 3, "name" : "bulk-crud", "qname" : "cloudant:bulk-crud", "signature" : "($connection as anyURI, $database as string, $documents as object()*) as array()", "description" : "

Creates, updates or deletes multiple documents with a single request.

\n

When creating new documents the document ID is optional. For updating\n existing documents, you must provide the document ID, revision information,\n and new document values. To delete existing documents, you must provide the\n document ID, revision information and add a field _deleted having\n value true.\n

\n

For example,\n

cloudant:bulk-crud($connection, \"db\",\n (\n   {\n     \"name\":\"Nicholas\",\n     \"age\":45,\n     \"gender\":\"male\",\n   },\n   {\n     \"name\":\"Taylor\",\n     \"age\":50,\n     \"gender\":\"male\",\n     \"_id\":\"5a049246-179f-42ad-87ac-8f080426c17c\",\n   },\n   {\n     \"name\":\"Owen\",\n     \"age\":51,\n     \"gender\":\"male\",\n     \"_id\":\"d1f61e66-7708-4da6-aa05-7cbc33b44b7e\",\n     \"_rev\":\"2-f29c836d0bedc4b4b95cfaa6d99e95df\",\n   },\n   {\n     \"_id\":\"b675e932-9bb6-4fc9-b889-50238ac3512b\",\n     \"_rev\":\"2-abd3942fdab3515bfed224abed2451feb\",\n     \"_deleted\": true\n   }\n ))\n 
\n requires to insert the first document with a system-generated identifier, to\n insert the second one with a user-specified identifier, to update the third\n one and, finally,to delete the last one.\n

\n

\n The JSON returned by the_bulk_docs operation consists of an array\n of JSON structures, one for each submitted document.\n The returned JSON structure should be examined to ensure that all of\n the documents submitted in the original request were successfully added\n to the database. When no errors are raised, the revision of the new\n document is reported for all documents.\n

\n

\n

\n [{\n    \"id\":\"96f898f0-f6ff-4a9b-aac4-503992f31b01\",\n    \"rev\":\"2-ff7b85665c4c297838963c80ecf481a3\"\n  },\n  {\n    \"id\":\"5a049246-179f-42ad-87ac-8f080426c17c\",\n    \"rev\":\"2-9d5401898196997853b5ac4163857a29\"\n  },\n  {\n    \"id\":\"d1f61e66-7708-4da6-aa05-7cbc33b44b7e\",\n    \"rev\":\"2-cbdef49ef3ddc127eff86350844a6108\"\n  },\n  {\n    \"id\": \"b675e932-9bb6-4fc9-b889-50238ac3512b\",\n    \"rev\":\"2-12356bafb1232167befabb32127823943d\"\n  }]\n 
\n

\n

Cloudant will only guarantee that some of the documents will be\n saved when you send the request. The response will contain the list of\n documents successfully inserted or updated during the process.\n In the event of a crash, some of the documents may have been successfully\n saved, and some will have been lost.\n The response structure will indicate whether the document was updated by\n supplying the rev parameter indicating a new document revision\n was created. If the update failed, then you will get an error of type\n conflict.

\n

For example:\n

\n [\n   {\n     \"id\":\"FishStew\",\n     \"error\":\"conflict\",\n     \"reason\":\"Document update conflict.\"\n   },\n   {\n     \"id\":\"LambStew\",\n     \"error\":\"conflict\",\n     \"reason\":\"Document update conflict.\"\n   },\n   {\n     \"id\":\"7f7638c86173eb440b8890839ff35433\",\n     \"error\":\"conflict\",\n     \"reason\":\"Document update conflict.\"\n   }\n ]\n 
\n In this case no new revision has been created and you will need to submit\n the document update with the correct revision tag, to update the document.\n

\n

The exact structure of each document in the returned array is:\n

\n

\n

The error type can either be conflict or forbidden. The first type means that\n the document as submitted is in conflict. The new revision has not been created\n and you will need to re-submit the document to the database. Entries with forbidden\n error type indicate that the validation routine applied to the document during submission\n has returned an error.

\n", "summary" : "

Creates, updates or deletes multiple documents with a single request.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "documents", "type" : "object()", "occurrence" : "*", "description" : "
An sequence of documents
" } ], "returns" : { "type" : "array()", "description" : "An object describing the performed operations" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 4, "name" : "bulk-crud", "qname" : "cloudant:bulk-crud", "signature" : "($connection as anyURI, $database as string, $documents as object()*, $options as object()) as array()", "description" : "

Creates, updates or deletes multiple documents with a single request.

\n

When creating new documents the document ID is optional. For updating\n existing documents, you must provide the document ID, revision information,\n and new document values. To delete existing documents, you must provide the\n document ID, revision information and add a field _deleted having\n value true.\n

\n

This function allows to specify an additional options object.\n The following options are supported:\n

\n

\n

For example,\n

cloudant:bulk-crud($connection, \"db\",\n (\n   {\n     \"name\":\"Nicholas\",\n     \"age\":45,\n     \"gender\":\"male\",\n   },\n   {\n     \"name\":\"Taylor\",\n     \"age\":50,\n     \"gender\":\"male\",\n     \"_id\":\"5a049246-179f-42ad-87ac-8f080426c17c\",\n   },\n   {\n     \"name\":\"Owen\",\n     \"age\":51,\n     \"gender\":\"male\",\n     \"_id\":\"d1f61e66-7708-4da6-aa05-7cbc33b44b7e\",\n     \"_rev\":\"2-f29c836d0bedc4b4b95cfaa6d99e95df\",\n   },\n   {\n     \"_id\":\"b675e932-9bb6-4fc9-b889-50238ac3512b\",\n     \"_rev\":\"2-abd3942fdab3515bfed224abed2451feb\",\n     \"_deleted\": true\n   }\n ),{\"database-owner\": \"username\"})\n 
\n requires to insert the first document with a system-generated identifier, to\n insert the second one with a user-specified identifier, to update the third\n one and, finally, to delete the last one.\n

\n

\n The JSON returned by the_bulk_docs operation consists of an array\n of JSON structures, one for each document in the original submission.\n The returned JSON structure should be examined to ensure that all of\n the documents submitted in the original request were successfully added\n to the database. When no errors are raised, the revision of the new\n document is reported for all documents.\n

\n

\n

\n [{\n    \"id\":\"96f898f0-f6ff-4a9b-aac4-503992f31b01\",\n    \"rev\":\"2-ff7b85665c4c297838963c80ecf481a3\"\n  },\n  {\n    \"id\":\"5a049246-179f-42ad-87ac-8f080426c17c\",\n    \"rev\":\"2-9d5401898196997853b5ac4163857a29\"\n  },\n  {\n    \"id\":\"d1f61e66-7708-4da6-aa05-7cbc33b44b7e\",\n    \"rev\":\"2-cbdef49ef3ddc127eff86350844a6108\"\n  },\n  {\n    \"id\": \"b675e932-9bb6-4fc9-b889-50238ac3512b\",\n    \"rev\":\"2-12356bafb1232167befabb32127823943d\"\n  }]\n 
\n

\n

Cloudant will only guarantee that some of the documents will be\n saved when you send the request. The response will contain the list of\n documents successfully inserted or updated during the process.\n In the event of a crash, some of the documents may have been successfully\n saved, and some will have been lost.\n The response structure will indicate whether the document was updated by\n supplying the rev parameter indicating a new document revision\n was created. If the update failed, then you will get an error of type\n conflict.

\n

For example:\n

\n [\n   {\n     \"id\":\"FishStew\",\n     \"error\":\"conflict\",\n     \"reason\":\"Document update conflict.\"\n   },\n   {\n     \"id\":\"LambStew\",\n     \"error\":\"conflict\",\n     \"reason\":\"Document update conflict.\"\n   },\n   {\n     \"id\":\"7f7638c86173eb440b8890839ff35433\",\n     \"error\":\"conflict\",\n     \"reason\":\"Document update conflict.\"\n   }\n ]\n 
\n In this case no new revision has been created and you will need to submit\n the document update with the correct revision tag, to update the document.\n

\n

The exact structure of each document in the returned array is:\n

\n

\n

The error type can either be conflict or forbidden. The first type means that\n the document as submitted is in conflict. The new revision has not been created\n and you will need to re-submit the document to the database. Entries with forbidden\n error type indicate that the validation routine applied to the document during submission\n has returned an error.

\n", "summary" : "

Creates, updates or deletes multiple documents with a single request.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "documents", "type" : "object()", "occurrence" : "*", "description" : "
An sequence of documents
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "array()", "description" : "An object describing the performed operations" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 2, "name" : "commit-changes", "qname" : "cloudant:commit-changes", "signature" : "($connection as anyURI, $database as string) as object()", "description" : "

Commits any recent changes to the specified database to disk.

\n

For example,\n

cloudant:commit-changes($connection, \"db\")
.\n

\n

An object with the following format is returned:\n

\n {\n   \"ok\" : true,\n   \"instance_start_time\" : \"0\"\n }\n 
\n

\n", "summary" : "

Commits any recent changes to the specified database to disk.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" } ], "returns" : { "type" : "object()", "description" : "An object reporting the instance start time" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NOT-EXISTS The specified database does not exists", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 3, "name" : "commit-changes", "qname" : "cloudant:commit-changes", "signature" : "($connection as anyURI, $database as string, $options as object()) as object()", "description" : "

Commits any recent changes to the specified database to disk.

\n

This function allows to specify an additional options object.\n The following options are supported:\n

\n

\n

For example,\n

\n cloudant:commit-changes($connection, \"db\", {\"database-owner\": \"username\"})\n 
.\n

\n

An object with the following format is returned:\n

\n {\n   \"ok\" : true,\n   \"instance_start_time\" : \"0\"\n }\n 
\n

\n", "summary" : "

Commits any recent changes to the specified database to disk.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object reporting the instance start time" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NOT-EXISTS The specified database does not exists", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 0, "name" : "connect", "qname" : "cloudant:connect", "signature" : "() as anyURI", "description" : "

Opens a connection to Cloudant using the default credentials.

\n

The function returns an opaque URI that can represents the connection.\n This URI has to be passed to other functions of this module that require\n a $connection parameter as a first argument.

\n

This function requires to specify an options object.\n The following options are supported:\n

\n

\n

For example,\n

cloudant:connect()
.\n

\n", "summary" : "

Opens a connection to Cloudant using the default credentials.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "anyURI", "description" : "An identifier that represents the connection to the server" }, "errors" : [ "cloudant:CREDENTIALS Missing or invalid credentials", "cloudant:AUTHORIZATION Authentication error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 1, "name" : "connect", "qname" : "cloudant:connect", "signature" : "($credentials as item()) as anyURI", "description" : "

Opens a connection to Cloudant using the specified credentials.

\n

The function returns an opaque URI that can represents the connection.\n This URI has to be passed to other functions of this module that require\n a $connection parameter as a first argument.

\n

The $credentials parameter is used to specify the connection information.\n If a string is used, then the function will interpret it as the name of\n a credential in the Cloudant category.\n If an object is used, then the function will open a connection using it.\n The object structure is the following:\n

\n

\n

For example, using stored credential:\n

cloudant:connect(\"credentials-name\")
\n For example, specifying the connection information:\n
cloudant:connect(\n   {\n     \"username\": \"user\",\n     \"password: \"pass\",\n     \"owner\": \"another-user\"\n   })
.\n

\n", "summary" : "

Opens a connection to Cloudant using the specified credentials.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "credentials", "type" : "item()", "occurrence" : null, "description" : "
The connection specification
" } ], "returns" : { "type" : "anyURI", "description" : "An identifier that represents the connection to the server" }, "errors" : [ "cloudant:AUTHORIZATION Authentication error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:INTERNAL Cloudant internal error", "cloudant:CREDENTIALS Missing or malformed credentials" ] }, { "isDocumented" : true, "arity" : 2, "name" : "create-database", "qname" : "cloudant:create-database", "signature" : "($connection as anyURI, $database as string) as empty-sequence()", "description" : "

Creates a new database.

\n

The database name must be composed of one or more of the following\n characters:\n

\n

\n

For example,\n

cloudant:create-database($connection, \"db\")
.\n

\n", "summary" : "

Creates a new database.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" } ], "returns" : { "type" : "empty-sequence()", "description" : "Empty sequence" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:DATABASE-EXISTS Database already exists", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 3, "name" : "create-document", "qname" : "cloudant:create-document", "signature" : "($connection as anyURI, $database as string, $document as object()) as object()", "description" : "

Creates a new document in the specified database.

\n

Creates a new document in the specified database,\n using the supplied JSON document structure. If the JSON\n structure includes the _id field, then the document will\n be created with the specified document ID. If the _id\n field is not specified, a new unique ID will be generated.

\n

You can include one or more attachments with a given document\n by incorporating the attachment information within the JSON of\n the document. This provides a simpler alternative to loading\n documents with attachments than making a separate call.\n To do so add you can add the _attachments object\n field to the document. It can have one ore more fields, each\n defining a different attachment.\n The name of the field is the name of the attachment.\n Its value is an object containing the following fields:\n

\n

\n

For example,\n

cloudant:create-document($connection, \"db\",\n   {\n     \"_id\" : \"FishStew\",\n     \"servings\" : 4,\n     \"subtitle\" : \"Delicious with fresh bread\",\n     \"title\" : \"Fish Stew\"\n     \"_attachments\" : {\n       \"styling.css\" : {\n       \"content-type\" : \"text/css\",\n       \"data\" : \"cCB7IGZvbnQtc2l6ZTogMTJwdDsgfQo=\"\n       }\n     }\n   })\n 
\n creates a document with an attachment named styling.css.\n

\n

Creating a design document

\n

To create a design document the _id field must be present and must\n start with _design/.

\n

For example, the following expression creates a design document\n

cloudant:create-document($connection, \"db\",\n   {\n     \"_id\": \"_design/DesDocID\",\n     \"views\": {\n       \"view1\": {\n       \"map\":\"function(doc){emit(doc.field, 1)}\",\n       \"reduce\": \"function(key, value, rereduce){return sum(values)}\"\n       }\n     },\n     \"indexes\": {\n       \"mysearch\" : {\n         \"analyzer\": {\"name\": \"portuguese\", \"stopwords\":[\"foo\", \"bar, \"baz\"]},\n         \"index\": \"function(doc){ ... }\"\n       },\n     }\n   }, {\"database-owner\": \"username\"})\n 
.\n

\n

Return value

\n

The returned JSON object will report the new document revision\n and has the following form:\n

\n {\n   \"id\":\"64575eef70ab90a2b8d55fc09e00440d\",\n   \"ok\":true,\n   \"rev\":\"1-9c65296036141e575d32ba9c034dd3ee\"\n }\n 
\n

\n", "summary" : "

Creates a new document in the specified database.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document", "type" : "object()", "occurrence" : null, "description" : "
A document
" } ], "returns" : { "type" : "object()", "description" : "An object which contains the document id and revision" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:DOCUMENT Document creation conflict", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 4, "name" : "create-document", "qname" : "cloudant:create-document", "signature" : "($connection as anyURI, $database as string, $document as object(), $options as object()) as object()", "description" : "

Creates a new document in the specified database

\n

Creates a new document in the specified database,\n using the supplied JSON document structure. If the JSON\n structure includes the _id field, then the document will\n be created with the specified document ID. If the _id\n field is not specified, a new unique ID will be generated.

\n

You can include one or more attachments with a given document\n by incorporating the attachment information within the JSON of\n the document. This provides a simpler alternative to loading\n documents with attachments than making a separate call.\n To do so add you can add the _attachments object\n field to the document. It can have one ore more fields, each\n defining a different attachment.\n The name of the field is the name of the attachment.\n Its value is an object containing the following fields:\n

\n

\n

For example,\n

cloudant:create-document($connection, \"db\",\n   {\n     \"_id\" : \"FishStew\",\n     \"servings\" : 4,\n     \"subtitle\" : \"Delicious with fresh bread\",\n     \"title\" : \"Fish Stew\"\n     \"_attachments\" : {\n       \"styling.css\" : {\n       \"content-type\" : \"text/css\",\n       \"data\" : \"cCB7IGZvbnQtc2l6ZTogMTJwdDsgfQo=\"\n       }\n     }\n   }, {\"database-owner\": \"username\"})\n 
\n creates a document with an attachment named styling.css.\n

\n

This function allows to specify an additional options object.\n The following options are supported:\n

\n

\n

You can write documents to the database at a higher rate\n by using the batch option. This collects document writes\n together in memory (on a user-by-user basis) before they are\n committed to disk. This increases the risk of the documents\n not being stored in the event of a failure, since the documents\n are not written to disk immediately.

\n

Creating a design document

\n

To create a design document the _id field must be present and must\n start with _design/.

\n

For example, the following expression creates a design document\n

cloudant:create-document($connection, \"db\",\n   {\n     \"_id\": \"_design/DesDocID\",\n     \"views\": {\n       \"view1\": {\n       \"map\":\"function(doc){emit(doc.field, 1)}\",\n       \"reduce\": \"function(key, value, rereduce){return sum(values)}\"\n       }\n     },\n     \"indexes\": {\n       \"mysearch\" : {\n         \"analyzer\": {\"name\": \"portuguese\", \"stopwords\":[\"foo\", \"bar, \"baz\"]},\n         \"index\": \"function(doc){ ... }\"\n       },\n     }\n   }, {\"database-owner\": \"username\"})\n 
.\n

\n

Return value

\n

The returned JSON object will report the new document revision\n and has the following form:\n

\n {\n   \"id\":\"64575eef70ab90a2b8d55fc09e00440d\",\n   \"ok\":true,\n   \"rev\":\"1-9c65296036141e575d32ba9c034dd3ee\"\n }\n 
\n

\n", "summary" : "

Creates a new document in the specified database \n Creates a new document in the specified database,\n using the supplied JSON document structure.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document", "type" : "object()", "occurrence" : null, "description" : "
A document
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object which contains the document id and revision" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:DOCUMENT Document creation conflict", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 7, "name" : "create-or-update-attachment", "qname" : "cloudant:create-or-update-attachment", "signature" : "($connection as anyURI, $database as string, $document-id as string, $document-rev as string, $attachment-name as string, $media-type as string, $attachment as atomic) as object()", "description" : "

Creates or updates a document attachment.

\n

The latest document revision must be specified.

\n

For example,\n

cloudant:create-or-update-attachment($connection, \"db\", \"FishStew\",\n   \"8-7c4740b4dcf26683e941d6641c00c39d\", \"AttachmentName\", \"text/plain\",\n   \"AttachmentContent\")
.\n

\n

Creating or updating a design document attachment.

\n

To create or update a design document attachment the document id must\n start with _design/.

\n

For example,\n

cloudant:create-or-update-attachment($connection, \"db\", \"_design/DesDocId\",\n   \"8-7c4740b4dcf26683e941d6641c00c39d\", \"AttachmentName\", \"text/plain\",\n   \"AttachmentContent\")
.\n

\n

Return value

\n

The returned object reports the document id and its new\n revision, as follows:\n

\n {\n   \"id\":\"FishStew\",\n   \"ok\":true,\n   \"rev\":\"9-247bb19a41bfd9bfdaf5ee6e2e05be74\"\n }\n 
\n

\n", "summary" : "

Creates or updates a document attachment.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" }, { "name" : "document-rev", "type" : "string", "occurrence" : null, "description" : "
A document revision
" }, { "name" : "attachment-name", "type" : "string", "occurrence" : null, "description" : "
The name of the attachment
" }, { "name" : "media-type", "type" : "string", "occurrence" : null, "description" : "
The media-type of the attachment
" }, { "name" : "attachment", "type" : "atomic", "occurrence" : null, "description" : "
-name The name of the attachment
" } ], "returns" : { "type" : "object()", "description" : "An object containing the document id and its new revision" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:ATTACHMENT-TYPE Attachment type must be string, base64Binary or hexBinary", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 8, "name" : "create-or-update-attachment", "qname" : "cloudant:create-or-update-attachment", "signature" : "($connection as anyURI, $database as string, $document-id as string, $document-rev as string, $attachment-name as string, $media-type as string, $attachment as atomic, $options as object()) as object()", "description" : "

Creates or updates a document attachment.

\n

The latest document revision must be specified.

\n

This function allows to specify an additional options object.\n The following options are supported:\n

\n

\n

For example,\n

cloudant:create-or-update-attachment($connection, \"db\", \"FishStew\",\n   \"8-7c4740b4dcf26683e941d6641c00c39d\", \"AttachmentName\", \"text/plain\",\n   \"AttachmentContent\", {\"database-owner\": \"username\"})
.\n

\n

Creating or updating a design document attachment.

\n

To create or update a design document attachment the document id must\n start with _design/.

\n

For example,\n

cloudant:create-or-update-attachment($connection, \"db\", \"_design/DesDocId\",\n   \"8-7c4740b4dcf26683e941d6641c00c39d\", \"AttachmentName\", \"text/plain\",\n   \"AttachmentContent\", {\"database-owner\": \"username\"})
.\n

\n

Return value

\n

The returned object reports the document id and its new\n revision, as follows:\n

\n {\n   \"id\":\"FishStew\",\n   \"ok\":true,\n   \"rev\":\"9-247bb19a41bfd9bfdaf5ee6e2e05be74\"\n }\n 
\n

\n", "summary" : "

Creates or updates a document attachment.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" }, { "name" : "document-rev", "type" : "string", "occurrence" : null, "description" : "
A document revision
" }, { "name" : "attachment-name", "type" : "string", "occurrence" : null, "description" : "
The name of the attachment
" }, { "name" : "media-type", "type" : "string", "occurrence" : null, "description" : "
The media-type of the attachment
" }, { "name" : "attachment", "type" : "atomic", "occurrence" : null, "description" : "
-name The name of the attachment
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object containing the document id and its new revision" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:ATTACHMENT-TYPE Attachment type must be string, base64Binary or hexBinary", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 3, "name" : "create-or-update-document", "qname" : "cloudant:create-or-update-document", "signature" : "($connection as anyURI, $database as string, $document as object()) as object()", "description" : "

Creates or updates a document.

\n

When creating a new document, the _id field must\n be specified.

\n

For example,\n

cloudant:create-or-update-document($connection, \"db\",\n   {\n     \"name\":\"Hannah\",\n     \"age\":120,\n     \"gender\":\"female\",\n     \"_id\":\"DocID\"\n   })
.\n

\n

When updating a document, the _id and the\n _rev field, which contains the last document revision,\n must be specified.

\n

For example,\n

cloudant:create-or-update-document($connection, \"db\",\n   {\n     \"name\":\"Hannah\",\n     \"age\":40,\n     \"gender\":\"female\",\n     \"_id\":\"DocID\",\n     \"_rev\":\"1-764b9b11845fd0b73cfa0e61acc74ecf\"\n   })
.\n

\n

Creating or updating a design document

\n

To create or update a design document the document id must\n start with _design/.

\n

For example, the following expression creates a design document\n

cloudant:create-or-update-document($connection, \"db\",\n   {\n     \"_id\": \"_design/DesDocID\",\n     \"views\": {\n       \"view1\": {\n       \"map\":\"function(doc){emit(doc.field, 1)}\",\n       \"reduce\": \"function(key, value, rereduce){return sum(values)}\"\n       }\n     },\n     \"indexes\": {\n       \"mysearch\" : {\n         \"analyzer\": {\"name\": \"portuguese\", \"stopwords\":[\"foo\", \"bar, \"baz\"]},\n         \"index\": \"function(doc){ ... }\"\n       },\n     }\n   })\n 
.\n

\n

For example, the following expression updates a design document\n

cloudant:create-or-update-document($connection, \"db\",\n   {\n     \"_id\": \"_design/DesDocID\",\n     \"_rev\": \"2-f29c836d0bedc4b4b95cfaa6d99e95df\",\n     \"views\": {\n       \"view1\": {\n       \"map\":\"function(doc){emit(doc.field, 1)}\",\n       \"reduce\": \"function(key, value, rereduce){return sum(values)}\"\n       }\n     },\n     \"indexes\": {\n       \"mysearch\" : {\n         \"analyzer\": {\"name\": \"portuguese\", \"stopwords\":[\"foo\", \"bar, \"baz\"]},\n         \"index\": \"function(doc){ ... }\"\n       },\n     }\n   })\n 
.

\n

\n The meaning of the fields in the design document is the following:\n

\n

\n

Return value

\n

The format of the returned object is the following and contains\n the document id and revision.\n

\n {\n   \"ok\":true,\n   \"id\":\"DocID\",\n   \"rev\":\"1-764b9b11845fd0b73cfa0e61acc74ecf\"\n }\n 
\n

\n", "summary" : "

Creates or updates a document.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document", "type" : "object()", "occurrence" : null, "description" : "
A document
" } ], "returns" : { "type" : "object()", "description" : "An object which specifies the document id and its new revision" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:DOCUMENT-MALFORMED Malformed document object", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 4, "name" : "create-or-update-document", "qname" : "cloudant:create-or-update-document", "signature" : "($connection as anyURI, $database as string, $document as object(), $options as object()) as object()", "description" : "

Creates or updates a document.

\n

When creating a new document, the _id field must\n be specified.

\n

For example,\n

cloudant:create-or-update-document($connection, \"db\", \"DocID\",\n   {\n     \"name\":\"Hannah\",\n     \"age\":120,\n     \"gender\":\"female\",\n     \"_id\":\"DocID\"\n   }, {\"database-owner\": \"username\"})
.\n

\n

When updating a document, the _id and the\n _rev field, which contains the last document revision,\n must be specified.

\n

For example,\n

cloudant:create-or-update-document($connection, \"db\", \"DocID\",\n   {\n     \"name\":\"Hannah\",\n     \"age\":40,\n     \"gender\":\"female\",\n     \"_id\":\"DocID\",\n     \"_rev\":\"1-764b9b11845fd0b73cfa0e61acc74ecf\"\n   }, {\"database-owner\": \"username\"})
.\n

\n

Creating or updating a design document

\n

To create or update a design document the document id must\n start with _design/.

\n

For example, the following expression creates a design document\n

cloudant:create-or-update-document($connection, \"db\",\n   {\n     \"_id\": \"_design/DesDocID\",\n     \"views\": {\n       \"view1\": {\n       \"map\":\"function(doc){emit(doc.field, 1)}\",\n       \"reduce\": \"function(key, value, rereduce){return sum(values)}\"\n       }\n     },\n     \"indexes\": {\n       \"mysearch\" : {\n         \"analyzer\": {\"name\": \"portuguese\", \"stopwords\":[\"foo\", \"bar, \"baz\"]},\n         \"index\": \"function(doc){ ... }\"\n       },\n     }\n   }, {\"database-owner\": \"username\"})\n 
.\n

\n
cloudant:create-or-update-document($connection, \"db\",\n   {\n     \"_id\": \"_design/DesDocID\",\n     \"_rev\": \"2-f29c836d0bedc4b4b95cfaa6d99e95df\",\n     \"views\": {\n       \"view1\": {\n       \"map\":\"function(doc){emit(doc.field, 1)}\",\n       \"reduce\": \"function(key, value, rereduce){return sum(values)}\"\n       }\n     },\n     \"indexes\": {\n       \"mysearch\" : {\n         \"analyzer\": {\"name\": \"portuguese\", \"stopwords\":[\"foo\", \"bar, \"baz\"]},\n         \"index\": \"function(doc){ ... }\"\n       },\n     }\n   }, {\"database-owner\": \"username\"})\n 
.\n

\n The meaning of the fields in the design document is the following:\n

\n

\n

Return value

\n

The format of the returned object is the following and contains\n the document id and revision.\n

\n {\n   \"ok\":true,\n   \"id\":\"DocID\",\n   \"rev\":\"1-764b9b11845fd0b73cfa0e61acc74ecf\"\n }\n 
\n

\n", "summary" : "

Creates or updates a document.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document", "type" : "object()", "occurrence" : null, "description" : "
A document
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object which specifies the document id and its new revision" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:DOCUMENT-MALFORMED Malformed document object", "cloudant:OPTIONS Malformed options object", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 2, "name" : "database-info-nondeterministic", "qname" : "cloudant:database-info-nondeterministic", "signature" : "($connection as anyURI, $database as string) as object()", "description" : "

Returns information about a database.

\n

This function has the same semantics as database-info#2,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Returns information about a database.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" } ], "returns" : { "type" : "object()", "description" : "An object describing the specified database" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 3, "name" : "database-info-nondeterministic", "qname" : "cloudant:database-info-nondeterministic", "signature" : "($connection as anyURI, $database as string, $options as object()) as object()", "description" : "

Returns information about a database.

\n

This function has the same semantics as\n database-info#3,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Returns information about a database.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
a database name
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object describing the specified database" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 2, "name" : "database-info", "qname" : "cloudant:database-info", "signature" : "($connection as anyURI, $database as string) as object()", "description" : "

Returns information about a database.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

For example,\n

cloudant:database-info($connection, \"db\")
.\n

\n

An object with the following format is returned:\n

\n {\n   \"update_seq\": \"0-g1AAAADneJzLYWBg...\",\n   \"db_name\": \"db\",\n   \"purge_seq\": 0,\n   \"other\": {\n     \"data_size\": 0\n   },\n   \"doc_del_count\": 0,\n   \"doc_count\": 0,\n   \"disk_size\": 316,\n   \"disk_format_version\": 5,\n   \"compact_running\": false,\n   \"instance_start_time\": \"0\"\n }\n 
\n

\n

The fields have the following meaning:\n

\n

\n", "summary" : "

Returns information about a database.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" } ], "returns" : { "type" : "object()", "description" : "An object describing the specified database" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 3, "name" : "database-info", "qname" : "cloudant:database-info", "signature" : "($connection as anyURI, $database as string, $options as object()) as object()", "description" : "

Returns information about a database.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

This function allows to specify an additional options object.\n The following options are supported:\n

\n

\n

For example,\n

cloudant:database-info($connection, \"db\", {\"database-owner\": \"username\"})
.\n

\n

An object with the following format is returned:\n

\n {\n   \"update_seq\": \"0-g1AAAADneJzLYWBg...\",\n   \"db_name\": \"db\",\n   \"purge_seq\": 0,\n   \"other\": {\n     \"data_size\": 0\n   },\n   \"doc_del_count\": 0,\n   \"doc_count\": 0,\n   \"disk_size\": 316,\n   \"disk_format_version\": 5,\n   \"compact_running\": false,\n   \"instance_start_time\": \"0\"\n }\n 
\n

\n

The fields have the following meaning:\n

\n

\n", "summary" : "

Returns information about a database.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
a database name
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object describing the specified database" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 5, "name" : "delete-attachment", "qname" : "cloudant:delete-attachment", "signature" : "($connection as anyURI, $database as string, $document-id as string, $document-rev as string, $attachment-name as string) as object()", "description" : "

Deletes the specified attachment.

\n

The latest document revision must be specified.

\n

For example,\n

cloudant:delete-attachment($connection, \"db\", \"FishStew\",\n   \"8-7c4740b4dcf26683e941d6641c00c39d\", \"AttachmentName\")
.\n

\n

Deleting a design document attachment.

\n

To delete a design document attachment the document id must\n start with _design/.

\n

For example,\n

cloudant:delete-attachment($connection, \"db\", \"_design/DesDocId\",\n   \"8-7c4740b4dcf26683e941d6641c00c39d\",\n   \"AttachmentName\", \"text/plain\", \"AttachmentContent\")
.\n

\n

Return value

\n

The returned object reports the document id and its new\n revision, as follows:\n

\n {\n   \"id\":\"FishStew\",\n   \"ok\":true,\n   \"rev\":\"9-247bb19a41bfd9bfdaf5ee6e2e05be74\"\n }\n 
\n

\n", "summary" : "

Deletes the specified attachment.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" }, { "name" : "document-rev", "type" : "string", "occurrence" : null, "description" : "
A document revision
" }, { "name" : "attachment-name", "type" : "string", "occurrence" : null, "description" : "
The name of the attachment
" } ], "returns" : { "type" : "object()", "description" : "An object containing the document id and its new revision" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:ATTACHMENT-NOT-EXISTS Attachment does not exists", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:ATTACHMENT-TYPE Attachment type must be string, base64Binary or hexBinary", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 6, "name" : "delete-attachment", "qname" : "cloudant:delete-attachment", "signature" : "($connection as anyURI, $database as string, $document-id as string, $document-rev as string, $attachment-name as string, $options as object()) as object()", "description" : "

Deletes the specified attachment.

\n

The latest document revision must be specified.

\n

This function allows to specify an additional options object.\n The following options are supported:\n

\n

\n

For example,\n

cloudant:delete-attachment($connection, \"db\", \"FishStew\",\n \"8-7c4740b4dcf26683e941d6641c00c39d\", \"AttachmentName\",\n {\"database-owner\": \"username\"})
.\n

\n

Deleting a design document attachment.

\n

To delete a design document attachment the document id must\n start with _design/.

\n

For example,\n

cloudant:delete-attachment($connection, \"db\", \"_design/DesDocId\",\n   \"8-7c4740b4dcf26683e941d6641c00c39d\", \"AttachmentName\", \"text/plain\",\n   \"AttachmentContent\", {\"database-owner\": \"username\"})
.\n

\n

Return value

\n

The returned object reports the document id and its new\n revision, as follows:\n

\n {\n   \"id\":\"FishStew\",\n   \"ok\":true,\n   \"rev\":\"9-247bb19a41bfd9bfdaf5ee6e2e05be74\"\n }\n 
\n

\n", "summary" : "

Deletes the specified attachment.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" }, { "name" : "document-rev", "type" : "string", "occurrence" : null, "description" : "
A document revision
" }, { "name" : "attachment-name", "type" : "string", "occurrence" : null, "description" : "
The name of the attachment
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object containing the document id and its new revision" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:ATTACHMENT-NOT-EXISTS Attachment does not exists", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:ATTACHMENT-TYPE Attachment type must be string, base64Binary or hexBinary", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 2, "name" : "delete-database", "qname" : "cloudant:delete-database", "signature" : "($connection as anyURI, $database as string) as empty-sequence()", "description" : "

Deletes a database and all the documents and attachments contained in it.

\n

The database name must be composed of one or more of the following characters:\n

\n

\n

For example,\n

cloudant:delete-database($connection, \"db\")
.\n

\n", "summary" : "

Deletes a database and all the documents and attachments contained in it.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" } ], "returns" : { "type" : "empty-sequence()", "description" : "Empty sequence" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:DATABASE-NOT-EXISTS Database does not exist", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 4, "name" : "delete-document", "qname" : "cloudant:delete-document", "signature" : "($connection as anyURI, $database as string, $document-id as string, $document-rev as string) as object()", "description" : "

Deletes the specified document from a database.

\n

The latest document revision must be specified.

\n

For example,\n

\n cloudant:delete-document($connection, \"db\", \"DocID\", \"3-7c4740b4dcf26683e941d6641c00c39d\")\n 
.\n

\n

Deleting a design document

\n

To delete a design document the document id must\n start with _design/.

\n

For example,\n

\n cloudant:delete-document($connection, \"db\", \"_design/DesDocID\", \"3-7c4740b4dcf26683e941d6641c00c39d\")\n 
.\n

\n

Return value

\n

The returned object reports the document id and its\n new revision, as follows:\n

\n {\n   \"id\":\"DocID\",\n   \"ok\":true,\n   \"rev\":\"4-2719fd41187c60762ff584761b714cfb\"\n }\n 
\n

\n", "summary" : "

Deletes the specified document from a database.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" }, { "name" : "document-rev", "type" : "string", "occurrence" : null, "description" : "
A document revision
" } ], "returns" : { "type" : "object()", "description" : "An object which specifies the document id and its new revision" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:REVISION Specified revision is missing, invalid or not the latest.", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 5, "name" : "delete-document", "qname" : "cloudant:delete-document", "signature" : "($connection as anyURI, $database as string, $document-id as string, $document-rev as string, $options as object()) as object()", "description" : "

Deletes the specified document from a database.

\n

The latest document revision must be specified.

\n

This function allows to specify an additional options object.\n The following options are supported:\n

\n

\n

For example,\n

\n cloudant:delete-document($connection, \"db\", \"DocID\", \"3-7c4740b4dcf26683e941d6641c00c39d\",\n   {\"database-owner\": \"username\"})\n 
.\n

\n

Deleting a design document

\n

To delete a design document the document id must\n start with _design/.

\n

For example,\n

\n cloudant:delete-document($connection, \"db\", \"_design/DesDocID\", \"3-7c4740b4dcf26683e941d6641c00c39d\",\n   {\"database-owner\": \"username\"})\n 
.\n

\n

Return value

\n

The returned object reports the document id and its\n new revision, as follows:\n

\n {\n   \"id\":\"DocID\",\n   \"ok\":true,\n   \"rev\":\"4-2719fd41187c60762ff584761b714cfb\"\n }\n 
\n

\n", "summary" : "

Deletes the specified document from a database.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" }, { "name" : "document-rev", "type" : "string", "occurrence" : null, "description" : "
A document revision
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object which specifies the document id and its new revision" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:REVISION Specified revision is missing, invalid or not the latest.", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 3, "name" : "document-info-nondeterministic", "qname" : "cloudant:document-info-nondeterministic", "signature" : "($connection as anyURI, $database as string, $document-id as string) as object()", "description" : "

Returns the latest revision and size for a given document.

\n

This function has the same semantics as\n document-info#3,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Returns the latest revision and size for a given document.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" } ], "returns" : { "type" : "object()", "description" : "An object specifying the document id, revision and size" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DOCUMENT The specified document or revision cannot be found", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 4, "name" : "document-info-nondeterministic", "qname" : "cloudant:document-info-nondeterministic", "signature" : "($connection as anyURI, $database as string, $document-id as string, $options as object()) as object()", "description" : "

Returns the latest revision and size for a given document.

\n

This function has the same semantics as\n document-info#4,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Returns the latest revision and size for a given document.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object specifying the document id, revision and size" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DOCUMENT The specified document or revision cannot be found", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 3, "name" : "document-info", "qname" : "cloudant:document-info", "signature" : "($connection as anyURI, $database as string, $document-id as string) as object()", "description" : "

Returns the latest revision and size for a given document.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

For example,\n

cloudant:document-info($connection, \"db\", \"DocID\")
.\n

\n

The format of the returned object is the following and contains\n the document id, latest revision and size.\n

\n {\n   \"ok\": true,\n   \"id\": \"DocID\",\n   \"rev\": \"1-764b9b11845fd0b73cfa0e61acc74ecf\",\n   \"size\": 500\n }\n 
\n

\n

Returning the latest revision and size for a given design document

\n

To return the latest revision and size of a design document the document\n id must start with\n _design/.

\n

For example,\n

cloudant:document-info($connection, \"db\", \"_design/DesDocID\")
.\n

\n", "summary" : "

Returns the latest revision and size for a given document.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" } ], "returns" : { "type" : "object()", "description" : "An object specifying the document id, revision and size" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DOCUMENT The specified document or revision cannot be found", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 4, "name" : "document-info", "qname" : "cloudant:document-info", "signature" : "($connection as anyURI, $database as string, $document-id as string, $options as object()) as object()", "description" : "

Returns the latest revision and size for a given document.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

This function allows to specify an additional options object.\n The following options are supported:\n

\n

\n

For example,\n

\n cloudant:document-info($connection, \"db\", \"DocID\", {\"database-owner\": \"username\"})\n 
.\n

\n

The format of the returned object is the following and contains\n the document id, latest revision and size.\n

\n {\n   \"ok\": true,\n   \"id\": \"DocID\",\n   \"rev\": \"1-764b9b11845fd0b73cfa0e61acc74ecf\",\n   \"size\": 500\n }\n 
\n

\n

Returning the latest revision and size for a given design document

\n

To return the latest revision and size of a design document the document\n id must start with _design/.

\n

For example,\n

\n cloudant:document-info($connection, \"db\", \"_design/DesDocID\", {\"database-owner\": \"username\"})\n 
.\n

\n", "summary" : "

Returns the latest revision and size for a given document.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object specifying the document id, revision and size" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DOCUMENT The specified document or revision cannot be found", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 3, "name" : "document-nondeterministic", "qname" : "cloudant:document-nondeterministic", "signature" : "($connection as anyURI, $database as string, $document-id as string) as object()", "description" : "

Retrieves a document from the specified database.

\n

This function has the same semantics as document#3,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Retrieves a document from the specified database.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" } ], "returns" : { "type" : "object()", "description" : "The specified document" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:DOCUMENT The specified document or revision cannot be found", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 4, "name" : "document-nondeterministic", "qname" : "cloudant:document-nondeterministic", "signature" : "($connection as anyURI, $database as string, $document-id as string, $options as object()) as object()", "description" : "

Retrieves a document from the specified database

\n

This function has the same semantics as document#4,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Retrieves a document from the specified database \n This function has the same semantics as document#4 ,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "The specified document" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:DOCUMENT The specified document or revision cannot be found", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 3, "name" : "document", "qname" : "cloudant:document", "signature" : "($connection as anyURI, $database as string, $document-id as string) as object()", "description" : "

Retrieves a document from the specified database.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

The latest revision of the document will be returned.

\n

If the document includes attachments, then the\n returned structure will contain a summary of the\n attachments associated with the document, but not the\n attachment data itself.

\n

For example,\n

cloudant:document($connection, \"db\", \"DocID\")
.\n

\n

The returned JSON object will contain the document\n and has the following format:\n

\n {\n   \"_id\": \"DocID\",\n   \"_rev\": \"2-f29c836d0bedc4b4b95cfaa6d99e95df\",\n   \"name\": \"Anna\",\n   \"age\": 89,\n   \"gender\": \"female\",\n   \"_attachments\": {\n     \"my attachment\": {\n       \"content_type\": \"application/json; charset=UTF-8\",\n       \"revpos\": 2,\n       \"digest\": \"md5-37IZysiyWLRWx31J/1WQHw==\",\n       \"length\": 12,\n       \"stub\": true\n       }\n     }\n   }\n 
\n

\n

\n The meaning of the fields in the returned object is the following:\n

\n

\n

Retrieving a design document from the specified database

\n

To retrieve a design document the document id must start with\n _design/.

\n

For example,\n

cloudant:document($connection, \"db\", \"_design/DesDocID\")
.\n

\n

A JSON object with the following format is returned:\n

\n {\n  \"_id\": \"_design/DesDocID\",\n   \"views\": {\n     \"view1\": {\n       \"map\":\"function(doc){emit(doc.field, 1)}\",\n       \"reduce\": \"function(key, value, rereduce){return sum(values)}\"\n     }\n   },\n   \"indexes\": {\n     \"mysearch\" : {\n       \"analyzer\": {\"name\": \"portuguese\", \"stopwords\":[\"foo\", \"bar, \"baz\"]},\n       \"index\": \"function(doc){ ... }\"\n     },\n   }\n }\n 
\n

\n

\n The meaning of the fields in the returned object is the following:\n

\n

\n", "summary" : "

Retrieves a document from the specified database.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" } ], "returns" : { "type" : "object()", "description" : "The specified document" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:DOCUMENT The specified document or revision cannot be found", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 4, "name" : "document", "qname" : "cloudant:document", "signature" : "($connection as anyURI, $database as string, $document-id as string, $options as object()) as object()", "description" : "

Retrieves a document from the specified database

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

Unless you request a specific revision, the latest\n revision of the document will always be returned.

\n

This function allows to specify an additional options object.\n The following options are supported:\n

\n

\n

If the document includes attachments, then the\n returned structure will contain a summary of the\n attachments associated with the document, but not the\n attachment data itself.

\n

For example,\n

\n cloudant:document($connection, \"db\", \"DocID\", {\"database-owner\": \"username\"})\n 
.\n

\n

The returned JSON object will contain the document\n and has the following format:\n

\n {\n   \"_id\": \"DocID\",\n   \"_rev\": \"2-f29c836d0bedc4b4b95cfaa6d99e95df\",\n   \"name\": \"Anna\",\n   \"age\": 89,\n   \"gender\": \"female\",\n   \"_attachments\": {\n     \"my attachment\": {\n       \"content_type\": \"application/json; charset=UTF-8\",\n       \"revpos\": 2,\n       \"digest\": \"md5-37IZysiyWLRWx31J/1WQHw==\",\n       \"length\": 12,\n       \"stub\": true\n       }\n     }\n   }\n 
\n

\n

\n The meaning of the fields in the returned object is the following:\n

\n

\n

Retrieving a design document from the specified database

\n

To retrieve a design document the document id must start with\n _design/.

\n

For example,\n

cloudant:document($connection, \"db\", \"_design/DesDocID\", {\"database-owner\": \"username\"})
.\n

\n

A JSON object with the following format is returned:\n

\n {\n  \"_id\": \"_design/DesDocID\",\n  \"_rev\": \"2-f29c836d0bedc4b4b95cfaa6d99e95df\",\n   \"views\": {\n     \"view1\": {\n       \"map\":\"function(doc){emit(doc.field, 1)}\",\n       \"reduce\": \"function(key, value, rereduce){return sum(values)}\"\n     }\n   },\n   \"indexes\": {\n     \"mysearch\" : {\n       \"analyzer\": {\"name\": \"portuguese\", \"stopwords\":[\"foo\", \"bar, \"baz\"]},\n       \"index\": \"function(doc){ ... }\"\n     },\n   }\n }\n 
\n

\n

\n The meaning of the fields in the returned object is the following:\n

\n

\n

Getting a List of Revisions

\n

You can obtain a list of the revisions for a given document\n by the revs option.

\n

For example,\n

cloudant:document($connection, \"db\", \"DocID\", {\"revs\": true})
.\n

\n

The returned JSON object includes the original document and\n a _revisions structure that includes the revision\n information:\n

\n {\n   \"servings\":4,\n   \"subtitle\":\"Delicious with a green salad\",\n   \"_id\":\"FishStew\",\n   \"title\":\"Irish Fish Stew\",\n   \"_revisions\":\n   {\n     \"ids\": [\n       \"a1a9b39ee3cc39181b796a69cb48521c\",\n       \"7c4740b4dcf26683e941d6641c00c39d\",\n       \"9c65296036141e575d32ba9c034dd3ee\"\n      ],\n     \"start\":3\n  },\n  \"_rev\":\"3-a1a9b39ee3cc39181b796a69cb48521c\"\n }\n 
\n

\n

The meaning of the additional fields is the following:\n

\n

\n

Obtaining an Extended Revision History

\n

You can get additional information about the revisions for a given document\n with the revs_info option.

\n

For example,\n

cloudant:document($connection, \"db\", \"DocID\", {\"revs_info\": true})
.\n

\n

This returns extended revision information, including the availability and status\n of each revision:\n

\n {\n   \"servings\":4,\n   \"subtitle\":\"Delicious with a green salad\",\n   \"_id\":\"FishStew\",\n   \"_revs_info\":[\n     {\n       \"status\":\"available\",\n       \"rev\":\"3-a1a9b39ee3cc39181b796a69cb48521c\"\n     },\n     {\n       \"status\":\"available\",\n       \"rev\":\"2-7c4740b4dcf26683e941d6641c00c39d\"\n     },\n     {\n       \"status\":\"available\",\n       \"rev\":\"1-9c65296036141e575d32ba9c034dd3ee\"\n     }\n   ],\n   \"title\":\"Irish Fish Stew\",\n   \"_rev\":\"3-a1a9b39ee3cc39181b796a69cb48521c\"\n }\n 
\n

\n

The meaning of the additional fields is the following:\n

\n

\n", "summary" : "

Retrieves a document from the specified database \n This function is declared as deterministic and should be used whenever result\n caching is acceptable.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "document-id", "type" : "string", "occurrence" : null, "description" : "
A document identifier
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "The specified document" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:DATABASE-NAME Invalid database name", "cloudant:DOCUMENT The specified document or revision cannot be found", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 1, "name" : "list-databases-nondeterministic", "qname" : "cloudant:list-databases-nondeterministic", "signature" : "($connection as anyURI) as array()", "description" : "

Returns an array containing the names of all the user's databases.

\n

This function has the same semantics as\n list-databases#1,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Returns an array containing the names of all the user's databases.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" } ], "returns" : { "type" : "array()", "description" : "An array of all the database names" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 2, "name" : "list-databases-nondeterministic", "qname" : "cloudant:list-databases-nondeterministic", "signature" : "($connection as anyURI, $options as object()) as array()", "description" : "

Returns an array containing the names of all the user's databases.

\n

This function has the same semantics as\n list-databases#2,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Returns an array containing the names of all the user's databases.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "array()", "description" : "An array of all the databases names" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 1, "name" : "list-databases", "qname" : "cloudant:list-databases", "signature" : "($connection as anyURI) as array()", "description" : "

Returns an array containing the names of all the user's databases.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

For example,\n

cloudant:list-databases($connection)
.\n

\n", "summary" : "

Returns an array containing the names of all the user's databases.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" } ], "returns" : { "type" : "array()", "description" : "An array of all the database names" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 2, "name" : "list-databases", "qname" : "cloudant:list-databases", "signature" : "($connection as anyURI, $options as object()) as array()", "description" : "

Returns an array containing the names of all the user's databases.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

This function allows to specify an additional options object.\n The following options are supported:\n

\n

\n

For example,\n

cloudant:list-databases($connection, {\"database-owner\" : \"username\"})
.\n

\n", "summary" : "

Returns an array containing the names of all the user's databases.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "array()", "description" : "An array of all the databases names" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 5, "name" : "lucene-query-nondeterministic", "qname" : "cloudant:lucene-query-nondeterministic", "signature" : "($connection as anyURI, $database as string, $design-document as string, $index as string, $query as string) as object()", "description" : "

Executes a Lucene query against a view and returns the query result.

\n

This function has the same semantics as\n lucene-query#5,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Executes a Lucene query against a view and returns the query result.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "design-document", "type" : "string", "occurrence" : null, "description" : "
A design document name
" }, { "name" : "index", "type" : "string", "occurrence" : null, "description" : "
An index name
" }, { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A Lucene query
" } ], "returns" : { "type" : "object()", "description" : "The Lucene query results" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 6, "name" : "lucene-query-nondeterministic", "qname" : "cloudant:lucene-query-nondeterministic", "signature" : "($connection as anyURI, $database as string, $design-document as string, $index as string, $query as string, $options as object()) as object()", "description" : "

Executes a Lucene query against a view and returns the query result.

\n

This function has the same semantics as lucene-query#6,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Executes a Lucene query against a view and returns the query result.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "design-document", "type" : "string", "occurrence" : null, "description" : "
A design document name
" }, { "name" : "index", "type" : "string", "occurrence" : null, "description" : "
An index name
" }, { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A Lucene query
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "The Lucene query results" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 5, "name" : "lucene-query", "qname" : "cloudant:lucene-query", "signature" : "($connection as anyURI, $database as string, $design-document as string, $index as string, $query as string) as object()", "description" : "

Executes a Lucene query against a view and returns the query result.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

This method searches for documents whose index fields match the Lucene query.\n Which fields of a document are indexed and how is determined by the index functions\n in the design document.

\n

The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.

\n

For example,\n

cloudant:lucene-query($connection, \"db\", \"designdoc\", \"view\", \"a*\")
.\n

\n

An object with the following format is returned:\n

\n {\n   \"total_rows\": 3,\n   \"bookmark\": \"g1AAAACWeJzLYWBgYMpgTmFQSElKzi9KdUhJMtbLTS3KLElMT9VLzskvTUnMK9HLSy3JAalMcgCSSfX____PAvPdQHwQSGTIIt6UPBaQlgNA6j_CJPsPcJOyANNEKzY\",\n   \"rows\":\n   [\n     {\n       \"id\": \"dd828eb4-c3f1-470f-aeff-c375ef70e4ad\",\n       \"order\": [0.0, 1],\n       \"fields\":\n       {\n         \"default\": \"aa\",\n         \"foo\": 0.0\n       }\n     },\n     {\n       \"id\": \"ea522cf1-eb8e-4477-aa92-d1fa459bb216\",\n       \"order\": [1.0, 0],\n       \"fields\":\n       {\n         \"default\": \"ab\",\n         \"foo\": 1.0\n       }\n     },\n     {\n       \"id\": \"c838baed-d573-43ea-9c34-621cf0f13301\",\n       \"order\": [2.0, 0],\n       \"fields\":\n       {\n         \"default\": \"ac\",\n         \"foo\": 2.0\n       }\n     }\n   ]\n }\n 
\n

\n

The fields have the following meaning:\n

\n

\n", "summary" : "

Executes a Lucene query against a view and returns the query result.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "design-document", "type" : "string", "occurrence" : null, "description" : "
A design document name
" }, { "name" : "index", "type" : "string", "occurrence" : null, "description" : "
An index name
" }, { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A Lucene query
" } ], "returns" : { "type" : "object()", "description" : "The Lucene query results" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 6, "name" : "lucene-query", "qname" : "cloudant:lucene-query", "signature" : "($connection as anyURI, $database as string, $design-document as string, $index as string, $query as string, $options as object()) as object()", "description" : "

Executes a Lucene query against a view and returns the query result.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

This method searches for documents whose index fields match the Lucene query.\n Which fields of a document are indexed and how is determined by the index functions\n in the design document.

\n

This function allows to specify an additional options object.\n The following options are supported:\n

\n

\n

The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.

\n

For example,\n

cloudant:lucene-query($connection, \"db\", \"designdoc\", \"view\", \"a*\",\n {\"database-owner\": \"username\"})
.\n

\n

An object with the following format is returned:\n

\n {\n   \"total_rows\": 3,\n   \"bookmark\": \"g1AAAACWeJzLYWBgYMpgTmFQSElKzi9KdUhJMtbLTS3KLElMT9VLzskvTUnMK9HLSy3JAalMcgCSSfX____PAvPdQHwQSGTIIt6UPBaQlgNA6j_CJPsPcJOyANNEKzY\",\n   \"rows\":\n   [\n     {\n       \"id\": \"dd828eb4-c3f1-470f-aeff-c375ef70e4ad\",\n       \"order\": [0.0, 1],\n       \"fields\":\n       {\n         \"default\": \"aa\",\n         \"foo\": 0.0\n       }\n     },\n     {\n       \"id\": \"ea522cf1-eb8e-4477-aa92-d1fa459bb216\",\n       \"order\": [1.0, 0],\n       \"fields\":\n       {\n         \"default\": \"ab\",\n         \"foo\": 1.0\n       }\n     },\n     {\n       \"id\": \"c838baed-d573-43ea-9c34-621cf0f13301\",\n       \"order\": [2.0, 0],\n       \"fields\":\n       {\n         \"default\": \"ac\",\n         \"foo\": 2.0\n       }\n     }\n   ]\n }\n 
\n

\n

The fields have the following meaning:\n

\n

\n", "summary" : "

Executes a Lucene query against a view and returns the query result.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "design-document", "type" : "string", "occurrence" : null, "description" : "
A design document name
" }, { "name" : "index", "type" : "string", "occurrence" : null, "description" : "
An index name
" }, { "name" : "query", "type" : "string", "occurrence" : null, "description" : "
A Lucene query
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "The Lucene query results" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 3, "name" : "multiple-documents-nondeterministic", "qname" : "cloudant:multiple-documents-nondeterministic", "signature" : "($connection as anyURI, $database as string, $keys as string*) as object()", "description" : "

List the specified documents in a given database.

\n

This function has the same semantics as\n multiple-documents#3,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

List the specified documents in a given database.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "keys", "type" : "string", "occurrence" : "*", "description" : "
The keys of the documents which must be retrieved
" } ], "returns" : { "type" : "object()", "description" : "An object listing the specified documents in the specified database" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 4, "name" : "multiple-documents-nondeterministic", "qname" : "cloudant:multiple-documents-nondeterministic", "signature" : "($connection as anyURI, $database as string, $keys as string*, $options as object()) as object()", "description" : "

Lists the specified documents in a given database.

\n

This function has the same semantics as\n multiple-documents#4,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Lists the specified documents in a given database.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "keys", "type" : "string", "occurrence" : "*", "description" : "
The keys of the documents which must be retrieved
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object listing the specified documents in the specified database" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 3, "name" : "multiple-documents", "qname" : "cloudant:multiple-documents", "signature" : "($connection as anyURI, $database as string, $keys as string*) as object()", "description" : "

List the specified documents in a given database.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.

\n

For example,\n

cloudant:multiple-documents($connection, \"db\",\n   (\"5a049246-179f-42ad-87ac-8f080426c17c\",\n    \"d1f61e66-7708-4da6-aa05-7cbc33b44b7e\",\n    \"96f898f0-f6ff-4a9b-aac4-503992f31b01\"))
.\n

\n

An object with the following format is returned:\n

\n {\n   \"total_rows\":3,\n   \"offset\":0,\n   \"rows\":[\n   {\n     \"id\":\"5a049246-179f-42ad-87ac-8f080426c17c\",\n     \"key\":\"5a049246-179f-42ad-87ac-8f080426c17c\",\n     \"value\":\n     {\n       \"rev\":\"2-9d5401898196997853b5ac4163857a29\"\n     }\n   },\n   {\n     \"id\":\"96f898f0-f6ff-4a9b-aac4-503992f31b01\",\n     \"key\":\"96f898f0-f6ff-4a9b-aac4-503992f31b01\",\n     \"value\":\n     {\n       \"rev\":\"2-ff7b85665c4c297838963c80ecf481a3\"\n      }\n   },\n   {\n     \"id\":\"d1f61e66-7708-4da6-aa05-7cbc33b44b7e\",\n     \"key\":\"d1f61e66-7708-4da6-aa05-7cbc33b44b7e\",\n     \"value\":\n     {\n       \"rev\":\"2-cbdef49ef3ddc127eff86350844a6108\"\n     }\n   }]\n }\n 
\n

\n

The fields have the following meaning:\n

\n

\n", "summary" : "

List the specified documents in a given database.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "keys", "type" : "string", "occurrence" : "*", "description" : "
The keys of the documents which must be retrieved
" } ], "returns" : { "type" : "object()", "description" : "An object listing the specified documents in the specified database" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 4, "name" : "multiple-documents", "qname" : "cloudant:multiple-documents", "signature" : "($connection as anyURI, $database as string, $keys as string*, $options as object()) as object()", "description" : "

Lists the specified documents in a given database.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.

\n

This function allows to specify an additional options object.\n The following options are supported:\n

\n

\n

For example,\n

cloudant:multiple-documents($connection, \"db\",\n   (\"5a049246-179f-42ad-87ac-8f080426c17c\",\n    \"d1f61e66-7708-4da6-aa05-7cbc33b44b7e\",\n    \"96f898f0-f6ff-4a9b-aac4-503992f31b01\"),\n   {\"database-owner\": \"username\"})
.\n

\n

An object with the following format is returned:\n

\n {\n   \"total_rows\":3,\n   \"offset\":0,\n   \"rows\":[\n   {\n     \"id\":\"5a049246-179f-42ad-87ac-8f080426c17c\",\n     \"key\":\"5a049246-179f-42ad-87ac-8f080426c17c\",\n     \"value\":\n     {\n       \"rev\":\"2-9d5401898196997853b5ac4163857a29\"\n     }\n   },\n   {\n     \"id\":\"96f898f0-f6ff-4a9b-aac4-503992f31b01\",\n     \"key\":\"96f898f0-f6ff-4a9b-aac4-503992f31b01\",\n     \"value\":\n     {\n       \"rev\":\"2-ff7b85665c4c297838963c80ecf481a3\"\n      }\n   },\n   {\n     \"id\":\"d1f61e66-7708-4da6-aa05-7cbc33b44b7e\",\n     \"key\":\"d1f61e66-7708-4da6-aa05-7cbc33b44b7e\",\n     \"value\":\n     {\n       \"rev\":\"2-cbdef49ef3ddc127eff86350844a6108\"\n     }\n   }]\n }\n 
\n

\n

The fields have the following meaning:\n

\n

\n", "summary" : "

Lists the specified documents in a given database.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "keys", "type" : "string", "occurrence" : "*", "description" : "
The keys of the documents which must be retrieved
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object listing the specified documents in the specified database" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 5, "name" : "multiple-view-documents-nondeterministic", "qname" : "cloudant:multiple-view-documents-nondeterministic", "signature" : "($connection as anyURI, $database as string, $design-document as string, $view as string, $keys as string*) as object()", "description" : "

List the specified documents in a given view.

\n

This function has the same semantics as\n multiple-view-documents#5,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

List the specified documents in a given view.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "design-document", "type" : "string", "occurrence" : null, "description" : "
A design document name
" }, { "name" : "view", "type" : "string", "occurrence" : null, "description" : "
A view name
" }, { "name" : "keys", "type" : "string", "occurrence" : "*", "description" : "
The keys of the documents which must be retrieved
" } ], "returns" : { "type" : "object()", "description" : "An object listing all the specified documents in the specified view" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 6, "name" : "multiple-view-documents-nondeterministic", "qname" : "cloudant:multiple-view-documents-nondeterministic", "signature" : "($connection as anyURI, $database as string, $design-document as string, $view as string, $keys as string*, $options as object()) as object()", "description" : "

Lists the specified documents in a given view.

\n

This function has the same semantics as\n multiple-view-documents#6,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Lists the specified documents in a given view.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "design-document", "type" : "string", "occurrence" : null, "description" : "
A design document name
" }, { "name" : "view", "type" : "string", "occurrence" : null, "description" : "
A view name
" }, { "name" : "keys", "type" : "string", "occurrence" : "*", "description" : "
The keys of the documents which must be retrieved
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object listing all the specified documents in the specified view" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] }, { "isDocumented" : true, "arity" : 5, "name" : "multiple-view-documents", "qname" : "cloudant:multiple-view-documents", "signature" : "($connection as anyURI, $database as string, $design-document as string, $view as string, $keys as string*) as object()", "description" : "

List the specified documents in a given view.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.

\n

For example,\n

cloudant:multiple-view-documents($connection, \"db\", \"recipes\", \"by_ingredient\",\n (\"claret\", \"clear apple juice\"))\n 
.\n

\n

An object with the following format is returned:\n

\n {\n   \"total_rows\" : 26484,\n   \"rows\" : [\n     {\n       \"value\" : [\"Scotch collops\"]],\n       \"id\" : \"Scotchcollops\",\n       \"key\" : \"claret\"\n     },\n     {\n       \"value\" : [\"Stand pie\"],\n       \"id\" : \"Standpie\",\n       \"key\" : \"clear apple juice\"\n     }\n   ],\n   \"offset\" : 6324\n }\n 
\n

\n

The fields have the following meaning:\n

\n

\n", "summary" : "

List the specified documents in a given view.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "design-document", "type" : "string", "occurrence" : null, "description" : "
A design document name
" }, { "name" : "view", "type" : "string", "occurrence" : null, "description" : "
A view name
" }, { "name" : "keys", "type" : "string", "occurrence" : "*", "description" : "
The keys of the documents which must be retrieved
" } ], "returns" : { "type" : "object()", "description" : "An object listing all the specified documents in the specified view" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error" ] }, { "isDocumented" : true, "arity" : 6, "name" : "multiple-view-documents", "qname" : "cloudant:multiple-view-documents", "signature" : "($connection as anyURI, $database as string, $design-document as string, $view as string, $keys as string*, $options as object()) as object()", "description" : "

Lists the specified documents in a given view.

\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.

\n

This function allows to specify an additional options object.\n The following options are supported:\n

\n

\n

For example,\n

cloudant:multiple-view-documents($connection, \"db\", \"recipes\",\n   \"by_ingredient\", (\"claret\", \"clear apple juice\"),\n   {\"database-owner\": \"username\"})\n 
.\n

\n

An object with the following format is returned:\n

\n {\n   \"total_rows\" : 26484,\n   \"rows\" : [\n     {\n       \"value\" : [\"Scotch collops\"]],\n       \"id\" : \"Scotchcollops\",\n       \"key\" : \"claret\"\n     },\n     {\n       \"value\" : [\"Stand pie\"],\n       \"id\" : \"Standpie\",\n       \"key\" : \"clear apple juice\"\n     }\n   ],\n   \"offset\" : 6324\n }\n 
\n

\n

The fields have the following meaning:\n

\n

\n", "summary" : "

Lists the specified documents in a given view.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection", "type" : "anyURI", "occurrence" : null, "description" : "
A connection identifier
" }, { "name" : "database", "type" : "string", "occurrence" : null, "description" : "
A database name
" }, { "name" : "design-document", "type" : "string", "occurrence" : null, "description" : "
A design document name
" }, { "name" : "view", "type" : "string", "occurrence" : null, "description" : "
A view name
" }, { "name" : "keys", "type" : "string", "occurrence" : "*", "description" : "
The keys of the documents which must be retrieved
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
An object specifying additional request options
" } ], "returns" : { "type" : "object()", "description" : "An object listing all the specified documents in the specified view" }, "errors" : [ "cloudant:AUTHORIZATION Authorization error", "cloudant:HTTP An HTTP error occurred when issuing the request", "cloudant:RESPONSE An error occurred parsing the server response", "cloudant:CONNECTION The specified connection does not exist", "cloudant:INTERNAL Cloudant internal error", "cloudant:OPTIONS Malformed options object" ] } ], "variables" : [ ] }, "http://api.28.io/exportimport" : { "ns" : "http://api.28.io/exportimport", "description" : "", "sees" : [ ], "authors" : [ ], "version" : null, "encoding" : null, "namespaces" : [ { "uri" : "", "prefix" : "an" }, { "uri" : "http://api.28.io/collections", "prefix" : "cm" }, { "uri" : "http://api.28.io/exportimport", "prefix" : "exportimport" }, { "uri" : "http://zorba.io/modules/fetch", "prefix" : "fetch" }, { "uri" : "http://api.28.io/indices", "prefix" : "in" }, { "uri" : "http://www.28msec.com/modules/maps", "prefix" : "map" }, { "uri" : "http://www.28msec.com/modules/http/request", "prefix" : "req" }, { "uri" : "http://www.28msec.com/modules/http/response", "prefix" : "resp" }, { "uri" : "http://www.28msec.com/modules/store", "prefix" : "store" }, { "uri" : "http://api.28.io/validation", "prefix" : "validate" } ], "functions" : [ { "isDocumented" : false, "arity" : 1, "name" : "create-map", "qname" : "exportimport:create-map", "signature" : "($map as object())", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "map", "type" : "object()", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 0, "name" : "export", "qname" : "exportimport:export", "signature" : "()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 0, "name" : "import", "qname" : "exportimport:import", "signature" : "()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "import", "qname" : "exportimport:import", "signature" : "($import as object(), $overwrite as xs:boolean)", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "import", "type" : "object()", "occurrence" : null, "description" : "" }, { "name" : "overwrite", "type" : "xs:boolean", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "is-system-collection", "qname" : "exportimport:is-system-collection", "signature" : "($name as xs:string) as xs:boolean", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "validate-map", "qname" : "exportimport:validate-map", "signature" : "($map as object()) as empty-sequence()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "map", "type" : "object()", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "empty-sequence()", "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }, "http://jsoniq.org/errors" : { "ns" : "http://jsoniq.org/errors", "description" : " This module contains one variable declaration for each diagnostic of the\n http://jsoniq.org/errors namespace.\n The variables serves as documentation for the errors but can also\n be used in the code. For example, one useful scenario is to compare\n an error caught in the catch clause of a try-catch expression with one of\n the variables.\n", "sees" : [ ], "authors" : [ "Carlos Lopez" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://jsoniq.org/errors", "prefix" : "jerr" } ], "functions" : [ ], "variables" : [ { "name" : "jerr:JNSE0013", "type" : "xs:QName", "description" : "It is a dynamic error to serialize an atomic value not\n supported by JSON or a node with the JSON output method and with\n the jsoniq-serialization-extensions serialization parameter\n set to false.\n" }, { "name" : "jerr:JNDY0021", "type" : "xs:QName", "description" : "parser error raised by jn:parse-json\n" }, { "name" : "jerr:JNTY0021", "type" : "xs:QName", "description" : "array or object selector on heterogeneous sequence\n" }, { "name" : "jerr:JNTY0020", "type" : "xs:QName", "description" : "parser error for invalid option type\n" }, { "name" : "jerr:JNTY0024", "type" : "xs:QName", "description" : "objects or arrays don't have a string value\n" }, { "name" : "jerr:JNTY0023", "type" : "xs:QName", "description" : "It is a type error if the prefix is not a string or if the\n serialization parameters are not an element.\n" }, { "name" : "jerr:JNUP0019", "type" : "xs:QName", "description" : "It is a dynamic error if the content expression, in an object insert expression, does not evaluate to a sequence of objects.\n" }, { "name" : "jerr:JNTY0018", "type" : "xs:QName", "description" : "It is a dynamic error if there is not exactly one supplied parameter for an object or array selector.\n" }, { "name" : "jerr:JNUP0017", "type" : "xs:QName", "description" : " It is a dynamic error if the value in a replace expression is not exactly a single item.\n" }, { "name" : "jerr:JNUP0016", "type" : "xs:QName", "description" : "It is a dynamic error if it is attempted to create a replace, delete or rename update primitive with a selector that cannot be resolved against the target array or object.\n" }, { "name" : "jerr:JNSE0022", "type" : "xs:QName", "description" : "It is a dynamic error to serialize a sequence that does\n not exist of exactly one document node with XML, HTML, XHTML, Text.\n" }, { "name" : "jerr:JNSE0014", "type" : "xs:QName", "description" : "It is a dynamic error to serialize a function or a node with the\n JSON output method.\n" }, { "name" : "jerr:NS", "type" : "item()*", "description" : "" }, { "name" : "jerr:JNSE0012", "type" : "xs:QName", "description" : "It is a dynamic error to serialize a sequence of less\n or more than one item with the JSON output method if the\n jsoniq-serialization-multiple-items is set to no.\n" }, { "name" : "jerr:JNTY0011", "type" : "xs:QName", "description" : "It is a type error if the content sequence in a node constructor or in an XQUF insert or replace update expression contains an object or an array.\n" }, { "name" : "jerr:JNUP0010", "type" : "xs:QName", "description" : "It is a dynamic error if a pending update list contains two renaming update primitives on the same object and with the same selector.\n" }, { "name" : "jerr:JNUP0009", "type" : "xs:QName", "description" : "It is a dynamic error if a pending update list contains two replacing update primitives on the same object or array, and with the same selector.\n" }, { "name" : "jerr:JNUP0008", "type" : "xs:QName", "description" : "It is a dynamic error if the target of a deleting or replacing expression is not an array or an object.\n It is a dynamic error if the target of a renaming expression is not an object.\n It is a dynamic error if the target of an appending expression is not an array.\n It is a dynamic error if the target of a position-inserting expression is not an array.\n It is a dynamic error if the target of a non-position-inserting expression is not an object.\n" }, { "name" : "jerr:JNUP0007", "type" : "xs:QName", "description" : "It is a type error if, in an updating expression, an array selector cannot be cast to xs:integer or if an object selector cannot be cast to xs:string.\n" }, { "name" : "jerr:JNUP0006", "type" : "xs:QName", "description" : "It is a dynamic error if upd:applyUpdates causes an object to contain two pairs with the same name.\n" }, { "name" : "jerr:JNUP0005", "type" : "xs:QName", "description" : "It is a dynamic error if a pending update list contains two inserting update primitives on the same object and pair name.\n" }, { "name" : "jerr:JNTY0004", "type" : "xs:QName", "description" : "It is a type error to call fn:data on a sequence containing an array or an object.\n" }, { "name" : "jerr:JNDY0003", "type" : "xs:QName", "description" : "It is a dynamic error if two pairs in an object constructor or in a simple object union have the same name.\n" }, { "name" : "jerr:JNTY0002", "type" : "xs:QName", "description" : "It is a type error if the right-hand-side expression of a pair constructor does not return exactly one item.\n" } ] }, "http://zorba.io/modules/sctx" : { "ns" : "http://zorba.io/modules/sctx", "description" : " This module provides functions that gets components of the static context.\n", "sees" : [ "http://www.w3.org/TR/xquery/#id-xq-static-context-components" ], "authors" : [ "Nicolae Brinza" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/sctx", "prefix" : "sctx" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 0, "name" : "base-uri", "qname" : "sctx:base-uri", "signature" : "() as xs:string? external", "description" : " Gets the base URI.\n", "summary" : "

Gets the base URI.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string?", "description" : "The base URI." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "boundary-space-policy", "qname" : "sctx:boundary-space-policy", "signature" : "() as xs:string external", "description" : " Gets the boundary whitespace policy used by direct element constructors.\n", "summary" : "

Gets the boundary whitespace policy used by direct element constructors.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "Either preserve or strip." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "construction-mode", "qname" : "sctx:construction-mode", "signature" : "() as xs:string external", "description" : " Gets the static context construction mode of element and document nodes.\n", "summary" : "

Gets the static context construction mode of element and document nodes.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "Either preserve or strip." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "copy-namespaces-mode", "qname" : "sctx:copy-namespaces-mode", "signature" : "() as xs:string+ external", "description" : " Gets the static context components that control the the namespace bindings\n that are assigned when an existing element node is copied\n by an element constructor.\n", "summary" : "

Gets the static context components that control the the namespace bindings\n that are assigned when an existing element node is copied\n by an element constructor.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string+", "description" : "A sequence of two strings: the first is either preserve or no-preserve and the second is either inherit or no-inherit." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "default-collation", "qname" : "sctx:default-collation", "signature" : "() as xs:string external", "description" : " Gets one of statically known collations used by functions and operators\n for comparing and ordering values of type xs:string\n or xs:anyURI when no explicit collation is specified.\n", "summary" : "

Gets one of statically known collations used by functions and operators\n for comparing and ordering values of type xs:string \n or xs:anyURI when no explicit collation is specified.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "The collations that is used by default." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "default-collection-type", "qname" : "sctx:default-collection-type", "signature" : "() as xs:string external", "description" : " Gets the statically known default collection type.\n This is the type of the sequence of nodes that would result from calling the\n fn:collection function with no arguments.\n", "summary" : "

Gets the statically known default collection type.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "The type of the default collection." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "default-function-namespace", "qname" : "sctx:default-function-namespace", "signature" : "() as xs:string external", "description" : " Gets the URI of the default function namespace.\n", "summary" : "

Gets the URI of the default function namespace.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "The URI of the of the default function namespace." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "default-order", "qname" : "sctx:default-order", "signature" : "() as xs:string external", "description" : " Gets the component that controls the processing of empty sequences and NaN\n values as ordering keys in an order by clause\n in a FLWOR expression.\n", "summary" : "

Gets the component that controls the processing of empty sequences and NaN\n values as ordering keys in an order by clause\n in a FLWOR expression.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "Either greatest or least." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "function-annotations", "qname" : "sctx:function-annotations", "signature" : "($name as xs:QName, $arity as xs:integer) as xs:QName* external", "description" : " Gets the list of annotations declared for the given function.\n", "summary" : "

Gets the list of annotations declared for the given function.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the function.
" }, { "name" : "arity", "type" : "xs:integer", "occurrence" : null, "description" : "
The number of arguments the function takes.
" } ], "returns" : { "type" : "xs:QName*", "description" : "the list of annotations" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "function-arguments-count", "qname" : "sctx:function-arguments-count", "signature" : "($function as xs:QName) as xs:int* external", "description" : " Gets the number of arguments the given XQuery function takes.\n", "summary" : "

Gets the number of arguments the given XQuery function takes.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "function", "type" : "xs:QName", "occurrence" : null, "description" : "
A QName identifying a function.
" } ], "returns" : { "type" : "xs:int*", "description" : "Either a sequence of zero or more integers (one for each overloaded version of the given function) or an empty sequence if the function is not defined." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "function-names", "qname" : "sctx:function-names", "signature" : "() as xs:QName* external", "description" : " Gets a sequence containing the QNames of all defined functions\n that are available to be called from within an expression.\n", "summary" : "

Gets a sequence containing the QNames of all defined functions\n that are available to be called from within an expression.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:QName*", "description" : "A sequence for QNames identifying all functions." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "functions", "qname" : "sctx:functions", "signature" : "() as object()* external", "description" : " Gets a sequence of JSON objects containing the name, arity, and annotations\n of all defined functions that are available to be called form within an\n expression.\n", "summary" : "

Gets a sequence of JSON objects containing the name, arity, and annotations\n of all defined functions that are available to be called form within an\n expression.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()*", "description" : "A sequence of objects." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "in-scope-attribute-declarations", "qname" : "sctx:in-scope-attribute-declarations", "signature" : "() as xs:QName* external", "description" : " Gets a sequence of QNames identifying declared attributes\n in the imported schemas.\n", "summary" : "

Gets a sequence of QNames identifying declared attributes\n in the imported schemas.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:QName*", "description" : "A sequence of QNames, one for each attribute." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "in-scope-attribute-groups", "qname" : "sctx:in-scope-attribute-groups", "signature" : "() as xs:QName* external", "description" : " Gets a sequence of QNames identifying declared in-scope\n schema attribute groups.\n", "summary" : "

Gets a sequence of QNames identifying declared in-scope\n schema attribute groups.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:QName*", "description" : "A sequence of QNames, one for each attribute group." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "in-scope-element-declarations", "qname" : "sctx:in-scope-element-declarations", "signature" : "() as xs:QName* external", "description" : " Gets a sequence of QNames identifying declared elements\n in the imported schemas.\n", "summary" : "

Gets a sequence of QNames identifying declared elements\n in the imported schemas.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:QName*", "description" : "A sequence of QNames, one for each declared element." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "in-scope-element-groups", "qname" : "sctx:in-scope-element-groups", "signature" : "() as xs:QName* external", "description" : " Gets a sequence of QNames identifying declared in-scope\n schema element groups.\n", "summary" : "

Gets a sequence of QNames identifying declared in-scope\n schema element groups.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:QName*", "description" : "A sequence of QNames, one for each element group." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "in-scope-schema-types", "qname" : "sctx:in-scope-schema-types", "signature" : "() as xs:QName* external", "description" : " Gets a sequence of QNames identifying in-scope schema types\n including all the predefined schema types and all definitions\n found in imported schemas.\n", "summary" : "

Gets a sequence of QNames identifying in-scope schema types\n including all the predefined schema types and all definitions\n found in imported schemas.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:QName*", "description" : "A sequence of QNames, one for each defined type." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "in-scope-variables", "qname" : "sctx:in-scope-variables", "signature" : "() as xs:QName* external", "description" : " Gets a sequence of QNames identifying declared variables\n from the static context.\n", "summary" : "

Gets a sequence of QNames identifying declared variables\n from the static context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:QName*", "description" : "A sequence of QNames, one for each variable." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "option", "qname" : "sctx:option", "signature" : "($name as xs:QName) as xs:string? external", "description" : " Gets the value of an option that is declared in the prolog of the module.\n", "summary" : "

Gets the value of an option that is declared in the prolog of the module.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
the name of the option value to retrieve
" } ], "returns" : { "type" : "xs:string?", "description" : "the value of the option if contained in the static context or the empty sequence otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "ordering-mode", "qname" : "sctx:ordering-mode", "signature" : "() as xs:string external", "description" : " Gets the ordering mode that affects the ordering of the result sequences\n returned by certain expressions.\n", "summary" : "

Gets the ordering mode that affects the ordering of the result sequences\n returned by certain expressions.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "Either ordered or unordered." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "statically-known-collations", "qname" : "sctx:statically-known-collations", "signature" : "() as xs:anyURI* external", "description" : " Gets a sequence that contains the statically known collations.\n", "summary" : "

Gets a sequence that contains the statically known collations.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:anyURI*", "description" : "The sequence of collations." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "statically-known-document-type", "qname" : "sctx:statically-known-document-type", "signature" : "($document as xs:string) as xs:QName external", "description" : " For the given document, returns the static type of its root node.\n", "summary" : "

For the given document, returns the static type of its root node.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "document", "type" : "xs:string", "occurrence" : null, "description" : "
A URI of a document.
" } ], "returns" : { "type" : "xs:QName", "description" : "The static type of the given document." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "statically-known-documents", "qname" : "sctx:statically-known-documents", "signature" : "() as xs:anyURI* external", "description" : " Gets a sequence that contains the URIs of all statically known documents.\n", "summary" : "

Gets a sequence that contains the URIs of all statically known documents.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:anyURI*", "description" : "The sequence of document URIs." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "statically-known-namespace-binding", "qname" : "sctx:statically-known-namespace-binding", "signature" : "($prefix as xs:string) as xs:string? external", "description" : " Gets the bound URI for the given prefix.\n", "summary" : "

Gets the bound URI for the given prefix.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "prefix", "type" : "xs:string", "occurrence" : null, "description" : "
The prefix of the known namespace for which the bound URI is being requested.
" } ], "returns" : { "type" : "xs:string?", "description" : "The URI bound to the prefix is returned, or an empty sequence if the prefix is not known." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "statically-known-namespaces", "qname" : "sctx:statically-known-namespaces", "signature" : "() as xs:string* external", "description" : " Gets a list of known statically known namespaces as prefixes\n (fn, xml, xs, xsi, etc).\n", "summary" : "

Gets a list of known statically known namespaces as prefixes\n (fn, xml, xs, xsi, etc).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string*", "description" : "A sequence of xs:strings, one for each known namespace prefix." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "xpath10-compatibility-mode", "qname" : "sctx:xpath10-compatibility-mode", "signature" : "() as xs:boolean external", "description" : " Gets true or false depending on whether rules for compatibility\n with XPath 1.0 are in effect.\n XQuery set the value of this component to false.\n", "summary" : "

Gets true or false depending on whether rules for compatibility\n with XPath 1.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "The function should return false." }, "errors" : [ ] } ], "variables" : [ ] }, "http://xbrl.io/modules/bizql/profiles/sec/import" : { "ns" : "http://xbrl.io/modules/bizql/profiles/sec/import", "description" : "

This module provides functionality for querying XBRL Infosets of financial reports submitted to the SEC.\n

\n", "sees" : [ ], "authors" : [ "Charles Hoffman", "Matthias Brantner", "Dennis Knochenwefel", "Ghislain Fourny" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://xbrl.io/modules/bizql/archives", "prefix" : "archives" }, { "uri" : "http://www.28msec.com/modules/credentials", "prefix" : "credentials" }, { "uri" : "http://xbrl.io/modules/bizql/entities", "prefix" : "entities" }, { "uri" : "http://xbrl.io/modules/bizql/profiles/sec/import", "prefix" : "imp" }, { "uri" : "http://www.28msec.com/modules/mongodb", "prefix" : "m" }, { "uri" : "http://zorba.io/modules/string", "prefix" : "string" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "disclosure-for-network-label", "qname" : "imp:disclosure-for-network-label", "signature" : "($component as object()) as object()", "description" : "

\n Compute the disclore for a component's network label.\n

\n", "summary" : "

\n Compute the disclore for a component's network label.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "component", "type" : "object()", "occurrence" : null, "description" : "
the component
" } ], "returns" : { "type" : "object()", "description" : "returns the given component ammended with the disclosure" }, "errors" : [ ] } ], "variables" : [ { "name" : "imp:disclosure-matching", "type" : "object()", "description" : " Declarative description of the disclosure matching heuristics.\n" } ] }, "http://xbrl.io/modules/bizql/profiles/sec/core" : { "ns" : "http://xbrl.io/modules/bizql/profiles/sec/core", "description" : "

This module provides functionality for querying XBRL Models of financial reports submitted to the SEC.\n

\n

Standard $options Parameter

\n

Most functions in the BizQL package allow an additional $options\n parameter. The options parameter is a JSON object which is defined in the documentation\n of the facts module.

\n

In addition to the option fields defined in the\n facts module the following\n fields can be used in the options of a function in the SEC profile:

\n \n", "sees" : [ ], "authors" : [ "Charles Hoffman", "Matthias Brantner", "Dennis Knochenwefel", "Ghislain Fourny" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://xbrl.io/modules/bizql/archives", "prefix" : "archives" }, { "uri" : "http://xbrl.io/modules/bizql/concept-maps", "prefix" : "concept-maps" }, { "uri" : "http://www.28msec.com/modules/credentials", "prefix" : "credentials" }, { "uri" : "http://xbrl.io/modules/bizql/entities", "prefix" : "entities" }, { "uri" : "http://xbrl.io/modules/bizql/facts", "prefix" : "facts" }, { "uri" : "http://xbrl.io/modules/bizql/hypercubes", "prefix" : "hypercubes" }, { "uri" : "http://www.28msec.com/modules/mongodb", "prefix" : "m" }, { "uri" : "http://xbrl.io/modules/bizql/report-schemas", "prefix" : "report-schemas" }, { "uri" : "http://xbrl.io/modules/bizql/profiles/sec/core", "prefix" : "sec" }, { "uri" : "http://zorba.io/modules/string", "prefix" : "string" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "edgar-facts-for-archives", "qname" : "sec:edgar-facts-for-archives", "signature" : "($archive_or_ids as item()*) as object()*", "description" : "

Return all facts for concepts that are defined by one of the common\n edgar taxonomies. In particular, this function returns facts for concepts\n having one of the following prefixes:

\n \n", "summary" : "

Return all facts for concepts that are defined by one of the common\n edgar taxonomies.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archive_or_ids", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archive or archive IDs to filter.
" } ], "returns" : { "type" : "object()*", "description" : "all facts having one of the above prefixes." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "end-date", "qname" : "sec:end-date", "signature" : "($filing-fact-or-id as item()?) as xs:date?", "description" : "

Retrieves the document end date of a filing or a fact.

\n", "summary" : "

Retrieves the document end date of a filing or a fact.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "filing-fact-or-id", "type" : "item()", "occurrence" : "?", "description" : "
a filing, a fact, or its id.
" } ], "returns" : { "type" : "xs:date?", "description" : "the document end date (e.g., xs:date(\"2011-04-30\"))." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "extension-facts-for-archives", "qname" : "sec:extension-facts-for-archives", "signature" : "($archive_or_ids as item()*) as object()*", "description" : "

Return all facts for concepts that are NOT defined by one of the common\n edgar taxonomies. In particular, this function returns facts for concepts\n having none of the prefixes listed under function\n sec:edgar-facts-for-archives.

\n", "summary" : "

Return all facts for concepts that are NOT defined by one of the common\n edgar taxonomies.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archive_or_ids", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archive or archive IDs to filter.
" } ], "returns" : { "type" : "object()*", "description" : "all facts having none of the common edgar prefixes." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "fact-table-for-schema", "qname" : "sec:fact-table-for-schema", "signature" : "($schema as item(), $archives as item()*) as array()", "description" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.

\n", "summary" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "schema", "type" : "item()", "occurrence" : null, "description" : "
a report schema or its RID.
" }, { "name" : "archives", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their AIDs or $sec:ALL_OF_THEM for no filtering.
" } ], "returns" : { "type" : "array()", "description" : "a sequence of facts with populated dimension values." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "facts-for-archives-and-concepts", "qname" : "sec:facts-for-archives-and-concepts", "signature" : "($archive_or_ids as item()*, $concepts as item()*) as object()*", "description" : "

Retrieves the facts associated with the supplied concepts\n from the supplied archive, that match the fiscal focus of the archive.

\n", "summary" : "

Retrieves the facts associated with the supplied concepts\n from the supplied archive, that match the fiscal focus of the archive.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archive_or_ids", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their ids or $sec:ALL_OF_THEM for no filtering.
" }, { "name" : "concepts", "type" : "item()", "occurrence" : "*", "description" : "
the concepts or $sec:ALL_OF_THEM for no filtering.
" } ], "returns" : { "type" : "object()*", "description" : "the latest facts associated with the supplied concept." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "facts-for-archives-and-concepts", "qname" : "sec:facts-for-archives-and-concepts", "signature" : "($archive_or_ids as item()*, $concepts as item()*, $options as object()?) as object()*", "description" : "

Retrieves the facts associated with the supplied concepts\n from the supplied archive, that match the fiscal focus of the archive.

\n", "summary" : "

Retrieves the facts associated with the supplied concepts\n from the supplied archive, that match the fiscal focus of the archive.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archive_or_ids", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their ids or $sec:ALL_OF_THEM for no filtering.
" }, { "name" : "concepts", "type" : "item()", "occurrence" : "*", "description" : "
the concepts or $sec:ALL_OF_THEM for no filtering.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard SEC BizQL options.
" } ], "returns" : { "type" : "object()*", "description" : "the latest facts associated with the supplied concept." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "facts-for-schema", "qname" : "sec:facts-for-schema", "signature" : "($schema as item(), $archives as item()*) as item()*", "description" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema and to the fiscal focus, and populates\n them with the default dimension values when missing.

\n", "summary" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema and to the fiscal focus, and populates\n them with the default dimension values when missing.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "schema", "type" : "item()", "occurrence" : null, "description" : "
a schema.
" }, { "name" : "archives", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their AIDs or $sec:ALL_OF_THEM for no filtering.
" } ], "returns" : { "type" : "item()*", "description" : "a sequence of facts with populated dimension values." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "hide-amended-facts", "qname" : "sec:hide-amended-facts", "signature" : "($facts as object()*) as object()*", "description" : "

Filters a list of facts and returns only the latest amending facts.\n Accordingly, all amended facts are filtered out.

\n", "summary" : "

Filters a list of facts and returns only the latest amending facts.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "facts", "type" : "object()", "occurrence" : "*", "description" : "
a list of facts.
" } ], "returns" : { "type" : "object()*", "description" : "a sequence of facts without amended facts." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "populate-schema-with-facts", "qname" : "sec:populate-schema-with-facts", "signature" : "($schema as item(), $archives as item()*) as object()*", "description" : "

Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied schema. Default dimension values are added to the facts\n when missing.

\n", "summary" : "

Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied schema.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "schema", "type" : "item()", "occurrence" : null, "description" : "
a report schema or its RID.
" }, { "name" : "archives", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their AIDs.
" } ], "returns" : { "type" : "object()*", "description" : "a sequence of facts with populated dimension values." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "populate-schema-with-facts", "qname" : "sec:populate-schema-with-facts", "signature" : "($schema as item(), $archives as item()*, $options as object()?) as object()*", "description" : "

Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied schema. Default dimension values are added to the facts\n when missing.

\n", "summary" : "

Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied schema.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "schema", "type" : "item()", "occurrence" : null, "description" : "
a report schema or its RID.
" }, { "name" : "archives", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their AIDs or $sec:ALL_OF_THEM for no filtering.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard SEC BizQL options.
" } ], "returns" : { "type" : "object()*", "description" : "a sequence of facts with populated dimension values." }, "errors" : [ ] } ], "variables" : [ { "name" : "sec:CIK", "type" : "xs:string", "description" : " Scheme for the SEC entity identifiers (i.e. http://www.sec.gov/CIK)\n" }, { "name" : "sec:ALL_OF_THEM", "type" : "boolean", "description" : " Joker value for all archives or all concepts.\n" }, { "name" : "sec:EDGAR_PREFIXES", "type" : "item()*", "description" : " All prefixes pre-declared in SEC's EDGAR.\n" } ] }, "http://zorba.io/modules/excel/logical" : { "ns" : "http://zorba.io/modules/excel/logical", "description" : " This is a library module offering the same set of functions\n defined by Microsoft Excel, under Logical Functions.\n", "sees" : [ "Excel Documentation: Logical Functions" ], "authors" : [ "Sorin Nasoi" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/excel/errors", "prefix" : "excel-err" }, { "uri" : "http://zorba.io/modules/excel/logical", "prefix" : "excel-logical" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "and", "qname" : "excel-logical:and", "signature" : "($values as xs:anyAtomicType*) as xs:boolean", "description" : " Returns TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE.\n", "summary" : "

Returns TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "values", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequence of arguments.
" } ], "returns" : { "type" : "xs:boolean", "description" : "TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE." }, "errors" : [ "excel-err:Value provided sequence is empty." ] }, { "isDocumented" : true, "arity" : 2, "name" : "and", "qname" : "excel-logical:and", "signature" : "($arg1 as xs:anyAtomicType, $arg2 as xs:anyAtomicType) as xs:boolean", "description" : " Returns TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE.\n", "summary" : "

Returns TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the first argument.
" }, { "name" : "arg2", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the second argument.
" } ], "returns" : { "type" : "xs:boolean", "description" : "TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "if", "qname" : "excel-logical:if", "signature" : "($logical_test as xs:boolean, $value_if_true as item()*, $value_if_false as item()*) as item()*", "description" : " Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.\n", "summary" : "

Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "logical_test", "type" : "xs:boolean", "occurrence" : null, "description" : "
is any value or expression that can be evaluated to TRUE or FALSE.
" }, { "name" : "value_if_true", "type" : "item()", "occurrence" : "*", "description" : "
the value that is returned if logical_test is TRUE.
" }, { "name" : "value_if_false", "type" : "item()", "occurrence" : "*", "description" : "
the value that is returned if logical_test is FALSE.
" } ], "returns" : { "type" : "item()*", "description" : "One value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "or", "qname" : "excel-logical:or", "signature" : "($values as xs:anyAtomicType*) as xs:boolean", "description" : " Returns TRUE if any argument is TRUE; FALSE if all arguments are FALSE.\n", "summary" : "

Returns TRUE if any argument is TRUE; FALSE if all arguments are FALSE.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "values", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequence of arguments.
" } ], "returns" : { "type" : "xs:boolean", "description" : "TRUE if any argument is TRUE; FALSE if all arguments are FALSE." }, "errors" : [ "excel-err:Value provided sequence is empty." ] }, { "isDocumented" : true, "arity" : 2, "name" : "or", "qname" : "excel-logical:or", "signature" : "($arg1 as xs:anyAtomicType, $arg2 as xs:anyAtomicType) as xs:boolean", "description" : " Returns TRUE if any argument is TRUE; FALSE if all arguments are FALSE.\n", "summary" : "

Returns TRUE if any argument is TRUE; FALSE if all arguments are FALSE.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the first argument.
" }, { "name" : "arg2", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the second argument.
" } ], "returns" : { "type" : "xs:boolean", "description" : "TRUE if any argument is TRUE; FALSE if all arguments are FALSE." }, "errors" : [ ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/sequence" : { "ns" : "http://www.28msec.com/modules/sequence", "description" : " The sequence module allows you to generate consecutive\n application-unique xs:integer ids. This is required e.g. in accounting\n applications as some legislations require consecutive invoice numbers.\n", "sees" : [ ], "authors" : [ "28msec" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://zorba.io/modules/store/static/collections/dml", "prefix" : "cdml" }, { "uri" : "http://zorba.io/modules/store/static/indexes/dml", "prefix" : "idml" }, { "uri" : "http://www.28msec.com/modules/lock", "prefix" : "lock" }, { "uri" : "http://www.28msec.com/modules/sequence", "prefix" : "seq" }, { "uri" : "http://www.28msec.com/modules/sleep", "prefix" : "sleep" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "id", "qname" : "seq:id", "signature" : "($uri as xs:string) as xs:integer", "description" : " Returns a unique (sequentially incremented) id for the\n uri specified as parameter.\n Here the function is used to create consecutive invoice numbers:\n
\n if (order:fulfilled($order-id))\n then\n   {\n     variable $invoice-id := seq:id(\"invoice\");\n     invoice:create($invoice-id, $order-id);\n   }\n else\n   ...\n 
\n", "summary" : "

Returns a unique (sequentially incremented) id for the\n uri specified as parameter.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurrence" : null, "description" : "
The name of the sequence counter as uri.
" } ], "returns" : { "type" : "xs:integer", "description" : "A sequentially incremented id." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "reset", "qname" : "seq:reset", "signature" : "($uri as xs:string) as empty-sequence()", "description" : " Resets the unique (sequentially incremented) id generation\n for the uri specified as parameter.\n", "summary" : "

Resets the unique (sequentially incremented) id generation\n for the uri specified as parameter.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurrence" : null, "description" : "
The name of the sequence counter as uri.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "empty-sequence()" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "value", "qname" : "seq:value", "signature" : "($uri as xs:string) as xs:integer", "description" : " Returns the id for the uri specified as parameter without incrementing it.\n", "summary" : "

Returns the id for the uri specified as parameter without incrementing it.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurrence" : null, "description" : "
The name of the sequence counter as uri.
" } ], "returns" : { "type" : "xs:integer", "description" : "The current value" }, "errors" : [ "seq:not-found if no counter with the given $uri was found" ] } ], "variables" : [ { "name" : "seq:counters", "type" : "item()*", "description" : " The QName for the counters collection.\n" }, { "name" : "seq:counters-by-uri", "type" : "item()*", "description" : " The QName for the counters-by-uri collection.\n" } ] }, "http://api.28.io/databrowser" : { "ns" : "http://api.28.io/databrowser", "description" : "", "sees" : [ ], "authors" : [ ], "version" : null, "encoding" : null, "namespaces" : [ { "uri" : "", "prefix" : "an" }, { "uri" : "http://api.28.io/databrowser", "prefix" : "api" }, { "uri" : "http://zorba.io/modules/base64", "prefix" : "base64" }, { "uri" : "http://zorba.io/modules/store/static/collections/dml", "prefix" : "dml" }, { "uri" : "http://www.zorba-xquery.com/extensions", "prefix" : "ext" }, { "uri" : "http://www.functx.com", "prefix" : "functx" }, { "uri" : "http://expath.org/ns/http-client", "prefix" : "http" }, { "uri" : "http://www.zorba-xquery.com/modules/http-client", "prefix" : "http-client" }, { "uri" : "http://zorba.io/modules/xml-options", "prefix" : "opt" }, { "uri" : "http://www.28msec.com/modules/project", "prefix" : "project" }, { "uri" : "http://zorba.io/modules/reflection", "prefix" : "r" }, { "uri" : "http://zorba.io/modules/reference", "prefix" : "ref" }, { "uri" : "http://www.28msec.com/modules/http/request", "prefix" : "req" }, { "uri" : "http://www.28msec.com/modules/http/response", "prefix" : "res" }, { "uri" : "http://zorba.io/modules/xml", "prefix" : "xmlmod" }, { "uri" : "http://zorba.io/errors", "prefix" : "zerr" } ], "functions" : [ { "isDocumented" : false, "arity" : 1, "name" : "collection", "qname" : "api:collection", "signature" : "($name as xs:string)", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 0, "name" : "delete", "qname" : "api:delete", "signature" : "()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "dispatch", "qname" : "api:dispatch", "signature" : "()", "description" : " Data Browser API dispatched.\n Handles API authorization to the portal and dispatching.\n", "summary" : "

Data Browser API dispatched.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 0, "name" : "edit", "qname" : "api:edit", "signature" : "()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 0, "name" : "options", "qname" : "api:options", "signature" : "()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "run", "qname" : "api:run", "signature" : "($sequential as xs:boolean) as object()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "sequential", "type" : "xs:boolean", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "object()", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "serialize", "qname" : "api:serialize", "signature" : "($items as item()*) as object()", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "items", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "object()", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 0, "name" : "upload", "qname" : "api:upload", "signature" : "()", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }, "http://xbrl.io/modules/bizql/footnotes" : { "ns" : "http://xbrl.io/modules/bizql/footnotes", "description" : "

This module provides functions for retrieving XBRL footnotes\n (see section 4.11 Footnotes of the XBRL 2.1 specification).

\n", "sees" : [ ], "authors" : [ "Charles Hoffman", "Matthias Brantner", "Dennis Knochenwefel", "Ghislain Fourny" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://xbrl.io/modules/bizql/archives", "prefix" : "archives" }, { "uri" : "http://www.28msec.com/modules/credentials", "prefix" : "credentials" }, { "uri" : "http://xbrl.io/modules/bizql/entities", "prefix" : "entities" }, { "uri" : "http://xbrl.io/modules/bizql/facts", "prefix" : "facts" }, { "uri" : "http://xbrl.io/modules/bizql/footnotes", "prefix" : "footnotes" }, { "uri" : "http://www.28msec.com/modules/mongodb/types", "prefix" : "m" }, { "uri" : "http://www.28msec.com/modules/mongodb", "prefix" : "mongo" }, { "uri" : "http://zorba.io/modules/string", "prefix" : "string" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "fnid", "qname" : "footnotes:fnid", "signature" : "($footnote-or-id as item()) as atomic", "description" : "

Converts the input to a normalized footnote id (FNID). The input\n can be either an FNID, or a footnote object which contains an _id.

\n", "summary" : "

Converts the input to a normalized footnote id (FNID).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "footnote-or-id", "type" : "item()", "occurrence" : null, "description" : "
an footnote object or FNID.
" } ], "returns" : { "type" : "atomic", "description" : "the normalized FNID." }, "errors" : [ "footnotes:INVALID-PARAMETER if the FNID or footnote is not valid." ] }, { "isDocumented" : true, "arity" : 1, "name" : "footnotes-for-archives", "qname" : "footnotes:footnotes-for-archives", "signature" : "($archive-or-ids as item()*) as object()*", "description" : "

Return all footnotes reported within a given archive.

\n", "summary" : "

Return all footnotes reported within a given archive.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archive-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or AIDs to filter.
" } ], "returns" : { "type" : "object()*", "description" : "all footnotes reported in these archives." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "footnotes-for-facts", "qname" : "footnotes:footnotes-for-facts", "signature" : "($facts-or-ids as item()*) as object()*", "description" : "

Return all footnotes associated with the given facts.

\n", "summary" : "

Return all footnotes associated with the given facts.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "facts-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of facts or fact IDs to filter
" } ], "returns" : { "type" : "object()*", "description" : "all footnotes associated with these facts." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "footnotes-for-facts", "qname" : "footnotes:footnotes-for-facts", "signature" : "($facts-or-ids as item()*, $options as object()?) as object()*", "description" : "

Return all footnotes associated with the given facts.

\n", "summary" : "

Return all footnotes associated with the given facts.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "facts-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of facts or fact IDs to filter
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard fact retrieving options.
" } ], "returns" : { "type" : "object()*", "description" : "all footnotes associated with these facts." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "footnotes-search", "qname" : "footnotes:footnotes-search", "signature" : "($search as string) as object()*", "description" : "

Return all footnotes that match the given search term.

\n", "summary" : "

Return all footnotes that match the given search term.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "search", "type" : "string", "occurrence" : null, "description" : "
the search query
" } ], "returns" : { "type" : "object()*", "description" : "all footnotes matching the given search query" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "footnotes", "qname" : "footnotes:footnotes", "signature" : "() as object()*", "description" : "

Return all footnotes.

\n", "summary" : "

Return all footnotes.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()*", "description" : "all footnotes." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "footnotes", "qname" : "footnotes:footnotes", "signature" : "($footnote-or-ids as item()*) as object()?", "description" : "

Return the footnote with the given FNIDs.

\n", "summary" : "

Return the footnote with the given FNIDs.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "footnote-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
the FNIDs or the footnotes themselves.
" } ], "returns" : { "type" : "object()?", "description" : "the footnotes with the given FNIDs the empty sequence if no footnote was found or if the input is an empty sequence." }, "errors" : [ ] } ], "variables" : [ { "name" : "footnotes:col", "type" : "string", "description" : " Name of the collection the footnotes are stored in.\n" }, { "name" : "footnotes:ARCHIVE", "type" : "string", "description" : " Name of the field that points to the archive.\n" }, { "name" : "footnotes:FACTS", "type" : "string", "description" : " Name of the field that points to the facts linked to this footnote.\n" }, { "name" : "footnotes:LANG", "type" : "string", "description" : " Name of the field that holds the language attribute of the footnote.\n" } ] }, "http://zorba.io/modules/store/static/indexes/dml" : { "ns" : "http://zorba.io/modules/store/static/indexes/dml", "description" : " This module defines a set of functions to probe and refresh indexes which are\n declared in the prolog of a module.\n

\n This module is part of\n Zorba's XQuery Data Definition Facility.\n All the indexes managed by this module have to be pre-declared in the prolog\n of a library module.\n Please refer to the\n general documentation\n for more information and examples.\n", "sees" : [ "Data Lifecycle", "XQuery Data Definition Facility", "http://zorba.io/modules/store/static/indexes/ddl", "http://zorba.io/modules/store/static/collections/dml", "http://zorba.io/modules/store/static/collections/ddl", "http://zorba.io/modules/store/static/integrity-constraints/ddl", "http://zorba.io/modules/store/static/integrity-constraints/dml", "http://zorba.io/errors" ], "authors" : [ "Zorba Team" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://zorba.io/modules/store/static/indexes/dml", "prefix" : "idml" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/errors", "prefix" : "zerr" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "keys", "qname" : "idml:keys", "signature" : "($name as xs:QName) as node()* external", "description" : " Gets a sequence of all keys contained in the index with the given name.\n Each element has the following structure:\n

\n   <key xmlns=\"http://zorba.io/modules/store/static/indexes/dml\">\n     <attribute value=\"key1_value\"/>\n     <attribute value=\"key2_value\"/>\n     <attribute value=\"key3_value\"/>\n   </key>\n  
\n Note that the order of the attribute elements reflects the order of\n the keys in the index specification. Also note that the values in\n these attributes have the type that is declared in the corresponding\n index specification.\n", "summary" : "

Gets a sequence of all keys contained in the index with the given name.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the index to get the keys for.
" } ], "returns" : { "type" : "node()*", "description" : "A sequence of elements comprising the keys in the index." }, "errors" : [ "zerr:ZDDY0021 if the index was not declared.", "zerr:ZDDY0023 if the index does not exist." ] }, { "isDocumented" : true, "arity" : 2, "name" : "probe-index-point-general", "qname" : "idml:probe-index-point-general", "signature" : "($name as xs:QName, $key as xs:anyAtomicType*) as node()* external", "description" : " Gets from an index the domain nodes associated by general equality with a\n given search sequence .\n The search sequence consists of an arbitrary number of search keys\n where each search key is an atomic item.\n The function is supported by general indexes only.\n", "summary" : "

Gets from an index the domain nodes associated by general equality with a\n given search sequence .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the index to probe.
" }, { "name" : "key", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
The search sequence.
" } ], "returns" : { "type" : "node()*", "description" : "The set of domain nodes for which the following XQuery expression returns true:
 $keys = $node/keyExpr 
where keyExpr is the expression specified in the keyspec of the index (remember that for general indexes, there can be only one keyspec)." }, "errors" : [ "err:XPTY0004 if the search sequence contains a search key whose type does not match the sequence type specified in the keyspec of the index.", "zerr:ZDDY0021 if the index with name $name is not declared.", "zerr:ZDDY0023 if the index with name $name does not exist.", "zerr:ZDDY0029 if the index is not general." ] }, { "isDocumented" : true, "arity" : 3, "name" : "probe-index-point-value-skip", "qname" : "idml:probe-index-point-value-skip", "signature" : "($name as xs:QName, $skip as xs:integer, $key_i as xs:anyAtomicType?) as node()* external", "description" : " This is an extension of the probe-index-point-value() function\n in that it allows index items to be skipped.\n", "summary" : "

This is an extension of the probe-index-point-value() function\n in that it allows index items to be skipped.

", "annotation_str" : " %an:variadic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "variadic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the index to probe.
" }, { "name" : "skip", "type" : "xs:integer", "occurrence" : null, "description" : "
The number of index items to skip.
" }, { "name" : "key_i", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
The search keys used to probe the index with. The i-th search key corresponds to the i-th key expression in the index declaration.
" } ], "returns" : { "type" : "node()*", "description" : "The set of domain nodes that satisfy the search condition." }, "errors" : [ "zerr:ZDDY0021 if the index is not declared.", "zerr:ZDDY0023 if the index does not exist.", "zerr:ZDDY0025 if the number of search keys passed as arguments is not the same as the number of keys declared for the index.", "err:XPTY0004 if a non-empty seach key is given whose type does not match the sequence type specified in the corresponding keyspec." ] }, { "isDocumented" : true, "arity" : 2, "name" : "probe-index-point-value", "qname" : "idml:probe-index-point-value", "signature" : "($name as xs:QName, $key_i as xs:anyAtomicType?) as node()* external", "description" : " Gets the domain nodes from an index associated by value equality with a\n given search tuple.\n

\n The search tuple consists of a number of search keys where each\n search key is either an atomic item or the empty sequence. The number of\n search keys given must be equal to the number of keys declared for the\n index. Since the number of keys differs from one index to another, this\n function is variadic.\n", "summary" : "

Gets the domain nodes from an index associated by value equality with a\n given search tuple .

", "annotation_str" : " %an:variadic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "variadic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The of the index to probe.
" }, { "name" : "key_i", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
A search key used to probe the index with. The i-th search key corresponds to the i-th key expression in the index declaration.
" } ], "returns" : { "type" : "node()*", "description" : "The set of domain nodes for which the following XQuery expression returns true:
 $key1 eq $node/keyExpr1 and ... and $keyM eq $node/keyExprM 
where keyExpri is the expression specified in the i-th keyspec of the index." }, "errors" : [ "zerr:ZDDY0021 if the index is not declared.", "zerr:ZDDY0023 if the index does not exist.", "zerr:ZDDY0025 if the number of search keys passed as arguments is not the same as the number of keys declared for the index.", "err:XPTY0004 if a non-empty seach key is given whose type does not match the sequence type specified in the corresponding keyspec." ] }, { "isDocumented" : true, "arity" : 7, "name" : "probe-index-range-general", "qname" : "idml:probe-index-range-general", "signature" : "($name as xs:QName, $lowerBound as xs:anyAtomicType*, $upperBound as xs:anyAtomicType*, $haveLowerBound as xs:boolean, $haveUpperBound as xs:boolean, $lowerBoundIncluded as xs:boolean, $upperBoundIncluded as xs:boolean) as node()* external", "description" : " Gets the domain nodes associated by general order-comparison (operators\n <=, <, >=,\n >) with one or two search sequences.\n

\n Each search sequence consists of an arbitrary number of\n search keys where each search key is an atomic item.\n This method is supported by general range indexes only.\n Its result is either an error or the set of domain nodes for which the\n following XQuery expression returns true:\n

\n    if ( $haveLowerBound and $haveUpperBound ) then\n      $lowerBoundKeys lop $node/keyExpr and $node/keyExpr uop $upperBoundKeys\n    else if ( $haveLowerBound ) then\n      $lowerBoundKeys lop $node/keyExpr\n    else if ( $haveUpperBound ) then\n      $node/keyExpr uop $upperBoundKeys\n    else\n      fn:true()\n  
\n where keyExpr is the expression specified in the keyspec of the\n index, lop is either the <= or the <\n operator depending on whether $lowerBoundsIncluded is true or\n false, and uop is either the <= or the\n < operator depending on whether\n $upperBoundsIncluded is true or false.\n", "summary" : "

Gets the domain nodes associated by general order-comparison (operators\n <= , < , >= ,\n > ) with one or two search sequences .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The of the index to probe.
" }, { "name" : "lowerBound", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
The lower bound search sequence.
" }, { "name" : "upperBound", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
The upper bound search sequence.
" }, { "name" : "haveLowerBound", "type" : "xs:boolean", "occurrence" : null, "description" : "
Whether a lower bound search sequence exists or not.
" }, { "name" : "haveUpperBound", "type" : "xs:boolean", "occurrence" : null, "description" : "
Whether an upper bound search sequence exists or not.
" }, { "name" : "lowerBoundIncluded", "type" : "xs:boolean", "occurrence" : null, "description" : "
Whether to use the <= or the < operator when comparing a search key from $lowerBound with an index key.
" }, { "name" : "upperBoundIncluded", "type" : "xs:boolean", "occurrence" : null, "description" : "
Whether to use the <= or the < operator when comparing an index key with a search key from $upperBound.
" } ], "returns" : { "type" : "node()*", "description" : "The set of domain nodes that satisfy the search condition." }, "errors" : [ "zerr:ZDDY0021 if the index was not declared.", "zerr:ZDDY0023 if the index does not exist.", "zerr:ZDDY0030 if the index is not a general range index.", "err:XPTY0004 if $haveLowerBound is true and $lowerBoundKeys contains an atomic item whose type does not match the sequence type specified by the index keyspec, or $haveUpperBound is true and $upperBoundKeys contains an atomic item whose type does not match the sequence type specified by the index keyspec." ] }, { "isDocumented" : true, "arity" : 8, "name" : "probe-index-range-value-skip", "qname" : "idml:probe-index-range-value-skip", "signature" : "($name as xs:QName, $skip as xs:integer, $lowerBound-i as xs:anyAtomicType?, $upperBound-i as xs:anyAtomicType?, $haveLowerBound-i as xs:boolean, $haveUpperBound-i as xs:boolean, $lowerBoundIncluded-i as xs:boolean, $upperBoundIncluded-i as xs:boolean) as node()* external", "description" : " This function is an extension of the probe-index-range-value()\n function that index items to be skipped.\n", "summary" : "

This function is an extension of the probe-index-range-value() \n function that index items to be skipped.

", "annotation_str" : " %an:variadic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "variadic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The QName of the index to probe
" }, { "name" : "skip", "type" : "xs:integer", "occurrence" : null, "description" : "
The number of index items to skip.
" }, { "name" : "lowerBound-i", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
The lower bound in a range of key values.
" }, { "name" : "upperBound-i", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
The upper bound in a range of key values.
" }, { "name" : "haveLowerBound-i", "type" : "xs:boolean", "occurrence" : null, "description" : "
If false, then there is no lower bound, or equivalently, the lower bound is -INFINITY. Otherwise, the lower bound is the one given by the $lowerBound-i value.
" }, { "name" : "haveUpperBound-i", "type" : "xs:boolean", "occurrence" : null, "description" : "
If false, then there is no upper bound, or equivalently, the upper bound is +INFINITY. Otherwise, the upper bound is the one given by the $upperBound-i value.
" }, { "name" : "lowerBoundIncluded-i", "type" : "xs:boolean", "occurrence" : null, "description" : "
If false, then the range is open from below, i.e., the lowerBound-i value is not considered part of the range. Otherwise, the range is closed from below, i.e., the $lowerBound-i value is part of the range.
" }, { "name" : "upperBoundIncluded-i", "type" : "xs:boolean", "occurrence" : null, "description" : "
If false, then the range is open from above, i.e., the upperBound-i value is not considered part of the range. Otherwise, the range is closed from above, i.e., the $upperBound-i value is part of the range.
" } ], "returns" : { "type" : "node()*", "description" : "The set of domain nodes that satisfy the search condition." }, "errors" : [ "zerr:ZDDY0021 if the index with name $name is not declared.", "zerr:ZDDY0023 if the index with name $name does not exist.", "zerr:ZDDY0025 if the number of rangespecs passed as arguments is zero or greater than the number of keys declared for the index.", "zerr:ZDDY0026 if the index is not a range index.", "err:XPTY0004 if $haveLowerBound-i is true and $lowerBound-i is an atomic item whose type does not match the sequence type specified by the ith keyspec, or $haveUpperBound-i is true and $upperBound-i is an atomic item whose type does not match the sequence type specified by the ith keyspec.", "zerr:ZDDY0034 if (a) the index is general (in which case there is only one rangespac), (b) the index is untyped, (c) there is both a lower and an upper bound, and (d) if T1 and T2 are the types of the lower and upper bound, neither T1 is a subtype of T2 nor T2 is a subtype of T1." ] }, { "isDocumented" : true, "arity" : 7, "name" : "probe-index-range-value", "qname" : "idml:probe-index-range-value", "signature" : "($name as xs:QName, $lowerBound-i as xs:anyAtomicType?, $upperBound-i as xs:anyAtomicType?, $haveLowerBound-i as xs:boolean, $haveUpperBound-i as xs:boolean, $lowerBoundIncluded-i as xs:boolean, $upperBoundIncluded-i as xs:boolean) as node()* external", "description" : " Gets the domain nodes associated by value order-comparison (operators\n le, lt, ge, gt) with a\n given search box.\n

\n The search box is specified as a number M of rangespecs\n where each rangespec consists of six values.\n The number M must be greater than 0 and less than or equal to the\n number N of keyspecs found in the index declaration.\n If M < N, then the \"missing\" rangespecs are assumed to have\n the following value: [(), (), false, false, false, false].\n As a result, we can assume that M = N.\n Remember that for general indexes, there can be only one IndexKeySpec and,\n as a result for general indexes, M = N = 1.\n Since the number of keys differs from one index to another,\n this function is variadic.\n

\n The ith rangespec corresponds to the ith keyspec, and\n specifies a search condition on the key values that are produced by\n evaluating that keyspec for every domain node.\n Specifically, we define the ith rangespec result as the\n set of domain nodes for which the following XQuery expression returns\n true:\n

\n    if ( $haveLowerBound-i and $haveUpperBound-i ) then\n      $lowerBound-i lop $node/keyExpr-i and $node/keyExpr-i uop $upperBound-i\n    else if ( $haveLowerBound-i ) then\n      $lowerBound-i lop $node/keyExpr-i\n    else if ( $haveUpperBound-i ) then\n      $node/keyExpr-i uop $upperBound-i\n    else\n      fn:true()\n  
\n where keyExpr-i is the expression specified by the ith\n keyspec of the index, lop is either the le or the\n lt operator depending on whether\n $lowerBoundsIncluded-i is true or false, and uop is\n either the le or the lt operator depending on whether\n $upperBoundsIncluded-i is true or false.\n", "summary" : "

Gets the domain nodes associated by value order-comparison (operators\n le , lt , ge , gt ) with a\n given search box .

", "annotation_str" : " %an:variadic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "variadic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the index to probe.
" }, { "name" : "lowerBound-i", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
The lower bound in a range of key values.
" }, { "name" : "upperBound-i", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
The upper bound in a range of key values.
" }, { "name" : "haveLowerBound-i", "type" : "xs:boolean", "occurrence" : null, "description" : "
If false, then there is no lower bound, or equivalently, the lower bound is -INFINITY. Otherwise, the lower bound is the one given by the $lowerBound-i value.
" }, { "name" : "haveUpperBound-i", "type" : "xs:boolean", "occurrence" : null, "description" : "
If false, then there is no upper bound, or equivalently, the upper bound is +INFINITY. Otherwise, the upper bound is the one given by the $upperBound-i value.
" }, { "name" : "lowerBoundIncluded-i", "type" : "xs:boolean", "occurrence" : null, "description" : "
If false, then the range is open from below, i.e., the $lowerBound-i value is not considered part of the range. Otherwise, the range is closed from below, i.e., the $lowerBound-i value is part of the range.
" }, { "name" : "upperBoundIncluded-i", "type" : "xs:boolean", "occurrence" : null, "description" : "
If false, then the range is open from above, i.e., the $upperBound-i value is not considered part of the range. Otherwise, the range is closed from above, i.e., the $upperBound-i value is part of the range.
" } ], "returns" : { "type" : "node()*", "description" : "The intersection of all the rangespec results." }, "errors" : [ "zerr:ZDDY0021 if the index is not declared.", "zerr:ZDDY0023 if the index does not exist.", "zerr:ZDDY0025 if the number of rangespecs passed as arguments is zero or greater than the number of keys declared for the index.", "zerr:ZDDY0026 if the index is not a range index.", "err:XPTY0004 if $haveLowerBound-i is true and $lowerBound-i is an atomic item whose type does not match the sequence type specified by the ith keyspec, or $haveUpperBound-i is true and $upperBound-i is an atomic item whose type does not match the sequence type specified by the ith keyspec.", "zerr:ZDDY0034 if (a) the index is general (in which case there is only one rangespac), (b) the index is untyped, (c) there is both a lower and an upper bound, and (d) if T1 and T2 are the types of the lower and upper bound, neither T1 is a subtype of T2 nor T2 is a subtype of T1." ] }, { "isDocumented" : true, "arity" : 1, "name" : "refresh-index", "qname" : "idml:refresh-index", "signature" : "($name as xs:QName) external", "description" : " Updates the index with the given name. Note that if the maintenance\n property of the index is automatic, this function does nothing.\n", "summary" : "

Updates the index with the given name.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the index to refresh.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, when applied, refreshes the contents of the index." }, "errors" : [ "zerr:ZDDY0021 if the index is not declared.", "zerr:ZDDY0023 if the index does not exist." ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/full-text" : { "ns" : "http://www.28msec.com/modules/full-text", "description" : " This module provides an API to full-text functions such as tokenization,\n stemming, or stop word detection. The default language is set to english\n for all functions that don't take an explicit language parameter.\n

Notes on stemming

\n The stem() functions return the\n stem\n of a word.\n On 28.io,\n the stem of a word itself, however, is not guaranteed to be a word.\n It is best to consider a stem as an opaque byte sequence.\n All that is guaranteed about a stem is that,\n for a given word,\n the stem of that word will always be the same byte sequence.\n Hence,\n you sould never compare the result of one of the stem()\n functions against a non-stemmed string,\n for example:\n
\n  if ( ft:stem( \"apples\" ) eq \"apple\" )             ** WRONG **\n 
\n Instead do:\n
\n  if ( ft:stem( \"apples\" ) eq ft:stem( \"apple\" ) )  ** CORRECT **\n 
\n

Notes on the thesaurus

\n 28msec uses the\n WordNet lexical database version 3.0,\n In WordNet, the number of \"levels\" that two phrases are apart\n are how many hierarchical meanings apart they are.\n For example,\n \"canary\" is 5 levels away from \"vertebrate\"\n (carary > finch > oscine > passerine > bird > vertebrate).\n

\n When using the WordNet implementation,\n 28msec supports all of the relationships (and their abbreviations)\n specified by\n ISO 2788\n and\n ANSI/NISO Z39.19-2005\n with the exceptions of \"HN\" (history note)\n and \"X SN\" (see scope note for).\n These relationships are:\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Rel.MeaningWordNet Rel.
BTbroader termhypernym
BTGbroader term generichypernym
BTIbroader term instanceinstance hypernym
BTPbroader term partitivepart meronym
NTnarrower termhyponym
NTGnarrower term generichyponym
NTInarrower term instanceinstance hyponym
NTPnarrower term partitivepart holonym
RTrelated termalso see
SNscope noten/a
TTtop termhypernym
UFnon-preferred termn/a
USEpreferred termn/a
\n Note that you can specify relationships\n either by their abbreviation\n or their meaning.\n Relationships are case-insensitive.\n In addition to the\n ISO 2788\n and\n ANSI/NISO Z39.19-2005\n relationships,\n 28msec also supports all of the relationships offered by WordNet.\n These relationships are:\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
RelationshipMeaning
also see\n A word that is related to another,\n e.g., for \"varnished\" (furniture)\n one should also see \"finished.\"\n
antonym\n A word opposite in meaning to another,\n e.g., \"light\" is an antonym for \"heavy.\"\n
attribute\n A noun for which adjectives express values,\n e.g., \"weight\" is an attribute\n for which the adjectives \"light\" and \"heavy\"\n express values.\n
cause\n A verb that causes another,\n e.g., \"show\" is a cause of \"see.\"\n
derivationally related form\n A word that is derived from a root word,\n e.g., \"metric\" is a derivationally related form of \"meter.\"\n
derived from adjective\n An adverb that is derived from an adjective,\n e.g., \"correctly\" is derived from the adjective \"correct.\"\n
entailment\n A verb that presupposes another,\n e.g., \"snoring\" entails \"sleeping.\"\n
hypernym\n A word with a broad meaning that more specific words fall under,\n e.g., \"meal\" is a hypernym of \"breakfast.\"\n
hyponym\n A word of more specific meaning than a general term applicable to it,\n e.g., \"breakfast\" is a hyponym of \"meal.\"\n
instance hypernym\n A word that denotes a category of some specific instance,\n e.g., \"author\" is an instance hypernym of \"Asimov.\"\n
instance hyponym\n A term that donotes a specific instance of some general category,\n e.g., \"Asimov\" is an instance hyponym of \"author.\"\n
member holonym\n A word that denotes a collection of individuals,\n e.g., \"faculty\" is a member holonym of \"professor.\"\n
member meronym\n A word that denotes a member of a larger group,\n e.g., a \"person\" is a member meronym of a \"crowd.\"\n
part holonym\n A word that denotes a larger whole comprised of some part,\n e.g., \"car\" is a part holonym of \"engine.\"\n
part meronym\n A word that denotes a part of a larger whole,\n e.g., an \"engine\" is part meronym of a \"car.\"\n
participle of verb\n An adjective that is the participle of some verb,\n e.g., \"breaking\" is the participle of the verb \"break.\"\n
pertainym\n An adjective that classifies its noun,\n e.g., \"musical\" is a pertainym in \"musical instrument.\"\n
similar to\n Similar, though not necessarily interchangeable, adjectives.\n For example, \"shiny\" is similar to \"bright\",\n but they have subtle differences.\n
substance holonym\n A word that denotes a larger whole containing some constituent\n substance, e.g., \"bread\" is a substance holonym of \"flour.\"\n
substance meronym\n A word that denotes a constituant substance of some larger whole,\n e.g., \"flour\" is a substance meronym of \"bread.\"\n
verb group\n A verb that is a member of a group of similar verbs,\n e.g., \"live\" is in the verb group\n of \"dwell\", \"live\", \"inhabit\", etc.\n
\n", "sees" : [ ], "authors" : [ "Paul J. Lucas" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.w3.org/2005/xqt-errors", "prefix" : "err" }, { "uri" : "http://www.28msec.com/modules/full-text", "prefix" : "ft" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/errors", "prefix" : "zerr" }, { "uri" : "http://zorba.io/modules/full-text", "prefix" : "zft" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "is-stem-lang-supported", "qname" : "ft:is-stem-lang-supported", "signature" : "($lang as language) as boolean", "description" : " Checks whether the given language is supported for stemming.\n", "summary" : "

Checks whether the given language is supported for stemming.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lang", "type" : "language", "occurrence" : null, "description" : "
The language to check.
" } ], "returns" : { "type" : "boolean", "description" : "true only if the language is supported." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-stop-word-lang-supported", "qname" : "ft:is-stop-word-lang-supported", "signature" : "($lang as language) as boolean", "description" : " Checks whether the given language\n is supported for stop words.\n", "summary" : "

Checks whether the given language\n is supported for stop words.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lang", "type" : "language", "occurrence" : null, "description" : "
The language to check.
" } ], "returns" : { "type" : "boolean", "description" : "true only if the language is supported." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-stop-word", "qname" : "ft:is-stop-word", "signature" : "($word as string) as boolean", "description" : " Checks whether the given word is a stop-word.\n", "summary" : "

Checks whether the given word is a stop-word.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "word", "type" : "string", "occurrence" : null, "description" : "
The word to check. The word's language is assumed to be the one returned by ft:current-lang().
" } ], "returns" : { "type" : "boolean", "description" : "true only if $word is a stop-word." }, "errors" : [ "err:FTST0009 if ft:current-lang() is not supported." ] }, { "isDocumented" : true, "arity" : 2, "name" : "is-stop-word", "qname" : "ft:is-stop-word", "signature" : "($word as string, $lang as language) as boolean", "description" : " Checks whether the given word is a stop-word.\n", "summary" : "

Checks whether the given word is a stop-word.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "word", "type" : "string", "occurrence" : null, "description" : "
The word to check.
" }, { "name" : "lang", "type" : "language", "occurrence" : null, "description" : "
The language of $word.
" } ], "returns" : { "type" : "boolean", "description" : "true only if $word is a stop-word." }, "errors" : [ "err:FTST0009 if $lang is not supported." ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-thesaurus-lang-supported", "qname" : "ft:is-thesaurus-lang-supported", "signature" : "($lang as language) as boolean", "description" : " Checks whether the given language\n is supported for look-up using the Wordnet thesaurus.\n", "summary" : "

Checks whether the given language\n is supported for look-up using the Wordnet thesaurus.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lang", "type" : "language", "occurrence" : null, "description" : "
The language to check.
" } ], "returns" : { "type" : "boolean", "description" : "true only if the language is supported." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-tokenizer-lang-supported", "qname" : "ft:is-tokenizer-lang-supported", "signature" : "($lang as language) as boolean", "description" : " Checks whether the given language\n is supported for tokenization.\n", "summary" : "

Checks whether the given language\n is supported for tokenization.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lang", "type" : "language", "occurrence" : null, "description" : "
The language to check.
" } ], "returns" : { "type" : "boolean", "description" : "true only if the language is supported." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "stem", "qname" : "ft:stem", "signature" : "($word as string) as string", "description" : " Stems the given word.\n", "summary" : "

Stems the given word.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "word", "type" : "string", "occurrence" : null, "description" : "
The word to stem. The word's language is assumed to be the one returned by ft:current-lang().
" } ], "returns" : { "type" : "string", "description" : "the stem of $word." }, "errors" : [ "err:FTST0009 if ft:current-lang() is not supported." ] }, { "isDocumented" : true, "arity" : 2, "name" : "stem", "qname" : "ft:stem", "signature" : "($word as string, $lang as language) as string", "description" : " Stems the given word.\n", "summary" : "

Stems the given word.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "word", "type" : "string", "occurrence" : null, "description" : "
The word to stem.
" }, { "name" : "lang", "type" : "language", "occurrence" : null, "description" : "
The language of $word.
" } ], "returns" : { "type" : "string", "description" : "the stem of $word." }, "errors" : [ "err:FTST0009 if $lang is not supported." ] }, { "isDocumented" : true, "arity" : 1, "name" : "strip-diacritics", "qname" : "ft:strip-diacritics", "signature" : "($string as string) as string", "description" : " Strips all diacritical marks from all characters.\n", "summary" : "

Strips all diacritical marks from all characters.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "string", "type" : "string", "occurrence" : null, "description" : "
The string to strip diacritical marks from.
" } ], "returns" : { "type" : "string", "description" : "$string with diacritical marks stripped." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "thesaurus-lookup", "qname" : "ft:thesaurus-lookup", "signature" : "($phrase as string) as string*", "description" : " Looks-up the given phrase in the Wordnet thesaurus.\n", "summary" : "

Looks-up the given phrase in the Wordnet thesaurus.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "phrase", "type" : "string", "occurrence" : null, "description" : "
The phrase to look up.
" } ], "returns" : { "type" : "string*", "description" : "the related phrases if $phrase is found in the thesaurus or the empty sequence if not." }, "errors" : [ "err:FTST0009 if ft:current-lang() is not supported.", "zerr:ZXQP8401 if the thesaurus data file's version is not supported by the currently running version of Zorba.", "zerr:ZXQP8402 if the thesaurus data file's endianness does not match that of the CPU on which Zorba is currently running.", "zerr:ZXQP8403 if there was an error reading the thesaurus data." ] }, { "isDocumented" : true, "arity" : 2, "name" : "thesaurus-lookup", "qname" : "ft:thesaurus-lookup", "signature" : "($phrase as string, $relationship as string) as string*", "description" : " Looks-up the given phrase in a thesaurus.\n", "summary" : "

Looks-up the given phrase in a thesaurus.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "phrase", "type" : "string", "occurrence" : null, "description" : "
The phrase to look up.
" }, { "name" : "relationship", "type" : "string", "occurrence" : null, "description" : "
The relationship the results are to have to $phrase.
" } ], "returns" : { "type" : "string*", "description" : "the related phrases if $phrase is found in the thesaurus or the empty sequence if not." }, "errors" : [ "err:FTST0018 if $uri refers to a thesaurus that is not found in the statically known thesauri.", "err:FTST0009 if $lang is not supported.", "zerr:ZOSE0001 if the thesaurus data file could not be found.", "zerr:ZOSE0002 if the thesaurus data file is not a plain file.", "zerr:ZXQP8401 if the thesaurus data file's version is not supported by the currently running version of Zorba.", "zerr:ZXQP8402 if the thesaurus data file's endianness does not match that of the CPU on which Zorba is currently running.", "zerr:ZXQP8403 if there was an error reading the thesaurus data file." ] }, { "isDocumented" : true, "arity" : 4, "name" : "thesaurus-lookup", "qname" : "ft:thesaurus-lookup", "signature" : "($phrase as string, $relationship as string, $level-least as integer, $level-most as integer) as string*", "description" : " Looks-up the given phrase in a thesaurus.\n", "summary" : "

Looks-up the given phrase in a thesaurus.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "phrase", "type" : "string", "occurrence" : null, "description" : "
The phrase to look up.
" }, { "name" : "relationship", "type" : "string", "occurrence" : null, "description" : "
The relationship the results are to have to $phrase.
" }, { "name" : "level-least", "type" : "integer", "occurrence" : null, "description" : "
The minimum number of levels within the thesaurus to be traversed.
" }, { "name" : "level-most", "type" : "integer", "occurrence" : null, "description" : "
The maximum number of levels within the thesaurus to be traversed.
" } ], "returns" : { "type" : "string*", "description" : "the related phrases if $phrase is found in the thesaurus or the empty sequence if not." }, "errors" : [ "err:FOCA0003 if either $level-least or $level-most is either negative or too large.", "err:FTST0018 if $uri refers to a thesaurus that is not found in the statically known thesauri.", "err:FTST0009 if $lang is not supported.", "zerr:ZOSE0001 if the thesaurus data file could not be found.", "zerr:ZOSE0002 if the thesaurus data file is not a plain file.", "zerr:ZXQP8401 if the thesaurus data file's version is not supported by the currently running version of Zorba.", "zerr:ZXQP8402 if the thesaurus data file's endianness does not match that of the CPU on which Zorba is currently running.", "zerr:ZXQP8403 if there was an error reading the thesaurus data file." ] }, { "isDocumented" : true, "arity" : 1, "name" : "tokenize", "qname" : "ft:tokenize", "signature" : "($string as string) as string*", "description" : " Tokenizes the given string.\n", "summary" : "

Tokenizes the given string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "string", "type" : "string", "occurrence" : null, "description" : "
The string to tokenize. The string's language is assumed to be the one returned by ft:current-lang().
" } ], "returns" : { "type" : "string*", "description" : "a (possibly empty) sequence of tokens." }, "errors" : [ "err:FTST0009 if ft:current-lang() is not supported." ] }, { "isDocumented" : true, "arity" : 2, "name" : "tokenize", "qname" : "ft:tokenize", "signature" : "($string as string, $lang as language) as string*", "description" : " Tokenizes the given string.\n", "summary" : "

Tokenizes the given string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "string", "type" : "string", "occurrence" : null, "description" : "
The string to tokenize.
" }, { "name" : "lang", "type" : "language", "occurrence" : null, "description" : "
The language of $string.
" } ], "returns" : { "type" : "string*", "description" : "a (possibly empty) sequence of tokens." }, "errors" : [ "err:FTST0009 if $lang is not supported." ] } ], "variables" : [ { "name" : "ft:lang-da", "type" : "language", "description" : " Predeclared constant for the Danish language.\n" }, { "name" : "ft:lang-de", "type" : "language", "description" : " Predeclared constant for the German language.\n" }, { "name" : "ft:lang-en", "type" : "language", "description" : " Predeclared constant for the English language.\n" }, { "name" : "ft:lang-es", "type" : "language", "description" : " Predeclared constant for the Spanish language.\n" }, { "name" : "ft:lang-fi", "type" : "language", "description" : " Predeclared constant for the Finnish language.\n" }, { "name" : "ft:lang-fr", "type" : "language", "description" : " Predeclared constant for the French language.\n" }, { "name" : "ft:lang-hu", "type" : "language", "description" : " Predeclared constant for the Hungarian language.\n" }, { "name" : "ft:lang-it", "type" : "language", "description" : " Predeclared constant for the Italian language.\n" }, { "name" : "ft:lang-nl", "type" : "language", "description" : " Predeclared constant for the Dutch language.\n" }, { "name" : "ft:lang-no", "type" : "language", "description" : " Predeclared constant for the Norwegian language.\n" }, { "name" : "ft:lang-pt", "type" : "language", "description" : " Predeclared constant for the Portuguese language.\n" }, { "name" : "ft:lang-ro", "type" : "language", "description" : " Predeclared constant for the Romanian language.\n" }, { "name" : "ft:lang-ru", "type" : "language", "description" : " Predeclared constant for the Russian language.\n" }, { "name" : "ft:lang-sv", "type" : "language", "description" : " Predeclared constant for the Swedish language.\n" }, { "name" : "ft:lang-tr", "type" : "language", "description" : " Predeclared constant for the Turkish language.\n" } ] }, "http://xbrl.io/modules/bizql/report-schemas" : { "ns" : "http://xbrl.io/modules/bizql/report-schemas", "description" : "

This module provides functions for storing, retrieving, and modifying\n report schemas. Report schemas can be used in BizQL queries. They can be\n instantiated generating a business report.

\n

Report schemas are nothing else than a user-defined component. However,\n one of their hypercubes (the default hypercube), as well as two of their\n networks (presentation, concept-map) are special. A report schema is identified\n with an RID (Report schema ID).

\n

With this module, you can retrieve facts from an archive according to a report\n schema. You can retrieve them as a (2D) fact table, or populate the presentation\n network of the report schema with them. The concept map network will be used\n by default to map the report schema concepts to reported concepts.

\n

Report schemas are stored in the collection reportschemas in\n the project's MongoDB database.

\n

A report schema needs to be a syntactically valid JSound document.

\n", "sees" : [ ], "authors" : [ "Charles Hoffman", "Matthias Brantner", "Dennis Knochenwefel", "Ghislain Fourny" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "", "prefix" : "an" }, { "uri" : "http://xbrl.io/modules/bizql/hypercubes", "prefix" : "hypercubes" }, { "uri" : "http://xbrl.io/modules/bizql/networks", "prefix" : "networks" }, { "uri" : "http://xbrl.io/modules/bizql/report-schemas", "prefix" : "report-schemas" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "add", "qname" : "report-schemas:add", "signature" : "($report-schema as object()) as empty-sequence()", "description" : "

Adds the given report schema to the database.

\n", "summary" : "

Adds the given report schema to the database.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "report-schema", "type" : "object()", "occurrence" : null, "description" : "
the report schema to add.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the empty sequence." }, "errors" : [ "report-schemas:INVALID-SCHEMA if the given report schema object does not contain a name field", "report-schemas:EXISTS if a report schema with the given name already exists" ] }, { "isDocumented" : true, "arity" : 1, "name" : "delete", "qname" : "report-schemas:delete", "signature" : "($report-schema-or-id as item()) as empty-sequence()", "description" : "

Deletes a report schema from the database.

\n", "summary" : "

Deletes a report schema from the database.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "report-schema-or-id", "type" : "item()", "occurrence" : null, "description" : "
the report schema to delete or its RID.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the empty sequence." }, "errors" : [ "report-schemas:DOES-NOT-EXIST if no report schema with the given RID exists." ] }, { "isDocumented" : true, "arity" : 2, "name" : "fact-table", "qname" : "report-schemas:fact-table", "signature" : "($schema as item(), $archives as item()*) as array()", "description" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.

\n", "summary" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "schema", "type" : "item()", "occurrence" : null, "description" : "
a schema or its RID,
" }, { "name" : "archives", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their AIDs.
" } ], "returns" : { "type" : "array()", "description" : "a sequence of facts with populated dimension values." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "fact-table", "qname" : "report-schemas:fact-table", "signature" : "($schema as item(), $archives as item()*, $options as object()?) as array()", "description" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.

\n", "summary" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "schema", "type" : "item()", "occurrence" : null, "description" : "
a schema or its RID,
" }, { "name" : "archives", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their AIDs or $report-schemas:ALL_ARCHIVES for no filtering.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard fact retrieving options.
" } ], "returns" : { "type" : "array()", "description" : "a sequence of facts with populated dimension values." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "facts", "qname" : "report-schemas:facts", "signature" : "($schema as item(), $archives as item()*) as object()*", "description" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.

\n", "summary" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "schema", "type" : "item()", "occurrence" : null, "description" : "
a report schema or its RID,
" }, { "name" : "archives", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their AIDs or $report-schemas:ALL_ARCHIVES for no filtering.
" } ], "returns" : { "type" : "object()*", "description" : "a sequence of facts with populated dimension values." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "facts", "qname" : "report-schemas:facts", "signature" : "($schema as item(), $archives as item()*, $options as object()?) as object()*", "description" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.

\n", "summary" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "schema", "type" : "item()", "occurrence" : null, "description" : "
a report schema or its RID,
" }, { "name" : "archives", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their AIDs or $report-schemas:ALL_ARCHIVES for no filtering.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard fact retrieving options.
" } ], "returns" : { "type" : "object()*", "description" : "a sequence of facts with populated dimension values." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "populate-with-facts", "qname" : "report-schemas:populate-with-facts", "signature" : "($schema as item(), $archives as item()*) as object()*", "description" : "

Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied schema. Default dimension values are added to the facts\n when missing.

\n", "summary" : "

Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied schema.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "schema", "type" : "item()", "occurrence" : null, "description" : "
.
" }, { "name" : "archives", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their AIDs or $report-schemas:ALL_ARCHIVES for no filtering.
" } ], "returns" : { "type" : "object()*", "description" : "a sequence of facts with populated dimension values." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "populate-with-facts", "qname" : "report-schemas:populate-with-facts", "signature" : "($schema as item(), $archives as item()*, $options as object()?) as object()*", "description" : "

Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied schema. Default dimension values are added to the facts\n when missing.

\n", "summary" : "

Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied schema.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "schema", "type" : "item()", "occurrence" : null, "description" : "
.
" }, { "name" : "archives", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their AIDs or $report-schemas:ALL_ARCHIVES for no filtering.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard fact retrieving options.
" } ], "returns" : { "type" : "object()*", "description" : "a sequence of facts with populated dimension values." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "report-schemas", "qname" : "report-schemas:report-schemas", "signature" : "() as object()*", "description" : "

Retrieves all report schemas.

\n", "summary" : "

Retrieves all report schemas.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()*", "description" : "all report schemas." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "report-schemas", "qname" : "report-schemas:report-schemas", "signature" : "($report-schemas-or-ids as item()*) as object()*", "description" : "

Return the report schemas with the given names (RIDs).

\n", "summary" : "

Return the report schemas with the given names (RIDs).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "report-schemas-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
the ids of the report schemas (RIDs) or the report schemas themselves.
" } ], "returns" : { "type" : "object()*", "description" : "the report schemas with the given RIDs or the empty sequence if no report schema was found or the input is an empty sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "rid", "qname" : "report-schemas:rid", "signature" : "($report-schema-or-id as item()) as atomic", "description" : "

Converts the input to a normalized report schema identifier (RID). The input\n can be either a pure RID, or a report schema object which contains an RID.

\n", "summary" : "

Converts the input to a normalized report schema identifier (RID).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "report-schema-or-id", "type" : "item()", "occurrence" : null, "description" : "
a report schema identifier (RID)) or a report schema object.
" } ], "returns" : { "type" : "atomic", "description" : "the normalized RID." }, "errors" : [ "report-schemas:INVALID_PARAMETER if the RID or report schema is not valid" ] }, { "isDocumented" : true, "arity" : 1, "name" : "update", "qname" : "report-schemas:update", "signature" : "($report-schema as object()) as empty-sequence()", "description" : "

Updates a report schema.

\n

Replaces a report schema in the database with the given schema.\n The schema to be replaced is identified by the value of the _id\n field of the given schema (RID).

\n", "summary" : "

Updates a report schema.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "report-schema", "type" : "object()", "occurrence" : null, "description" : "
the new report schema
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the empty sequence" }, "errors" : [ "report-schemas:DOES-NOT-EXIST if a report schema with the given name does not exist." ] } ], "variables" : [ { "name" : "report-schemas:col", "type" : "string", "description" : " Name of the collection the report schemas are stored in.\n" }, { "name" : "report-schemas:ALL_ARCHIVES", "type" : "boolean", "description" : " Joker for all archives.\n" } ] }, "http://zorba.io/modules/store/static/integrity-constraints/ddl" : { "ns" : "http://zorba.io/modules/store/static/integrity-constraints/ddl", "description" : " This module defines a set of functions to manage integrity constraints\n that are declared in the prolog of a module.\n For example, it provides functions to activate or deactivate integrity\n constraints.\n

\n This module is part of\n Zorba's XQuery Data Definition Facility.\n All the integrity constraints managed by this module have to be pre-declared\n in the prolog of a module.\n Please refer to the\n general documentation\n for more information and examples.\n", "sees" : [ "Data Lifecycle", "XQuery Data Definition Facility", "http://zorba.io/modules/store/static/collections/dml", "http://zorba.io/modules/store/static/collections/ddl", "http://zorba.io/modules/store/static/indexes/ddl", "http://zorba.io/modules/store/static/indexes/dml", "http://zorba.io/modules/store/static/integrity-constraints/dml", "http://zorba.io/errors" ], "authors" : [ "Nicolae Brinza, Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/store/static/integrity-constraints/ddl", "prefix" : "icddl" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/errors", "prefix" : "zerr" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "activate", "qname" : "icddl:activate", "signature" : "($name as xs:QName) external", "description" : " Activates an integrity constraint in the dynamic context.\n", "summary" : "

Activates an integrity constraint in the dynamic context.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the integrity constraint to activate.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that consists of a upd:activateIntegrityConstraint($name) update primitive." }, "errors" : [ "zerr:ZDDY0031 if the integrity constraint does not exist in the static context." ] }, { "isDocumented" : true, "arity" : 0, "name" : "activated-integrity-constraints", "qname" : "icddl:activated-integrity-constraints", "signature" : "() as xs:QName* external", "description" : " Gets the integrity constraints that are activated, if any.\n", "summary" : "

Gets the integrity constraints that are activated, if any.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:QName*", "description" : "A sequence of QNames, one for each activated integrity constraint, or an empty sequence if none." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "deactivate", "qname" : "icddl:deactivate", "signature" : "($name as xs:QName) external", "description" : " Deactivates the integrity constraint.\n", "summary" : "

Deactivates the integrity constraint.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the integrity constraint to deactivate.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, deactivates the integrity constraint." }, "errors" : [ "zerr:ZDDY0032 if the integrity constraint was not declared in the the static context.", "zerr:ZDDY0032 if the integrity constraints is not activated." ] }, { "isDocumented" : true, "arity" : 0, "name" : "declared-integrity-constraints", "qname" : "icddl:declared-integrity-constraints", "signature" : "() as xs:QName* external", "description" : " Gets the sequence of QNames representing the integrity constraints that have\n been declared in the prolog of the static context.\n", "summary" : "

Gets the sequence of QNames representing the integrity constraints that have\n been declared in the prolog of the static context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:QName*", "description" : "A sequence of QNames, one for each created integrity constraints, or an emtpy sequence if none." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-activated-integrity-constraint", "qname" : "icddl:is-activated-integrity-constraint", "signature" : "($name as xs:QName) as xs:boolean external", "description" : " Gets whether an integrity constraints is activated.\n", "summary" : "

Gets whether an integrity constraints is activated.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the constraint to check.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the integrity constraint is activated; false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-declared-integrity-constraint", "qname" : "icddl:is-declared-integrity-constraint", "signature" : "($name as xs:QName) as xs:boolean external", "description" : " Gets whether an integrity constraint is declared in the prolog of the static\n context.\n", "summary" : "

Gets whether an integrity constraint is declared in the prolog of the static\n context.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the constraint to check.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the constraint is declared; false otherwise." }, "errors" : [ ] } ], "variables" : [ ] }, "http://www.functx.com" : { "ns" : "http://www.functx.com", "description" : " --------------------------------\n The FunctX XQuery Function Library\n --------------------------------\n Copyright (C) 2007 Datypic\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 2.1 of the License.\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public\n License along with this library; if not, write to the Free Software\n Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n For more information on the FunctX XQuery library, contact contrib@functx.com.\n", "sees" : [ "http://www.xqueryfunctions.com" ], "authors" : [ ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.functx.com", "prefix" : "functx" } ], "functions" : [ { "isDocumented" : true, "arity" : 3, "name" : "add-attributes", "qname" : "functx:add-attributes", "signature" : "($elements as element(*)*, $attrNames as xs:QName*, $attrValues as xs:anyAtomicType*) as element(*)?", "description" : " Adds attributes to XML elements\n", "summary" : "

Adds attributes to XML elements\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "elements", "type" : "element(*)", "occurrence" : "*", "description" : "
the element(s) to which you wish to add the attribute
" }, { "name" : "attrNames", "type" : "xs:QName", "occurrence" : "*", "description" : "
the name(s) of the attribute(s) to add
" }, { "name" : "attrValues", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the value(s) of the attribute(s) to add
" } ], "returns" : { "type" : "element(*)?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "add-months", "qname" : "functx:add-months", "signature" : "($date as xs:anyAtomicType?, $months as xs:integer) as xs:date?", "description" : " Adds months to a date\n", "summary" : "

Adds months to a date\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the date
" }, { "name" : "months", "type" : "xs:integer", "occurrence" : null, "description" : "
the number of months to add
" } ], "returns" : { "type" : "xs:date?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "add-or-update-attributes", "qname" : "functx:add-or-update-attributes", "signature" : "($elements as element(*)*, $attrNames as xs:QName*, $attrValues as xs:anyAtomicType*) as element(*)?", "description" : " Adds attributes to XML elements\n", "summary" : "

Adds attributes to XML elements\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "elements", "type" : "element(*)", "occurrence" : "*", "description" : "
the element(s) to which you wish to add the attribute
" }, { "name" : "attrNames", "type" : "xs:QName", "occurrence" : "*", "description" : "
the name(s) of the attribute(s) to add
" }, { "name" : "attrValues", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the value(s) of the attribute(s) to add
" } ], "returns" : { "type" : "element(*)?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "all-whitespace", "qname" : "functx:all-whitespace", "signature" : "($arg as xs:string?) as xs:boolean", "description" : " Whether a value is all whitespace or a zero-length string\n", "summary" : "

Whether a value is all whitespace or a zero-length string\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string (or node) to test
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "are-distinct-values", "qname" : "functx:are-distinct-values", "signature" : "($seq as xs:anyAtomicType*) as xs:boolean", "description" : " Whether all the values in a sequence are distinct\n", "summary" : "

Whether all the values in a sequence are distinct\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequence of values
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "atomic-type", "qname" : "functx:atomic-type", "signature" : "($values as xs:anyAtomicType*) as xs:string*", "description" : " The built-in type of an atomic value\n", "summary" : "

The built-in type of an atomic value\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "values", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the value(s) whose type you want to determine
" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "avg-empty-is-zero", "qname" : "functx:avg-empty-is-zero", "signature" : "($values as xs:anyAtomicType*, $allNodes as node()*) as xs:double", "description" : " The average, counting \"empty\" values as zero\n", "summary" : "

The average, counting \"empty\" values as zero\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "values", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the values to be averaged
" }, { "name" : "allNodes", "type" : "node()", "occurrence" : "*", "description" : "
the sequence of all nodes to find the average over
" } ], "returns" : { "type" : "xs:double", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "between-exclusive", "qname" : "functx:between-exclusive", "signature" : "($value as xs:anyAtomicType?, $minValue as xs:anyAtomicType, $maxValue as xs:anyAtomicType) as xs:boolean", "description" : " Whether a value is between two provided values\n", "summary" : "

Whether a value is between two provided values\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the value to be tested
" }, { "name" : "minValue", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the minimum value
" }, { "name" : "maxValue", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the maximum value
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "between-inclusive", "qname" : "functx:between-inclusive", "signature" : "($value as xs:anyAtomicType?, $minValue as xs:anyAtomicType, $maxValue as xs:anyAtomicType) as xs:boolean", "description" : " Whether a value is between two provided values, or equal to one of them\n", "summary" : "

Whether a value is between two provided values, or equal to one of them\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the value to be tested
" }, { "name" : "minValue", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the minimum value
" }, { "name" : "maxValue", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the maximum value
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "camel-case-to-words", "qname" : "functx:camel-case-to-words", "signature" : "($arg as xs:string?, $delim as xs:string) as xs:string", "description" : " Turns a camelCase string into space-separated words\n", "summary" : "

Turns a camelCase string into space-separated words\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to modify
" }, { "name" : "delim", "type" : "xs:string", "occurrence" : null, "description" : "
the delimiter for the words (e.g. a space)
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "capitalize-first", "qname" : "functx:capitalize-first", "signature" : "($arg as xs:string?) as xs:string?", "description" : " Capitalizes the first character of a string\n", "summary" : "

Capitalizes the first character of a string\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the word or phrase to capitalize
" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "change-element-names-deep", "qname" : "functx:change-element-names-deep", "signature" : "($nodes as node()*, $oldNames as xs:QName*, $newNames as xs:QName*) as node()*", "description" : " Changes the names of elements in an XML fragment\n", "summary" : "

Changes the names of elements in an XML fragment\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the element(s) to change
" }, { "name" : "oldNames", "type" : "xs:QName", "occurrence" : "*", "description" : "
the sequence of names to change from
" }, { "name" : "newNames", "type" : "xs:QName", "occurrence" : "*", "description" : "
the sequence of names to change to
" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "change-element-ns-deep", "qname" : "functx:change-element-ns-deep", "signature" : "($nodes as node()*, $newns as xs:string, $prefix as xs:string) as node()*", "description" : " Changes the namespace of XML elements and its descendants\n", "summary" : "

Changes the namespace of XML elements and its descendants\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the nodes to change
" }, { "name" : "newns", "type" : "xs:string", "occurrence" : null, "description" : "
the new namespace
" }, { "name" : "prefix", "type" : "xs:string", "occurrence" : null, "description" : "
the prefix to use for the new namespace
" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "change-element-ns", "qname" : "functx:change-element-ns", "signature" : "($elements as element(*)*, $newns as xs:string, $prefix as xs:string) as element(*)?", "description" : " Changes the namespace of XML elements\n", "summary" : "

Changes the namespace of XML elements\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "elements", "type" : "element(*)", "occurrence" : "*", "description" : "
the elements to change
" }, { "name" : "newns", "type" : "xs:string", "occurrence" : null, "description" : "
the new namespace
" }, { "name" : "prefix", "type" : "xs:string", "occurrence" : null, "description" : "
the prefix to use for the new namespace
" } ], "returns" : { "type" : "element(*)?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "chars", "qname" : "functx:chars", "signature" : "($arg as xs:string?) as xs:string*", "description" : " Converts a string to a sequence of characters\n", "summary" : "

Converts a string to a sequence of characters\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to split
" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "contains-any-of", "qname" : "functx:contains-any-of", "signature" : "($arg as xs:string?, $searchStrings as xs:string*) as xs:boolean", "description" : " Whether a string contains any of a sequence of strings\n", "summary" : "

Whether a string contains any of a sequence of strings\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to test
" }, { "name" : "searchStrings", "type" : "xs:string", "occurrence" : "*", "description" : "
the strings to look for
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "contains-case-insensitive", "qname" : "functx:contains-case-insensitive", "signature" : "($arg as xs:string?, $substring as xs:string) as xs:boolean?", "description" : " Whether one string contains another, without regard to case\n", "summary" : "

Whether one string contains another, without regard to case\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to search
" }, { "name" : "substring", "type" : "xs:string", "occurrence" : null, "description" : "
the substring to find
" } ], "returns" : { "type" : "xs:boolean?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "contains-word", "qname" : "functx:contains-word", "signature" : "($arg as xs:string?, $word as xs:string) as xs:boolean", "description" : " Whether one string contains another, as a separate word\n", "summary" : "

Whether one string contains another, as a separate word\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to search
" }, { "name" : "word", "type" : "xs:string", "occurrence" : null, "description" : "
the word to find
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "copy-attributes", "qname" : "functx:copy-attributes", "signature" : "($copyTo as element(*), $copyFrom as element(*)) as element(*)", "description" : " Copies attributes from one element to another\n", "summary" : "

Copies attributes from one element to another\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "copyTo", "type" : "element(*)", "occurrence" : null, "description" : "
the element to copy attributes to
" }, { "name" : "copyFrom", "type" : "element(*)", "occurrence" : null, "description" : "
the element to copy attributes from
" } ], "returns" : { "type" : "element(*)", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "date", "qname" : "functx:date", "signature" : "($year as xs:anyAtomicType, $month as xs:anyAtomicType, $day as xs:anyAtomicType) as xs:date", "description" : " Construct a date from a year, month and day\n", "summary" : "

Construct a date from a year, month and day\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "year", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the year
" }, { "name" : "month", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the month
" }, { "name" : "day", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the day
" } ], "returns" : { "type" : "xs:date", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "dateTime", "qname" : "functx:dateTime", "signature" : "($year as xs:anyAtomicType, $month as xs:anyAtomicType, $day as xs:anyAtomicType, $hour as xs:anyAtomicType, $minute as xs:anyAtomicType, $second as xs:anyAtomicType) as xs:dateTime", "description" : " Construct a date/time from individual components\n", "summary" : "

Construct a date/time from individual components\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "year", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the year
" }, { "name" : "month", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the month
" }, { "name" : "day", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the day
" }, { "name" : "hour", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the hour
" }, { "name" : "minute", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the minute
" }, { "name" : "second", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the second
" } ], "returns" : { "type" : "xs:dateTime", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "day-in-year", "qname" : "functx:day-in-year", "signature" : "($date as xs:anyAtomicType?) as xs:integer?", "description" : " The day of the year (a number between 1 and 366)\n", "summary" : "

The day of the year (a number between 1 and 366)\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the date
" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "day-of-week-abbrev-en", "qname" : "functx:day-of-week-abbrev-en", "signature" : "($date as xs:anyAtomicType?) as xs:string?", "description" : " The abbreviated day of the week, from a date, in English\n", "summary" : "

The abbreviated day of the week, from a date, in English\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the date
" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "day-of-week-name-en", "qname" : "functx:day-of-week-name-en", "signature" : "($date as xs:anyAtomicType?) as xs:string?", "description" : " The name of the day of the week, from a date, in English\n", "summary" : "

The name of the day of the week, from a date, in English\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the date
" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "day-of-week", "qname" : "functx:day-of-week", "signature" : "($date as xs:anyAtomicType?) as xs:integer?", "description" : " The day of the week, from a date\n", "summary" : "

The day of the week, from a date\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the date
" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "dayTimeDuration", "qname" : "functx:dayTimeDuration", "signature" : "($days as xs:decimal?, $hours as xs:decimal?, $minutes as xs:decimal?, $seconds as xs:decimal?) as xs:dayTimeDuration", "description" : " Construct a dayTimeDuration from a number of days, hours, etc.\n", "summary" : "

Construct a dayTimeDuration from a number of days, hours, etc.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "days", "type" : "xs:decimal", "occurrence" : "?", "description" : "
the number of days
" }, { "name" : "hours", "type" : "xs:decimal", "occurrence" : "?", "description" : "
the number of hours
" }, { "name" : "minutes", "type" : "xs:decimal", "occurrence" : "?", "description" : "
the number of minutes
" }, { "name" : "seconds", "type" : "xs:decimal", "occurrence" : "?", "description" : "
the number of seconds
" } ], "returns" : { "type" : "xs:dayTimeDuration", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "days-in-month", "qname" : "functx:days-in-month", "signature" : "($date as xs:anyAtomicType?) as xs:integer?", "description" : " Number of days in the month\n", "summary" : "

Number of days in the month\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the date
" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "depth-of-node", "qname" : "functx:depth-of-node", "signature" : "($node as node()?) as xs:integer", "description" : " The depth (level) of a node in an XML tree\n", "summary" : "

The depth (level) of a node in an XML tree\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "node()", "occurrence" : "?", "description" : "
the node to check
" } ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "distinct-attribute-names", "qname" : "functx:distinct-attribute-names", "signature" : "($nodes as node()*) as xs:string*", "description" : " The distinct names of all attributes in an XML fragment\n", "summary" : "

The distinct names of all attributes in an XML fragment\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the root to start from
" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "distinct-deep", "qname" : "functx:distinct-deep", "signature" : "($nodes as node()*) as node()*", "description" : " The XML nodes with distinct values, taking into account attributes and descendants\n", "summary" : "

The XML nodes with distinct values, taking into account attributes and descendants\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the sequence of nodes to test
" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "distinct-element-names", "qname" : "functx:distinct-element-names", "signature" : "($nodes as node()*) as xs:string*", "description" : " The distinct names of all elements in an XML fragment\n", "summary" : "

The distinct names of all elements in an XML fragment\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the root(s) to start from
" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "distinct-element-paths", "qname" : "functx:distinct-element-paths", "signature" : "($nodes as node()*) as xs:string*", "description" : " The distinct paths of all descendant elements in an XML fragment\n", "summary" : "

The distinct paths of all descendant elements in an XML fragment\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the root(s) to start from
" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "distinct-nodes", "qname" : "functx:distinct-nodes", "signature" : "($nodes as node()*) as node()*", "description" : " The distinct XML nodes in a sequence (by node identity)\n", "summary" : "

The distinct XML nodes in a sequence (by node identity)\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the node sequence
" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "duration-from-timezone", "qname" : "functx:duration-from-timezone", "signature" : "($timezone as xs:string) as xs:dayTimeDuration", "description" : " Converts a timezone like \"-05:00\" or \"Z\" into xs:dayTimeDuration\n", "summary" : "

Converts a timezone like \"-05:00\" or \"Z\" into xs:dayTimeDuration\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "timezone", "type" : "xs:string", "occurrence" : null, "description" : "
the time zone, in (+|-)HH:MM format
" } ], "returns" : { "type" : "xs:dayTimeDuration", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "dynamic-path", "qname" : "functx:dynamic-path", "signature" : "($parent as node(), $path as xs:string) as item()*", "description" : " Dynamically evaluates a simple XPath path\n", "summary" : "

Dynamically evaluates a simple XPath path\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "parent", "type" : "node()", "occurrence" : null, "description" : "
the root to start from
" }, { "name" : "path", "type" : "xs:string", "occurrence" : null, "description" : "
the path expression
" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "escape-for-regex", "qname" : "functx:escape-for-regex", "signature" : "($arg as xs:string?) as xs:string", "description" : " Escapes regex special characters\n", "summary" : "

Escapes regex special characters\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to escape
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "exclusive-or", "qname" : "functx:exclusive-or", "signature" : "($arg1 as xs:boolean?, $arg2 as xs:boolean?) as xs:boolean?", "description" : " Whether one (and only one) of two boolean values is true\n", "summary" : "

Whether one (and only one) of two boolean values is true\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:boolean", "occurrence" : "?", "description" : "
the first boolean value
" }, { "name" : "arg2", "type" : "xs:boolean", "occurrence" : "?", "description" : "
the second boolean value
" } ], "returns" : { "type" : "xs:boolean?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "first-day-of-month", "qname" : "functx:first-day-of-month", "signature" : "($date as xs:anyAtomicType?) as xs:date?", "description" : " The first day of the month of a date\n", "summary" : "

The first day of the month of a date\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the date
" } ], "returns" : { "type" : "xs:date?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "first-day-of-year", "qname" : "functx:first-day-of-year", "signature" : "($date as xs:anyAtomicType?) as xs:date?", "description" : " The first day of the year of a date\n", "summary" : "

The first day of the year of a date\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the date
" } ], "returns" : { "type" : "xs:date?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "first-node", "qname" : "functx:first-node", "signature" : "($nodes as node()*) as node()?", "description" : " The XML node in a sequence that appears first in document order\n", "summary" : "

The XML node in a sequence that appears first in document order\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the sequence of nodes
" } ], "returns" : { "type" : "node()?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "follows-not-descendant", "qname" : "functx:follows-not-descendant", "signature" : "($a as node()?, $b as node()?) as xs:boolean", "description" : " Whether an XML node follows another without being its descendant\n", "summary" : "

Whether an XML node follows another without being its descendant\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "a", "type" : "node()", "occurrence" : "?", "description" : "
the first node
" }, { "name" : "b", "type" : "node()", "occurrence" : "?", "description" : "
the second node
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "format-as-title-en", "qname" : "functx:format-as-title-en", "signature" : "($titles as xs:string*) as xs:string*", "description" : " Moves title words like \"the\" and \"a\" to the end of strings\n", "summary" : "

Moves title words like \"the\" and \"a\" to the end of strings\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "titles", "type" : "xs:string", "occurrence" : "*", "description" : "
the titles to format
" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "fragment-from-uri", "qname" : "functx:fragment-from-uri", "signature" : "($uri as xs:string?) as xs:string?", "description" : " Returns the fragment from a URI\n", "summary" : "

Returns the fragment from a URI\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurrence" : "?", "description" : "
the URI
" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "get-matches-and-non-matches", "qname" : "functx:get-matches-and-non-matches", "signature" : "($string as xs:string?, $regex as xs:string) as element(*)*", "description" : " Splits a string into matching and non-matching regions\n", "summary" : "

Splits a string into matching and non-matching regions\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "string", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to split
" }, { "name" : "regex", "type" : "xs:string", "occurrence" : null, "description" : "
the pattern
" } ], "returns" : { "type" : "element(*)*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "get-matches", "qname" : "functx:get-matches", "signature" : "($string as xs:string?, $regex as xs:string) as xs:string*", "description" : " Return the matching regions of a string\n", "summary" : "

Return the matching regions of a string\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "string", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to split
" }, { "name" : "regex", "type" : "xs:string", "occurrence" : null, "description" : "
the pattern
" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "has-element-only-content", "qname" : "functx:has-element-only-content", "signature" : "($element as element(*)) as xs:boolean", "description" : " Whether an element has element-only content\n", "summary" : "

Whether an element has element-only content\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "element", "type" : "element(*)", "occurrence" : null, "description" : "
the XML element to test
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "has-empty-content", "qname" : "functx:has-empty-content", "signature" : "($element as element(*)) as xs:boolean", "description" : " Whether an element has empty content\n", "summary" : "

Whether an element has empty content\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "element", "type" : "element(*)", "occurrence" : null, "description" : "
the XML element to test
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "has-mixed-content", "qname" : "functx:has-mixed-content", "signature" : "($element as element(*)) as xs:boolean", "description" : " Whether an element has mixed content\n", "summary" : "

Whether an element has mixed content\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "element", "type" : "element(*)", "occurrence" : null, "description" : "
the XML element to test
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "has-simple-content", "qname" : "functx:has-simple-content", "signature" : "($element as element(*)) as xs:boolean", "description" : " Whether an element has simple content\n", "summary" : "

Whether an element has simple content\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "element", "type" : "element(*)", "occurrence" : null, "description" : "
the XML element to test
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "id-from-element", "qname" : "functx:id-from-element", "signature" : "($element as element(*)?) as xs:string?", "description" : " Gets the ID of an XML element\n", "summary" : "

Gets the ID of an XML element\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "element", "type" : "element(*)", "occurrence" : "?", "description" : "
the element
" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "id-untyped", "qname" : "functx:id-untyped", "signature" : "($node as node()*, $id as xs:anyAtomicType) as element(*)*", "description" : " Gets XML element(s) that have an attribute with a particular value\n", "summary" : "

Gets XML element(s) that have an attribute with a particular value\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "node()", "occurrence" : "*", "description" : "
the root node(s) to start from
" }, { "name" : "id", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the \"id\" to find
" } ], "returns" : { "type" : "element(*)*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "if-absent", "qname" : "functx:if-absent", "signature" : "($arg as item()*, $value as item()*) as item()*", "description" : " The first argument if it is not empty, otherwise the second argument\n", "summary" : "

The first argument if it is not empty, otherwise the second argument\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurrence" : "*", "description" : "
the item(s) that may be absent
" }, { "name" : "value", "type" : "item()", "occurrence" : "*", "description" : "
the item(s) to use if the item is absent
" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "if-empty", "qname" : "functx:if-empty", "signature" : "($arg as item()?, $value as item()*) as item()*", "description" : " The first argument if it is not blank, otherwise the second argument\n", "summary" : "

The first argument if it is not blank, otherwise the second argument\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurrence" : "?", "description" : "
the node that may be empty
" }, { "name" : "value", "type" : "item()", "occurrence" : "*", "description" : "
the item(s) to use if the node is empty
" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "index-of-deep-equal-node", "qname" : "functx:index-of-deep-equal-node", "signature" : "($nodes as node()*, $nodeToFind as node()) as xs:integer*", "description" : " The position of a node in a sequence, based on contents and attributes\n", "summary" : "

The position of a node in a sequence, based on contents and attributes\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the node sequence
" }, { "name" : "nodeToFind", "type" : "node()", "occurrence" : null, "description" : "
the node to find in the sequence
" } ], "returns" : { "type" : "xs:integer*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "index-of-match-first", "qname" : "functx:index-of-match-first", "signature" : "($arg as xs:string?, $pattern as xs:string) as xs:integer?", "description" : " The first position of a matching substring\n", "summary" : "

The first position of a matching substring\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string
" }, { "name" : "pattern", "type" : "xs:string", "occurrence" : null, "description" : "
the pattern to match
" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "index-of-node", "qname" : "functx:index-of-node", "signature" : "($nodes as node()*, $nodeToFind as node()) as xs:integer*", "description" : " The position of a node in a sequence, based on node identity\n", "summary" : "

The position of a node in a sequence, based on node identity\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the node sequence
" }, { "name" : "nodeToFind", "type" : "node()", "occurrence" : null, "description" : "
the node to find in the sequence
" } ], "returns" : { "type" : "xs:integer*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "index-of-string-first", "qname" : "functx:index-of-string-first", "signature" : "($arg as xs:string?, $substring as xs:string) as xs:integer?", "description" : " The first position of a substring\n", "summary" : "

The first position of a substring\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string
" }, { "name" : "substring", "type" : "xs:string", "occurrence" : null, "description" : "
the substring to find
" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "index-of-string-last", "qname" : "functx:index-of-string-last", "signature" : "($arg as xs:string?, $substring as xs:string) as xs:integer?", "description" : " The last position of a substring\n", "summary" : "

The last position of a substring\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string
" }, { "name" : "substring", "type" : "xs:string", "occurrence" : null, "description" : "
the substring to find
" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "index-of-string", "qname" : "functx:index-of-string", "signature" : "($arg as xs:string?, $substring as xs:string) as xs:integer*", "description" : " The position(s) of a substring\n", "summary" : "

The position(s) of a substring\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string
" }, { "name" : "substring", "type" : "xs:string", "occurrence" : null, "description" : "
the substring to find
" } ], "returns" : { "type" : "xs:integer*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "insert-string", "qname" : "functx:insert-string", "signature" : "($originalString as xs:string?, $stringToInsert as xs:string?, $pos as xs:integer) as xs:string", "description" : " Inserts a string at a specified position\n", "summary" : "

Inserts a string at a specified position\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "originalString", "type" : "xs:string", "occurrence" : "?", "description" : "
the original string to insert into
" }, { "name" : "stringToInsert", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to insert
" }, { "name" : "pos", "type" : "xs:integer", "occurrence" : null, "description" : "
the position
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-a-number", "qname" : "functx:is-a-number", "signature" : "($value as xs:anyAtomicType?) as xs:boolean", "description" : " Whether a value is numeric\n", "summary" : "

Whether a value is numeric\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the value to test
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-absolute-uri", "qname" : "functx:is-absolute-uri", "signature" : "($uri as xs:string?) as xs:boolean", "description" : " Whether a URI is absolute\n", "summary" : "

Whether a URI is absolute\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurrence" : "?", "description" : "
the URI to test
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "is-ancestor", "qname" : "functx:is-ancestor", "signature" : "($node1 as node(), $node2 as node()) as xs:boolean", "description" : " Whether an XML node is an ancestor of another node\n", "summary" : "

Whether an XML node is an ancestor of another node\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node1", "type" : "node()", "occurrence" : null, "description" : "
the first node
" }, { "name" : "node2", "type" : "node()", "occurrence" : null, "description" : "
the second node
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "is-descendant", "qname" : "functx:is-descendant", "signature" : "($node1 as node(), $node2 as node()) as xs:boolean", "description" : " Whether an XML node is a descendant of another node\n", "summary" : "

Whether an XML node is a descendant of another node\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node1", "type" : "node()", "occurrence" : null, "description" : "
the first node
" }, { "name" : "node2", "type" : "node()", "occurrence" : null, "description" : "
the second node
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-leap-year", "qname" : "functx:is-leap-year", "signature" : "($date as xs:anyAtomicType?) as xs:boolean", "description" : " Whether a date falls in a leap year\n", "summary" : "

Whether a date falls in a leap year\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the date or year
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "is-node-among-descendants-deep-equal", "qname" : "functx:is-node-among-descendants-deep-equal", "signature" : "($node as node()?, $seq as node()*) as xs:boolean", "description" : " Whether an XML node is among the descendants of a sequence, based on contents and attributes\n", "summary" : "

Whether an XML node is among the descendants of a sequence, based on contents and attributes\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "node()", "occurrence" : "?", "description" : "
the node to test
" }, { "name" : "seq", "type" : "node()", "occurrence" : "*", "description" : "
the sequence of nodes to search
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "is-node-among-descendants", "qname" : "functx:is-node-among-descendants", "signature" : "($node as node()?, $seq as node()*) as xs:boolean", "description" : " Whether an XML node is among the descendants of a sequence, based on node identity\n", "summary" : "

Whether an XML node is among the descendants of a sequence, based on node identity\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "node()", "occurrence" : "?", "description" : "
the node to test
" }, { "name" : "seq", "type" : "node()", "occurrence" : "*", "description" : "
the sequence of nodes to search
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "is-node-in-sequence-deep-equal", "qname" : "functx:is-node-in-sequence-deep-equal", "signature" : "($node as node()?, $seq as node()*) as xs:boolean", "description" : " Whether an XML node is in a sequence, based on contents and attributes\n", "summary" : "

Whether an XML node is in a sequence, based on contents and attributes\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "node()", "occurrence" : "?", "description" : "
the node to test
" }, { "name" : "seq", "type" : "node()", "occurrence" : "*", "description" : "
the sequence of nodes to search
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "is-node-in-sequence", "qname" : "functx:is-node-in-sequence", "signature" : "($node as node()?, $seq as node()*) as xs:boolean", "description" : " Whether an XML node is in a sequence, based on node identity\n", "summary" : "

Whether an XML node is in a sequence, based on node identity\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "node()", "occurrence" : "?", "description" : "
the node to test
" }, { "name" : "seq", "type" : "node()", "occurrence" : "*", "description" : "
the sequence of nodes to search
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "is-value-in-sequence", "qname" : "functx:is-value-in-sequence", "signature" : "($value as xs:anyAtomicType?, $seq as xs:anyAtomicType*) as xs:boolean", "description" : " Whether an atomic value appears in a sequence\n", "summary" : "

Whether an atomic value appears in a sequence\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "value", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the atomic value to test
" }, { "name" : "seq", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequence of values to search
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "last-day-of-month", "qname" : "functx:last-day-of-month", "signature" : "($date as xs:anyAtomicType?) as xs:date?", "description" : " The last day of the month of a date\n", "summary" : "

The last day of the month of a date\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the date
" } ], "returns" : { "type" : "xs:date?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "last-day-of-year", "qname" : "functx:last-day-of-year", "signature" : "($date as xs:anyAtomicType?) as xs:date?", "description" : " The last day of the month of a date\n", "summary" : "

The last day of the month of a date\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the date
" } ], "returns" : { "type" : "xs:date?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "last-node", "qname" : "functx:last-node", "signature" : "($nodes as node()*) as node()?", "description" : " The XML node in a sequence that is last in document order\n", "summary" : "

The XML node in a sequence that is last in document order\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the sequence of nodes
" } ], "returns" : { "type" : "node()?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "leaf-elements", "qname" : "functx:leaf-elements", "signature" : "($root as node()?) as element(*)*", "description" : " All XML elements that don't have any child elements\n", "summary" : "

All XML elements that don't have any child elements\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "root", "type" : "node()", "occurrence" : "?", "description" : "
the root
" } ], "returns" : { "type" : "element(*)*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "left-trim", "qname" : "functx:left-trim", "signature" : "($arg as xs:string?) as xs:string", "description" : " Trims leading whitespace\n", "summary" : "

Trims leading whitespace\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to trim
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "line-count", "qname" : "functx:line-count", "signature" : "($arg as xs:string?) as xs:integer", "description" : " The number of lines\n", "summary" : "

The number of lines\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to test
" } ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "lines", "qname" : "functx:lines", "signature" : "($arg as xs:string?) as xs:string*", "description" : " Split a string into separate lines\n", "summary" : "

Split a string into separate lines\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to split
" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "max-depth", "qname" : "functx:max-depth", "signature" : "($root as node()?) as xs:integer?", "description" : " The maximum depth of elements in an XML tree\n", "summary" : "

The maximum depth of elements in an XML tree\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "root", "type" : "node()", "occurrence" : "?", "description" : "
the root to start from
" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "max-determine-type", "qname" : "functx:max-determine-type", "signature" : "($seq as xs:anyAtomicType*) as xs:anyAtomicType?", "description" : " The maximum value in a sequence, figuring out its type (numeric or string)\n", "summary" : "

The maximum value in a sequence, figuring out its type (numeric or string)\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequence of values to test
" } ], "returns" : { "type" : "xs:anyAtomicType?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "max-line-length", "qname" : "functx:max-line-length", "signature" : "($arg as xs:string?) as xs:integer", "description" : " The maximum line length\n", "summary" : "

The maximum line length\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to test
" } ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "max-node", "qname" : "functx:max-node", "signature" : "($nodes as node()*) as node()*", "description" : " The XML node whose typed value is the maximum\n", "summary" : "

The XML node whose typed value is the maximum\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the sequence of nodes to test
" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "max-string", "qname" : "functx:max-string", "signature" : "($strings as xs:anyAtomicType*) as xs:string?", "description" : " The maximum of a sequence of values, treating them like strings\n", "summary" : "

The maximum of a sequence of values, treating them like strings\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "strings", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequence of values
" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "min-determine-type", "qname" : "functx:min-determine-type", "signature" : "($seq as xs:anyAtomicType*) as xs:anyAtomicType?", "description" : " The minimum value in a sequence, figuring out its type (numeric or string)\n", "summary" : "

The minimum value in a sequence, figuring out its type (numeric or string)\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequence of values to test
" } ], "returns" : { "type" : "xs:anyAtomicType?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "min-node", "qname" : "functx:min-node", "signature" : "($nodes as node()*) as node()*", "description" : " The XML node whose typed value is the minimum\n", "summary" : "

The XML node whose typed value is the minimum\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the sequence of nodes to test
" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "min-non-empty-string", "qname" : "functx:min-non-empty-string", "signature" : "($strings as xs:string*) as xs:string?", "description" : " The minimum of a sequence of strings, ignoring \"empty\" values\n", "summary" : "

The minimum of a sequence of strings, ignoring \"empty\" values\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "strings", "type" : "xs:string", "occurrence" : "*", "description" : "
the sequence of strings to search
" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "min-string", "qname" : "functx:min-string", "signature" : "($strings as xs:anyAtomicType*) as xs:string?", "description" : " The minimum of a sequence of values, treating them like strings\n", "summary" : "

The minimum of a sequence of values, treating them like strings\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "strings", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequence of strings
" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "mmddyyyy-to-date", "qname" : "functx:mmddyyyy-to-date", "signature" : "($dateString as xs:string?) as xs:date?", "description" : " Converts a string with format MMDDYYYY (with any delimiters) to a date\n", "summary" : "

Converts a string with format MMDDYYYY (with any delimiters) to a date\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "dateString", "type" : "xs:string", "occurrence" : "?", "description" : "
the MMDDYYYY string
" } ], "returns" : { "type" : "xs:date?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "month-abbrev-en", "qname" : "functx:month-abbrev-en", "signature" : "($date as xs:anyAtomicType?) as xs:string?", "description" : " The month of a date as an abbreviated word (Jan, Feb, etc.)\n", "summary" : "

The month of a date as an abbreviated word (Jan, Feb, etc.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the date
" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "month-name-en", "qname" : "functx:month-name-en", "signature" : "($date as xs:anyAtomicType?) as xs:string?", "description" : " The month of a date as a word (January, February, etc.)\n", "summary" : "

The month of a date as a word (January, February, etc.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the date
" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "name-test", "qname" : "functx:name-test", "signature" : "($testname as xs:string?, $names as xs:string*) as xs:boolean", "description" : " Whether a name matches a list of names or name wildcards\n", "summary" : "

Whether a name matches a list of names or name wildcards\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "testname", "type" : "xs:string", "occurrence" : "?", "description" : "
the name to test
" }, { "name" : "names", "type" : "xs:string", "occurrence" : "*", "description" : "
the list of names or name wildcards
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "namespaces-in-use", "qname" : "functx:namespaces-in-use", "signature" : "($root as node()?) as xs:anyURI*", "description" : " A list of namespaces used in element/attribute names in an XML fragment\n", "summary" : "

A list of namespaces used in element/attribute names in an XML fragment\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "root", "type" : "node()", "occurrence" : "?", "description" : "
the root node to start from
" } ], "returns" : { "type" : "xs:anyURI*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "next-day", "qname" : "functx:next-day", "signature" : "($date as xs:anyAtomicType?) as xs:date?", "description" : " The next day\n", "summary" : "

The next day\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the date
" } ], "returns" : { "type" : "xs:date?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "node-kind", "qname" : "functx:node-kind", "signature" : "($nodes as node()*) as xs:string*", "description" : " The XML node kind (element, attribute, text, etc.)\n", "summary" : "

The XML node kind (element, attribute, text, etc.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the node(s) whose kind you want to determine
" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "non-distinct-values", "qname" : "functx:non-distinct-values", "signature" : "($seq as xs:anyAtomicType*) as xs:anyAtomicType*", "description" : " Returns any values that appear more than once in a sequence\n", "summary" : "

Returns any values that appear more than once in a sequence\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the sequence of values
" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "number-of-matches", "qname" : "functx:number-of-matches", "signature" : "($arg as xs:string?, $pattern as xs:string) as xs:integer", "description" : " The number of regions that match a pattern\n", "summary" : "

The number of regions that match a pattern\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to test
" }, { "name" : "pattern", "type" : "xs:string", "occurrence" : null, "description" : "
the regular expression
" } ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "ordinal-number-en", "qname" : "functx:ordinal-number-en", "signature" : "($num as xs:integer?) as xs:string", "description" : " Reformats a number as an ordinal number, e.g. 1st, 2nd, 3rd.\n", "summary" : "

Reformats a number as an ordinal number, e.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "num", "type" : "xs:integer", "occurrence" : "?", "description" : "
the number
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "pad-integer-to-length", "qname" : "functx:pad-integer-to-length", "signature" : "($integerToPad as xs:anyAtomicType?, $length as xs:integer) as xs:string", "description" : " Pads an integer to a desired length by adding leading zeros\n", "summary" : "

Pads an integer to a desired length by adding leading zeros\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "integerToPad", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the integer to pad
" }, { "name" : "length", "type" : "xs:integer", "occurrence" : null, "description" : "
the desired length
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "pad-string-to-length", "qname" : "functx:pad-string-to-length", "signature" : "($stringToPad as xs:string?, $padChar as xs:string, $length as xs:integer) as xs:string", "description" : " Pads a string to a desired length\n", "summary" : "

Pads a string to a desired length\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "stringToPad", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to pad
" }, { "name" : "padChar", "type" : "xs:string", "occurrence" : null, "description" : "
the character(s) to use as padding
" }, { "name" : "length", "type" : "xs:integer", "occurrence" : null, "description" : "
the desired length
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "path-to-node-with-pos", "qname" : "functx:path-to-node-with-pos", "signature" : "($node as node()?) as xs:string", "description" : " A unique path to an XML node (or sequence of nodes)\n", "summary" : "

A unique path to an XML node (or sequence of nodes)\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "node()", "occurrence" : "?", "description" : "
the node sequence
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "path-to-node", "qname" : "functx:path-to-node", "signature" : "($nodes as node()*) as xs:string*", "description" : " A path to an XML node (or sequence of nodes)\n", "summary" : "

A path to an XML node (or sequence of nodes)\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the node sequence
" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "precedes-not-ancestor", "qname" : "functx:precedes-not-ancestor", "signature" : "($a as node()?, $b as node()?) as xs:boolean", "description" : " Whether an XML node precedes another without being its ancestor\n", "summary" : "

Whether an XML node precedes another without being its ancestor\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "a", "type" : "node()", "occurrence" : "?", "description" : "
the first node
" }, { "name" : "b", "type" : "node()", "occurrence" : "?", "description" : "
the second node
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "previous-day", "qname" : "functx:previous-day", "signature" : "($date as xs:anyAtomicType?) as xs:date?", "description" : " The previous day\n", "summary" : "

The previous day\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "date", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "
the date
" } ], "returns" : { "type" : "xs:date?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "remove-attributes-deep", "qname" : "functx:remove-attributes-deep", "signature" : "($nodes as node()*, $names as xs:string*) as node()*", "description" : " Removes attributes from an XML fragment, based on name\n", "summary" : "

Removes attributes from an XML fragment, based on name\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the root(s) to start from
" }, { "name" : "names", "type" : "xs:string", "occurrence" : "*", "description" : "
the names of the attributes to remove, or * for all attributes
" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "remove-attributes", "qname" : "functx:remove-attributes", "signature" : "($elements as element(*)*, $names as xs:string*) as element(*)", "description" : " Removes attributes from an XML element, based on name\n", "summary" : "

Removes attributes from an XML element, based on name\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "elements", "type" : "element(*)", "occurrence" : "*", "description" : "
the element(s) from which to remove the attributes
" }, { "name" : "names", "type" : "xs:string", "occurrence" : "*", "description" : "
the names of the attributes to remove, or * for all attributes
" } ], "returns" : { "type" : "element(*)", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "remove-elements-deep", "qname" : "functx:remove-elements-deep", "signature" : "($nodes as node()*, $names as xs:string*) as node()*", "description" : " Removes descendant elements from an XML node, based on name\n", "summary" : "

Removes descendant elements from an XML node, based on name\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
root(s) to start from
" }, { "name" : "names", "type" : "xs:string", "occurrence" : "*", "description" : "
the names of the elements to remove
" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "remove-elements-not-contents", "qname" : "functx:remove-elements-not-contents", "signature" : "($nodes as node()*, $names as xs:string*) as node()*", "description" : " Removes descendant XML elements but keeps their content\n", "summary" : "

Removes descendant XML elements but keeps their content\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurrence" : "*", "description" : "
the root(s) to start from
" }, { "name" : "names", "type" : "xs:string", "occurrence" : "*", "description" : "
the names of the elements to remove
" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "remove-elements", "qname" : "functx:remove-elements", "signature" : "($elements as element(*)*, $names as xs:string*) as element(*)*", "description" : " Removes child elements from an XML node, based on name\n", "summary" : "

Removes child elements from an XML node, based on name\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "elements", "type" : "element(*)", "occurrence" : "*", "description" : "
the element(s) from which you wish to remove the children
" }, { "name" : "names", "type" : "xs:string", "occurrence" : "*", "description" : "
the names of the child elements to remove
" } ], "returns" : { "type" : "element(*)*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "repeat-string", "qname" : "functx:repeat-string", "signature" : "($stringToRepeat as xs:string?, $count as xs:integer) as xs:string", "description" : " Repeats a string a given number of times\n", "summary" : "

Repeats a string a given number of times\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "stringToRepeat", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to repeat
" }, { "name" : "count", "type" : "xs:integer", "occurrence" : null, "description" : "
the desired number of copies
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "replace-beginning", "qname" : "functx:replace-beginning", "signature" : "($arg as xs:string?, $pattern as xs:string, $replacement as xs:string) as xs:string", "description" : " Replaces the beginning of a string, up to a matched pattern\n", "summary" : "

Replaces the beginning of a string, up to a matched pattern\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the entire string to change
" }, { "name" : "pattern", "type" : "xs:string", "occurrence" : null, "description" : "
the pattern of characters to replace up to
" }, { "name" : "replacement", "type" : "xs:string", "occurrence" : null, "description" : "
the replacement string
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "replace-element-values", "qname" : "functx:replace-element-values", "signature" : "($elements as element(*)*, $values as xs:anyAtomicType*) as element(*)*", "description" : " Updates the content of one or more elements\n", "summary" : "

Updates the content of one or more elements\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "elements", "type" : "element(*)", "occurrence" : "*", "description" : "
the elements whose content you wish to replace
" }, { "name" : "values", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the replacement values
" } ], "returns" : { "type" : "element(*)*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "replace-first", "qname" : "functx:replace-first", "signature" : "($arg as xs:string?, $pattern as xs:string, $replacement as xs:string) as xs:string", "description" : " Replaces the first match of a pattern\n", "summary" : "

Replaces the first match of a pattern\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the entire string to change
" }, { "name" : "pattern", "type" : "xs:string", "occurrence" : null, "description" : "
the pattern of characters to replace
" }, { "name" : "replacement", "type" : "xs:string", "occurrence" : null, "description" : "
the replacement string
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "replace-multi", "qname" : "functx:replace-multi", "signature" : "($arg as xs:string?, $changeFrom as xs:string*, $changeTo as xs:string*) as xs:string?", "description" : " Performs multiple replacements, using pairs of replace parameters\n", "summary" : "

Performs multiple replacements, using pairs of replace parameters\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to manipulate
" }, { "name" : "changeFrom", "type" : "xs:string", "occurrence" : "*", "description" : "
the sequence of strings or patterns to change from
" }, { "name" : "changeTo", "type" : "xs:string", "occurrence" : "*", "description" : "
the sequence of strings to change to
" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "reverse-string", "qname" : "functx:reverse-string", "signature" : "($arg as xs:string?) as xs:string", "description" : " Reverses the order of characters\n", "summary" : "

Reverses the order of characters\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to reverse
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "right-trim", "qname" : "functx:right-trim", "signature" : "($arg as xs:string?) as xs:string", "description" : " Trims trailing whitespace\n", "summary" : "

Trims trailing whitespace\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to trim
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "scheme-from-uri", "qname" : "functx:scheme-from-uri", "signature" : "($uri as xs:string?) as xs:string?", "description" : " Returns the scheme from a URI\n", "summary" : "

Returns the scheme from a URI\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurrence" : "?", "description" : "
the URI
" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "sequence-deep-equal", "qname" : "functx:sequence-deep-equal", "signature" : "($seq1 as item()*, $seq2 as item()*) as xs:boolean", "description" : " Whether two sequences have the same XML node content and/or values\n", "summary" : "

Whether two sequences have the same XML node content and/or values\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq1", "type" : "item()", "occurrence" : "*", "description" : "
the first sequence
" }, { "name" : "seq2", "type" : "item()", "occurrence" : "*", "description" : "
the second sequence
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "sequence-node-equal-any-order", "qname" : "functx:sequence-node-equal-any-order", "signature" : "($seq1 as node()*, $seq2 as node()*) as xs:boolean", "description" : " Whether two sequences contain the same XML nodes, regardless of order\n", "summary" : "

Whether two sequences contain the same XML nodes, regardless of order\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq1", "type" : "node()", "occurrence" : "*", "description" : "
the first sequence of nodes
" }, { "name" : "seq2", "type" : "node()", "occurrence" : "*", "description" : "
the second sequence of nodes
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "sequence-node-equal", "qname" : "functx:sequence-node-equal", "signature" : "($seq1 as node()*, $seq2 as node()*) as xs:boolean", "description" : " Whether two sequences contain the same XML nodes, in the same order\n", "summary" : "

Whether two sequences contain the same XML nodes, in the same order\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq1", "type" : "node()", "occurrence" : "*", "description" : "
the first sequence of nodes
" }, { "name" : "seq2", "type" : "node()", "occurrence" : "*", "description" : "
the second sequence of nodes
" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "sequence-type", "qname" : "functx:sequence-type", "signature" : "($items as item()*) as xs:string", "description" : " The sequence type that represents a sequence of nodes or values\n", "summary" : "

The sequence type that represents a sequence of nodes or values\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "items", "type" : "item()", "occurrence" : "*", "description" : "
the items whose sequence type you want to determine
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "siblings-same-name", "qname" : "functx:siblings-same-name", "signature" : "($element as element(*)?) as element(*)*", "description" : " The siblings of an XML element that have the same name\n", "summary" : "

The siblings of an XML element that have the same name\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "element", "type" : "element(*)", "occurrence" : "?", "description" : "
the node
" } ], "returns" : { "type" : "element(*)*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "siblings", "qname" : "functx:siblings", "signature" : "($node as node()?) as node()*", "description" : " The siblings of an XML node\n", "summary" : "

The siblings of an XML node\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "node()", "occurrence" : "?", "description" : "
the node
" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "sort-as-numeric", "qname" : "functx:sort-as-numeric", "signature" : "($seq as item()*) as item()*", "description" : " Sorts a sequence of numeric values or nodes\n", "summary" : "

Sorts a sequence of numeric values or nodes\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "item()", "occurrence" : "*", "description" : "
the sequence to sort
" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "sort-case-insensitive", "qname" : "functx:sort-case-insensitive", "signature" : "($seq as item()*) as item()*", "description" : " Sorts a sequence of values or nodes regardless of capitalization\n", "summary" : "

Sorts a sequence of values or nodes regardless of capitalization\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "item()", "occurrence" : "*", "description" : "
the sequence to sort
" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "sort-document-order", "qname" : "functx:sort-document-order", "signature" : "($seq as node()*) as node()*", "description" : " Sorts a sequence of nodes in document order\n", "summary" : "

Sorts a sequence of nodes in document order\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "node()", "occurrence" : "*", "description" : "
the sequence to sort
" } ], "returns" : { "type" : "node()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "sort", "qname" : "functx:sort", "signature" : "($seq as item()*) as item()*", "description" : " Sorts a sequence of values or nodes\n", "summary" : "

Sorts a sequence of values or nodes\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "seq", "type" : "item()", "occurrence" : "*", "description" : "
the sequence to sort
" } ], "returns" : { "type" : "item()*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "substring-after-if-contains", "qname" : "functx:substring-after-if-contains", "signature" : "($arg as xs:string?, $delim as xs:string) as xs:string?", "description" : " Performs substring-after, returning the entire string if it does not contain the delimiter\n", "summary" : "

Performs substring-after, returning the entire string if it does not contain the delimiter\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to substring
" }, { "name" : "delim", "type" : "xs:string", "occurrence" : null, "description" : "
the delimiter
" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "substring-after-last-match", "qname" : "functx:substring-after-last-match", "signature" : "($arg as xs:string?, $regex as xs:string) as xs:string", "description" : " The substring after the last text that matches a regex\n", "summary" : "

The substring after the last text that matches a regex\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to substring
" }, { "name" : "regex", "type" : "xs:string", "occurrence" : null, "description" : "
the regular expression
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "substring-after-last", "qname" : "functx:substring-after-last", "signature" : "($arg as xs:string?, $delim as xs:string) as xs:string", "description" : " The substring after the last occurrence of a delimiter\n", "summary" : "

The substring after the last occurrence of a delimiter\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to substring
" }, { "name" : "delim", "type" : "xs:string", "occurrence" : null, "description" : "
the delimiter
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "substring-after-match", "qname" : "functx:substring-after-match", "signature" : "($arg as xs:string?, $regex as xs:string) as xs:string?", "description" : " The substring after the first text that matches a regex\n", "summary" : "

The substring after the first text that matches a regex\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to substring
" }, { "name" : "regex", "type" : "xs:string", "occurrence" : null, "description" : "
the regular expression
" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "substring-before-if-contains", "qname" : "functx:substring-before-if-contains", "signature" : "($arg as xs:string?, $delim as xs:string) as xs:string?", "description" : " Performs substring-before, returning the entire string if it does not contain the delimiter\n", "summary" : "

Performs substring-before, returning the entire string if it does not contain the delimiter\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to substring
" }, { "name" : "delim", "type" : "xs:string", "occurrence" : null, "description" : "
the delimiter
" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "substring-before-last-match", "qname" : "functx:substring-before-last-match", "signature" : "($arg as xs:string?, $regex as xs:string) as xs:string?", "description" : " The substring after the first text that matches a regex\n", "summary" : "

The substring after the first text that matches a regex\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to substring
" }, { "name" : "regex", "type" : "xs:string", "occurrence" : null, "description" : "
the regular expression
" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "substring-before-last", "qname" : "functx:substring-before-last", "signature" : "($arg as xs:string?, $delim as xs:string) as xs:string", "description" : " The substring before the last occurrence of a delimiter\n", "summary" : "

The substring before the last occurrence of a delimiter\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to substring
" }, { "name" : "delim", "type" : "xs:string", "occurrence" : null, "description" : "
the delimiter
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "substring-before-match", "qname" : "functx:substring-before-match", "signature" : "($arg as xs:string?, $regex as xs:string) as xs:string", "description" : " The substring before the last text that matches a regex\n", "summary" : "

The substring before the last text that matches a regex\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to substring
" }, { "name" : "regex", "type" : "xs:string", "occurrence" : null, "description" : "
the regular expression
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "time", "qname" : "functx:time", "signature" : "($hour as xs:anyAtomicType, $minute as xs:anyAtomicType, $second as xs:anyAtomicType) as xs:time", "description" : " Construct a time from an hour, minute and second\n", "summary" : "

Construct a time from an hour, minute and second\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "hour", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the hour
" }, { "name" : "minute", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the minute
" }, { "name" : "second", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
the second
" } ], "returns" : { "type" : "xs:time", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "timezone-from-duration", "qname" : "functx:timezone-from-duration", "signature" : "($duration as xs:dayTimeDuration) as xs:string", "description" : " Converts an xs:dayTimeDuration into a timezone like \"-05:00\" or \"Z\"\n", "summary" : "

Converts an xs:dayTimeDuration into a timezone like \"-05:00\" or \"Z\"\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "duration", "type" : "xs:dayTimeDuration", "occurrence" : null, "description" : "
the duration
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "total-days-from-duration", "qname" : "functx:total-days-from-duration", "signature" : "($duration as xs:dayTimeDuration?) as xs:decimal?", "description" : " The total number of days in a dayTimeDuration\n", "summary" : "

The total number of days in a dayTimeDuration\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "duration", "type" : "xs:dayTimeDuration", "occurrence" : "?", "description" : "
the duration
" } ], "returns" : { "type" : "xs:decimal?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "total-hours-from-duration", "qname" : "functx:total-hours-from-duration", "signature" : "($duration as xs:dayTimeDuration?) as xs:decimal?", "description" : " The total number of hours in a dayTimeDuration\n", "summary" : "

The total number of hours in a dayTimeDuration\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "duration", "type" : "xs:dayTimeDuration", "occurrence" : "?", "description" : "
the duration
" } ], "returns" : { "type" : "xs:decimal?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "total-minutes-from-duration", "qname" : "functx:total-minutes-from-duration", "signature" : "($duration as xs:dayTimeDuration?) as xs:decimal?", "description" : " The total number of minutes in a dayTimeDuration\n", "summary" : "

The total number of minutes in a dayTimeDuration\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "duration", "type" : "xs:dayTimeDuration", "occurrence" : "?", "description" : "
the duration
" } ], "returns" : { "type" : "xs:decimal?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "total-months-from-duration", "qname" : "functx:total-months-from-duration", "signature" : "($duration as xs:yearMonthDuration?) as xs:decimal?", "description" : " The total number of months in a yearMonthDuration\n", "summary" : "

The total number of months in a yearMonthDuration\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "duration", "type" : "xs:yearMonthDuration", "occurrence" : "?", "description" : "
the duration
" } ], "returns" : { "type" : "xs:decimal?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "total-seconds-from-duration", "qname" : "functx:total-seconds-from-duration", "signature" : "($duration as xs:dayTimeDuration?) as xs:decimal?", "description" : " The total number of seconds in a dayTimeDuration\n", "summary" : "

The total number of seconds in a dayTimeDuration\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "duration", "type" : "xs:dayTimeDuration", "occurrence" : "?", "description" : "
the duration
" } ], "returns" : { "type" : "xs:decimal?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "total-years-from-duration", "qname" : "functx:total-years-from-duration", "signature" : "($duration as xs:yearMonthDuration?) as xs:decimal?", "description" : " The total number of years in a yearMonthDuration\n", "summary" : "

The total number of years in a yearMonthDuration\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "duration", "type" : "xs:yearMonthDuration", "occurrence" : "?", "description" : "
the duration
" } ], "returns" : { "type" : "xs:decimal?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "trim", "qname" : "functx:trim", "signature" : "($arg as xs:string?) as xs:string", "description" : " Trims leading and trailing whitespace\n", "summary" : "

Trims leading and trailing whitespace\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to trim
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "update-attributes", "qname" : "functx:update-attributes", "signature" : "($elements as element(*)*, $attrNames as xs:QName*, $attrValues as xs:anyAtomicType*) as element(*)?", "description" : " Updates the attribute value of an XML element\n", "summary" : "

Updates the attribute value of an XML element\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "elements", "type" : "element(*)", "occurrence" : "*", "description" : "
the element(s) for which you wish to update the attribute
" }, { "name" : "attrNames", "type" : "xs:QName", "occurrence" : "*", "description" : "
the name(s) of the attribute(s) to add
" }, { "name" : "attrValues", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the value(s) of the attribute(s) to add
" } ], "returns" : { "type" : "element(*)?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "value-except", "qname" : "functx:value-except", "signature" : "($arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType*) as xs:anyAtomicType*", "description" : " The values in one sequence that aren't in another sequence\n", "summary" : "

The values in one sequence that aren't in another sequence\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the first sequence
" }, { "name" : "arg2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the second sequence
" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "value-intersect", "qname" : "functx:value-intersect", "signature" : "($arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType*) as xs:anyAtomicType*", "description" : " The intersection of two sequences of values\n", "summary" : "

The intersection of two sequences of values\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the first sequence
" }, { "name" : "arg2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the second sequence
" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "value-union", "qname" : "functx:value-union", "signature" : "($arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType*) as xs:anyAtomicType*", "description" : " The union of two sequences of values\n", "summary" : "

The union of two sequences of values\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg1", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the first sequence
" }, { "name" : "arg2", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the second sequence
" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "word-count", "qname" : "functx:word-count", "signature" : "($arg as xs:string?) as xs:integer", "description" : " The number of words\n", "summary" : "

The number of words\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to measure
" } ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "words-to-camel-case", "qname" : "functx:words-to-camel-case", "signature" : "($arg as xs:string?) as xs:string", "description" : " Turns a string of words into camelCase\n", "summary" : "

Turns a string of words into camelCase\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "xs:string", "occurrence" : "?", "description" : "
the string to modify
" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "wrap-values-in-elements", "qname" : "functx:wrap-values-in-elements", "signature" : "($values as xs:anyAtomicType*, $elementName as xs:QName) as element(*)*", "description" : " Wraps a sequence of atomic values in XML elements\n", "summary" : "

Wraps a sequence of atomic values in XML elements\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "values", "type" : "xs:anyAtomicType", "occurrence" : "*", "description" : "
the values to wrap in elements
" }, { "name" : "elementName", "type" : "xs:QName", "occurrence" : null, "description" : "
the name of the elements to construct
" } ], "returns" : { "type" : "element(*)*", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "yearMonthDuration", "qname" : "functx:yearMonthDuration", "signature" : "($years as xs:decimal?, $months as xs:integer?) as xs:yearMonthDuration", "description" : " Construct a yearMonthDuration from a number of years and months\n", "summary" : "

Construct a yearMonthDuration from a number of years and months\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "years", "type" : "xs:decimal", "occurrence" : "?", "description" : "
the number of years
" }, { "name" : "months", "type" : "xs:integer", "occurrence" : "?", "description" : "
the number of months
" } ], "returns" : { "type" : "xs:yearMonthDuration", "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/zorba-query" : { "ns" : "http://zorba.io/modules/zorba-query", "description" : " This module contains functions to compile and evaluate queries\n written in either JSONiq or XQuery. Also, it contains function that\n allow to parameterize the static or dynamic evaluation phase.\n", "sees" : [ ], "authors" : [ "Juan Zacarias" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://zorba.io/features", "prefix" : "f" }, { "uri" : "http://zorba.io/options/features", "prefix" : "op" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/modules/zorba-query", "prefix" : "zq" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "bind-context-item", "qname" : "zq:bind-context-item", "signature" : "($query-key as xs:anyURI, $dot as item()) as empty-sequence() external", "description" : "

This function binds the context-item of the prepared query\n identified by the given key to the $dot argument.

\n", "summary" : "

This function binds the context-item of the prepared query\n identified by the given key to the $dot argument.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "query-key", "type" : "xs:anyURI", "occurrence" : null, "description" : "
the identifier for a compiled query
" }, { "name" : "dot", "type" : "item()", "occurrence" : null, "description" : "
the context item to bind
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function has side effects and returns the empty sequence." }, "errors" : [ "zq:NO_QUERY_MATCH if no query with the given identifier was prepared." ] }, { "isDocumented" : true, "arity" : 3, "name" : "bind-variable", "qname" : "zq:bind-variable", "signature" : "($query-key as xs:anyURI, $var as xs:QName, $value as item()*) as empty-sequence() external", "description" : "

This function binds the variable with name $name of\n the prepared query identified by $query-key to the given sequence.

\n", "summary" : "

This function binds the variable with name $name of\n the prepared query identified by $query-key to the given sequence.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "query-key", "type" : "xs:anyURI", "occurrence" : null, "description" : "
the identifier for a compiled query
" }, { "name" : "var", "type" : "xs:QName", "occurrence" : null, "description" : "" }, { "name" : "value", "type" : "item()", "occurrence" : "*", "description" : "
the sequence to which the external variable $name should be bound
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function has side effects and returns the empty sequence." }, "errors" : [ "zq:NO_QUERY_MATCH if no query with the given identifier was prepared.", "zq:UNDECLARED_VARIABLE if the given variable is not declared in the query." ] }, { "isDocumented" : true, "arity" : 1, "name" : "delete-query", "qname" : "zq:delete-query", "signature" : "($query-key as xs:anyURI) as empty-sequence() external", "description" : "

Deletes the prepared query associated with the given identifier.

\n

After the query is deleted, the corresponding identifier should\n not be used as argument to any of the functions of this module.

\n", "summary" : "

Deletes the prepared query associated with the given identifier.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "query-key", "type" : "xs:anyURI", "occurrence" : null, "description" : "
the identifier for a compiled query
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function has side effects and returns the empty sequence." }, "errors" : [ "zq:NO_QUERY_MATCH if no query with the given identifier was prepared." ] }, { "isDocumented" : true, "arity" : 1, "name" : "evaluate-sequential", "qname" : "zq:evaluate-sequential", "signature" : "($query-key as xs:string) as item()* external", "description" : "

Evaluates the given prepared query and returns the result\n of the evaluation. The query must be sequential.

\n", "summary" : "

Evaluates the given prepared query and returns the result\n of the evaluation.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "query-key", "type" : "xs:string", "occurrence" : null, "description" : "
the identifier for a compiled query
" } ], "returns" : { "type" : "item()*", "description" : "the result of evaluating the query." }, "errors" : [ "zq:NO_QUERY_MATCH if no query with the given identifier was prepared.", "zq:QUERY_NOT_SEQUENTIAL if the query is not sequential.", "zq:QUERY_IS_UPDATING if the query is an updating query.", "any dynamic error that is raised by evaluating the given query." ] }, { "isDocumented" : true, "arity" : 1, "name" : "evaluate-updating", "qname" : "zq:evaluate-updating", "signature" : "($query-key as xs:anyURI) external", "description" : "

Evaluates the given prepared query and applies the updates\n computed by this query. The query must be an updating query.

\n", "summary" : "

Evaluates the given prepared query and applies the updates\n computed by this query.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "query-key", "type" : "xs:anyURI", "occurrence" : null, "description" : "
the identifier for a compiled query
" } ], "returns" : { "type" : null, "description" : "the function has side effects because it applies the updates of the query. It returns the empty sequence." }, "errors" : [ "zq:NO_QUERY_MATCH if no query with the given identifier was prepared.", "zq:QUERY_NOT_UPDATING if the query is not an updating query.", "zq:QUERY_IS_SEQUENTIAL if the query is sequential.", "any dynamic error that is raised by evaluating the given query or applying its updates." ] }, { "isDocumented" : true, "arity" : 1, "name" : "evaluate", "qname" : "zq:evaluate", "signature" : "($query-key as xs:anyURI) as item()* external", "description" : "

Evaluates the given prepared query and returns the result\n of the evaluation. The query must not be sequential or\n updating.

\n", "summary" : "

Evaluates the given prepared query and returns the result\n of the evaluation.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query-key", "type" : "xs:anyURI", "occurrence" : null, "description" : "
the identifier for a compiled query
" } ], "returns" : { "type" : "item()*", "description" : "the result of evaluating the given query" }, "errors" : [ "zq:NO_QUERY_MATCH if no query with the given identifier was prepared.", "zq:QUERY_IS_UPDATING if the query is an updating query.", "zq:QUERY_IS_SEQUENTIAL if the query is sequential.", "any dynamic error that is raised by evaluating the given query." ] }, { "isDocumented" : true, "arity" : 1, "name" : "external-variables", "qname" : "zq:external-variables", "signature" : "($query-key as xs:anyURI) as xs:QName* external", "description" : "

The function returns the names of the external variables that\n are declared in the given query (either in the main module or\n in any of the imported library modules).

\n", "summary" : "

The function returns the names of the external variables that\n are declared in the given query (either in the main module or\n in any of the imported library modules).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query-key", "type" : "xs:anyURI", "occurrence" : null, "description" : "
the identifier for a compiled query
" } ], "returns" : { "type" : "xs:QName*", "description" : "the sequence of names of the said external variables." }, "errors" : [ "zq:NO_QUERY_MATCH if no query with the given identifier was prepared." ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-bound-context-item", "qname" : "zq:is-bound-context-item", "signature" : "($query-key as xs:anyURI) as xs:boolean external", "description" : "

The function tests if the context-item is bound for the\n execution of the query referred to by the given query identifier.

\n", "summary" : "

The function tests if the context-item is bound for the\n execution of the query referred to by the given query identifier.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query-key", "type" : "xs:anyURI", "occurrence" : null, "description" : "
the identifier for a compiled query
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the context-item is bound, false otherwise." }, "errors" : [ "zq:NO_QUERY_MATCH if no query with the given identifier was prepared." ] }, { "isDocumented" : true, "arity" : 2, "name" : "is-bound-variable", "qname" : "zq:is-bound-variable", "signature" : "($query-key as xs:anyURI, $var-name as xs:QName) as xs:boolean external", "description" : "

The function tests if the given variable is bound for the\n execution of the query referred to by the given query identifier.

\n", "summary" : "

The function tests if the given variable is bound for the\n execution of the query referred to by the given query identifier.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query-key", "type" : "xs:anyURI", "occurrence" : null, "description" : "
the identifier for a compiled query
" }, { "name" : "var-name", "type" : "xs:QName", "occurrence" : null, "description" : "
the name of the variable
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the variable is bound, false otherwise." }, "errors" : [ "zq:NO_QUERY_MATCH if no query with the given identifier was prepared.", "zq:UNDECLARED_VARIABLE if the given variable is not declared in the query." ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-sequential", "qname" : "zq:is-sequential", "signature" : "($query-key as xs:anyURI) as xs:boolean external", "description" : "

The function tests if the query identified by the given key\n is sequential query.

\n", "summary" : "

The function tests if the query identified by the given key\n is sequential query.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query-key", "type" : "xs:anyURI", "occurrence" : null, "description" : "
the identifier for a compiled query
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the query is a sequential, false otherwise." }, "errors" : [ "zq:NO_QUERY_MATCH if no query with the given identifier was prepared." ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-updating", "qname" : "zq:is-updating", "signature" : "($query-key as xs:anyURI) as xs:boolean external", "description" : "

The function tests if the query identified by the given key\n is an updating query.

\n", "summary" : "

The function tests if the query identified by the given key\n is an updating query.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query-key", "type" : "xs:anyURI", "occurrence" : null, "description" : "
the identifier for a compiled query
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the query is an updating query, false otherwise." }, "errors" : [ "zq:NO_QUERY_MATCH if no query with the given identifier was prepared." ] }, { "isDocumented" : true, "arity" : 1, "name" : "load-from-query-plan", "qname" : "zq:load-from-query-plan", "signature" : "($plan as xs:base64Binary) as xs:anyURI external", "description" : "

The function loads a given query for execution from a\n xs:base64Binary query plan, obtained through the zq:query-plan function.

\n

If the query was successfully loaded, the function returns an\n identifier as xs:anyURI. This URI can be passed to other functions\n of this module (e.g. to actually evaluate the query). The URI\n is opaque and its lifetime is bound by the lifetime of the query\n that invoked this function. Further reference or uses\n of the identifier lead to unexpected results.

\n

\n

Successfully prepared queries need to be deleted by passing the resulting\n identifier to the zq:delete-query function of this module.

\n", "summary" : "

The function loads a given query for execution from a\n xs:base64Binary query plan, obtained through the zq:query-plan function.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "plan", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the binary query plan.
" } ], "returns" : { "type" : "xs:anyURI", "description" : "an identifier for the compiled query that can be passed as arguments to other functions of this module." }, "errors" : [ "any (static or type) error that may be raised during the compilation of the query. For example, err:XPST0003 if the given query could not be parsed." ] }, { "isDocumented" : true, "arity" : 3, "name" : "load-from-query-plan", "qname" : "zq:load-from-query-plan", "signature" : "($plan as xs:base64Binary, $resolver as item()?, $mapper as item()?) as xs:anyURI external", "description" : "

The function loads a given query for execution from a\n xs:base64Binary query plan, obtained through the zq:query-plan function.

\n

If the query was successfully loaded, the function returns an\n identifier as xs:anyURI. This URI can be passed to other functions\n of this module (e.g. to actually evaluate the query). The URI\n is opaque and its lilfetime is bound by the lifetime of the query\n that invoked this function. Further reference or uses\n of the identifier lead to unexpected results.

\n

\n

For important notes regarding the second and third parameters of the\n function, review the comments in zq:prepare-main-module#3.

\n

\n

Successfully prepared queries need to be deleted by passing the resulting\n identifier to the zq:delete-query function of this module.

\n", "summary" : "

The function loads a given query for execution from a\n xs:base64Binary query plan, obtained through the zq:query-plan function.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "plan", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the binary query plan.
" }, { "name" : "resolver", "type" : "item()", "occurrence" : "?", "description" : "
the URL resolver function.
" }, { "name" : "mapper", "type" : "item()", "occurrence" : "?", "description" : "
the URI mapper function.
" } ], "returns" : { "type" : "xs:anyURI", "description" : "an identifier for the compiled query that can be passed as arguments to other functions of this module." }, "errors" : [ "any (static or type) error that may be raised during the compilation of the query. For example, err:XPST0003 if the given query could not be parsed." ] }, { "isDocumented" : true, "arity" : 1, "name" : "prepare-library-module", "qname" : "zq:prepare-library-module", "signature" : "($library-module-text as xs:string) as empty-sequence() external", "description" : "

This function compiles a given XQuery or JSONiq library module.\n It can be used to compile-check a module.

\n", "summary" : "

This function compiles a given XQuery or JSONiq library module.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "library-module-text", "type" : "xs:string", "occurrence" : null, "description" : "
the library module that should be prepared.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the empty-sequence." }, "errors" : [ "any (static or type) error that may be raised during the compilation of the library module. For example, err:XPST0003 if the given library module could not be parsed." ] }, { "isDocumented" : true, "arity" : 1, "name" : "prepare-main-module", "qname" : "zq:prepare-main-module", "signature" : "($main-module-text as xs:string) as xs:anyURI external", "description" : "

The function prepares a given a query for execution.

\n

If the query was successfully compiled, the function returns an\n identifier as xs:anyURI. This URI can be passed to other functions\n of this module (e.g. to actually evaluate the query). The URI\n is opaque and its lifetime is bound by the lifetime of the query\n that invoked this function. Further reference or uses\n of the identifier lead to unexpected results.

\n

\n

Successfully prepared queries need to be deleted by passing the resulting\n identifier to the zq:delete-query function of this module.

\n", "summary" : "

The function prepares a given a query for execution.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "main-module-text", "type" : "xs:string", "occurrence" : null, "description" : "
the query that should be prepared. The query needs to be a XQuery or JSONiq main module.
" } ], "returns" : { "type" : "xs:anyURI", "description" : "an identifier for the compiled query that can be passed as arguments to other functions of this module." }, "errors" : [ "any (static or type) error that may be raised during the compilation of the query. For example, err:XPST0003 if the given query could not be parsed." ] }, { "isDocumented" : true, "arity" : 3, "name" : "prepare-main-module", "qname" : "zq:prepare-main-module", "signature" : "($main-module-text as xs:string, $resolver as function (xs:string, xs:string) as item()??, $mapper as function (xs:string, xs:string) as xs:string*?) as xs:anyURI external", "description" : "

The function prepares a given query for execution.

\n

If the query was successfully compiled, the function returns an\n identifier as xs:anyURI. This URI can be passed to other functions\n of this module (e.g. to actually evaluate the query). The URI\n is opaque and its lifetime is bound by the lifetime of the query\n that invoked this function. Further reference or uses\n of the identifier lead to unexpected results.

\n

\n

Important notes regarding the second and third parameters of the function:

\n

--------------------------------------------------------------------------

\n

\n

These parameters allow you to specify a URL resolver and a URI mapper\n for Zorba to use when executing this query. See\n here

\n

\n

\n

The function must return the empty sequence when the specified $namespace\n or $entity are not the ones to be resolved.

\n

\n

Example:

\n

\n

declare function mymod:url-resolver($namespace as xs:string, $entity as xs:string) as item()?\n {\n  if($namespace = 'http://test.xq')\n  then \"module namespace test = 'http://test'; declare function test:foo(){'foo'};\"\n  else ()\n };
\n

\n

The URL resolver function's namespace, name, and parameter naming are\n not restricted by ZQ.

\n

\n

The URL resolver function's return type is not restricted, it could be a string, a sequence,\n a node, etc. All the outputs types are to be serialized as a string.

\n

\n

The third parameter is a function item for a URI mapper.

\n \n

The URI mapper must return an empty sequence when the specified $namesapce or $entity\n are not to be mapped. Unlike the URL resolver this function must return a sequence of strings.

\n

\n

Example:

\n

\n

declare function mymod:uri-mapper($namespace as xs:string, $entity as xs:string)\n {\n  if($namespace = 'http://test')\n  then (\"http://zorba.io/test\", \"http://foo.com/schema/test\")\n  else ()\n };
\n

\n

The URI mapper function's namespace, name, and parameter naming are\n not restricted by ZQ.

\n

\n

In order to pass the above URL resolver and URI mapper to this function,\n use the following syntax:

\n

\n

variable $queryID := zq:prepare-main-module(\"..query text..\",\n      mymod:url-resolver#2, mymod:uri-mapper#2);
\n

\n

That is, the QName of the function followed by \"#2\". This is XQuery\n \"higher-order function\" syntax, meaning the function with the specified\n QName which takes two arguments. Since URL resolvers and URI mappers\n must take two arguments, both will always be specified with \"#2\".

\n

\n

Both the URL resolver and URI mapper functions are optional, meaning you\n may pass the empty-sequence () for either.

\n

\n

Successfully prepared queries need to be deleted by passing the resulting\n identifier to the zq:delete-query function of this module.

\n", "summary" : "

The function prepares a given query for execution.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "main-module-text", "type" : "xs:string", "occurrence" : null, "description" : "
the query that should be prepared. The query needs to be a XQuery or JSONiq main module.
" }, { "name" : "resolver", "type" : "function (xs:string, xs:string) as item()?", "occurrence" : "?", "description" : "
the URL resolver function.
" }, { "name" : "mapper", "type" : "function (xs:string, xs:string) as xs:string*", "occurrence" : "?", "description" : "
the URI mapper function.
" } ], "returns" : { "type" : "xs:anyURI", "description" : "an identifier for the compiled query that can be passed as arguments to other functions of this module." }, "errors" : [ "any (static or type) error that may be raised during the compilation of the query. For example, err:XPST0003 if the given query could not be parsed." ] }, { "isDocumented" : true, "arity" : 1, "name" : "query-plan", "qname" : "zq:query-plan", "signature" : "($query-key as xs:anyURI) as xs:base64Binary external", "description" : "

Returns the compiled query identified by the given query-key\n as binary data.

\n", "summary" : "

Returns the compiled query identified by the given query-key\n as binary data.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query-key", "type" : "xs:anyURI", "occurrence" : null, "description" : "
the identifier of a compiled query.
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "the query as xs:base64Binary." }, "errors" : [ "zq:NO_QUERY_MATCH if no query with the given identifier was prepared.", "zq:NO_QUERY_PLAN if there is an error serializing the query." ] }, { "isDocumented" : true, "arity" : 2, "name" : "variable-value", "qname" : "zq:variable-value", "signature" : "($query-key as xs:anyURI, $var-name as xs:QName) as item()* external", "description" : "

This function returns the value of a variable that is bound in the\n given query.

\n", "summary" : "

This function returns the value of a variable that is bound in the\n given query.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "query-key", "type" : "xs:anyURI", "occurrence" : null, "description" : "
the identifier of a compiled query.
" }, { "name" : "var-name", "type" : "xs:QName", "occurrence" : null, "description" : "
the name of the variable whose value should be returned.
" } ], "returns" : { "type" : "item()*", "description" : "the value bound to the given variable." }, "errors" : [ "zq:NO_QUERY_MATCH if no query with the given identifier was prepared.", "zq:UNDECLARED_VARIABLE if the given variable is not declared in the query.", "zq:UNBOUND_VARIABLE if the given variable doesn't have a value." ] } ], "variables" : [ ] }, "http://xbrl.io/modules/bizql/hypercubes" : { "ns" : "http://xbrl.io/modules/bizql/hypercubes", "description" : "

This module provides functionality for manipulating hypercubes.

\n

A hypercube provides a multi-dimensional structure to organize facts.

\n

The dimensions of a hypercube correspond to XBRL aspects (concepts, entities, periods,\n units, further XBRL dimensions). An XBRL hypercube only is made of XBRL dimensions, however\n including the other aspects as well is very useful in the context of NOLAP, so that xbrl.io\n does so.

\n

xbrl.io introduces the notion of default hypercube. A default hypercube is implicitly added\n to each component, and only contains the concept, entity, period and unit aspects.\n In other words, the default hypercube\n of a component contains all these facts that do not have any XBRL dimensions.

\n

With this module, you can retrieve all hypercubes contained in a component. You can\n retrieve all facts contained in a hypercube (default dimension values are processed automatically),\n either in raw form, or organized as a (2D) fact table. You can also populate a network (for example,\n a presentation network) with the facts contained in a hypercube.

\n", "sees" : [ ], "authors" : [ "Charles Hoffman", "Matthias Brantner", "Dennis Knochenwefel", "Ghislain Fourny" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://xbrl.io/modules/bizql/archives", "prefix" : "archives" }, { "uri" : "http://xbrl.io/modules/bizql/concept-maps", "prefix" : "concept-maps" }, { "uri" : "http://xbrl.io/modules/bizql/entities", "prefix" : "entities" }, { "uri" : "http://xbrl.io/modules/bizql/facts", "prefix" : "facts" }, { "uri" : "http://xbrl.io/modules/bizql/hypercubes", "prefix" : "hypercubes" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 0, "name" : "dimensionless-hypercube", "qname" : "hypercubes:dimensionless-hypercube", "signature" : "() as object()", "description" : "

Returns an instantiation of a dimensionless Hypercube containing only the basic\n characteristics (xbrl:Concept, xbrl:Period, xbrl:Entity, and xbrl:Unit).\n For each of those included aspects the value space is not limited.

\n", "summary" : "

Returns an instantiation of a dimensionless Hypercube containing only the basic\n characteristics (xbrl:Concept, xbrl:Period, xbrl:Entity, and xbrl:Unit).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()", "description" : "dimensionless hypercube instantiation." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "dimensionless-hypercube", "qname" : "hypercubes:dimensionless-hypercube", "signature" : "($options as object()?) as object()", "description" : "

Returns an instantiation of a dimensionless Hypercube containing only the basic\n characteristics (xbrl:Concept, xbrl:Period, xbrl:Entity, and xbrl:Unit).\n For each of those included aspects the value space is not limited.

\n", "summary" : "

Returns an instantiation of a dimensionless Hypercube containing only the basic\n characteristics (xbrl:Concept, xbrl:Period, xbrl:Entity, and xbrl:Unit).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
: additional options among which: - Concepts: an array of concept names to include in the hypercube. - Periods: an array of periods to include in the hypercube. - Entities: an array of EIDs to include in the hypercube. - Units: an array of units to include in the hypercube.
" } ], "returns" : { "type" : "object()", "description" : "dimensionless hypercube instantiation." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "fact-table-for-hypercube", "qname" : "hypercubes:fact-table-for-hypercube", "signature" : "($hypercube as object(), $archives as item()*) as array()", "description" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied hypercube, and populates them with the default dimension values\n when missing.

\n", "summary" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied hypercube, and populates them with the default dimension values\n when missing.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "hypercube", "type" : "object()", "occurrence" : null, "description" : "
a hypercube.
" }, { "name" : "archives", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their AIDs or $hypercubes:ALL_ARCHIVES for no filtering.
" } ], "returns" : { "type" : "array()", "description" : "a sequence of facts with populated dimension values." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "fact-table-for-hypercube", "qname" : "hypercubes:fact-table-for-hypercube", "signature" : "($hypercube as object(), $archives as item()*, $options as object()?) as array()", "description" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied hypercube, and populates them with the default dimension values\n when missing.

\n", "summary" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied hypercube, and populates them with the default dimension values\n when missing.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "hypercube", "type" : "object()", "occurrence" : null, "description" : "
a hypercube.
" }, { "name" : "archives", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their AIDs
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard fact retrieving options.
" } ], "returns" : { "type" : "array()", "description" : "a sequence of facts with populated dimension values." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "facts-for-hypercube", "qname" : "hypercubes:facts-for-hypercube", "signature" : "($hypercube as object(), $archives as item()*) as item()*", "description" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied hypercube, and populates them with the default dimension values\n when missing.

\n", "summary" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied hypercube, and populates them with the default dimension values\n when missing.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "hypercube", "type" : "object()", "occurrence" : null, "description" : "
a hypercube.
" }, { "name" : "archives", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their AIDs or $hypercubes:ALL_ARCHIVES for no filtering.
" } ], "returns" : { "type" : "item()*", "description" : "a sequence of facts with populated dimension values." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "facts-for-hypercube", "qname" : "hypercubes:facts-for-hypercube", "signature" : "($hypercube as object(), $archives as item()*, $options as object()?) as item()*", "description" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied hypercube, and populates them with the default dimension values\n when missing.

\n", "summary" : "

Retrieves all facts from the supplied archives, that are relevant to the\n supplied hypercube, and populates them with the default dimension values\n when missing.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "hypercube", "type" : "object()", "occurrence" : null, "description" : "
a hypercube.
" }, { "name" : "archives", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their AIDs or $hypercubes:ALL_ARCHIVES for no filtering.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard fact retrieving options.
" } ], "returns" : { "type" : "item()*", "description" : "a sequence of facts with populated dimension values." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "hypercubes-for-components", "qname" : "hypercubes:hypercubes-for-components", "signature" : "($components as object()*) as object()*", "description" : "

Retrieves all hypercubes in the supplied components.

\n", "summary" : "

Retrieves all hypercubes in the supplied components.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "components", "type" : "object()", "occurrence" : "*", "description" : "
a sequence of components.
" } ], "returns" : { "type" : "object()*", "description" : "all hypercubes." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "hypercubes-for-components", "qname" : "hypercubes:hypercubes-for-components", "signature" : "($components as object()*, $names as string*) as object()*", "description" : "

Retrieves all hypercubes in the supplied components and\n with the given names.

\n", "summary" : "

Retrieves all hypercubes in the supplied components and\n with the given names.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "components", "type" : "object()", "occurrence" : "*", "description" : "
a sequence of components.
" }, { "name" : "names", "type" : "string", "occurrence" : "*", "description" : "
a sequence of names.
" } ], "returns" : { "type" : "object()*", "description" : "all hypercubes." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "populate-networks-with-facts", "qname" : "hypercubes:populate-networks-with-facts", "signature" : "($networks as object()*, $hypercube as object(), $archives as item()*) as object()*", "description" : "

Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied hypercube. Default dimension values are added to the facts\n when missing.

\n", "summary" : "

Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied hypercube.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "networks", "type" : "object()", "occurrence" : "*", "description" : "
networks.
" }, { "name" : "hypercube", "type" : "object()", "occurrence" : null, "description" : "
a hypercube.
" }, { "name" : "archives", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their AIDs or $hypercubes:ALL_ARCHIVES for no filtering.
" } ], "returns" : { "type" : "object()*", "description" : "a sequence of facts with populated dimension values." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "populate-networks-with-facts", "qname" : "hypercubes:populate-networks-with-facts", "signature" : "($networks as object()*, $hypercube as object(), $archives as item()*, $options as object()?) as object()*", "description" : "

Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied hypercube. Default dimension values are added to the facts\n when missing.

\n", "summary" : "

Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied hypercube.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "networks", "type" : "object()", "occurrence" : "*", "description" : "
networks.
" }, { "name" : "hypercube", "type" : "object()", "occurrence" : null, "description" : "
a hypercube.
" }, { "name" : "archives", "type" : "item()", "occurrence" : "*", "description" : "
a sequence of archives or their AIDs.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard fact retrieving options.
" } ], "returns" : { "type" : "object()*", "description" : "a sequence of facts with populated dimension values." }, "errors" : [ ] } ], "variables" : [ { "name" : "hypercubes:ALL_ARCHIVES", "type" : "boolean", "description" : " Joker for all archives.\n" } ] }, "http://www.zorba-xquery.com/modules/xqdoc/batch" : { "ns" : "http://www.zorba-xquery.com/modules/xqdoc/batch", "description" : " Process XQDoc batches.\n This module generates XQDoc HTML documentation from multiple\n XQuery modules.\n", "sees" : [ ], "authors" : [ "William Candillon wcandillon at gmail dot com" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.zorba-xquery.com/modules/xqdoc/batch", "prefix" : "batch" }, { "uri" : "http://www.w3.org/2005/xqt-errors", "prefix" : "err" }, { "uri" : "http://expath.org/ns/file", "prefix" : "file" }, { "uri" : "http://www.functx.com", "prefix" : "functx" }, { "uri" : "http://www.w3.org/1999/xhtml", "prefix" : "h" }, { "uri" : "http://www.zorba-xquery.com/modules/xqdoc/html", "prefix" : "html" }, { "uri" : "http://www.zorba-xquery.com/modules/xqdoc/menu", "prefix" : "menu" }, { "uri" : "http://www.w3.org/2010/xslt-xquery-serialization", "prefix" : "out" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://www.xqdoc.org/1.0", "prefix" : "xq" }, { "uri" : "http://zorba.io/modules/xqdoc", "prefix" : "xqdoc" } ], "functions" : [ { "isDocumented" : false, "arity" : 2, "name" : "add-predeclared-namespaces", "qname" : "batch:add-predeclared-namespaces", "signature" : "($xqdoc as element(xq:xqdoc), $namespaces as element(namespace)*) as element(xq:xqdoc)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "xqdoc", "type" : "element(xq:xqdoc)", "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : "element(namespace)", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "element(xq:xqdoc)", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "add-trailing-slash", "qname" : "batch:add-trailing-slash", "signature" : "($path as xs:string) as xs:string", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "path", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "build-xqdoc", "qname" : "batch:build-xqdoc", "signature" : "($output-folder as xs:string, $static-folders as xs:string*, $template as element(*), $modules as element(modules))", "description" : " Run an XQDoc batch.\n", "summary" : "

Run an XQDoc batch.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "output-folder", "type" : "xs:string", "occurrence" : null, "description" : "
Where to write the generated files.
" }, { "name" : "static-folders", "type" : "xs:string", "occurrence" : "*", "description" : "
Where to copy the static files from.
" }, { "name" : "template", "type" : "element(*)", "occurrence" : null, "description" : "
HTML layout of the generated files. The layount can contains different variables. For instance:
is a valid example. Three variable names are available: page, title, and menu.
" }, { "name" : "modules", "type" : "element(modules)", "occurrence" : null, "description" : "
Document describing the documentation project. For instance:
   
" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "copy-static-folders", "qname" : "batch:copy-static-folders", "signature" : "($output-folder as xs:string, $static-folders as xs:string*)", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "output-folder", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "static-folders", "type" : "xs:string", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "create-page", "qname" : "batch:create-page", "signature" : "($output-folder as xs:string, $page-name as xs:string, $page as element(h:html))", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "output-folder", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "page-name", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "page", "type" : "element(h:html)", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "create-xml-folder", "qname" : "batch:create-xml-folder", "signature" : "($folder as xs:string)", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "folder", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "page", "qname" : "batch:page", "signature" : "($template as element(*), $menu as element(ul), $section as element(*)) as element(h:html)", "description" : "", "summary" : "", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "template", "type" : "element(*)", "occurrence" : null, "description" : "" }, { "name" : "menu", "type" : "element(ul)", "occurrence" : null, "description" : "" }, { "name" : "section", "type" : "element(*)", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "element(h:html)", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "save-xml", "qname" : "batch:save-xml", "signature" : "($output-file, $page)", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "output-file", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "page", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "section", "qname" : "batch:section", "signature" : "($sections as element(section)+) as element(section)+", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "sections", "type" : "element(section)", "occurrence" : "+", "description" : "" } ], "returns" : { "type" : "element(section)+", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "section", "qname" : "batch:section", "signature" : "($sections as element(section)+, $level as xs:integer) as element(section)+", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "sections", "type" : "element(section)", "occurrence" : "+", "description" : "" }, { "name" : "level", "type" : "xs:integer", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "element(section)+", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "xqdoc", "qname" : "batch:xqdoc", "signature" : "($module as element(module)) as element(xq:xqdoc)", "description" : "", "summary" : "", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "module", "type" : "element(module)", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "element(xq:xqdoc)", "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/data-cleaning/hybrid-string-similarity" : { "ns" : "http://zorba.io/modules/data-cleaning/hybrid-string-similarity", "description" : "

This library module provides hybrid string similarity functions, combining the properties of\n character-based string similarity functions and token-based string similarity functions.

\n

\n

The logic contained in this module is not specific to any particular XQuery implementation,\n although the module requires the trigonometic functions of XQuery 3.0 or a math extension\n function such as sqrt($x as numeric) for computing the square root.

\n", "sees" : [ ], "authors" : [ "Bruno Martins and Diogo Simões" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.w3.org/2005/xpath-functions/math", "prefix" : "math" }, { "uri" : "http://zorba.io/modules/data-cleaning/set-similarity", "prefix" : "set" }, { "uri" : "http://zorba.io/modules/data-cleaning/character-based-string-similarity", "prefix" : "simc" }, { "uri" : "http://zorba.io/modules/data-cleaning/hybrid-string-similarity", "prefix" : "simh" }, { "uri" : "http://zorba.io/modules/data-cleaning/phonetic-string-similarity", "prefix" : "simp" }, { "uri" : "http://zorba.io/modules/data-cleaning/token-based-string-similarity", "prefix" : "simt" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 4, "name" : "monge-elkan-jaro-winkler", "qname" : "simh:monge-elkan-jaro-winkler", "signature" : "($s1 as xs:string, $s2 as xs:string, $prefix as xs:integer, $fact as xs:double) as xs:double", "description" : "

Returns the Monge-Elkan similarity coefficient between two strings, using the Jaro-Winkler

\n

similarity function to discover token identity.

\n

\n

Example usage :

 monge-elkan-jaro-winkler(\"Comput. Sci. and Eng. Dept., University of California, San Diego\", \"Department of Computer Scinece, Univ. Calif., San Diego\", 4, 0.1) 

\n

\n

The function invocation in the example above returns :

 0.992 

\n", "summary" : "

Returns the Monge-Elkan similarity coefficient between two strings, using the Jaro-Winkler \n similarity function to discover token identity.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s1", "type" : "xs:string", "occurrence" : null, "description" : "
The first string.
" }, { "name" : "s2", "type" : "xs:string", "occurrence" : null, "description" : "
The second string.
" }, { "name" : "prefix", "type" : "xs:integer", "occurrence" : null, "description" : "
The number of characters to consider when testing for equal prefixes with the Jaro-Winkler metric.
" }, { "name" : "fact", "type" : "xs:double", "occurrence" : null, "description" : "
The weighting factor to consider when the input strings have equal prefixes with the Jaro-Winkler metric.
" } ], "returns" : { "type" : "xs:double", "description" : "The Monge-Elkan similarity coefficient between the two strings." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "soft-cosine-tokens-edit-distance", "qname" : "simh:soft-cosine-tokens-edit-distance", "signature" : "($s1 as xs:string, $s2 as xs:string, $r as xs:string, $t as xs:integer) as xs:double", "description" : "

Returns the cosine similarity coefficient between sets of tokens extracted from two strings.

\n

The tokens from each string are weighted according to their occurence frequency (i.e., weighted according to the\n term-frequency heuristic from Information Retrieval).

\n

The Edit Distance similarity function is used to discover token identity, and tokens having an edit distance\n bellow a given threshold are considered as matching tokens.

\n

\n

Example usage :

 soft-cosine-tokens-edit-distance(\"The FLWOR Foundation\", \"FLWOR Found.\", \" +\", 0 ) 

\n

\n

The function invocation in the example above returns :

 0.408248290463863 

\n", "summary" : "

Returns the cosine similarity coefficient between sets of tokens extracted from two strings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s1", "type" : "xs:string", "occurrence" : null, "description" : "
The first string.
" }, { "name" : "s2", "type" : "xs:string", "occurrence" : null, "description" : "
The second string.
" }, { "name" : "r", "type" : "xs:string", "occurrence" : null, "description" : "
A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.
" }, { "name" : "t", "type" : "xs:integer", "occurrence" : null, "description" : "
A threshold for the similarity function used to discover token identity.
" } ], "returns" : { "type" : "xs:double", "description" : "The cosine similarity coefficient between the sets tokens extracted from the two strings." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 6, "name" : "soft-cosine-tokens-jaro-winkler", "qname" : "simh:soft-cosine-tokens-jaro-winkler", "signature" : "($s1 as xs:string, $s2 as xs:string, $r as xs:string, $t as xs:double, $prefix as xs:integer?, $fact as xs:double?) as xs:double", "description" : "

Returns the cosine similarity coefficient between sets of tokens extracted from two strings.

\n

The tokens from each string are weighted according to their occurence frequency (i.e., weighted according to the\n term-frequency heuristic from Information Retrieval).

\n

The Jaro-Winkler similarity function is used to discover token identity, and tokens having a Jaro-Winkler\n similarity above a given threshold are considered as matching tokens.

\n

\n

Example usage :

 soft-cosine-tokens-jaro-winkler(\"The FLWOR Foundation\", \"FLWOR Found.\", \" +\", 1, 4, 0.1 ) 

\n

\n

The function invocation in the example above returns :

 0.45 

\n", "summary" : "

Returns the cosine similarity coefficient between sets of tokens extracted from two strings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s1", "type" : "xs:string", "occurrence" : null, "description" : "
The first string.
" }, { "name" : "s2", "type" : "xs:string", "occurrence" : null, "description" : "
The second string.
" }, { "name" : "r", "type" : "xs:string", "occurrence" : null, "description" : "
A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.
" }, { "name" : "t", "type" : "xs:double", "occurrence" : null, "description" : "
A threshold for the similarity function used to discover token identity.
" }, { "name" : "prefix", "type" : "xs:integer", "occurrence" : "?", "description" : "
The number of characters to consider when testing for equal prefixes with the Jaro-Winkler metric.
" }, { "name" : "fact", "type" : "xs:double", "occurrence" : "?", "description" : "
The weighting factor to consider when the input strings have equal prefixes with the Jaro-Winkler metric.
" } ], "returns" : { "type" : "xs:double", "description" : "The cosine similarity coefficient between the sets tokens extracted from the two strings." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "soft-cosine-tokens-jaro", "qname" : "simh:soft-cosine-tokens-jaro", "signature" : "($s1 as xs:string, $s2 as xs:string, $r as xs:string, $t as xs:double) as xs:double", "description" : "

Returns the cosine similarity coefficient between sets of tokens extracted from two strings.

\n

The tokens from each string are weighted according to their occurence frequency (i.e., weighted according to the\n term-frequency heuristic from Information Retrieval).

\n

The Jaro similarity function is used to discover token identity, and tokens having a Jaro similarity above\n a given threshold are considered as matching tokens.

\n

\n

Example usage :

 soft-cosine-tokens-jaro(\"The FLWOR Foundation\", \"FLWOR Found.\", \" +\", 1 ) 

\n

\n

The function invocation in the example above returns :

 0.5 

\n", "summary" : "

Returns the cosine similarity coefficient between sets of tokens extracted from two strings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s1", "type" : "xs:string", "occurrence" : null, "description" : "
The first string.
" }, { "name" : "s2", "type" : "xs:string", "occurrence" : null, "description" : "
The second string.
" }, { "name" : "r", "type" : "xs:string", "occurrence" : null, "description" : "
A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.
" }, { "name" : "t", "type" : "xs:double", "occurrence" : null, "description" : "
A threshold for the similarity function used to discover token identity.
" } ], "returns" : { "type" : "xs:double", "description" : "The cosine similarity coefficient between the sets tokens extracted from the two strings." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "soft-cosine-tokens-metaphone", "qname" : "simh:soft-cosine-tokens-metaphone", "signature" : "($s1 as xs:string, $s2 as xs:string, $r as xs:string) as xs:double", "description" : "

Returns the cosine similarity coefficient between sets of tokens extracted from two strings.

\n

The tokens from each string are weighted according to their occurence frequency (i.e., weighted according to the\n term-frequency heuristic from Information Retrieval).

\n

The Metaphone phonetic similarity function is used to discover token identity, which is equivalent to saying that\n this function returns the cosine similarity coefficient between sets of Metaphone keys.

\n

\n

Example usage :

 soft-cosine-tokens-metaphone(\"ALEKSANDER SMITH\", \"ALEXANDER SMYTH\", \" +\" ) 

\n

\n

The function invocation in the example above returns :

 1.0 

\n", "summary" : "

Returns the cosine similarity coefficient between sets of tokens extracted from two strings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s1", "type" : "xs:string", "occurrence" : null, "description" : "
The first string.
" }, { "name" : "s2", "type" : "xs:string", "occurrence" : null, "description" : "
The second string.
" }, { "name" : "r", "type" : "xs:string", "occurrence" : null, "description" : "
A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.
" } ], "returns" : { "type" : "xs:double", "description" : "The cosine similarity coefficient between the sets Metaphone keys extracted from the two strings." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "soft-cosine-tokens-soundex", "qname" : "simh:soft-cosine-tokens-soundex", "signature" : "($s1 as xs:string, $s2 as xs:string, $r as xs:string) as xs:double", "description" : "

Returns the cosine similarity coefficient between sets of tokens extracted from two strings.

\n

\n

The tokens from each string are weighted according to their occurence frequency (i.e., weighted according to the\n term-frequency heuristic from Information Retrieval).

\n

The Soundex phonetic similarity function is used to discover token identity, which is equivalent to saying that\n this function returns the cosine similarity coefficient between sets of Soundex keys.

\n

\n

Example usage :

 soft-cosine-tokens-soundex(\"ALEKSANDER SMITH\", \"ALEXANDER SMYTH\", \" +\") 

\n

\n

The function invocation in the example above returns :

 1.0 

\n", "summary" : "

Returns the cosine similarity coefficient between sets of tokens extracted from two strings.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s1", "type" : "xs:string", "occurrence" : null, "description" : "
The first string.
" }, { "name" : "s2", "type" : "xs:string", "occurrence" : null, "description" : "
The second string.
" }, { "name" : "r", "type" : "xs:string", "occurrence" : null, "description" : "
A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.
" } ], "returns" : { "type" : "xs:double", "description" : "The cosine similarity coefficient between the sets of Soundex keys extracted from the two strings." }, "errors" : [ ] } ], "variables" : [ ] }, "http://xbrl.io/modules/bizql/rules" : { "ns" : "http://xbrl.io/modules/bizql/rules", "description" : "

This module provides functions for storing, retrieving, and modifying\n rules. Rules can be used in BizQL queries to:

\n \n

A Rule is an object containing a BizQL fomula to execute if a condition is met.\n For example if a user queries for a certain concept and a rule exists for this\n concept then the rule is applied to get the fact.

\n

With this module, you can retrieve the rules associated with each report\n schema. You can also query for facts by making implicitly use of the mapping.

\n", "sees" : [ ], "authors" : [ "Charles Hoffman", "Matthias Brantner", "Dennis Knochenwefel", "Ghislain Fourny" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://xbrl.io/modules/bizql/archives", "prefix" : "archives" }, { "uri" : "http://xbrl.io/modules/bizql/facts", "prefix" : "facts" }, { "uri" : "http://xbrl.io/modules/bizql/networks", "prefix" : "networks" }, { "uri" : "http://xbrl.io/modules/bizql/report-schemas", "prefix" : "report-schemas" }, { "uri" : "http://xbrl.io/modules/bizql/rules", "prefix" : "rules" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 7, "name" : "create-computed-fact", "qname" : "rules:create-computed-fact", "signature" : "($template-fact as object(), $concept-name-or-aspects as item(), $value as item(), $rule as object(), $audit-trail-message as string, $source-facts as object()*, $options as object()?) as object()", "description" : "

Helper function to create a new fact within a rule.

\n", "summary" : "

Helper function to create a new fact within a rule.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "template-fact", "type" : "object()", "occurrence" : null, "description" : "
a fact object that will be used as a template for the newly created fact
" }, { "name" : "concept-name-or-aspects", "type" : "item()", "occurrence" : null, "description" : "
either a name of the concept for the newly created fact or a complete aspects object to be used in the new fact.
" }, { "name" : "value", "type" : "item()", "occurrence" : null, "description" : "
a value for the newly created fact
" }, { "name" : "rule", "type" : "object()", "occurrence" : null, "description" : "
the rule in which this fact has been created
" }, { "name" : "audit-trail-message", "type" : "string", "occurrence" : null, "description" : "
a verbose string message explaining how and why this fact has been created
" }, { "name" : "source-facts", "type" : "object()", "occurrence" : "*", "description" : "
sequence of facts that have been used to compute the new fact (this will only be added to the AuditTrails if the audit-trail option is set to \"debug\")
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
standard fact retrieving options.
" } ], "returns" : { "type" : "object()", "description" : "the decimal value of the fact or 0." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "fact-trail", "qname" : "rules:fact-trail", "signature" : "($fact as object()?) as string", "description" : "

Serializes a fact to a simple string format that can be used in\n audit trail messages to trail the value of the fact.

\n

The returned string follows the pattern: fact-concept-name[fact-value]

\n", "summary" : "

Serializes a fact to a simple string format that can be used in\n audit trail messages to trail the value of the fact.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "fact", "type" : "object()", "occurrence" : "?", "description" : "
a single fact to serialize to a simple informative string
" } ], "returns" : { "type" : "string", "description" : "the string with key information about the fact." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "fact-trail", "qname" : "rules:fact-trail", "signature" : "($fact as object()?, $name as string) as string", "description" : "

Serializes a fact to a simple string format that can be used in\n audit trail messages to trail the value of the fact.

\n

The returned string follows the pattern: fact-concept-name[fact-value]

\n", "summary" : "

Serializes a fact to a simple string format that can be used in\n audit trail messages to trail the value of the fact.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "fact", "type" : "object()", "occurrence" : "?", "description" : "
an empty-sequence or a single fact to serialize to a simple informative string
" }, { "name" : "name", "type" : "string", "occurrence" : null, "description" : "
an alternative name to use if the $fact is an empty-sequence otherwise the name will be taken from the fact
" } ], "returns" : { "type" : "string", "description" : "the string with key information about the fact." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "rules", "qname" : "rules:rules", "signature" : "() as object()*", "description" : "

Retrieves all rules from all report schemas.

\n", "summary" : "

Retrieves all rules from all report schemas.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()*", "description" : "all rules." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "rules", "qname" : "rules:rules", "signature" : "($report-schemas-or-ids as item()*) as object()*", "description" : "

Return the rules from the given report schemas.

\n", "summary" : "

Return the rules from the given report schemas.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "report-schemas-or-ids", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "object()*", "description" : "the rules from the report schemas." }, "errors" : [ ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/lock" : { "ns" : "http://www.28msec.com/modules/lock", "description" : " Sausalito provides a an application level locking mechanism that can be\n used e.g. to ensure exclusive access to data.\n As the store ensures atomicity of of single document updates, atomic\n updates to multiple documents are implemented using this mechanism.\n Locks can be acquired and re-acquired at any time during a request and\n are released at the end of the request.\n", "sees" : [ ], "authors" : [ "28msec" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.28msec.com/modules/lock", "prefix" : "lock" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "try-acquire", "qname" : "lock:try-acquire", "signature" : "($lock-name as xs:string) as xs:boolean external", "description" : " Tries to acquire a lock.\n This operation is non-blocking if the lock cannot be acquired immediately.\n To check and modify the stock of a product wihtout interference from\n concurrent requests a lock could be used like this:\n
\n if (lock:try-acquire(\"stock-update\"))\n then\n   if (stock:check($product-id))\n   then\n     {\n       order:finalize($order-id);\n       stock:decrement($product-id);\n     }\n   else\n     order:hold($order-id);\n else\n   ...\n 
\n", "summary" : "

Tries to acquire a lock.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "lock-name", "type" : "xs:string", "occurrence" : null, "description" : "
The name of the lock.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the lock could be acquired, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "try-acquire", "qname" : "lock:try-acquire", "signature" : "($lock-name as xs:string, $reason as xs:string) as xs:boolean external", "description" : " tries to acquire a lock\n", "summary" : "

tries to acquire a lock\n

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "lock-name", "type" : "xs:string", "occurrence" : null, "description" : "
The name of the lock.
" }, { "name" : "reason", "type" : "xs:string", "occurrence" : null, "description" : "
a reason for the acquisition of the lock that can be used for
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the lock could be acquired, false otherwise." }, "errors" : [ ] } ], "variables" : [ ] }, "http://www.zorba-xquery.com/modules/xqdoc/html" : { "ns" : "http://www.zorba-xquery.com/modules/xqdoc/html", "description" : " Convert an XQDoc document into an HTML document.\n This module contains a single convert() function\n that transform an XQDoc document into an HTML document.\n Usage:\n
\n let $xqdoc := xqdoc:xqdoc(\"http://expath.org/ns/file\")\n return html:convert($xqdoc)\n 
\n", "sees" : [ ], "authors" : [ "William Candillon wcandillon at gmail dot com" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.zorba-xquery.com/modules/xqdoc/html", "prefix" : "html" }, { "uri" : "http://www.w3.org/2010/xslt-xquery-serialization", "prefix" : "o" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://www.xqdoc.org/1.0", "prefix" : "xq" } ], "functions" : [ { "isDocumented" : false, "arity" : 1, "name" : "convert", "qname" : "html:convert", "signature" : "($xqdoc as element(xq:xqdoc)) as element(div)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "xqdoc", "type" : "element(xq:xqdoc)", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "element(div)", "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }, "http://api.28.io/model" : { "ns" : "http://api.28.io/model", "description" : "", "sees" : [ ], "authors" : [ ], "version" : null, "encoding" : null, "namespaces" : [ { "uri" : "", "prefix" : "an" }, { "uri" : "http://zorba.io/modules/store/static/collections/ddl", "prefix" : "cddl" }, { "uri" : "http://zorba.io/modules/store/static/collections/dml", "prefix" : "cdml" }, { "uri" : "http://zorba.io/modules/store/static/indexes/ddl", "prefix" : "iddl" }, { "uri" : "http://zorba.io/modules/store/static/indexes/dml", "prefix" : "idml" }, { "uri" : "http://api.28.io/model", "prefix" : "model" }, { "uri" : "http://www.zorba-xquery.com/schemas/pul", "prefix" : "pul" }, { "uri" : "http://zorba.io/modules/reference", "prefix" : "ref" }, { "uri" : "http://www.zorba-xquery.com/schemas/xdm", "prefix" : "xdm" } ], "functions" : [ { "isDocumented" : false, "arity" : 1, "name" : "applyPUL", "qname" : "model:applyPUL", "signature" : "($pul as schema-element(pul:pending-update-list))", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "pul", "type" : "schema-element(pul:pending-update-list)", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "applyPULOp", "qname" : "model:applyPULOp", "signature" : "($pul)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "pul", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "build-nodes", "qname" : "model:build-nodes", "signature" : "($definition)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "definition", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "collection-qname", "qname" : "model:collection-qname", "signature" : "($name as xs:string) as xs:QName", "description" : " Returns the QName for a collection. Returns the empty sequence if no collection with the given name exists.\n", "summary" : "

Returns the QName for a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the collection as string
" } ], "returns" : { "type" : "xs:QName", "description" : "the QName for the collection or the empty sequence" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "delete-node-collection", "qname" : "model:delete-node-collection", "signature" : "($collection as xs:QName, $noderef as xs:anyURI?)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "collection", "type" : "xs:QName", "occurrence" : null, "description" : "" }, { "name" : "noderef", "type" : "xs:anyURI", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "delete-node", "qname" : "model:delete-node", "signature" : "($noderef as xs:anyURI)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "noderef", "type" : "xs:anyURI", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "element-node", "qname" : "model:element-node", "signature" : "($definition as schema-element(xdm:element))", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "definition", "type" : "schema-element(xdm:element)", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "find-keys", "qname" : "model:find-keys", "signature" : "($collection)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "collection", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "get-collection-names", "qname" : "model:get-collection-names", "signature" : "() as xs:string*", "description" : " Returns all collection names\n", "summary" : "

Returns all collection names\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string*", "description" : "collection names as a sequence of strings" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "get-collection-size", "qname" : "model:get-collection-size", "signature" : "($name as xs:string) as xs:integer", "description" : " Returns the size of a collection\n", "summary" : "

Returns the size of a collection\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the collection as string
" } ], "returns" : { "type" : "xs:integer", "description" : "the size of the collection" }, "errors" : [ "if the collection chosen by $name does not exist" ] }, { "isDocumented" : true, "arity" : 1, "name" : "get-collection", "qname" : "model:get-collection", "signature" : "($name as xs:string) as node()*", "description" : " Returns the whole collection with a given name\n", "summary" : "

Returns the whole collection with a given name\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
name of collection to return
" } ], "returns" : { "type" : "node()*", "description" : "sequence of nodes of the collection" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "get-collection", "qname" : "model:get-collection", "signature" : "($name as xs:string, $first-noderef as xs:anyURI?, $offset as xs:integer?, $limit as xs:integer)", "description" : " Returns \"a page\" of the collection (a part)\n", "summary" : "

Returns \"a page\" of the collection (a part)\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the collection as string
" }, { "name" : "first-noderef", "type" : "xs:anyURI", "occurrence" : "?", "description" : "" }, { "name" : "offset", "type" : "xs:integer", "occurrence" : "?", "description" : "" }, { "name" : "limit", "type" : "xs:integer", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "a sequence of nodes from the collection" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 4, "name" : "get-column-id", "qname" : "model:get-column-id", "signature" : "($basepath as xs:string?, $name as xs:string, $isattribute as xs:boolean, $columns) as xs:integer", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "basepath", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "isattribute", "type" : "xs:boolean", "occurrence" : null, "description" : "" }, { "name" : "columns", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer", "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "get-index-names", "qname" : "model:get-index-names", "signature" : "() as xs:string*", "description" : " Returns all index names\n", "summary" : "

Returns all index names\n

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string*", "description" : "index names as a sequence of strings" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "get-index-point", "qname" : "model:get-index-point", "signature" : "($index-name as xs:string, $index-key)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "index-name", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "index-key", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "get-node-group", "qname" : "model:get-node-group", "signature" : "($noderef as xs:anyURI)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "noderef", "type" : "xs:anyURI", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "get-node-path", "qname" : "model:get-node-path", "signature" : "($node)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "get-node", "qname" : "model:get-node", "signature" : "($noderef as xs:anyURI)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "noderef", "type" : "xs:anyURI", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "index-qname", "qname" : "model:index-qname", "signature" : "($name as xs:string) as xs:QName", "description" : " Returns the QName for an index. Returns the empty sequence if no index with the given name exists.\n", "summary" : "

Returns the QName for an index.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the index as string
" } ], "returns" : { "type" : "xs:QName", "description" : "the QName for the index or the empty sequence" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "insert-attribute", "qname" : "model:insert-attribute", "signature" : "($noderef as xs:anyURI, $attribute as xs:string, $value)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "noderef", "type" : "xs:anyURI", "occurrence" : null, "description" : "" }, { "name" : "attribute", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "value", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 4, "name" : "insert-node-collection-ordered", "qname" : "model:insert-node-collection-ordered", "signature" : "($collection as xs:QName, $noderef as xs:anyURI?, $position as xs:string, $nodes)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "collection", "type" : "xs:QName", "occurrence" : null, "description" : "" }, { "name" : "noderef", "type" : "xs:anyURI", "occurrence" : "?", "description" : "" }, { "name" : "position", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "nodes", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 4, "name" : "insert-node-collection", "qname" : "model:insert-node-collection", "signature" : "($collection as xs:QName, $noderef as xs:anyURI?, $position as xs:string, $nodes)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "collection", "type" : "xs:QName", "occurrence" : null, "description" : "" }, { "name" : "noderef", "type" : "xs:anyURI", "occurrence" : "?", "description" : "" }, { "name" : "position", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "nodes", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 5, "name" : "insert-node-collection", "qname" : "model:insert-node-collection", "signature" : "($collection as xs:QName, $noderef as xs:anyURI?, $position as xs:string, $nodes, $validate as xs:boolean)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "collection", "type" : "xs:QName", "occurrence" : null, "description" : "" }, { "name" : "noderef", "type" : "xs:anyURI", "occurrence" : "?", "description" : "" }, { "name" : "position", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "nodes", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "validate", "type" : "xs:boolean", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "insert-node", "qname" : "model:insert-node", "signature" : "($noderef as xs:anyURI, $position as xs:string, $newnodes)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "noderef", "type" : "xs:anyURI", "occurrence" : null, "description" : "" }, { "name" : "position", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "newnodes", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 4, "name" : "make-table-row", "qname" : "model:make-table-row", "signature" : "($idx, $node, $columns, $namespaces)", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "idx", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "node", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "columns", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 5, "name" : "make-table-row", "qname" : "model:make-table-row", "signature" : "($node, $path as xs:string?, $row, $columns, $namespaces)", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "node", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "path", "type" : "xs:string", "occurrence" : "?", "description" : "" }, { "name" : "row", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "columns", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "make-table", "qname" : "model:make-table", "signature" : "($nodes, $namespaces)", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "node-name", "qname" : "model:node-name", "signature" : "($node as element(*), $namespaces) as xs:string", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "element(*)", "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "node-path-index", "qname" : "model:node-path-index", "signature" : "($node as node(), $parent as node()) as xs:integer?", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "node()", "occurrence" : null, "description" : "" }, { "name" : "parent", "type" : "node()", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "node-prefix", "qname" : "model:node-prefix", "signature" : "($node as element(*), $namespaces) as xs:string?", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "element(*)", "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "node-reference", "qname" : "model:node-reference", "signature" : "($node) as xs:string", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "node", "qname" : "model:node", "signature" : "($definition)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "definition", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "rename-node", "qname" : "model:rename-node", "signature" : "($noderef as xs:anyURI, $name as xs:QName)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "noderef", "type" : "xs:anyURI", "occurrence" : null, "description" : "" }, { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "replace-node", "qname" : "model:replace-node", "signature" : "($noderef as xs:anyURI, $nodes)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "noderef", "type" : "xs:anyURI", "occurrence" : null, "description" : "" }, { "name" : "nodes", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "replace-value", "qname" : "model:replace-value", "signature" : "($noderef as xs:anyURI, $value)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "noderef", "type" : "xs:anyURI", "occurrence" : null, "description" : "" }, { "name" : "value", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "resolve-qname", "qname" : "model:resolve-qname", "signature" : "($name as xs:QName, $namespaces) as xs:string", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "type-save", "qname" : "model:type-save", "signature" : "($val) as xs:string", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "val", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "type", "qname" : "model:type", "signature" : "($val as xs:anyAtomicType?) as xs:string", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "val", "type" : "xs:anyAtomicType", "occurrence" : "?", "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "unused-prefix", "qname" : "model:unused-prefix", "signature" : "($namespaces) as xs:string", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }, "http://api.28.io/validation" : { "ns" : "http://api.28.io/validation", "description" : "", "sees" : [ ], "authors" : [ ], "version" : null, "encoding" : null, "namespaces" : [ { "uri" : "http://zorba.io/modules/reflection", "prefix" : "reflection" }, { "uri" : "http://www.28msec.com/modules/http/response", "prefix" : "resp" }, { "uri" : "http://api.28.io/validation", "prefix" : "validate" } ], "functions" : [ { "isDocumented" : false, "arity" : 3, "name" : "by-schema-array", "qname" : "validate:by-schema-array", "signature" : "($obj, $schema as array(), $path as xs:string)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "obj", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "schema", "type" : "array()", "occurrence" : null, "description" : "" }, { "name" : "path", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "by-schema-obj", "qname" : "validate:by-schema-obj", "signature" : "($obj as object(), $schema as object(), $path as xs:string)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "obj", "type" : "object()", "occurrence" : null, "description" : "" }, { "name" : "schema", "type" : "object()", "occurrence" : null, "description" : "" }, { "name" : "path", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "by-schema-primitive", "qname" : "validate:by-schema-primitive", "signature" : "($obj, $schema-type as xs:string, $path)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "obj", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "schema-type", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "path", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "by-schema", "qname" : "validate:by-schema", "signature" : "($obj as object(), $schema as object())", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "obj", "type" : "object()", "occurrence" : null, "description" : "" }, { "name" : "schema", "type" : "object()", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "expression", "qname" : "validate:expression", "signature" : "($expression as xs:string, $is-domain-expr as xs:boolean) as xs:boolean", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "expression", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "is-domain-expr", "type" : "xs:boolean", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "type", "qname" : "validate:type", "signature" : "($type as xs:string) as xs:boolean", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }, "http://api.28.io/sandbox" : { "ns" : "http://api.28.io/sandbox", "description" : "", "sees" : [ ], "authors" : [ ], "version" : null, "encoding" : null, "namespaces" : [ { "uri" : "http://zorba.io/modules/reference", "prefix" : "ref" }, { "uri" : "http://zorba.io/modules/reflection", "prefix" : "reflection" }, { "uri" : "http://api.28.io/sandbox", "prefix" : "sandbox" } ], "functions" : [ { "isDocumented" : false, "arity" : 3, "name" : "filter", "qname" : "sandbox:filter", "signature" : "($nodes, $xpath as xs:string, $namespaces)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "xpath", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "get-names", "qname" : "sandbox:get-names", "signature" : "($nodes, $path as xs:string, $namespaces)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "path", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "get-values", "qname" : "sandbox:get-values", "signature" : "($nodes, $path as xs:string, $namespaces)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "path", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "key-constraint", "qname" : "sandbox:key-constraint", "signature" : "($nodes, $condition as xs:string, $namespaces)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "condition", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "ns-declarations", "qname" : "sandbox:ns-declarations", "signature" : "($namespaces) as xs:string", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 4, "name" : "order", "qname" : "sandbox:order", "signature" : "($nodes, $path as xs:string, $descending as xs:boolean, $namespaces)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "path", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "descending", "type" : "xs:boolean", "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 3, "name" : "tuple-constraint", "qname" : "sandbox:tuple-constraint", "signature" : "($nodes, $condition as xs:string, $namespaces)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "condition", "type" : "xs:string", "occurrence" : null, "description" : "" }, { "name" : "namespaces", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/store/static/collections/dml" : { "ns" : "http://zorba.io/modules/store/static/collections/dml", "description" : " This modules provides a set of functions to modify a collection\n and retrieve the items contained in a particular collection.\n

\n This module is part of\n Zorba's XQuery Data Definition Facility.\n All the collections managed by this module have to be pre-declared in the\n prolog of a module.\n Please refer to the\n general documentation\n for more information and examples.\n", "sees" : [ "Data Lifecycle", "XQuery Data Definition Facility", "http://zorba.io/modules/store/static/collections/ddl", "http://zorba.io/modules/store/static/indexes/ddl", "http://zorba.io/modules/store/static/indexes/dml", "http://zorba.io/modules/store/static/integrity-constraints/ddl", "http://zorba.io/modules/store/static/integrity-constraints/dml", "http://zorba.io/errors" ], "authors" : [ "Nicolae Brinza, Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://zorba.io/modules/store/static/collections/dml", "prefix" : "cdml" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/errors", "prefix" : "zerr" } ], "functions" : [ { "isDocumented" : true, "arity" : 3, "name" : "apply-insert-after", "qname" : "cdml:apply-insert-after", "signature" : "($name as xs:QName, $pos as item(), $content as item()*) as item()* external", "description" : " This function does the same thing as the insert-after()\n function except it immediately applies the resulting pending updates and\n returns the items that have been inserted.\n", "summary" : "

This function does the same thing as the insert-after() \n function except it immediately applies the resulting pending updates and\n returns the items that have been inserted.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "pos", "type" : "item()", "occurrence" : null, "description" : "" }, { "name" : "content", "type" : "item()", "occurrence" : "*", "description" : "
The sequence of items whose copies to insert.
" } ], "returns" : { "type" : "item()*", "description" : "The sequence of items that have been inserted." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0006 if the collection is const, append-only, or queue.", "zerr:ZDDY0012 if the collection is unordered.", "zerr:ZDTY0001 if $content does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching.", "zerr:ZDDY0011 if $target is not in the collection." ] }, { "isDocumented" : true, "arity" : 3, "name" : "apply-insert-before", "qname" : "cdml:apply-insert-before", "signature" : "($name as xs:QName, $target as item(), $content as item()*) as item()* external", "description" : " This function does the same thing as insert-before() except it\n immediately applies the resulting pending updates and returns the items that\n have been inserted.\n", "summary" : "

This function does the same thing as insert-before() except it\n immediately applies the resulting pending updates and returns the items that\n have been inserted.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "target", "type" : "item()", "occurrence" : null, "description" : "
The item in the collection before which $content will be inserted.
" }, { "name" : "content", "type" : "item()", "occurrence" : "*", "description" : "
The sequence of items whose copies to insert.
" } ], "returns" : { "type" : "item()*", "description" : "The sequence of items that have been inserted." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0006 if the collection $name is const, append-only, or queue.", "zerr:ZDDY0012 if the collection is unordered.", "zerr:ZDTY0001 if $content does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching.", "zerr:ZDDY0011 if $target is not an item that is contained in the collection." ] }, { "isDocumented" : true, "arity" : 2, "name" : "apply-insert-first", "qname" : "cdml:apply-insert-first", "signature" : "($name as xs:QName, $content as item()*) as item()* external", "description" : " This function does the same thing as insert-first() except it\n immediately applies the resulting pending updates and returns the items that\n have been inserted.\n", "summary" : "

This function does the same thing as insert-first() except it\n immediately applies the resulting pending updates and returns the items that\n have been inserted.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "content", "type" : "item()", "occurrence" : "*", "description" : "
The sequence of items whose copies to insert.
" } ], "returns" : { "type" : "item()*", "description" : "The Sequence of items that have been inserted." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0006 if the collection $name is append-only, const, or queue.", "zerr:ZDDY0012 if the collection is unordered.", "zerr:ZDTY0001 if $content does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching." ] }, { "isDocumented" : true, "arity" : 2, "name" : "apply-insert-last", "qname" : "cdml:apply-insert-last", "signature" : "($name as xs:QName, $content as item()*) as item()* external", "description" : " This function does the same thing as insert-last() except it\n immediately applies the resulting pending updates and returns the items that\n have been inserted.\n", "summary" : "

This function does the same thing as insert-last() except it\n immediately applies the resulting pending updates and returns the items that\n have been inserted.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "content", "type" : "item()", "occurrence" : "*", "description" : "
The sequence of items whose copies to insert.
" } ], "returns" : { "type" : "item()*", "description" : "The sequence of items that have been inserted." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0006 if the collection is const.", "zerr:ZDDY0012 if the collection is unordered.", "zerr:ZDTY0001 if $content does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching." ] }, { "isDocumented" : true, "arity" : 2, "name" : "apply-insert", "qname" : "cdml:apply-insert", "signature" : "($name as xs:QName, $content as item()*) as item()* external", "description" : " This function does the same thing as insert() except it\n immediately applies the resulting pending updates and returns the items that\n have been inserted.\n", "summary" : "

This function does the same thing as insert() except it\n immediately applies the resulting pending updates and returns the items that\n have been inserted.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "content", "type" : "item()", "occurrence" : "*", "description" : "
The sequence of items whose copies to insert.
" } ], "returns" : { "type" : "item()*", "description" : "The sequence of items that have been inserted." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0006 if the collection is append-only, const, or queue.", "zerr:ZDTY0001 if $content does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching." ] }, { "isDocumented" : true, "arity" : 1, "name" : "collection-name", "qname" : "cdml:collection-name", "signature" : "($item as item()) as xs:QName external", "description" : " Gets the name of the collection the given item (node or JSON item) belongs\n to.\n", "summary" : "

Gets the name of the collection the given item (node or JSON item) belongs\n to.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "item", "type" : "item()", "occurrence" : null, "description" : "
The item for which to get the name of its collection.
" } ], "returns" : { "type" : "xs:QName", "description" : "The name of the collection to which the given item belongs." }, "errors" : [ "zerr:ZDDY0011 if $item does not belong to a collection." ] }, { "isDocumented" : true, "arity" : 1, "name" : "collection", "qname" : "cdml:collection", "signature" : "($name as xs:QName) as item()* external", "description" : " Gets the sequence of nodes or JSON items from a collection.\n", "summary" : "

Gets the sequence of nodes or JSON items from a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection.
" } ], "returns" : { "type" : "item()*", "description" : "The seqnence of items from the collection." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available." ] }, { "isDocumented" : true, "arity" : 2, "name" : "collection", "qname" : "cdml:collection", "signature" : "($name as xs:QName, $skip as xs:integer) as item()* external", "description" : " Gets the sequence of nodes or JSON items from a collection.\n", "summary" : "

Gets the sequence of nodes or JSON items from a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection.
" }, { "name" : "skip", "type" : "xs:integer", "occurrence" : null, "description" : "
The initial number of items to skip.
" } ], "returns" : { "type" : "item()*", "description" : "The (sub)sequence of items from the collection." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available." ] }, { "isDocumented" : true, "arity" : 3, "name" : "collection", "qname" : "cdml:collection", "signature" : "($name as xs:QName, $start as xs:anyURI, $skip as xs:integer) as item()* external", "description" : " Gets the sequence of items (nodes or JSON items) from a collection.\n The parameters $start and $skip can be used to\n skip over some items at the beginning of the collection.\n If both are given, both are applied:\n first $start to skip to the referenced item\n and then $skip to skip that additional number of items.\n", "summary" : "

Gets the sequence of items (nodes or JSON items) from a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection.
" }, { "name" : "start", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The reference to the first item to return.
" }, { "name" : "skip", "type" : "xs:integer", "occurrence" : null, "description" : "
The number of additional items to skip.
" } ], "returns" : { "type" : "item()*", "description" : "The sub-sequence from the collection." }, "errors" : [ "zerr:ZAPI0028 If the given URI is not a valid node position computed by the np:node-position function.", "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available.", "zerr:ZSTR0066 if $start does not reference a node from the collection." ] }, { "isDocumented" : true, "arity" : 1, "name" : "delete-first", "qname" : "cdml:delete-first", "signature" : "($name as xs:QName) external", "description" : " Deletes the first item from a collection.\n", "summary" : "

Deletes the first item from a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to delete from.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, deletes the first item from the collection." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0006 if the collection is const or append-only.", "zerr:ZDDY0012 if the collection is unordered.", "zerr:ZDDY0011 if the collection is empty." ] }, { "isDocumented" : true, "arity" : 2, "name" : "delete-first", "qname" : "cdml:delete-first", "signature" : "($name as xs:QName, $number as xs:integer) external", "description" : " Deletes the first N items from a collection.\n", "summary" : "

Deletes the first N items from a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to delete from.
" }, { "name" : "number", "type" : "xs:integer", "occurrence" : null, "description" : "
The number of items to delete.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, deletes the items from the collection." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0006 if the collection is const or append-only.", "zerr:ZDDY0012 if the collection is unordered.", "zerr:ZDDY0011 if the collection contains less than $number items." ] }, { "isDocumented" : true, "arity" : 1, "name" : "delete-last", "qname" : "cdml:delete-last", "signature" : "($name as xs:QName) external", "description" : " Deletes the last item from a collection.\n", "summary" : "

Deletes the last item from a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to delete from.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, deletes the last item from the collection." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0006 if the collection is const, append-only, or queue.", "zerr:ZDDY0012 if the collection is unordered.", "zerr:ZDDY0011 if the collection is empty." ] }, { "isDocumented" : true, "arity" : 2, "name" : "delete-last", "qname" : "cdml:delete-last", "signature" : "($name as xs:QName, $number as xs:integer) external", "description" : " Deletes the last N items from a collection.\n", "summary" : "

Deletes the last N items from a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to delete from.
" }, { "name" : "number", "type" : "xs:integer", "occurrence" : null, "description" : "
The number of items to delete.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, deletes the items." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0012 if the collection is unordered.", "zerr:ZDDY0011 if the collection contains less than $number items." ] }, { "isDocumented" : true, "arity" : 1, "name" : "delete", "qname" : "cdml:delete", "signature" : "($items as item()*) external", "description" : " Deletes items (nodes or JSON items) from a collection.\n", "summary" : "

Deletes items (nodes or JSON items) from a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "items", "type" : "item()", "occurrence" : "*", "description" : "
The items in the collection to delete.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, deletes the items from their collections." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0006 if the collection is const, append-only, or queue.", "zerr:ZDDY0011 if any item in $items is not a member of a collection or not all items belong to the same collection." ] }, { "isDocumented" : true, "arity" : 2, "name" : "edit", "qname" : "cdml:edit", "signature" : "($target as item(), $content as item()) external", "description" : " Edits the first supplied item so as to make it look exactly like a copy of\n the second supplied item while retaining its original identity.\n", "summary" : "

Edits the first supplied item so as to make it look exactly like a copy of\n the second supplied item while retaining its original identity.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "target", "type" : "item()", "occurrence" : null, "description" : "
The target item to be edited.
" }, { "name" : "content", "type" : "item()", "occurrence" : null, "description" : "
The item that serves as an edit goal.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, performs the edit." }, "errors" : [ "zerr:ZDDY0001 if the collection to which $target belongs is not declared.", "zerr:ZDDY0003 if the collection to which $target belongs is not available.", "zerr:ZDDY0006 if the collection to which $target belongs is append-only, const, or queue.", "zerr:ZDDY0017 if $target is not a member of a collection.", "zerr:ZDDY0037 if the collection is append-only.", "zerr:ZDDY0038 if the collection is a queue.", "zerr:ZDDY0039 if $target is not a root.", "zerr:ZDDY0040 if $target cannot be updated to match the content (for example, because the target is a node and the content is an object).", "zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching." ] }, { "isDocumented" : true, "arity" : 1, "name" : "index-of", "qname" : "cdml:index-of", "signature" : "($item as item()) as xs:integer external", "description" : " Gets the position of the given item (node or JSON item) within its\n collection.\n", "summary" : "

Gets the position of the given item (node or JSON item) within its\n collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "item", "type" : "item()", "occurrence" : null, "description" : "
The item to get the index of.
" } ], "returns" : { "type" : "xs:integer", "description" : "The position of $item in its collection." }, "errors" : [ "zerr:ZDDY0011 if $item does not belong to a collection.", "zerr:ZDDY0012 if the collection is unordered." ] }, { "isDocumented" : true, "arity" : 3, "name" : "insert-after", "qname" : "cdml:insert-after", "signature" : "($name as xs:QName, $target as item(), $content as item()*) external", "description" : " The insert-after function is an updating function that inserts copies of the\n given items (nodes or JSON items) into a collection at the position\n directly following the given target item.\n", "summary" : "

The insert-after function is an updating function that inserts copies of the\n given items (nodes or JSON items) into a collection at the position\n directly following the given target item.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "target", "type" : "item()", "occurrence" : null, "description" : "
The item in the collection after which $content will be inserted.
" }, { "name" : "content", "type" : "item()", "occurrence" : "*", "description" : "
The sequence of items whose copies to insert.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, inserts the items into the collection." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0006 if the collection is const, append-only, or queue.", "zerr:ZDDY0012 if the collection is unordered.", "zerr:ZDTY0001 if $content does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching.", "zerr:ZDDY0011 if $target is not a node that is contained in the collection." ] }, { "isDocumented" : true, "arity" : 3, "name" : "insert-before", "qname" : "cdml:insert-before", "signature" : "($name as xs:QName, $target as item(), $content as item()*) external", "description" : " Inserts copies of the given items (nodes or JSON items) into a collection at\n the position directly preceding the given target item.\n", "summary" : "

Inserts copies of the given items (nodes or JSON items) into a collection at\n the position directly preceding the given target item.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "target", "type" : "item()", "occurrence" : null, "description" : "
The item in the collection before which $content will be inserted.
" }, { "name" : "content", "type" : "item()", "occurrence" : "*", "description" : "
The sequence of items whose copies to insert.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, inserts the items into the collection." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0006 if the collection is const, append-only, or queue.", "zerr:ZDDY0012 if the collection is unordered.", "zerr:ZDTY0001 if $content does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching.", "zerr:ZDDY0011 if $target is not an item that is contained in the collection." ] }, { "isDocumented" : true, "arity" : 2, "name" : "insert-first", "qname" : "cdml:insert-first", "signature" : "($name as xs:QName, $content as item()*) external", "description" : " Inserts copies of the given items (nodes or JSON items) at the beginning of\n a collection.\n", "summary" : "

Inserts copies of the given items (nodes or JSON items) at the beginning of\n a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "content", "type" : "item()", "occurrence" : "*", "description" : "
The sequence of items whose copies to insert.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, inserts the items into the collection." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0006 if the collection is append-only, const, or queue.", "zerr:ZDDY0012 if the collection is unordered.", "zerr:ZDTY0001 if $content does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching." ] }, { "isDocumented" : true, "arity" : 2, "name" : "insert-last", "qname" : "cdml:insert-last", "signature" : "($name as xs:QName, $content as item()*) external", "description" : " Inserts copies of the given items (nodes or JSON items) at the end of a\n collection.\n", "summary" : "

Inserts copies of the given items (nodes or JSON items) at the end of a\n collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "content", "type" : "item()", "occurrence" : "*", "description" : "
The sequence of itemss whose copies to insert.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, inserts the items into the collection." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0006 if the collection is const.", "zerr:ZDDY0012 if the collection is unordered.", "zerr:ZDTY0001 if $content does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching." ] }, { "isDocumented" : true, "arity" : 2, "name" : "insert", "qname" : "cdml:insert", "signature" : "($name as xs:QName, $content as item()*) external", "description" : " Inserts copies of the given items (nodes or JSON items) into a collection.\n Note that the insertion position of the items in the collection is not\n defined.\n", "summary" : "

Inserts copies of the given items (nodes or JSON items) into a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "content", "type" : "item()", "occurrence" : "*", "description" : "
The sequence of items whose copies to insert.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, inserts the items into the collection." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0006 if the collection is append-only, const, or queue.", "zerr:ZDTY0001 if $content does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching." ] }, { "isDocumented" : true, "arity" : 1, "name" : "truncate", "qname" : "cdml:truncate", "signature" : "($name as xs:QName) external", "description" : " Deletes the entire contents of collection.\n Please note that applying this function can not be undone in case\n an error happens during the application of the containing PUL.\n", "summary" : "

Deletes the entire contents of collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:QName", "occurrence" : null, "description" : "
The name of the collection whose content to delete.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, deletes the nodes." }, "errors" : [ "zerr:ZDDY0001 if the collection is not declared.", "zerr:ZDDY0003 if the collection is not available." ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/http-request" : { "ns" : "http://www.28msec.com/modules/http-request", "description" : " The request module provides functions for accessing\n information contained in the HTTP request used to evaluate the current\n query. For example, the param-names function can be used to\n retrieve all the names of the parameters contained in a request.\n", "sees" : [ ], "authors" : [ "Matthias Brantner" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.w3.org/2005/xqt-errors", "prefix" : "err" }, { "uri" : "http://www.28msec.com/modules/http/request#2.0", "prefix" : "req" }, { "uri" : "http://www.28msec.com/modules/http-request", "prefix" : "request" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 0, "name" : "binary-content", "qname" : "request:binary-content", "signature" : "() as xs:base64Binary", "description" : "

Returns the content of the request as base64Binary.

\n", "summary" : "

Returns the content of the request as base64Binary.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:base64Binary", "description" : "The content of the request as base64Binary." }, "errors" : [ "request:no-binary-content if the content contained in the body of the request cannot be treated as binary because it is a request with multipart or url-encoded content." ] }, { "isDocumented" : true, "arity" : 1, "name" : "binary-part", "qname" : "request:binary-part", "signature" : "($ref as xs:string) as xs:base64Binary", "description" : "

Returns the value of a part as base64Binary.

\n

A part is identified by a reference that is the value of a\n src field returned by the request:parts function.

\n", "summary" : "

Returns the value of a part as base64Binary.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "ref", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the part
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "the value of the part as base64Binary" }, "errors" : [ "request:invalid-part if the part with the given name ($ref) does not exist", "request:non-multipart if the current request does not contain multipart content", "request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)" ] }, { "isDocumented" : true, "arity" : 0, "name" : "content-length", "qname" : "request:content-length", "signature" : "() as xs:integer?", "description" : "

Returns the length of the content in bytes.

\n

The value returned corresponds to the value of the HTTP\n content-length header. The function returns an empty sequence\n if this header does not exist in the request or its value\n could not be converted to item of type xs:integer

.\n", "summary" : "

Returns the length of the content in bytes.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:integer?", "description" : "The content-length in bytes of the content sent with this request or the empty sequence if the content-length header does not exist in the request." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "content-type", "qname" : "request:content-type", "signature" : "() as xs:string?", "description" : "

Returns the content-type of the data sent with this request.

\n

Note that the content-type is only set for PUT and POST requests.

\n", "summary" : "

Returns the content-type of the data sent with this request.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string?", "description" : "The content-type of the request if it is a PUT or POST request. Otherwise, it returns the empty sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "header-accept", "qname" : "request:header-accept", "signature" : "() as object()*", "description" : "

Returns the values of the HTTP ACCEPT header.

\n

The data is returned as a sequence of objects\n as shown in the following example.

\n
\n {\n   \"type\" : \"text\",\n   \"subtype\" : \"html\",\n   \"quality\" : 1\n }\n 
\n", "summary" : "

Returns the values of the HTTP ACCEPT header.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()*", "description" : "The header values of the header ACCEPT or the empty sequence if the header is not contained in the request. The order of the returned objects reflects the order of the components in the header." }, "errors" : [ "request:invalid-header if the accept header cannot be parsed" ] }, { "isDocumented" : true, "arity" : 0, "name" : "header-names", "qname" : "request:header-names", "signature" : "() as xs:string*", "description" : "

Returns the names of all the HTTP headers in this request.

\n

Header fields are colon-separated name-value pairs, terminated\n by a carriage return (CR) and line feed (LF) character sequence. The\n names and values of each header are allowed to consist of US-ASCII\n characters only.

\n

The names of the headers are returned using upper-case letters.\n If a header with the same name is contained multiple times in a request,\n its name is only returned once. The order of the names in the resulting\n sequence does not reflect the order of the headers in the request. If\n a header does not have a value, it is as if the header does not exist\n in the request.

\n

Note that the header names user-agent and content-type are not\n returned by this function. They are returned by the corresponding\n functions of this module module\n (e.g. user-agent).

\n", "summary" : "

Returns the names of all the HTTP headers in this request.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string*", "description" : "The names of the headers of this request or the empty sequence if no headers are contained in the request." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "header-value", "qname" : "request:header-value", "signature" : "($name as xs:string) as xs:string?", "description" : "

Returns the value of the HTTP header with the given name.

\n

Header fields are colon-separated name-value pairs, terminated\n by a carriage return (CR) and line feed (LF) character sequence. The\n names and values of each header are allowed to consist of US-ASCII\n characters only.

\n

Please note that header names are considered case-insensitive.\n Also note, that only one value is returned if multiple headers with the\n same names exist in the request. This value is a comma-separated list\n of the values of the headers in the order in which the headers appeared\n in the request.

\n

All headers having a name that starts with SAUSALITO_ are reserved\n and will not be returned by this function.

\n", "summary" : "

Returns the value of the HTTP header with the given name.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
The header name for which the value should be returned.
" } ], "returns" : { "type" : "xs:string?", "description" : "The header value of the header with the $name argument or the empty sequence if no header with that name is contained in the request." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "headers", "qname" : "request:headers", "signature" : "() as object()", "description" : "

Returns an object containing the request's HTTP header names and\n values.

\n

Header fields are colon-separated name-value pairs, terminated\n by a carriage return (CR) and line feed (LF) character sequence. The\n names and values of each header are allowed to consist of US-ASCII\n characters only.

\n

The structure of the object is as shown in the following example:\n

\n 
\n

\n

All headers having a name that starts with SAUSALITO_ are reserved\n and will not be returned by this function.

\n", "summary" : "

Returns an object containing the request's HTTP header names and\n values.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()", "description" : "The header value of the header with the $name argument or the empty sequence if no header with that name is contained in the request." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "method-delete", "qname" : "request:method-delete", "signature" : "() as xs:boolean", "description" : " Returns true if the HTTP method of this request is DELETE.\n", "summary" : "

Returns true if the HTTP method of this request is DELETE.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "true if the HTTP method of this request is DELETE, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "method-get", "qname" : "request:method-get", "signature" : "() as xs:boolean", "description" : " Returns true if the HTTP method of this request is GET.\n", "summary" : "

Returns true if the HTTP method of this request is GET.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "true if the HTTP method of this request is GET, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "method-head", "qname" : "request:method-head", "signature" : "() as xs:boolean", "description" : " Returns true if the HTTP method of this request is HEAD.\n", "summary" : "

Returns true if the HTTP method of this request is HEAD.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "true if the HTTP method of this request is HEAD, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "method-options", "qname" : "request:method-options", "signature" : "() as xs:boolean", "description" : " Returns true if the HTTP method of this request is OPTION.\n", "summary" : "

Returns true if the HTTP method of this request is OPTION.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "true if the HTTP method of this request is OPTION, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "method-post", "qname" : "request:method-post", "signature" : "() as xs:boolean", "description" : " Returns true if the HTTP method of this request is POST.\n", "summary" : "

Returns true if the HTTP method of this request is POST.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "true if the HTTP method of this request is POST, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "method-put", "qname" : "request:method-put", "signature" : "() as xs:boolean", "description" : " Returns true if the HTTP method of this request is PUT.\n", "summary" : "

Returns true if the HTTP method of this request is PUT.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "true if the HTTP method of this request is PUT, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "method", "qname" : "request:method", "signature" : "() as xs:string", "description" : "

Returns the name of the HTTP method used to make this request.

\n", "summary" : "

Returns the name of the HTTP method used to make this request.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "The request method used to make this request (i.e. GET, POST, PUT, DELETE or HEAD)." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "param-names", "qname" : "request:param-names", "signature" : "() as xs:string*", "description" : "

Returns the names of the parameters contained in the current request.

\n

Parameters are name-value pairs contained in the query string of the URL\n used to make this request. As defined in RFC 1738, the query string of a\n URL starts with a \"?\" character and ends with the character (if any).\n Additionally, such name-value pairs may be part of the request's body if\n it is a PUT or POST request and the content-type of the request is\n \"application/x-www-form-urlencoded\". Name-value pairs are separated\n using either the \"&\" or the \";\" character.

\n

In general, the names and the values are precent-encoded. This function\n does the decoding of the parameters, i.e. it returns the values being\n not percent-encoded.

\n

Also, the names of each parameter (after being precent-decoded) are\n treated as UTF-8. Please see the http:param-names#1 function\n for retrieving parameter names submitted using a encoding other than UTF-8.\n

\n", "summary" : "

Returns the names of the parameters contained in the current request.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string*", "description" : "The names of all parameters in this request. The empty sequence is returned if there are none." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "param-names", "qname" : "request:param-names", "signature" : "($encoding as xs:string) as xs:string*", "description" : "

Returns the names of the parameters contained in the current request.

\n

This function is similar to the request:param-names#0 function.\n However, the names are treated (after precent-decoding) using the\n given encoding supplied as parameter. For example, parameters might\n be encoded using the ISO-8859-1 encoding.

\n", "summary" : "

Returns the names of the parameters contained in the current request.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "encoding", "type" : "xs:string", "occurrence" : null, "description" : "
The encoding of the parameters in the request (e.g. ISO-8859-1).
" } ], "returns" : { "type" : "xs:string*", "description" : "The names of all parameters in this request. The empty sequence is returned if there are none." }, "errors" : [ "request:invalid-encoding if the given encoding is invalid or not supported." ] }, { "isDocumented" : true, "arity" : 1, "name" : "param-values", "qname" : "request:param-values", "signature" : "($name as xs:string) as xs:string*", "description" : "

Returns a sequence of parameter values for the given parameter name\n which are contained in the URL's query string or the body of a POST or PUT\n request.

\n

Parameters are name-value pairs contained in the query string of the URL\n used to make this request. As defined in RFC 1738, the query string of a\n URL starts with a \"?\" character and ends with the character (if any).\n Additionally, such name-value pairs may be part of the request's body if\n it is a PUT or POST request and the content-type of the request is\n \"application/x-www-form-urlencoded\". Name-value pairs are separated\n using either the \"&\" or the \";\" character.

\n

In general, the names and the values are precent-encoded. This function\n does the decoding of the parameters, i.e. it returns the values being\n not percent-encoded.

\n

Also, the names and the values of each parameter (after being precent-decoded)\n are treated as UTF-8. Please see the http:param-values#3 function\n for retrieving parameters submitted using a encoding other than UTF-8.

\n

This function returns the empty-sequence if no parameter with the\n given name exists in this request. If you want the function to return\n a default value other than the empty sequence, use the\n http:param-values#2 function.

\n

A URL could contain the following query string:\n name1=value1&name2=value2;name1=value3&name3.\n name1=value1&name2=value2&name1=value3&name3.\n The name value pairs in this query string are\n

\n

\n", "summary" : "

Returns a sequence of parameter values for the given parameter name\n which are contained in the URL's query string or the body of a POST or PUT\n request.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
The name of the parameter whose value(s) should be returned.
" } ], "returns" : { "type" : "xs:string*", "description" : "A sequence of values for the parameter with the given name. The empty sequence is returned if no parameter exists with the given name." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "param-values", "qname" : "request:param-values", "signature" : "($name as xs:string, $default-values as xs:string*) as xs:string*", "description" : "

Returns a sequence of parameter values for the given parameter name\n which are contained in the URL's query string or the body of a POST or PUT\n request.

\n

This function is similar to the request:param-values#1 function.\n However, instead of returning the empty-sequence as a default value it returns\n the given default-values sequence if no parameter with the given name is found\n in this request.

\n", "summary" : "

Returns a sequence of parameter values for the given parameter name\n which are contained in the URL's query string or the body of a POST or PUT\n request.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
The name of the parameter whose value(s) should be returned.
" }, { "name" : "default-values", "type" : "xs:string", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "A sequence of values for the parameter with the given name. The sequence given as $default-values parameter is returned if no parameter exists with the given name." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 3, "name" : "param-values", "qname" : "request:param-values", "signature" : "($name as xs:string, $default-values as xs:string*, $encoding as xs:string) as xs:string*", "description" : "

Returns a sequence of parameter values for the given parameter name\n which are contained in the URL's query string or the body of a POST or PUT\n request.

\n

This function is similar to the request:param-values#2 function.\n However, the names and values are treated (after precent-decoding) using the\n given encoding supplied as third parameter. For example, parameters might\n be encoded using the ISO-8859-1 encoding.

\n", "summary" : "

Returns a sequence of parameter values for the given parameter name\n which are contained in the URL's query string or the body of a POST or PUT\n request.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
The name of the parameter whose value(s) should be returned.
" }, { "name" : "default-values", "type" : "xs:string", "occurrence" : "*", "description" : "" }, { "name" : "encoding", "type" : "xs:string", "occurrence" : null, "description" : "
The encoding of the parameters in the request (e.g. ISO-8859-1)
" } ], "returns" : { "type" : "xs:string*", "description" : "A sequence of values for the parameter with the given name. The sequence given as $default-values parameter is returned if no parameter exists with the given name." }, "errors" : [ "request:invalid-encoding if the given encoding is invalid or not supported." ] }, { "isDocumented" : true, "arity" : 0, "name" : "params", "qname" : "request:params", "signature" : "() as object()", "description" : "

Returns an object containg the parameter names and values contained\n in the URL's query string or the body of a POST or PUT\n request.

\n

The structure of the object for the query string\n \"param1=value1;param2&param2=value2\"\n

\n {\n   \"param1\" : \"value1\",\n   \"param2\" : [ \"\", \"value2\" ]\n }\n 
\n

\n

Parameters are name-value pairs contained in the query string of the URL\n used to make this request. As defined in RFC 1738, the query string of a\n URL starts with a \"?\" character and ends with the character (if any).\n Additionally, such name-value pairs may be part of the request's body if\n it is a PUT or POST request and the content-type of the request is\n \"application/x-www-form-urlencoded\". Name-value pairs are separated\n using either the \"&\" or the \";\" character.

\n

In general, the names and the values are precent-encoded. This function\n does the decoding of the parameters, i.e. it returns the values being\n not percent-encoded.

\n

Also, the names and the values of each parameter (after being precent-decoded)\n are treated as UTF-8. Please see the http:params#1 function\n for retrieving parameters submitted using a encoding other than UTF-8.

\n", "summary" : "

Returns an object containg the parameter names and values contained\n in the URL's query string or the body of a POST or PUT\n request.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()", "description" : "An object containing all the parameter names and values. An empty object is returned if the request doesn't contain any parameters." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "params", "qname" : "request:params", "signature" : "($encoding as xs:string) as object()", "description" : "

Returns an object containg the parameter names and values contained\n in the URL's query string or the body of a POST or PUT\n request.

\n

The structure of the object for the query string\n \"param1=value1;param2&param2=value2\"\n

\n {\n   \"param1\" : \"value1\",\n   \"param2\" : [ \"\", \"value2\" ]\n }\n 
\n

\n

Parameters are name-value pairs contained in the query string of the URL\n used to make this request. As defined in RFC 1738, the query string of a\n URL starts with a \"?\" character and ends with the character (if any).\n Additionally, such name-value pairs may be part of the request's body if\n it is a PUT or POST request and the content-type of the request is\n \"application/x-www-form-urlencoded\". Name-value pairs are separated\n using either the \"&\" or the \";\" character.

\n

In general, the names and the values are precent-encoded. This function\n does the decoding of the parameters, i.e. it returns the values being\n not percent-encoded.

\n

The name and value of each parameter (after being percent-decoded) are treated\n in the encoding given by the $encoding paramter.

\n", "summary" : "

Returns an object containg the parameter names and values contained\n in the URL's query string or the body of a POST or PUT\n request.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "encoding", "type" : "xs:string", "occurrence" : null, "description" : "
The encoding of the parameters in the request (e.g. ISO-8859-1)
" } ], "returns" : { "type" : "object()", "description" : "An object containing all the parameter names and values. An empty object is returned if the request doesn't contain any parameters." }, "errors" : [ "request:invalid-encoding if the given encoding is invalid or not supported." ] }, { "isDocumented" : true, "arity" : 0, "name" : "parts", "qname" : "request:parts", "signature" : "() as object()?", "description" : "

Returns the metadata of all parts contained in a multipart request.

\n

The metadata is returned as an object\n as shown in the following example.

\n
\n {\n   \"media-type\" : \"multipart/form-data; boundary=----------------------------93298e7a66a4\",\n   \"parts\" : [ {\n     \"headers\" : {\n       \"Content-Disposition\" : \"form-data; name=\\\"upload\\\"; filename=\\\"tmp.txt\\\"\",\n       \"Content-Type\" : \"text/plain\"\n     },\n     \"filename\" : \"tmp.txt\",\n     \"name\" : \"upload\",\n     \"src\" : \"urn:uuid:09be48d1-da0e-42c1-a115-a697e1779c45\",\n     \"size\" : \"153\"\n   }, {\n     \"headers\" : {\n       \"Content-Disposition\" : \"form-data; name=\\\"press\\\"\"\n     },\n     \"name\" : \"press\",\n     \"src\" : \"urn:uuid:c80e0609-b703-4d47-9171-441eb397a562\",\n     \"size\" : \"2\"\n   } ]\n }\n 
\n

The media-type field describes the content-type as given in the\n request. Specifically, its value is equal to the value returned by\n request:header-values(\"Content-Type\")).

\n

Each of the array members of the parts field represents one\n part of the multipart request. Each such part contains a header field\n containing one field for each headers belonging to that part.\n The value of the src field can be used to retrieve the actual value\n of the part by passing it to the http:text-part or\n http:binary-part functions. The remaining fields represent a\n parameter of the Content-Disposition header as described in RFC 2183\n (e.g. filename, name, creation-date).

\n

Please note that recursive multipart content is not supported.

\n", "summary" : "

Returns the metadata of all parts contained in a multipart request.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()?", "description" : "an object representing the metadata of the multipart content or an empty sequence if there is no content." }, "errors" : [ "request:non-multipart if the current request does not contain multipart content", "request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)" ] }, { "isDocumented" : true, "arity" : 0, "name" : "path", "qname" : "request:path", "signature" : "() as xs:string", "description" : " Return the path component of the request URI. The path starts after the\n host and ends before the query string starts.\n", "summary" : "

Return the path component of the request URI.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "The path component of the request URI" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "query", "qname" : "request:query", "signature" : "() as xs:string", "description" : "

Returns the query string that was used to make this request.

\n

The query string contains the part of the request URL that\n starts with the '?' character to the end or the starting of the\n fragment (i.e. the '#' character).

\n", "summary" : "

Returns the query string that was used to make this request.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "The query string part of the request's URL" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "remote-addr", "qname" : "request:remote-addr", "signature" : "() as xs:string", "description" : "

Returns the IP address of the client to which this request\n is connected.

\n", "summary" : "

Returns the IP address of the client to which this request\n is connected.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "The IP address on the client side to which this request is connected." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "remote-port", "qname" : "request:remote-port", "signature" : "() as xs:int", "description" : "

Returns the port of the client to which this request is connected.

\n", "summary" : "

Returns the port of the client to which this request is connected.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:int", "description" : "The port on the client side to which this request is connected." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "server-name", "qname" : "request:server-name", "signature" : "() as xs:string", "description" : "

Returns the server name of the server running the application.

\n

The web server's hostname or IP address.

\n", "summary" : "

Returns the server name of the server running the application.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "The name of the server that runs the application accepting this request." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "server-port", "qname" : "request:server-port", "signature" : "() as xs:int", "description" : "

Returns the sever port to which the client making the current request\n is connected.

\n", "summary" : "

Returns the sever port to which the client making the current request\n is connected.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:int", "description" : "The server port to which the client is connected." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "text-content", "qname" : "request:text-content", "signature" : "() as xs:string", "description" : "

Returns the content of the request as string.

\n

The function returns the content of the request only\n if the content-type refers to a type that can be treated\n as text (e.g. text/* or application/xml). The function raises\n an error if the content cannot be treated as text.

\n

The text content is interpreted using the encoding/charset\n that is specified in the Content-Type header of the request. If\n no charset is specified, the default ISO-8859-1 is used. If a encoding\n other than the specified or default one should be used, the\n request:text-content#1 function should be used.

\n", "summary" : "

Returns the content of the request as string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "The content of the request as a string." }, "errors" : [ "request:invalid-encoding if the encoding specified in the Content-Type header is invalid or not supported.", "request:no-text-content if the content contained in the body of the request cannot be treated as text." ] }, { "isDocumented" : true, "arity" : 1, "name" : "text-content", "qname" : "request:text-content", "signature" : "($overwrite-encoding as xs:string) as xs:string", "description" : "

Returns the content of the request as string interpreting\n it with the given encoding.

\n

The function returns the content of the request only\n if the content-type refers to a type that can be treated\n as text (e.g. text/* or application/xml). The function raises\n an error if the content cannot be treated as text.

\n

The text content is interpreted using the given encoding/charset.\n That is, the charset specified in the Content-Type header of the request\n is ignored. An error is raised if the given encoding is invalid\n or not supported.

\n", "summary" : "

Returns the content of the request as string interpreting\n it with the given encoding.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "overwrite-encoding", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "The content of the request as a string." }, "errors" : [ "request:invalid-encoding if the encoding specified in the Content-Type header or the $overwrite-encoding parameter is invalid or not supported.", "request:no-text-content if the content contained in the body of the request cannot be treated as text." ] }, { "isDocumented" : true, "arity" : 1, "name" : "text-part", "qname" : "request:text-part", "signature" : "($ref as xs:string) as xs:string", "description" : "

Returns the value of a part as string

\n

A part is identified by a reference that is the value of a\n src field returned by the request:parts function.

\n

The value of the text part is interpreted using the encoding/charset\n given in the headers of the part. If no encoding is given, the default\n US-ASCII is assumed.

\n", "summary" : "

Returns the value of a part as string \n A part is identified by a reference that is the value of a\n src field returned by the request:parts function.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "ref", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the part
" } ], "returns" : { "type" : "xs:string", "description" : "the value of the part as string" }, "errors" : [ "request:invalid-encoding if the encoding given in the headers of the part is invalid or not supported.", "request:no-text-content if the value of the part cannot be treated as text", "request:invalid-part if the part with the given name ($ref) does not exist", "request:non-multipart if the current request does not contain multipart content", "request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)" ] }, { "isDocumented" : true, "arity" : 2, "name" : "text-part", "qname" : "request:text-part", "signature" : "($ref as xs:string, $overwrite-encoding as xs:string) as xs:string", "description" : "

Returns the value of a part as string interpreting\n it with the given encoding.

\n

A part is identified by a reference that is the value of a\n src field returned by the request:parts function.

\n", "summary" : "

Returns the value of a part as string interpreting\n it with the given encoding.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "ref", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the part
" }, { "name" : "overwrite-encoding", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "the value of the part as string" }, "errors" : [ "request:invalid-encoding if the encoding given using the $overwrite-encoding parameter is invalid or not supported.", "request:no-text-content if the value of the part cannot be treated as text", "request:invalid-part if the part with the given name ($ref) does not exist", "request:non-multipart if the current request does not contain multipart content", "request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)" ] }, { "isDocumented" : true, "arity" : 0, "name" : "uri", "qname" : "request:uri", "signature" : "() as xs:string", "description" : "

Returns the URI that was used to make this request.

\n

The value returned contains the part of the URL starting\n from the path to the end or the starting of the fragment (i.e.\n the '#' character).

\n", "summary" : "

Returns the URI that was used to make this request.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string", "description" : "The path and query string part of the request's URL" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "user-agent", "qname" : "request:user-agent", "signature" : "() as xs:string?", "description" : "

Returns the user agent that made to perform the current request.

\n

This function returns the value of the User-Agent header\n contained in the current request.

\n", "summary" : "

Returns the user agent that made to perform the current request.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:string?", "description" : "The user agent used to perform this request of the empty sequence if there was no User-Agent header in the request." }, "errors" : [ ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/physical-reference" : { "ns" : "http://www.28msec.com/modules/physical-reference", "description" : " The module provides functions to compute an immutable and opaque reference\n for nodes, objects, or arrays and to retrieve such items given their\n identifier, respectively.\n The identifiers are immutable, i.e. a identifier does not change\n during the items lifetime and cannot be reused for another item after the\n original item gets deleted.\n Identifiers are unique, in that, two different items will never have the same\n identifier. A item, at any time during its lifetime, can be retrieved by its\n identifier. Identifiers can only be computed for items stored in a MongoDB\n collection.\n

Please see the data lifecycle\n documentation about details on storing items.

\n", "sees" : [ "Data Lifecycle" ], "authors" : [ "Federico Cavalieri" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.28msec.com/modules/physical-reference", "prefix" : "ref" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "dereference", "qname" : "ref:dereference", "signature" : "($arg as object()) as item()? external", "description" : "

Returns the node, object, or array identified by the given reference.

\n

The function returns the empty sequence if the item\n that is referenced does not exist.

\n", "summary" : "

Returns the node, object, or array identified by the given reference.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "object()", "occurrence" : null, "description" : "
the identifier of the item to retrieve.
" } ], "returns" : { "type" : "item()?", "description" : "the item identified by the identifier passed as parameter or the empty-sequence if no item with that URI is found." }, "errors" : [ "ref::REFERENCE is if the given identifier is invalid." ] }, { "isDocumented" : true, "arity" : 1, "name" : "reference", "qname" : "ref:reference", "signature" : "($arg as item()) as object() external", "description" : "

Returns an immutable and opaque reference (with type xs:anyURI) for\n a given node, object, or array.

\n

The generated identifier is immutable, i.e. a identifier does not\n change during the item's lifetime and cannot be reused for another node after\n the original item gets deleted.

\n

Identifiers are also unique, in that, two different items will never\n have the same identifier.

\n A item, at any time during its lifetime, can be retrieved by its\n identifier, using the ref:dereference function.\n Please note that a reference can only be retrieved for a JSON object or JSON\n array if the item is a member of a collection.\n", "summary" : "

Returns an immutable and opaque reference (with type xs:anyURI) for\n a given node, object, or array.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "item()", "occurrence" : null, "description" : "
the node, object, or array for which the URI should be computed
" } ], "returns" : { "type" : "object()", "description" : "the opaque URI of the item." }, "errors" : [ "ref::COLLECTION is raised if the object or array passed as argument is not a member of a collection." ] } ], "variables" : [ ] }, "http://zorba.io/modules/data-cleaning/conversion" : { "ns" : "http://zorba.io/modules/data-cleaning/conversion", "description" : "

This library module provides data conversion functions for processing calendar dates,\n temporal values, currency values, units of measurement, location names and postal addresses.

\n

\n

The logic contained in this module is not specific to any particular XQuery implementation.

\n", "sees" : [ ], "authors" : [ "Bruno Martins and Diogo Simões" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://zorba.io/modules/data-cleaning/conversion", "prefix" : "conversion" }, { "uri" : "http://www.ecb.int/vocabulary/2002-08-01/eurofxref", "prefix" : "exref" }, { "uri" : "http://www.zorba-xquery.com/modules/http-client", "prefix" : "http" }, { "uri" : "http://zorba.io/modules/reflection", "prefix" : "reflection" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://api.whitepages.com/schema/", "prefix" : "wp" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "address-from-domain", "qname" : "conversion:address-from-domain", "signature" : "($domain as xs:string) as xs:string*", "description" : "

Uses a whois service to discover information about a given domain name, returning a sequence of strings\n for the addresses associated to the name.

\n", "summary" : "

Uses a whois service to discover information about a given domain name, returning a sequence of strings\n for the addresses associated to the name.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "domain", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "A sequence of strings for the addresses associated to the domain name.

Attention : This function is still not implemented.

" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "address-from-geocode", "qname" : "conversion:address-from-geocode", "signature" : "($lat as xs:double, $lon as xs:double) as xs:string*", "description" : "

Geospatial coordinates to placename converter, acting as a wrapper over the Yahoo! reverse geocoder service.

\n", "summary" : "

Geospatial coordinates to placename converter, acting as a wrapper over the Yahoo! reverse geocoder service.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "lat", "type" : "xs:double", "occurrence" : null, "description" : "
Geospatial latitude.
" }, { "name" : "lon", "type" : "xs:double", "occurrence" : null, "description" : "
Geospatial longitude.
" } ], "returns" : { "type" : "xs:string*", "description" : "The sequence of strings corresponding to the different components (e.g., street, city, country, etc.) of the place name that corresponds to the input geospatial coordinates." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "address-from-phone", "qname" : "conversion:address-from-phone", "signature" : "($phone-number as xs:string) as xs:string*", "description" : "

Uses a White-pages Web service to discover information about a given phone number,\n returning a string for the address associated to the phone number.

\n", "summary" : "

Uses a White-pages Web service to discover information about a given phone number,\n returning a string for the address associated to the phone number.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "phone-number", "type" : "xs:string", "occurrence" : null, "description" : "
A string with 10 digits corresponding to the phone number.
" } ], "returns" : { "type" : "xs:string*", "description" : "A string for the addresses associated to the phone number." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "address-from-user", "qname" : "conversion:address-from-user", "signature" : "($name as xs:string) as xs:string*", "description" : "

Uses a White-pages Web service to discover information about a given name,\n returning a sequence of strings for the addresses associated to the name.

\n", "summary" : "

Uses a White-pages Web service to discover information about a given name,\n returning a sequence of strings for the addresses associated to the name.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
The name of person or organization.
" } ], "returns" : { "type" : "xs:string*", "description" : "A sequence of strings for the addresses associated to the name." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "currency-convert", "qname" : "conversion:currency-convert", "signature" : "($v as xs:double, $m1 as xs:string, $m2 as xs:string, $date as xs:string) as xs:double", "description" : "

Currency conversion function, acting as a wrapper over the WebService from the European Central Bank.

\n

\n

WebService documentation at http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html

\n", "summary" : "

Currency conversion function, acting as a wrapper over the WebService from the European Central Bank.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "v", "type" : "xs:double", "occurrence" : null, "description" : "
The amount we wish to convert.
" }, { "name" : "m1", "type" : "xs:string", "occurrence" : null, "description" : "
The source currency (e.g., \"EUR\").
" }, { "name" : "m2", "type" : "xs:string", "occurrence" : null, "description" : "
The target currency (e.g., \"USD\").
" }, { "name" : "date", "type" : "xs:string", "occurrence" : null, "description" : "
The reference date.
" } ], "returns" : { "type" : "xs:double", "description" : "The value resulting from the conversion." }, "errors" : [ "conversion:NOTSUPPORTED if the date, the source currency type or the target currency type are not known to the service." ] }, { "isDocumented" : true, "arity" : 1, "name" : "geocode-from-address", "qname" : "conversion:geocode-from-address", "signature" : "($q as xs:string*) as xs:double*", "description" : "

Placename to geospatial coordinates converter, acting as a wrapper over the Yahoo! geocoder service.

\n", "summary" : "

Placename to geospatial coordinates converter, acting as a wrapper over the Yahoo! geocoder service.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "q", "type" : "xs:string", "occurrence" : "*", "description" : "
A sequence of strings corresponding to the different components (e.g., street, city, country, etc.) of the place name.
" } ], "returns" : { "type" : "xs:double*", "description" : "The pair of latitude and longitude coordinates associated with the input address." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "name-from-domain", "qname" : "conversion:name-from-domain", "signature" : "($domain as xs:string) as xs:string*", "description" : "

Uses a whois service to discover information about a given domain name, returning a sequence of strings\n for the person or organization names associated to the name.

\n", "summary" : "

Uses a whois service to discover information about a given domain name, returning a sequence of strings\n for the person or organization names associated to the name.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "domain", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "A sequence of strings for the person or organization names associated to the domain name.

Attention : This function is still not implemented.

" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "phone-from-address", "qname" : "conversion:phone-from-address", "signature" : "($address as xs:string) as xs:string*", "description" : "

Uses a White-pages Web service to discover information about a given address,\n returning a sequence of strings for the phone number associated to the address.

\n", "summary" : "

Uses a White-pages Web service to discover information about a given address,\n returning a sequence of strings for the phone number associated to the address.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "address", "type" : "xs:string", "occurrence" : null, "description" : "
A string corresponding to the address (ex: 5655 E Gaskill Rd, Willcox, AZ, US).
" } ], "returns" : { "type" : "xs:string*", "description" : "A sequence of strings for the phone number or organization's names associated to the address." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "phone-from-domain", "qname" : "conversion:phone-from-domain", "signature" : "($domain as xs:string) as xs:string*", "description" : "

Uses a whois service to discover information about a given domain name, returning a sequence of strings\n for the phone numbers associated to the name.

\n", "summary" : "

Uses a whois service to discover information about a given domain name, returning a sequence of strings\n for the phone numbers associated to the name.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "domain", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "A sequence of strings for the phone numbers associated to the domain name.

Attention : This function is still not implemented.

" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "phone-from-user", "qname" : "conversion:phone-from-user", "signature" : "($name as xs:string) as xs:string*", "description" : "

Uses a White-pages Web service to discover information about a given name,\n returning a sequence of strings for the phone numbers associated to the name.

\n", "summary" : "

Uses a White-pages Web service to discover information about a given name,\n returning a sequence of strings for the phone numbers associated to the name.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
The name of person or organization.
" } ], "returns" : { "type" : "xs:string*", "description" : "A sequence of strings for the phone numbers associated to the name." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 4, "name" : "unit-convert", "qname" : "conversion:unit-convert", "signature" : "($v as xs:double, $t as xs:string, $m1 as xs:string, $m2 as xs:string) as xs:double", "description" : "

Conversion function for units of measurement, acting as a wrapper over the CuppaIT WebService.

\n", "summary" : "

Conversion function for units of measurement, acting as a wrapper over the CuppaIT WebService.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "v", "type" : "xs:double", "occurrence" : null, "description" : "
The amount we wish to convert.
" }, { "name" : "t", "type" : "xs:string", "occurrence" : null, "description" : "
The type of metric (e.g., \"Distance\")
" }, { "name" : "m1", "type" : "xs:string", "occurrence" : null, "description" : "
The source measurement unit metric (e.g., \"meter\")
" }, { "name" : "m2", "type" : "xs:string", "occurrence" : null, "description" : "
The target measurement unit metric (e.g., \"mile\")
" } ], "returns" : { "type" : "xs:double", "description" : "The value resulting from the conversion" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "user-from-address", "qname" : "conversion:user-from-address", "signature" : "($address as xs:string) as xs:string*", "description" : "

Uses a White-pages Web service to discover information about a given address,\n returning a sequence of strings for the names associated to the address.

\n", "summary" : "

Uses a White-pages Web service to discover information about a given address,\n returning a sequence of strings for the names associated to the address.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "address", "type" : "xs:string", "occurrence" : null, "description" : "
A string corresponding to the address (ex: 5655 E Gaskill Rd, Willcox, AZ, US).
" } ], "returns" : { "type" : "xs:string*", "description" : "A sequence of strings for the person or organization's names associated to the address." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "user-from-phone", "qname" : "conversion:user-from-phone", "signature" : "($phone-number as xs:string) as xs:string*", "description" : "

Uses a White-pages Web service to discover information about a given phone number,\n returning a sequence of strings for the name associated to the phone number.

\n", "summary" : "

Uses a White-pages Web service to discover information about a given phone number,\n returning a sequence of strings for the name associated to the phone number.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "phone-number", "type" : "xs:string", "occurrence" : null, "description" : "
A string with 10 digits corresponding to the phone number.
" } ], "returns" : { "type" : "xs:string*", "description" : "A sequence of strings for the person or organization's name associated to the phone number." }, "errors" : [ ] } ], "variables" : [ { "name" : "conversion:key", "type" : "item()*", "description" : "

The key to be used when accessing the White Pages Web service

\n" } ] }, "http://www.28msec.com/modules/jdbc" : { "ns" : "http://www.28msec.com/modules/jdbc", "description" : " This module allows connecting, querying, and updating JDBC datasources.\n

The results of a query are returned as a sequence of objects:\n { column: value } .\n The type of the value depends on the type of the column in the database:\n \n \n \n \n \n \n \n
JDBC TypesJSONiq Type
integer, bigint, smallint, tinyintinteger
decimal, double, float, numeric, realdouble
boolean, bitboolean
char, blob, longvarchar, longnvarchar, nchar, nclob, nvarchar,\n varchar, sqlxml, date, time, timestampstring
binary, blob, longvarbinary, varbinary, array, datalink,\n java_object, other, refbase64Binary
\n

\n

\n If the value of a column is null, it is mapped to the JSONiq null value.\n

\n

Connecting to a JDBC source requires the following options:\n

\n

Examples:\n

\n

Currently, the 28.io platform supports connections to\n

\n

\n

If you are interested in connecting to other JDBC datasources,\n please contact us at support@28.io.

\n

Important Notice Regarding Function Determinism

\n

The non side-effecting functions:\n

\n are declared deterministic, which means that their results could be cached\n when invoked multiple times with the same arguments in the same query execution.

\n

To not use cached results you can use the following alternative functions:\n

\n which have been declared as being non deterministic.

\n", "sees" : [ ], "authors" : [ "Cristi Dumitru", "Federico Cavalieri" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.28msec.com/modules/credentials", "prefix" : "credentials" }, { "uri" : "http://www.28msec.com/modules/jdbc", "prefix" : "jdbc" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://www.zorba-xquery.com/modules/jdbc", "prefix" : "zjdbc" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "affected-rows", "qname" : "jdbc:affected-rows", "signature" : "($dataset as anyURI) as integer", "description" : " Return the number of affected rows of an updating DataSet.\n", "summary" : "

Return the number of affected rows of an updating DataSet.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "dataset", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the DataSet.
" } ], "returns" : { "type" : "integer", "description" : "the number of affected rows." }, "errors" : [ "SQL008 DataSet doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "clear-params", "qname" : "jdbc:clear-params", "signature" : "($prepared-statement as anyURI) as empty-sequence()", "description" : " Clear all the parameters of the statement.\n", "summary" : "

Clear all the parameters of the statement.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the prepared statement.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "an empty-sequence()" }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "commit", "qname" : "jdbc:commit", "signature" : "($conn as anyURI) as empty-sequence()", "description" : " Commit current transaction from an active connection.\n", "summary" : "

Commit current transaction from an active connection.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "conn", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the connection with a transaction to be commited.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "an empty-sequence()" }, "errors" : [ "SQL08003 Connection doesn't exist", "SQL08000 Connection is closed", "SQL001 Descriptive error, see error in attached message" ] }, { "isDocumented" : true, "arity" : 0, "name" : "connect-nondeterministic", "qname" : "jdbc:connect-nondeterministic", "signature" : "() as anyURI", "description" : " Open a connection to a database using the default credentials.\n

This function has the same semantics as\n connect#0,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Open a connection to a database using the default credentials.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "anyURI", "description" : "an identifier that represents the connection to the server." }, "errors" : [ "NOT-FOUND The default credentials not found.", "SQL28000 Authentication failed.", "SQL08001 Connection error.", "SQL40003 Isolation level not supported.", "SQL001 Descriptive error, see attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "connect-nondeterministic", "qname" : "jdbc:connect-nondeterministic", "signature" : "($connection-config as item()) as anyURI", "description" : " Open a connection to a database.\n

This function has the same semantics as\n connect#1,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Open a connection to a database.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection-config", "type" : "item()", "occurrence" : null, "description" : "
object containing the configuration information.
" } ], "returns" : { "type" : "anyURI", "description" : "an identifier that represents the connection to the server." }, "errors" : [ "NOT-FOUND The specified credentials have not been found.", "NOT-VALID Invalid connection information.", "SQL28000 Authentication failed.", "SQL08001 Connection error.", "SQL40003 Isolation level not supported.", "SQL001 Descriptive error, see attached message." ] }, { "isDocumented" : true, "arity" : 2, "name" : "connect-nondeterministic", "qname" : "jdbc:connect-nondeterministic", "signature" : "($connection-config as item(), $options as object()?) as anyURI", "description" : " Open a connection to a database.\n

This function has the same semantics as\n connect#2,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Open a connection to a database.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection-config", "type" : "item()", "occurrence" : null, "description" : "
object containing the configuration information.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
object to specify additional connection options.
" } ], "returns" : { "type" : "anyURI", "description" : "an identifier that represents the connection to the server." }, "errors" : [ "NOT-FOUND The specified credentials have not been found.", "NOT-VALID Invalid connection information.", "SQL28000 Authentication failed.", "SQL08001 Connection error.", "SQL40003 Isolation level not supported.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 0, "name" : "connect", "qname" : "jdbc:connect", "signature" : "() as anyURI", "description" : " Open a connection to a database using the default credentials.\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

The function returns an opaque URI that can represents the connection.\n This URI has to be passed to other functions of this module that require\n the $conn parameter as a first argument.

\n", "summary" : "

Open a connection to a database using the default credentials.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "anyURI", "description" : "an identifier that represents the connection to the server." }, "errors" : [ "NOT-FOUND The default credentials not found.", "SQL28000 Authentication failed.", "SQL08001 Connection error.", "SQL40003 Isolation level not supported.", "SQL001 Descriptive error, see attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "connect", "qname" : "jdbc:connect", "signature" : "($connection-config as item()) as anyURI", "description" : " Open a connection to a database.\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

The input to the function contains the connection information.\n If a string is used, then the function will interpret it as credential name\n and will connect using the JDBC credentials with the specified name.\n If an object is used, then the function will open a connection using it.\n The object's required structure is described in the module's description.

\n

The function returns an opaque URI that can represents the connection.\n This URI has to be passed to other functions of this module that require\n the $conn parameter as a first argument.

\n", "summary" : "

Open a connection to a database.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection-config", "type" : "item()", "occurrence" : null, "description" : "
object containing the configuration information.
" } ], "returns" : { "type" : "anyURI", "description" : "an identifier that represents the connection to the server." }, "errors" : [ "NOT-FOUND The specified credentials have not been found.", "NOT-VALID Invalid connection information.", "SQL28000 Authentication failed.", "SQL08001 Connection error.", "SQL40003 Isolation level not supported.", "SQL001 Descriptive error, see attached message." ] }, { "isDocumented" : true, "arity" : 2, "name" : "connect", "qname" : "jdbc:connect", "signature" : "($connection-config as item(), $options as object()?) as anyURI", "description" : " Open a connection to a database.\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

The input to the function contains the connection information.\n If a string is used, then the function will interpret it as credential name\n and will connect using the JDBC credentials with the specified name.\n If an object is used, then the function will open a connection using it.\n The object's required structure is described in the module's description.

\n

In addition to the connection configuration, the function allows to\n specify several options:\n

\n

The function returns an opaque URI that represents the connection.\n This URI has to be passed to other functions of this module that require\n the $conn parameter as a first argument.

\n", "summary" : "

Open a connection to a database.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection-config", "type" : "item()", "occurrence" : null, "description" : "
object containing the configuration information.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
object to specify additional connection options.
" } ], "returns" : { "type" : "anyURI", "description" : "an identifier that represents the connection to the server." }, "errors" : [ "NOT-FOUND The specified credentials have not been found.", "NOT-VALID Invalid connection information.", "SQL28000 Authentication failed.", "SQL08001 Connection error.", "SQL40003 Isolation level not supported.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "connection-options", "qname" : "jdbc:connection-options", "signature" : "($conn as anyURI) as object()", "description" : " Return a set with options for a specified connection.\n The returned options are equal to the options specified in function jdbc:connect.\n Consequently, the options are specified as follows:\n \n", "summary" : "

Return a set with options for a specified connection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "conn", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the connection.
" } ], "returns" : { "type" : "object()", "description" : "an object with the connection options." }, "errors" : [ "SQL08003 Connection doesn't exist", "SQL08000 Connection is closed", "SQL001 Descriptive error, see error in attached message" ] }, { "isDocumented" : true, "arity" : 1, "name" : "execute-prepared", "qname" : "jdbc:execute-prepared", "signature" : "($prepared-statement as anyURI) as anyURI", "description" : " Execute SQL statements prepared with jdbc:prepare-statement,\n after setting the parameters values accordingly and returns an identifier to\n a Dataset.\n", "summary" : "

Execute SQL statements prepared with jdbc:prepare-statement,\n after setting the parameters values accordingly and returns an identifier to\n a Dataset.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the prepared statement.
" } ], "returns" : { "type" : "anyURI", "description" : "the identifier of a DataSet." }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 2, "name" : "execute-query-nondeterministic", "qname" : "jdbc:execute-query-nondeterministic", "signature" : "($conn as anyURI, $sql as string) as object()*", "description" : " Execute non-updating SQL statements.\n

This function has the same semantics as\n execute-query#2,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Execute non-updating SQL statements.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "conn", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the active connection.
" }, { "name" : "sql", "type" : "string", "occurrence" : null, "description" : "
The query string to be executed.
" } ], "returns" : { "type" : "object()*", "description" : "an object with the result data rows from the query provided." }, "errors" : [ "SQL08003 Connection doesn't exist.", "SQL08000 Connection is closed.", "SQL005 The statement is Updating type.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "execute-query-prepared-nondeterministic", "qname" : "jdbc:execute-query-prepared-nondeterministic", "signature" : "($prepared-statement as anyURI) as object()*", "description" : " Execute non-updating SQL statements prepared with jdbc:prepare-statement,\n after setting the parameters values accordingly.\n

This function has the same semantics as\n execute-query-prepared#1,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Execute non-updating SQL statements prepared with jdbc:prepare-statement,\n after setting the parameters values accordingly.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the prepared statement.
" } ], "returns" : { "type" : "object()*", "description" : "an object with the result data rows from the query processed with the parameters provided." }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL005 The prepared statement is an updating query.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "execute-query-prepared", "qname" : "jdbc:execute-query-prepared", "signature" : "($prepared-statement as anyURI) as object()*", "description" : " Execute non-updating SQL statements prepared with jdbc:prepare-statement,\n after setting the parameters values accordingly.\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

Every row is represented by an object of column-value representation, as\n in the module description.

\n", "summary" : "

Execute non-updating SQL statements prepared with jdbc:prepare-statement,\n after setting the parameters values accordingly.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the prepared statement.
" } ], "returns" : { "type" : "object()*", "description" : "an object with the result data rows from the query processed with the parameters provided." }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL005 The prepared statement is an updating query.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 2, "name" : "execute-query", "qname" : "jdbc:execute-query", "signature" : "($conn as anyURI, $sql as string) as object()*", "description" : " Execute non-updating SQL statements.\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

Every row is represented by an object of column-value representation, as in\n the module description.

\n", "summary" : "

Execute non-updating SQL statements.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "conn", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the active connection.
" }, { "name" : "sql", "type" : "string", "occurrence" : null, "description" : "
The query string to be executed.
" } ], "returns" : { "type" : "object()*", "description" : "an object with the result data rows from the query provided." }, "errors" : [ "SQL08003 Connection doesn't exist.", "SQL08000 Connection is closed.", "SQL005 The statement is Updating type.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "execute-update-prepared", "qname" : "jdbc:execute-update-prepared", "signature" : "($prepared-statement as anyURI) as integer", "description" : " Execute updating SQL statements prepared with jdbc:prepare-statement.\n", "summary" : "

Execute updating SQL statements prepared with jdbc:prepare-statement.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the prepared statement.
" } ], "returns" : { "type" : "integer", "description" : "the number of affected rows." }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL006 The prepared statement is a non-updating query.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 2, "name" : "execute-update", "qname" : "jdbc:execute-update", "signature" : "($conn as anyURI, $sql as string) as integer", "description" : " Execute updating SQL statements.\n", "summary" : "

Execute updating SQL statements.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "conn", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the active connection.
" }, { "name" : "sql", "type" : "string", "occurrence" : null, "description" : "
The query string to be executed.
" } ], "returns" : { "type" : "integer", "description" : "the number of affected rows." }, "errors" : [ "SQL08003 Connection doesn't exist.", "SQL08000 Connection is closed.", "SQL005 The statement is Read-only type.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 2, "name" : "execute", "qname" : "jdbc:execute", "signature" : "($conn as anyURI, $sql as string) as anyURI", "description" : " Execute any kind of SQL statement.\n", "summary" : "

Execute any kind of SQL statement.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "conn", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the active connection.
" }, { "name" : "sql", "type" : "string", "occurrence" : null, "description" : "
The query string to be executed.
" } ], "returns" : { "type" : "anyURI", "description" : "an identifier of a DataSet." }, "errors" : [ "SQL08003 Connection doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-connected", "qname" : "jdbc:is-connected", "signature" : "($conn as anyURI) as boolean", "description" : " Verify if a connection is still active.\n", "summary" : "

Verify if a connection is still active.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "conn", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the connection to be verified.
" } ], "returns" : { "type" : "boolean", "description" : "true if connected, false otherwise" }, "errors" : [ "SQL08003 Connection doesn't exist", "SQL001 Descriptive error, see error in attached message" ] }, { "isDocumented" : true, "arity" : 1, "name" : "metadata", "qname" : "jdbc:metadata", "signature" : "($dataset as anyURI) as object()", "description" : " Return the metadata of the result of a DataSet.\n

\n More in detail, it returns information about column names, types, and whether\n a column can contain a null value.\n The metadata information can only be returned for DataSets that have been\n executed explicitly using the jdbc:execute function.\n The metadata node returned has the following structure:\n

{\n   \"columns\": [ {\n       \"name\": string,\n       \"type\": string,\n       \"autoincrement\"? = boolean,\n       \"nillable\"? = boolean } * ]\n }
\n

\n

\n If the query is an updating query, then the result object will return the\n number of affected rows like:\n

{ \"affectedrows\": integer }
\n

\n", "summary" : "

Return the metadata of the result of a DataSet.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "dataset", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the DataSet.
" } ], "returns" : { "type" : "object()", "description" : "the metadata associated with an executed DataSet." }, "errors" : [ "SQL008 DataSet doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "parameter-metadata", "qname" : "jdbc:parameter-metadata", "signature" : "($prepared-statement as anyURI) as object()", "description" : " Retrieve the names and types of the prepared statement parameters.\n The metadata returned has the following structure:\n
  {\n     columns: [{\n       \"name\": string,\n       \"type\": string\n       }]\n   } 
\n", "summary" : "

Retrieve the names and types of the prepared statement parameters.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the prepared statement.
" } ], "returns" : { "type" : "object()", "description" : "parameters metadata (name and type) associated with a prepared statement." }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 2, "name" : "prepare-statement", "qname" : "jdbc:prepare-statement", "signature" : "($conn as anyURI, $sql as string) as anyURI", "description" : " Create a prepared statement for multiple executions with diferent parameters.\n Example:\n
\n jdbc:prepare-statement($connection, \"SELECT * FROM users WHERE id=? AND age>?\")\n 
\n", "summary" : "

Create a prepared statement for multiple executions with diferent parameters.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "conn", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the active connection.
" }, { "name" : "sql", "type" : "string", "occurrence" : null, "description" : "
The query string to be executed.
" } ], "returns" : { "type" : "anyURI", "description" : "the identifier of the prepared statement." }, "errors" : [ "SQL08003 Connection doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "result-set", "qname" : "jdbc:result-set", "signature" : "($dataset as anyURI) as object()*", "description" : " Extract the data rows from a non-updating DataSet.\n Every row is represented by an object of column-value representation, as in\n the module description.\n", "summary" : "

Extract the data rows from a non-updating DataSet.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "dataset", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the DataSet.
" } ], "returns" : { "type" : "object()*", "description" : "an object with the result data rows from the DataSet provided." }, "errors" : [ "SQL008 DataSet doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "rollback", "qname" : "jdbc:rollback", "signature" : "($conn as anyURI) as empty-sequence()", "description" : " Rollback the current transaction of a connection.\n", "summary" : "

Rollback the current transaction of a connection.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "conn", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the connection with a transaction to be rollbacked.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "an empty-sequence()" }, "errors" : [ "SQL08003 Connection doesn't exist", "SQL08000 Connection is closed", "SQL001 Descriptive error, see error in attached message" ] }, { "isDocumented" : true, "arity" : 3, "name" : "set-boolean", "qname" : "jdbc:set-boolean", "signature" : "($prepared-statement as anyURI, $parameter-index as integer, $value as boolean) as empty-sequence()", "description" : " Set the value of the designated parameter with a boolean value.\n", "summary" : "

Set the value of the designated parameter with a boolean value.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the prepared statement.
" }, { "name" : "parameter-index", "type" : "integer", "occurrence" : null, "description" : "
The index from the parameter to be set.
" }, { "name" : "value", "type" : "boolean", "occurrence" : null, "description" : "
The value to be set.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "an empty-sequence()" }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL007 Parameter casting error.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 2, "name" : "set-null", "qname" : "jdbc:set-null", "signature" : "($prepared-statement as anyURI, $parameter-index as integer) as empty-sequence()", "description" : " Set the value of the designated parameter with a NULL value.\n", "summary" : "

Set the value of the designated parameter with a NULL value.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the prepared statement.
" }, { "name" : "parameter-index", "type" : "integer", "occurrence" : null, "description" : "
The index from the parameter to be set.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "an empty-sequence()" }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL007 Parameter casting error.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 3, "name" : "set-numeric", "qname" : "jdbc:set-numeric", "signature" : "($prepared-statement as anyURI, $parameter-index as decimal, $value as anyAtomicType) as empty-sequence()", "description" : " Set the value of the designated parameter with a numeric value.\n", "summary" : "

Set the value of the designated parameter with a numeric value.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the prepared statement.
" }, { "name" : "parameter-index", "type" : "decimal", "occurrence" : null, "description" : "
The index from the parameter to be set.
" }, { "name" : "value", "type" : "anyAtomicType", "occurrence" : null, "description" : "
The value to be set.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "an empty-sequence()" }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL007 Parameter casting error.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 3, "name" : "set-string", "qname" : "jdbc:set-string", "signature" : "($prepared-statement as anyURI, $parameter-index as integer, $value as string) as empty-sequence()", "description" : " Set the value of the designated parameter with a string value.\n", "summary" : "

Set the value of the designated parameter with a string value.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the prepared statement.
" }, { "name" : "parameter-index", "type" : "integer", "occurrence" : null, "description" : "
The index from the parameter to be set.
" }, { "name" : "value", "type" : "string", "occurrence" : null, "description" : "
The value to be set.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "an empty-sequence()" }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL007 Parameter casting error.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 3, "name" : "set-value", "qname" : "jdbc:set-value", "signature" : "($prepared-statement as anyURI, $parameter-index as decimal, $value as anyAtomicType) as empty-sequence()", "description" : " Set the value of the designated parameter with the given value.\n The function will try to cast the value to the correct data type and assign\n it to the parameter.\n", "summary" : "

Set the value of the designated parameter with the given value.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier of the prepared statement.
" }, { "name" : "parameter-index", "type" : "decimal", "occurrence" : null, "description" : "
The index from the parameter to be set.
" }, { "name" : "value", "type" : "anyAtomicType", "occurrence" : null, "description" : "
The value to be set.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "an empty-sequence()" }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL007 Parameter casting error.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "tables-nondeterministic", "qname" : "jdbc:tables-nondeterministic", "signature" : "($conn as anyURI) as object()*", "description" : " Return the list of tables from a connection.\n

This function has the same semantics as\n tables#1,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Return the list of tables from a connection.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "conn", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier to a connection.
" } ], "returns" : { "type" : "object()*", "description" : "Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result." }, "errors" : [ "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 4, "name" : "tables-nondeterministic", "qname" : "jdbc:tables-nondeterministic", "signature" : "($conn as anyURI, $catalog as string?, $schema as string?, $table as string?) as object()*", "description" : " Return the list of tables from a connection.\n

This function has the same semantics as tables#4,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Return the list of tables from a connection.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "conn", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier to a connection.
" }, { "name" : "catalog", "type" : "string", "occurrence" : "?", "description" : "
A filter of the catalog name of the tables. Send empty-sequence for all tables.
" }, { "name" : "schema", "type" : "string", "occurrence" : "?", "description" : "
A filter of the schema name of the tables. Send empty-sequence for all tables.
" }, { "name" : "table", "type" : "string", "occurrence" : "?", "description" : "
A filter of the name of the tables. Send empty-sequence for all tables.
" } ], "returns" : { "type" : "object()*", "description" : "Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result." }, "errors" : [ "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "tables", "qname" : "jdbc:tables", "signature" : "($conn as anyURI) as object()*", "description" : " Return the list of tables from a connection.\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n", "summary" : "

Return the list of tables from a connection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "conn", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier to a connection.
" } ], "returns" : { "type" : "object()*", "description" : "Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result." }, "errors" : [ "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 4, "name" : "tables", "qname" : "jdbc:tables", "signature" : "($conn as anyURI, $catalog as string?, $schema as string?, $table as string?) as object()*", "description" : " Return the list of tables from a connection.\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n", "summary" : "

Return the list of tables from a connection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "conn", "type" : "anyURI", "occurrence" : null, "description" : "
The identifier to a connection.
" }, { "name" : "catalog", "type" : "string", "occurrence" : "?", "description" : "
A filter of the catalog name of the tables. Send empty-sequence for all tables.
" }, { "name" : "schema", "type" : "string", "occurrence" : "?", "description" : "
A filter of the schema name of the tables. Send empty-sequence for all tables.
" }, { "name" : "table", "type" : "string", "occurrence" : "?", "description" : "
A filter of the name of the tables. Send empty-sequence for all tables.
" } ], "returns" : { "type" : "object()*", "description" : "Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result." }, "errors" : [ "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] } ], "variables" : [ { "name" : "jdbc:READ-COMMITTED", "type" : "item()*", "description" : " This variable represents the READ-COMMITTED Isolation Level.\n" }, { "name" : "jdbc:READ-UNCOMMITTED", "type" : "item()*", "description" : " This variable represents the READ-UNCOMMITTED Isolation Level.\n" }, { "name" : "jdbc:REPEATABLE-READ", "type" : "item()*", "description" : " This variable represents the REPEATABLE-READ Isolation Levels.\n" }, { "name" : "jdbc:SERIALIZABLE", "type" : "item()*", "description" : " This variable represents the SERIALIZABLE Isolation Levels.\n" }, { "name" : "jdbc:CREDENTIALS-CATEGORY", "type" : "item()*", "description" : " This variable represents the category for the credentials used.\n" } ] }, "http://zorba.io/modules/full-text" : { "ns" : "http://zorba.io/modules/full-text", "description" : " This module provides an XQuery API to full-text functions.\n For general information about this implementation of the\n XQuery and XPath Full Text 1.0 specification\n as well as instructions for building an installing a thesaurus,\n see the Full Text Thesaurus documentation.\n

Notes on languages

\n To refer to particular human languages,\n uses either the\n ISO 639-1\n or\n ISO 639-2\n languages codes.\n Note that only a subset of the\n complete list of language codes\n are supported and not every function supports the same subset.\n

\n Most functions in this module take a language as a parameter\n using the\n xs:language\n XML schema data type.\n

Notes on stemming

\n The stem() functions return the\n stem\n of a word.\n The stem of a word itself, however, is not guaranteed to be a word.\n It is best to consider a stem as an opaque byte sequence.\n All that is guaranteed about a stem is that,\n for a given word,\n the stem of that word will always be the same byte sequence.\n Hence,\n you should never compare the result of one of the stem()\n functions against a non-stemmed string,\n for example:\n
\n  if ( ft:stem( \"apples\" ) eq \"apple\" )             ** WRONG **\n 
\n Instead do:\n
\n  if ( ft:stem( \"apples\" ) eq ft:stem( \"apple\" ) )  ** CORRECT **\n 
\n

Notes on the thesaurus

\n The thesaurus-lookup() functions have \"levels\"\n and \"relationship\" parameters.\n The values for these are implementation-defined.\n The default implementation uses the\n WordNet lexical database,\n version 3.0.\n

\n In WordNet,\n the number of \"levels\" that two phrases are apart\n are how many hierarchical meanings apart they are.\n For example,\n \"canary\" is 5 levels away from \"vertebrate\"\n (carary > finch > oscine > passerine > bird > vertebrate).\n

\n When using the WordNet implementation,\n all of the relationships (and their abbreviations)\n specified by\n ISO 2788\n and\n ANSI/NISO Z39.19-2005\n with the exceptions of \"HN\" (history note)\n and \"X SN\" (see scope note for) are supported.\n These relationships are:\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Rel.MeaningWordNet Rel.
BTbroader termhypernym
BTGbroader term generichypernym
BTIbroader term instanceinstance hypernym
BTPbroader term partitivepart meronym
NTnarrower termhyponym
NTGnarrower term generichyponym
NTInarrower term instanceinstance hyponym
NTPnarrower term partitivepart holonym
RTrelated termalso see
SNscope noten/a
TTtop termhypernym
UFnon-preferred termn/a
USEpreferred termn/a
\n Note that you can specify relationships\n either by their abbreviation\n or their meaning.\n Relationships are case-insensitive.\n In addition to the\n ISO 2788\n and\n ANSI/NISO Z39.19-2005\n relationships,\n All of the relationships offered by WordNet are also supported.\n These relationships are:\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
RelationshipMeaning
also see\n A word that is related to another,\n e.g., for \"varnished\" (furniture)\n one should also see \"finished.\"\n
antonym\n A word opposite in meaning to another,\n e.g., \"light\" is an antonym for \"heavy.\"\n
attribute\n A noun for which adjectives express values,\n e.g., \"weight\" is an attribute\n for which the adjectives \"light\" and \"heavy\"\n express values.\n
cause\n A verb that causes another,\n e.g., \"show\" is a cause of \"see.\"\n
derivationally related form\n A word that is derived from a root word,\n e.g., \"metric\" is a derivationally related form of \"meter.\"\n
derived from adjective\n An adverb that is derived from an adjective,\n e.g., \"correctly\" is derived from the adjective \"correct.\"\n
entailment\n A verb that presupposes another,\n e.g., \"snoring\" entails \"sleeping.\"\n
hypernym\n A word with a broad meaning that more specific words fall under,\n e.g., \"meal\" is a hypernym of \"breakfast.\"\n
hyponym\n A word of more specific meaning than a general term applicable to it,\n e.g., \"breakfast\" is a hyponym of \"meal.\"\n
instance hypernym\n A word that denotes a category of some specific instance,\n e.g., \"author\" is an instance hypernym of \"Asimov.\"\n
instance hyponym\n A term that donotes a specific instance of some general category,\n e.g., \"Asimov\" is an instance hyponym of \"author.\"\n
member holonym\n A word that denotes a collection of individuals,\n e.g., \"faculty\" is a member holonym of \"professor.\"\n
member meronym\n A word that denotes a member of a larger group,\n e.g., a \"person\" is a member meronym of a \"crowd.\"\n
part holonym\n A word that denotes a larger whole comprised of some part,\n e.g., \"car\" is a part holonym of \"engine.\"\n
part meronym\n A word that denotes a part of a larger whole,\n e.g., an \"engine\" is part meronym of a \"car.\"\n
participle of verb\n An adjective that is the participle of some verb,\n e.g., \"breaking\" is the participle of the verb \"break.\"\n
pertainym\n An adjective that classifies its noun,\n e.g., \"musical\" is a pertainym in \"musical instrument.\"\n
similar to\n Similar, though not necessarily interchangeable, adjectives.\n For example, \"shiny\" is similar to \"bright\",\n but they have subtle differences.\n
substance holonym\n A word that denotes a larger whole containing some constituent\n substance, e.g., \"bread\" is a substance holonym of \"flour.\"\n
substance meronym\n A word that denotes a constituant substance of some larger whole,\n e.g., \"flour\" is a substance meronym of \"bread.\"\n
verb group\n A verb that is a member of a group of similar verbs,\n e.g., \"live\" is in the verb group\n of \"dwell\", \"live\", \"inhabit\", etc.\n
\n

Notes on tokenization

\n For general information about the implementation of tokenization,\n including what constitutes a token,\n see the Full Text Tokenizer documentation.\n", "sees" : [ ], "authors" : [ "Paul J. Lucas" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.w3.org/2005/xqt-errors", "prefix" : "err" }, { "uri" : "http://zorba.io/modules/full-text", "prefix" : "ft" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/errors", "prefix" : "zerr" } ], "functions" : [ { "isDocumented" : true, "arity" : 0, "name" : "current-compare-options", "qname" : "ft:current-compare-options", "signature" : "() as object() external", "description" : " Gets the current compare options.\n", "summary" : "

Gets the current compare options.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()", "description" : "said compare options." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "current-lang", "qname" : "ft:current-lang", "signature" : "() as xs:language external", "description" : " Gets the current\n language:\n either the language specified by the\n declare ft-option using\n language\n statement (if any)\n or the one returned by ft:host-lang() (if none).\n", "summary" : "

Gets the current\n language :\n either the language specified by the\n declare ft-option using \n language \n statement (if any)\n or the one returned by ft:host-lang() (if none).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:language", "description" : "said language." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "host-lang", "qname" : "ft:host-lang", "signature" : "() as xs:language external", "description" : " Gets the host's current\n language.\n The \"host\" is the computer on which the software is running.\n The host's current language is obtained as follows:\n \n", "summary" : "

Gets the host's current\n language .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:language", "description" : "said language." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-stem-lang-supported", "qname" : "ft:is-stem-lang-supported", "signature" : "($lang as xs:language) as xs:boolean external", "description" : " Checks whether the given\n language\n is supported for stemming.\n", "summary" : "

Checks whether the given\n language \n is supported for stemming.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lang", "type" : "xs:language", "occurrence" : null, "description" : "
The language to check.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true only if the language is supported." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-stop-word-lang-supported", "qname" : "ft:is-stop-word-lang-supported", "signature" : "($lang as xs:language) as xs:boolean external", "description" : " Checks whether the given\n language\n is supported for stop words.\n", "summary" : "

Checks whether the given\n language \n is supported for stop words.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lang", "type" : "xs:language", "occurrence" : null, "description" : "
The language to check.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true only if the language is supported." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-stop-word", "qname" : "ft:is-stop-word", "signature" : "($word as xs:string) as xs:boolean external", "description" : " Checks whether the given word is a stop-word.\n", "summary" : "

Checks whether the given word is a stop-word.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "word", "type" : "xs:string", "occurrence" : null, "description" : "
The word to check. The word's language is assumed to be the one returned by ft:current-lang().
" } ], "returns" : { "type" : "xs:boolean", "description" : "true only if $word is a stop-word." }, "errors" : [ "err:FTST0009 if ft:current-lang() is not supported." ] }, { "isDocumented" : true, "arity" : 2, "name" : "is-stop-word", "qname" : "ft:is-stop-word", "signature" : "($word as xs:string, $lang as xs:language) as xs:boolean external", "description" : " Checks whether the given word is a stop-word.\n", "summary" : "

Checks whether the given word is a stop-word.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "word", "type" : "xs:string", "occurrence" : null, "description" : "
The word to check.
" }, { "name" : "lang", "type" : "xs:language", "occurrence" : null, "description" : "
The language of $word.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true only if $word is a stop-word." }, "errors" : [ "err:FTST0009 if $lang is not supported." ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-thesaurus-lang-supported", "qname" : "ft:is-thesaurus-lang-supported", "signature" : "($lang as xs:language) as xs:boolean external", "description" : " Checks whether the given\n language\n is supported for look-up using the default thesaurus.\n", "summary" : "

Checks whether the given\n language \n is supported for look-up using the default thesaurus.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lang", "type" : "xs:language", "occurrence" : null, "description" : "
The language to check.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true only if the language is supported." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "is-thesaurus-lang-supported", "qname" : "ft:is-thesaurus-lang-supported", "signature" : "($uri as xs:string, $lang as xs:language) as xs:boolean external", "description" : " Checks whether the given\n language\n is supported for look-up using the thesaurus specified by the given URI.\n", "summary" : "

Checks whether the given\n language \n is supported for look-up using the thesaurus specified by the given URI.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurrence" : null, "description" : "
The URI specifying the thesaurus to use.
" }, { "name" : "lang", "type" : "xs:language", "occurrence" : null, "description" : "
The language to check.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true only if the language is supported." }, "errors" : [ "err:FTST0018 if $uri refers to a thesaurus that is not found in the statically known thesauri." ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-tokenizer-lang-supported", "qname" : "ft:is-tokenizer-lang-supported", "signature" : "($lang as xs:language) as xs:boolean external", "description" : " Checks whether the given\n language\n is supported for tokenization.\n", "summary" : "

Checks whether the given\n language \n is supported for tokenization.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lang", "type" : "xs:language", "occurrence" : null, "description" : "
The language to check.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true only if the language is supported." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "stem", "qname" : "ft:stem", "signature" : "($word as xs:string) as xs:string external", "description" : " Stems the given word.\n", "summary" : "

Stems the given word.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "word", "type" : "xs:string", "occurrence" : null, "description" : "
The word to stem. The word's language is assumed to be the one returned by ft:current-lang().
" } ], "returns" : { "type" : "xs:string", "description" : "the stem of $word." }, "errors" : [ "err:FTST0009 if ft:current-lang() is not supported." ] }, { "isDocumented" : true, "arity" : 2, "name" : "stem", "qname" : "ft:stem", "signature" : "($word as xs:string, $lang as xs:language) as xs:string external", "description" : " Stems the given word.\n", "summary" : "

Stems the given word.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "word", "type" : "xs:string", "occurrence" : null, "description" : "
The word to stem.
" }, { "name" : "lang", "type" : "xs:language", "occurrence" : null, "description" : "
The language of $word.
" } ], "returns" : { "type" : "xs:string", "description" : "the stem of $word." }, "errors" : [ "err:FTST0009 if $lang is not supported." ] }, { "isDocumented" : true, "arity" : 1, "name" : "strip-diacritics", "qname" : "ft:strip-diacritics", "signature" : "($string as xs:string) as xs:string external", "description" : " Strips all diacritical marks from all characters.\n", "summary" : "

Strips all diacritical marks from all characters.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "string", "type" : "xs:string", "occurrence" : null, "description" : "
The string to strip diacritical marks from.
" } ], "returns" : { "type" : "xs:string", "description" : "$string with diacritical marks stripped." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "thesaurus-lookup", "qname" : "ft:thesaurus-lookup", "signature" : "($phrase as xs:string) as xs:string* external", "description" : " Looks-up the given phrase in the default thesaurus.\n", "summary" : "

Looks-up the given phrase in the default thesaurus.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "phrase", "type" : "xs:string", "occurrence" : null, "description" : "
The phrase to look up. The phrase's language is assumed to be the one returned by ft:current-lang().
" } ], "returns" : { "type" : "xs:string*", "description" : "the related phrases if $phrase is found in the thesaurus or the empty sequence if not." }, "errors" : [ "err:FTST0009 if ft:current-lang() is not supported.", "zerr:ZXQP8401 if the thesaurus data file's version is not supported by the currently running version of the software.", "zerr:ZXQP8402 if the thesaurus data file's endianness does not match that of the CPU on which the software is currently running.", "zerr:ZXQP8403 if there was an error reading the thesaurus data." ] }, { "isDocumented" : true, "arity" : 2, "name" : "thesaurus-lookup", "qname" : "ft:thesaurus-lookup", "signature" : "($uri as xs:string, $phrase as xs:string) as xs:string* external", "description" : " Looks-up the given phrase in a thesaurus.\n", "summary" : "

Looks-up the given phrase in a thesaurus.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurrence" : null, "description" : "
The URI specifying the thesaurus to use.
" }, { "name" : "phrase", "type" : "xs:string", "occurrence" : null, "description" : "
The phrase to look up. The phrase's language is assumed to be the one the one returned by ft:current-lang().
" } ], "returns" : { "type" : "xs:string*", "description" : "the related phrases if $phrase is found in the thesaurus or the empty sequence if not." }, "errors" : [ "err:FTST0009 if ft:current-lang() is unsupported.", "err:FTST0018 if $uri refers to a thesaurus that is not found in the statically known thesauri.", "zerr:ZOSE0001 if the thesaurus data file could not be found.", "zerr:ZOSE0002 if the thesaurus data file is not a plain file.", "zerr:ZXQP8401 if the thesaurus data file's version is not supported by the currently running version of the software.", "zerr:ZXQP8402 if the thesaurus data file's endianness does not match that of the CPU on which the software is currently running.", "zerr:ZXQP8403 if there was an error reading the thesaurus data file." ] }, { "isDocumented" : true, "arity" : 3, "name" : "thesaurus-lookup", "qname" : "ft:thesaurus-lookup", "signature" : "($uri as xs:string, $phrase as xs:string, $lang as xs:language) as xs:string* external", "description" : " Looks-up the given phrase in the thesaurus specified by the given URI.\n", "summary" : "

Looks-up the given phrase in the thesaurus specified by the given URI.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurrence" : null, "description" : "
The URI specifying the thesaurus to use.
" }, { "name" : "phrase", "type" : "xs:string", "occurrence" : null, "description" : "
The phrase to look up.
" }, { "name" : "lang", "type" : "xs:language", "occurrence" : null, "description" : "
The language of $phrase.
" } ], "returns" : { "type" : "xs:string*", "description" : "the related phrases if $phrase is found in the thesaurus or the empty sequence if not." }, "errors" : [ "err:FTST0009 if $lang is not supported.", "err:FTST0018 if $uri refers to a thesaurus that is not found in the statically known thesauri.", "zerr:ZOSE0001 if the thesaurus data file could not be found.", "zerr:ZOSE0002 if the thesaurus data file is not a plain file.", "zerr:ZXQP8401 if the thesaurus data file's version is not supported by the currently running version of the software.", "zerr:ZXQP8402 if the thesaurus data file's endianness does not match that of the CPU on which the software is currently running.", "zerr:ZXQP8403 if there was an error reading the thesaurus data file." ] }, { "isDocumented" : true, "arity" : 4, "name" : "thesaurus-lookup", "qname" : "ft:thesaurus-lookup", "signature" : "($uri as xs:string, $phrase as xs:string, $lang as xs:language, $relationship as xs:string) as xs:string* external", "description" : " Looks-up the given phrase in a thesaurus.\n", "summary" : "

Looks-up the given phrase in a thesaurus.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurrence" : null, "description" : "
The URI specifying the thesaurus to use.
" }, { "name" : "phrase", "type" : "xs:string", "occurrence" : null, "description" : "
The phrase to look up.
" }, { "name" : "lang", "type" : "xs:language", "occurrence" : null, "description" : "
The language of $phrase.
" }, { "name" : "relationship", "type" : "xs:string", "occurrence" : null, "description" : "
The relationship the results are to have to $phrase.
" } ], "returns" : { "type" : "xs:string*", "description" : "the related phrases if $phrase is found in the thesaurus or the empty sequence if not." }, "errors" : [ "err:FTST0018 if $uri refers to a thesaurus that is not found in the statically known thesauri.", "err:FTST0009 if $lang is not supported.", "zerr:ZOSE0001 if the thesaurus data file could not be found.", "zerr:ZOSE0002 if the thesaurus data file is not a plain file.", "zerr:ZXQP8401 if the thesaurus data file's version is not supported by the currently running version of the software.", "zerr:ZXQP8402 if the thesaurus data file's endianness does not match that of the CPU on which the software is currently running.", "zerr:ZXQP8403 if there was an error reading the thesaurus data file." ] }, { "isDocumented" : true, "arity" : 6, "name" : "thesaurus-lookup", "qname" : "ft:thesaurus-lookup", "signature" : "($uri as xs:string, $phrase as xs:string, $lang as xs:language, $relationship as xs:string, $level-least as xs:integer, $level-most as xs:integer) as xs:string* external", "description" : " Looks-up the given phrase in a thesaurus.\n", "summary" : "

Looks-up the given phrase in a thesaurus.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "uri", "type" : "xs:string", "occurrence" : null, "description" : "
The URI specifying the thesaurus to use.
" }, { "name" : "phrase", "type" : "xs:string", "occurrence" : null, "description" : "
The phrase to look up.
" }, { "name" : "lang", "type" : "xs:language", "occurrence" : null, "description" : "
The language of $phrase.
" }, { "name" : "relationship", "type" : "xs:string", "occurrence" : null, "description" : "
The relationship the results are to have to $phrase.
" }, { "name" : "level-least", "type" : "xs:integer", "occurrence" : null, "description" : "
The minimum number of levels within the thesaurus to be traversed.
" }, { "name" : "level-most", "type" : "xs:integer", "occurrence" : null, "description" : "
The maximum number of levels within the thesaurus to be traversed.
" } ], "returns" : { "type" : "xs:string*", "description" : "the related phrases if $phrase is found in the thesaurus or the empty sequence if not." }, "errors" : [ "err:FOCA0003 if either $level-least or $level-most is either negative or too large.", "err:FTST0018 if $uri refers to a thesaurus that is not found in the statically known thesauri.", "err:FTST0009 if $lang is not supported.", "zerr:ZOSE0001 if the thesaurus data file could not be found.", "zerr:ZOSE0002 if the thesaurus data file is not a plain file.", "zerr:ZXQP8401 if the thesaurus data file's version is not supported by the currently running version of the software.", "zerr:ZXQP8402 if the thesaurus data file's endianness does not match that of the CPU on which the software is currently running.", "zerr:ZXQP8403 if there was an error reading the thesaurus data file." ] }, { "isDocumented" : true, "arity" : 1, "name" : "tokenize-node", "qname" : "ft:tokenize-node", "signature" : "($node as node()) as object()* external", "description" : " Tokenizes the given node and all of its descendants.\n", "summary" : "

Tokenizes the given node and all of its descendants.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "node()", "occurrence" : null, "description" : "
The node to tokenize. The node's default language is assumed to be the one returned by ft:current-lang().
" } ], "returns" : { "type" : "object()*", "description" : "a (possibly empty) sequence of tokens." }, "errors" : [ "err:FTST0009 if ft:current-lang() is not supported." ] }, { "isDocumented" : true, "arity" : 2, "name" : "tokenize-node", "qname" : "ft:tokenize-node", "signature" : "($node as node(), $lang as xs:language) as object()* external", "description" : " Tokenizes the given node and all of its decendants.\n", "summary" : "

Tokenizes the given node and all of its decendants.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "node()", "occurrence" : null, "description" : "
The node to tokenize.
" }, { "name" : "lang", "type" : "xs:language", "occurrence" : null, "description" : "
The default language of $node.
" } ], "returns" : { "type" : "object()*", "description" : "a (possibly empty) sequence of tokens." }, "errors" : [ "err:FTST0009 if $lang is not supported." ] }, { "isDocumented" : true, "arity" : 2, "name" : "tokenize-nodes", "qname" : "ft:tokenize-nodes", "signature" : "($includes as node()+, $excludes as node()*) as object()* external", "description" : " Tokenizes the set of nodes comprising $includes (and all of its\n descendants) but excluding $excludes (and all of its\n descendants), if any.\n", "summary" : "

Tokenizes the set of nodes comprising $includes (and all of its\n descendants) but excluding $excludes (and all of its\n descendants), if any.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "includes", "type" : "node()", "occurrence" : "+", "description" : "
The set of nodes (and its descendants) to include. The default language is assumed to be the one returned by ft:current-lang().
" }, { "name" : "excludes", "type" : "node()", "occurrence" : "*", "description" : "
The set of nodes (and its descendants) to exclude.
" } ], "returns" : { "type" : "object()*", "description" : "a (possibly empty) sequence of tokens." }, "errors" : [ "err:FTST0009 if ft:current-lang() is not supported." ] }, { "isDocumented" : true, "arity" : 3, "name" : "tokenize-nodes", "qname" : "ft:tokenize-nodes", "signature" : "($includes as node()+, $excludes as node()*, $lang as xs:language) as object()* external", "description" : " Tokenizes the set of nodes comprising $includes (and all of its\n descendants) but excluding $excludes (and all of its\n descendants), if any.\n", "summary" : "

Tokenizes the set of nodes comprising $includes (and all of its\n descendants) but excluding $excludes (and all of its\n descendants), if any.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "includes", "type" : "node()", "occurrence" : "+", "description" : "
The set of nodes (and its descendants) to include.
" }, { "name" : "excludes", "type" : "node()", "occurrence" : "*", "description" : "
The set of nodes (and its descendants) to exclude.
" }, { "name" : "lang", "type" : "xs:language", "occurrence" : null, "description" : "
The default language for nodes.
" } ], "returns" : { "type" : "object()*", "description" : "a (possibly empty) sequence of tokens." }, "errors" : [ "err:FTST0009 if $lang is not supported." ] }, { "isDocumented" : true, "arity" : 1, "name" : "tokenize-string", "qname" : "ft:tokenize-string", "signature" : "($string as xs:string) as xs:string* external", "description" : " Tokenizes the given string.\n", "summary" : "

Tokenizes the given string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "string", "type" : "xs:string", "occurrence" : null, "description" : "
The string to tokenize. The string's language is assumed to be the one returned by ft:current-lang().
" } ], "returns" : { "type" : "xs:string*", "description" : "a (possibly empty) sequence of tokens." }, "errors" : [ "err:FTST0009 if ft:current-lang() is not supported." ] }, { "isDocumented" : true, "arity" : 2, "name" : "tokenize-string", "qname" : "ft:tokenize-string", "signature" : "($string as xs:string, $lang as xs:language) as xs:string* external", "description" : " Tokenizes the given string.\n", "summary" : "

Tokenizes the given string.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "string", "type" : "xs:string", "occurrence" : null, "description" : "
The string to tokenize.
" }, { "name" : "lang", "type" : "xs:language", "occurrence" : null, "description" : "
The language of $string.
" } ], "returns" : { "type" : "xs:string*", "description" : "a (possibly empty) sequence of tokens." }, "errors" : [ "err:FTST0009 if $lang is not supported." ] }, { "isDocumented" : true, "arity" : 0, "name" : "tokenizer-properties", "qname" : "ft:tokenizer-properties", "signature" : "() as object() external", "description" : " Gets properties of the tokenizer for the\n language\n returned by ft:current-lang().\n", "summary" : "

Gets properties of the tokenizer for the\n language \n returned by ft:current-lang() .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()", "description" : "said properties." }, "errors" : [ "err:FTST0009 if ft:current-lang() is not supported." ] }, { "isDocumented" : true, "arity" : 1, "name" : "tokenizer-properties", "qname" : "ft:tokenizer-properties", "signature" : "($lang as xs:language) as object() external", "description" : " Gets properties of the tokenizer for the given\n language.\n", "summary" : "

Gets properties of the tokenizer for the given\n language .

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lang", "type" : "xs:language", "occurrence" : null, "description" : "
The language of the tokenizer to get the properties of.
" } ], "returns" : { "type" : "object()", "description" : "said properties." }, "errors" : [ "err:FTST0009 if $lang is not supported. tokenization specifically." ] } ], "variables" : [ { "name" : "ft:LANG-DA", "type" : "xs:language", "description" : " Predeclared constant for the Danish\n xs:language.\n" }, { "name" : "ft:LANG-DE", "type" : "xs:language", "description" : " Predeclared constant for the German\n xs:language.\n" }, { "name" : "ft:LANG-EN", "type" : "xs:language", "description" : " Predeclared constant for the English\n xs:language.\n" }, { "name" : "ft:LANG-ES", "type" : "xs:language", "description" : " Predeclared constant for the Spanish\n xs:language.\n" }, { "name" : "ft:LANG-FI", "type" : "xs:language", "description" : " Predeclared constant for the Finnish\n xs:language.\n" }, { "name" : "ft:LANG-FR", "type" : "xs:language", "description" : " Predeclared constant for the French\n xs:language.\n" }, { "name" : "ft:LANG-HU", "type" : "xs:language", "description" : " Predeclared constant for the Hungarian\n xs:language.\n" }, { "name" : "ft:LANG-IT", "type" : "xs:language", "description" : " Predeclared constant for the Italian\n xs:language.\n" }, { "name" : "ft:LANG-NL", "type" : "xs:language", "description" : " Predeclared constant for the Dutch\n xs:language.\n" }, { "name" : "ft:LANG-NO", "type" : "xs:language", "description" : " Predeclared constant for the Norwegian\n xs:language.\n" }, { "name" : "ft:LANG-PT", "type" : "xs:language", "description" : " Predeclared constant for the Portuguese\n xs:language.\n" }, { "name" : "ft:LANG-RO", "type" : "xs:language", "description" : " Predeclared constant for the Romanian\n xs:language.\n" }, { "name" : "ft:LANG-RU", "type" : "xs:language", "description" : " Predeclared constant for the Russian\n xs:language.\n" }, { "name" : "ft:LANG-SV", "type" : "xs:language", "description" : " Predeclared constant for the Swedish\n xs:language.\n" }, { "name" : "ft:LANG-TR", "type" : "xs:language", "description" : " Predeclared constant for the Turkish\n xs:language.\n" } ] }, "http://www.zorba-xquery.com/modules/jdbc" : { "ns" : "http://www.zorba-xquery.com/modules/jdbc", "description" : " This module contains functions to connect to any JDBC datasource\n using jvm-util module to handle Java interaction.\n

Important Notice Regarding Function Determinism

\n

The non side-effecting functions:\n

\n are declared deterministic, which means that their results could be cached\n when invoked multiple times with the same arguments in the same query execution.

\n

To not use cached results you can use the following alternative functions:\n

\n which have been declared as being non deterministic.

\n", "sees" : [ ], "authors" : [ "Rodolfo Ochoa", "Federico Cavalieri" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.w3.org/2005/xqt-errors", "prefix" : "err" }, { "uri" : "http://www.zorba-xquery.com/modules/jdbc", "prefix" : "jdbc" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "affected-rows", "qname" : "jdbc:affected-rows", "signature" : "($dataset-id as xs:anyURI) as xs:integer external", "description" : " Return the number of affected rows of a particular DataSet.\n", "summary" : "

Return the number of affected rows of a particular DataSet.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "dataset-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a DataSet.
" } ], "returns" : { "type" : "xs:integer", "description" : "Returns an xs:integer with the number of affected rows." }, "errors" : [ "SQL008 DataSet doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "clear-params", "qname" : "jdbc:clear-params", "signature" : "($prepared-statement as xs:anyURI) as empty-sequence() external", "description" : " Clears the current parameter values immediately.\n", "summary" : "

Clears the current parameter values immediately.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a prepared statement.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "This function returns an empty-sequence()" }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "close-dataset", "qname" : "jdbc:close-dataset", "signature" : "($dataset-id as xs:anyURI) as empty-sequence() external", "description" : " Closes and free resources from a particular DataSet.\n", "summary" : "

Closes and free resources from a particular DataSet.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "dataset-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a DataSet.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "This function returns an empty-sequence()" }, "errors" : [ "SQL008 DataSet doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "close-prepared", "qname" : "jdbc:close-prepared", "signature" : "($prepared-statement as xs:anyURI) as empty-sequence() external", "description" : " Closes and frees from memory any prepared SQL statement created with jdbc:prepare-statement\n", "summary" : "

Closes and frees from memory any prepared SQL statement created with jdbc:prepare-statement\n

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a prepared statement.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "This function returns an empty-sequence()" }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "commit", "qname" : "jdbc:commit", "signature" : "($connection-id as xs:anyURI) as empty-sequence() external", "description" : " Commit current transaction from an active connection.\n", "summary" : "

Commit current transaction from an active connection.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to the connection to be commited.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "This function returns an empty-sequence()" }, "errors" : [ "SQL08003 Connection doesn't exist", "SQL08000 Connection is closed", "SQL001 Descriptive error, see error in attached message" ] }, { "isDocumented" : true, "arity" : 1, "name" : "connect-nondeterministic", "qname" : "jdbc:connect-nondeterministic", "signature" : "($connection-config as object()) as xs:anyURI external", "description" : " Opens a connection to a database.\n

This function has the same semantics as connect#1,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Opens a connection to a database.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection-config", "type" : "object()", "occurrence" : null, "description" : "
json object that has the host and user informations.
" } ], "returns" : { "type" : "xs:anyURI", "description" : "Return an identifier that represents the connection to the server." }, "errors" : [ "SQL28000 Authentication failed.", "SQL08001 Connection error.", "SQL40003 Isolation level not supported.", "SQL001 Descriptive error, see attached message." ] }, { "isDocumented" : true, "arity" : 2, "name" : "connect-nondeterministic", "qname" : "jdbc:connect-nondeterministic", "signature" : "($connection-config as object(), $options as object()?) as xs:anyURI external", "description" : " Opens a connection to a database with specified options.\n

This function has the same semantics as connect#2,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Opens a connection to a database with specified options.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection-config", "type" : "object()", "occurrence" : null, "description" : "
json object that has the host and user informations.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
json object that specifies the connection options.
" } ], "returns" : { "type" : "xs:anyURI", "description" : "Return an identifier that represents the connection to the server." }, "errors" : [ "SQL28000 Authentication failed.", "SQL08001 Connection error.", "SQL40003 Isolation level not supported.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "connect", "qname" : "jdbc:connect", "signature" : "($connection-config as object()) as xs:anyURI external", "description" : " Opens a connection to a database.\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

Returns a URI identifying the connection that has been opened. The\n implementing code determines from the $connection-config either explicitly\n (interpreting the driver attribute) or implicitly (using the type attribute)\n which driver it has to load.

\n", "summary" : "

Opens a connection to a database.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection-config", "type" : "object()", "occurrence" : null, "description" : "
json object that has the host and user informations.
" } ], "returns" : { "type" : "xs:anyURI", "description" : "Return an identifier that represents the connection to the server. Connection coonfiguration example: { \"url\" : \"jdbc:mysql://localhost/\", \"user\" : \"root\", \"password\" : \"\" }" }, "errors" : [ "SQL28000 Authentication failed.", "SQL08001 Connection error.", "SQL40003 Isolation level not supported.", "SQL001 Descriptive error, see attached message." ] }, { "isDocumented" : true, "arity" : 2, "name" : "connect", "qname" : "jdbc:connect", "signature" : "($connection-config as object(), $options as object()?) as xs:anyURI external", "description" : " Opens a connection to a database with specified options.\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n

Returns a URI identifying the connection that has been opened. The\n implementing code determines from the $connection-config either explicitly\n (interpreting the driver attribute) or implicitly (using the type attribute)\n which driver it has to load.

\n", "summary" : "

Opens a connection to a database with specified options.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection-config", "type" : "object()", "occurrence" : null, "description" : "
json object that has the host and user informations.
" }, { "name" : "options", "type" : "object()", "occurrence" : "?", "description" : "
json object that specifies the connection options.
" } ], "returns" : { "type" : "xs:anyURI", "description" : "Return an identifier that represents the connection to the server. Connection options example: { \"autocommit\" : false, \"readonly\"? : true, \"isolation-level\"? : $jdbc:READ-COMMITTED }" }, "errors" : [ "SQL28000 Authentication failed.", "SQL08001 Connection error.", "SQL40003 Isolation level not supported.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "connection-options", "qname" : "jdbc:connection-options", "signature" : "($connection-id as xs:anyURI) as object() external", "description" : " Returns a set with options for a specified connection.\n", "summary" : "

Returns a set with options for a specified connection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to the connection to be verify.
" } ], "returns" : { "type" : "object()", "description" : "Returns and object with the connection options. The returned options are equal to the options specified in function jdbc:connect. Consequently, the options are specified as follows: { \"autocommit\" : xs:boolean, \"readonly\" : xs:boolean, \"isolation-level\" : xs:string }" }, "errors" : [ "SQL08003 Connection doesn't exist", "SQL08000 Connection is closed", "SQL001 Descriptive error, see error in attached message" ] }, { "isDocumented" : true, "arity" : 1, "name" : "execute-prepared", "qname" : "jdbc:execute-prepared", "signature" : "($prepared-statement as xs:anyURI) as xs:anyURI external", "description" : " Executes SQL statements prepared with 5.1 jsql:prepare-statement with values set\n and returns an identifier to a Dataset.\n", "summary" : "

Executes SQL statements prepared with 5.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a prepared statement.
" } ], "returns" : { "type" : "xs:anyURI", "description" : "Return an identifier that represents a DataSet." }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 2, "name" : "execute-query-nondeterministic", "qname" : "jdbc:execute-query-nondeterministic", "signature" : "($connection-id as xs:anyURI, $sql as xs:string) as object()* external", "description" : " Executes non-updating SQL statements.\n

This function has the same semantics as\n execute-query#2,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Executes non-updating SQL statements.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to an active connection.
" }, { "name" : "sql", "type" : "xs:string", "occurrence" : null, "description" : "
The query string to be executed.
" } ], "returns" : { "type" : "object()*", "description" : "Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result." }, "errors" : [ "SQL08003 Connection doesn't exist.", "SQL08000 Connection is closed.", "SQL005 The statement is Updating type.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "execute-query-prepared-nondeterministic", "qname" : "jdbc:execute-query-prepared-nondeterministic", "signature" : "($prepared-statement as xs:anyURI) as object()* external", "description" : " Executes a non-updating SQL statement prepared with 5.1 jsql:prepare-statement.\n

This function has the same semantics as\n execute-query-prepared#1,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Executes a non-updating SQL statement prepared with 5.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a prepared statement.
" } ], "returns" : { "type" : "object()*", "description" : "Return an object with the result data rows from the query processed with the parameter values provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result." }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL005 The prepared statement is an updating query.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "execute-query-prepared", "qname" : "jdbc:execute-query-prepared", "signature" : "($prepared-statement as xs:anyURI) as object()* external", "description" : " Executes a non-updating SQL statement prepared with 5.1 jsql:prepare-statement.\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n", "summary" : "

Executes a non-updating SQL statement prepared with 5.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a prepared statement.
" } ], "returns" : { "type" : "object()*", "description" : "Return an object with the result data rows from the query processed with the parameter values provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result." }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL005 The prepared statement is an updating query.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 2, "name" : "execute-query", "qname" : "jdbc:execute-query", "signature" : "($connection-id as xs:anyURI, $sql as xs:string) as object()* external", "description" : " Executes non-updating SQL statements.\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n", "summary" : "

Executes non-updating SQL statements.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to an active connection.
" }, { "name" : "sql", "type" : "xs:string", "occurrence" : null, "description" : "
The query string to be executed.
" } ], "returns" : { "type" : "object()*", "description" : "Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result." }, "errors" : [ "SQL08003 Connection doesn't exist.", "SQL08000 Connection is closed.", "SQL005 The statement is Updating type.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "execute-update-prepared", "qname" : "jdbc:execute-update-prepared", "signature" : "($prepared-statement as xs:anyURI) as xs:integer external", "description" : " Executes an updating SQL statement prepared with 5.1 jsql:prepare-statement.\n", "summary" : "

Executes an updating SQL statement prepared with 5.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a prepared statement.
" } ], "returns" : { "type" : "xs:integer", "description" : "Returns an xs:integer with the number of affected rows." }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL006 The prepared statement is a non-updating query.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 2, "name" : "execute-update", "qname" : "jdbc:execute-update", "signature" : "($connection-id as xs:anyURI, $sql as xs:string) as xs:integer external", "description" : " Executes updating SQL statements.\n", "summary" : "

Executes updating SQL statements.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to an active connection.
" }, { "name" : "sql", "type" : "xs:string", "occurrence" : null, "description" : "
The query string to be executed.
" } ], "returns" : { "type" : "xs:integer", "description" : "Returns an xs:integer with the number of affected rows." }, "errors" : [ "SQL08003 Connection doesn't exist.", "SQL08000 Connection is closed.", "SQL005 The statement is Read-only type.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 2, "name" : "execute", "qname" : "jdbc:execute", "signature" : "($connection-id as xs:anyURI, $sql as xs:string) as xs:anyURI external", "description" : " Executes any kind of SQL statement.\n", "summary" : "

Executes any kind of SQL statement.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to an active connection.
" }, { "name" : "sql", "type" : "xs:string", "occurrence" : null, "description" : "
The query string to be executed.
" } ], "returns" : { "type" : "xs:anyURI", "description" : "Return an identifier that represents a DataSet." }, "errors" : [ "SQL08003 Connection doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "is-connected", "qname" : "jdbc:is-connected", "signature" : "($connection-id as xs:anyURI) as xs:boolean external", "description" : " Verify if a connection is still active.\n", "summary" : "

Verify if a connection is still active.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to the connection to be verify.
" } ], "returns" : { "type" : "xs:boolean", "description" : "Returns true if connected." }, "errors" : [ "SQL08003 Connection doesn't exist", "SQL001 Descriptive error, see error in attached message" ] }, { "isDocumented" : true, "arity" : 1, "name" : "metadata", "qname" : "jdbc:metadata", "signature" : "($dataset-id as xs:anyURI) as object() external", "description" : " Return the metadata of the result of a particular DataSet.\n", "summary" : "

Return the metadata of the result of a particular DataSet.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "dataset-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a DataSet.
" } ], "returns" : { "type" : "object()", "description" : "This function returns the metadata associated with an executed DataSet. More in detail, it returns information about column names, types, and whether a column can contain a null value. The metadata information can only be returned for DataSets that have been executed explicitly using the jsql:execute function. The metadata node returned by this function is defined as follows: { \"columns\": [ { \"name\": xs:string, \"type\": xs:string, \"autoincrement\"? = xs:boolean, \"nillable\"? = xs:boolean } * ] }" }, "errors" : [ "SQL008 DataSet doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "parameter-metadata", "qname" : "jdbc:parameter-metadata", "signature" : "($prepared-statement as xs:anyURI) as object() external", "description" : " Retrieves the number, types and properties of the prepared statement parameters.\n", "summary" : "

Retrieves the number, types and properties of the prepared statement parameters.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a prepared statement.
" } ], "returns" : { "type" : "object()", "description" : "This function returns the parameters metadata associated with a prepared statement. In other words, it returns information about the column name associated with the parameter, the type, etc. The metadata node returned by this function is defined as follows: { columns: [{ \"name\": xs:string, \"type\": xs:string }] }" }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 2, "name" : "prepare-statement", "qname" : "jdbc:prepare-statement", "signature" : "($connection-id as xs:anyURI, $sql as xs:string) as xs:anyURI external", "description" : " Creates a prepared statement for multiple executions with diferent values.\n", "summary" : "

Creates a prepared statement for multiple executions with diferent values.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to an active connection.
" }, { "name" : "sql", "type" : "xs:string", "occurrence" : null, "description" : "
The query string to be executed.
" } ], "returns" : { "type" : "xs:anyURI", "description" : "Return an identifier that represents the prepared statement. Example: jsql:prepare-statement($connection, \"SELECT * FROM users WHERE id=? AND age>?\")" }, "errors" : [ "SQL08003 Connection doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "result-set", "qname" : "jdbc:result-set", "signature" : "($dataset-id as xs:anyURI) as object()* external", "description" : " This function returns a sequence of objects representing the rows of data from a non-updating query.\n", "summary" : "

This function returns a sequence of objects representing the rows of data from a non-updating query.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "dataset-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a DataSet.
" } ], "returns" : { "type" : "object()*", "description" : "Return an object with the result data rows from the DataSet provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result." }, "errors" : [ "SQL008 DataSet doesn't exist.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "rollback", "qname" : "jdbc:rollback", "signature" : "($connection-id as xs:anyURI) as empty-sequence() external", "description" : " Rollback the current transaction of a connection.\n", "summary" : "

Rollback the current transaction of a connection.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to the connection to be rollbacked.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "This function returns an empty-sequence()" }, "errors" : [ "SQL08003 Connection doesn't exist", "SQL08000 Connection is closed", "SQL001 Descriptive error, see error in attached message" ] }, { "isDocumented" : true, "arity" : 3, "name" : "set-boolean", "qname" : "jdbc:set-boolean", "signature" : "($prepared-statement as xs:anyURI, $parameter-index as xs:integer, $value as xs:boolean) as empty-sequence() external", "description" : " Set the value of the designated parameter with the given value, this function will assign only boolean values.\n", "summary" : "

Set the value of the designated parameter with the given value, this function will assign only boolean values.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a prepared statement.
" }, { "name" : "parameter-index", "type" : "xs:integer", "occurrence" : null, "description" : "
The index from the parameter to be set.
" }, { "name" : "value", "type" : "xs:boolean", "occurrence" : null, "description" : "
The value to be set.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "This function returns an empty-sequence()" }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL007 Parameter casting error.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 2, "name" : "set-null", "qname" : "jdbc:set-null", "signature" : "($prepared-statement as xs:anyURI, $parameter-index as xs:integer) as empty-sequence() external", "description" : " Set the value of the designated parameter with the given value, this function\n will assign only null values if possible.\n", "summary" : "

Set the value of the designated parameter with the given value, this function\n will assign only null values if possible.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a prepared statement.
" }, { "name" : "parameter-index", "type" : "xs:integer", "occurrence" : null, "description" : "
The index from the parameter to be set.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "This function returns an empty-sequence()" }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL007 Parameter casting error.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 3, "name" : "set-numeric", "qname" : "jdbc:set-numeric", "signature" : "($prepared-statement as xs:anyURI, $parameter-index as xs:decimal, $value as xs:anyAtomicType) as empty-sequence() external", "description" : " Set the value of the designated parameter with the given value, this function will assign only numeric values.\n", "summary" : "

Set the value of the designated parameter with the given value, this function will assign only numeric values.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a prepared statement.
" }, { "name" : "parameter-index", "type" : "xs:decimal", "occurrence" : null, "description" : "
The index from the parameter to be set.
" }, { "name" : "value", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The value to be set.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "This function returns an empty-sequence()" }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL007 Parameter casting error.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 3, "name" : "set-string", "qname" : "jdbc:set-string", "signature" : "($prepared-statement as xs:anyURI, $parameter-index as xs:integer, $value as xs:string) as empty-sequence() external", "description" : " Set the value of the designated parameter with the given value, this function will assign only string values.\n", "summary" : "

Set the value of the designated parameter with the given value, this function will assign only string values.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a prepared statement.
" }, { "name" : "parameter-index", "type" : "xs:integer", "occurrence" : null, "description" : "
The index from the parameter to be set.
" }, { "name" : "value", "type" : "xs:string", "occurrence" : null, "description" : "
The value to be set.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "This function returns an empty-sequence()" }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL007 Parameter casting error.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 3, "name" : "set-value", "qname" : "jdbc:set-value", "signature" : "($prepared-statement as xs:anyURI, $parameter-index as xs:decimal, $value as xs:anyAtomicType) as empty-sequence() external", "description" : " Set the value of the designated parameter with the given value,\n this function will assign any value you send\n and it will try to cast to the correct type.\n", "summary" : "

Set the value of the designated parameter with the given value,\n this function will assign any value you send\n and it will try to cast to the correct type.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "prepared-statement", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a prepared statement.
" }, { "name" : "parameter-index", "type" : "xs:decimal", "occurrence" : null, "description" : "
The index from the parameter to be set.
" }, { "name" : "value", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
The value to be set.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "This function returns an empty-sequence()" }, "errors" : [ "SQL003 Prepared statement doesn't exist.", "SQL007 Parameter casting error.", "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "tables-nondeterministic", "qname" : "jdbc:tables-nondeterministic", "signature" : "($connection-id as xs:anyURI) as object()*", "description" : " Return the list of tables from a connection\n

This function has the same semantics as tables#1,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Return the list of tables from a connection\n This function has the same semantics as tables#1 ,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a connection.
" } ], "returns" : { "type" : "object()*", "description" : "Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result." }, "errors" : [ "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 4, "name" : "tables-nondeterministic", "qname" : "jdbc:tables-nondeterministic", "signature" : "($connection-id as xs:anyURI, $catalog as xs:string?, $schema as xs:string?, $table as xs:string?) as object()* external", "description" : " Return the list of tables from a connection.\n

This function has the same semantics as tables#4,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.

\n", "summary" : "

Return the list of tables from a connection.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "connection-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a connection.
" }, { "name" : "catalog", "type" : "xs:string", "occurrence" : "?", "description" : "
A filter of the catalog name of the tables. Send empty-sequence for all tables.
" }, { "name" : "schema", "type" : "xs:string", "occurrence" : "?", "description" : "
A filter of the schema name of the tables. Send empty-sequence for all tables.
" }, { "name" : "table", "type" : "xs:string", "occurrence" : "?", "description" : "
A filter of the name of the tables. Send empty-sequence for all tables.
" } ], "returns" : { "type" : "object()*", "description" : "Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result." }, "errors" : [ "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 1, "name" : "tables", "qname" : "jdbc:tables", "signature" : "($connection-id as xs:anyURI) as object()*", "description" : " Return the list of tables from a connection\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n", "summary" : "

Return the list of tables from a connection\n This function is declared as deterministic and should be used whenever result\n caching is acceptable.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a connection.
" } ], "returns" : { "type" : "object()*", "description" : "Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result." }, "errors" : [ "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] }, { "isDocumented" : true, "arity" : 4, "name" : "tables", "qname" : "jdbc:tables", "signature" : "($connection-id as xs:anyURI, $catalog as xs:string?, $schema as xs:string?, $table as xs:string?) as object()* external", "description" : " Return the list of tables from a connection\n

This function is declared as deterministic and should be used whenever result\n caching is acceptable.

\n", "summary" : "

Return the list of tables from a connection\n This function is declared as deterministic and should be used whenever result\n caching is acceptable.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "connection-id", "type" : "xs:anyURI", "occurrence" : null, "description" : "
The identifier to a connection.
" }, { "name" : "catalog", "type" : "xs:string", "occurrence" : "?", "description" : "
A filter of the catalog name of the tables. Send empty-sequence for all tables.
" }, { "name" : "schema", "type" : "xs:string", "occurrence" : "?", "description" : "
A filter of the schema name of the tables. Send empty-sequence for all tables.
" }, { "name" : "table", "type" : "xs:string", "occurrence" : "?", "description" : "
A filter of the name of the tables. Send empty-sequence for all tables.
" } ], "returns" : { "type" : "object()*", "description" : "Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result." }, "errors" : [ "SQL08000 Connection is closed.", "SQL001 Descriptive error, see error in attached message." ] } ], "variables" : [ { "name" : "jdbc:NOT-SUPPORTED", "type" : "item()*", "description" : " This variable represents the NOT-SUPPORTED level for Isolation Levels in $options for 2.2 connect function.\n" }, { "name" : "jdbc:READ-COMMITTED", "type" : "item()*", "description" : " This variable represents the READ-COMMITTED level for Isolation Levels in $options for 2.2 connect function.\n" }, { "name" : "jdbc:READ-UNCOMMITTED", "type" : "item()*", "description" : " This variable represents the READ-UNCOMMITTED level for Isolation Levels in $options for 2.2 connect function.\n" }, { "name" : "jdbc:REPEATABLE-READ", "type" : "item()*", "description" : " This variable represents the REPEATABLE-READ level for Isolation Levels in $options for 2.2 connect function.\n" }, { "name" : "jdbc:SERIALIZABLE", "type" : "item()*", "description" : " This variable represents the SERIALIZABLE level for Isolation Levels in $options for 2.2 connect function.\n" } ] }, "http://www.28msec.com/modules/http-response" : { "ns" : "http://www.28msec.com/modules/http-response", "description" : " The response module can be used to modify the HTTP response\n that will be send as a result. For example, the\n content-type function can be used to set the\n Content-Type header and determine the encoding of data in the\n response.\n", "sees" : [ ], "authors" : [ "Matthias Brantner" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.28msec.com/modules/http-response", "prefix" : "http" }, { "uri" : "http://www.w3.org/2010/xslt-xquery-serialization", "prefix" : "output" }, { "uri" : "http://www.28msec.com/modules/http/response#2.0", "prefix" : "res" }, { "uri" : "http://www.28msec.com/modules/http-response", "prefix" : "resp" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "code-for-status", "qname" : "resp:code-for-status", "signature" : "($status as xs:string) as xs:integer", "description" : " Convert between the name of the HTTP status code and\n the integer value of that status code.\n", "summary" : "

Convert between the name of the HTTP status code and\n the integer value of that status code.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "status", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:integer", "description" : "the integer value of the given status code." }, "errors" : [ "http:invalid-status if the given name does not represent a valid http status code" ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-type-binary", "qname" : "resp:content-type-binary", "signature" : "($type as xs:string) as xs:boolean", "description" : "

Test if a given content-type is a binary content-type. A\n content-type is considered to be binary if it's not a text\n content-type.

\n", "summary" : "

Test if a given content-type is a binary content-type.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to test.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the given content-type is a binary content-type, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-type-html", "qname" : "resp:content-type-html", "signature" : "($type as xs:string) as xs:boolean", "description" : "

Test if a given content-type is a HTML content-type, i.e.\n the content-type is the string \"text/html\".

\n", "summary" : "

Test if a given content-type is a HTML content-type, i.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to test.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the given content-type is the HTML content-type, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-type-json", "qname" : "resp:content-type-json", "signature" : "($type as xs:string) as xs:boolean", "description" : "

Test if a given content-type is a JSON content-type, i.e.\n the content-type is the string \"application/json\".

\n", "summary" : "

Test if a given content-type is a JSON content-type, i.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to test.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the given content-type is the JSON content-type, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-type-mixed-json-xml", "qname" : "resp:content-type-mixed-json-xml", "signature" : "($type as xs:string) as xs:boolean", "description" : "

Test if a given content-type is a mixed JSON-XML content-type, i.e.\n the content-type is the string \"application/mixed-json-xml\".

\n", "summary" : "

Test if a given content-type is a mixed JSON-XML content-type, i.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to test.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the given content-type is a mixed JSON-XML content-type, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-type-text", "qname" : "resp:content-type-text", "signature" : "($type as xs:string) as xs:boolean", "description" : "

Test if a given content-type is a text content-type.

\n

A text content-type starts with \"text/\" or contains either of\n the strings \"xml\" or \"json\".

\n", "summary" : "

Test if a given content-type is a text content-type.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to test.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the given content-type is a text content-type, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-type-xhtml", "qname" : "resp:content-type-xhtml", "signature" : "($type as xs:string) as xs:boolean", "description" : "

Test if a given content-type is a XHTML content-type, i.e.\n the content-type is the string \"application/xhtml+xml\".

\n", "summary" : "

Test if a given content-type is a XHTML content-type, i.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to test.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the given content-type is the XHTML content-type, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-type-xml", "qname" : "resp:content-type-xml", "signature" : "($type as xs:string) as xs:boolean", "description" : "

Test if a given content-type is a XML content-type

\n

A XML content-type is a content-type that is \"application/xml\"\n or ends : with the string \"+xml\".

\n", "summary" : "

Test if a given content-type is a XML content-type \n A XML content-type is a content-type that is \"application/xml\"\n or ends : with the string \"+xml\".

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to test.
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the given content-type is a XML content-type, false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "content-type", "qname" : "resp:content-type", "signature" : "($type as xs:string) as empty-sequence()", "description" : "

Sets the Content-Type header for the response.

\n

\n For example,\n resp:content-type(\"text/plain\") will cause the\n header\n Content-Type: text/plain to be added for the response.

\n

In addtion to setting the Content-Type header, the function also\n sets the serialization parameters to the default values for serialization\n method for the given content-type. For example, if the content-type is set to\n text/plain, the default serialization parameters for the text\n serialization method will be used.

\n

The functions resp:content-type-text/xml/html/xhtml/binary may be used\n to figure out which serialization method will be used for a specific\n content-type.

\n

If the given content-type contains a charset declaration (e.g.\n resp:content-type(\"text/plain;charset=ISO-8859-1\")), the\n content of the response will be transcoded to the given encoding.

\n

The default serialization parameters set by this function can\n be overwritten using the resp:serialization-parameters() function.

\n", "summary" : "

Sets the Content-Type header for the response.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to be set
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function is sequential and returns the empty sequence" }, "errors" : [ "http:invalid-encoding if the given encoding is invalid or not supported." ] }, { "isDocumented" : true, "arity" : 2, "name" : "content-type", "qname" : "resp:content-type", "signature" : "($type as xs:string, $params as object()) as empty-sequence()", "description" : "

Sets the Content-Type header for the response.

\n

For example,\n resp:content-type(\"text/plain\") will cause the\n header\n Content-Type: text/plain to be added for the response.

\n

In addition to the content-type, the function also allows to\n specify the serialization method and parameters that will be used\n for serializing the result. For details about this parameter, please\n refer to resp:serialization-parameters#1.

\n

If the content-type suggest using a binary serialization,\n resp:decode-binary#1 will be called and set to true except if\n the serialization method is specified at the same time. In this\n case, the serialization method will be used as specified.

\n

If the given content-type contains a charset declaration (e.g.\n resp:content-type(\"text/plain;charset=ISO-8859-1\")), the\n content of the response will be transcoded to the given encoding.\n If the serialization parameters also contain a charset declaration,\n the charset contained in the content-type will be used. to transcode\n the result.

\n", "summary" : "

Sets the Content-Type header for the response.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "type", "type" : "xs:string", "occurrence" : null, "description" : "
the content-type to be set
" }, { "name" : "params", "type" : "object()", "occurrence" : null, "description" : "
the serialization parameters that will be used for serialization the result.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function is sequential and returns the empty sequence" }, "errors" : [ "http:invalid-encoding if the given encoding is invalid or not supported." ] }, { "isDocumented" : true, "arity" : 0, "name" : "decode-binary", "qname" : "resp:decode-binary", "signature" : "() as xs:boolean", "description" : "

Returns the boolean indiciating whether base64Binary returned by\n this request will be decoded.

\n

The default if not modified using resp:decode-binary is false.

\n", "summary" : "

Returns the boolean indiciating whether base64Binary returned by\n this request will be decoded.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:boolean", "description" : "the said boolean value" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "decode-binary", "qname" : "resp:decode-binary", "signature" : "($decode as xs:boolean) as empty-sequence()", "description" : "

If this function is invoked with true, the result of the request\n will not be serialized. Instead, the result will be the binary values\n of any item that is of type base64Binary. The values of all other\n items will not be part of the result.

\n

Please note that all serialization parameters which have been set using\n resp:serialization-parameters will be ignored. Also, the output encoding\n is ignored for binaries.

\n", "summary" : "

If this function is invoked with true, the result of the request\n will not be serialized.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "decode", "type" : "xs:boolean", "occurrence" : null, "description" : "
boolean value indicating whether base64Binary should be decoded.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function is sequential and returns the empty sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "encoding", "qname" : "resp:encoding", "signature" : "($encoding as xs:string) as empty-sequence()", "description" : "

The function sets the output encoding that will be\n used for the payload of the response.

\n

For example,\n resp:encoding(\"ISO-8859-1\") will cause the\n content in the response to be encoded using ISO-8859-1.

\n

Please note that the encoding only applies to textual data.\n It is not used if the function decode-binary()\n was invoked passing true as parameter.

\n", "summary" : "

The function sets the output encoding that will be\n used for the payload of the response.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "encoding", "type" : "xs:string", "occurrence" : null, "description" : "
the encoding to be used for the payload of the response.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function is sequential and returns the empty sequence" }, "errors" : [ "http:invalid-encoding if the given encoding is invalid or not supported." ] }, { "isDocumented" : true, "arity" : 2, "name" : "header", "qname" : "resp:header", "signature" : "($name as xs:string, $value as xs:string) as xs:string?", "description" : "

Set a HTTP header in the response.

\n

If a header with the same name was already set, the\n value is overwritten and the function returns the old value. As defined\n in the HTTP specification, multiple headers with the same name\n can be combined into one header whose value is a comma-separated\n list of the values.

\n

The following headers must not be set using this function.\n Instead, other functions of this module should be used in order\n to implemented the required semantics:\n

\n

\n", "summary" : "

Set a HTTP header in the response.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurrence" : null, "description" : "
the name of the header to set
" }, { "name" : "value", "type" : "xs:string", "occurrence" : null, "description" : "
the value of the header to set `
" } ], "returns" : { "type" : "xs:string?", "description" : "the value of the header previously set or the empty sequence if no header has been set with the same name." }, "errors" : [ "resp:invalid-header-name if an invalid name is used for the header." ] }, { "isDocumented" : true, "arity" : 1, "name" : "message-for-status", "qname" : "resp:message-for-status", "signature" : "($status as xs:string) as xs:string", "description" : " Convert between the HTTP status code as string and\n the name/message of that status code.\n", "summary" : "

Convert between the HTTP status code as string and\n the name/message of that status code.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "status", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "the message for the given name" }, "errors" : [ "http:invalid-status if the given name does not represent a valid http status code" ] }, { "isDocumented" : true, "arity" : 1, "name" : "redirect", "qname" : "resp:redirect", "signature" : "($url as xs:string) as empty-sequence()", "description" : " This function sets the HTTP 302 redirect status code in the response. As\n a result, a redirect to the URL given as parameter will be made.\n", "summary" : "

This function sets the HTTP 302 redirect status code in the response.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "url", "type" : "xs:string", "occurrence" : null, "description" : "
The URL to which the redirect will be made.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "The empty-sequence is returned." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "serialization-parameters", "qname" : "resp:serialization-parameters", "signature" : "() as object()", "description" : "

Returns the serialization parameters that are currently\n active, i.e. the ones that will be used to serialize the result\n of this request.

\n

This will either be the default, the defaults set when\n calling resp:content-type(), or the ones set by\n resp:serialization-parameters().

\n", "summary" : "

Returns the serialization parameters that are currently\n active, i.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()", "description" : "the said serialization parameters" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "serialization-parameters", "qname" : "resp:serialization-parameters", "signature" : "($params as object()) as empty-sequence()", "description" : "

Set the serialization parameters used for serializing the result\n of the request.

\n

The following example shows how to set several options\n for the JSON serialization method.\n

\n {\n   \"method\" : \"json\",\n   \"indent\" : false,\n   \"encoding\" : \"UTF-16\"\n }\n 
\n

\n

Please note that serialization options set by this function can\n be overwritten by a subsequent call to resp:content-type. In this\n case, the options will be reset to the default for the given\n content-type. Also note, that the output encoding can be overwritten\n by subsequently calling the resp:encoding function.

\n", "summary" : "

Set the serialization parameters used for serializing the result\n of the request.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "params", "type" : "object()", "occurrence" : null, "description" : "
the serialization parameters that will be used to serialize the result of the request
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the function is sequential and, on success, returns the empty sequence." }, "errors" : [ "err:XQDY0027 if the input is not valid", "http:invalid-encoding if the encoding specified in the serialization options is invalid or not supported." ] }, { "isDocumented" : true, "arity" : 0, "name" : "serializer-defaults-html", "qname" : "resp:serializer-defaults-html", "signature" : "() as object()", "description" : "

Returns an object that can be used to specify the\n settings of serialization parameters for the HTML serialization\n method.

\n

The defaults are\n

\n {\n   \"encoding\" : \"UTF-8\",\n   \"indent\" : true,\n   \"method\" : \"html\",\n   \"version\" : \"4.01\",\n   \"doctype-system\" : \"http://www.w3.org/TR/html4/loose.dtd\",\n   \"doctype-public\" : \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n }\n 
\n

\n

For example, those defaults are used when setting\n the content-type to some HTML content-type (i.e. text/html).

\n", "summary" : "

Returns an object that can be used to specify the\n settings of serialization parameters for the HTML serialization\n method.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()", "description" : "an object that can be used to specify the above serialization parameters." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "serializer-defaults-json-xml-hybrid", "qname" : "resp:serializer-defaults-json-xml-hybrid", "signature" : "() as object()", "description" : "

Returns an object that can be used to specify the\n settings of serialization parameters for the json\n serialization method.

\n

The defaults are\n

\n {\n   \"encoding\" : \"UTF-8\",\n   \"indent\" : \"yes\",\n   \"method\" : \"json\"\n }\n 
\n

\n

For example, those defaults are used when setting\n the content-type to some XML content-type (e.g. application/atom+xml).

\n", "summary" : "

Returns an object that can be used to specify the\n settings of serialization parameters for the json\n serialization method.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()", "description" : "an object that can be used to specify the above serialization parameters." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "serializer-defaults-json", "qname" : "resp:serializer-defaults-json", "signature" : "() as object()", "description" : "

Returns an object that can be used to specify the\n settings of serialization parameters for the json-xml hybrid\n serialization method.

\n

The defaults are\n

\n {\n   \"encoding\" : \"UTF-8\",\n   \"indent\" : \"yes\",\n   \"method\" : \"json\"\n }\n 
\n

\n

For example, those defaults are used when setting\n the content-type to application/mixed-json-xml.

\n", "summary" : "

Returns an object that can be used to specify the\n settings of serialization parameters for the json-xml hybrid\n serialization method.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()", "description" : "an object that can be used to specify the above serialization parameters." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "serializer-defaults-text", "qname" : "resp:serializer-defaults-text", "signature" : "() as object()", "description" : "

Returns an object that can be used to specify the\n settings of serialization parameters for the text serialization\n method.

\n

The only default used is\n

\n {\n  \"method\" : \"text\",\n  \"encoding\" : \"UTF-8\",\n }\n 
\n

\n

For example, this default is used when setting\n the content-type to some text content-type (e.g. text/plain).

\n", "summary" : "

Returns an object that can be used to specify the\n settings of serialization parameters for the text serialization\n method.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()", "description" : "an object that can be used to specify the above serialization parameters." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "serializer-defaults-xhtml", "qname" : "resp:serializer-defaults-xhtml", "signature" : "() as object()", "description" : "

Returns an object that can be used to specify the\n settings of serialization parameters for the XHTML serialization\n method.

\n

The defaults are\n

\n {\n   \"encoding\" : \"UTF-8\",\n   \"indent\" : true,\n   \"method\" : \"xhtml\",\n   \"omit-xml-declaration\" : true,\n   \"version\" : \"1.0\",\n   \"doctype-system\" : \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\",\n   \"doctype-public\" : \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n }\n 
\n

\n

For example, those defaults are used when setting\n the content-type to some XHTML content-type (i.e. application/xhtml+xml).

\n", "summary" : "

Returns an object that can be used to specify the\n settings of serialization parameters for the XHTML serialization\n method.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()", "description" : "an object that can be used to specify the above serialization parameters." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "serializer-defaults-xml", "qname" : "resp:serializer-defaults-xml", "signature" : "() as object()", "description" : "

Returns an object that can be used to specify the\n settings of serialization parameters for the XML serialization\n method.

\n

The defaults are\n

\n {\n  \"method\" : \"xml\",\n  \"encoding\" : \"UTF-8\",\n  \"indent\" : true,\n  \"omit-xml-declaration\" : true,\n  \"version\" : \"1.0\"\n }\n 
\n

\n

For example, those defaults are used when setting\n the content-type to some XML content-type (e.g. application/atom+xml).

\n", "summary" : "

Returns an object that can be used to specify the\n settings of serialization parameters for the XML serialization\n method.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()", "description" : "an object that can be used to specify the above serialization parameters." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "status-code", "qname" : "resp:status-code", "signature" : "($status as xs:integer) as empty-sequence()", "description" : "

Sets the status code of the HTTP response to the integer given as\n parameter.

\n For example,\n resp:status(204)\n will result in \"HTTP/1.1 204 No Content\".\n", "summary" : "

Sets the status code of the HTTP response to the integer given as\n parameter.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "status", "type" : "xs:integer", "occurrence" : null, "description" : "
The status code of the HTTP response as integer.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "On success, the empty-sequence is returned" }, "errors" : [ "http:invalid-status-code if the given integer does not reflect a valid HTTP status code" ] }, { "isDocumented" : true, "arity" : 1, "name" : "status", "qname" : "resp:status", "signature" : "($status as xs:string) as empty-sequence()", "description" : "

Sets the status code of the HTTP response to code associated\n with the given string.

\n

For example,\n resp:status($http:no-content)\n will result in \"HTTP/1.1 204 No Content\".

\n", "summary" : "

Sets the status code of the HTTP response to code associated\n with the given string.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "status", "type" : "xs:string", "occurrence" : null, "description" : "
The status code of the HTTP response as a string (e.g. $http:no-content)
" } ], "returns" : { "type" : "empty-sequence()", "description" : "On success, the empty-sequence is returned" }, "errors" : [ "http:invalid-status if the given string does not represent a valid HTTP status code;" ] }, { "isDocumented" : true, "arity" : 1, "name" : "valid-status", "qname" : "resp:valid-status", "signature" : "($status as xs:string) as xs:boolean", "description" : " Test whether the given name refers to a valid HTTP status code.\n", "summary" : "

Test whether the given name refers to a valid HTTP status code.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "status", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the given name refers to a valid HTTP status code, false otherwise." }, "errors" : [ ] } ], "variables" : [ { "name" : "http:precondition-required", "type" : "item()*", "description" : " A string representing the HTTP Status Code 428 Precondition Required (RFC 6585)\n" }, { "name" : "http:gone", "type" : "item()*", "description" : " A string representing the HTTP Status Code 410 GONE\n" }, { "name" : "http:length-required", "type" : "item()*", "description" : " A string representing the HTTP Status Code 411 Length Required\n" }, { "name" : "http:precondition-failed", "type" : "item()*", "description" : " A string representing the HTTP Status Code 412 Precondition Failed\n" }, { "name" : "http:request-entity-too-large", "type" : "item()*", "description" : " A string representing the HTTP Status Code 413 Request Entity Too Large\n" }, { "name" : "http:request-entity-too-long", "type" : "item()*", "description" : " A string representing the HTTP Status Code 414 Request Entity Too Long\n" }, { "name" : "http:unsupported-media-type", "type" : "item()*", "description" : " A string representing the HTTP Status Code 415 Unsupported Media Type\n" }, { "name" : "http:request-range-not-satisfiable", "type" : "item()*", "description" : " A string representing the HTTP Status Code 416 Request Range Not Satisfiable\n" }, { "name" : "http:expectation-failed", "type" : "item()*", "description" : " A string representing the HTTP Status Code 417 Expectation Failed\n" }, { "name" : "http:im-a-teapot", "type" : "item()*", "description" : " A string representing the HTTP Status Code 418 I'm a teapot (RFC 2324)\n" }, { "name" : "http:enhance-your-calm", "type" : "item()*", "description" : " A string representing the HTTP Status Code 420 Enhance Your Calm\n" }, { "name" : "http:unprocessable-entity", "type" : "item()*", "description" : " A string representing the HTTP Status Code 422 Unprocessable Entity (WebDAV; RFC 4918)\n" }, { "name" : "http:locked", "type" : "item()*", "description" : " A string representing the HTTP Status Code 423 Locked (WebDAV; RFC 4918)\n" }, { "name" : "http:failed-dependency", "type" : "item()*", "description" : " A string representing the HTTP Status Code 424 Failed Dependency (WebDAV; RFC 4918)\n" }, { "name" : "http:unordered-collection", "type" : "item()*", "description" : " A string representing the HTTP Status Code 425 Unordered Collection\n" }, { "name" : "http:upgrade-required", "type" : "item()*", "description" : " A string representing the HTTP Status Code 426 Upgrade Required\n" }, { "name" : "http:conflict", "type" : "item()*", "description" : " A string representing the HTTP Status Code 409 Conflict\n" }, { "name" : "http:too-many-requests", "type" : "item()*", "description" : " A string representing the HTTP Status Code 429 Too Many Requests (RFC 6585)\n" }, { "name" : "http:request-header-fields-too-large", "type" : "item()*", "description" : " A string representing the HTTP Status Code 431 Request Header Fields Too Large (RFC 6585)\n" }, { "name" : "http:internal-server-error", "type" : "item()*", "description" : " A string representing the HTTP Status Code 500 Internal Server Error\n" }, { "name" : "http:not-implemented", "type" : "item()*", "description" : " A string representing the HTTP Status Code 501 Not Implemented\n" }, { "name" : "http:bad-gateway", "type" : "item()*", "description" : " A string representing the HTTP Status Code 502 Bad Gateway\n" }, { "name" : "http:service-unavailable", "type" : "item()*", "description" : " A string representing the HTTP Status Code 503 Service Unavailable\n" }, { "name" : "http:gateway-timeout", "type" : "item()*", "description" : " A string representing the HTTP Status Code 504 Gateway Timeout\n" }, { "name" : "http:http-version-not-supported", "type" : "item()*", "description" : " A string representing the HTTP Status Code 505 HTTP Version Not Supported\n" }, { "name" : "http:variant-also-negotiates", "type" : "item()*", "description" : " A string representing the HTTP Status Code 506 Variant Also Negotiates (RFC 2295)\n" }, { "name" : "http:insufficient-storage", "type" : "item()*", "description" : " A string representing the HTTP Status Code 507 Insufficient Storage (WebDAV; RFC 4918)\n" }, { "name" : "http:loop-detected", "type" : "item()*", "description" : " A string representing the HTTP status code 508 Loop Detected (webdav; rfc 5842)\n" }, { "name" : "http:not-extended", "type" : "item()*", "description" : " A string representing the HTTP status code 510 Not Extended (RFC 2774)\n" }, { "name" : "http:network-authentication-required", "type" : "item()*", "description" : " A string representing the HTTP status code 511 Network Authentication Required (RFC 6585)\n" }, { "name" : "resp:status-info", "type" : "object()", "description" : " Variable containing a description for all the HTTP Status Codes\n" }, { "name" : "http:see-other", "type" : "item()*", "description" : " A string representing the HTTP Status Code 303 See Other\n" }, { "name" : "http:switching-protocols", "type" : "item()*", "description" : " A string representing the HTTP Status Code 101 Switching Protocols\n" }, { "name" : "http:processing", "type" : "item()*", "description" : " A string representing the HTTP Status Code 102 Processing (Web; RFC 2518)\n" }, { "name" : "http:ok", "type" : "item()*", "description" : " A string representing the HTTP Status Code 200 OK\n" }, { "name" : "http:created", "type" : "item()*", "description" : " A string representing the HTTP Status Code 201 Created\n" }, { "name" : "http:accepted", "type" : "item()*", "description" : " A string representing the HTTP Status Code 202 Accepted\n" }, { "name" : "http:non-authoritative", "type" : "item()*", "description" : " A string representing the HTTP Status Code 203 Non-Authoritative\n" }, { "name" : "http:no-content", "type" : "item()*", "description" : " A string representing the HTTP Status Code 204 No Content\n" }, { "name" : "http:reset-content", "type" : "item()*", "description" : " A string representing the HTTP Status Code 205 Reset Content\n" }, { "name" : "http:partial-content", "type" : "item()*", "description" : " A string representing the HTTP Status Code 206 Partial Content\n" }, { "name" : "http:multi-status", "type" : "item()*", "description" : " A string representing the HTTP Status Code 207 Multi-Status (WebDAV; RFC 5842)\n" }, { "name" : "http:already-reported", "type" : "item()*", "description" : " A string representing the HTTP Status Code 208 Already Reported (WebDAV; RFC 5842)\n" }, { "name" : "http:im-used", "type" : "item()*", "description" : " A string representing the HTTP Status Code 226 IM Used (RFC 3229)\n" }, { "name" : "http:multiple-choices", "type" : "item()*", "description" : " A string representing the HTTP Status Code 300 Multiple Choices\n" }, { "name" : "http:moved-permanently", "type" : "item()*", "description" : " A string representing the HTTP Status Code 301 Moved Permantently\n" }, { "name" : "http:found", "type" : "item()*", "description" : " A string representing the HTTP Status Code 302 Found\n" }, { "name" : "http:continue", "type" : "item()*", "description" : " A string representing the HTTP Status Code 100 Continue\n" }, { "name" : "http:not-modified", "type" : "item()*", "description" : " A string representing the HTTP Status Code 304 Not Modified\n" }, { "name" : "http:use-proxy", "type" : "item()*", "description" : " A string representing the HTTP Status Code 305 Use Proxy\n" }, { "name" : "http:switch-proxy", "type" : "item()*", "description" : " A string representing the HTTP Status Code 306 Switch Proxy\n" }, { "name" : "http:temporary-redirect", "type" : "item()*", "description" : " A string representing the HTTP Status Code 307 Temporary Redirect\n" }, { "name" : "http:permanent-redirect", "type" : "item()*", "description" : " A string representing the HTTP Status Code 308 Permanent Redirect (http://tools.ietf.org/html/draft-reschke-http-status-308-07)\n" }, { "name" : "http:bad-request", "type" : "item()*", "description" : " A string representing the HTTP Status Code 400 Bad Request\n" }, { "name" : "http:unauthorized", "type" : "item()*", "description" : " A string representing the HTTP Status Code 401 Unauthorized\n" }, { "name" : "http:payment-required", "type" : "item()*", "description" : " A string representing the HTTP Status Code 402 Payment Required\n" }, { "name" : "http:forbidden", "type" : "item()*", "description" : " A string representing the HTTP Status Code 403 Forbidden\n" }, { "name" : "http:not-found", "type" : "item()*", "description" : " A string representing the HTTP Status Code 404 Not Found\n" }, { "name" : "http:not-allowed", "type" : "item()*", "description" : " A string representing the HTTP Status Code 405 Not Allowed\n" }, { "name" : "http:not-acceptable", "type" : "item()*", "description" : " A string representing the HTTP Status Code 406 Not Acceptable\n" }, { "name" : "http:proxy-authentication-required", "type" : "item()*", "description" : " A string representing the HTTP Status Code 407 Proxy Authentication Required\n" }, { "name" : "http:request-timeout", "type" : "item()*", "description" : " A string representing the HTTP Status Code 408 Request Timeout\n" } ] }, "http://www.zorba-xquery.com/modules/email/smtp" : { "ns" : "http://www.zorba-xquery.com/modules/email/smtp", "description" : " This module can be used for sending emails.\n The SMTP module contains only one public function that receives two parameters.\n The SMTP server access information passed as an hostInfo element\n and the email message representation as a message element.\n For a quick start see the examples associates with the send(...)\n function. For a complete specification read, the description and the\n documentation associated with this function.\n", "sees" : [ "c-client Library part of UW IMAP toolkit" ], "authors" : [ "Sorin Nasoi, Daniel Thomas" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.zorba-xquery.com/modules/email", "prefix" : "email" }, { "uri" : "http://www.zorba-xquery.com/modules/email/smtp", "prefix" : "smtp" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "send", "qname" : "smtp:send", "signature" : "($host-info as element(email:hostInfo), $message as element(email:message)) as empty-sequence()", "description" : " This function sends an email message from the specified account.\n The hostName child element of $host-info must have the form:\n remote_system_name [\":\" port] [flags]. This syntax is part of the\n Remote names\n syntax defined in the UW IMAP toolkit. The remote_system_name and\n flags fragments are explained in the section III of this document.\n For example the hostName could look like:\n \n The $host-info parameter could then look like this:\n
\n <hostInfo>\n   <hostName>smtp.gmail.com:587/tls/novalidate-cert</hostName>\n   <userName>username</userName>\n   <password>password</password>\n </hostInfo>\n 
\n For a complete of the structure of an email message, see the imported email\n schema: http://www.zorba-xquery.com/modules/email\n All the data passed to this function does not need to be validated.\n The only requirement is that they have a valid format and are in the\n correct namespace according to the schema:\n http://www.zorba-xquery.com/modules/email.\n", "summary" : "

This function sends an email message from the specified account.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "host-info", "type" : "element(email:hostInfo)", "occurrence" : null, "description" : "
The SMTP host, user name, and password.
" }, { "name" : "message", "type" : "element(email:message)", "occurrence" : null, "description" : "
The message to send as defined in the email XML schema.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "The function is declared as sequential and has side-effects. It returns the empty sequence." }, "errors" : [ "smtp:SMTP0001 The message format is invalid.", "smtp:SMTP0002 The message has no recipient.", "smtp:SMTP0003 The message could not be sent.", "smtp:SMTP9999 If any other error occurs.", "err:XQDY0027 If the values of the arguments are not not valid according to the email schema: http://www.zorba-xquery.com/modules/email" ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/project" : { "ns" : "http://www.28msec.com/modules/project", "description" : " This module contains functions to introspect a project.\n", "sees" : [ ], "authors" : [ "28msec" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://zorba.io/modules/base64", "prefix" : "base64" }, { "uri" : "http://zorba.io/modules/hmac", "prefix" : "hmac" }, { "uri" : "http://www.28msec.com/modules/project", "prefix" : "project" }, { "uri" : "http://zorba.io/modules/random", "prefix" : "random" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 0, "name" : "create-seed", "qname" : "project:create-seed", "signature" : "() as string", "description" : " Creates and return new random project seed.\n", "summary" : "

Creates and return new random project seed.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "string", "description" : "the project seed" }, "errors" : [ "project:SEED-EXISTS the project already has a seed file", "project:SEED-FILE error writing the seed file", "project:SEED the specified seed is not at least 8 characters long" ] }, { "isDocumented" : true, "arity" : 1, "name" : "create-seed", "qname" : "project:create-seed", "signature" : "($seed as string) as empty-sequence()", "description" : " Creates a new project seed.\n The specified seed must be at least 8 characters long.\n", "summary" : "

Creates a new project seed.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "seed", "type" : "string", "occurrence" : null, "description" : "
The new project seed.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the empty sequence" }, "errors" : [ "project:SEED-EXISTS the project already has a seed file", "project:SEED-FILE error writing the seed file" ] }, { "isDocumented" : true, "arity" : 0, "name" : "has-seed", "qname" : "project:has-seed", "signature" : "() as boolean external", "description" : " Checks if the project has a seed file.\n", "summary" : "

Checks if the project has a seed file.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "boolean", "description" : "whether the project has a seed file or not" }, "errors" : [ "project:SEED-FILE error accessing the seed file" ] }, { "isDocumented" : true, "arity" : 0, "name" : "name", "qname" : "project:name", "signature" : "() as string external", "description" : " Returns the name of the project.\n", "summary" : "

Returns the name of the project.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "string", "description" : "the said name" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "read-or-create-seed", "qname" : "project:read-or-create-seed", "signature" : "() as string", "description" : " Returns the project seed. If the project has no seed a new random one is created.\n", "summary" : "

Returns the project seed.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "string", "description" : "the project seed" }, "errors" : [ "project:SEED-FILE error reading or writing the seed file" ] }, { "isDocumented" : true, "arity" : 0, "name" : "scheduler-host", "qname" : "project:scheduler-host", "signature" : "() as string external", "description" : " Returns the host of the scheduler.\n", "summary" : "

Returns the host of the scheduler.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "string", "description" : "the scheduler host." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 0, "name" : "seed", "qname" : "project:seed", "signature" : "() as string external", "description" : " Returns the project seed.\n", "summary" : "

Returns the project seed.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "string", "description" : "the project seed" }, "errors" : [ "project:NO-SEED the project seed file cannot be found", "project:SEED-FILE error reading the seed file" ] }, { "isDocumented" : true, "arity" : 0, "name" : "set-seed", "qname" : "project:set-seed", "signature" : "() as string", "description" : " Sets a new random project seed.\n", "summary" : "

Sets a new random project seed.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "string", "description" : "the project seed" }, "errors" : [ "project:SEED-FILE error reading or writing the seed file" ] }, { "isDocumented" : true, "arity" : 1, "name" : "set-seed", "qname" : "project:set-seed", "signature" : "($seed as string) as empty-sequence()", "description" : " Sets the project seed.\n The specified seed must be at least 8 characters long.\n", "summary" : "

Sets the project seed.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "seed", "type" : "string", "occurrence" : null, "description" : "
The new project seed.
" } ], "returns" : { "type" : "empty-sequence()", "description" : "the project seed" }, "errors" : [ "project:SEED-FILE error reading or writing the seed file", "project:SEED the specified seed is not at least 8 characters long" ] }, { "isDocumented" : true, "arity" : 0, "name" : "token", "qname" : "project:token", "signature" : "() as xs:base64Binary", "description" : " Creates a new project token, that expires after 12 hours.\n", "summary" : "

Creates a new project token, that expires after 12 hours.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "xs:base64Binary", "description" : "the project token" }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "token", "qname" : "project:token", "signature" : "($expiration as xs:anyAtomicType) as xs:base64Binary", "description" : " Creates a new project token, that expires at the desired date.\n The input to the function contains the expiration information.\n If a duration is used, then the function will create a token expiring after the specified duration.\n If a dateTime is used, then the function will create a token expiring that date.\n If an integer is used, then the function will create a token expiring after the specified number of seconds.\n", "summary" : "

Creates a new project token, that expires at the desired date.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "expiration", "type" : "xs:anyAtomicType", "occurrence" : null, "description" : "
describes the expiration date of the token.
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "the new project token" }, "errors" : [ "project:INVALID-PARAMETER expiration information is invalid (not a duration, date or number of seconds)" ] } ], "variables" : [ ] }, "http://zorba.io/modules/http-client" : { "ns" : "http://zorba.io/modules/http-client", "description" : "

\n This module provides functions for performing HTTP requests.\n

\n

A simple GET request using the get#1 convenience function

\n
\n import module namespace http=\"http://zorba.io/modules/http-client\";\n http:get(\"http://www.example.com\")\n 
\n

\n This example makes a GET request to example.com and returns the server's response\n as a JSON object.\n

\n
\n {\n   \"status\" : 200,\n   \"message\" : \"OK\",\n   \"headers\" : {\n     \"Content-Length\" : \"1270\",\n     \"Date\" : \"Tue, 11 Jun 2013 22:27:10 GMT\",\n     ...\n   },\n   \"body\" : {\n     \"media-type\" : \"text/html\",\n     \"content\" : \"...\"\n   }\n }\n 
\n

Response format

\n

Most functions in this module (all except options#1)\n return a single JSON item, describing the server's response, as in the previous\n example.\n The server status (integer) and message (string) fields are always present.\n If the server replied sending one or more headers, they are reported\n in an optional headers object. Each header is represented as a single (string)\n field.

\n

For non-multipart responses, as in the previous example, the response body,\n if any, is reported as a body object. This object contains both the (string)\n media-type returned by the server and its content.\n The type of the content field is determined by the media-type returned by the\n server. If the media-type indicates that the body content is textual,\n then the content has type string, base64Binary otherwise.\n Specifically, the body content is considered textual only if the MIME-type specified in\n the media-type is one of:\n

\n or if the MIME-type starts with \"text/\" or ends with \"+xml\".

\n

For multipart responses, multiple bodies are returned, as in the following example:

\n
\n {\n   \"status\" : 200,\n   \"message\" : \"OK\",\n   \"headers\" : {\n     \"Date\" : \"Tue, 11 Jun 2013 22:34:13 GMT\",\n     ...\n   },\n   \"multipart\" : {\n     \"boundary\": \"--AaB03x\",\n     \"parts\": [\n       {\n         \"headers\" : {\n            \"Content Disposition: file\",\n            ...\n         },\n         \"body\": {\n           \"media-type\" : \"image/gif\",\n           \"content\" : \"...\"\n         }\n       },\n       {\n         \"body\" : {\n           \"media-type\" : \"text/html\",\n           \"content\" : \"...\"\n         }\n       }\n    ]\n }\n 
\n

The multipart field contains both the boundary used to separate parts\n and an array containing all parts. Each part contains its specific headers,\n if any, and the corresponding body.

\n

Important Notice Regarding Nondeterministic Functions

\n

\n The following functions in this module -\n get#1,\n get-text#1,\n get-binary#1,\n send-nondeterministic-request-1,\n head#1, and\n options#1\n are declared to be nondeterministic, which means that their results\n will not be cached.\n However, they are not declared to be\n sequential, which means that they may be re-ordered during query optimization.\n According to the HTTP RFC, GET, HEAD an OPTIONS requests should not have any side-effects.\n However, in practice it is not uncommon, especially for GET requests, to have side-effects.\n If your application depends on the ordering of side-effects from requests issued through\n these functions, you should either use the send-request()\n function (which is declared sequential), or alternatively\n wrap each call to get() in your own sequential function, to ensure\n that the requests are not reordered.\n Conversely, if you want their results to be cached you can use the\n send-deterministic-request()\n function (which is declared deterministic).\n

\n

$href Arguments to Functions

\n

Several functions in this module accept a URL argument named $href. In\n all cases, the value passed to $href must be a valid anyURI.\n However, all functions declare $href to be of type string. This\n is for convenience, since you can pass a string literal value (that\n is, a URL in double-quotes spelled out explicitly in your query)\n to an string parameter.

\n

Relation to the EXPath http-client module

\n

EXPath defines its own http-client\n module, which is available separately.\n There are two primary differences between EXPath's http-client and\n this module:\n

    \n
  1. EXPath does not include the simpler get(), post(), put(), delete(),\n head(), options() and patch() functions defined by this module.
  2. \n
  3. EXPath uses XML to represent request for its send-request() function,\n whereas this module uses JSON.
  4. \n
  5. EXPath specifies that all XML content returned by an HTTP server\n will be parsed and returned as an XML document, whereas all HTML content\n will be tidied up into valid XML, and then parsed into an element.\n This module returns any textual content as string and any binary content\n as base6Binary.
  6. \n
  7. EXPath accepts XML nodes as body in the send-request() function and\n automatically serializes them into a string. The send-request() function\n defined in this module only allows string, base64Binary, and hexBinary\n as body types.\n
  8. \n
\n

\n

\n See the full spec\n of the EXPath http-client module for more information.\n

\n", "sees" : [ "XQuery 1.1: Function Declaration" ], "authors" : [ "Federico Cavalieri" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.w3.org/2005/xqt-errors", "prefix" : "err" }, { "uri" : "http://zorba.io/modules/http-client", "prefix" : "http" }, { "uri" : "http://jsoniq.org/function-library", "prefix" : "libjn" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "delete", "qname" : "http:delete", "signature" : "($href as string) as object()", "description" : "

\n This function makes an HTTP DELETE request to a given URL.\n

\n", "summary" : "

\n This function makes an HTTP DELETE request to a given URL.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "string", "occurrence" : null, "description" : "
The URL to which the request will be made (see note above).
" } ], "returns" : { "type" : "object()", "description" : "standard http-client return type." }, "errors" : [ "http:HTTP An HTTP error occurred.", "http:REQUEST The specified request is not valid.", "http:TIMEOUT A timeout occurred waiting for the response." ] }, { "isDocumented" : true, "arity" : 1, "name" : "get-binary", "qname" : "http:get-binary", "signature" : "($href as string) as object()", "description" : "

\n This function makes a GET request on a given URL. All returned bodies\n are forced to be interpreted as binary data, and will be returned\n as base64Binary items.\n

\n", "summary" : "

\n This function makes a GET request on a given URL.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "string", "occurrence" : null, "description" : "
The URL to which the request will be made (see note above).
" } ], "returns" : { "type" : "object()", "description" : "standard http-client return type." }, "errors" : [ "http:HTTP An HTTP error occurred.", "http:REQUEST The specified href is not valid.", "http:TIMEOUT A timeout occurred waiting for the response." ] }, { "isDocumented" : true, "arity" : 1, "name" : "get-text", "qname" : "http:get-text", "signature" : "($href as string) as object()", "description" : "

\n This function makes a GET request to a given URL. All returned bodies\n are forced to be interpreted as textual, with a UTF-8 charset and will\n be returned as string items.\n

\n", "summary" : "

\n This function makes a GET request to a given URL.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "string", "occurrence" : null, "description" : "
The URL to which the request will be made (see note above).
" } ], "returns" : { "type" : "object()", "description" : "standard http-client return type." }, "errors" : [ "http:HTTP An HTTP error occurred.", "http:REQUEST The specified href is not valid.", "http:TIMEOUT A timeout occurred waiting for the response." ] }, { "isDocumented" : true, "arity" : 1, "name" : "get", "qname" : "http:get", "signature" : "($href as string) as object()", "description" : "

\n This function makes a GET request to a given URL.\n

\n", "summary" : "

\n This function makes a GET request to a given URL.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "string", "occurrence" : null, "description" : "
The URL to which the request will be made (see note above).
" } ], "returns" : { "type" : "object()", "description" : "standard http-client return type." }, "errors" : [ "http:HTTP An HTTP error occurred.", "http:REQUEST The specified href is not valid.", "http:TIMEOUT A timeout occurred waiting for the response." ] }, { "isDocumented" : true, "arity" : 1, "name" : "head", "qname" : "http:head", "signature" : "($href as string) as object()", "description" : "

\n This function makes an HTTP HEAD request on a given URL.\n

\n", "summary" : "

\n This function makes an HTTP HEAD request on a given URL.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "string", "occurrence" : null, "description" : "
The URL to which the request will be made (see note above).
" } ], "returns" : { "type" : "object()", "description" : "standard http-client return type." }, "errors" : [ "http:HTTP An HTTP error occurred.", "http:REQUEST The specified href is not valid.", "http:TIMEOUT A timeout occurred waiting for the response." ] }, { "isDocumented" : true, "arity" : 1, "name" : "options", "qname" : "http:options", "signature" : "($href as string) as string*", "description" : "

\n This function makes an HTTP OPTIONS request, which asks the server\n which operations it supports.\n

\n", "summary" : "

\n This function makes an HTTP OPTIONS request, which asks the server\n which operations it supports.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "string", "occurrence" : null, "description" : "
The URL to which the request will be made (see note above).
" } ], "returns" : { "type" : "string*", "description" : "A sequence of string values of the allowed operations." }, "errors" : [ "http:HTTP An HTTP error occurred.", "http:REQUEST The specified href is not valid.", "http:TIMEOUT A timeout occurred waiting for the response." ] }, { "isDocumented" : true, "arity" : 2, "name" : "patch", "qname" : "http:patch", "signature" : "($href as string, $body as atomic) as object()", "description" : "

\n This function makes an HTTP PATCH request to a given URL.\n

\n

\n The body passed to this function must be either a string, a base64Binary or\n an hexBinary.\n If it is a string, the Content-Type sent to the server will be \"text/plain\",\n \"application/octet-stream\" otherwise.\n

\n", "summary" : "

\n This function makes an HTTP PATCH request to a given URL.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "string", "occurrence" : null, "description" : "
The URL to which the request will be made (see note above).
" }, { "name" : "body", "type" : "atomic", "occurrence" : null, "description" : "
The body which will be sent to the server.
" } ], "returns" : { "type" : "object()", "description" : "standard http-client return type." }, "errors" : [ "http:HTTP An HTTP error occurred.", "http:REQUEST The specified request is not valid.", "http:TIMEOUT A timeout occurred waiting for the response." ] }, { "isDocumented" : true, "arity" : 3, "name" : "patch", "qname" : "http:patch", "signature" : "($href as string, $body as atomic, $content-type as string) as object()", "description" : "

\n This function makes an HTTP PATCH request to a given URL.\n

\n

\n The body passed to this function must be either a string, a base64Binary, or\n an hexBinary.\n In any case, Content-Type of the request sent to the server will\n be $content-type.\n

\n", "summary" : "

\n This function makes an HTTP PATCH request to a given URL.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "string", "occurrence" : null, "description" : "
The URL to which the request will be made (see note above).
" }, { "name" : "body", "type" : "atomic", "occurrence" : null, "description" : "
The body which will be sent to the server.
" }, { "name" : "content-type", "type" : "string", "occurrence" : null, "description" : "
The content type of $body to send to the server.
" } ], "returns" : { "type" : "object()", "description" : "standard http-client return type." }, "errors" : [ "http:HTTP An HTTP error occurred.", "http:REQUEST The specified request is not valid.", "http:TIMEOUT A timeout occurred waiting for the response.", "http:CHARSET The specified charset is unsupported." ] }, { "isDocumented" : true, "arity" : 2, "name" : "post", "qname" : "http:post", "signature" : "($href as string, $body as atomic) as object()", "description" : "

\n This function makes an HTTP POST request to a given URL.\n

\n

\n The body passed to this function must be either a string, a base64Binary, or an\n hexBinary.\n If it is a string, the Content-Type sent to the server will be \"text/plain\",\n \"application/octet-stream\" otherwise.\n

\n", "summary" : "

\n This function makes an HTTP POST request to a given URL.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "string", "occurrence" : null, "description" : "
The URL to which the request will be made (see note above).
" }, { "name" : "body", "type" : "atomic", "occurrence" : null, "description" : "
The body which will be sent to the server.
" } ], "returns" : { "type" : "object()", "description" : "standard http-client return type." }, "errors" : [ "http:HTTP An HTTP error occurred.", "http:REQUEST The specified request is not valid.", "http:TIMEOUT A timeout occurred waiting for the response." ] }, { "isDocumented" : true, "arity" : 3, "name" : "post", "qname" : "http:post", "signature" : "($href as string, $body as atomic, $content-type as string) as object()", "description" : "

\n This function makes an HTTP POST request to a given URL.\n

\n

\n The body passed to this function must be either a string, a base64Binary,\n or an hexBinary.\n In any case, Content-Type of the request sent to the server will\n be $content-type.\n

\n", "summary" : "

\n This function makes an HTTP POST request to a given URL.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "string", "occurrence" : null, "description" : "
The URL to which the request will be made (see note above).
" }, { "name" : "body", "type" : "atomic", "occurrence" : null, "description" : "
The body which will be sent to the server
" }, { "name" : "content-type", "type" : "string", "occurrence" : null, "description" : "
The content type of the body as described above.
" } ], "returns" : { "type" : "object()", "description" : "standard http-client return type." }, "errors" : [ "http:HTTP An HTTP error occurred.", "http:REQUEST The specified request is not valid.", "http:TIMEOUT A timeout occurred waiting for the response.", "http:CHARSET The specified charset is unsupported." ] }, { "isDocumented" : true, "arity" : 2, "name" : "put", "qname" : "http:put", "signature" : "($href as string, $body as atomic) as object()", "description" : "

\n This function makes an HTTP PUT request to a given URL.\n

\n

\n The body passed to this function must be either a string, a base64Binary or\n an hexBinary.\n If it is a string, the Content-Type sent to the server will be \"text/plain\",\n \"application/octet-stream\" otherwise.\n

\n", "summary" : "

\n This function makes an HTTP PUT request to a given URL.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "string", "occurrence" : null, "description" : "
The URL to which the request will be made (see note above).
" }, { "name" : "body", "type" : "atomic", "occurrence" : null, "description" : "
The body which will be sent to the server.
" } ], "returns" : { "type" : "object()", "description" : "standard http-client return type." }, "errors" : [ "http:HTTP An HTTP error occurred.", "http:REQUEST The specified request is not valid.", "http:TIMEOUT A timeout occurred waiting for the response." ] }, { "isDocumented" : true, "arity" : 3, "name" : "put", "qname" : "http:put", "signature" : "($href as string, $body as atomic, $content-type as string) as object()", "description" : "

\n This function makes an HTTP PUT request to a given URL.\n

\n

\n The body passed to this function must be either a string, a base64Binary, or\n an hexBinary.\n In any case, Content-Type of the request sent to the server will\n be $content-type.\n

\n", "summary" : "

\n This function makes an HTTP PUT request to a given URL.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "href", "type" : "string", "occurrence" : null, "description" : "
The URL to which the request will be made (see note above).
" }, { "name" : "body", "type" : "atomic", "occurrence" : null, "description" : "
The body which will be sent to the server.
" }, { "name" : "content-type", "type" : "string", "occurrence" : null, "description" : "
The content type of $body to send to the server.
" } ], "returns" : { "type" : "object()", "description" : "standard http-client return type." }, "errors" : [ "http:HTTP An HTTP error occurred.", "http:REQUEST The specified request is not valid.", "http:TIMEOUT A timeout occurred waiting for the response.", "http:CHARSET The specified charset is unsupported." ] }, { "isDocumented" : true, "arity" : 1, "name" : "send-deterministic-request", "qname" : "http:send-deterministic-request", "signature" : "($request as object()) as object()", "description" : "

\n This function sends an HTTP request and returns the corresponding response.\n

\n

\n This function has the same semantics as send-request-1,\n but is declared as deterministic and thus should only be used when\n the request has no side-effects and behaves deterministic as required by the\n application.\n

\n", "summary" : "

\n This function sends an HTTP request and returns the corresponding response.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "request", "type" : "object()", "occurrence" : null, "description" : "
see request parameter of send-request#1
" } ], "returns" : { "type" : "object()", "description" : "standard http-client return type." }, "errors" : [ "http:HTTP An HTTP error occurred.", "http:REQUEST The specified request is not valid.", "http:TIMEOUT A timeout occurred waiting for the response.", "http:FOLLOW Cannot follow a redirect of a POST, PUT, or DELETE request.", "http:CHARSET The specified charset is unsupported." ] }, { "isDocumented" : true, "arity" : 1, "name" : "send-nondeterministic-request", "qname" : "http:send-nondeterministic-request", "signature" : "($request as object()) as object()", "description" : "

\n This function sends an HTTP request and returns the corresponding response.\n

\n

\n This function has the same semantics as send-request-1,\n but is declared as being non deterministic and thus should only be used when\n the request has no side-effects.\n

\n", "summary" : "

\n This function sends an HTTP request and returns the corresponding response.

", "annotation_str" : " %an:nondeterministic", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "nondeterministic", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "request", "type" : "object()", "occurrence" : null, "description" : "
see request parameter of send-request#1
" } ], "returns" : { "type" : "object()", "description" : "standard http-client return type." }, "errors" : [ "http:HTTP An HTTP error occurred.", "http:REQUEST The specified request is not valid.", "http:TIMEOUT A timeout occurred waiting for the response.", "http:FOLLOW Cannot follow a redirect of a POST, PUT, or DELETE request.", "http:CHARSET The specified charset is unsupported." ] }, { "isDocumented" : true, "arity" : 1, "name" : "send-request", "qname" : "http:send-request", "signature" : "($request as object()) as object()", "description" : "

\n This function sends an HTTP request and returns the corresponding response.\n

\n

\n This function is declared as sequential and should be used whenever the\n request may have side-effects.\n

\n

\n The request parameters are specified in the $request JSON object, which\n has the following minimal structure:\n

\n   {\n     \"href\": \"http://www.example.com\"\n   }\n 
\n

\n

This object specifies a GET request of the URI \"http://www.example.com\"

\n

Additional optional parameters can be specified when issuing a request,\n using the following structure:

\n
\n  {\n    \"method\": \"POST\",\n    \"href\": \"http://www.example.com\",\n    \"authentication\":\n    {\n      \"username\" : \"user\",\n      \"password\" : \"pass\",\n      \"auth-method\" : \"Basic\"\n    },\n    \"options\":\n    {\n      \"status-only\": true,\n      \"override-media-type\": \"text/plain\",\n      \"follow-redirect\": false,\n      \"timeout\": 30,\n      \"user-agent\": \"Mozilla/5.0\",\n      \"retry\":\n      {\n        \"delay\": [1000, 2000, 5000],\n        \"on-connection-error\": false,\n        \"on-statuses\": [500, 501]\n      }\n    },\n    \"headers\":\n    {\n      \"name\": \"value\",\n      ...\n    },\n    \"body\":\n    {\n      \"media-type\": \"text/plain\",\n      \"content\": \"...\"\n    }\n  }\n
\n

\n The method field (string) defines the HTTP verb to use in the HTTP request (i.e., GET, HEAD, OPTIONS,\n POST, PUT, DELETE). If not specified GET will be used.\n The authentication field can be used to specify the credentials and authentication method\n used when issuing a request (e.g, Basic). If the authentication field is specified, all its (string)\n subfields must be specified. If an authentication object is provided, it overrides any\n Authorization header specified in the request.\n Additionally, the following options can be specified:\n

\n

\n

One or more headers can be sent to the server, specifying them in an optional headers object.\n Each header is represented as a single (string) field. These headers are overridden if the corresponding\n option/authentication has been specified in the request.

\n

For non-multipart request a body object can be specified.\n This object must contain both the desired (string) media-type and its content.\n The type of the content field must be either string, base64Binary, or hexBinary.

\n

For multipart requests, multipart object can be specified in place of the body object.\n The multipart object has the following structure:

\n
\n  \"multipart\" : {\n    \"boundary\": \"--AaB03x\",\n    \"parts\": [\n      {\n        \"headers\" : {\n           \"Content Disposition: file\",\n           ...\n        },\n        \"body\": {\n          \"media-type\" : \"image/gif\",\n          \"content\" : \"...\"\n        }\n      },\n      {\n        \"body\" : {\n          \"media-type\" : \"text/html\",\n          \"content\" : \"...\"\n        }\n      }\n   ]\n }\n 
\n

The multipart field contains an optional (string) field which specifies\n the boundary used to separate each part and an array containing all parts.\n Each part contains its specific headers, if any, and the corresponding body.\n

\n", "summary" : "

\n This function sends an HTTP request and returns the corresponding response.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "request", "type" : "object()", "occurrence" : null, "description" : "
a JSON http-client request object
" } ], "returns" : { "type" : "object()", "description" : "standard http-client return type." }, "errors" : [ "http:HTTP An HTTP error occurred.", "http:REQUEST The specified request is not valid.", "http:TIMEOUT A timeout occurred waiting for the response.", "http:FOLLOW Cannot follow a redirect of a POST, PUT, or DELETE request.", "http:CHARSET The specified charset is unsupported." ] } ], "variables" : [ ] }, "http://zorba.io/modules/data-cleaning/consolidation" : { "ns" : "http://zorba.io/modules/data-cleaning/consolidation", "description" : "

This library module provides data consolidation functions that generally take as input a sequence of XML nodes\n and apply some rule in order do decide which node is better suited to represent the entire sequence.

\n

\n

The logic contained in this module is not specific to any particular XQuery implementation,\n although the consolidation functions based on matching sequences against XPath expressions require\n some form of dynamic evaluation for XPath expressions.

\n", "sees" : [ ], "authors" : [ "Bruno Martins" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/data-cleaning/consolidation", "prefix" : "con" }, { "uri" : "http://zorba.io/modules/data-cleaning/set-similarity", "prefix" : "set" }, { "uri" : "http://zorba.io/modules/data-cleaning/character-based-string-similarity", "prefix" : "simc" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "all-xpaths", "qname" : "con:all-xpaths", "signature" : "($s as element(*)*, $paths as xs:string*) as element(*)*", "description" : "

Returns the elements from an input sequence of elements that, when matched to a given set of XPath expressions,\n produce a non-empty set of nodes in all the cases.

\n

\n

Example usage :

 all-xpaths( ( <a><b/></a>, <c><d/></c>, <d/>), (\".//b\") ) 

\n

\n

The function invocation in the example above returns :

 (<a><b/></a>) 

\n", "summary" : "

Returns the elements from an input sequence of elements that, when matched to a given set of XPath expressions,\n produce a non-empty set of nodes in all the cases.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "element(*)", "occurrence" : "*", "description" : "
A sequence of elements.
" }, { "name" : "paths", "type" : "xs:string", "occurrence" : "*", "description" : "
A sequence of strings denoting XPath expressions.
" } ], "returns" : { "type" : "element(*)*", "description" : "The elements that, when matched to the given set of XPath expressions, always return a non-empty set of nodes." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "least-attributes", "qname" : "con:least-attributes", "signature" : "($s) as element(*)", "description" : "

Returns the single node having the smallest number of descending attributes (attributes at any given depth)\n in a sequence of nodes provided as input.

\n

If more then one answer is possible, return the first node according to the order of the input sequence.

\n

\n

Example usage :

least-attributes( ( <a att1=\"a1\" att2=\"a2\"/>, <b att1=\"a1\" />, <c/> ) )

\n

\n

The function invocation in the example above returns :

(<c/>)

\n", "summary" : "

Returns the single node having the smallest number of descending attributes (attributes at any given depth)\n in a sequence of nodes provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : null, "occurrence" : null, "description" : "
A sequence of nodes.
" } ], "returns" : { "type" : "element(*)", "description" : "The node having the smallest number of descending attributes in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "least-distinct-attributes", "qname" : "con:least-distinct-attributes", "signature" : "($s) as element(*)", "description" : "

Returns the single node having the smallest number of distinct descending attributes (attributes at any\n given depth) in a sequence of nodes provided as input.

\n

If more then one answer is possible, return the first node according to the order of the input sequence.

\n

\n

Example usage :

 least-distinct-attributes( ( <a att1=\"a1\" att2=\"a2\"/>, <b att1=\"a1\" />, <c/> ) ) 

\n

\n

The function invocation in the example above returns :

 (<c/>) 

\n", "summary" : "

Returns the single node having the smallest number of distinct descending attributes (attributes at any\n given depth) in a sequence of nodes provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : null, "occurrence" : null, "description" : "
A sequence of nodes.
" } ], "returns" : { "type" : "element(*)", "description" : "The node having the smallest number of distinct descending attributes in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "least-distinct-elements", "qname" : "con:least-distinct-elements", "signature" : "($s) as element(*)", "description" : "

Returns the single node having the smallest number of distinct descending elements (sub-elements at any\n given depth) in a sequence of nodes provided as input.

\n

If more then one answer is possible, return the first node according to the order of the input sequence.

\n

\n

Example usage :

 least-distinct-elements( ( <a><b/></a>, <b><c/></b>, <d/>) ) 

\n

\n

The function invocation in the example above returns :

 (<d/>) 

\n", "summary" : "

Returns the single node having the smallest number of distinct descending elements (sub-elements at any\n given depth) in a sequence of nodes provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : null, "occurrence" : null, "description" : "
A sequence of nodes.
" } ], "returns" : { "type" : "element(*)", "description" : "The node having the smallest number of distinct descending elements in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "least-distinct-nodes", "qname" : "con:least-distinct-nodes", "signature" : "($s) as element(*)", "description" : "

Returns the single node having the smallest number of distinct descending nodes (sub-nodes at any given depth)\n in a sequence of nodes provided as input.

\n

If more then one answer is possible, return the first node according to the order of the input sequence.

\n

\n

Example usage :

 least-distinct-nodes( ( <a><b/></a>, <b><c/></b>, <d/>) ) 

\n

\n

The function invocation in the example above returns :

 (<d/>) 

\n", "summary" : "

Returns the single node having the smallest number of distinct descending nodes (sub-nodes at any given depth)\n in a sequence of nodes provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : null, "occurrence" : null, "description" : "
A sequence of nodes.
" } ], "returns" : { "type" : "element(*)", "description" : "The node having the smallest number of distinct descending nodes in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "least-elements", "qname" : "con:least-elements", "signature" : "($s) as element(*)", "description" : "

Returns the single node having the smallest number of descending elements (sub-elements at any given depth)\n in a sequence of nodes provided as input.

\n

If more then one answer is possible, return the first node according to the order of the input sequence.

\n

\n

Example usage :

least-elements( ( <a><b/></a>, <b><c/></b>, <d/>) )

\n

\n

The function invocation in the example above returns :

(<d/>)

\n", "summary" : "

Returns the single node having the smallest number of descending elements (sub-elements at any given depth)\n in a sequence of nodes provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : null, "occurrence" : null, "description" : "
A sequence of nodes.
" } ], "returns" : { "type" : "element(*)", "description" : "The node having the smallest number of descending elements in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "least-frequent", "qname" : "con:least-frequent", "signature" : "($s) as item()", "description" : "

Returns the single less frequent node in a sequence of nodes provided as input.

\n

If more then one answer is possible, return the first node according to the order of the input sequence.

\n

\n

Example usage :

least-frequent( ( \"a\", \"a\", \"b\") )

\n

\n

The function invocation in the example above returns :

(\"b\")

\n", "summary" : "

Returns the single less frequent node in a sequence of nodes provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : null, "occurrence" : null, "description" : "
A sequence of nodes.
" } ], "returns" : { "type" : "item()", "description" : "The least frequent node in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "least-nodes", "qname" : "con:least-nodes", "signature" : "($s) as element(*)", "description" : "

Returns the single node having the smallest number of descending nodes (sub-nodes at any given depth)\n in a sequence of nodes provided as input.

\n

If more then one answer is possible, return the first node according to the order of the input sequence.

\n

\n

Example usage :

least-nodes( ( <a><b/></a>, <b><c/></b>, <d/>) )

\n

\n

The function invocation in the example above returns :

(<d/>)

\n", "summary" : "

Returns the single node having the smallest number of descending nodes (sub-nodes at any given depth)\n in a sequence of nodes provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : null, "occurrence" : null, "description" : "
A sequence of nodes.
" } ], "returns" : { "type" : "element(*)", "description" : "The node having the smallest number of descending nodes in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "least-similar-edit-distance", "qname" : "con:least-similar-edit-distance", "signature" : "($s as xs:string*, $m as xs:string) as xs:string?", "description" : "

Returns the single least similar string, in terms of the edit distance metric towards an input string,\n in a sequence of strings provided as input. If more than one string has a minimum similarity (a maximum\n value for the edit distance metric), return the first string according to the order of the input sequence.

\n

\n

Example usage :

least-similar-edit-distance( ( \"aaabbbccc\", \"aaabbb\", \"eeefff\" ), \"aaab\" )

\n

\n

The function invocation in the example above returns :

( \"eeefff\" )

\n", "summary" : "

Returns the single least similar string, in terms of the edit distance metric towards an input string,\n in a sequence of strings provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "xs:string", "occurrence" : "*", "description" : "
A sequence of strings.
" }, { "name" : "m", "type" : "xs:string", "occurrence" : null, "description" : "
The string towards which we want to measure the edit distance.
" } ], "returns" : { "type" : "xs:string?", "description" : "The least similar string in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "least-tokens", "qname" : "con:least-tokens", "signature" : "($s as xs:string*, $r as xs:string) as xs:string?", "description" : "

Returns the single shortest string, in terms of the number of tokens, in a sequence of strings provided as input.

\n

If more then one answer is possible, return the first string according to the order of the input sequence.

\n

\n

Example usage :

least-tokens( ( \"a b c\", \"a b\", \"a\"), \" +\" )

\n

\n

The function invocation in the example above returns :

(\"a\")

\n", "summary" : "

Returns the single shortest string, in terms of the number of tokens, in a sequence of strings provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "xs:string", "occurrence" : "*", "description" : "
A sequence of strings.
" }, { "name" : "r", "type" : "xs:string", "occurrence" : null, "description" : "
A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.
" } ], "returns" : { "type" : "xs:string?", "description" : "The shortest string in the input sequence, in terms of the number of tokens." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "least-xpaths", "qname" : "con:least-xpaths", "signature" : "($s as element(*)*, $paths as xs:string*) as element(*)*", "description" : "

Returns the single element from an input sequence of elements that matches the smallest number of\n XPath expressions from a given set, producing a non-empty set of nodes.

\n

If more then one answer is possible, return the first element according to the order of the input sequence.

\n

\n

Example usage :

 least-xpaths( ( <a><b/></a>, <d><c/><b/></d>, <d/>) , (\".//b\", \".//c\") ) 

\n

\n

The function invocation in the example above returns :

 ( $lt;d/> ) 

\n", "summary" : "

Returns the single element from an input sequence of elements that matches the smallest number of\n XPath expressions from a given set, producing a non-empty set of nodes.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "element(*)", "occurrence" : "*", "description" : "
A sequence of elements.
" }, { "name" : "paths", "type" : "xs:string", "occurrence" : "*", "description" : "
A sequence of strings denoting XPath expressions.
" } ], "returns" : { "type" : "element(*)*", "description" : "The element that matches the smallest number of XPath expressions producing a non-empty set of nodes." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "longest", "qname" : "con:longest", "signature" : "($s as xs:string*) as xs:string?", "description" : "

Returns the single longest string, in terms of the number of characters, in a sequence of strings provided as input.

\n

If more then one answer is possible, return the first string according to the order of the input sequence.

\n

\n

Example usage :

con:longest( ( \"a\", \"aa\", \"aaa\") )

\n

\n

The function invocation in the example above returns :

(\"aaa\")

\n", "summary" : "

Returns the single longest string, in terms of the number of characters, in a sequence of strings provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "xs:string", "occurrence" : "*", "description" : "
A sequence of strings.
" } ], "returns" : { "type" : "xs:string?", "description" : "The longest string in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "matching", "qname" : "con:matching", "signature" : "($s as xs:string*, $r as xs:string) as xs:string*", "description" : "

Returns the strings from an input sequence of strings that match a particular regular expression.

\n

\n

Example usage :

matching( ( \"a A b\", \"c AAA d\", \"e BB f\"), \"A+\" )

\n

\n

The function invocation in the example above returns :

( \"a A b\", \"c AAA d\")

\n", "summary" : "

Returns the strings from an input sequence of strings that match a particular regular expression.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "xs:string", "occurrence" : "*", "description" : "
A sequence of strings.
" }, { "name" : "r", "type" : "xs:string", "occurrence" : null, "description" : "
The regular expression to be used in the matching.
" } ], "returns" : { "type" : "xs:string*", "description" : "The strings in the input sequence that match the input regular expression." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "most-attributes", "qname" : "con:most-attributes", "signature" : "($s) as element(*)", "description" : "

Returns the single node having the largest number of descending attributes (attributes at any given depth)\n in a sequence of nodes provided as input.

\n

If more then one answer is possible, return the first node according to the order of the input sequence.

\n

\n

Example usage :

most-attributes( ( <a att1=\"a1\" att2=\"a2\"/>, <b att1=\"a1\" />, <c/> ) )

\n

\n

The function invocation in the example above returns :

(<a att1=\"a1\" att2=\"a2\"/>)

\n", "summary" : "

Returns the single node having the largest number of descending attributes (attributes at any given depth)\n in a sequence of nodes provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : null, "occurrence" : null, "description" : "
A sequence of nodes.
" } ], "returns" : { "type" : "element(*)", "description" : "The node having the largest number of descending attributes in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "most-distinct-attributes", "qname" : "con:most-distinct-attributes", "signature" : "($s) as element(*)", "description" : "

Returns the single node having the largest number of distinct descending attributes (attributes at any\n given depth) in a sequence of nodes provided as input.

\n

If more then one answer is possible, return the first node according to the order of the input sequence.

\n

\n

Example usage :

most-distinct-attributes( ( <a att1=\"a1\" att2=\"a2\" att3=\"a3\"/>, <a att1=\"a1\" att2=\"a2\"><b att2=\"a2\" /></a>, <c/> ) )

\n

\n

The function invocation in the example above returns :

(<a att1=\"a1\" att2=\"a2\" att3=\"a3\"/>)

\n", "summary" : "

Returns the single node having the largest number of distinct descending attributes (attributes at any\n given depth) in a sequence of nodes provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : null, "occurrence" : null, "description" : "
A sequence of nodes.
" } ], "returns" : { "type" : "element(*)", "description" : "The node having the largest number of distinct descending attributes in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "most-distinct-elements", "qname" : "con:most-distinct-elements", "signature" : "($s) as element(*)", "description" : "

Returns the single node having the largest number of distinct descending elements (sub-elements at any\n given depth) in a sequence of nodes provided as input.

\n

If more then one answer is possible, return the first node according to the order of the input sequence.

\n

\n

Example usage :

most-distinct-elements( ( <a><b/><c/><d/></a>, <a><b/><b/><c/></a>, <a/> ) )

\n

\n

The function invocation in the example above returns :

(<a><b/><c/><d/></a>)

\n", "summary" : "

Returns the single node having the largest number of distinct descending elements (sub-elements at any\n given depth) in a sequence of nodes provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : null, "occurrence" : null, "description" : "
A sequence of nodes.
" } ], "returns" : { "type" : "element(*)", "description" : "The node having the largest number of distinct descending elements in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "most-distinct-nodes", "qname" : "con:most-distinct-nodes", "signature" : "($s) as element(*)", "description" : "

Returns the single node having the largest number of distinct descending nodes (sub-nodes at any given depth) in\n a sequence of nodes provided as input.

\n

If more then one answer is possible, return the first node according to the order of the input sequence.

\n

\n

Example usage :

most-distinct-nodes( ( <a><b/></a>, <a><a/></a>, <b/>) )

\n

\n

The function invocation in the example above returns :

(<a><b/></a>)

\n", "summary" : "

Returns the single node having the largest number of distinct descending nodes (sub-nodes at any given depth) in\n a sequence of nodes provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : null, "occurrence" : null, "description" : "
A sequence of nodes.
" } ], "returns" : { "type" : "element(*)", "description" : "The node having the largest number of distinct descending nodes in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "most-elements", "qname" : "con:most-elements", "signature" : "($s) as element(*)", "description" : "

Returns the single node having the largest number of descending elements (sub-elements at any given depth)\n in a sequence of nodes provided as input.

\n

If more then one answer is possible, return the first node according to the order of the input sequence.

\n

\n

Example usage :

most-elements( ( <a><b/></a>, <a/>, <b/>) )

\n

\n

The function invocation in the example above returns :

(<a><b/></a>)

\n", "summary" : "

Returns the single node having the largest number of descending elements (sub-elements at any given depth)\n in a sequence of nodes provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : null, "occurrence" : null, "description" : "
A sequence of nodes.
" } ], "returns" : { "type" : "element(*)", "description" : "The node having the largest number of descending elements in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "most-frequent", "qname" : "con:most-frequent", "signature" : "($s) as item()", "description" : "

Returns the single most frequent node in a sequence of nodes provided as input.

\n

If more then one answer is possible, returns the first node according to the order of the input sequence.

\n

\n

Example usage :

most-frequent( ( \"a\", \"a\", \"b\") )

\n

\n

The function invocation in the example above returns :

(\"a\")

\n", "summary" : "

Returns the single most frequent node in a sequence of nodes provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : null, "occurrence" : null, "description" : "
A sequence of nodes.
" } ], "returns" : { "type" : "item()", "description" : "The most frequent node in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "most-nodes", "qname" : "con:most-nodes", "signature" : "($s) as element(*)", "description" : "

Returns the single node having the largest number of descending nodes (sub-nodes at any given depth) in a\n sequence of nodes provided as input.

\n

If more then one answer is possible, return the first node according to the order of the input sequence.

\n

\n

Example usage :

most-nodes( ( <a><b/></a>, <a/>, <b/>) )

\n

\n

The function invocation in the example above returns :

(<a><b/></a>)

\n", "summary" : "

Returns the single node having the largest number of descending nodes (sub-nodes at any given depth) in a\n sequence of nodes provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : null, "occurrence" : null, "description" : "
A sequence of nodes.
" } ], "returns" : { "type" : "element(*)", "description" : "The node having the largest number of descending nodes in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "most-similar-edit-distance", "qname" : "con:most-similar-edit-distance", "signature" : "($s as xs:string*, $m as xs:string) as xs:string?", "description" : "

Returns the single most similar string, in terms of the edit distance metric towards an input string,\n in a sequence of strings provided as input. If more than one string has a maximum similarity (a minimum\n value for the edit distance metric), the function return the first string according to the order of the\n input sequence.

\n

\n

Example usage :

most-similar-edit-distance( ( \"aaabbbccc\", \"aaabbb\", \"eeefff\" ), \"aaab\" )

\n

\n

The function invocation in the example above returns :

( \"aaabbb\" )

\n", "summary" : "

Returns the single most similar string, in terms of the edit distance metric towards an input string,\n in a sequence of strings provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "xs:string", "occurrence" : "*", "description" : "
A sequence of strings.
" }, { "name" : "m", "type" : "xs:string", "occurrence" : null, "description" : "
The string towards which we want to measure the edit distance.
" } ], "returns" : { "type" : "xs:string?", "description" : "The most similar string in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "most-tokens", "qname" : "con:most-tokens", "signature" : "($s as xs:string*, $r as xs:string) as xs:string?", "description" : "

Returns the single longest string, in terms of the number of tokens, in a sequence of strings provided as input.

\n

If more then one answer is possible, return the first string according to the order of the input sequence.

\n

\n

Example usage :

most-tokens( ( \"a b c\", \"a b\", \"a\"), \" +\" )

\n

\n

The function invocation in the example above returns :

(\"a b c\")

\n", "summary" : "

Returns the single longest string, in terms of the number of tokens, in a sequence of strings provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "xs:string", "occurrence" : "*", "description" : "
A sequence of strings.
" }, { "name" : "r", "type" : "xs:string", "occurrence" : null, "description" : "
A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.
" } ], "returns" : { "type" : "xs:string?", "description" : "The longest string in the input sequence, in terms of the number of tokens." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "most-xpaths", "qname" : "con:most-xpaths", "signature" : "($s as element(*)*, $paths as xs:string*) as element(*)*", "description" : "

Returns the single element from an input sequence of elements that matches the largest number of\n XPath expressions from a given set, producing a non-empty set of nodes.

\n

If more then one answer is possible, return the first element according to the order of the input sequence.

\n

\n

Example usage :

 most-xpaths( ( <a><b/></a>, <d><c/><b/></d>, <d/>) , (\".//b\", \".//c\") ) 

\n

\n

The function invocation in the example above returns :

 ( <d><c/><b/></d> ) 

\n", "summary" : "

Returns the single element from an input sequence of elements that matches the largest number of\n XPath expressions from a given set, producing a non-empty set of nodes.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "element(*)", "occurrence" : "*", "description" : "
A sequence of elements.
" }, { "name" : "paths", "type" : "xs:string", "occurrence" : "*", "description" : "
A sequence of strings denoting XPath expressions.
" } ], "returns" : { "type" : "element(*)*", "description" : "The element that matches the largest number of XPath expressions producing a non-empty set of nodes." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "shortest", "qname" : "con:shortest", "signature" : "($s as xs:string*) as xs:string?", "description" : "

Returns the single shortest string, in terms of the number of characters, in a sequence of strings provided as input.

\n

If more then one answer is possible, return the first string according to the order of the input sequence.

\n

\n

Example usage :

shortest( ( \"a\", \"aa\", \"aaa\") )

\n

\n

The function invocation in the example above returns :

(\"a\")

\n", "summary" : "

Returns the single shortest string, in terms of the number of characters, in a sequence of strings provided as input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "xs:string", "occurrence" : "*", "description" : "
A sequence of strings.
" } ], "returns" : { "type" : "xs:string?", "description" : "The shortest string in the input sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "some-xpaths", "qname" : "con:some-xpaths", "signature" : "($s as element(*)*, $paths as xs:string*) as element(*)*", "description" : "

Returns the elements from a sequence of elements that, when matched to a given set of XPath expressions,\n produce a non-empty set of nodes for some of the cases.

\n

\n

Example usage :

 some-xpaths( ( <a><b/></a>, <d><c/></d>, <d/>), (\".//b\", \".//c\") ) 

\n

\n

The function invocation in the example above returns :

 ( <a><b/></a> , <d><c/></d> ) 

\n", "summary" : "

Returns the elements from a sequence of elements that, when matched to a given set of XPath expressions,\n produce a non-empty set of nodes for some of the cases.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "element(*)", "occurrence" : "*", "description" : "
A sequence of elements.
" }, { "name" : "paths", "type" : "xs:string", "occurrence" : "*", "description" : "
A sequence of strings denoting XPath expressions.
" } ], "returns" : { "type" : "element(*)*", "description" : "The elements that, when matched to the given set of XPath expressions, return a non-empty set of nodes for at least one of the cases." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "superstring", "qname" : "con:superstring", "signature" : "($s as xs:string*) as xs:string?", "description" : "

Returns the single string, from an input sequence of strings, that appears more frequently as part\n of the other strings in the sequence. If no such string exists, the function returns an empty sequence.

\n

If more then one answer is possible, the function returns the first string according to the order of the input sequence.

\n

\n

Example usage :

super-string( ( \"aaa bbb ccc\", \"aaa bbb\", \"aaa ddd\", \"eee fff\" ) )

\n

\n

The function invocation in the example above returns :

( \"aaa bbb\" )

\n", "summary" : "

Returns the single string, from an input sequence of strings, that appears more frequently as part\n of the other strings in the sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "xs:string", "occurrence" : "*", "description" : "
A sequence of strings.
" } ], "returns" : { "type" : "xs:string?", "description" : "The string that appears more frequently as part of the other strings in the sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "validating-schema", "qname" : "con:validating-schema", "signature" : "($s as element(*)*, $schema as element(*)) as element(*)*", "description" : "

Returns the nodes from an input sequence of nodes that validate against a given XML Schema.

\n

\n

Example usage :

 validating-schema ( ( <a/> , <b/> ), <xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"><xs:element name=\"a\" /></xs:schema> ) 

\n

\n

The function invocation in the example above returns :

 ( <a/> ) 

\n", "summary" : "

Returns the nodes from an input sequence of nodes that validate against a given XML Schema.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : "element(*)", "occurrence" : "*", "description" : "
A sequence of elements.
" }, { "name" : "schema", "type" : "element(*)", "occurrence" : null, "description" : "
An element encoding an XML Schema.
" } ], "returns" : { "type" : "element(*)*", "description" : "The nodes that validate against the XML Schema. Attention : This function is still not implemented. " }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/node" : { "ns" : "http://zorba.io/modules/node", "description" : " This module defines a set of function which can be used\n to determine (1) the relationship between two nodes (e.g. if one\n is the ancestor if another) and (2) properties of given\n nodes (e.g. their level in the tree).\n The same functionality can be achieved with simple XPath expressions.\n However, please note that using the functions in this modules instead\n of path expressions guarantees better performance.\n", "sees" : [ ], "authors" : [ "Matthias Brantner" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/node", "prefix" : "node" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "ancestor-of", "qname" : "node:ancestor-of", "signature" : "($node1 as node(), $node2 as node()) as xs:boolean external", "description" : " Determines whether the node given as second argument is an\n ancestor of the node given as first argument.\n", "summary" : "

Determines whether the node given as second argument is an\n ancestor of the node given as first argument.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node1", "type" : "node()", "occurrence" : null, "description" : "
the potential descendant
" }, { "name" : "node2", "type" : "node()", "occurrence" : null, "description" : "
the potential ancestor
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if $node2 is an ancestor of $node1; false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "child-of", "qname" : "node:child-of", "signature" : "($node1 as node(), $node2 as node()) as xs:boolean external", "description" : " Determines whether the node given as second argument is a\n child of the node given as first argument.\n", "summary" : "

Determines whether the node given as second argument is a\n child of the node given as first argument.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node1", "type" : "node()", "occurrence" : null, "description" : "
the potential parent
" }, { "name" : "node2", "type" : "node()", "occurrence" : null, "description" : "
the potential child
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if $node2 is a child of $node1; false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "copy", "qname" : "node:copy", "signature" : "($input as node()*) as node()* external", "description" : " Return a deep copy of every given node according to the properties\n specified in the static context of the invoking module.

\n Please note that a copy of a node is parentless.\n", "summary" : "

Return a deep copy of every given node according to the properties\n specified in the static context of the invoking module.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "input", "type" : "node()", "occurrence" : "*", "description" : "
the node to copy
" } ], "returns" : { "type" : "node()*", "description" : "a deep copy of every node in the input sequence or the empty sequence if $input is the empty sequence." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "descendant-of", "qname" : "node:descendant-of", "signature" : "($node1 as node(), $node2 as node()) as xs:boolean external", "description" : " Determines whether the node given as second argument is a\n descendant of the node given as first argument.\n", "summary" : "

Determines whether the node given as second argument is a\n descendant of the node given as first argument.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node1", "type" : "node()", "occurrence" : null, "description" : "
the potential ancestor
" }, { "name" : "node2", "type" : "node()", "occurrence" : null, "description" : "
the potential descendant
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if $node2 is a descendant of $node1; false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "following-of", "qname" : "node:following-of", "signature" : "($node1 as node(), $node2 as node()) as xs:boolean external", "description" : " Determines whether the node given as second argument is\n following the node given as first argument.\n", "summary" : "

Determines whether the node given as second argument is\n following the node given as first argument.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node1", "type" : "node()", "occurrence" : null, "description" : "
the potential preceding node
" }, { "name" : "node2", "type" : "node()", "occurrence" : null, "description" : "
the potential following node
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if $node2 is following the node $node1; false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "following-sibling-of", "qname" : "node:following-sibling-of", "signature" : "($node1 as node(), $node2 as node()) as xs:boolean external", "description" : " Determines whether the node given as second argument is a\n following-sibling of the node given as first argument.\n", "summary" : "

Determines whether the node given as second argument is a\n following-sibling of the node given as first argument.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node1", "type" : "node()", "occurrence" : null, "description" : "
the potential preceding-sibling
" }, { "name" : "node2", "type" : "node()", "occurrence" : null, "description" : "
the potential following-sibling
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if $node2 is a following-sibling of $node1; false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "least-common-ancestor", "qname" : "node:least-common-ancestor", "signature" : "($node1 as node(), $node2 as node()) as node()? external", "description" : " Computes the least common ancestor of two given nodes in\n the tree.\n", "summary" : "

Computes the least common ancestor of two given nodes in\n the tree.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node1", "type" : "node()", "occurrence" : null, "description" : "
the first node
" }, { "name" : "node2", "type" : "node()", "occurrence" : null, "description" : "
the second node
" } ], "returns" : { "type" : "node()?", "description" : "the least common ancestor of the two given nodes or the empty sequence if the two nodes are not part of the same tree." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "level", "qname" : "node:level", "signature" : "($node as node()) as xs:integer external", "description" : " Computes the level of a given node in the tree.\n Note: The first level has the number one.\n", "summary" : "

Computes the level of a given node in the tree.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "node()", "occurrence" : null, "description" : "
the node for which the level should be computed
" } ], "returns" : { "type" : "xs:integer", "description" : "The level as xs:integer of the given node in the tree." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "parent-of", "qname" : "node:parent-of", "signature" : "($node1 as node(), $node2 as node()) as xs:boolean external", "description" : " Determines whether the node given as second argument is a\n parent of the node given as first argument.\n", "summary" : "

Determines whether the node given as second argument is a\n parent of the node given as first argument.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node1", "type" : "node()", "occurrence" : null, "description" : "
the potential child
" }, { "name" : "node2", "type" : "node()", "occurrence" : null, "description" : "
the potential parent
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if $node2 is a parent of $node1; false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "preceding-of", "qname" : "node:preceding-of", "signature" : "($node1 as node(), $node2 as node()) as xs:boolean external", "description" : " Determines whether the node given as second argument is\n preceding the node given as first argument.\n", "summary" : "

Determines whether the node given as second argument is\n preceding the node given as first argument.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node1", "type" : "node()", "occurrence" : null, "description" : "
the potential following node
" }, { "name" : "node2", "type" : "node()", "occurrence" : null, "description" : "
the potential preceding node
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if $node2 is preceding the node $node1; false otherwise." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "preceding-sibling-of", "qname" : "node:preceding-sibling-of", "signature" : "($node1 as node(), $node2 as node()) as xs:boolean external", "description" : " Determines whether the node given as second argument is a\n preceding-sibling of the node given as first argument.\n", "summary" : "

Determines whether the node given as second argument is a\n preceding-sibling of the node given as first argument.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node1", "type" : "node()", "occurrence" : null, "description" : "
the potential following-sibling
" }, { "name" : "node2", "type" : "node()", "occurrence" : null, "description" : "
the potential preceding-sibling
" } ], "returns" : { "type" : "xs:boolean", "description" : "true if $node2 is a preceding-sibling of $node1; false otherwise." }, "errors" : [ ] } ], "variables" : [ ] }, "http://zorba.io/modules/archive" : { "ns" : "http://zorba.io/modules/archive", "description" : " This module provides functionality to work with (possibly compressed)\n archives. For example, it provides functions to retrieve the names or\n extract the values of several entries in a ZIP archive. Moreover,\n there exist functions that allow to create or update archives.

\n The following archive formats and compression algorithms are supported:\n

\n

\n", "sees" : [ ], "authors" : [ "Luis Rodgriguez, Juan Zacarias, and Matthias Brantner" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/archive", "prefix" : "a" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "create", "qname" : "a:create", "signature" : "($entries as item()*, $contents as item()*) as xs:base64Binary external", "description" : " Creates a new ZIP archive out of the given entries and contents.

\n All entries are compressed with the DEFLATE compression algorithm.

\n The parameters $entries and $contents have the same meaning as for\n the function a:create with three arguments.

\n Entry entries can include a type element, this element can have one\n of two possible values: \"regular\" or \"directory\". If \"regular\" is\n specified then the entry will be created as a regular file; if \"directory\"\n is specified then the entry will be created as a directory, no contents\n will be read from $contents in this case. If no value is specified for type\n then it will be set to \"regular\".

\n Example:\n

\n $zip-file := a:create(\n    ({ \"encoding\" : \"ISO-8859-1\", \"type\" : \"directory\", \"name\" : \"dir1\" }, \"dir1/file1\"),\n    (\"file contents\"))\n 
\n

\n", "summary" : "

Creates a new ZIP archive out of the given entries and contents.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "entries", "type" : "item()", "occurrence" : "*", "description" : "
the meta data for the entries in the archive. Each entry can be of type xs:string or a JSON oibject describing the entry.
" }, { "name" : "contents", "type" : "item()", "occurrence" : "*", "description" : "
the content for the archive. Each item in the sequence can be of type xs:string or xs:base64Binary.
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "the generated archive as xs:base64Binary" }, "errors" : [ "a:ENTRY-COUNT-MISMATCH if the number of entries that don't describe directories differs from the number of items in the $contents sequence: count($non-directory-entries) ne count($contents)", "a:INVALID-ENTRY-VALS if a values in an entry object are invalid", "a:INVALID-ENCODING if a given encoding is invalid or not supported", "err:FORG0006 if an item in the contents sequence is not of type xs:string or xs:base64Binary" ] }, { "isDocumented" : true, "arity" : 3, "name" : "create", "qname" : "a:create", "signature" : "($entries as item()*, $contents as item()*, $options as object()) as xs:base64Binary external", "description" : " Creates a new archive out of the given entries and contents.

\n The $entries arguments provides meta data for each entry in the archive.\n For example, the name of the entry (mandatory) or the last-modified date\n (optional). An entry can either be of type xs:string to describe the entry\n name or of type xs:base64Binary to provide additional meta data.

\n The $contents sequence provides the data (xs:string or xs:base64Binary) for\n the entries that should be included in the archive. Its length needs to\n match the length of the entries in the $entries sequence that don't describe\n directory entries (a:ARCH0001). All items of type xs:base64Binary are decoded\n before being added to the archive.

\n For each entry, the name, last-modified date and time, and compression\n can be specified. In addition, an encoding can be specified which is used to\n store entries of type xs:string. If no last-modified attribute is given, the\n default is the current date and time. The compression is useful if various\n entries in a ZIP archive are compressed using different compression\n algorithms (i.e. store or deflate).

\n For example, the following sequence may be used to describe an archive\n containing two elements:

\n

{\n   \"last-modified\" : \"{fn:current-dateTime()}\"\n   \"name\" : \"myfile.txt\"\n },\n {\n   \"encoding\" : \"ISO-8859-1\",\n   \"compression\" : \"store\",\n   \"name\" : \"dir/myfile.xml\"\n }\n 
\n

\n The $options argument may be used to describe general options for the\n archive. For example, the following options can be used to create a ZIP\n archive in which all entries are compressed with the DEFLATE compression\n algorithm:

\n

{\n   \"format\" : \"ZIP\",\n   \"compression\" : \"DEFLATE\"\n }\n 
\n

\n The result of the function is the generated archive as a item of type\n xs:base64Binary.

\n", "summary" : "

Creates a new archive out of the given entries and contents.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "entries", "type" : "item()", "occurrence" : "*", "description" : "
the meta data for the entries in the archive. Each entry can be of type xs:string or an JSON object describing the entry.
" }, { "name" : "contents", "type" : "item()", "occurrence" : "*", "description" : "
the content for the archive. Each item in the sequence can be of type xs:string or xs:base64Binary.
" }, { "name" : "options", "type" : "object()", "occurrence" : null, "description" : "
the options used to generate the archive.
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "the generated archive as xs:base64Binary" }, "errors" : [ "a:ENTRY-COUNT-MISMATCH if the number of entries describing non-directories differs from the number of items in the $contents sequence: count($non-directoy-entries) ne count($contents)", "a:INVALID-OPTIONS if the options argument contains invalid values", "a:INVALID-ENTRY-VALS if any values in an entry are invalid", "a:INVALID-ENCODING if a given encoding is invalid or not supported", "a:DIFFERENT-COMPRESSIONS-NOT-SUPPORTED if different compression algorithms were selected but the actual version of libarchive doesn't support it.", "err:FORG0006 if an item in the contents sequence is not of type xs:string or xs:base64Binary" ] }, { "isDocumented" : true, "arity" : 2, "name" : "delete", "qname" : "a:delete", "signature" : "($archive as xs:base64Binary, $entry-names as xs:string*) as xs:base64Binary external", "description" : " Deletes entries from an archive.

\n", "summary" : "

Deletes entries from an archive.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archive", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the archive to extract the entries from as xs:base64Binary
" }, { "name" : "entry-names", "type" : "xs:string", "occurrence" : "*", "description" : "
a sequence of names for entries which should be deleted
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "the updated base64Binary" }, "errors" : [ "a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted" ] }, { "isDocumented" : true, "arity" : 1, "name" : "entries", "qname" : "a:entries", "signature" : "($archive as xs:base64Binary) as object()* external", "description" : " Returns the header information of all entries in the given archive as a JSON\n objects sequence.

\n Such information includes the name of the entry, the uncompressed size,\n as well as the last-modified timestamp. Note that not all values are\n available in every archive.

\n", "summary" : "

Returns the header information of all entries in the given archive as a JSON\n objects sequence.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archive", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the archive to list the entries from as xs:base64Binary
" } ], "returns" : { "type" : "object()*", "description" : "a sequence of strings, one for each entry in the archive" }, "errors" : [ "a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted" ] }, { "isDocumented" : true, "arity" : 1, "name" : "extract-binary", "qname" : "a:extract-binary", "signature" : "($archive as xs:base64Binary) as xs:base64Binary* external", "description" : " Returns the entries identified by the given paths from the archive\n as base64Binary.

\n", "summary" : "

Returns the entries identified by the given paths from the archive\n as base64Binary.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archive", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the archive to extract the entries from as xs:base64Binary
" } ], "returns" : { "type" : "xs:base64Binary*", "description" : "one xs:base64Binary item for the contents of each entry in the archive" }, "errors" : [ "a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted" ] }, { "isDocumented" : true, "arity" : 2, "name" : "extract-binary", "qname" : "a:extract-binary", "signature" : "($archive as xs:base64Binary, $entry-names as xs:string*) as xs:base64Binary* external", "description" : " Returns the entries identified by the given paths from the archive\n as base64Binary.

\n", "summary" : "

Returns the entries identified by the given paths from the archive\n as base64Binary.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archive", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the archive to extract the entries from as xs:base64Binary
" }, { "name" : "entry-names", "type" : "xs:string", "occurrence" : "*", "description" : "
a sequence of names for entries which should be extracted
" } ], "returns" : { "type" : "xs:base64Binary*", "description" : "a sequence of xs:base64Binary itmes for the given sequence of names or the empty sequence if no entries match the given names." }, "errors" : [ "a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted" ] }, { "isDocumented" : true, "arity" : 1, "name" : "extract-text", "qname" : "a:extract-text", "signature" : "($archive as xs:base64Binary) as xs:string* external", "description" : " Extracts the contents of all entries in the given archive as text\n using UTF-8 as default encoding.

\n", "summary" : "

Extracts the contents of all entries in the given archive as text\n using UTF-8 as default encoding.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archive", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the archive to extract the entries from as xs:base64Binary
" } ], "returns" : { "type" : "xs:string*", "description" : "one string for the contents of each entry in the archive" }, "errors" : [ "a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted", "err:FOCH0001 if any of the entries contains invalid utf-8 characters" ] }, { "isDocumented" : true, "arity" : 2, "name" : "extract-text", "qname" : "a:extract-text", "signature" : "($archive as xs:base64Binary, $entry-names as xs:string*) as xs:string* external", "description" : " Extracts the contets of the entries identified by a given sequence of\n names as text.\n The default encoding used to read the string is UTF-8.

\n", "summary" : "

Extracts the contets of the entries identified by a given sequence of\n names as text.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archive", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the archive to extract the entries from as xs:base64Binary
" }, { "name" : "entry-names", "type" : "xs:string", "occurrence" : "*", "description" : "
a sequence of names for entries which should be extracted
" } ], "returns" : { "type" : "xs:string*", "description" : "a sequence of strings for the given sequence of names or the empty sequence if no entries match the given names." }, "errors" : [ "a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted", "err:FOCH0001 if any of the entries requested contains invalid utf-8 characters" ] }, { "isDocumented" : true, "arity" : 3, "name" : "extract-text", "qname" : "a:extract-text", "signature" : "($archive as xs:base64Binary, $entry-names as xs:string*, $encoding as xs:string) as xs:string* external", "description" : " Extracts the contets of the entries identified by a given sequence of\n names as text. Each entry is treated with the given encoding.

\n", "summary" : "

Extracts the contets of the entries identified by a given sequence of\n names as text.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archive", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the archive to extract the entries from as xs:base64Binary
" }, { "name" : "entry-names", "type" : "xs:string", "occurrence" : "*", "description" : "
a sequence of entry names that should be extracted
" }, { "name" : "encoding", "type" : "xs:string", "occurrence" : null, "description" : "
a encoding for transcoding each of the extracted entries
" } ], "returns" : { "type" : "xs:string*", "description" : "a sequence of strings for the given sequence of names or the empty sequence if no entries match the given names." }, "errors" : [ "a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted", "a:INVALID-ENCODING if the given $encoding is invalid or not supported", "err:FOCH0001 if a transcoding error happens" ] }, { "isDocumented" : true, "arity" : 1, "name" : "options", "qname" : "a:options", "signature" : "($archive as xs:base64Binary) as object() external", "description" : " Returns the algorithm and format options as a JSON object for a given archive.\n For example, for a ZIP archive, the following options element\n would be returned:

\n

{\n   \"format\" : \"ZIP\",\n   \"compression\" : \"DEFLATE\"\n }\n 
\n

\n", "summary" : "

Returns the algorithm and format options as a JSON object for a given archive.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archive", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the archive as xs:base64Binary
" } ], "returns" : { "type" : "object()", "description" : "the algorithm and format options as a JSON object" }, "errors" : [ "a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted" ] }, { "isDocumented" : true, "arity" : 3, "name" : "update", "qname" : "a:update", "signature" : "($archive as xs:base64Binary, $entries as item()*, $contents as item()*) as xs:base64Binary external", "description" : " Adds and replaces entries in an archive according to\n the given spec. The contents can be string and base64Binary items.

\n The parameters $entries and $contents have the same meaning as for\n the function a:create with three arguments.

\n", "summary" : "

Adds and replaces entries in an archive according to\n the given spec.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "archive", "type" : "xs:base64Binary", "occurrence" : null, "description" : "
the archive to add or replace content
" }, { "name" : "entries", "type" : "item()", "occurrence" : "*", "description" : "
the meta data for the entries in the archive. Each entry can be of type xs:string or a JSON object. For mandatory fields in the JSON object see create function.
" }, { "name" : "contents", "type" : "item()", "occurrence" : "*", "description" : "
the content for the archive. Each item in the sequence can be of type xs:string or xs:base64Binary.
" } ], "returns" : { "type" : "xs:base64Binary", "description" : "the updated xs:base64Binary" }, "errors" : [ "a:ENTRY-COUNT-MISMATCH if the number of entry elements differs from the number of items in the $contents sequence: count($non-directory-entries) ne count($contents)", "a:INVALID-ENTRY-VALS if a value for an entry element is invalid", "a:INVALID-ENCODING if a given encoding is invalid or not supported", "a:DIFFERENT-COMPRESSIONS-NOT-SUPPORTED if different compression algorithms were selected but the actual version of libarchive doesn't support it.", "err:FORG0006 if an item in the contents sequence is not of type xs:string or xs:base64Binary", "a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted" ] } ], "variables" : [ ] }, "http://www.zorba-xquery.com/modules/converters/html" : { "ns" : "http://www.zorba-xquery.com/modules/converters/html", "description" : "

\n This module provides functions to tidy a HTML document.
\n The functions in this module take an HTML document (a string) as parameter,\n tidy it in order to result in valid XHTML, and return this XHTML document as a document-node.\n

\n", "sees" : [ ], "authors" : [ "Sorin Nasoi" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://ww.w3.org/2005/xqt-errors", "prefix" : "err" }, { "uri" : "http://www.zorba-xquery.com/modules/converters/html", "prefix" : "html" }, { "uri" : "http://www.zorba-xquery.com/modules/converters/html-options", "prefix" : "html-options" }, { "uri" : "http://zorba.io/modules/schema", "prefix" : "schema" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "parse", "qname" : "html:parse", "signature" : "($html as xs:string) as document()", "description" : "

This function tidies the given HTML string and returns\n a valid XHTML document node.

\n

This functions automatically sets the following tidying parameters:\n

\n

\n", "summary" : "

This function tidies the given HTML string and returns\n a valid XHTML document node.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "html", "type" : "xs:string", "occurrence" : null, "description" : "
the HTML string to tidy
" } ], "returns" : { "type" : "document()", "description" : "the tidied XML document" }, "errors" : [ "html:InternalError if an internal error occurred while tidying the string." ] }, { "isDocumented" : true, "arity" : 2, "name" : "parse", "qname" : "html:parse", "signature" : "($html as xs:string, $options as element(html-options:options)) as document()", "description" : "

This function tidies the given HTML string and returns\n a valid XHTML document node.

\n

The second parameter allows to specify options that\n configure the tidy process. This parameter is a sequence\n of name=value pairs. Allowed parameter names and values\n are documented at \n http://tidy.sourceforge.net/docs/quickref.html.

\n", "summary" : "

This function tidies the given HTML string and returns\n a valid XHTML document node.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "html", "type" : "xs:string", "occurrence" : null, "description" : "
the HTML string to tidy
" }, { "name" : "options", "type" : "element(html-options:options)", "occurrence" : null, "description" : "
a set of name and value pairs that provide options to configure the tidy process that have to be validated against the \"http://www.zorba-xquery.com/modules/converters/html-options\" schema.
" } ], "returns" : { "type" : "document()", "description" : "the tidied XHTML document node" }, "errors" : [ "err:XQDY0027 if $options can not be validated against the html-options schema", "html:TidyOption if there was an error with one of the options in the $options parameter that couldn't have been caught by validating against the schema", "html:InternalError if an internal error occurred while tidying the string." ] } ], "variables" : [ ] }, "http://zorba.io/modules/data-cleaning/set-similarity" : { "ns" : "http://zorba.io/modules/data-cleaning/set-similarity", "description" : "

This library module provides similarity functions for comparing sets of XML\n nodes (e.g., sets of XML elements, attributes or atomic values).

\n

\n

These functions are particularly useful for matching near duplicate sets of XML nodes.

\n

\n

The logic contained in this module is not specific to any particular XQuery implementation.

\n", "sees" : [ ], "authors" : [ "Bruno Martins" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/data-cleaning/set-similarity", "prefix" : "set" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "deep-intersect", "qname" : "set:deep-intersect", "signature" : "($s1, $s2) as item()*", "description" : "

Returns the intersection between two sets, using the deep-equal() function to compare the XML nodes from the sets.

\n

\n

Example usage :

 deep-intersect ( ( \"a\", \"b\", \"c\") , ( \"a\", \"a\",  ) ) 

\n

\n

The function invocation in the example above returns :

 (\"a\") 

\n", "summary" : "

Returns the intersection between two sets, using the deep-equal() function to compare the XML nodes from the sets.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s1", "type" : null, "occurrence" : null, "description" : "
The first set.
" }, { "name" : "s2", "type" : null, "occurrence" : null, "description" : "
The second set.
" } ], "returns" : { "type" : "item()*", "description" : "The intersection of both sets." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "deep-union", "qname" : "set:deep-union", "signature" : "($s1, $s2) as item()*", "description" : "

Returns the union between two sets, using the deep-equal() function to compare the XML nodes from the sets.

\n

\n

Example usage :

 deep-union ( ( \"a\", \"b\", \"c\") , ( \"a\", \"a\",  ) ) 

\n

\n

The function invocation in the example above returns :

 (\"a\", \"b\", \"c\",  ) 

\n", "summary" : "

Returns the union between two sets, using the deep-equal() function to compare the XML nodes from the sets.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s1", "type" : null, "occurrence" : null, "description" : "
The first set.
" }, { "name" : "s2", "type" : null, "occurrence" : null, "description" : "
The second set.
" } ], "returns" : { "type" : "item()*", "description" : "The union of both sets." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "dice", "qname" : "set:dice", "signature" : "($s1, $s2) as xs:double", "description" : "

Returns the Dice similarity coefficient between two sets of XML nodes.

\n

The Dice coefficient is defined as defined as twice the shared information between the input sets\n (i.e., the size of the intersection) over the sum of the cardinalities for the input sets.

\n

\n

Example usage :

 dice ( ( \"a\", \"b\",  ) , ( \"a\", \"a\", \"d\") ) 

\n

\n

The function invocation in the example above returns :

 0.4 

\n", "summary" : "

Returns the Dice similarity coefficient between two sets of XML nodes.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s1", "type" : null, "occurrence" : null, "description" : "
The first set.
" }, { "name" : "s2", "type" : null, "occurrence" : null, "description" : "
The second set.
" } ], "returns" : { "type" : "xs:double", "description" : "The Dice similarity coefficient between the two sets." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "distinct", "qname" : "set:distinct", "signature" : "($s) as item()*", "description" : "

Removes exact duplicates from a set, using the deep-equal() function to compare the XML nodes from the sets.

\n

\n

Example usage :

 distinct ( ( \"a\", \"a\",  ) ) 

\n

\n

The function invocation in the example above returns :

 (\"a\",  ) 

\n", "summary" : "

Removes exact duplicates from a set, using the deep-equal() function to compare the XML nodes from the sets.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s", "type" : null, "occurrence" : null, "description" : "
A set.
" } ], "returns" : { "type" : "item()*", "description" : "The set provided as input without the exact duplicates (i.e., returns the distinct nodes from the set provided as input)." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "jaccard", "qname" : "set:jaccard", "signature" : "($s1, $s2) as xs:double", "description" : "

Returns the Jaccard similarity coefficient between two sets of XML nodes.

\n

The Jaccard coefficient is defined as the size of the intersection divided by the size of the\n union of the input sets.

\n

\n

Example usage :

 jaccard ( ( \"a\", \"b\",  ) , ( \"a\", \"a\", \"d\") ) 

\n

\n

The function invocation in the example above returns :

 0.25 

\n", "summary" : "

Returns the Jaccard similarity coefficient between two sets of XML nodes.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s1", "type" : null, "occurrence" : null, "description" : "
The first set.
" }, { "name" : "s2", "type" : null, "occurrence" : null, "description" : "
The second set.
" } ], "returns" : { "type" : "xs:double", "description" : "The Jaccard similarity coefficient between the two sets." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 2, "name" : "overlap", "qname" : "set:overlap", "signature" : "($s1, $s2) as xs:double", "description" : "

Returns the overlap coefficient between two sets of XML nodes.

\n

The overlap coefficient is defined as the shared information between the input sets\n (i.e., the size of the intersection) over the size of the smallest input set.

\n

\n

Example usage :

 overlap ( ( \"a\", \"b\",  ) , ( \"a\", \"a\", \"b\" ) ) 

\n

\n

The function invocation in the example above returns :

 1.0 

\n", "summary" : "

Returns the overlap coefficient between two sets of XML nodes.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "s1", "type" : null, "occurrence" : null, "description" : "
The first set.
" }, { "name" : "s2", "type" : null, "occurrence" : null, "description" : "
The second set.
" } ], "returns" : { "type" : "xs:double", "description" : "The overlap coefficient between the two sets." }, "errors" : [ ] } ], "variables" : [ ] }, "http://www.28msec.com/modules/http/util/cache" : { "ns" : "http://www.28msec.com/modules/http/util/cache", "description" : " This module contains a collection of convenience functions to help\n developers work with HTTP caching options.\n", "sees" : [ ], "authors" : [ "28msec" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://www.28msec.com/modules/http/util/cache", "prefix" : "cache" }, { "uri" : "http://www.28msec.com/modules/http/response", "prefix" : "resp" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 0, "name" : "no-cache", "qname" : "cache:no-cache", "signature" : "() as empty-sequence()", "description" : "

Forces a client not to cache the response by setting the appropriate\n HTTP headers.

\n In detail, the following HTTP headers will be set in the response:\n
    \n
  • Cache-Control: no-cache
  • \n
  • Pragma: no-cache
  • \n
  • Expires: 0
  • \n
\n", "summary" : "

Forces a client not to cache the response by setting the appropriate\n HTTP headers.

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "empty-sequence()", "description" : "On success, the empty-sequence is returned" }, "errors" : [ ] } ], "variables" : [ ] }, "http://www.zorba-xquery.com/modules/schema-tools" : { "ns" : "http://www.zorba-xquery.com/modules/schema-tools", "description" : " This module provides funtionality to get sample XMLSchema from XML instances\n and sample XML instances from XMLSchema.\n Apache XMLBeans library is used to implement\n inst2xsd and xsd2inst functions.\n
\n
\n Note: Since this module has a Java library dependency a JVM required\n to be installed on the system. For Windows: jvm.dll is required on the system\n path ( usually located in \"C:\\Program Files\\Java\\jre6\\bin\\client\".\n", "sees" : [ "http://xmlbeans.apache.org/", "http://xmlbeans.apache.org" ], "authors" : [ "Cezar Andrei" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.w3.org/2005/xqt-errors", "prefix" : "err" }, { "uri" : "http://zorba.io/modules/schema", "prefix" : "schema-options" }, { "uri" : "http://www.zorba-xquery.com/modules/schema-tools", "prefix" : "schema-tools" }, { "uri" : "http://www.zorba-xquery.com/modules/schema-tools/schema-tools-options", "prefix" : "st-options" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "inst2xsd", "qname" : "schema-tools:inst2xsd", "signature" : "($instances as element(*)+, $options as element(st-options:inst2xsd-options)?) as document()*", "description" : " The inst2xsd function takes a set of sample XML instance elements as input and\n generates a set of sample XMLSchema documents that define\n the content of the given input.\n
\n Please consult the\n official documentation for further\n information.\n
\n Example:
\n  import module namespace st = \"http://www.zorba-xquery.com/modules/schema-tools\";\n  declare namespace sto =\n      \"http://www.zorba-xquery.com/modules/schema-tools/schema-tools-options\";\n  let $instances := (<a><b/><c/></a>, <b/>, <c>ccc</c>)\n  let $options  :=\n     <sto:inst2xsd-options xmlns:sto=\n       \"http://www.zorba-xquery.com/modules/schema-tools/schema-tools-options\">\n       <sto:design>vbd</sto:design>\n       <sto:simple-content-types>smart</sto:simple-content-types>\n       <sto:use-enumeration>10</sto:use-enumeration>\n     </sto:inst2xsd-options>\n  return\n      st:inst2xsd($instances, $options)\n 
\n
\n", "summary" : "

The inst2xsd function takes a set of sample XML instance elements as input and\n generates a set of sample XMLSchema documents that define\n the content of the given input.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "instances", "type" : "element(*)", "occurrence" : "+", "description" : "
The input XML instance elements
" }, { "name" : "options", "type" : "element(st-options:inst2xsd-options)", "occurrence" : "?", "description" : "
Options:
  • design: Choose the generated schema design
    - rdd: Russian Doll Design - local elements and local types
    - ssd: Salami Slice Design - global elements and local types
    - vbd (default): Venetian Blind Design - local elements and global complex types
  • simple-content-types: type of leaf nodes
    - smart (default): try to find the right simple XMLSchema type
    - always-string: use xsd:string for all simple types
  • use-enumeration: - when there are multiple valid values in a list
    - 1: never use enumeration
    - 2 or more (default 10): use enumeration if less than this number of occurrences - number option
  • verbose: - stdout verbose info
    - true: - output type holder information
    - false (default): no output
" } ], "returns" : { "type" : "document()*", "description" : "The generated XMLSchema documents." }, "errors" : [ "schema-tools:VM001 If Zorba was unable to start the JVM.", "schema-tools:JAVA-EXCEPTION If Apache XMLBeans throws an exception." ] }, { "isDocumented" : true, "arity" : 3, "name" : "xsd2inst", "qname" : "schema-tools:xsd2inst", "signature" : "($schemas as element(*)+, $rootElementName as xs:string, $options as element(st-options:xsd2inst-options)?) as document()", "description" : " The xsd2inst function takes a set of XML Schema elements as input and the\n local name of the root element and\n generates a document that represents one sample XML instance of the given\n input schemas. The local name is searched in schema global element definitions\n in the order of schemas parameter.\n
\n Please consult the\n official documentation for further\n information.\n
\n Example:
\n  import module namespace st = \"http://www.zorba-xquery.com/modules/schema-tools\";\n  declare namespace sto =\n      \"http://www.zorba-xquery.com/modules/schema-tools/schema-tools-options\";\n  let $xsds  :=\n     ( <xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\n           attributeFormDefault=\"unqualified\"\n           elementFormDefault=\"qualified\">\n         <xs:element name=\"a\" type=\"aType\"/>\n         <xs:complexType name=\"aType\">\n           <xs:sequence>\n             <xs:element type=\"xs:string\" name=\"b\"/>\n             <xs:element type=\"xs:string\" name=\"c\"/>\n           </xs:sequence>\n         </xs:complexType>\n       </xs:schema> )\n  let $options :=\n    <sto:xsd2inst-options xmlns:sto=\n      \"http://www.zorba-xquery.com/modules/schema-tools/schema-tools-options\">\n      <sto:network-downloads>false</sto:network-downloads>\n      <sto:no-pvr>false</sto:no-pvr>\n      <sto:no-upa>false</sto:no-upa>\n    </sto:xsd2inst-options>\n  return\n      st:xsd2inst($xsds, \"a\", $options)\n 

\n", "summary" : "

The xsd2inst function takes a set of XML Schema elements as input and the\n local name of the root element and\n generates a document that represents one sample XML instance of the given\n input schemas.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "schemas", "type" : "element(*)", "occurrence" : "+", "description" : "
elements representing XMLSchema definitions
" }, { "name" : "rootElementName", "type" : "xs:string", "occurrence" : null, "description" : "
The local name of the instance root element. If multiple target namespaces are used, first one found - using the sequence order - will be used.
" }, { "name" : "options", "type" : "element(st-options:xsd2inst-options)", "occurrence" : "?", "description" : "
Options:
  • network-downloads: boolean (default false)
    - true allows XMLBeans to use network when resolving schema imports and includes
  • no-pvr: boolean (default false)
    - true to disable particle valid (restriction) rule, false otherwise
  • no-upa: boolean (default false)
    - true to disable unique particle attribution rule, false otherwise
" } ], "returns" : { "type" : "document()", "description" : "The generated output document, representing a sample XML instance." }, "errors" : [ "schema-tools:VM001 If Zorba was unable to start the JVM.", "schema-tools:JAVA-EXCEPTION If Apache XMLBeans throws an exception." ] } ], "variables" : [ ] }, "http://xbrl.io/modules/bizql/entities" : { "ns" : "http://xbrl.io/modules/bizql/entities", "description" : "

This module provides functions for retrieving information about entities.\n Entities submit archives (see archives module),\n for example, to a reporting authority. Entities\n are identified with an EID (Entity ID).

\n

With this module, you can retrieve all entities, or a certain number of entities\n with their EIDs, or obtain the EID of entities you already have.

\n

Entities are stored in a MongoDB datasource called xbrl.

\n

Each entity can be associated with a set of tags that makes it easier\n to manage them. The e:entities#1 function\n allows to retrieve all entities with a given tag.

\n", "sees" : [ ], "authors" : [ "Charles Hoffman", "Matthias Brantner", "Dennis Knochenwefel", "Ghislain Fourny" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.28msec.com/modules/credentials", "prefix" : "credentials" }, { "uri" : "http://xbrl.io/modules/bizql/entities", "prefix" : "entities" }, { "uri" : "http://www.28msec.com/modules/mongodb", "prefix" : "mongo" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 1, "name" : "eid", "qname" : "entities:eid", "signature" : "($entities-or-ids as item()*) as atomic*", "description" : "

Converts the input to a normalized entity identifier (EID). The input\n can be either an EID, or an entity object which contains an _id.

\n", "summary" : "

Converts the input to a normalized entity identifier (EID).

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "entities-or-ids", "type" : "item()", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : "atomic*", "description" : "the normalized EIDs." }, "errors" : [ "entities:INVALID_PARAMETER if the EID or entity is not valid." ] }, { "isDocumented" : true, "arity" : 0, "name" : "entities", "qname" : "entities:entities", "signature" : "() as object()*", "description" : "

Return all entities.

\n", "summary" : "

Return all entities.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ ], "returns" : { "type" : "object()*", "description" : "all entities." }, "errors" : [ ] }, { "isDocumented" : true, "arity" : 1, "name" : "entities", "qname" : "entities:entities", "signature" : "($entities-or-ids as item()*) as object()*", "description" : "

Return the entities with the given EIDs.

\n", "summary" : "

Return the entities with the given EIDs.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "entities-or-ids", "type" : "item()", "occurrence" : "*", "description" : "
the ids of the entities (EIDs) or the entities themselves.
" } ], "returns" : { "type" : "object()*", "description" : "the entities with the given EIDs the empty sequence if no entity was found or if the input is an empty sequence." }, "errors" : [ ] } ], "variables" : [ { "name" : "entities:col", "type" : "string", "description" : " Name of the collection the entities are stored in.\n" } ] }, "http://www.zorba-xquery.com/modules/cryptography/hmac" : { "ns" : "http://www.zorba-xquery.com/modules/cryptography/hmac", "description" : " This module provides a function to generate hash-based\n message authentication codes (HMAC) involving a cryptographic\n hash function (e.g. SHA1).\n", "sees" : [ ], "authors" : [ "William Candillon" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://www.zorba-xquery.com/modules/cryptography/hmac", "prefix" : "hmac" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "isDocumented" : true, "arity" : 2, "name" : "sha1", "qname" : "hmac:sha1", "signature" : "($message as xs:string, $secret-key as xs:string) as xs:string external", "description" : " This function provides hash-based message authentication code using\n the SHA1 algorithm.\n", "summary" : "

This function provides hash-based message authentication code using\n the SHA1 algorithm.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "message", "type" : "xs:string", "occurrence" : null, "description" : "
the message to be authenticated
" }, { "name" : "secret-key", "type" : "xs:string", "occurrence" : null, "description" : "
the secret key used for calculating the authentication
" } ], "returns" : { "type" : "xs:string", "description" : "hash-based base64 encoded message authentication code" }, "errors" : [ ] } ], "variables" : [ ] }, "http://api.28.io/csvview" : { "ns" : "http://api.28.io/csvview", "description" : "", "sees" : [ ], "authors" : [ ], "version" : null, "encoding" : null, "namespaces" : [ { "uri" : "", "prefix" : "an" }, { "uri" : "http://api.28.io/csvview", "prefix" : "csvview" }, { "uri" : "http://api.28.io/model", "prefix" : "model" } ], "functions" : [ { "isDocumented" : false, "arity" : 1, "name" : "column", "qname" : "csvview:column", "signature" : "($data) as xs:string", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "data", "type" : null, "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "line", "qname" : "csvview:line", "signature" : "($entries as xs:string*)", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "entries", "type" : "xs:string", "occurrence" : "*", "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 2, "name" : "show-nodes", "qname" : "csvview:show-nodes", "signature" : "($nodes, $show-headers as xs:boolean)", "description" : "", "summary" : "", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "nodes", "type" : null, "occurrence" : null, "description" : "" }, { "name" : "show-headers", "type" : "xs:boolean", "occurrence" : null, "description" : "" } ], "returns" : { "type" : null, "description" : "" }, "errors" : [ ] } ], "variables" : [ ] }, "http://api.28.io/util" : { "ns" : "http://api.28.io/util", "description" : "", "sees" : [ ], "authors" : [ ], "version" : null, "encoding" : null, "namespaces" : [ { "uri" : "http://www.28msec.com/modules/http/request", "prefix" : "req" }, { "uri" : "http://api.28.io/util", "prefix" : "util" } ], "functions" : [ { "isDocumented" : false, "arity" : 1, "name" : "param-or-body", "qname" : "util:param-or-body", "signature" : "($param-name as xs:string) as xs:string?", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "param-name", "type" : "xs:string", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string?", "description" : "" }, "errors" : [ ] }, { "isDocumented" : false, "arity" : 1, "name" : "path", "qname" : "util:path", "signature" : "($from as xs:integer) as xs:string*", "description" : "", "summary" : "", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "from", "type" : "xs:integer", "occurrence" : null, "description" : "" } ], "returns" : { "type" : "xs:string*", "description" : "" }, "errors" : [ ] } ], "variables" : [ { "name" : "util:collection-namespace", "type" : "item()*", "description" : "" } ] } }; +}); diff --git a/lib/ace/mode/xquery/xqlint.js b/lib/ace/mode/xquery/xqlint.js index 3b924890..eccc8860 100644 --- a/lib/ace/mode/xquery/xqlint.js +++ b/lib/ace/mode/xquery/xqlint.js @@ -1009,6 +1009,7 @@ function retrievePrecedingIdentifier(text, pos, regex) { } return buf.reverse().join(''); } + /* function retrieveFollowingIdentifier(text, pos, regex) { regex = regex || ID_REGEX; @@ -1023,6 +1024,7 @@ function retrieveFollowingIdentifier(text, pos, regex) { return buf; } */ + function prefixBinarySearch(items, prefix) { var startIndex = 0; var stopIndex = items.length - 1; @@ -1092,7 +1094,8 @@ var completePrefix = function(identifier, pos, sctx){ var match = function(name) { return { name: name + ':', - value: name + ':' + value: name + ':', + meta: 'prefix' }; }; return matches.map(match); @@ -1111,7 +1114,10 @@ var completeFunction = function(identifier, pos, sctx){ if(idx !== -1){ prefix = identifier.substring(0, idx); name = identifier.substring(idx + 1); - uri = sctx.getNamespaceByPrefix(prefix).uri; + var ns = sctx.getNamespaceByPrefix(prefix); + if(ns){ + uri = sctx.getNamespaceByPrefix(prefix).uri; + } } Object.keys(functions).forEach(function(key){ var fn = functions[key]; @@ -1130,7 +1136,8 @@ var completeFunction = function(identifier, pos, sctx){ var match = function(name) { return { name: name, - value: name + value: name, + meta: 'function' }; }; return matches.map(match); @@ -1191,7 +1198,8 @@ var completeModuleUri = function(line, pos, sctx){ var match = function(name) { return { name: name, - value: name + value: name, + meta: 'module' }; }; return matches.map(match); @@ -1208,6 +1216,7 @@ exports.complete = function(source, ast, rootSctx, pos){ return completeExpr(line, pos, sctx); } }; + }, {"../tree_ops":10}], 6:[function(_dereq_,module,exports){ @@ -78568,7 +78577,9 @@ exports.TreeOps = { flatten: function(node){ var that = this; var value = ''; - if (node.value === undefined) { + if(!node) { + throw new Error('Invalid node found'); + } else if (node.value === undefined) { node.children.forEach(function(child){ value += that.flatten(child); }); diff --git a/lib/ace/mode/xquery_worker.js b/lib/ace/mode/xquery_worker.js index 09259ddb..c857260b 100644 --- a/lib/ace/mode/xquery_worker.js +++ b/lib/ace/mode/xquery_worker.js @@ -35,29 +35,11 @@ var oop = require("../lib/oop"); var Mirror = require("../worker/mirror").Mirror; var XQLintLib = require("./xquery/xqlint"); var XQLint = XQLintLib.XQLint; +var Modules = require("./xquery/modules").Modules; -var XQueryWorker = exports.XQueryWorker = function(sender) { - Mirror.call(this, sender); - this.setTimeout(200); - this.opts = { - styleCheck: false, - staticContext: XQLintLib.createStaticContext() - }; - var that = this; - - this.sender.on("complete", function(e){ - that.sender.emit("markers", that.xqlint.getMarkers()); - var pos = { line: e.data.pos.row, col: e.data.pos.column }; - var proposals = that.xqlint.getCompletions(pos); - that.sender.emit("complete", proposals); - }); - - this.sender.on("setAvailableModuleNamespaces", function(e){ - that.opts.sctx.availableModuleNamespaces = e.data; - }); - - this.sender.on("setModuleUriResolver", function(e){ - sctx.setModuleResolver(function(uri){ +var getModuleResolverFromModules = function(modules){ + return function(uri){ + var index = modules; var mod = index[uri]; var variables = {}; var functions = {}; @@ -77,7 +59,31 @@ var XQueryWorker = exports.XQueryWorker = function(sender) { variables: variables, functions: functions }; - }); + }; +}; + +var XQueryWorker = exports.XQueryWorker = function(sender) { + Mirror.call(this, sender); + this.setTimeout(200); + this.opts = { + styleCheck: false + }; + this.availableModuleNamespaces = Object.keys(Modules); + this.moduleResolver = getModuleResolverFromModules(Modules); + var that = this; + + this.sender.on("complete", function(e){ + var pos = { line: e.data.pos.row, col: e.data.pos.column }; + var proposals = that.xqlint.getCompletions(pos); + that.sender.emit("complete", proposals); + }); + + this.sender.on("setAvailableModuleNamespaces", function(e){ + that.availableModuleNamespaces = e.data; + }); + + this.sender.on("setModuleResolver", function(e){ + that.moduleResolver = getModuleResolverFromModules(e.data); }); }; @@ -88,7 +94,18 @@ oop.inherits(XQueryWorker, Mirror); this.onUpdate = function() { this.sender.emit("start"); var value = this.doc.getValue(); - this.xqlint = new XQLint(value, this.opts); + var sctx = XQLintLib.createStaticContext(); + if(this.moduleResolver) { + sctx.setModuleResolver(this.moduleResolver); + } + if(this.availableModuleNamespaces) { + sctx.availableModuleNamespaces = this.availableModuleNamespaces; + } + var opts = { + styleCheck: this.styleCheck, + staticContext: sctx, + }; + this.xqlint = new XQLint(value, opts); this.sender.emit("markers", this.xqlint.getMarkers()); }; }).call(XQueryWorker.prototype); diff --git a/tool/update_deps.js b/tool/update_deps.js index a664ad49..99e2a9bd 100644 --- a/tool/update_deps.js +++ b/tool/update_deps.js @@ -72,7 +72,7 @@ var deps = { xqlint: { path: "mode/xquery/xqlint.js", browserify: { - npmModule: "git+https://github.com/wcandillon/xqlint.git#master", + npmModule: "git+https://github.com/wcandillon/xqlint.git#0.0.8", path: "xqlint/lib/xqlint.js", exports: "XQLint" }, From e87dfcce7a224e06341779f01d9cf6cf5bb4748c Mon Sep 17 00:00:00 2001 From: William Candillon Date: Fri, 4 Apr 2014 12:02:57 +0200 Subject: [PATCH 032/158] Minor JSONiq mode refactoring --- lib/ace/mode/jsoniq.js | 13 ------------- lib/ace/mode/xquery_worker.js | 10 ++++++---- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/lib/ace/mode/jsoniq.js b/lib/ace/mode/jsoniq.js index 54298949..6f10d2d3 100644 --- a/lib/ace/mode/jsoniq.js +++ b/lib/ace/mode/jsoniq.js @@ -129,19 +129,6 @@ oop.inherits(Mode, TextMode); that.addMarkers(e.data, session); }); - worker.on("highlight", function(tokens) { - that.$tokenizer.tokens = tokens.data.tokens; - that.$tokenizer.lines = session.getDocument().getAllLines(); - - var rows = Object.keys(that.$tokenizer.tokens); - for(var i=0; i < rows.length; i++) { - var row = parseInt(rows[i]); - delete session.bgTokenizer.lines[row]; - delete session.bgTokenizer.states[row]; - session.bgTokenizer.fireUpdateEvent(row, row); - } - }); - return worker; }; diff --git a/lib/ace/mode/xquery_worker.js b/lib/ace/mode/xquery_worker.js index c857260b..6a8432b3 100644 --- a/lib/ace/mode/xquery_worker.js +++ b/lib/ace/mode/xquery_worker.js @@ -72,10 +72,12 @@ var XQueryWorker = exports.XQueryWorker = function(sender) { this.moduleResolver = getModuleResolverFromModules(Modules); var that = this; - this.sender.on("complete", function(e){ - var pos = { line: e.data.pos.row, col: e.data.pos.column }; - var proposals = that.xqlint.getCompletions(pos); - that.sender.emit("complete", proposals); + this.sender.on("complete", function(e){ + if(that.xqlint) { + var pos = { line: e.data.pos.row, col: e.data.pos.column }; + var proposals = that.xqlint.getCompletions(pos); + that.sender.emit("complete", proposals); + } }); this.sender.on("setAvailableModuleNamespaces", function(e){ From a7297de55f6da1f6f807d0cd374232edb9dace02 Mon Sep 17 00:00:00 2001 From: William Candillon Date: Sat, 5 Apr 2014 20:16:02 +0200 Subject: [PATCH 033/158] Update autocomplete to handle custom identifier regexprsw --- lib/ace/autocomplete.js | 7 ++----- lib/ace/ext/language_tools.js | 12 ++++++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js index 6e064381..ccc50a4c 100644 --- a/lib/ace/autocomplete.js +++ b/lib/ace/autocomplete.js @@ -212,7 +212,7 @@ var Autocomplete = function() { var pos = editor.getCursorPosition(); var line = session.getLine(pos.row); callback(null, { - prefix: util.retrievePrecedingIdentifier(line, pos.column), + prefix: util.retrievePrecedingIdentifier(line, pos.column, results.length > 0 ? results[0].identifierRegex : undefined), matches: matches, finished: (--total === 0) }); @@ -270,10 +270,7 @@ var Autocomplete = function() { }.bind(this); // Calcul prefix - var session = this.editor.getSession(); - var pos = this.editor.getCursorPosition(); - var line = session.getLine(pos.row); - var prefix = util.retrievePrecedingIdentifier(line, pos.column); + var prefix = results.prefix; // Results matches var matches = results && results.matches; diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js index 6c1182a1..b6cc9d0d 100644 --- a/lib/ace/ext/language_tools.js +++ b/lib/ace/ext/language_tools.js @@ -122,7 +122,15 @@ var doLiveAutocomplete = function(e) { var line = editor.session.getLine(pos.row); var hasCompleter = editor.completer && editor.completer.activated; var prefix = util.retrievePrecedingIdentifier(line, pos.column); - + //Try to find custom prefixes on the completors + completers.forEach(function(completer){ + if(completer.identifierRegexprs){ + completer.identifierRegexprs.forEach(function(identifierRegex){ + prefix = util.retrievePrecedingIdentifier(line, pos.column, identifierRegex); + }); + } + }); + // We don't want to autocomplete with no prefix if (e.command.name === "backspace" && !prefix) { if (hasCompleter) @@ -185,4 +193,4 @@ require("../config").defineOptions(Editor.prototype, "editor", { } }); -}); \ No newline at end of file +}); From a05b84f4dfb9785866726d9109e68763a20bacc5 Mon Sep 17 00:00:00 2001 From: William Candillon Date: Sat, 5 Apr 2014 22:38:23 +0200 Subject: [PATCH 034/158] Bug fix --- lib/ace/ext/language_tools.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js index b6cc9d0d..39b1946a 100644 --- a/lib/ace/ext/language_tools.js +++ b/lib/ace/ext/language_tools.js @@ -126,7 +126,9 @@ var doLiveAutocomplete = function(e) { completers.forEach(function(completer){ if(completer.identifierRegexprs){ completer.identifierRegexprs.forEach(function(identifierRegex){ - prefix = util.retrievePrecedingIdentifier(line, pos.column, identifierRegex); + if(!prefix) { + prefix = util.retrievePrecedingIdentifier(line, pos.column, identifierRegex); + } }); } }); From b67caa11631f22450bc929c57036345a0074d12c Mon Sep 17 00:00:00 2001 From: William Candillon Date: Sat, 5 Apr 2014 23:31:20 +0200 Subject: [PATCH 035/158] Disable Tab command binding for autocomplete (incompatible with live autocomplete) --- lib/ace/autocomplete.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js index ccc50a4c..4cc29043 100644 --- a/lib/ace/autocomplete.js +++ b/lib/ace/autocomplete.js @@ -186,7 +186,6 @@ var Autocomplete = function() { editor.completer.insertMatch(); }, "Shift-Return": function(editor) { editor.completer.insertMatch(true); }, - "Tab": function(editor) { editor.completer.insertMatch(); }, "PageUp": function(editor) { editor.completer.popup.gotoPageUp(); }, "PageDown": function(editor) { editor.completer.popup.gotoPageDown(); } From 0d6eb5b71802577436157b87c40d26ae79cb2f2f Mon Sep 17 00:00:00 2001 From: DanyaPostfactum Date: Tue, 8 Apr 2014 14:03:10 +1000 Subject: [PATCH 036/158] Fix jump to last item in completer popup. --- lib/ace/autocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js index f3800c16..a03a7e18 100644 --- a/lib/ace/autocomplete.js +++ b/lib/ace/autocomplete.js @@ -139,7 +139,7 @@ var Autocomplete = function() { var max = this.popup.session.getLength() - 1; switch(where) { - case "up": row = row < 0 ? max : row - 1; break; + case "up": row = row <= 0 ? max : row - 1; break; case "down": row = row >= max ? -1 : row + 1; break; case "start": row = 0; break; case "end": row = max; break; From df68336921ec95cc288998ee937283afbc163041 Mon Sep 17 00:00:00 2001 From: DanyaPostfactum Date: Tue, 8 Apr 2014 14:06:05 +1000 Subject: [PATCH 037/158] Fix bug of tooltipFollowsMouse option with folded text. --- lib/ace/mouse/default_gutter_handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/mouse/default_gutter_handler.js b/lib/ace/mouse/default_gutter_handler.js index 1b5cb986..43120c79 100644 --- a/lib/ace/mouse/default_gutter_handler.js +++ b/lib/ace/mouse/default_gutter_handler.js @@ -93,7 +93,7 @@ function GutterHandler(mouseHandler) { if (mouseHandler.$tooltipFollowsMouse) { moveTooltip(mouseEvent); } else { - var gutterElement = gutter.$cells[row].element; + var gutterElement = gutter.$cells[editor.session.documentToScreenRow(row, 0)].element; var rect = gutterElement.getBoundingClientRect(); var style = tooltip.getElement().style; style.left = rect.right + "px"; From f39f16e12f7ad644c2bc34b7f13f12f134bedd7b Mon Sep 17 00:00:00 2001 From: DanyaPostfactum Date: Tue, 8 Apr 2014 14:18:04 +1000 Subject: [PATCH 038/158] Fix cut/copy in Firefox (setData() may return nothing). --- lib/ace/keyboard/textinput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/keyboard/textinput.js b/lib/ace/keyboard/textinput.js index 5c75b6e9..fbf37786 100644 --- a/lib/ace/keyboard/textinput.js +++ b/lib/ace/keyboard/textinput.js @@ -251,7 +251,7 @@ var TextInput = function(parentNode, host) { var mime = USE_IE_MIME_TYPE ? "Text" : "text/plain"; if (data) { // Safari 5 has clipboardData object, but does not handle setData() - return clipboardData.setData(mime, data); + return clipboardData.setData(mime, data) !== false; } else { return clipboardData.getData(mime); } From c3dd9ff510feb906fcf4400919dfa2d08269eafe Mon Sep 17 00:00:00 2001 From: nightwing Date: Fri, 4 Apr 2014 23:12:34 +0400 Subject: [PATCH 039/158] remove bogus string.regexp highlight rules from java and c# --- lib/ace/mode/csharp_highlight_rules.js | 3 --- lib/ace/mode/java_highlight_rules.js | 3 --- 2 files changed, 6 deletions(-) diff --git a/lib/ace/mode/csharp_highlight_rules.js b/lib/ace/mode/csharp_highlight_rules.js index 89cbc2d5..6e7ba5d4 100644 --- a/lib/ace/mode/csharp_highlight_rules.js +++ b/lib/ace/mode/csharp_highlight_rules.js @@ -26,9 +26,6 @@ var CSharpHighlightRules = function() { token : "comment", // multi line comment regex : "\\/\\*", next : "comment" - }, { - token : "string.regexp", - regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" }, { token : "string", // character regex : /'(?:.|\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n]))'/ diff --git a/lib/ace/mode/java_highlight_rules.js b/lib/ace/mode/java_highlight_rules.js index 8cba835c..d39d9aad 100644 --- a/lib/ace/mode/java_highlight_rules.js +++ b/lib/ace/mode/java_highlight_rules.js @@ -72,9 +72,6 @@ var JavaHighlightRules = function() { token : "comment", // multi line comment regex : "\\/\\*", next : "comment" - }, { - token : "string.regexp", - regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' From 4599dc6834127f76acf2f07f00e976e124ed1980 Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 8 Apr 2014 22:51:57 +0400 Subject: [PATCH 040/158] cleanup --- lib/ace/autocomplete.js | 37 ++++++++++++++++------------------- lib/ace/ext/language_tools.js | 16 ++++++++------- lib/ace/snippets.js | 2 +- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js index 4cc29043..475daee1 100644 --- a/lib/ace/autocomplete.js +++ b/lib/ace/autocomplete.js @@ -180,12 +180,15 @@ var Autocomplete = function() { "Esc": function(editor) { editor.completer.detach(); }, "Space": function(editor) { editor.completer.detach(); editor.insert(" ");}, - "Return": function(editor) { - if (editor.completer.popup.getRow() == -1) - return false; - editor.completer.insertMatch(); - }, + "Return": function(editor) { return editor.completer.insertMatch(); }, "Shift-Return": function(editor) { editor.completer.insertMatch(true); }, + "Tab": function(editor) { + var result = editor.completer.insertMatch(); + if (!result && !editor.tabstopManager) + editor.completer.goTo("down"); + else + return result; + }, "PageUp": function(editor) { editor.completer.popup.gotoPageUp(); }, "PageDown": function(editor) { editor.completer.popup.gotoPageDown(); } @@ -207,16 +210,16 @@ var Autocomplete = function() { completer.getCompletions(editor, session, pos, prefix, function(err, results) { if (!err) matches = matches.concat(results); - // Fetch prefix again, because they may have changed by now - var pos = editor.getCursorPosition(); - var line = session.getLine(pos.row); - callback(null, { - prefix: util.retrievePrecedingIdentifier(line, pos.column, results.length > 0 ? results[0].identifierRegex : undefined), + // Fetch prefix again, because they may have changed by now + var pos = editor.getCursorPosition(); + var line = session.getLine(pos.row); + callback(null, { + prefix: util.retrievePrecedingIdentifier(line, pos.column, results[0] && results[0].identifierRegex), matches: matches, finished: (--total === 0) + }); }); }); - }); return true; }; @@ -268,17 +271,9 @@ var Autocomplete = function() { return this.detach(); }.bind(this); - // Calcul prefix var prefix = results.prefix; - - // Results matches var matches = results && results.matches; - if (!matches || !matches.length) - return this.detach(); - // TODO reenable this when we have proper change tracking - // if (matches.length == 1) - // return this.insertMatch(matches[0]); - + if (!matches || !matches.length) return doDetach(); @@ -323,6 +318,8 @@ Autocomplete.startCommand = { exec: function(editor) { if (!editor.completer) editor.completer = new Autocomplete(); + editor.completer.autoInsert = + editor.completer.autoSelect = true; editor.completer.showPopup(editor); // needed for firefox on mac editor.completer.cancelContextMenu(); diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js index 39b1946a..1933b4ff 100644 --- a/lib/ace/ext/language_tools.js +++ b/lib/ace/ext/language_tools.js @@ -79,7 +79,7 @@ var expandSnippet = { if (!success) editor.execCommand("indent"); }, - bindKey: "tab" + bindKey: "Tab" }; var onChangeMode = function(e, editor) { @@ -122,17 +122,18 @@ var doLiveAutocomplete = function(e) { var line = editor.session.getLine(pos.row); var hasCompleter = editor.completer && editor.completer.activated; var prefix = util.retrievePrecedingIdentifier(line, pos.column); - //Try to find custom prefixes on the completors - completers.forEach(function(completer){ - if(completer.identifierRegexprs){ - completer.identifierRegexprs.forEach(function(identifierRegex){ - if(!prefix) { + + //Try to find custom prefixes on the completers + completers.forEach(function(completer) { + if (completer.identifierRegexps) { + completer.identifierRegexps.forEach(function(identifierRegex){ + if (!prefix) { prefix = util.retrievePrecedingIdentifier(line, pos.column, identifierRegex); } }); } }); - + // We don't want to autocomplete with no prefix if (e.command.name === "backspace" && !prefix) { if (hasCompleter) @@ -145,6 +146,7 @@ var doLiveAutocomplete = function(e) { // Create new autocompleter editor.completer = new Autocomplete(); // Disable autoInsert + editor.completer.autoSelect = false; editor.completer.autoInsert = false; } editor.completer.showPopup(editor); diff --git a/lib/ace/snippets.js b/lib/ace/snippets.js index f382f7ba..f09bba2c 100644 --- a/lib/ace/snippets.js +++ b/lib/ace/snippets.js @@ -379,7 +379,7 @@ var SnippetManager = function() { scope = scope.split("/").pop(); if (scope === "html" || scope === "php") { // PHP is actually HTML - if (scope === "php") + if (scope === "php" && !editor.session.$mode.inlinePhp) scope = "html"; var c = editor.getCursorPosition() var state = editor.session.getState(c.row); From 23055a2fcf00e4e8c55ec2e11aba41aa6b626780 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Wed, 9 Apr 2014 09:08:14 -0400 Subject: [PATCH 041/158] add dockerfile mode --- lib/ace/mode/css.js | 1 - lib/ace/mode/dockerfile.js | 50 +++++++++++++++++++ lib/ace/mode/dockerfile_highlight_rules.js | 56 ++++++++++++++++++++++ lib/ace/mode/sh.js | 1 - 4 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 lib/ace/mode/dockerfile.js create mode 100644 lib/ace/mode/dockerfile_highlight_rules.js diff --git a/lib/ace/mode/css.js b/lib/ace/mode/css.js index 6ef2dfdd..c74bd654 100644 --- a/lib/ace/mode/css.js +++ b/lib/ace/mode/css.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var WorkerClient = require("../worker/worker_client").WorkerClient; diff --git a/lib/ace/mode/dockerfile.js b/lib/ace/mode/dockerfile.js new file mode 100644 index 00000000..5a19d89b --- /dev/null +++ b/lib/ace/mode/dockerfile.js @@ -0,0 +1,50 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +define(function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var ShMode = require("./sh").Mode; +var Dockerfile = require("./sh_highlight_rules").Dockerfile; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = Dockerfile; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, ShMode); + +(function() { + this.$id = "ace/mode/dockerfile"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); diff --git a/lib/ace/mode/dockerfile_highlight_rules.js b/lib/ace/mode/dockerfile_highlight_rules.js new file mode 100644 index 00000000..7860aaee --- /dev/null +++ b/lib/ace/mode/dockerfile_highlight_rules.js @@ -0,0 +1,56 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +define(function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; + +var SvgHighlightRules = function() { + ShHighlightRules.call(this); + + var startRules = this.$rules.start; + for (var i = 0; i < startRules.length; i++) { + if (startRules[i].token == "variable.language") { + startRules.splice(i, 0, { + token: "keyword", + regexp: "(?:FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD)", + caseInsensitive: true + }); + break; + } + } +}; + +oop.inherits(SvgHighlightRules, ShHighlightRules); + +exports.SvgHighlightRules = SvgHighlightRules; +}); diff --git a/lib/ace/mode/sh.js b/lib/ace/mode/sh.js index 7b20109d..b7837ae2 100644 --- a/lib/ace/mode/sh.js +++ b/lib/ace/mode/sh.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; var Range = require("../range").Range; var CStyleFoldMode = require("./folding/cstyle").FoldMode; From ce6c0aa84b5dfb6944cc81a0148b42266d3dfd7c Mon Sep 17 00:00:00 2001 From: Paul Huck Date: Wed, 9 Apr 2014 09:46:53 -0700 Subject: [PATCH 042/158] fix for anchor & insertRight behavior Do not move the anchor down when it is at column 0 and lines are inserted at that --- lib/ace/anchor.js | 5 ++++- lib/ace/anchor_test.js | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/lib/ace/anchor.js b/lib/ace/anchor.js index 0f2e9571..4e330ef6 100644 --- a/lib/ace/anchor.js +++ b/lib/ace/anchor.js @@ -131,7 +131,10 @@ var Anchor = exports.Anchor = function(doc, row, column) { row += end.row - start.row; } } else if (delta.action === "insertLines") { - if (start.row <= row) { + if (start.row === row && column === 0 && this.$insertRight) { + // do nothing + } + else if (start.row <= row) { row += end.row - start.row; } } else if (delta.action === "removeText") { diff --git a/lib/ace/anchor_test.js b/lib/ace/anchor_test.js index 2d7fcb63..b5c62941 100644 --- a/lib/ace/anchor_test.js +++ b/lib/ace/anchor_test.js @@ -57,6 +57,15 @@ module.exports = { doc.insert({row: 1, column: 1}, "123"); assert.position(anchor.getPosition(), 1, 7); }, + + "test insert text at anchor should not move anchor when insertRight is true": function() { + var doc = new Document("juhu\nkinners"); + var anchor = new Anchor(doc, 1, 4); + anchor.$insertRight = true; + + doc.insert({row: 1, column: 4}, "123"); + assert.position(anchor.getPosition(), 1, 4); + }, "test insert lines before cursor should move anchor row": function() { var doc = new Document("juhu\nkinners"); @@ -65,6 +74,32 @@ module.exports = { doc.insertLines(1, ["123", "456"]); assert.position(anchor.getPosition(), 3, 4); }, + + "test insert lines at anchor position should move anchor down": function() { + var doc = new Document("juhu\nkinners"); + var anchor = new Anchor(doc, 1, 0); + + doc.insertLines(1, ["line"]); + assert.position(anchor.getPosition(), 2, 0); + }, + + "test insert lines at anchor position should not move anchor down when insertRight is true and column is 0": function() { + var doc = new Document("juhu\nkinners"); + var anchor = new Anchor(doc, 1, 0); + anchor.$insertRight = true; + + doc.insertLines(1, ["line"]); + assert.position(anchor.getPosition(), 1, 0); + }, + + "test insert lines at anchor row should move anchor down when column > 0": function() { + var doc = new Document("juhu\nkinners"); + var anchor = new Anchor(doc, 1, 2); + anchor.$insertRight = true; + + doc.insertLines(1, ["line"]); + assert.position(anchor.getPosition(), 2, 2); + }, "test insert new line before cursor should move anchor column": function() { var doc = new Document("juhu\nkinners"); From 91e6abf0995a82de54ac2e23cc18a25bd230b798 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 10 Apr 2014 13:38:06 +0400 Subject: [PATCH 043/158] fix #1890 Second cursor after double clicking in IE8 --- lib/ace/virtual_renderer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js index 6f6ab177..d55d6085 100644 --- a/lib/ace/virtual_renderer.js +++ b/lib/ace/virtual_renderer.js @@ -34,6 +34,7 @@ define(function(require, exports, module) { var oop = require("./lib/oop"); var dom = require("./lib/dom"); var config = require("./config"); +var useragent = require("./lib/useragent"); var GutterLayer = require("./layer/gutter").Gutter; var MarkerLayer = require("./layer/marker").Marker; var TextLayer = require("./layer/text").Text; @@ -71,7 +72,7 @@ var VirtualRenderer = function(container, theme) { // dom.importCssString(editorCss, "ace_editor", container.ownerDocument); // in IE <= 9 the native cursor always shines through - this.$keepTextAreaAtCursor = true; + this.$keepTextAreaAtCursor = !useragent.isOldIE; dom.addCssClass(this.container, "ace_editor"); From 65003e259a47d808dd2c395f4075f3a53517da04 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 10 Apr 2014 13:43:20 +0400 Subject: [PATCH 044/158] do not highlight tag same as '123' + +'123' + "], ["storage.type","var"], + ["text"," "], + ["string","\""], ["meta.tag.punctuation.end-tag-open.xml",""], ["text.xml","'123'"] +],[ + "start", + ["meta.tag.punctuation.end-tag-open.xml",""] ],[ ["string.attribute-value.xml0","tag_stuff"], ["meta.tag.punctuation.tag-open.xml","<"], diff --git a/lib/ace/mode/_test/tokens_ini.json b/lib/ace/mode/_test/tokens_ini.json new file mode 100644 index 00000000..11d28017 --- /dev/null +++ b/lib/ace/mode/_test/tokens_ini.json @@ -0,0 +1,23 @@ +[[ + "start", + ["punctuation.definition.entity.ini","["], + ["constant.section.group-title.ini",".ShellClassInfo"], + ["punctuation.definition.entity.ini","]"] +],[ + "start", + ["keyword.other.definition.ini","IconResource"], + ["punctuation.separator.key-value.ini","="], + ["text","..\\logo.png"] +],[ + "start", + ["punctuation.definition.entity.ini","["], + ["constant.section.group-title.ini","ViewState"], + ["punctuation.definition.entity.ini","]"] +],[ + "start", + ["keyword.other.definition.ini","FolderType"], + ["punctuation.separator.key-value.ini","="], + ["text","Generic"] +],[ + "start" +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_matlab.json b/lib/ace/mode/_test/tokens_matlab.json new file mode 100644 index 00000000..9909eadd --- /dev/null +++ b/lib/ace/mode/_test/tokens_matlab.json @@ -0,0 +1,4 @@ +[[ + "start", + ["identifier","TODO"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_mysql.json b/lib/ace/mode/_test/tokens_mysql.json new file mode 100644 index 00000000..9909eadd --- /dev/null +++ b/lib/ace/mode/_test/tokens_mysql.json @@ -0,0 +1,4 @@ +[[ + "start", + ["identifier","TODO"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_pgsql.json b/lib/ace/mode/_test/tokens_pgsql.json index ded4bb86..fef23fd2 100644 --- a/lib/ace/mode/_test/tokens_pgsql.json +++ b/lib/ace/mode/_test/tokens_pgsql.json @@ -297,10 +297,10 @@ ["comment.doc","* Dollar quotes starting at the end of the line are colored as SQL unless"] ],[ "doc-start", - ["comment.doc","* a special language tag is used. Pearl and Python are currently implemented"] + ["comment.doc","* a special language tag is used. Dollar quote syntax coloring is implemented"] ],[ "doc-start", - ["comment.doc","* but lots of others are possible."] + ["comment.doc","* for Perl, Python, JavaScript, and Json."] ],[ "start", ["comment.doc","*/"] @@ -662,6 +662,160 @@ ["statementEnd",";"] ],[ "start" +],[ + "start", + ["comment","-- pl/v8 (javascript)"] +],[ + "javascript-start", + ["keyword.statementBegin","CREATE"], + ["text"," "], + ["keyword","FUNCTION"], + ["text"," "], + ["identifier","plv8_test"], + ["paren.lparen","("], + ["identifier","keys"], + ["text"," "], + ["keyword","text"], + ["text","[], "], + ["identifier","vals"], + ["text"," "], + ["keyword","text"], + ["text","[]"], + ["paren.rparen",")"], + ["text"," "], + ["keyword","RETURNS"], + ["text"," "], + ["keyword","text"], + ["text"," "], + ["keyword","AS"], + ["text"," "], + ["string","$javascript$"] +],[ + "javascript-start", + ["storage.type","var"], + ["text"," "], + ["identifier","o"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","{"], + ["paren.rparen","}"], + ["punctuation.operator",";"] +],[ + "javascript-start", + ["keyword","for"], + ["paren.lparen","("], + ["storage.type","var"], + ["text"," "], + ["identifier","i"], + ["keyword.operator","="], + ["constant.numeric","0"], + ["punctuation.operator",";"], + ["text"," "], + ["identifier","i"], + ["keyword.operator","<"], + ["identifier","keys"], + ["punctuation.operator","."], + ["support.constant","length"], + ["punctuation.operator",";"], + ["text"," "], + ["identifier","i"], + ["keyword.operator","++"], + ["paren.rparen",")"], + ["paren.lparen","{"] +],[ + "javascript-start", + ["text"," "], + ["identifier","o"], + ["paren.lparen","["], + ["identifier","keys"], + ["paren.lparen","["], + ["identifier","i"], + ["paren.rparen","]]"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","vals"], + ["paren.lparen","["], + ["identifier","i"], + ["paren.rparen","]"], + ["punctuation.operator",";"] +],[ + "javascript-no_regex", + ["paren.rparen","}"] +],[ + "javascript-start", + ["keyword","return"], + ["text"," "], + ["variable.language","JSON"], + ["punctuation.operator","."], + ["identifier","stringify"], + ["paren.lparen","("], + ["identifier","o"], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start", + ["string","$javascript$"], + ["text"," "], + ["keyword","LANGUAGE"], + ["text"," "], + ["identifier","plv8"], + ["text"," "], + ["keyword","IMMUTABLE"], + ["text"," "], + ["keyword","STRICT"], + ["statementEnd",";"] +],[ + "start" +],[ + "start", + ["comment","-- json"] +],[ + "json-start", + ["keyword.statementBegin","select"], + ["text"," "], + ["keyword.operator","*"], + ["text"," "], + ["keyword","from"], + ["text"," "], + ["support.function","json_object_keys"], + ["paren.lparen","("], + ["string","$json$"] +],[ + "json-start", + ["paren.lparen","{"] +],[ + "json-start", + ["text"," "], + ["variable","\"f1\""], + ["text",": "], + ["constant.numeric","5"], + ["text",","] +],[ + "json-start", + ["text"," "], + ["variable","\"f2\""], + ["text",": "], + ["string","\"test\""], + ["text",","] +],[ + "json-start", + ["text"," "], + ["variable","\"f3\""], + ["text",": "], + ["paren.lparen","{"], + ["paren.rparen","}"] +],[ + "json-start", + ["paren.rparen","}"] +],[ + "start", + ["string","$json$"], + ["paren.rparen",")"], + ["statementEnd",";"] +],[ + "start" ],[ "start" ],[ diff --git a/lib/ace/mode/_test/tokens_smarty.json b/lib/ace/mode/_test/tokens_smarty.json new file mode 100644 index 00000000..0f56985d --- /dev/null +++ b/lib/ace/mode/_test/tokens_smarty.json @@ -0,0 +1,98 @@ +[[ + "start", + ["punctuation.section.embedded.begin.smarty","{"], + ["keyword.control.smarty","foreach"], + ["source.smarty"," "], + ["punctuation.definition.variable.smarty","$"], + ["variable.other.smarty","foo"], + ["source.smarty"," as "], + ["punctuation.definition.variable.smarty","$"], + ["variable.other.smarty","bar"], + ["punctuation.section.embedded.end.smarty","}"] +],[ + "start", + ["text.xml"," "], + ["meta.tag.punctuation.tag-open.xml","<"], + ["meta.tag.anchor.tag-name.xml","a"], + ["text.tag-whitespace.xml"," "], + ["entity.other.attribute-name.xml","href"], + ["keyword.operator.attribute-equals.xml","="], + ["string.attribute-value.xml","\""], + ["punctuation.section.embedded.begin.smarty","{"], + ["punctuation.definition.variable.smarty","$"], + ["variable.other.smarty","bar"], + ["source.smarty",".zig"], + ["punctuation.section.embedded.end.smarty","}"], + ["string.attribute-value.xml","\""], + ["meta.tag.punctuation.tag-close.xml",">"], + ["punctuation.section.embedded.begin.smarty","{"], + ["punctuation.definition.variable.smarty","$"], + ["variable.other.smarty","bar"], + ["source.smarty",".zag"], + ["punctuation.section.embedded.end.smarty","}"], + ["meta.tag.punctuation.end-tag-open.xml",""] +],[ + "start", + ["text.xml"," "], + ["meta.tag.punctuation.tag-open.xml","<"], + ["meta.tag.anchor.tag-name.xml","a"], + ["text.tag-whitespace.xml"," "], + ["entity.other.attribute-name.xml","href"], + ["keyword.operator.attribute-equals.xml","="], + ["string.attribute-value.xml","\""], + ["punctuation.section.embedded.begin.smarty","{"], + ["punctuation.definition.variable.smarty","$"], + ["variable.other.smarty","bar"], + ["source.smarty",".zig2"], + ["punctuation.section.embedded.end.smarty","}"], + ["string.attribute-value.xml","\""], + ["meta.tag.punctuation.tag-close.xml",">"], + ["punctuation.section.embedded.begin.smarty","{"], + ["punctuation.definition.variable.smarty","$"], + ["variable.other.smarty","bar"], + ["source.smarty",".zag2"], + ["punctuation.section.embedded.end.smarty","}"], + ["meta.tag.punctuation.end-tag-open.xml",""] +],[ + "start", + ["text.xml"," "], + ["meta.tag.punctuation.tag-open.xml","<"], + ["meta.tag.anchor.tag-name.xml","a"], + ["text.tag-whitespace.xml"," "], + ["entity.other.attribute-name.xml","href"], + ["keyword.operator.attribute-equals.xml","="], + ["string.attribute-value.xml","\""], + ["punctuation.section.embedded.begin.smarty","{"], + ["punctuation.definition.variable.smarty","$"], + ["variable.other.smarty","bar"], + ["source.smarty",".zig3"], + ["punctuation.section.embedded.end.smarty","}"], + ["string.attribute-value.xml","\""], + ["meta.tag.punctuation.tag-close.xml",">"], + ["punctuation.section.embedded.begin.smarty","{"], + ["punctuation.definition.variable.smarty","$"], + ["variable.other.smarty","bar"], + ["source.smarty",".zag3"], + ["punctuation.section.embedded.end.smarty","}"], + ["meta.tag.punctuation.end-tag-open.xml",""] +],[ + "start", + ["punctuation.section.embedded.begin.smarty","{"], + ["keyword.control.smarty","foreachelse"], + ["punctuation.section.embedded.end.smarty","}"] +],[ + "start", + ["text.xml"," There were no rows found."] +],[ + "start", + ["punctuation.section.embedded.begin.smarty","{"], + ["source.smarty","/"], + ["keyword.control.smarty","foreach"], + ["punctuation.section.embedded.end.smarty","}"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_vbscript.json b/lib/ace/mode/_test/tokens_vbscript.json index 6a2346d3..a49f976d 100644 --- a/lib/ace/mode/_test/tokens_vbscript.json +++ b/lib/ace/mode/_test/tokens_vbscript.json @@ -5,18 +5,12 @@ ["text"," "], ["punctuation.definition.string.begin.asp","\""], ["string.quoted.double.asp","C:\\Wikipedia - VBScript - Example - Hello World.txt\""] -],[ - "start" ],[ "start", ["text","MakeHelloWorldFile myfilename"] -],[ - "start" ],[ "state_4", ["meta.leading-space"," "] -],[ - "state_4" ],[ "start", ["storage.type.function.asp","Sub"], @@ -26,14 +20,10 @@ ["punctuation.definition.parameters.asp","("], ["variable.parameter.function.asp","FileName"], ["punctuation.definition.parameters.asp",")"] -],[ - "start" ],[ "start", ["punctuation.definition.comment.asp","'"], ["comment.line.apostrophe.asp","Create a new file in C: drive or overwrite existing file"] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], @@ -47,8 +37,6 @@ ["punctuation.definition.string.begin.asp","\""], ["string.quoted.double.asp","Scripting.FileSystemObject\""], ["text",")"] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], @@ -59,8 +47,6 @@ ["text","(FileName) "], ["keyword.control.asp","Then"], ["text"," "] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], @@ -81,8 +67,6 @@ ["punctuation.definition.string.begin.asp","\""], ["string.quoted.double.asp"," exists ... OK to overwrite?\""], ["text",", vbOKCancel)"] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], @@ -90,8 +74,6 @@ ["meta.odd-tab.spaces"," "], ["punctuation.definition.comment.asp","'"], ["comment.line.apostrophe.asp","If button selected is not OK, then quit now"] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], @@ -99,8 +81,6 @@ ["meta.odd-tab.spaces"," "], ["punctuation.definition.comment.asp","'"], ["comment.line.apostrophe.asp","vbOK is a language constant"] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], @@ -113,15 +93,11 @@ ["keyword.control.asp","Then"], ["text"," "], ["keyword.control.asp","Exit Sub"] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], ["meta.leading-space"," "], ["keyword.control.asp","Else"] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], @@ -129,8 +105,6 @@ ["meta.odd-tab.spaces"," "], ["punctuation.definition.comment.asp","'"], ["comment.line.apostrophe.asp","Confirm OK to create"] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], @@ -151,8 +125,6 @@ ["punctuation.definition.string.begin.asp","\""], ["string.quoted.double.asp"," ... OK to create?\""], ["text",", vbOKCancel)"] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], @@ -165,23 +137,17 @@ ["keyword.control.asp","Then"], ["text"," "], ["keyword.control.asp","Exit Sub"] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], ["meta.leading-space"," "], ["keyword.control.asp","End If"] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], ["meta.leading-space"," "], ["punctuation.definition.comment.asp","'"], ["comment.line.apostrophe.asp","Create new file (or replace an existing file)"] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], @@ -190,8 +156,6 @@ ["text"," FileObject "], ["keyword.operator.asp","="], ["text"," FSO.CreateTextFile (FileName)"] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], @@ -204,8 +168,6 @@ ["text"," "], ["support.function.vb.asp","Now"], ["text","()"] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], @@ -213,8 +175,6 @@ ["text","FileObject.WriteLine "], ["punctuation.definition.string.begin.asp","\""], ["string.quoted.double.asp","Hello World\""] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], @@ -222,8 +182,6 @@ ["text","FileObject."], ["entity.name.function.asp","Close"], ["text","()"] -],[ - "start" ],[ "start", ["meta.odd-tab.spaces"," "], @@ -239,8 +197,6 @@ ["text"," "], ["punctuation.definition.string.begin.asp","\""], ["string.quoted.double.asp"," ... updated.\""] -],[ - "start" ],[ "start", ["support.function.asp","End"], diff --git a/lib/ace/snippets/_all_modes.js b/lib/ace/snippets/_all_modes.js new file mode 100644 index 00000000..17086d08 --- /dev/null +++ b/lib/ace/snippets/_all_modes.js @@ -0,0 +1,7 @@ +define(function(require, exports, module) { +"use strict"; + +exports.snippetText = require("../requirejs/text!./_all_modes.snippets"); +exports.scope = "_all_modes"; + +}); diff --git a/lib/ace/snippets/_all_modes.snippets b/lib/ace/snippets/_all_modes.snippets new file mode 100644 index 00000000..e69de29b diff --git a/lib/ace/snippets/all_modes.js b/lib/ace/snippets/all_modes.js new file mode 100644 index 00000000..d0e46233 --- /dev/null +++ b/lib/ace/snippets/all_modes.js @@ -0,0 +1,7 @@ +define(function(require, exports, module) { +"use strict"; + +exports.snippetText = require("../requirejs/text!./all_modes.snippets"); +exports.scope = "all_modes"; + +}); diff --git a/lib/ace/snippets/all_modes.snippets b/lib/ace/snippets/all_modes.snippets new file mode 100644 index 00000000..e69de29b diff --git a/lib/ace/snippets/cirru.js b/lib/ace/snippets/cirru.js new file mode 100644 index 00000000..c0d3416d --- /dev/null +++ b/lib/ace/snippets/cirru.js @@ -0,0 +1,7 @@ +define(function(require, exports, module) { +"use strict"; + +exports.snippetText = require("../requirejs/text!./cirru.snippets"); +exports.scope = "cirru"; + +}); diff --git a/lib/ace/snippets/cirru.snippets b/lib/ace/snippets/cirru.snippets new file mode 100644 index 00000000..e69de29b diff --git a/lib/ace/snippets/gherkin.js b/lib/ace/snippets/gherkin.js new file mode 100644 index 00000000..da0b684d --- /dev/null +++ b/lib/ace/snippets/gherkin.js @@ -0,0 +1,7 @@ +define(function(require, exports, module) { +"use strict"; + +exports.snippetText = require("../requirejs/text!./gherkin.snippets"); +exports.scope = "gherkin"; + +}); diff --git a/lib/ace/snippets/gherkin.snippets b/lib/ace/snippets/gherkin.snippets new file mode 100644 index 00000000..e69de29b diff --git a/lib/ace/snippets/jack.js b/lib/ace/snippets/jack.js new file mode 100644 index 00000000..29b8f9d2 --- /dev/null +++ b/lib/ace/snippets/jack.js @@ -0,0 +1,7 @@ +define(function(require, exports, module) { +"use strict"; + +exports.snippetText = require("../requirejs/text!./jack.snippets"); +exports.scope = "jack"; + +}); diff --git a/lib/ace/snippets/jack.snippets b/lib/ace/snippets/jack.snippets new file mode 100644 index 00000000..e69de29b diff --git a/lib/ace/snippets/mel.js b/lib/ace/snippets/mel.js new file mode 100644 index 00000000..090d79b3 --- /dev/null +++ b/lib/ace/snippets/mel.js @@ -0,0 +1,7 @@ +define(function(require, exports, module) { +"use strict"; + +exports.snippetText = require("../requirejs/text!./mel.snippets"); +exports.scope = "mel"; + +}); diff --git a/lib/ace/snippets/mel.snippets b/lib/ace/snippets/mel.snippets new file mode 100644 index 00000000..e69de29b diff --git a/lib/ace/snippets/plain_text.js b/lib/ace/snippets/plain_text.js new file mode 100644 index 00000000..4b4dad55 --- /dev/null +++ b/lib/ace/snippets/plain_text.js @@ -0,0 +1,7 @@ +define(function(require, exports, module) { +"use strict"; + +exports.snippetText = require("../requirejs/text!./plain_text.snippets"); +exports.scope = "plain_text"; + +}); diff --git a/lib/ace/snippets/plain_text.snippets b/lib/ace/snippets/plain_text.snippets new file mode 100644 index 00000000..e69de29b diff --git a/lib/ace/snippets/protobuf.snippets b/lib/ace/snippets/protobuf.snippets new file mode 100644 index 00000000..e69de29b diff --git a/lib/ace/snippets/smarty.js b/lib/ace/snippets/smarty.js new file mode 100644 index 00000000..121d0b7c --- /dev/null +++ b/lib/ace/snippets/smarty.js @@ -0,0 +1,7 @@ +define(function(require, exports, module) { +"use strict"; + +exports.snippetText = require("../requirejs/text!./smarty.snippets"); +exports.scope = "smarty"; + +}); diff --git a/lib/ace/snippets/smarty.snippets b/lib/ace/snippets/smarty.snippets new file mode 100644 index 00000000..e69de29b diff --git a/lib/ace/snippets/space.js b/lib/ace/snippets/space.js new file mode 100644 index 00000000..766d493e --- /dev/null +++ b/lib/ace/snippets/space.js @@ -0,0 +1,7 @@ +define(function(require, exports, module) { +"use strict"; + +exports.snippetText = require("../requirejs/text!./space.snippets"); +exports.scope = "space"; + +}); diff --git a/lib/ace/snippets/space.snippets b/lib/ace/snippets/space.snippets new file mode 100644 index 00000000..e69de29b From fdf832784f6b9000f1ab9be0644520ece1d3d5c8 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 10 Apr 2014 14:33:37 +0400 Subject: [PATCH 046/158] fix #1893 fix highlighting for PHP CJK variable name. --- lib/ace/mode/php/php.js | 14 +++++++------- lib/ace/mode/php_highlight_rules.js | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/ace/mode/php/php.js b/lib/ace/mode/php/php.js index a1abc609..ed23f641 100644 --- a/lib/ace/mode/php/php.js +++ b/lib/ace/mode/php/php.js @@ -629,7 +629,7 @@ PHP.Lexer = function( src, ini ) { }, { value: PHP.Constants.T_VARIABLE, - re: /^\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ + re: /^\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/ }, { value: PHP.Constants.T_WHITESPACE, @@ -648,7 +648,7 @@ PHP.Lexer = function( src, ini ) { return result; } - var match = result.match( /(?:[^\\]|\\.)*[^\\]\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/g ); + var match = result.match( /(?:[^\\]|\\.)*[^\\]\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/g ); if ( match !== null ) { // string has a variable @@ -675,7 +675,7 @@ PHP.Lexer = function( src, ini ) { } - match = result.match(/^\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/); + match = result.match(/^\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/); @@ -689,7 +689,7 @@ PHP.Lexer = function( src, ini ) { result = result.substring( match[ 0 ].length ); - match = result.match(/^(\-\>)\s*([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\s*(\()/); + match = result.match(/^(\-\>)\s*([a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*)\s*(\()/); if ( match !== null ) { @@ -719,7 +719,7 @@ PHP.Lexer = function( src, ini ) { if ( curlyOpen > 0) { re = /^([^\\\$"{}\]\)]|\\.)+/g; } else { - re = /^([^\\\$"{]|\\.|{[^\$]|\$(?=[^a-zA-Z_\x7f-\xff]))+/g;; + re = /^([^\\\$"{]|\\.|{[^\$]|\$(?=[^a-zA-Z_\x7f-\uffff]))+/g;; } while(( match = result.match( re )) !== null ) { @@ -756,7 +756,7 @@ PHP.Lexer = function( src, ini ) { if (len === result.length) { // nothing has been found yet - if ((match = result.match( /^(([^\\]|\\.)*?[^\\]\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)/g )) !== null) { + if ((match = result.match( /^(([^\\]|\\.)*?[^\\]\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*)/g )) !== null) { return; } } @@ -786,7 +786,7 @@ PHP.Lexer = function( src, ini ) { }, { value: PHP.Constants.T_STRING, - re: /^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ + re: /^[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/ }, { value: -1, diff --git a/lib/ace/mode/php_highlight_rules.js b/lib/ace/mode/php_highlight_rules.js index d0419aca..ca591d1b 100644 --- a/lib/ace/mode/php_highlight_rules.js +++ b/lib/ace/mode/php_highlight_rules.js @@ -969,11 +969,11 @@ var PhpLangHighlightRules = function() { else if (value == "debugger") return "invalid.deprecated"; else - if(value.match(/^(\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|self|parent)$/)) + if(value.match(/^(\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*|self|parent)$/)) return "variable"; return "identifier"; }, - regex : "[a-zA-Z_$\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\b" + regex : /[a-zA-Z_$\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/ }, { onMatch : function(value, currentSate, state) { value = value.substr(3); From 3296dd7471c32f365f9c6edf5cdcefce6a8d8364 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 10 Apr 2014 14:46:19 +0400 Subject: [PATCH 047/158] allow keys not handled by vim to be handled by default ace keybinding --- lib/ace/keyboard/vim.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ace/keyboard/vim.js b/lib/ace/keyboard/vim.js index 3ae4842f..0477dca0 100644 --- a/lib/ace/keyboard/vim.js +++ b/lib/ace/keyboard/vim.js @@ -146,6 +146,8 @@ exports.handler = { if (cmds.inputBuffer.idle && startCommands[key]) return startCommands[key]; var isHandled = cmds.inputBuffer.push(editor, key); + if (!isHandled && hashId !== -1) + return; return {command: "null", passEvent: !isHandled}; } // if no modifier || shift: wait for input. else if (key.length == 1 && (hashId === 0 || hashId == 4)) { From 5aba18ea06ff470999b273f28b26ae2b5d49c966 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 10 Apr 2014 15:11:11 +0400 Subject: [PATCH 048/158] fix ie focus issues --- lib/ace/autocomplete.js | 6 +++++- lib/ace/mouse/mouse_handler.js | 12 ++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js index bf021760..8aa8abb3 100644 --- a/lib/ace/autocomplete.js +++ b/lib/ace/autocomplete.js @@ -63,6 +63,7 @@ var Autocomplete = function() { this.insertMatch(); e.stop(); }.bind(this)); + this.popup.focus = this.editor.focus.bind(this.editor); }; this.openPopup = function(editor, prefix, keepPopupPosition) { @@ -122,7 +123,10 @@ var Autocomplete = function() { }; this.blurListener = function() { - if (document.activeElement != this.editor.textInput.getElement()) + // we have to check if activeElement is a child of popup because + // on IE preventDefault doesn't stop scrollbar from being focussed + var el = document.activeElement; + if (el != this.editor.textInput.getElement() && el.parentNode != this.popup.container) this.detach(); }; diff --git a/lib/ace/mouse/mouse_handler.js b/lib/ace/mouse/mouse_handler.js index 55b72389..c7573e94 100644 --- a/lib/ace/mouse/mouse_handler.js +++ b/lib/ace/mouse/mouse_handler.js @@ -45,7 +45,9 @@ var MouseHandler = function(editor) { new DefaultHandlers(this); new DefaultGutterHandler(this); new DragdropHandler(this); - + + var focusEditor = function(e) { editor.focus() }; + var mouseTarget = editor.renderer.getMouseEventTarget(); event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click")); event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this, "mousemove")); @@ -53,6 +55,10 @@ var MouseHandler = function(editor) { if (editor.renderer.scrollBarV) { event.addMultiMouseDownListener(editor.renderer.scrollBarV.inner, [400, 300, 250], this, "onMouseEvent"); event.addMultiMouseDownListener(editor.renderer.scrollBarH.inner, [400, 300, 250], this, "onMouseEvent"); + if (useragent.isIE) { + event.addListener(editor.renderer.scrollBarV.element, "mousedown", focusEditor); + event.addListener(editor.renderer.scrollBarH.element, "mousemove", focusEditor); + } } event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel")); @@ -62,9 +68,7 @@ var MouseHandler = function(editor) { event.addListener(gutterEl, "dblclick", this.onMouseEvent.bind(this, "gutterdblclick")); event.addListener(gutterEl, "mousemove", this.onMouseEvent.bind(this, "guttermousemove")); - event.addListener(mouseTarget, "mousedown", function(e) { - editor.focus(); - }); + event.addListener(mouseTarget, "mousedown", focusEditor); event.addListener(gutterEl, "mousedown", function(e) { editor.focus(); From 96145bcd8ab024a926c2bd16461e26ea80b4f6ec Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 10 Apr 2014 18:17:48 +0400 Subject: [PATCH 049/158] fix vim keys don't work in read-only files --- lib/ace/editor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ace/editor.js b/lib/ace/editor.js index a7765e8c..1e94863a 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -2389,7 +2389,8 @@ config.defineOptions(Editor.prototype, "editor", { }, readOnly: { set: function(readOnly) { - this.textInput.setReadOnly(readOnly); + // disabled to not break vim mode! + // this.textInput.setReadOnly(readOnly); this.$resetCursorStyle(); }, initialValue: false From cff2aeaeb77067a1657180a45fb7763863514e6b Mon Sep 17 00:00:00 2001 From: nightwing Date: Wed, 9 Apr 2014 18:36:26 +0400 Subject: [PATCH 050/158] cleanup --- lib/ace/mode/abap.js | 1 - lib/ace/mode/actionscript.js | 1 - lib/ace/mode/ada.js | 1 - lib/ace/mode/apache_conf.js | 1 - lib/ace/mode/asciidoc.js | 1 - lib/ace/mode/assembly_x86.js | 1 - lib/ace/mode/autohotkey.js | 1 - lib/ace/mode/batchfile.js | 1 - lib/ace/mode/c9search.js | 1 - lib/ace/mode/c_cpp.js | 1 - lib/ace/mode/cirru.js | 1 - lib/ace/mode/clojure.js | 1 - lib/ace/mode/cobol.js | 1 - lib/ace/mode/coffee.js | 1 - lib/ace/mode/coldfusion.js | 1 - lib/ace/mode/csharp.js | 1 - lib/ace/mode/css.js | 1 - lib/ace/mode/curly.js | 1 - lib/ace/mode/d.js | 1 - lib/ace/mode/dart.js | 1 - lib/ace/mode/diff.js | 1 - lib/ace/mode/django.js | 1 - lib/ace/mode/dot.js | 1 - lib/ace/mode/ejs.js | 1 - lib/ace/mode/erlang.js | 1 - lib/ace/mode/forth.js | 1 - lib/ace/mode/ftl.js | 1 - lib/ace/mode/gherkin.js | 1 - lib/ace/mode/glsl.js | 1 - lib/ace/mode/golang.js | 1 - lib/ace/mode/groovy.js | 1 - lib/ace/mode/haml.js | 1 - lib/ace/mode/handlebars.js | 1 - lib/ace/mode/haskell.js | 1 - lib/ace/mode/haxe.js | 1 - lib/ace/mode/html.js | 1 - lib/ace/mode/html_ruby.js | 1 - lib/ace/mode/ini.js | 1 - lib/ace/mode/jack.js | 1 - lib/ace/mode/jade.js | 1 - lib/ace/mode/java.js | 1 - lib/ace/mode/javascript.js | 1 - lib/ace/mode/json.js | 1 - lib/ace/mode/jsp.js | 1 - lib/ace/mode/jsx.js | 1 - lib/ace/mode/julia.js | 1 - lib/ace/mode/latex.js | 1 - lib/ace/mode/less.js | 1 - lib/ace/mode/liquid.js | 1 - lib/ace/mode/lisp.js | 1 - lib/ace/mode/logiql.js | 1 - lib/ace/mode/logiql_test.js | 1 - lib/ace/mode/lsl.js | 1 - lib/ace/mode/lua.js | 1 - lib/ace/mode/luapage.js | 1 - lib/ace/mode/lucene.js | 3 +-- lib/ace/mode/makefile.js | 1 - lib/ace/mode/markdown.js | 1 - lib/ace/mode/matlab.js | 1 - lib/ace/mode/mel.js | 1 - lib/ace/mode/mushcode.js | 1 - lib/ace/mode/mysql.js | 1 - lib/ace/mode/nix.js | 1 - lib/ace/mode/objectivec.js | 1 - lib/ace/mode/ocaml.js | 1 - lib/ace/mode/pascal.js | 1 - lib/ace/mode/perl.js | 1 - lib/ace/mode/pgsql.js | 1 - lib/ace/mode/php.js | 1 - lib/ace/mode/plain_text.js | 1 - lib/ace/mode/powershell.js | 1 - lib/ace/mode/prolog.js | 1 - lib/ace/mode/properties.js | 1 - lib/ace/mode/protobuf.js | 6 +----- lib/ace/mode/python.js | 1 - lib/ace/mode/r.js | 1 - lib/ace/mode/rdoc.js | 1 - lib/ace/mode/rhtml.js | 1 - lib/ace/mode/ruby.js | 1 - lib/ace/mode/ruby_test.js | 1 - lib/ace/mode/rust.js | 1 - lib/ace/mode/sass.js | 1 - lib/ace/mode/scad.js | 1 - lib/ace/mode/scala.js | 1 - lib/ace/mode/scheme.js | 1 - lib/ace/mode/scss.js | 1 - lib/ace/mode/sh.js | 1 - lib/ace/mode/sjs.js | 6 +----- lib/ace/mode/smarty.js | 1 - lib/ace/mode/snippets.js | 1 - lib/ace/mode/soy_template.js | 1 - lib/ace/mode/space.js | 5 ++--- lib/ace/mode/sql.js | 1 - lib/ace/mode/stylus.js | 1 - lib/ace/mode/svg.js | 1 - lib/ace/mode/tcl.js | 1 - lib/ace/mode/tex.js | 1 - lib/ace/mode/textile.js | 1 - lib/ace/mode/toml.js | 1 - lib/ace/mode/typescript.js | 1 - lib/ace/mode/vbscript.js | 1 - lib/ace/mode/velocity.js | 1 - lib/ace/mode/verilog.js | 1 - lib/ace/mode/vhdl.js | 1 - lib/ace/mode/xml.js | 1 - lib/ace/mode/yaml.js | 1 - 106 files changed, 5 insertions(+), 117 deletions(-) diff --git a/lib/ace/mode/abap.js b/lib/ace/mode/abap.js index 020837a2..c9d5a991 100644 --- a/lib/ace/mode/abap.js +++ b/lib/ace/mode/abap.js @@ -31,7 +31,6 @@ define(function(require, exports, module) { "use strict"; -var Tokenizer = require("../tokenizer").Tokenizer; var Rules = require("./abap_highlight_rules").AbapHighlightRules; var FoldMode = require("./folding/coffee").FoldMode; var Range = require("../range").Range; diff --git a/lib/ace/mode/actionscript.js b/lib/ace/mode/actionscript.js index 081fa284..93297e42 100644 --- a/lib/ace/mode/actionscript.js +++ b/lib/ace/mode/actionscript.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var ActionScriptHighlightRules = require("./actionscript_highlight_rules").ActionScriptHighlightRules; // TODO: pick appropriate fold mode var FoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/ada.js b/lib/ace/mode/ada.js index a50d5f61..dc1dfa14 100644 --- a/lib/ace/mode/ada.js +++ b/lib/ace/mode/ada.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var AdaHighlightRules = require("./ada_highlight_rules").AdaHighlightRules; var Range = require("../range").Range; diff --git a/lib/ace/mode/apache_conf.js b/lib/ace/mode/apache_conf.js index 29437ef0..2379b44b 100644 --- a/lib/ace/mode/apache_conf.js +++ b/lib/ace/mode/apache_conf.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var ApacheConfHighlightRules = require("./apache_conf_highlight_rules").ApacheConfHighlightRules; // TODO: pick appropriate fold mode var FoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/asciidoc.js b/lib/ace/mode/asciidoc.js index 45027c8b..894d9763 100644 --- a/lib/ace/mode/asciidoc.js +++ b/lib/ace/mode/asciidoc.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var AsciidocHighlightRules = require("./asciidoc_highlight_rules").AsciidocHighlightRules; var AsciidocFoldMode = require("./folding/asciidoc").FoldMode; diff --git a/lib/ace/mode/assembly_x86.js b/lib/ace/mode/assembly_x86.js index e6055183..d6343e80 100644 --- a/lib/ace/mode/assembly_x86.js +++ b/lib/ace/mode/assembly_x86.js @@ -38,7 +38,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var AssemblyX86HighlightRules = require("./assembly_x86_highlight_rules").AssemblyX86HighlightRules; var FoldMode = require("./folding/coffee").FoldMode; diff --git a/lib/ace/mode/autohotkey.js b/lib/ace/mode/autohotkey.js index 4402469e..21d3c802 100644 --- a/lib/ace/mode/autohotkey.js +++ b/lib/ace/mode/autohotkey.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var AutoHotKeyHighlightRules = require("./autohotkey_highlight_rules").AutoHotKeyHighlightRules; // TODO: pick appropriate fold mode var FoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/batchfile.js b/lib/ace/mode/batchfile.js index 72d157e8..e080464c 100644 --- a/lib/ace/mode/batchfile.js +++ b/lib/ace/mode/batchfile.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var BatchFileHighlightRules = require("./batchfile_highlight_rules").BatchFileHighlightRules; var FoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/c9search.js b/lib/ace/mode/c9search.js index 10c3ade2..3286456a 100644 --- a/lib/ace/mode/c9search.js +++ b/lib/ace/mode/c9search.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var C9SearchHighlightRules = require("./c9search_highlight_rules").C9SearchHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var C9StyleFoldMode = require("./folding/c9search").FoldMode; diff --git a/lib/ace/mode/c_cpp.js b/lib/ace/mode/c_cpp.js index faf4731d..a2dc133f 100644 --- a/lib/ace/mode/c_cpp.js +++ b/lib/ace/mode/c_cpp.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; diff --git a/lib/ace/mode/cirru.js b/lib/ace/mode/cirru.js index fa83bbf0..5f1c4d9e 100644 --- a/lib/ace/mode/cirru.js +++ b/lib/ace/mode/cirru.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var CirruHighlightRules = require("./cirru_highlight_rules").CirruHighlightRules; var CoffeeFoldMode = require("./folding/coffee").FoldMode; diff --git a/lib/ace/mode/clojure.js b/lib/ace/mode/clojure.js index 4fadb5ec..4cb86110 100644 --- a/lib/ace/mode/clojure.js +++ b/lib/ace/mode/clojure.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var ClojureHighlightRules = require("./clojure_highlight_rules").ClojureHighlightRules; var MatchingParensOutdent = require("./matching_parens_outdent").MatchingParensOutdent; var Range = require("../range").Range; diff --git a/lib/ace/mode/cobol.js b/lib/ace/mode/cobol.js index 1502993a..91713bd0 100644 --- a/lib/ace/mode/cobol.js +++ b/lib/ace/mode/cobol.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var CobolHighlightRules = require("./cobol_highlight_rules").CobolHighlightRules; var Range = require("../range").Range; diff --git a/lib/ace/mode/coffee.js b/lib/ace/mode/coffee.js index de331204..98e862b8 100644 --- a/lib/ace/mode/coffee.js +++ b/lib/ace/mode/coffee.js @@ -31,7 +31,6 @@ define(function(require, exports, module) { "use strict"; -var Tokenizer = require("../tokenizer").Tokenizer; var Rules = require("./coffee_highlight_rules").CoffeeHighlightRules; var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent; var FoldMode = require("./folding/coffee").FoldMode; diff --git a/lib/ace/mode/coldfusion.js b/lib/ace/mode/coldfusion.js index bc8656a4..0b4ea449 100644 --- a/lib/ace/mode/coldfusion.js +++ b/lib/ace/mode/coldfusion.js @@ -34,7 +34,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var lang = require("../lib/lang"); var HtmlMode = require("./html").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var ColdfusionHighlightRules = require("./coldfusion_highlight_rules").ColdfusionHighlightRules; var voidElements = "cfabort|cfapplication|cfargument|cfassociate|cfbreak|cfcache|cfcollection|cfcookie|cfdbinfo|cfdirectory|cfdump|cfelse|cfelseif|cferror|cfexchangecalendar|cfexchangeconnection|cfexchangecontact|cfexchangefilter|cfexchangetask|cfexit|cffeed|cffile|cfflush|cfftp|cfheader|cfhtmlhead|cfhttpparam|cfimage|cfimport|cfinclude|cfindex|cfinsert|cfinvokeargument|cflocation|cflog|cfmailparam|cfNTauthenticate|cfobject|cfobjectcache|cfparam|cfpdfformparam|cfprint|cfprocparam|cfprocresult|cfproperty|cfqueryparam|cfregistry|cfreportparam|cfrethrow|cfreturn|cfschedule|cfsearch|cfset|cfsetting|cfthrow|cfzipparam)".split("|"); diff --git a/lib/ace/mode/csharp.js b/lib/ace/mode/csharp.js index 4b0709ef..a3b2964f 100644 --- a/lib/ace/mode/csharp.js +++ b/lib/ace/mode/csharp.js @@ -3,7 +3,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var CSharpHighlightRules = require("./csharp_highlight_rules").CSharpHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; diff --git a/lib/ace/mode/css.js b/lib/ace/mode/css.js index 6ef2dfdd..c74bd654 100644 --- a/lib/ace/mode/css.js +++ b/lib/ace/mode/css.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var WorkerClient = require("../worker/worker_client").WorkerClient; diff --git a/lib/ace/mode/curly.js b/lib/ace/mode/curly.js index 60246dad..f7c42af9 100644 --- a/lib/ace/mode/curly.js +++ b/lib/ace/mode/curly.js @@ -40,7 +40,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); // defines the parent mode var HtmlMode = require("./html").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var HtmlFoldMode = require("./folding/html").FoldMode; diff --git a/lib/ace/mode/d.js b/lib/ace/mode/d.js index 7c1551d9..7c3a53c1 100644 --- a/lib/ace/mode/d.js +++ b/lib/ace/mode/d.js @@ -37,7 +37,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var DHighlightRules = require("./d_highlight_rules").DHighlightRules; var FoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/dart.js b/lib/ace/mode/dart.js index 0df4ca99..ba9fff18 100644 --- a/lib/ace/mode/dart.js +++ b/lib/ace/mode/dart.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var CMode = require("./c_cpp").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var DartHighlightRules = require("./dart_highlight_rules").DartHighlightRules; var CStyleFoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/diff.js b/lib/ace/mode/diff.js index 18cb0dbd..1ef2d399 100644 --- a/lib/ace/mode/diff.js +++ b/lib/ace/mode/diff.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var HighlightRules = require("./diff_highlight_rules").DiffHighlightRules; var FoldMode = require("./folding/diff").FoldMode; diff --git a/lib/ace/mode/django.js b/lib/ace/mode/django.js index 6f0c5abe..362d30e3 100644 --- a/lib/ace/mode/django.js +++ b/lib/ace/mode/django.js @@ -32,7 +32,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var HtmlMode = require("./html").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; diff --git a/lib/ace/mode/dot.js b/lib/ace/mode/dot.js index 67fd0a79..53ea6be8 100644 --- a/lib/ace/mode/dot.js +++ b/lib/ace/mode/dot.js @@ -3,7 +3,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var DotHighlightRules = require("./dot_highlight_rules").DotHighlightRules; var DotFoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/ejs.js b/lib/ace/mode/ejs.js index 34ee8701..e3fc686f 100644 --- a/lib/ace/mode/ejs.js +++ b/lib/ace/mode/ejs.js @@ -84,7 +84,6 @@ exports.EjsHighlightRules = EjsHighlightRules; var oop = require("../lib/oop"); -var Tokenizer = require("../tokenizer").Tokenizer; var HtmlMode = require("./html").Mode; var JavaScriptMode = require("./javascript").Mode; var CssMode = require("./css").Mode; diff --git a/lib/ace/mode/erlang.js b/lib/ace/mode/erlang.js index b9203cd3..3d4f9641 100644 --- a/lib/ace/mode/erlang.js +++ b/lib/ace/mode/erlang.js @@ -37,7 +37,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var ErlangHighlightRules = require("./erlang_highlight_rules").ErlangHighlightRules; // TODO: pick appropriate fold mode var FoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/forth.js b/lib/ace/mode/forth.js index 53b5b491..31e8d512 100644 --- a/lib/ace/mode/forth.js +++ b/lib/ace/mode/forth.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var ForthHighlightRules = require("./forth_highlight_rules").ForthHighlightRules; // TODO: pick appropriate fold mode var FoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/ftl.js b/lib/ace/mode/ftl.js index c326423a..b818b87e 100644 --- a/lib/ace/mode/ftl.js +++ b/lib/ace/mode/ftl.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var FtlHighlightRules = require("./ftl_highlight_rules").FtlHighlightRules; var Mode = function() { diff --git a/lib/ace/mode/gherkin.js b/lib/ace/mode/gherkin.js index 557ce9fc..98d9b0a3 100644 --- a/lib/ace/mode/gherkin.js +++ b/lib/ace/mode/gherkin.js @@ -32,7 +32,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var GherkinHighlightRules = require("./gherkin_highlight_rules").GherkinHighlightRules; var Mode = function() { diff --git a/lib/ace/mode/glsl.js b/lib/ace/mode/glsl.js index d15f94ab..dab63106 100644 --- a/lib/ace/mode/glsl.js +++ b/lib/ace/mode/glsl.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var CMode = require("./c_cpp").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var glslHighlightRules = require("./glsl_highlight_rules").glslHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; diff --git a/lib/ace/mode/golang.js b/lib/ace/mode/golang.js index 9b2c646d..a13fbb24 100644 --- a/lib/ace/mode/golang.js +++ b/lib/ace/mode/golang.js @@ -2,7 +2,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var GolangHighlightRules = require("./golang_highlight_rules").GolangHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; diff --git a/lib/ace/mode/groovy.js b/lib/ace/mode/groovy.js index b2becde8..107998bf 100644 --- a/lib/ace/mode/groovy.js +++ b/lib/ace/mode/groovy.js @@ -3,7 +3,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var JavaScriptMode = require("./javascript").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var GroovyHighlightRules = require("./groovy_highlight_rules").GroovyHighlightRules; var Mode = function() { diff --git a/lib/ace/mode/haml.js b/lib/ace/mode/haml.js index 7625b038..f6a59e23 100644 --- a/lib/ace/mode/haml.js +++ b/lib/ace/mode/haml.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var HamlHighlightRules = require("./haml_highlight_rules").HamlHighlightRules; var FoldMode = require("./folding/coffee").FoldMode; diff --git a/lib/ace/mode/handlebars.js b/lib/ace/mode/handlebars.js index 2346d5e2..38af7e5c 100644 --- a/lib/ace/mode/handlebars.js +++ b/lib/ace/mode/handlebars.js @@ -5,7 +5,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var HtmlMode = require("./html").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var HandlebarsHighlightRules = require("./handlebars_highlight_rules").HandlebarsHighlightRules; var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour; var HtmlFoldMode = require("./folding/html").FoldMode; diff --git a/lib/ace/mode/haskell.js b/lib/ace/mode/haskell.js index f817c777..05cc94a0 100644 --- a/lib/ace/mode/haskell.js +++ b/lib/ace/mode/haskell.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var HaskellHighlightRules = require("./haskell_highlight_rules").HaskellHighlightRules; // TODO: pick appropriate fold mode var FoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/haxe.js b/lib/ace/mode/haxe.js index aefdcd1b..e2ac5a26 100644 --- a/lib/ace/mode/haxe.js +++ b/lib/ace/mode/haxe.js @@ -3,7 +3,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var HaxeHighlightRules = require("./haxe_highlight_rules").HaxeHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; diff --git a/lib/ace/mode/html.js b/lib/ace/mode/html.js index ab202a70..5f5719d4 100644 --- a/lib/ace/mode/html.js +++ b/lib/ace/mode/html.js @@ -36,7 +36,6 @@ var lang = require("../lib/lang"); var TextMode = require("./text").Mode; var JavaScriptMode = require("./javascript").Mode; var CssMode = require("./css").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; var HtmlFoldMode = require("./folding/html").FoldMode; diff --git a/lib/ace/mode/html_ruby.js b/lib/ace/mode/html_ruby.js index dc25293a..ab9aa083 100644 --- a/lib/ace/mode/html_ruby.js +++ b/lib/ace/mode/html_ruby.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); -var Tokenizer = require("../tokenizer").Tokenizer; var HtmlRubyHighlightRules = require("./html_ruby_highlight_rules").HtmlRubyHighlightRules; var HtmlMode = require("./html").Mode; var JavaScriptMode = require("./javascript").Mode; diff --git a/lib/ace/mode/ini.js b/lib/ace/mode/ini.js index 6a353dc7..196405f5 100644 --- a/lib/ace/mode/ini.js +++ b/lib/ace/mode/ini.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var IniHighlightRules = require("./ini_highlight_rules").IniHighlightRules; // TODO: pick appropriate fold mode var FoldMode = require("./folding/ini").FoldMode; diff --git a/lib/ace/mode/jack.js b/lib/ace/mode/jack.js index ea0fd72a..73267c4b 100644 --- a/lib/ace/mode/jack.js +++ b/lib/ace/mode/jack.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var HighlightRules = require("./jack_highlight_rules").JackHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; diff --git a/lib/ace/mode/jade.js b/lib/ace/mode/jade.js index 3ce53d14..d298dac4 100644 --- a/lib/ace/mode/jade.js +++ b/lib/ace/mode/jade.js @@ -38,7 +38,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var JadeHighlightRules = require("./jade_highlight_rules").JadeHighlightRules; var FoldMode = require("./folding/coffee").FoldMode; diff --git a/lib/ace/mode/java.js b/lib/ace/mode/java.js index 4034a88a..58df0c96 100644 --- a/lib/ace/mode/java.js +++ b/lib/ace/mode/java.js @@ -3,7 +3,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var JavaScriptMode = require("./javascript").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules; var Mode = function() { diff --git a/lib/ace/mode/javascript.js b/lib/ace/mode/javascript.js index ed2616e8..af62ae76 100644 --- a/lib/ace/mode/javascript.js +++ b/lib/ace/mode/javascript.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; diff --git a/lib/ace/mode/json.js b/lib/ace/mode/json.js index c1a64ec6..24a43d0f 100644 --- a/lib/ace/mode/json.js +++ b/lib/ace/mode/json.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var HighlightRules = require("./json_highlight_rules").JsonHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; diff --git a/lib/ace/mode/jsp.js b/lib/ace/mode/jsp.js index bf560eee..c1cb0254 100644 --- a/lib/ace/mode/jsp.js +++ b/lib/ace/mode/jsp.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var JspHighlightRules = require("./jsp_highlight_rules").JspHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; diff --git a/lib/ace/mode/jsx.js b/lib/ace/mode/jsx.js index 89c91e6e..2406a232 100644 --- a/lib/ace/mode/jsx.js +++ b/lib/ace/mode/jsx.js @@ -3,7 +3,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var JsxHighlightRules = require("./jsx_highlight_rules").JsxHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; diff --git a/lib/ace/mode/julia.js b/lib/ace/mode/julia.js index ebf60504..ddba928f 100644 --- a/lib/ace/mode/julia.js +++ b/lib/ace/mode/julia.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var JuliaHighlightRules = require("./julia_highlight_rules").JuliaHighlightRules; // TODO: pick appropriate fold mode var FoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/latex.js b/lib/ace/mode/latex.js index 743105b3..1f8c07cb 100644 --- a/lib/ace/mode/latex.js +++ b/lib/ace/mode/latex.js @@ -3,7 +3,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var LatexHighlightRules = require("./latex_highlight_rules").LatexHighlightRules; var LatexFoldMode = require("./folding/latex").FoldMode; var Range = require("../range").Range; diff --git a/lib/ace/mode/less.js b/lib/ace/mode/less.js index aaa9ab78..658efb3e 100644 --- a/lib/ace/mode/less.js +++ b/lib/ace/mode/less.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CssBehaviour = require("./behaviour/css").CssBehaviour; diff --git a/lib/ace/mode/liquid.js b/lib/ace/mode/liquid.js index c8383fdb..b16c2194 100644 --- a/lib/ace/mode/liquid.js +++ b/lib/ace/mode/liquid.js @@ -32,7 +32,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var LiquidHighlightRules = require("./liquid_highlight_rules").LiquidHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; diff --git a/lib/ace/mode/lisp.js b/lib/ace/mode/lisp.js index 59f3bf31..59c97939 100644 --- a/lib/ace/mode/lisp.js +++ b/lib/ace/mode/lisp.js @@ -38,7 +38,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var LispHighlightRules = require("./lisp_highlight_rules").LispHighlightRules; var Mode = function() { diff --git a/lib/ace/mode/logiql.js b/lib/ace/mode/logiql.js index b65358d1..be1cb7c1 100644 --- a/lib/ace/mode/logiql.js +++ b/lib/ace/mode/logiql.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var LogiQLHighlightRules = require("./logiql_highlight_rules").LogiQLHighlightRules; var FoldMode = require("./folding/coffee").FoldMode; var TokenIterator = require("../token_iterator").TokenIterator; diff --git a/lib/ace/mode/logiql_test.js b/lib/ace/mode/logiql_test.js index 3e661829..1a6e4c08 100644 --- a/lib/ace/mode/logiql_test.js +++ b/lib/ace/mode/logiql_test.js @@ -36,7 +36,6 @@ define(function(require, exports, module) { "use strict"; var EditSession = require("../edit_session").EditSession; -var Tokenizer = require("../tokenizer").Tokenizer; var LogiQLMode = require("./logiql").Mode; var assert = require("../test/assertions"); diff --git a/lib/ace/mode/lsl.js b/lib/ace/mode/lsl.js index 82fa5223..14a67244 100644 --- a/lib/ace/mode/lsl.js +++ b/lib/ace/mode/lsl.js @@ -31,7 +31,6 @@ define(function(require, exports, module) { "use strict"; -var Tokenizer = require("../tokenizer").Tokenizer; var Rules = require("./lsl_highlight_rules").LSLHighlightRules; var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; diff --git a/lib/ace/mode/lua.js b/lib/ace/mode/lua.js index fa870ffd..a8d1f08b 100644 --- a/lib/ace/mode/lua.js +++ b/lib/ace/mode/lua.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules; var LuaFoldMode = require("./folding/lua").FoldMode; var Range = require("../range").Range; diff --git a/lib/ace/mode/luapage.js b/lib/ace/mode/luapage.js index 19f5d04f..5ea79d14 100644 --- a/lib/ace/mode/luapage.js +++ b/lib/ace/mode/luapage.js @@ -4,7 +4,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var HtmlMode = require("./html").Mode; var LuaMode = require("./lua").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var LuaPageHighlightRules = require("./luapage_highlight_rules").LuaPageHighlightRules; var Mode = function() { diff --git a/lib/ace/mode/lucene.js b/lib/ace/mode/lucene.js index 7c10e611..56743ef9 100644 --- a/lib/ace/mode/lucene.js +++ b/lib/ace/mode/lucene.js @@ -3,11 +3,10 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules; var Mode = function() { - this.$tokenizer = new Tokenizer(new LuceneHighlightRules().getRules()); + this.HighlightRules = LuceneHighlightRules; }; oop.inherits(Mode, TextMode); diff --git a/lib/ace/mode/makefile.js b/lib/ace/mode/makefile.js index 4b95d630..673f8927 100644 --- a/lib/ace/mode/makefile.js +++ b/lib/ace/mode/makefile.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var MakefileHighlightRules = require("./makefile_highlight_rules").MakefileHighlightRules; var FoldMode = require("./folding/coffee").FoldMode; diff --git a/lib/ace/mode/markdown.js b/lib/ace/mode/markdown.js index 934f316a..efabed89 100644 --- a/lib/ace/mode/markdown.js +++ b/lib/ace/mode/markdown.js @@ -36,7 +36,6 @@ var TextMode = require("./text").Mode; var JavaScriptMode = require("./javascript").Mode; var XmlMode = require("./xml").Mode; var HtmlMode = require("./html").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules; var MarkdownFoldMode = require("./folding/markdown").FoldMode; diff --git a/lib/ace/mode/matlab.js b/lib/ace/mode/matlab.js index ca1d3e97..44b20d0d 100644 --- a/lib/ace/mode/matlab.js +++ b/lib/ace/mode/matlab.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var MatlabHighlightRules = require("./matlab_highlight_rules").MatlabHighlightRules; var Range = require("../range").Range; diff --git a/lib/ace/mode/mel.js b/lib/ace/mode/mel.js index d892a1a5..e8922a1c 100644 --- a/lib/ace/mode/mel.js +++ b/lib/ace/mode/mel.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var MELHighlightRules = require("./mel_highlight_rules").MELHighlightRules; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/mushcode.js b/lib/ace/mode/mushcode.js index 4501e6c9..ec145b6e 100644 --- a/lib/ace/mode/mushcode.js +++ b/lib/ace/mode/mushcode.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var MushCodeRules = require("./mushcode_highlight_rules").MushCodeRules; var PythonFoldMode = require("./folding/pythonic").FoldMode; var Range = require("../range").Range; diff --git a/lib/ace/mode/mysql.js b/lib/ace/mode/mysql.js index 567541f5..d0f7c123 100644 --- a/lib/ace/mode/mysql.js +++ b/lib/ace/mode/mysql.js @@ -32,7 +32,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("../mode/text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var MysqlHighlightRules = require("./mysql_highlight_rules").MysqlHighlightRules; var Range = require("../range").Range; diff --git a/lib/ace/mode/nix.js b/lib/ace/mode/nix.js index b7583af6..c8e62a08 100644 --- a/lib/ace/mode/nix.js +++ b/lib/ace/mode/nix.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var CMode = require("./c_cpp").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var NixHighlightRules = require("./nix_highlight_rules").NixHighlightRules; var CStyleFoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/objectivec.js b/lib/ace/mode/objectivec.js index e982c9ae..99fdb410 100644 --- a/lib/ace/mode/objectivec.js +++ b/lib/ace/mode/objectivec.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var ObjectiveCHighlightRules = require("./objectivec_highlight_rules").ObjectiveCHighlightRules; var CStyleFoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/ocaml.js b/lib/ace/mode/ocaml.js index 189f0f60..6313d3fb 100644 --- a/lib/ace/mode/ocaml.js +++ b/lib/ace/mode/ocaml.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var OcamlHighlightRules = require("./ocaml_highlight_rules").OcamlHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; diff --git a/lib/ace/mode/pascal.js b/lib/ace/mode/pascal.js index a40b8156..944088ca 100644 --- a/lib/ace/mode/pascal.js +++ b/lib/ace/mode/pascal.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var PascalHighlightRules = require("./pascal_highlight_rules").PascalHighlightRules; // TODO: pick appropriate fold mode var FoldMode = require("./folding/coffee").FoldMode; diff --git a/lib/ace/mode/perl.js b/lib/ace/mode/perl.js index 7cb54e74..69c4d27e 100644 --- a/lib/ace/mode/perl.js +++ b/lib/ace/mode/perl.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; diff --git a/lib/ace/mode/pgsql.js b/lib/ace/mode/pgsql.js index 36e9531c..d9775837 100755 --- a/lib/ace/mode/pgsql.js +++ b/lib/ace/mode/pgsql.js @@ -32,7 +32,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("../mode/text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var PgsqlHighlightRules = require("./pgsql_highlight_rules").PgsqlHighlightRules; var Range = require("../range").Range; diff --git a/lib/ace/mode/php.js b/lib/ace/mode/php.js index 26ccd99d..beeefda7 100644 --- a/lib/ace/mode/php.js +++ b/lib/ace/mode/php.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules; var PhpLangHighlightRules = require("./php_highlight_rules").PhpLangHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; diff --git a/lib/ace/mode/plain_text.js b/lib/ace/mode/plain_text.js index 8ac3c4c0..850fbd2b 100644 --- a/lib/ace/mode/plain_text.js +++ b/lib/ace/mode/plain_text.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var Behaviour = require("./behaviour").Behaviour; diff --git a/lib/ace/mode/powershell.js b/lib/ace/mode/powershell.js index 3177c19a..11c63298 100644 --- a/lib/ace/mode/powershell.js +++ b/lib/ace/mode/powershell.js @@ -3,7 +3,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var PowershellHighlightRules = require("./powershell_highlight_rules").PowershellHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; diff --git a/lib/ace/mode/prolog.js b/lib/ace/mode/prolog.js index 5a054baa..dc64b7ea 100644 --- a/lib/ace/mode/prolog.js +++ b/lib/ace/mode/prolog.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var PrologHighlightRules = require("./prolog_highlight_rules").PrologHighlightRules; // TODO: pick appropriate fold mode var FoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/properties.js b/lib/ace/mode/properties.js index aeeadfde..558e52e7 100644 --- a/lib/ace/mode/properties.js +++ b/lib/ace/mode/properties.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var PropertiesHighlightRules = require("./properties_highlight_rules").PropertiesHighlightRules; var Mode = function() { diff --git a/lib/ace/mode/protobuf.js b/lib/ace/mode/protobuf.js index 997c4f68..6925f4a9 100644 --- a/lib/ace/mode/protobuf.js +++ b/lib/ace/mode/protobuf.js @@ -42,17 +42,13 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var CMode = require("./c_cpp").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var ProtobufHighlightRules = require("./protobuf_highlight_rules").ProtobufHighlightRules; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { CMode.call(this); - var highlighter = new ProtobufHighlightRules(); this.foldingRules = new CStyleFoldMode(); - - this.$tokenizer = new Tokenizer(highlighter.getRules()); - this.$keywordList = highlighter.$keywordList; + this.HighlightRules = ProtobufHighlightRules; }; oop.inherits(Mode, CMode); diff --git a/lib/ace/mode/python.js b/lib/ace/mode/python.js index fa4ea2b0..c4e6cebe 100644 --- a/lib/ace/mode/python.js +++ b/lib/ace/mode/python.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules; var PythonFoldMode = require("./folding/pythonic").FoldMode; var Range = require("../range").Range; diff --git a/lib/ace/mode/r.js b/lib/ace/mode/r.js index dfb326aa..addedd1a 100644 --- a/lib/ace/mode/r.js +++ b/lib/ace/mode/r.js @@ -41,7 +41,6 @@ define(function(require, exports, module) { var Range = require("../range").Range; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; - var Tokenizer = require("../tokenizer").Tokenizer; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var RHighlightRules = require("./r_highlight_rules").RHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; diff --git a/lib/ace/mode/rdoc.js b/lib/ace/mode/rdoc.js index 13e9ff21..bd99d4ba 100644 --- a/lib/ace/mode/rdoc.js +++ b/lib/ace/mode/rdoc.js @@ -40,7 +40,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var RDocHighlightRules = require("./rdoc_highlight_rules").RDocHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; diff --git a/lib/ace/mode/rhtml.js b/lib/ace/mode/rhtml.js index 878f7699..a70cfb1f 100644 --- a/lib/ace/mode/rhtml.js +++ b/lib/ace/mode/rhtml.js @@ -40,7 +40,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var HtmlMode = require("./html").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var RHtmlHighlightRules = require("./rhtml_highlight_rules").RHtmlHighlightRules; /* Make life easier, don't do these right now diff --git a/lib/ace/mode/ruby.js b/lib/ace/mode/ruby.js index 7777cfaa..27bc6c38 100644 --- a/lib/ace/mode/ruby.js +++ b/lib/ace/mode/ruby.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; diff --git a/lib/ace/mode/ruby_test.js b/lib/ace/mode/ruby_test.js index 25548f02..97efb0ea 100644 --- a/lib/ace/mode/ruby_test.js +++ b/lib/ace/mode/ruby_test.js @@ -36,7 +36,6 @@ define(function(require, exports, module) { "use strict"; var EditSession = require("../edit_session").EditSession; -var Tokenizer = require("../tokenizer").Tokenizer; var Mode = require("./ruby").Mode; var assert = require("../test/assertions"); diff --git a/lib/ace/mode/rust.js b/lib/ace/mode/rust.js index de1bd417..03570e4a 100644 --- a/lib/ace/mode/rust.js +++ b/lib/ace/mode/rust.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var RustHighlightRules = require("./rust_highlight_rules").RustHighlightRules; // TODO: pick appropriate fold mode var FoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/sass.js b/lib/ace/mode/sass.js index 883be140..3025e71e 100644 --- a/lib/ace/mode/sass.js +++ b/lib/ace/mode/sass.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules; var FoldMode = require("./folding/coffee").FoldMode; diff --git a/lib/ace/mode/scad.js b/lib/ace/mode/scad.js index 0a79f63e..78c77f10 100644 --- a/lib/ace/mode/scad.js +++ b/lib/ace/mode/scad.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var scadHighlightRules = require("./scad_highlight_rules").scadHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; diff --git a/lib/ace/mode/scala.js b/lib/ace/mode/scala.js index 7788c1a9..be7ccc5d 100644 --- a/lib/ace/mode/scala.js +++ b/lib/ace/mode/scala.js @@ -3,7 +3,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var JavaScriptMode = require("./javascript").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var ScalaHighlightRules = require("./scala_highlight_rules").ScalaHighlightRules; var Mode = function() { diff --git a/lib/ace/mode/scheme.js b/lib/ace/mode/scheme.js index 96814452..aa462a10 100644 --- a/lib/ace/mode/scheme.js +++ b/lib/ace/mode/scheme.js @@ -38,7 +38,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var SchemeHighlightRules = require("./scheme_highlight_rules").SchemeHighlightRules; var Mode = function() { diff --git a/lib/ace/mode/scss.js b/lib/ace/mode/scss.js index 70c8ed69..f672d257 100644 --- a/lib/ace/mode/scss.js +++ b/lib/ace/mode/scss.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CssBehaviour = require("./behaviour/css").CssBehaviour; diff --git a/lib/ace/mode/sh.js b/lib/ace/mode/sh.js index 7b20109d..b7837ae2 100644 --- a/lib/ace/mode/sh.js +++ b/lib/ace/mode/sh.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; var Range = require("../range").Range; var CStyleFoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/sjs.js b/lib/ace/mode/sjs.js index e73b62fc..6c440f76 100644 --- a/lib/ace/mode/sjs.js +++ b/lib/ace/mode/sjs.js @@ -32,19 +32,15 @@ define(function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var JSMode = require("./javascript").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var SJSHighlightRules = require("./sjs_highlight_rules").SJSHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { - var highlighter = new SJSHighlightRules(); - - this.$tokenizer = new Tokenizer(highlighter.getRules()); + this.HighlightRules = SJSHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); - this.$keywordList = highlighter.$keywordList; this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, JSMode); diff --git a/lib/ace/mode/smarty.js b/lib/ace/mode/smarty.js index c4e445c2..b88f1f68 100644 --- a/lib/ace/mode/smarty.js +++ b/lib/ace/mode/smarty.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var HtmlMode = require("./html").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var SmartyHighlightRules = require("./smarty_highlight_rules").SmartyHighlightRules; var Mode = function() { diff --git a/lib/ace/mode/snippets.js b/lib/ace/mode/snippets.js index faf2000a..638e9393 100644 --- a/lib/ace/mode/snippets.js +++ b/lib/ace/mode/snippets.js @@ -3,7 +3,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var SnippetHighlightRules = function() { diff --git a/lib/ace/mode/soy_template.js b/lib/ace/mode/soy_template.js index 95290e9d..fec98402 100644 --- a/lib/ace/mode/soy_template.js +++ b/lib/ace/mode/soy_template.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var HtmlMode = require("./html").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var SoyTemplateHighlightRules = require("./soy_template_highlight_rules").SoyTemplateHighlightRules; var Mode = function() { diff --git a/lib/ace/mode/space.js b/lib/ace/mode/space.js index c82b3ccd..6117d053 100644 --- a/lib/ace/mode/space.js +++ b/lib/ace/mode/space.js @@ -1,16 +1,15 @@ + define(function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); // defines the parent mode var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var FoldMode = require("./folding/coffee").FoldMode; // defines the language specific highlighters and folding rules var SpaceHighlightRules = require("./space_highlight_rules").SpaceHighlightRules; var Mode = function() { // set everything up - var highlighter = new SpaceHighlightRules(); - this.$tokenizer = new Tokenizer(highlighter.getRules()); + this.HighlightRules = SpaceHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); diff --git a/lib/ace/mode/sql.js b/lib/ace/mode/sql.js index 100f539b..e1bf0f14 100644 --- a/lib/ace/mode/sql.js +++ b/lib/ace/mode/sql.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var SqlHighlightRules = require("./sql_highlight_rules").SqlHighlightRules; var Range = require("../range").Range; diff --git a/lib/ace/mode/stylus.js b/lib/ace/mode/stylus.js index 677a095c..ebeb1fca 100644 --- a/lib/ace/mode/stylus.js +++ b/lib/ace/mode/stylus.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var StylusHighlightRules = require("./stylus_highlight_rules").StylusHighlightRules; var FoldMode = require("./folding/coffee").FoldMode; diff --git a/lib/ace/mode/svg.js b/lib/ace/mode/svg.js index aede9c0a..8c608e82 100644 --- a/lib/ace/mode/svg.js +++ b/lib/ace/mode/svg.js @@ -34,7 +34,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var XmlMode = require("./xml").Mode; var JavaScriptMode = require("./javascript").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var SvgHighlightRules = require("./svg_highlight_rules").SvgHighlightRules; var MixedFoldMode = require("./folding/mixed").FoldMode; var XmlFoldMode = require("./folding/xml").FoldMode; diff --git a/lib/ace/mode/tcl.js b/lib/ace/mode/tcl.js index b1618a4a..09f09a7b 100644 --- a/lib/ace/mode/tcl.js +++ b/lib/ace/mode/tcl.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var TclHighlightRules = require("./tcl_highlight_rules").TclHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; diff --git a/lib/ace/mode/tex.js b/lib/ace/mode/tex.js index eebb1b4d..d36721db 100644 --- a/lib/ace/mode/tex.js +++ b/lib/ace/mode/tex.js @@ -40,7 +40,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; diff --git a/lib/ace/mode/textile.js b/lib/ace/mode/textile.js index 94f769df..d5525969 100644 --- a/lib/ace/mode/textile.js +++ b/lib/ace/mode/textile.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var TextileHighlightRules = require("./textile_highlight_rules").TextileHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; diff --git a/lib/ace/mode/toml.js b/lib/ace/mode/toml.js index 704c5929..9f84323c 100644 --- a/lib/ace/mode/toml.js +++ b/lib/ace/mode/toml.js @@ -38,7 +38,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var TomlHighlightRules = require("./toml_highlight_rules").TomlHighlightRules; var FoldMode = require("./folding/ini").FoldMode; diff --git a/lib/ace/mode/typescript.js b/lib/ace/mode/typescript.js index 54bd71b2..06020f6d 100644 --- a/lib/ace/mode/typescript.js +++ b/lib/ace/mode/typescript.js @@ -37,7 +37,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var jsMode = require("./javascript").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var TypeScriptHighlightRules = require("./typescript_highlight_rules").TypeScriptHighlightRules; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; diff --git a/lib/ace/mode/vbscript.js b/lib/ace/mode/vbscript.js index 89b16613..ed0ec61d 100644 --- a/lib/ace/mode/vbscript.js +++ b/lib/ace/mode/vbscript.js @@ -42,7 +42,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var VBScriptHighlightRules = require("./vbscript_highlight_rules").VBScriptHighlightRules; var Mode = function() { diff --git a/lib/ace/mode/velocity.js b/lib/ace/mode/velocity.js index ca572a21..94cbd388 100644 --- a/lib/ace/mode/velocity.js +++ b/lib/ace/mode/velocity.js @@ -38,7 +38,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var HtmlMode = require("./html").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var VelocityHighlightRules = require("./velocity_highlight_rules").VelocityHighlightRules; var FoldMode = require("./folding/velocity").FoldMode; diff --git a/lib/ace/mode/verilog.js b/lib/ace/mode/verilog.js index bc08331d..1c7f3ef5 100644 --- a/lib/ace/mode/verilog.js +++ b/lib/ace/mode/verilog.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var VerilogHighlightRules = require("./verilog_highlight_rules").VerilogHighlightRules; var Range = require("../range").Range; diff --git a/lib/ace/mode/vhdl.js b/lib/ace/mode/vhdl.js index 7c2c25ef..263e7fcd 100644 --- a/lib/ace/mode/vhdl.js +++ b/lib/ace/mode/vhdl.js @@ -32,7 +32,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var VHDLHighlightRules = require("./vhdl_highlight_rules").VHDLHighlightRules; var Range = require("../range").Range; diff --git a/lib/ace/mode/xml.js b/lib/ace/mode/xml.js index fe714d7c..9b1d2f0a 100644 --- a/lib/ace/mode/xml.js +++ b/lib/ace/mode/xml.js @@ -34,7 +34,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; var XmlFoldMode = require("./folding/xml").FoldMode; diff --git a/lib/ace/mode/yaml.js b/lib/ace/mode/yaml.js index f81971fe..8f7782c3 100644 --- a/lib/ace/mode/yaml.js +++ b/lib/ace/mode/yaml.js @@ -33,7 +33,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var YamlHighlightRules = require("./yaml_highlight_rules").YamlHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var FoldMode = require("./folding/coffee").FoldMode; From 187b90dd84ba71e6811c5d5c2346ec9c1556acf5 Mon Sep 17 00:00:00 2001 From: Alexander Lourier Date: Sat, 15 Mar 2014 10:51:36 +0100 Subject: [PATCH 051/158] Handle language-switching keystroke gracefully --- lib/ace/lib/keys.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ace/lib/keys.js b/lib/ace/lib/keys.js index 70e4ccb2..c4cc3f31 100644 --- a/lib/ace/lib/keys.js +++ b/lib/ace/lib/keys.js @@ -148,7 +148,11 @@ var Keys = (function() { oop.mixin(exports, Keys); exports.keyCodeToString = function(keyCode) { - return (Keys[keyCode] || String.fromCharCode(keyCode)).toLowerCase(); + // Language-switching keystroke in Chrome/Linux emits keyCode 0. + var keyString = Keys[keyCode]; + if (typeof keyString != "string") + keyString = String.fromCharCode(keyCode); + return keyString.toLowerCase(); }; }); From 1f33265ba793249e91179a4f84215e0df1486e5c Mon Sep 17 00:00:00 2001 From: nightwing Date: Fri, 11 Apr 2014 20:46:39 +0400 Subject: [PATCH 052/158] fix typo in indenter regexp --- lib/ace/mode/coffee.js | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/lib/ace/mode/coffee.js b/lib/ace/mode/coffee.js index 8e286351..67e53111 100644 --- a/lib/ace/mode/coffee.js +++ b/lib/ace/mode/coffee.js @@ -50,7 +50,28 @@ oop.inherits(Mode, TextMode); (function() { - var indenter = /(?:[({[=:]|[-=]>|\b(?:else|switch|(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/; + /*: + [({[=:] # Opening parentheses or brackets + |[-=]> # OR single or double arrow + |\b(?: # OR one of these words: + else # else + |try # OR try + |(?:swi|ca)tch # OR catch, optionally followed by: + (?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)? # a variable + |finally # OR finally + ))\s*$ # all as the last thing on a line (allowing trailing space) + | # ---- OR ---- : + ^\s* # a line starting with optional space + (else\b\s*)? # followed by an optional "else" + (?: # followed by one of the following: + if # if + |for # OR for + |while # OR while + |loop # OR loop + )\b # (as a word) + (?!.*\bthen\b) # ... but NOT followed by "then" on the line + */ + var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/; var commentLine = /^(\s*)#/; var hereComment = /^\s*###(?!#)/; var indentation = /^\s*/; From 4d868a046ad9ad6352465b216d44fcb4df17df79 Mon Sep 17 00:00:00 2001 From: nightwing Date: Fri, 11 Apr 2014 22:24:59 +0400 Subject: [PATCH 053/158] use correct indent size when expanding snippet at the start of the line --- lib/ace/snippets.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ace/snippets.js b/lib/ace/snippets.js index f09bba2c..6cc855b1 100644 --- a/lib/ace/snippets.js +++ b/lib/ace/snippets.js @@ -265,8 +265,11 @@ var SnippetManager = function() { this.insertSnippet = function(editor, snippetText) { var cursor = editor.getCursorPosition(); var line = editor.session.getLine(cursor.row); - var indentString = line.match(/^\s*/)[0]; var tabString = editor.session.getTabString(); + var indentString = line.match(/^\s*/)[0]; + + if (cursor.column < indentString.length) + indentString = indentString.slice(0, cursor.column); var tokens = this.tokenizeTmSnippet(snippetText); tokens = this.resolveVariables(tokens, editor); From 4d24573946b6a86f6e4247f2a5cf3002008211d5 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Sun, 13 Apr 2014 16:07:34 +0000 Subject: [PATCH 054/158] use wildcard protocol for external resources. Otherwise we can't serve it over https --- demo/emmet.html | 2 +- demo/kitchen-sink/demo.js | 2 +- kitchen-sink.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/demo/emmet.html b/demo/emmet.html index 57f13f67..d5a7c0e0 100644 --- a/demo/emmet.html +++ b/demo/emmet.html @@ -27,7 +27,7 @@ - + + From 7767efe0f61f736432d8fbc8fa42a520c9432a60 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Sun, 13 Apr 2014 16:08:45 +0000 Subject: [PATCH 055/158] fix dockerfile mode --- demo/kitchen-sink/docs/Dockerfile | 53 ++++++++++++++++++++++ lib/ace/ext/modelist.js | 1 + lib/ace/mode/dockerfile.js | 4 +- lib/ace/mode/dockerfile_highlight_rules.js | 11 +++-- lib/ace/mode/svg.js | 1 - lib/ace/mode/text_highlight_rules.js | 6 +-- 6 files changed, 65 insertions(+), 11 deletions(-) create mode 100644 demo/kitchen-sink/docs/Dockerfile diff --git a/demo/kitchen-sink/docs/Dockerfile b/demo/kitchen-sink/docs/Dockerfile new file mode 100644 index 00000000..70270cbf --- /dev/null +++ b/demo/kitchen-sink/docs/Dockerfile @@ -0,0 +1,53 @@ +# +# example Dockerfile for http://docs.docker.io/en/latest/examples/postgresql_service/ +# + +FROM ubuntu +MAINTAINER SvenDowideit@docker.com + +# Add the PostgreSQL PGP key to verify their Debian packages. +# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 + +# Add PostgreSQL's repository. It contains the most recent stable release +# of PostgreSQL, ``9.3``. +RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list + +# Update the Ubuntu and PostgreSQL repository indexes +RUN apt-get update + +# Install ``python-software-properties``, ``software-properties-common`` and PostgreSQL 9.3 +# There are some warnings (in red) that show up during the build. You can hide +# them by prefixing each apt-get statement with DEBIAN_FRONTEND=noninteractive +RUN apt-get -y -q install python-software-properties software-properties-common +RUN apt-get -y -q install postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 + +# Note: The official Debian and Ubuntu images automatically ``apt-get clean`` +# after each ``apt-get`` + +# Run the rest of the commands as the ``postgres`` user created by the ``postgres-9.3`` package when it was ``apt-get installed`` +USER postgres + +# Create a PostgreSQL role named ``docker`` with ``docker`` as the password and +# then create a database `docker` owned by the ``docker`` role. +# Note: here we use ``&&\`` to run commands one after the other - the ``\`` +# allows the RUN command to span multiple lines. +RUN /etc/init.d/postgresql start &&\ + psql --command "CREATE USER docker WITH SUPERUSER PASSWORD 'docker';" &&\ + createdb -O docker docker + +# Adjust PostgreSQL configuration so that remote connections to the +# database are possible. +RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf + +# And add ``listen_addresses`` to ``/etc/postgresql/9.3/main/postgresql.conf`` +RUN echo "listen_addresses='*'" >> /etc/postgresql/9.3/main/postgresql.conf + +# Expose the PostgreSQL port +EXPOSE 5432 + +# Add VOLUMEs to allow backup of config, logs and databases +VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"] + +# Set the default command to run when starting the container +CMD ["/usr/lib/postgresql/9.3/bin/postgres", "-D", "/var/lib/postgresql/9.3/main", "-c", "config_file=/etc/postgresql/9.3/main/postgresql.conf"] \ No newline at end of file diff --git a/lib/ace/ext/modelist.js b/lib/ace/ext/modelist.js index 2f67bee6..66fe3de8 100644 --- a/lib/ace/ext/modelist.js +++ b/lib/ace/ext/modelist.js @@ -63,6 +63,7 @@ var supportedModes = { D: ["d|di"], Dart: ["dart"], Diff: ["diff|patch"], + Dockerfile: ["^Dockerfile"], Dot: ["dot"], Erlang: ["erl|hrl"], EJS: ["ejs"], diff --git a/lib/ace/mode/dockerfile.js b/lib/ace/mode/dockerfile.js index 5a19d89b..732cb33a 100644 --- a/lib/ace/mode/dockerfile.js +++ b/lib/ace/mode/dockerfile.js @@ -33,11 +33,11 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var ShMode = require("./sh").Mode; -var Dockerfile = require("./sh_highlight_rules").Dockerfile; +var DockerfileHighlightRules = require("./dockerfile_highlight_rules").DockerfileHighlightRules; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { - this.HighlightRules = Dockerfile; + this.HighlightRules = DockerfileHighlightRules; this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, ShMode); diff --git a/lib/ace/mode/dockerfile_highlight_rules.js b/lib/ace/mode/dockerfile_highlight_rules.js index 7860aaee..ab431eb3 100644 --- a/lib/ace/mode/dockerfile_highlight_rules.js +++ b/lib/ace/mode/dockerfile_highlight_rules.js @@ -34,23 +34,24 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; -var SvgHighlightRules = function() { +var DockerfileHighlightRules = function() { ShHighlightRules.call(this); var startRules = this.$rules.start; for (var i = 0; i < startRules.length; i++) { if (startRules[i].token == "variable.language") { startRules.splice(i, 0, { - token: "keyword", - regexp: "(?:FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD)", + token: "variable.language", + regex: "(?:^(?:FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD)\\b)", caseInsensitive: true }); break; } } + }; -oop.inherits(SvgHighlightRules, ShHighlightRules); +oop.inherits(DockerfileHighlightRules, ShHighlightRules); -exports.SvgHighlightRules = SvgHighlightRules; +exports.DockerfileHighlightRules = DockerfileHighlightRules; }); diff --git a/lib/ace/mode/svg.js b/lib/ace/mode/svg.js index aede9c0a..8c608e82 100644 --- a/lib/ace/mode/svg.js +++ b/lib/ace/mode/svg.js @@ -34,7 +34,6 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var XmlMode = require("./xml").Mode; var JavaScriptMode = require("./javascript").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; var SvgHighlightRules = require("./svg_highlight_rules").SvgHighlightRules; var MixedFoldMode = require("./folding/mixed").FoldMode; var XmlFoldMode = require("./folding/xml").FoldMode; diff --git a/lib/ace/mode/text_highlight_rules.js b/lib/ace/mode/text_highlight_rules.js index c4fcf588..07285661 100644 --- a/lib/ace/mode/text_highlight_rules.js +++ b/lib/ace/mode/text_highlight_rules.js @@ -189,7 +189,7 @@ var TextHighlightRules = function() { // skip included rules since they are already processed //i += args.length - 3; i--; - toInsert = null + toInsert = null; } if (rule.keywordMap) { @@ -199,7 +199,7 @@ var TextHighlightRules = function() { delete rule.defaultToken; } } - }; + } Object.keys(rules).forEach(processState, this); }; @@ -223,7 +223,7 @@ var TextHighlightRules = function() { return ignoreCase ? function(value) {return keywords[value.toLowerCase()] || defaultToken } : function(value) {return keywords[value] || defaultToken }; - } + }; this.getKeywords = function() { return this.$keywords; From 1bd5b56793316eba55b5f5ae95a09f2e2cb5eb4c Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Sun, 13 Apr 2014 16:16:30 +0000 Subject: [PATCH 056/158] minor fix --- lib/ace/mode/dockerfile.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ace/mode/dockerfile.js b/lib/ace/mode/dockerfile.js index 732cb33a..26d546b4 100644 --- a/lib/ace/mode/dockerfile.js +++ b/lib/ace/mode/dockerfile.js @@ -37,6 +37,8 @@ var DockerfileHighlightRules = require("./dockerfile_highlight_rules").Dockerfil var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { + ShMode.call(this); + this.HighlightRules = DockerfileHighlightRules; this.foldingRules = new CStyleFoldMode(); }; From 75bac806b0a8a79f316442a38a690cbcfe917f3e Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Sun, 13 Apr 2014 16:20:02 +0000 Subject: [PATCH 057/158] always use https --- demo/emmet.html | 2 +- demo/kitchen-sink/demo.js | 2 +- kitchen-sink.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/demo/emmet.html b/demo/emmet.html index d5a7c0e0..1a1ed6ba 100644 --- a/demo/emmet.html +++ b/demo/emmet.html @@ -27,7 +27,7 @@ - + + From 0a9dc16f22c3d1c5f3f3131486512a5ab590620f Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 13 Apr 2014 20:40:59 +0400 Subject: [PATCH 058/158] revert Makefile.dryice.js broken by 56631344 --- Makefile.dryice.js | 121 ++++++++++++++++++++++++++++----------------- 1 file changed, 76 insertions(+), 45 deletions(-) diff --git a/Makefile.dryice.js b/Makefile.dryice.js index 95397064..f8e1383c 100755 --- a/Makefile.dryice.js +++ b/Makefile.dryice.js @@ -267,7 +267,7 @@ function workers(path) { }).filter(function(x) { return !!x; }); } function modeList() { - return jsFileList("lib/ace/mode", /_highlight_rules|_test|_worker|_outdent|behaviour|completions/) + return jsFileList("lib/ace/mode", /_highlight_rules|_test|_worker|xml_util|_outdent|behaviour|completions/) } function addSuffix(options) { @@ -280,7 +280,7 @@ function addSuffix(options) { } } -function getWriteFilters(options, projectType) { +function getWriteFilters(options, projectType, main) { var filters = [ copy.filter.moduleDefines, removeUseStrict, @@ -293,29 +293,30 @@ function getWriteFilters(options, projectType) { if (options.noconflict) filters.push(namespace(options.ns)); - + + if (options.exportModule && projectType == "main" || projectType == "ext") { + filters.push(exportAce(options.ns, options.exportModule, + options.noconflict ? options.ns : "", projectType == "ext" && main)); + } + if (options.compress) filters.push(copy.filter.uglifyjs); - - // copy.filter.uglifyjs.options.ascii = true; doesn't work with some uglify.js versions + + // copy.filter.uglifyjs.options.ascii_only = true; doesn't work with some uglify.js versions filters.push(function(text) { - var t1 = text.replace(/[\x80-\uffff]/g, function(c) { + var text = text.replace(/[\x00-\x08\x0b\x0c\x0e\x19\x80-\uffff]/g, function(c) { c = c.charCodeAt(0).toString(16); + if (c.length == 1) + return "\\x0" + c; if (c.length == 2) return "\\x" + c; if (c.length == 3) - c = "0" + c; + return "\\u0" + c; return "\\u" + c; }); - return text; + return text; }); - - if (options.exportModule && projectType == "main") { - if (options.noconflict) - filters.push(exportAce(options.ns, options.exportModule, options.ns)); - else - filters.push(exportAce(options.ns, options.exportModule)); - } + return filters; } @@ -390,7 +391,7 @@ var buildAce = function(options) { project: cloneProject(project), require: [ 'ace/ext/' + ext ] }], - filter: getWriteFilters(options, "ext"), + filter: getWriteFilters(options, "ext", 'ace/ext/' + ext), dest: targetDir + "/ext-" + ext + ".js" }); }); @@ -416,7 +417,7 @@ var buildAce = function(options) { project.assumeAllFilesLoaded(); delete project.ignoredModules["ace/theme/textmate"]; delete project.ignoredModules["ace/requirejs/text!ace/theme/textmate.css"]; - + options.themes.forEach(function(theme) { console.log("theme " + theme); copy({ @@ -428,7 +429,7 @@ var buildAce = function(options) { dest: targetDir + "/theme-" + theme.replace("_theme", "") + ".js" }); }); - + // generateThemesModule(options.themes); console.log('# ace key bindings ---------'); @@ -552,15 +553,6 @@ var detectTextModules = function(input, source) { detectTextModules.onRead = true; copy.filter.addDefines = detectTextModules; -function generateThemesModule(themes) { - var themelist = [ - 'define(function(require, exports, module) {', - '\n\nmodule.exports.themes = ' + JSON.stringify(themes, null, ' '), - ';\n\n});' - ].join(''); - fs.writeFileSync(__dirname + '/lib/ace/ext/themelist_utils/themes.js', themelist, 'utf8'); -} - function inlineTextModules(text) { var deps = []; return text.replace(/, *['"]ace\/requirejs\/text!(.*?)['"]| require\(['"](?:ace|[.\/]+)\/requirejs\/text!(.*?)['"]\)/g, function(_, dep, call) { @@ -576,14 +568,38 @@ function inlineTextModules(text) { }); call = textModules[dep]; - // if (deps.length > 1) - // console.log(call.length) if (call) return " " + call; } }); } +var CommonJsProject = copy.createCommonJsProject({roots:[]}).constructor; +CommonJsProject.prototype.getCurrentModules = function() { + function isDep(child, parent) { + if (!modules[parent]) + return false; + var deps = modules[parent].deps; + if (deps[child]) return true; + return Object.keys(deps).some(function(x) { + return isDep(child, x) + }); + } + var depMap = {}, modules = this.currentModules; + return Object.keys(this.currentModules).map(function(moduleName) { + module = modules[moduleName]; + module.id = moduleName; + module.isSpecial = !/define\(\'[^']*',/.test(module.source); + return module; + }).sort(function(a, b) { + if (a.isSpecial) return -1; + if (b.isSpecial) return 1; + if (isDep(a.id, b.id)) return -1; + if (isDep(b.id, a.id)) return 1; + return Object.keys(a.deps).length - Object.keys(b.deps).length || a.id.localeCompare(b.id) + }); +}; + // TODO: replace with project.clone once it is fixed in dryice function cloneProject(project) { var clone = copy.createCommonJsProject({ @@ -604,16 +620,12 @@ function cloneProject(project) { } function copyFileSync(srcFile, destFile) { - var BUF_LENGTH = 64*1024, - buf = new Buffer(BUF_LENGTH), - bytesRead = BUF_LENGTH, - pos = 0, - fdr = null, - fdw = null; - - - fdr = fs.openSync(srcFile, 'r'); - fdw = fs.openSync(destFile, 'w'); + var BUF_LENGTH = 64*1024; + var buf = new Buffer(BUF_LENGTH); + var bytesRead = BUF_LENGTH; + var pos = 0; + var fdr = fs.openSync(srcFile, 'r'); + var fdw = fs.openSync(destFile, 'w'); while (bytesRead === BUF_LENGTH) { bytesRead = fs.readSync(fdr, buf, 0, BUF_LENGTH, pos); @@ -650,23 +662,33 @@ function namespace(ns) { }; } -function exportAce(ns, module, requireBase) { +function exportAce(ns, module, requireBase, extModule) { requireBase = requireBase || "window"; module = module || "ace/ace"; return function(text) { - var template = function() { (function() { REQUIRE_NS.require(["MODULE"], function(a) { - a && a.config.init(); + a && a.config.init(true); if (!window.NS) - window.NS = {}; + window.NS = a; for (var key in a) if (a.hasOwnProperty(key)) NS[key] = a[key]; }); })(); }; - + + if (extModule) { + module = extModule; + template = function() { + (function() { + REQUIRE_NS.require(["MODULE"], function() {}); + })(); + }; + } + + text = text.replace(/function init\(packaged\) {/, "init(true);$&\n"); + return (text + ";" + template .toString() .replace(/MODULE/g, module) @@ -683,12 +705,21 @@ function updateModes() { var source = fs.readFileSync(filepath, "utf8"); if (!/this.\$id\s*=\s*"/.test(source)) source = source.replace(/\n([ \t]*)(\}\).call\(\w*Mode.prototype\))/, '\n$1 this.$id = "";\n$1$2'); - + source = source.replace(/(this.\$id\s*=\s*)"[^"]*"/, '$1"ace/mode/' + m + '"'); fs.writeFileSync(filepath, source, "utf8") }) } +function generateThemesModule(themes) { + var themelist = [ + 'define(function(require, exports, module) {', + '\n\nmodule.exports.themes = ' + JSON.stringify(themes, null, ' '), + ';\n\n});' + ].join(''); + fs.writeFileSync(__dirname + '/lib/ace/ext/themelist_utils/themes.js', themelist, 'utf8'); +} + if (!module.parent) main(process.argv); else From 14721de01f04b6ffa5a3794cfa5bcb9fc3224514 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 13 Apr 2014 20:47:06 +0400 Subject: [PATCH 059/158] add findall command --- lib/ace/commands/multi_select_commands.js | 5 +++++ lib/ace/multi_select.js | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/ace/commands/multi_select_commands.js b/lib/ace/commands/multi_select_commands.js index ff59f045..347eb606 100644 --- a/lib/ace/commands/multi_select_commands.js +++ b/lib/ace/commands/multi_select_commands.js @@ -80,6 +80,11 @@ exports.defaultCommands = [{ name: "alignCursors", exec: function(editor) { editor.alignCursors(); }, bindKey: {win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A"} +}, { + name: "findAll", + exec: function(editor) { editor.findAll(); }, + bindKey: {win: "Ctrl-Alt-K", mac: "Ctrl-Alt-G"}, + readonly: true }]; // commands active only in multiselect mode diff --git a/lib/ace/multi_select.js b/lib/ace/multi_select.js index 0df59244..6b11691e 100644 --- a/lib/ace/multi_select.js +++ b/lib/ace/multi_select.js @@ -578,8 +578,14 @@ var Editor = require("./editor").Editor; this.findAll = function(needle, options, additive) { options = options || {}; options.needle = needle || options.needle; + if (options.needle == undefined) { + var range = this.selection.isEmpty() + ? this.selection.getWordRange() + : this.selection.getRange(); + options.needle = this.session.getTextRange(range); + } this.$search.set(options); - + var ranges = this.$search.findAll(this.session); if (!ranges.length) return 0; From 9e182a1de7605fb9d92c0b4c1b0247a9b0c49183 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 13 Apr 2014 20:48:38 +0400 Subject: [PATCH 060/158] tweak js and sh modes --- lib/ace/mode/javascript_highlight_rules.js | 5 ++++- lib/ace/mode/sh.js | 2 ++ lib/ace/mode/sh_highlight_rules.js | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/ace/mode/javascript_highlight_rules.js b/lib/ace/mode/javascript_highlight_rules.js index 98247565..cd427b06 100644 --- a/lib/ace/mode/javascript_highlight_rules.js +++ b/lib/ace/mode/javascript_highlight_rules.js @@ -176,9 +176,12 @@ var JavaScriptHighlightRules = function() { }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["support.constant"], + regex : /that\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe diff --git a/lib/ace/mode/sh.js b/lib/ace/mode/sh.js index b7837ae2..bdc70fa1 100644 --- a/lib/ace/mode/sh.js +++ b/lib/ace/mode/sh.js @@ -36,10 +36,12 @@ var TextMode = require("./text").Mode; var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; var Range = require("../range").Range; var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var Mode = function() { this.HighlightRules = ShHighlightRules; this.foldingRules = new CStyleFoldMode(); + this.$behaviour = new CstyleBehaviour(); }; oop.inherits(Mode, TextMode); diff --git a/lib/ace/mode/sh_highlight_rules.js b/lib/ace/mode/sh_highlight_rules.js index d9ed5600..73ece2f8 100644 --- a/lib/ace/mode/sh_highlight_rules.js +++ b/lib/ace/mode/sh_highlight_rules.js @@ -69,7 +69,7 @@ var ShHighlightRules = function() { var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; var fileDescriptor = "(?:&" + intPart + ")"; - var variableName = "[a-zA-Z][a-zA-Z0-9_]*"; + var variableName = "[a-zA-Z_][a-zA-Z0-9_]*"; var variable = "(?:(?:\\$" + variableName + ")|(?:" + variableName + "=))"; var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; From d05213cd927d0f6bd15f2415852c6d9c1362bc69 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 13 Apr 2014 20:52:23 +0400 Subject: [PATCH 061/158] fix #1834 vim mode issues --- lib/ace/keyboard/vim/commands.js | 5 ++++- lib/ace/keyboard/vim/maps/motions.js | 7 ++++++- lib/ace/keyboard/vim/maps/operators.js | 1 + lib/ace/lib/keys.js | 9 +++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/ace/keyboard/vim/commands.js b/lib/ace/keyboard/vim/commands.js index e48446f4..1ab154c5 100644 --- a/lib/ace/keyboard/vim/commands.js +++ b/lib/ace/keyboard/vim/commands.js @@ -164,6 +164,7 @@ var actions = exports.actions = { fn: function(editor, range, count, param) { var options = editor.getLastSearchOptions(); options.backwards = false; + options.start = null; editor.selection.moveCursorRight(); editor.selection.clearSelection(); @@ -180,6 +181,7 @@ var actions = exports.actions = { fn: function(editor, range, count, param) { var options = editor.getLastSearchOptions(); options.backwards = true; + options.start = null; editor.findPrevious(options); ensureScrollMargin(editor); @@ -497,7 +499,8 @@ var inputBuffer = exports.inputBuffer = { else if (selectable) { repeat(function() { run(motionObj.sel); - operators[o.ch].fn(editor, editor.getSelectionRange(), o.count, param); + operators[o.ch].fn(editor, editor.getSelectionRange(), + o.count, motionObj.param ? motionObj : param); }, o.count || 1); } this.reset(); diff --git a/lib/ace/keyboard/vim/maps/motions.js b/lib/ace/keyboard/vim/maps/motions.js index 630ba66a..90a7a933 100644 --- a/lib/ace/keyboard/vim/maps/motions.js +++ b/lib/ace/keyboard/vim/maps/motions.js @@ -350,6 +350,10 @@ module.exports = { case "W": editor.selection.selectAWord(); break; + case ")": + case "}": + case "]": + param = editor.session.$brackets[param]; case "(": case "{": case "[": @@ -656,7 +660,8 @@ module.exports = { pos.column = line.length; return pos; } - } + }, + isLine: true }) }; diff --git a/lib/ace/keyboard/vim/maps/operators.js b/lib/ace/keyboard/vim/maps/operators.js index 067562a0..a7479acb 100644 --- a/lib/ace/keyboard/vim/maps/operators.js +++ b/lib/ace/keyboard/vim/maps/operators.js @@ -116,6 +116,7 @@ module.exports = { fn: function(editor, range, count, param) { count = count || 1; switch (param) { + case param.isLine && param: case "y": var pos = editor.getCursorPosition(); editor.selection.selectLine(); diff --git a/lib/ace/lib/keys.js b/lib/ace/lib/keys.js index c4cc3f31..93622c09 100644 --- a/lib/ace/lib/keys.js +++ b/lib/ace/lib/keys.js @@ -133,6 +133,15 @@ var Keys = (function() { // workaround for firefox bug ret[173] = '-'; + + (function() { + var mods = ["cmd", "ctrl", "alt", "shift"]; + for (var i = Math.pow(2, mods.length); i--;) { + ret.KEY_MODS[i] = mods.filter(function(x) { + return i & ret.KEY_MODS[x]; + }).join("-") + "-"; + } + })(); (function() { var mods = ["cmd", "ctrl", "alt", "shift"]; From ee052c06d39105586ff5969b5cce5e5392fb24b9 Mon Sep 17 00:00:00 2001 From: Nicolas Raynaud Date: Tue, 15 Apr 2014 22:13:59 +0200 Subject: [PATCH 062/158] fix documentation for getCursor --- lib/ace/selection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ace/selection.js b/lib/ace/selection.js index 403b1e76..e113d8ad 100644 --- a/lib/ace/selection.js +++ b/lib/ace/selection.js @@ -119,8 +119,8 @@ var Selection = function(session) { }; /** - * Gets the current position of the cursor. - * @returns {Number} + * Returns an object containing the `row` and `column` current position of the cursor. + * @returns {Object} **/ this.getCursor = function() { return this.lead.getPosition(); From 156ebc0a72b7922d9473d60f32e3040d82743a97 Mon Sep 17 00:00:00 2001 From: jimmyboh Date: Thu, 17 Apr 2014 13:09:13 -0400 Subject: [PATCH 063/158] Fixed hotkeys for changing font size (Fixes #1914) Hotkey for `increaseFontSize` does not work, `+` key should actually be `=`. --- demo/kitchen-sink/demo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/kitchen-sink/demo.js b/demo/kitchen-sink/demo.js index 990de1e5..3a9213ba 100644 --- a/demo/kitchen-sink/demo.js +++ b/demo/kitchen-sink/demo.js @@ -184,7 +184,7 @@ env.editor.commands.addCommands([{ } }, { name: "increaseFontSize", - bindKey: "Ctrl-+", + bindKey: "Ctrl-=", exec: function(editor) { var size = parseInt(editor.getFontSize(), 10) || 12; editor.setFontSize(size + 1); From c5689d94cac169f40da1f369e0a0ca5c5af959d2 Mon Sep 17 00:00:00 2001 From: nightwing Date: Fri, 18 Apr 2014 14:19:43 +0400 Subject: [PATCH 064/158] also enable numpad keys for increaseFontSize --- demo/kitchen-sink/demo.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/kitchen-sink/demo.js b/demo/kitchen-sink/demo.js index 3a9213ba..2844c9a8 100644 --- a/demo/kitchen-sink/demo.js +++ b/demo/kitchen-sink/demo.js @@ -184,21 +184,21 @@ env.editor.commands.addCommands([{ } }, { name: "increaseFontSize", - bindKey: "Ctrl-=", + bindKey: "Ctrl-=|Ctrl-+", exec: function(editor) { var size = parseInt(editor.getFontSize(), 10) || 12; editor.setFontSize(size + 1); } }, { name: "decreaseFontSize", - bindKey: "Ctrl+-", + bindKey: "Ctrl+-|Ctrl-_", exec: function(editor) { var size = parseInt(editor.getFontSize(), 10) || 12; editor.setFontSize(Math.max(size - 1 || 1)); } }, { name: "resetFontSize", - bindKey: "Ctrl+0", + bindKey: "Ctrl+0|Ctrl-Numpad0", exec: function(editor) { editor.setFontSize(12); } From 06db67de16634b55f4294a782bac8891b38d780a Mon Sep 17 00:00:00 2001 From: rmsmith Date: Sun, 20 Apr 2014 19:22:03 +0300 Subject: [PATCH 065/158] dart_highlight_rules : add `assert` to `keywordControl` "assert" is a reserved word and a statement in the Dart language (as opposed to a built-in function call) as described in the spec: https://www.dartlang.org/docs/spec/latest/dart-language-specification.html#h.cb5i0axenow6 --- lib/ace/mode/dart_highlight_rules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/mode/dart_highlight_rules.js b/lib/ace/mode/dart_highlight_rules.js index ea49ca70..556150c3 100644 --- a/lib/ace/mode/dart_highlight_rules.js +++ b/lib/ace/mode/dart_highlight_rules.js @@ -12,7 +12,7 @@ var DartHighlightRules = function() { var constantLanguage = "true|false|null"; var variableLanguage = "this|super"; - var keywordControl = "try|catch|finally|throw|break|case|continue|default|do|else|for|if|in|return|switch|while|new"; + var keywordControl = "try|catch|finally|throw|assert|break|case|continue|default|do|else|for|if|in|return|switch|while|new"; var keywordDeclaration = "abstract|class|extends|external|factory|implements|get|native|operator|set|typedef|with"; var storageModifier = "static|final|const"; var storageType = "void|bool|num|int|double|dynamic|var|String"; From 25e70c44303e603d3dfd715805352108b8ff8c3d Mon Sep 17 00:00:00 2001 From: rmsmith Date: Sun, 20 Apr 2014 19:46:28 +0300 Subject: [PATCH 066/158] update `tokens_dart.json` regarding `assert` statement --- lib/ace/mode/_test/tokens_dart.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ace/mode/_test/tokens_dart.json b/lib/ace/mode/_test/tokens_dart.json index 5964791a..37cdc323 100644 --- a/lib/ace/mode/_test/tokens_dart.json +++ b/lib/ace/mode/_test/tokens_dart.json @@ -330,7 +330,7 @@ ["text",";"] ],[ "start", - ["identifier","assert"], + ["keyword.control.dart","assert"], ["text","("], ["identifier","unicorn"], ["text"," "], @@ -357,7 +357,7 @@ ["text",";"] ],[ "start", - ["identifier","assert"], + ["keyword.control.dart","assert"], ["text","("], ["identifier","iMeantToDoThis"], ["text","."], From 5b697f68d15c7439167726c4dabf0fc47b7473ab Mon Sep 17 00:00:00 2001 From: cptroot Date: Sun, 20 Apr 2014 17:39:48 -0700 Subject: [PATCH 067/158] Fix not recognizing `\\` as an escape sequence. --- lib/ace/mode/d_highlight_rules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/mode/d_highlight_rules.js b/lib/ace/mode/d_highlight_rules.js index 843bcec6..3a5dae21 100644 --- a/lib/ace/mode/d_highlight_rules.js +++ b/lib/ace/mode/d_highlight_rules.js @@ -66,7 +66,7 @@ var DHighlightRules = function() { var stringEscapesSeq = { token: "constant.language.escape", - regex: "\\\\(?:(?:x[0-9A-F]{2})|(?:[0-7]{1,3})|(?:['\"\\?0abfnrtv])|" + + regex: "\\\\(?:(?:x[0-9A-F]{2})|(?:[0-7]{1,3})|(?:['\"\\?0abfnrtv\\\\])|" + "(?:u[0-9a-fA-F]{4})|(?:U[0-9a-fA-F]{8}))" }; From 2566dd74a53a5e17fcc8335b7777e4e99c3ae7fd Mon Sep 17 00:00:00 2001 From: brn Date: Tue, 22 Apr 2014 10:56:52 +0900 Subject: [PATCH 068/158] fix style.font property. --- lib/ace/layer/font_metrics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/layer/font_metrics.js b/lib/ace/layer/font_metrics.js index a65e100d..89985117 100644 --- a/lib/ace/layer/font_metrics.js +++ b/lib/ace/layer/font_metrics.js @@ -85,7 +85,7 @@ var FontMetrics = exports.FontMetrics = function(parentEl, interval) { style.visibility = "hidden"; style.position = "fixed"; style.whiteSpace = "pre"; - style.font = "inherit"; + style['font-family'] = style['font-style'] = style['font-weight'] = 'inherit'; style.overflow = isRoot ? "hidden" : "visible"; }; From 31c2978ca71a02cbf58bbdaa5556c2e46ab4a81b Mon Sep 17 00:00:00 2001 From: brn Date: Tue, 22 Apr 2014 11:32:33 +0900 Subject: [PATCH 069/158] fix IE7 style.font property access. add ie check. --- lib/ace/layer/font_metrics.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/ace/layer/font_metrics.js b/lib/ace/layer/font_metrics.js index 89985117..8fe02a33 100644 --- a/lib/ace/layer/font_metrics.js +++ b/lib/ace/layer/font_metrics.js @@ -33,6 +33,7 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var dom = require("../lib/dom"); var lang = require("../lib/lang"); +var useragent = require("../lib/useragent"); var EventEmitter = require("../lib/event_emitter").EventEmitter; var CHAR_COUNT = 0; @@ -85,7 +86,12 @@ var FontMetrics = exports.FontMetrics = function(parentEl, interval) { style.visibility = "hidden"; style.position = "fixed"; style.whiteSpace = "pre"; - style['font-family'] = style['font-style'] = style['font-weight'] = 'inherit'; + + if (useragent.isIE < 8) { + style['font-family'] = 'inherit'; + } else { + style.font = 'inherit'; + } style.overflow = isRoot ? "hidden" : "visible"; }; From 9391e0b9bb2a4f9d4978ff83ed02b3a35e3248a7 Mon Sep 17 00:00:00 2001 From: Homa Wong Date: Sun, 20 Apr 2014 15:14:09 -0700 Subject: [PATCH 070/158] Fix live auto completion. Didn't set completers when enabling it. --- lib/ace/ext/language_tools.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js index 1933b4ff..83cfe2be 100644 --- a/lib/ace/ext/language_tools.js +++ b/lib/ace/ext/language_tools.js @@ -175,6 +175,7 @@ require("../config").defineOptions(Editor.prototype, "editor", { set: function(val) { if (val) { // On each change automatically trigger the autocomplete + this.completers = completers; this.commands.on('afterExec', doLiveAutocomplete); } else { this.commands.removeListener('afterExec', doLiveAutocomplete); From 163a6a92430f6ee13dc94c1817fdeee7d4578b69 Mon Sep 17 00:00:00 2001 From: Homa Wong Date: Mon, 21 Apr 2014 10:37:06 -0700 Subject: [PATCH 071/158] Update text_completer and util to support unicode characters autocomplete. Update language_tools to support pass in completers at enableLiveAutocomplete and enableBasicAutocomplete so user can further customize the completion behavior. --- lib/ace/autocomplete/text_completer.js | 2 +- lib/ace/autocomplete/util.js | 8 ++++---- lib/ace/ext/language_tools.js | 25 ++++++++++++++++++++++--- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/lib/ace/autocomplete/text_completer.js b/lib/ace/autocomplete/text_completer.js index 723ff69a..6eebfc61 100644 --- a/lib/ace/autocomplete/text_completer.js +++ b/lib/ace/autocomplete/text_completer.js @@ -31,7 +31,7 @@ define(function(require, exports, module) { var Range = require("../range").Range; - var splitRegex = /[^a-zA-Z_0-9\$\-]+/; + var splitRegex = /[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/; function getWordIndex(doc, pos) { var textBefore = doc.getTextRange(Range.fromPoints({row: 0, column:0}, pos)); diff --git a/lib/ace/autocomplete/util.js b/lib/ace/autocomplete/util.js index 8b7c1151..994219ff 100644 --- a/lib/ace/autocomplete/util.js +++ b/lib/ace/autocomplete/util.js @@ -43,9 +43,9 @@ exports.parForEach = function(array, fn, callback) { callback(result, err); }); } -} +}; -var ID_REGEX = /[a-zA-Z_0-9\$-]/; +var ID_REGEX = /[a-zA-Z_0-9\$-]|[^\u0000-\u007F]/; exports.retrievePrecedingIdentifier = function(text, pos, regex) { regex = regex || ID_REGEX; @@ -57,7 +57,7 @@ exports.retrievePrecedingIdentifier = function(text, pos, regex) { break; } return buf.reverse().join(""); -} +}; exports.retrieveFollowingIdentifier = function(text, pos, regex) { regex = regex || ID_REGEX; @@ -69,6 +69,6 @@ exports.retrieveFollowingIdentifier = function(text, pos, regex) { break; } return buf; -} +}; }); diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js index 83cfe2be..1b46635e 100644 --- a/lib/ace/ext/language_tools.js +++ b/lib/ace/ext/language_tools.js @@ -72,6 +72,11 @@ exports.addCompleter = function(completer) { completers.push(completer); }; +// Exports existing completer so that user can construct his own set of completers. +exports.textCompleter = textCompleter; +exports.keyWordCompleter = keyWordCompleter; +exports.snippetCompleter = snippetCompleter; + var expandSnippet = { name: "expandSnippet", exec: function(editor) { @@ -126,7 +131,7 @@ var doLiveAutocomplete = function(e) { //Try to find custom prefixes on the completers completers.forEach(function(completer) { if (completer.identifierRegexps) { - completer.identifierRegexps.forEach(function(identifierRegex){ + completer.identifierRegexps.forEach(function(identifierRegex) { if (!prefix) { prefix = util.retrievePrecedingIdentifier(line, pos.column, identifierRegex); } @@ -136,7 +141,7 @@ var doLiveAutocomplete = function(e) { // We don't want to autocomplete with no prefix if (e.command.name === "backspace" && !prefix) { - if (hasCompleter) + if (hasCompleter) editor.completer.detach(); } else if (e.command.name === "insertstring") { @@ -163,6 +168,10 @@ require("../config").defineOptions(Editor.prototype, "editor", { enableBasicAutocompletion: { set: function(val) { if (val) { + if (Array.isArray(val)) { + completers = val; + } + this.completers = completers; this.commands.addCommand(Autocomplete.startCommand); } else { @@ -171,9 +180,20 @@ require("../config").defineOptions(Editor.prototype, "editor", { }, value: false }, + /** + * Enable live autocomplete. If the value is an array, it is assumed to be an array of completer + * and will use them instead of the default completers. + * NOTE: Should this be renamed to enableLiveAutocompletion to match enableBasicAutocompletion? + */ enableLiveAutocomplete: { set: function(val) { if (val) { + if (Array.isArray(val)) { + completers = val; + } + + this.completers = completers; + // On each change automatically trigger the autocomplete this.completers = completers; this.commands.on('afterExec', doLiveAutocomplete); @@ -197,5 +217,4 @@ require("../config").defineOptions(Editor.prototype, "editor", { value: false } }); - }); From 54a1060a81d175df15af86e5236abdfffd0f9ab2 Mon Sep 17 00:00:00 2001 From: Homa Wong Date: Thu, 24 Apr 2014 00:38:40 -0700 Subject: [PATCH 072/158] Rename enableLiveAutocomplete to enableLiveAutocompletion to match enableBasicAutocompletion --- lib/ace/ext/language_tools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js index 1b46635e..f7c16d66 100644 --- a/lib/ace/ext/language_tools.js +++ b/lib/ace/ext/language_tools.js @@ -185,7 +185,7 @@ require("../config").defineOptions(Editor.prototype, "editor", { * and will use them instead of the default completers. * NOTE: Should this be renamed to enableLiveAutocompletion to match enableBasicAutocompletion? */ - enableLiveAutocomplete: { + enableLiveAutocompletion: { set: function(val) { if (val) { if (Array.isArray(val)) { From 6db76f92ccb8a47c31bf521507009a9840ac71f0 Mon Sep 17 00:00:00 2001 From: ggoodman Date: Thu, 24 Apr 2014 15:44:51 -0400 Subject: [PATCH 073/158] Prevent repeat firing of render callback If either the theme or mode are already cached, callback will be fired more than once. This is because `config.loadModule` appears to fire its callback synchronously. This means that in the event that the theme is already cached, `waiting` will first be incremented then decremented in the same pass, resulting in `done` being called a first time. Control will then flow to the `return` statement where waiting is still `0` and so the `callback` will fire a 2nd time. * Changes * Instead of changing the semantics of `config.loadModule`, I increment waiting at creation so that it will never fire until at least line #130 (`return` statement). --- lib/ace/ext/static_highlight.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ace/ext/static_highlight.js b/lib/ace/ext/static_highlight.js index a3461424..1d69a9bb 100644 --- a/lib/ace/ext/static_highlight.js +++ b/lib/ace/ext/static_highlight.js @@ -100,7 +100,7 @@ var highlight = function(el, opts, callback) { */ highlight.render = function(input, mode, theme, lineStart, disableGutter, callback) { - var waiting = 0; + var waiting = 1; var modeCache = EditSession.prototype.$modes; // if either the theme or the mode were specified as objects @@ -127,7 +127,7 @@ highlight.render = function(input, mode, theme, lineStart, disableGutter, callba var result = highlight.renderSync(input, mode, theme, lineStart, disableGutter); return callback ? callback(result) : result; } - return waiting || done(); + return --waiting || done(); }; /* From 68ede367a6ffdd677bc39a7a907def1220aaff4a Mon Sep 17 00:00:00 2001 From: Houfeng Date: Tue, 29 Apr 2014 17:29:18 +0800 Subject: [PATCH 074/158] add textor add textor --- index.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.html b/index.html index 46c41ce8..86c1bb6d 100644 --- a/index.html +++ b/index.html @@ -760,6 +760,11 @@ if (match) { style="left: -5px; top: 10px;" /> Codecademy +
  • + + Textor +
  • From b146bbaea048d055a0f5ac9edce85f308e560d11 Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Tue, 29 Apr 2014 11:36:23 +0200 Subject: [PATCH 075/158] Fix a trailing comma breaking IE7 --- lib/ace/lib/keys.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/lib/keys.js b/lib/ace/lib/keys.js index c4cc3f31..bc1f7c0d 100644 --- a/lib/ace/lib/keys.js +++ b/lib/ace/lib/keys.js @@ -103,7 +103,7 @@ var Keys = (function() { 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v', 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', 219: '[', - 220: '\\',221: ']', 222: '\'', + 220: '\\',221: ']', 222: '\'' } }; From 0155c67b1ff866752f96c2e779313dd966fa41d1 Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 29 Apr 2014 14:12:08 +0400 Subject: [PATCH 076/158] fix more vim issues (fixes #1930) --- lib/ace/keyboard/vim.js | 7 ++++--- lib/ace/keyboard/vim/commands.js | 13 +++++++++---- lib/ace/keyboard/vim/maps/motions.js | 4 ++++ lib/ace/keyboard/vim/maps/operators.js | 3 ++- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/lib/ace/keyboard/vim.js b/lib/ace/keyboard/vim.js index 0477dca0..8b8bef2c 100644 --- a/lib/ace/keyboard/vim.js +++ b/lib/ace/keyboard/vim.js @@ -149,12 +149,13 @@ exports.handler = { if (!isHandled && hashId !== -1) return; return {command: "null", passEvent: !isHandled}; - } // if no modifier || shift: wait for input. - else if (key.length == 1 && (hashId === 0 || hashId == 4)) { - return {command: "null", passEvent: true}; } else if (key == "esc" && hashId === 0) { return {command: coreCommands.stop}; } + // if no modifier || shift: wait for input. + else if (hashId === 0 || hashId == 4) { + return {command: "null", passEvent: true}; + } } else { if (key == "ctrl-w") { return {command: "removewordleft"}; diff --git a/lib/ace/keyboard/vim/commands.js b/lib/ace/keyboard/vim/commands.js index 1ab154c5..abf04ef9 100644 --- a/lib/ace/keyboard/vim/commands.js +++ b/lib/ace/keyboard/vim/commands.js @@ -123,10 +123,12 @@ var actions = exports.actions = { range.end.column++; var text = editor.session.getTextRange(range); var toggled = text.toUpperCase(); - if (toggled == text) - editor.navigateRight(); - else + if (toggled != text) editor.session.replace(range, toggled); + else if (text.toLowerCase() != text) + editor.session.replace(range, text.toLowerCase()) + else + editor.navigateRight(); }, count || 1); } }, @@ -342,6 +344,7 @@ var inputBuffer = exports.inputBuffer = { currentCmd: null, //currentMode: 0, currentCount: "", + pendingCount: "", status: "", // Types @@ -442,8 +445,9 @@ var inputBuffer = exports.inputBuffer = { }, getCount: function() { - var count = this.currentCount; + var count = this.currentCount || this.pendingCount; this.currentCount = ""; + this.pendingCount = count; return count && parseInt(count, 10); }, @@ -520,6 +524,7 @@ var inputBuffer = exports.inputBuffer = { this.operator = null; this.motion = null; this.currentCount = ""; + this.pendingCount = ""; this.status = ""; this.accepting = [NUMBER, OPERATOR, MOTION, ACTION]; this.idle = true; diff --git a/lib/ace/keyboard/vim/maps/motions.js b/lib/ace/keyboard/vim/maps/motions.js index 90a7a933..26c20237 100644 --- a/lib/ace/keyboard/vim/maps/motions.js +++ b/lib/ace/keyboard/vim/maps/motions.js @@ -387,6 +387,7 @@ module.exports = { param: true, handlesCount: true, getPos: function(editor, range, count, param, isSel, isRepeat) { + if (param == "space") param = " "; if (!isRepeat) LAST_SEARCH_MOTION = {ch: "f", param: param}; var cursor = editor.getCursorPosition(); @@ -402,6 +403,7 @@ module.exports = { param: true, handlesCount: true, getPos: function(editor, range, count, param, isSel, isRepeat) { + if (param == "space") param = " "; if (!isRepeat) LAST_SEARCH_MOTION = {ch: "F", param: param}; var cursor = editor.getCursorPosition(); @@ -417,6 +419,7 @@ module.exports = { param: true, handlesCount: true, getPos: function(editor, range, count, param, isSel, isRepeat) { + if (param == "space") param = " "; if (!isRepeat) LAST_SEARCH_MOTION = {ch: "t", param: param}; var cursor = editor.getCursorPosition(); @@ -435,6 +438,7 @@ module.exports = { param: true, handlesCount: true, getPos: function(editor, range, count, param, isSel, isRepeat) { + if (param == "space") param = " "; if (!isRepeat) LAST_SEARCH_MOTION = {ch: "T", param: param}; var cursor = editor.getCursorPosition(); diff --git a/lib/ace/keyboard/vim/maps/operators.js b/lib/ace/keyboard/vim/maps/operators.js index a7479acb..350bbd05 100644 --- a/lib/ace/keyboard/vim/maps/operators.js +++ b/lib/ace/keyboard/vim/maps/operators.js @@ -115,8 +115,9 @@ module.exports = { }, fn: function(editor, range, count, param) { count = count || 1; + if (param && param.isLine) + param = "y"; switch (param) { - case param.isLine && param: case "y": var pos = editor.getCursorPosition(); editor.selection.selectLine(); From 393dc852dc329be7ca068a01806a61991e4c4452 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Tue, 29 Apr 2014 13:58:24 -0700 Subject: [PATCH 077/158] add dartdoc indentation handling to the dart mode --- lib/ace/mode/dart_highlight_rules.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ace/mode/dart_highlight_rules.js b/lib/ace/mode/dart_highlight_rules.js index 556150c3..ab617a39 100644 --- a/lib/ace/mode/dart_highlight_rules.js +++ b/lib/ace/mode/dart_highlight_rules.js @@ -6,6 +6,7 @@ define(function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DartHighlightRules = function() { @@ -41,6 +42,7 @@ var DartHighlightRules = function() { token : "comment", regex : /\/\/.*$/ }, + DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment regex : /\/\*/, @@ -174,6 +176,8 @@ var DartHighlightRules = function() { }, stringfill] } + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); }; oop.inherits(DartHighlightRules, TextHighlightRules); From ca170b5d3de54c048a5c93dddc16257661d96893 Mon Sep 17 00:00:00 2001 From: Eric Arnold Date: Tue, 29 Apr 2014 17:15:25 -0700 Subject: [PATCH 078/158] Made and implemented Linking class for tracking eclipse-style identifier ctrl + clicks. Off by default. --- lib/ace/ace.js | 2 + lib/ace/linking.js | 66 ++++++++++++++++++++++++++++++++ lib/ace/mouse/linking_handler.js | 66 ++++++++++++++++++++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 lib/ace/linking.js create mode 100644 lib/ace/mouse/linking_handler.js diff --git a/lib/ace/ace.js b/lib/ace/ace.js index a2261355..850f44f6 100644 --- a/lib/ace/ace.js +++ b/lib/ace/ace.js @@ -47,6 +47,7 @@ var EditSession = require("./edit_session").EditSession; var UndoManager = require("./undomanager").UndoManager; var Renderer = require("./virtual_renderer").VirtualRenderer; var MultiSelect = require("./multi_select").MultiSelect; +var Linking = require("ace/linking").Linking; // The following require()s are for inclusion in the built ace file require("./worker/worker_client"); @@ -87,6 +88,7 @@ exports.edit = function(el) { var editor = new Editor(new Renderer(el)); new MultiSelect(editor); + new Linking(editor); editor.setSession(doc); var env = { diff --git a/lib/ace/linking.js b/lib/ace/linking.js new file mode 100644 index 00000000..cbd45d32 --- /dev/null +++ b/lib/ace/linking.js @@ -0,0 +1,66 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +define(function(require, exports, module) { + +var oop = require("./lib/oop"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var onMouseDown = require("./mouse/linking_handler").onMouseDown; +var onMouseMove = require("./mouse/linking_handler").onMouseMove; +var Editor = require("./editor").Editor; + +// Linking(editor) +// adds linking support to the editor +function Linking(editor) { +} + +(function() { + oop.implement(this, EventEmitter); +}).call(Linking.prototype); + +exports.Linking = Linking; + +require("./config").defineOptions(Editor.prototype, "editor", { + enableLinking: { + set: function(val) { + Linking(this); + if (val) { + this.on("mousedown", onMouseDown); + this.on("mousemove", onMouseMove); + } else { + this.off("mousedown", onMouseDown); + this.off("mousemove", onMouseMove); + } + }, + value: false + } +}) + +}); diff --git a/lib/ace/mouse/linking_handler.js b/lib/ace/mouse/linking_handler.js new file mode 100644 index 00000000..c74272e8 --- /dev/null +++ b/lib/ace/mouse/linking_handler.js @@ -0,0 +1,66 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +define(function(require, exports, module) { + +var event = require("../lib/event"); + +function onMouseMove(e) { + var editor = e.editor; + var ctrl = e.getAccelKey(); + + if (ctrl) { + var editor = e.editor; + var docPos = e.getDocumentPosition(); + var session = editor.session; + var token = session.getTokenAt(docPos.row, docPos.column); + + editor._emit("link_hover", {position: docPos, token: token}); + } +} + +function onMouseDown(e) { + var ctrl = e.getAccelKey(); + var button = e.getButton(); + + if (button == 0 && ctrl) { + var editor = e.editor; + var docPos = e.getDocumentPosition(); + var session = editor.session; + var token = session.getTokenAt(docPos.row, docPos.column); + + editor._emit("link", {position: docPos, token: token}); + } +} + +exports.onMouseMove = onMouseMove; +exports.onMouseDown = onMouseDown; + +}); From feb500c86e21186f7ed0c5f43bbf769a36a5176c Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 4 May 2014 17:29:56 +0400 Subject: [PATCH 079/158] fix inserting snippets when multiple selections are present --- lib/ace/autocomplete.js | 12 +- lib/ace/commands/default_commands.js | 4 + lib/ace/editor.js | 3 +- lib/ace/lib/keys.js | 9 -- lib/ace/multi_select.js | 29 +++-- lib/ace/snippets.js | 168 ++++++++++++++++++++------- lib/ace/worker/worker_client.js | 4 +- 7 files changed, 159 insertions(+), 70 deletions(-) diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js index 8aa8abb3..a2fea74f 100644 --- a/lib/ace/autocomplete.js +++ b/lib/ace/autocomplete.js @@ -51,7 +51,7 @@ var Autocomplete = function() { this.changeTimer = lang.delayedCall(function() { this.updateCompletions(true); - }.bind(this)) + }.bind(this)); }; (function() { @@ -270,7 +270,7 @@ var Autocomplete = function() { var _id = this.gatherCompletionsId; this.gatherCompletions(this.editor, function(err, results) { // Only detach if result gathering is finished - var doDetach = function() { + var detachIfFinished = function() { if (!results.finished) return; return this.detach(); }.bind(this); @@ -279,10 +279,10 @@ var Autocomplete = function() { var matches = results && results.matches; if (!matches || !matches.length) - return doDetach(); + return detachIfFinished(); // Wrong prefix or wrong session -> ignore - if (prefix.indexOf(results.prefix) != 0 || _id != this.gatherCompletionsId) + if (prefix.indexOf(results.prefix) !== 0 || _id != this.gatherCompletionsId) return; this.completions = new FilteredList(matches); @@ -291,11 +291,11 @@ var Autocomplete = function() { // No results if (!filtered.length) - return doDetach(); + return detachIfFinished(); // One result equals to the prefix if (filtered.length == 1 && filtered[0].value == prefix && !filtered[0].snippet) - return doDetach(); + return detachIfFinished(); // Autoinsert if one result if (this.autoInsert && filtered.length == 1) diff --git a/lib/ace/commands/default_commands.js b/lib/ace/commands/default_commands.js index 1ced6916..6506b5cf 100644 --- a/lib/ace/commands/default_commands.js +++ b/lib/ace/commands/default_commands.js @@ -141,11 +141,15 @@ exports.commands = [{ name: "findnext", bindKey: bindKey("Ctrl-K", "Command-G"), exec: function(editor) { editor.findNext(); }, + multiSelectAction: "forEach", + scrollIntoView: "center", readOnly: true }, { name: "findprevious", bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"), exec: function(editor) { editor.findPrevious(); }, + multiSelectAction: "forEach", + scrollIntoView: "center", readOnly: true }, { name: "selectOrFindNext", diff --git a/lib/ace/editor.js b/lib/ace/editor.js index 1e94863a..ef2d9f1a 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -2363,8 +2363,9 @@ var Editor = function(renderer, session) { var cursorLayer = this.renderer.$cursorLayer; if (!cursorLayer) return; - cursorLayer.setSmoothBlinking(style == "smooth"); + cursorLayer.setSmoothBlinking(/smooth/.test(style)); cursorLayer.isBlinking = !this.$readOnly && style != "wide"; + dom.setCssClass(cursorLayer.element, "ace_slim-cursors", /slim/.test(style)); }; }).call(Editor.prototype); diff --git a/lib/ace/lib/keys.js b/lib/ace/lib/keys.js index a811d8d1..e708a5d4 100644 --- a/lib/ace/lib/keys.js +++ b/lib/ace/lib/keys.js @@ -143,15 +143,6 @@ var Keys = (function() { } })(); - (function() { - var mods = ["cmd", "ctrl", "alt", "shift"]; - for (var i = Math.pow(2, mods.length); i--;) { - ret.KEY_MODS[i] = mods.filter(function(x) { - return i & ret.KEY_MODS[x]; - }).join("-") + "-"; - } - })(); - return ret; })(); oop.mixin(exports, Keys); diff --git a/lib/ace/multi_select.js b/lib/ace/multi_select.js index 6b11691e..b079e387 100644 --- a/lib/ace/multi_select.js +++ b/lib/ace/multi_select.js @@ -464,36 +464,41 @@ var Editor = require("./editor").Editor; /** * Executes a command for each selection range. - * @param {String} cmd The command to execute + * @param {Object} cmd The command to execute * @param {String} args Any arguments for the command * @method Editor.forEachSelection **/ - this.forEachSelection = function(cmd, args, $byLines) { + this.forEachSelection = function(cmd, args, options) { if (this.inVirtualSelectionMode) return; - + var keepOrder = options && options.keepOrder; + var $byLines = options == true || options && options.$byLines var session = this.session; var selection = this.selection; var rangeList = selection.rangeList; + var ranges = (keepOrder ? selection : rangeList).ranges; var result; + if (!ranges.length) + return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {}); + var reg = selection._eventRegistry; selection._eventRegistry = {}; var tmpSel = new Selection(session); this.inVirtualSelectionMode = true; - for (var i = rangeList.ranges.length; i--;) { + for (var i = ranges.length; i--;) { if ($byLines) { - while (i > 0 && rangeList.ranges[i].start.row == rangeList.ranges[i - 1].end.row) + while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row) i--; } - tmpSel.fromOrientedRange(rangeList.ranges[i]); - tmpSel.id = rangeList.ranges[i].marker; + tmpSel.fromOrientedRange(ranges[i]); + tmpSel.index = i; this.selection = session.selection = tmpSel; - var cmdResult = cmd.exec(this, args || {}); - if (result !== undefined) + var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {}); + if (!result && cmdResult !== undefined) result = cmdResult; - tmpSel.toOrientedRange(rangeList.ranges[i]); + tmpSel.toOrientedRange(ranges[i]); } tmpSel.detach(); @@ -599,6 +604,10 @@ var Editor = require("./editor").Editor; for (var i = ranges.length; i--; ) selection.addRange(ranges[i], true); + // keep old selection as primary if possible + if (range && selection.rangeList.rangeAtPoint(range.start)) + selection.addRange(range, true); + this.$blockScrolling -= 1; return ranges.length; diff --git a/lib/ace/snippets.js b/lib/ace/snippets.js index 6cc855b1..4fd301c2 100644 --- a/lib/ace/snippets.js +++ b/lib/ace/snippets.js @@ -30,8 +30,11 @@ define(function(require, exports, module) { "use strict"; -var lang = require("./lib/lang") -var Range = require("./range").Range +var oop = require("./lib/oop"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var lang = require("./lib/lang"); +var Range = require("./range").Range; +var Anchor = require("./anchor").Anchor; var HashHandler = require("./keyboard/hash_handler").HashHandler; var Tokenizer = require("./tokenizer").Tokenizer; var comparePoints = Range.comparePoints; @@ -42,12 +45,14 @@ var SnippetManager = function() { }; (function() { + oop.implement(this, EventEmitter); + this.getTokenizer = function() { function TabstopToken(str, _, stack) { str = str.substr(1); if (/^\d+$/.test(str) && !stack.inFormatString) return [{tabstopId: parseInt(str, 10)}]; - return [{text: str}] + return [{text: str}]; } function escape(ch) { return "(?:[^\\\\" + ch + "]|\\\\.)"; @@ -125,7 +130,7 @@ var SnippetManager = function() { }); SnippetManager.prototype.getTokenizer = function() { return SnippetManager.$tokenizer; - } + }; return SnippetManager.$tokenizer; }; @@ -150,7 +155,8 @@ var SnippetManager = function() { var s = editor.session; switch(name) { case "CURRENT_WORD": - var r = s.getWordRange(); + var r = s.getWordRange(); + /* falls through */ case "SELECTION": case "SELECTED_TEXT": return s.getTextRange(r); @@ -166,7 +172,7 @@ var SnippetManager = function() { return s.getUseSoftTabs() ? "YES" : "NO"; case "TAB_SIZE": return s.getTabSize(); - // defult but can't fill :( + // default but can't fill :( case "FILENAME": case "FILEPATH": return ""; @@ -262,7 +268,7 @@ var SnippetManager = function() { return result; }; - this.insertSnippet = function(editor, snippetText) { + this.insertSnippetForSelection = function(editor, snippetText) { var cursor = editor.getCursorPosition(); var line = editor.session.getLine(cursor.row); var tabString = editor.session.getTabString(); @@ -313,7 +319,7 @@ var SnippetManager = function() { tabstops.forEach(function(ts) {ts.length = 0}); var expanding = {}; function copyValue(val) { - var copy = [] + var copy = []; for (var i = 0; i < val.length; i++) { var p = val[i]; if (typeof p == "object") { @@ -349,7 +355,7 @@ var SnippetManager = function() { if (ts.indexOf(p) === -1) ts.push(p); - }; + } // convert to plain text var row = 0, column = 0; @@ -373,8 +379,21 @@ var SnippetManager = function() { var end = editor.session.replace(range, text); var tabstopManager = new TabstopManager(editor); - tabstopManager.addTabstops(tabstops, range.start, end); - tabstopManager.tabNext(); + var selectionId = editor.inVirtualSelectionMode && editor.selection.index; + tabstopManager.addTabstops(tabstops, range.start, end, selectionId); + }; + + this.insertSnippet = function(editor, snippetText) { + var self = this; + if (editor.inVirtualSelectionMode) + return self.insertSnippetForSelection(editor, snippetText); + + editor.forEachSelection(function() { + self.insertSnippetForSelection(editor, snippetText); + }, null, {keepOrder: true}); + + if (editor.tabstopManager) + editor.tabstopManager.tabNext(); }; this.$getScope = function(editor) { @@ -384,7 +403,7 @@ var SnippetManager = function() { // PHP is actually HTML if (scope === "php" && !editor.session.$mode.inlinePhp) scope = "html"; - var c = editor.getCursorPosition() + var c = editor.getCursorPosition(); var state = editor.session.getState(c.row); if (typeof state === "object") { state = state[0]; @@ -413,7 +432,17 @@ var SnippetManager = function() { return scopes; }; - this.expandWithTab = function(editor) { + this.expandWithTab = function(editor, options) { + var self = this; + var result = editor.forEachSelection(function() { + return self.expandSnippetForSelection(editor, options); + }, null, {keepOrder: true}); + if (result && editor.tabstopManager) + editor.tabstopManager.tabNext(); + return result; + }; + + this.expandSnippetForSelection = function(editor, options) { var cursor = editor.getCursorPosition(); var line = editor.session.getLine(cursor.row); var before = line.substring(0, cursor.column); @@ -429,7 +458,8 @@ var SnippetManager = function() { }, this); if (!snippet) return false; - + if (options && options.dryRun) + return true; editor.session.doc.removeInLine(cursor.row, cursor.column - snippet.replaceBefore.length, cursor.column + snippet.replaceAfter.length @@ -437,7 +467,7 @@ var SnippetManager = function() { this.variables.M__ = snippet.matchBefore; this.variables.T__ = snippet.matchAfter; - this.insertSnippet(editor, snippet.content); + this.insertSnippetForSelection(editor, snippet.content); this.variables.M__ = this.variables.T__ = null; return true; @@ -469,7 +499,7 @@ var SnippetManager = function() { var self = this; function wrapRegexp(src) { if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src)) - src = "(?:" + src + ")" + src = "(?:" + src + ")"; return src || ""; } @@ -491,7 +521,7 @@ var SnippetManager = function() { function addSnippet(s) { if (!s.scope) s.scope = scope || "_"; - scope = s.scope + scope = s.scope; if (!snippetMap[scope]) { snippetMap[scope] = []; snippetNameMap[scope] = {}; @@ -517,12 +547,14 @@ var SnippetManager = function() { s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true); s.endTriggerRe = new RegExp(s.endTrigger, "", true); - }; + } if (snippets.content) addSnippet(snippets); else if (Array.isArray(snippets)) snippets.forEach(addSnippet); + + this._signal("registerSnippets", {scope: scope}); }; this.unregister = function(snippets, scope) { var snippetMap = this.snippetMap; @@ -551,7 +583,7 @@ var SnippetManager = function() { while (m = re.exec(str)) { if (m[1]) { try { - snippet = JSON.parse(m[1]) + snippet = JSON.parse(m[1]); list.push(snippet); } catch (e) {} } if (m[4]) { @@ -604,9 +636,10 @@ var TabstopManager = function(editor) { }; (function() { this.attach = function(editor) { - this.index = -1; + this.index = 0; this.ranges = []; this.tabstops = []; + this.$openTabstops = null; this.selectedTabstop = null; this.editor = editor; @@ -646,7 +679,7 @@ var TabstopManager = function(editor) { } if (!this.$inChange && isRemove) { var ts = this.selectedTabstop; - var changedOutside = !ts.some(function(r) { + var changedOutside = ts && !ts.some(function(r) { return comparePoints(r.start, start) <= 0 && comparePoints(r.end, end) >= 0; }); if (changedOutside) @@ -658,7 +691,7 @@ var TabstopManager = function(editor) { if (r.end.row < start.row) continue; - if (comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) { + if (isRemove && comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) { this.removeRange(r); i--; continue; @@ -681,7 +714,7 @@ var TabstopManager = function(editor) { }; this.updateLinkedFields = function() { var ts = this.selectedTabstop; - if (!ts.hasLinkedRanges) + if (!ts || !ts.hasLinkedRanges) return; this.$inChange = true; var session = this.editor.session; @@ -690,7 +723,7 @@ var TabstopManager = function(editor) { var range = ts[i]; if (!range.linked) continue; - var fmt = exports.snippetManager.tmStrFormat(text, range.original) + var fmt = exports.snippetManager.tmStrFormat(text, range.original); session.replace(range, fmt); } this.$inChange = false; @@ -701,7 +734,7 @@ var TabstopManager = function(editor) { }; this.onChangeSelection = function() { if (!this.editor) - return + return; var lead = this.editor.selection.lead; var anchor = this.editor.selection.anchor; var isEmpty = this.editor.selection.isEmpty(); @@ -719,14 +752,17 @@ var TabstopManager = function(editor) { this.detach(); }; this.tabNext = function(dir) { - var max = this.tabstops.length - 1; + var max = this.tabstops.length; var index = this.index + (dir || 1); - index = Math.min(Math.max(index, 0), max); - this.selectTabstop(index); + index = Math.min(Math.max(index, 1), max); if (index == max) + index = 0; + this.selectTabstop(index); + if (index === 0) this.detach(); }; this.selectTabstop = function(index) { + this.$openTabstops = null; var ts = this.tabstops[this.index]; if (ts) this.addTabstopMarkers(ts); @@ -744,6 +780,9 @@ var TabstopManager = function(editor) { continue; sel.addRange(ts[i].clone(), true); } + // todo investigate why is this needed + if (sel.ranges[0]) + sel.addRange(sel.ranges[0].clone()); } else { this.editor.selection.setRange(ts.firstNonLinked); } @@ -751,6 +790,8 @@ var TabstopManager = function(editor) { this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); }; this.addTabstops = function(tabstops, start, end) { + if (!this.$openTabstops) + this.$openTabstops = []; // add final tabstop if missing if (!tabstops[0]) { var p = Range.fromPoints(end, end); @@ -761,33 +802,44 @@ var TabstopManager = function(editor) { } var i = this.index; - var arg = [i, 0]; + var arg = [i + 1, 0]; var ranges = this.ranges; - var editor = this.editor; - tabstops.forEach(function(ts) { + tabstops.forEach(function(ts, index) { + var dest = this.$openTabstops[index] || ts; + for (var i = ts.length; i--;) { var p = ts[i]; var range = Range.fromPoints(p.start, p.end || p.start); movePoint(range.start, start); movePoint(range.end, start); range.original = p; - range.tabstop = ts; + range.tabstop = dest; ranges.push(range); - ts[i] = range; + if (dest != ts) + dest.unshift(range); + else + dest[i] = range; if (p.fmtString) { range.linked = true; - ts.hasLinkedRanges = true; - } else if (!ts.firstNonLinked) - ts.firstNonLinked = range; + dest.hasLinkedRanges = true; + } else if (!dest.firstNonLinked) + dest.firstNonLinked = range; } - if (!ts.firstNonLinked) - ts.hasLinkedRanges = false; - arg.push(ts); - this.addTabstopMarkers(ts); + if (!dest.firstNonLinked) + dest.hasLinkedRanges = false; + if (dest === ts) { + arg.push(dest); + this.$openTabstops[index] = dest; + } + this.addTabstopMarkers(dest); }, this); - // tabstop 0 is the last one - arg.push(arg.splice(2, 1)[0]); - this.tabstops.splice.apply(this.tabstops, arg); + + if (arg.length > 2) { + // when adding new snippet inside existing one, make sure 0 tabstop is at the end + if (this.tabstops.length) + arg.push(arg.splice(2, 1)[0]); + this.tabstops.splice.apply(this.tabstops, arg); + } }; this.addTabstopMarkers = function(ts) { @@ -810,6 +862,13 @@ var TabstopManager = function(editor) { i = this.ranges.indexOf(range); this.ranges.splice(i, 1); this.editor.session.removeMarker(range.markerId); + if (!range.tabstop.length) { + i = this.tabstops.indexOf(range.tabstop); + if (i != -1) + this.tabstops.splice(i, 1); + if (!this.tabstops.length) + this.detach(); + } }; this.keyboardHandler = new HashHandler(); @@ -835,6 +894,19 @@ var TabstopManager = function(editor) { }).call(TabstopManager.prototype); + +var changeTracker = {}; +changeTracker.onChange = Anchor.prototype.onChange; +changeTracker.setPosition = function(row, column) { + this.pos.row = row; + this.pos.column = column; +}; +changeTracker.update = function(pos, delta, $insertRight) { + this.$insertRight = $insertRight; + this.pos = pos; + this.onChange(delta); +}; + var movePoint = function(point, diff) { if (point.row == 0) point.column += diff.column; @@ -860,4 +932,14 @@ require("./lib/dom").importCssString("\ exports.snippetManager = new SnippetManager(); +var Editor = require("./editor").Editor; +(function() { + this.insertSnippet = function(content, options) { + return exports.snippetManager.insertSnippet(this, content, options); + }; + this.expandSnippet = function(options) { + return exports.snippetManager.expandWithTab(this, options); + }; +}).call(Editor.prototype); + }); diff --git a/lib/ace/worker/worker_client.js b/lib/ace/worker/worker_client.js index 409b7202..1a2460aa 100644 --- a/lib/ace/worker/worker_client.js +++ b/lib/ace/worker/worker_client.js @@ -149,7 +149,9 @@ var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl) { // TODO: cleanup event this.$worker.postMessage({event: event, data: {data: data.data}}); } - catch(ex) {} + catch(ex) { + console.error(ex.stack); + } }; this.attachToDocument = function(doc) { From 801875605161874d61cd244f926754b16a0ccc0d Mon Sep 17 00:00:00 2001 From: Homa Wong Date: Sun, 4 May 2014 09:45:12 -0700 Subject: [PATCH 080/158] Update regex and condition check according to suggestion --- lib/ace/autocomplete/util.js | 2 +- lib/ace/ext/language_tools.js | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/ace/autocomplete/util.js b/lib/ace/autocomplete/util.js index 994219ff..341a6b92 100644 --- a/lib/ace/autocomplete/util.js +++ b/lib/ace/autocomplete/util.js @@ -45,7 +45,7 @@ exports.parForEach = function(array, fn, callback) { } }; -var ID_REGEX = /[a-zA-Z_0-9\$-]|[^\u0000-\u007F]/; +var ID_REGEX = /[a-zA-Z_0-9\$-\u007F-\uFFFF]/; exports.retrievePrecedingIdentifier = function(text, pos, regex) { regex = regex || ID_REGEX; diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js index f7c16d66..7abc2ef8 100644 --- a/lib/ace/ext/language_tools.js +++ b/lib/ace/ext/language_tools.js @@ -168,11 +168,7 @@ require("../config").defineOptions(Editor.prototype, "editor", { enableBasicAutocompletion: { set: function(val) { if (val) { - if (Array.isArray(val)) { - completers = val; - } - - this.completers = completers; + this.completers = Array.isArray(val)? val: completers; this.commands.addCommand(Autocomplete.startCommand); } else { this.commands.removeCommand(Autocomplete.startCommand); @@ -188,11 +184,7 @@ require("../config").defineOptions(Editor.prototype, "editor", { enableLiveAutocompletion: { set: function(val) { if (val) { - if (Array.isArray(val)) { - completers = val; - } - - this.completers = completers; + this.completers = Array.isArray(val)? val: completers; // On each change automatically trigger the autocomplete this.completers = completers; From ee4bed3db136436a2623f423f008375cc923c7f4 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 4 May 2014 17:32:12 +0400 Subject: [PATCH 081/158] fix editor scrolling down automatically when resizing and scrolled past end --- lib/ace/virtual_renderer.js | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js index d55d6085..33f3a906 100644 --- a/lib/ace/virtual_renderer.js +++ b/lib/ace/virtual_renderer.js @@ -234,7 +234,7 @@ var VirtualRenderer = function(container, theme) { this.session = session; if (!session) return; - + if (this.scrollMargin.top && session.getScrollTop() <= 0) session.setScrollTop(-this.scrollMargin.top); @@ -337,8 +337,6 @@ var VirtualRenderer = function(container, theme) { * **/ this.onResize = function(force, gutterWidth, width, height) { - // if (force) - // console.log("force resize requested", width, height) if (this.resizing > 2) return; else if (this.resizing > 0) @@ -353,13 +351,7 @@ var VirtualRenderer = function(container, theme) { if (!width) width = el.clientWidth || el.scrollWidth; var changes = this.$updateCachedSize(force, gutterWidth, width, height); - - // console.log("resizing to", width, height, JSON.stringify(this.$size)) - // setTimeout(function() { - // console.log("actual size ", this.container.clientWidth, this.container.clientHeight) - - // }.bind(this), 500) if (!this.$size.scrollerHeight || (!width && !height)) return this.resizing = 0; @@ -757,7 +749,16 @@ var VirtualRenderer = function(container, theme) { }; this.$updateScrollBarV = function() { - this.scrollBarV.setScrollHeight(this.layerConfig.maxHeight + this.scrollMargin.v); + var scrollHeight = this.layerConfig.maxHeight; + var scrollerHeight = this.$size.scrollerHeight; + if (!this.$maxLines && this.$scrollPastEnd) { + scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd; + if (this.scrollTop > scrollHeight - scrollerHeight) { + scrollHeight = this.scrollTop + scrollerHeight; + this.scrollBarV.scrollTop = null; + } + } + this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v); this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top); }; this.$updateScrollBarH = function() { @@ -934,11 +935,7 @@ var VirtualRenderer = function(container, theme) { } if (!this.$maxLines && this.$scrollPastEnd) { - if (this.scrollTop > maxHeight - size.scrollerHeight) - maxHeight += Math.min( - (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd, - this.scrollTop - maxHeight + size.scrollerHeight - ); + maxHeight += (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd; } var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible || @@ -1373,8 +1370,7 @@ var VirtualRenderer = function(container, theme) { if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top) return true; if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight - - this.layerConfig.maxHeight - (this.$size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd - < -1 + this.scrollMargin.bottom) + - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom) return true; if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left) return true; From efea2a755b1f4073fc2fcffa0179362ab40a83c3 Mon Sep 17 00:00:00 2001 From: nightwing Date: Wed, 16 Apr 2014 23:13:40 +0400 Subject: [PATCH 082/158] cleanup demo html pages --- Makefile.dryice.js | 40 +++++++++ demo/autocompletion.html | 3 +- demo/autoresize.html | 24 +++-- demo/emmet.html | 17 ++-- demo/ie7.html | 2 +- demo/keyboard_shortcuts.html | 7 +- demo/modelist.html | 13 +-- demo/scrollable-page.html | 88 ++++++++++--------- demo/settings_menu.html | 8 +- demo/show_own_source.js | 19 +++- ...oconflict.html => static-highlighter.html} | 42 ++++----- demo/statusbar.html | 12 ++- lib/ace/worker/worker_client.js | 11 +-- 13 files changed, 180 insertions(+), 106 deletions(-) rename demo/{static-highlighter/client-noconflict.html => static-highlighter.html} (52%) diff --git a/Makefile.dryice.js b/Makefile.dryice.js index f8e1383c..19ba9192 100755 --- a/Makefile.dryice.js +++ b/Makefile.dryice.js @@ -247,6 +247,46 @@ function demo(project) { }); copyFileSync(ACE_HOME + "/demo/kitchen-sink/logo.png", BUILD_DIR + "/kitchen-sink/logo.png"); + + fs.readdirSync(ACE_HOME + "/demo/").forEach(function(x) { + if (/\s|requirejs/.test(x) || !/\.(js|html)$/.test(x)) + return; + copy({ + source: ACE_HOME +"/demo/" + x, + dest: BUILD_DIR + "/demo/" + x, + filter: [function(source) { + if (/\.(js)$/.test(x)) + return source; + var removeRequireJS + source = source.replace(/')} + scripts.forEach(function(s) { + s = s.replace(/"/g, ""); + if (s == "ace/ace") { + comment("load ace") + script("ace") + } else { + var extName = s.match(/[^/]*$/)[0]; + comment("load ace " + extName + " extension"); + script("ext-" + extName); + } + }); + result.push(" diff --git a/demo/autoresize.html b/demo/autoresize.html index cc1dc5e3..2b64d96a 100644 --- a/demo/autoresize.html +++ b/demo/autoresize.html @@ -20,29 +20,37 @@ -
    autoresizing editor
    +
    autoresizing editor
    minHeight = 2 lines
    +
    +
    
     
     
     
     
    +
    +
     
     
    diff --git a/demo/emmet.html b/demo/emmet.html
    index 1a1ed6ba..122085d9 100644
    --- a/demo/emmet.html
    +++ b/demo/emmet.html
    @@ -22,19 +22,20 @@
     
     
    
     
    -
    -
    -
    -
    -
    +
     
    +
    +
     
     
     
    diff --git a/demo/ie7.html b/demo/ie7.html
    index 3a525f86..f5db8667 100644
    --- a/demo/ie7.html
    +++ b/demo/ie7.html
    @@ -5,7 +5,7 @@
       
       ACE Editor StatusBar Demo