1022 lines
45 KiB
JSON
1022 lines
45 KiB
JSON
[
|
|
{
|
|
"name": "Node-Set",
|
|
"entries": [
|
|
{
|
|
"name": "name()",
|
|
"description": "Returns the name of a node, as an xs:string that is either the zero-length string, or has the lexical form of an xs:QName. If the argument is omitted, it defaults to the context item (.). The behavior of the function if the argument is omitted is exactly the same as if the context item had been passed as the argument.",
|
|
"arguments": [
|
|
{
|
|
"type": "node? (Optional)",
|
|
"description": "Node to display name"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "name(/u:root)",
|
|
"output": "u:root"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-name"
|
|
},
|
|
{
|
|
"name": "local-name()",
|
|
"description": "Returns the local part of the name of $arg as an xs:string that will either be the zero-length string or will have the lexical form of an xs:NCName. If the argument is omitted, it defaults to the context item (.). The behavior of the function if the argument is omitted is exactly the same as if the context item had been passed as the argument.",
|
|
"arguments": [
|
|
{
|
|
"type": "node? (Optional)",
|
|
"description": "Node to display local-name"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "name(/u:root)",
|
|
"output": "root"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-local-name"
|
|
},
|
|
{
|
|
"name": "nilled()",
|
|
"description": "Returns an xs:boolean indicating whether the argument node is 'nilled'. If the argument is not an element node, returns the empty sequence. If the argument is the empty sequence, returns the empty sequence.",
|
|
"arguments": [
|
|
{
|
|
"type": "node? (Optional)",
|
|
"description": "Node to test"
|
|
}
|
|
],
|
|
"output": "xs:boolean",
|
|
"examples": [
|
|
{
|
|
"command": "nilled(/u:root)",
|
|
"output": "false"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-nilled"
|
|
},
|
|
{
|
|
"name": "base-uri()",
|
|
"description": "Returns the value of the base-uri URI property for $arg as defined by the accessor function dm:base-uri() for that kind of node in Section 5.2 base-uri AccessorDM.",
|
|
"arguments": [
|
|
{
|
|
"type": "node? (Optional)",
|
|
"description": "Node which URI is looked for"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "base-uri(/u:root/u:UserList[1])",
|
|
"output": "<Empty sequence>"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-base-uri"
|
|
},
|
|
{
|
|
"name": "document-uri()",
|
|
"description": "Returns the value of the document-uri property for $arg as defined by the dm:document-uri accessor function defined in Section 6.1.2 AccessorsDM.",
|
|
"arguments": [
|
|
{
|
|
"type": "node? (Optional)",
|
|
"description": "Node which document-uri value needs to be returned."
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "document-uri(/u:root)",
|
|
"output": "<Empty sequence>"
|
|
},
|
|
{
|
|
"command": "document-uri(/library/fiction:book[1])",
|
|
"output": "http://example.com/library.xml (assuming the document URI of the first fiction:book element is 'http://example.com/library.xml')"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-document-uri"
|
|
},
|
|
{
|
|
"name": "lang()",
|
|
"description": "This function tests whether the language of $node, or the context item if the second argument is omitted, as specified by xml:lang attributes is the same as, or is a sublanguage of, the language specified by $testlang.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$testlang (Look description)"
|
|
},
|
|
{
|
|
"type": "node? (Optional)",
|
|
"description": "$node (Look description)"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "document-uri(/u:root)",
|
|
"output": "<Empty sequence>"
|
|
},
|
|
{
|
|
"command": "document-uri(/library/fiction:book[1])",
|
|
"output": "http://example.com/library.xml (assuming the document URI of the first fiction:book element is 'http://example.com/library.xml')"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-lang"
|
|
},
|
|
{
|
|
"name": "root()",
|
|
"description": "Returns the root of the tree to which $arg belongs. This will usually, but not necessarily, be a document node.",
|
|
"arguments": [
|
|
{
|
|
"type": "node? (Optional)",
|
|
"description": "$arg (Look description)"
|
|
}
|
|
],
|
|
"output": "node",
|
|
"examples": [
|
|
{
|
|
"command": "root(//u:UserList[1])",
|
|
"output": "</u:root node>"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-root"
|
|
},
|
|
{
|
|
"name": "count()",
|
|
"description": "Returns the number of items in the value of $arg. Returns 0 if $arg is the empty sequence.",
|
|
"arguments": [
|
|
{
|
|
"type": "item()* (One or more)",
|
|
"description": "$arg (Look description)"
|
|
}
|
|
],
|
|
"output": "number",
|
|
"examples": [
|
|
{
|
|
"command": "count(//u:UserList)",
|
|
"output": "3"
|
|
},
|
|
{
|
|
"command": "count(//u:UserList/u:User)",
|
|
"output": "10"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-root"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Boolean",
|
|
"entries": [
|
|
{
|
|
"name": "boolean()",
|
|
"description": "Computes the effective boolean value of the sequence $arg.",
|
|
"arguments": [
|
|
{
|
|
"type": "item()* (One or more)",
|
|
"description": "$arg"
|
|
}
|
|
],
|
|
"output": "xs:boolean? (Optional)",
|
|
"examples": [
|
|
{
|
|
"command": "boolean(0)",
|
|
"output": "false"
|
|
},
|
|
{
|
|
"command": "boolean(())",
|
|
"output": "false"
|
|
},
|
|
{
|
|
"command": "boolean(1)",
|
|
"output": "true"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-boolean"
|
|
},
|
|
{
|
|
"name": "true()",
|
|
"description": "Returns the xs:boolean value true. Equivalent to xs:boolean('1').",
|
|
"arguments": [],
|
|
"output": "xs:boolean",
|
|
"examples": [
|
|
{
|
|
"command": "true()",
|
|
"output": "true"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-true"
|
|
},
|
|
{
|
|
"name": "false()",
|
|
"description": "Returns the xs:boolean value false. Equivalent to xs:boolean('0').",
|
|
"arguments": [],
|
|
"output": "xs:boolean",
|
|
"examples": [
|
|
{
|
|
"command": "false()",
|
|
"output": "false"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-false"
|
|
},
|
|
{
|
|
"name": "not()",
|
|
"description": "$arg is first reduced to an effective boolean value by applying the fn:boolean() function. Returns true if the effective boolean value is false, and false if the effective boolean value is true.",
|
|
"arguments": [
|
|
{
|
|
"type": "item()",
|
|
"description": "$arg"
|
|
}
|
|
],
|
|
"output": "xs:boolean",
|
|
"examples": [
|
|
{
|
|
"command": "not(false())",
|
|
"output": "true"
|
|
},
|
|
{
|
|
"command": "not(true())",
|
|
"output": "false"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-not"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "String",
|
|
"entries": [
|
|
{
|
|
"name": "string()",
|
|
"description": "Returns the value of $arg represented as a xs:string. If no argument is supplied, the context item (.) is used as the default argument.",
|
|
"arguments": [
|
|
{
|
|
"type": "item()?",
|
|
"description": "$arg"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "string((1<0))",
|
|
"output": "false"
|
|
},
|
|
{
|
|
"command": "string(.11)",
|
|
"output": "0.11"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-string"
|
|
},
|
|
{
|
|
"name": "codepoints-to-string()",
|
|
"description": "Creates an xs:string from a sequence of The Unicode Standard code points. Returns the zero-length string if $arg is the empty sequence. If any of the code points in $arg is not a legal XML character, an error is raised [err:FOCH0001].",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:integer* (One or more)",
|
|
"description": "$arg"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "codepoints-to-string((2309, 2358, 2378, 2325))",
|
|
"output": "अशॊक"
|
|
},
|
|
{
|
|
"command": "codepoints-to-string((40, 32, 865, 176, 32, 860, 662, 32, 865, 176, 41))",
|
|
"output": "( ͡° ͜ʖ ͡°)"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-codepoints-to-string"
|
|
},
|
|
{
|
|
"name": "string-to-codepoints()",
|
|
"description": "Returns the sequence of The Unicode Standard code points that constitute an xs:string. If $arg is a zero-length string or the empty sequence, the empty sequence is returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string* (One or more)",
|
|
"description": "$arg"
|
|
}
|
|
],
|
|
"output": "xs:integer* (One or more)",
|
|
"examples": [
|
|
{
|
|
"command": "string-to-codepoints('Thérèse')",
|
|
"output": "https://www.w3.org/TR/xquery-operators/#func-string-to-codepoints"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-min"
|
|
},
|
|
{
|
|
"name": "compare()",
|
|
"description": "Returns -1, 0, or 1, depending on whether the value of the $comparand1 is respectively less than, equal to, or greater than the value of $comparand2, according to the rules of the collation that is used.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$comparand1"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$comparand2"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$collation"
|
|
}
|
|
],
|
|
"output": "xs:integer? (Optional)",
|
|
"examples": [
|
|
{
|
|
"command": "compare('abc', 'abc')",
|
|
"output": "0"
|
|
},
|
|
{
|
|
"command": "compare('abc', 'acc')",
|
|
"output": "-1"
|
|
},
|
|
{
|
|
"command": "compare('abc', 'acc')",
|
|
"output": "1"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-compare"
|
|
},
|
|
{
|
|
"name": "codepoint-equal()",
|
|
"description": "Returns true or false depending on whether the value of $comparand1 is equal to the value of $comparand2, according to the Unicode code point collation.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$comparand1"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$comparand2"
|
|
},
|
|
{
|
|
"type": "xs:string",
|
|
"description": "$collation"
|
|
}
|
|
],
|
|
"output": "xs:boolean? (Optional)",
|
|
"examples": [
|
|
{
|
|
"command": "codepoint-equal('asdf', 'asdf')",
|
|
"output": "true"
|
|
},
|
|
{
|
|
"command": "codepoint-equal('asdf', 'asdf ')",
|
|
"output": "false"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-codepoint-equal"
|
|
},
|
|
{
|
|
"name": "concat()",
|
|
"description": " Accepts two or more xs:anyAtomicType arguments and casts them to xs:string. Returns the xs:string that is the concatenation of the values of its arguments after conversion. If any of the arguments is the empty sequence, the argument is treated as the zero-length string.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:anyAtomicType? (Optional)",
|
|
"description": "$arg1"
|
|
},
|
|
{
|
|
"type": "xs:anyAtomicType? (Optional)",
|
|
"description": "$arg2"
|
|
},
|
|
{
|
|
"type": "xs:anyAtomicType? (Optional)",
|
|
"description": "$arg.."
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "concat('un', 'grateful')",
|
|
"output": "ungrateful"
|
|
},
|
|
{
|
|
"command": "concat('Thy ', (), 'old ', 'groans', '', ' ring', ' yet', ' in', ' my', 'ancient',' ears.')",
|
|
"output": "Thy old groans ring yet in my ancient ears."
|
|
},
|
|
{
|
|
"command": "concat('Ciao!',())",
|
|
"output": "Ciao!"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-concat"
|
|
},
|
|
{
|
|
"name": "string-join()",
|
|
"description": "Returns a xs:string created by concatenating the members of the $arg1 sequence using $arg2 as a separator. If the value of $arg2 is the zero-length string, then the members of $arg1 are concatenated without a separator.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string* (One or more)",
|
|
"description": "$arg1"
|
|
},
|
|
{
|
|
"type": "xs:string",
|
|
"description": "$arg2"
|
|
},
|
|
{
|
|
"type": "xs:string",
|
|
"description": "$collation"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "string-join(('Now', 'is', 'the', 'time', '...'), ' ')",
|
|
"output": "Now is the time ..."
|
|
},
|
|
{
|
|
"command": "string-join(('Blow, ', 'blow, ', 'thou ', 'winter ', 'wind!'), '')",
|
|
"output": "Blow, blow, thou winter wind!"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-string-join"
|
|
},
|
|
{
|
|
"name": "substring()",
|
|
"description": "Returns the portion of the value of $sourceString beginning at the position indicated by the value of $startingLoc and continuing for the number of characters indicated by the value of $length. The characters returned do not extend beyond $sourceString.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$comparand1"
|
|
},
|
|
{
|
|
"type": "xs:double",
|
|
"description": "$startingLoc"
|
|
},
|
|
{
|
|
"type": "xs:double? (Optional)",
|
|
"description": "$length"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "substring('motor car', 6)",
|
|
"output": "' car'"
|
|
},
|
|
{
|
|
"command": "substring('metadata', 4, 3)",
|
|
"output": "ada"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-substring"
|
|
},
|
|
{
|
|
"name": "string-length()",
|
|
"description": "Returns the portion of the value of $sourceString beginning at the position indicated by the value of $startingLoc and continuing for the number of characters indicated by the value of $length. The characters returned do not extend beyond $sourceString.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$arg"
|
|
}
|
|
],
|
|
"output": "xs:integer",
|
|
"examples": [
|
|
{
|
|
"command": "string-length('Harp not on that string, madam; that is past.')",
|
|
"output": "45"
|
|
},
|
|
{
|
|
"command": "string-length(())",
|
|
"output": "0"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-string-length"
|
|
},
|
|
{
|
|
"name": "normalize-space()",
|
|
"description": "Returns the value of $arg with whitespace normalized by stripping leading and trailing whitespace and replacing sequences of one or more than one whitespace character with a single space.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$arg"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "normalize-space(' The wealthy curled darlings of our nation. ')",
|
|
"output": "The wealthy curled darlings of our nation.'"
|
|
},
|
|
{
|
|
"command": "normalize-space(())",
|
|
"output": "''"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-normalize-space"
|
|
},
|
|
{
|
|
"name": "normalize-unicode()",
|
|
"description": "Returns the value of $arg normalized according to the normalization criteria for a normalization form identified by the value of $normalizationForm. The effective value of the $normalizationForm is computed by removing leading and trailing blanks, if present, and converting to upper case.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$arg"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$normalizationForm"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "normalize-unicode('test ')",
|
|
"output": "'test'"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-normalize-unicode"
|
|
},
|
|
{
|
|
"name": "upper-case()",
|
|
"description": "Returns the value of $arg after translating every character to its upper-case correspondent as defined in the appropriate case mappings section in the Unicode standard.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$arg"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "upper-case('abCd0')",
|
|
"output": "ABCD0"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-upper-case"
|
|
},
|
|
{
|
|
"name": "substring()",
|
|
"description": "Returns the value of $arg after translating every character to its lower-case correspondent as defined in the appropriate case mappings section in the Unicode standard.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$arg"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "lower-case('abCd0')",
|
|
"output": "abcd0"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-lower-case"
|
|
},
|
|
{
|
|
"name": "translate()",
|
|
"description": "Returns the value of $arg modified so that every character in the value of $arg that occurs at some position N in the value of $mapString has been replaced by the character that occurs at position N in the value of $transString.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$arg"
|
|
},
|
|
{
|
|
"type": "xs:string",
|
|
"description": "$mapString"
|
|
},
|
|
{
|
|
"type": "xs:string",
|
|
"description": "$mapString"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "translate('bar','abc','ABC')",
|
|
"output": "BAr"
|
|
},
|
|
{
|
|
"command": "translate('--aaa--','abc-','ABC')",
|
|
"output": "AAA"
|
|
},
|
|
{
|
|
"command": "translate('abcdabc', 'abc', 'AB')",
|
|
"output": "ABdAB"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-translate"
|
|
},
|
|
{
|
|
"name": "encode-for-uri()",
|
|
"description": "This function encodes reserved characters in an xs:string that is intended to be used in the path segment of a URI. It is invertible but not idempotent.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$uri-part"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "encode-for-uri('https://www.google.com')",
|
|
"output": "https%3A%2F%2Fwww.google.com"
|
|
},
|
|
{
|
|
"command": "concat('http://www.example.com/', encode-for-uri('~bébé'))",
|
|
"output": "http://www.example.com/~b%C3%A9b%C3%A9"
|
|
},
|
|
{
|
|
"command": "concat('http://www.example.com/', encode-for-uri('100% organic'))",
|
|
"output": "http://www.example.com/100%25%20organic"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-encode-for-uri"
|
|
},
|
|
{
|
|
"name": "iri-to-uri()",
|
|
"description": "This function converts an xs:string containing an IRI into a URI according to the rules spelled out in Section 3.1 of [RFC 3987]. It is idempotent but not invertible.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$iri"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "iri-to-uri ('http://www.example.com/00/Weather/CA/Los%20Angeles#ocean')",
|
|
"output": "http://www.example.com/00/Weather/CA/Los%20Angeles#ocean"
|
|
},
|
|
{
|
|
"command": "iri-to-uri ('http://www.example.com/~bébé')",
|
|
"output": "http://www.example.com/~b%C3%A9b%C3%A9"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-iri-to-uri"
|
|
},
|
|
{
|
|
"name": "escape-html-uri()",
|
|
"description": "This function escapes all characters except printable characters of the US-ASCII coded character set, specifically the octets ranging from 32 to 126 (decimal). The effect of the function is to escape a URI in the manner html user agents handle attribute values that expect URIs.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$uri"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "escape-html-uri('http://www.example.com/00/Weather/CA/Los Angeles#ocean')",
|
|
"output": "http://www.example.com/00/Weather/CA/Los Angeles#ocean'"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-escape-html-uri"
|
|
},
|
|
{
|
|
"name": "contains()",
|
|
"description": "Returns an xs:boolean indicating whether or not the value of $arg1 contains (at the beginning, at the end, or anywhere within) at least one sequence of collation units that provides a minimal match to the collation units in the value of $arg2, according to the collation that is used.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$arg1"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$arg2"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$collation"
|
|
}
|
|
],
|
|
"output": "xs:boolean",
|
|
"examples": [
|
|
{
|
|
"command": "contains( 'tattoo', 'tat')",
|
|
"output": "true"
|
|
},
|
|
{
|
|
"command": "contains( 'tattoo', 'ttt')",
|
|
"output": "false"
|
|
},
|
|
{
|
|
"command": "contains ( '', ())",
|
|
"output": "true"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-contains"
|
|
},
|
|
{
|
|
"name": "starts-with(()",
|
|
"description": "Returns an xs:boolean indicating whether or not the value of $arg1 starts with a sequence of collation units that provides a match to the collation units of $arg2 according to the collation that is used.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$arg1"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$arg2"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$collation"
|
|
}
|
|
],
|
|
"output": "xs:boolean",
|
|
"examples": [
|
|
{
|
|
"command": "starts-with('tattoo', 'tat')",
|
|
"output": "true"
|
|
},
|
|
{
|
|
"command": "starts-with('tattoo', 'ttt')",
|
|
"output": "false"
|
|
},
|
|
{
|
|
"command": "starts-with ( '', ())",
|
|
"output": "true"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-starts-with"
|
|
},
|
|
{
|
|
"name": "ends-with(()",
|
|
"description": "Returns an xs:boolean indicating whether or not the value of $arg1 starts with a sequence of collation units that provides a match to the collation units of $arg2 according to the collation that is used.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$arg1"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$arg2"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$collation"
|
|
}
|
|
],
|
|
"output": "xs:boolean",
|
|
"examples": [
|
|
{
|
|
"command": "ends-with('tattoo', 'too')",
|
|
"output": "true"
|
|
},
|
|
{
|
|
"command": "ends-with( 'tattoo', 'tatoo')",
|
|
"output": "false"
|
|
},
|
|
{
|
|
"command": "ends-with ( '', ())",
|
|
"output": "true"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-ends-with"
|
|
},
|
|
{
|
|
"name": "substring-before(()",
|
|
"description": "Returns the substring of the value of $arg1 that precedes in the value of $arg1 the first occurrence of a sequence of collation units that provides a minimal match to the collation units of $arg2 according to the collation that is used.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$arg1"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$arg2"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$collation"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "substring-before( 'tattoo', 'too')",
|
|
"output": "tat"
|
|
},
|
|
{
|
|
"command": "substring-before( 'tattoo', 'tat')",
|
|
"output": "''"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-substring-before"
|
|
},
|
|
{
|
|
"name": "substring-after()",
|
|
"description": "Returns the substring of the value of $arg1 that follows in the value of $arg1 the first occurrence of a sequence of collation units that provides a minimal match to the collation units of $arg2 according to the collation that is used.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$arg1"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$arg2"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$collation"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "substring-after( 'tattoo', 'too')",
|
|
"output": "''"
|
|
},
|
|
{
|
|
"command": "substring-after( 'tattoo', 'tat')",
|
|
"output": "too"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-substring-after"
|
|
},
|
|
{
|
|
"name": "matches()",
|
|
"description": "The function returns true if $input matches the regular expression supplied as $pattern as influenced by the value of $flags, if present; otherwise, it returns false.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$input"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$pattern"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$flags"
|
|
}
|
|
],
|
|
"output": "xs:boolean",
|
|
"examples": [
|
|
{
|
|
"command": "matches('abracadabra', 'bra')",
|
|
"output": "true"
|
|
},
|
|
{
|
|
"command": "matches('abracadabra', '^a.*a$')",
|
|
"output": "false"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-matches"
|
|
},
|
|
{
|
|
"name": "replace()",
|
|
"description": "The function returns the xs:string that is obtained by replacing each non-overlapping substring of $input that matches the given $pattern with an occurrence of the $replacement string.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$comparand1"
|
|
},
|
|
{
|
|
"type": "xs:string",
|
|
"description": "$startingLoc"
|
|
},
|
|
{
|
|
"type": "xs:string",
|
|
"description": "$replacement"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$flags"
|
|
}
|
|
],
|
|
"output": "xs:string",
|
|
"examples": [
|
|
{
|
|
"command": "replace('abracadabra', 'bra', '*')",
|
|
"output": "a*cada*"
|
|
},
|
|
{
|
|
"command": "replace('abracadabra', 'a.*a, '*')",
|
|
"output": "ada"
|
|
},
|
|
{
|
|
"command": "replace('AAAA', 'A+', 'b')",
|
|
"output": "b"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-replace"
|
|
},
|
|
{
|
|
"name": "tokenize()",
|
|
"description": "This function breaks the $input string into a sequence of strings, treating any substring that matches $pattern as a separator. The separators themselves are not returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$comparand1"
|
|
},
|
|
{
|
|
"type": "xs:string",
|
|
"description": "$pattern"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$flags"
|
|
}
|
|
],
|
|
"output": "xs:string* (One or more)",
|
|
"examples": [
|
|
{
|
|
"command": "tokenize('The cat sat on the mat', '\\s+')",
|
|
"output": "('The', 'cat', 'sat', 'on', 'the', 'mat')"
|
|
},
|
|
{
|
|
"command": "tokenize('1, 15, 24, 50', '\\s*')",
|
|
"output": "('1', '15', '24', '50')"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-tokenize"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Number",
|
|
"entries": [
|
|
{
|
|
"name": "avg()",
|
|
"description": "Returns the number of items in the value of $arg. Returns 0 if $arg is the empty sequence.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:anyAtomicType* (One or more)",
|
|
"description": "$arg"
|
|
}
|
|
],
|
|
"output": "xs:anyAtomicType",
|
|
"examples": [
|
|
{
|
|
"command": "avg(//u:User/@Id)",
|
|
"output": "2.6"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-avg"
|
|
},
|
|
{
|
|
"name": "max()",
|
|
"description": "Selects an item from the input sequence $arg whose value is greater than or equal to the value of every other item in the input sequence. If there are two or more such items, then the specific item whose value is returned is ·implementation dependent·.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:anyAtomicType* (One or more)",
|
|
"description": "$arg"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$collation"
|
|
}
|
|
],
|
|
"output": "xs:anyAtomicType",
|
|
"examples": [
|
|
{
|
|
"command": "max(//u:User/@Id)",
|
|
"output": "5"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-max"
|
|
},
|
|
{
|
|
"name": "min()",
|
|
"description": "Selects an item from the input sequence $arg whose value is less than or equal to the value of every other item in the input sequence. If there are two or more such items, then the specific item whose value is returned is ·implementation dependent·.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:anyAtomicType* (One or more)",
|
|
"description": "$arg"
|
|
},
|
|
{
|
|
"type": "xs:string? (Optional)",
|
|
"description": "$collation"
|
|
}
|
|
],
|
|
"output": "xs:anyAtomicType",
|
|
"examples": [
|
|
{
|
|
"command": "min(//u:User/@Id)",
|
|
"output": "1"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-min"
|
|
},
|
|
{
|
|
"name": "sum()",
|
|
"description": "Returns a value obtained by adding together the values in $arg. If $zero is not specified, then the value returned for an empty sequence is the xs:integer value 0. If $zero is specified, then the value returned for an empty sequence is $zero. Any values of type xs:untypedAtomic in $arg are cast to xs:double. The items in the resulting sequence may be reordered in an arbitrary order. The resulting sequence is referred to below as the converted sequence.",
|
|
"arguments": [
|
|
{
|
|
"type": "xs:anyAtomicType* (One or more)",
|
|
"description": "$arg"
|
|
},
|
|
{
|
|
"type": "xs:anyAtomicType? (Optional)",
|
|
"description": "$zero"
|
|
}
|
|
],
|
|
"output": "xs:anyAtomicType",
|
|
"examples": [
|
|
{
|
|
"command": "sum(//u:User/@Id)",
|
|
"output": "26"
|
|
}
|
|
],
|
|
"documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-sum"
|
|
}
|
|
]
|
|
}
|
|
] |