Changes

Jump to navigation Jump to search
834 bytes added ,  13:33, 27 August 2014
q
==Functions==
The following functions of the [http://www.w3.org/TR/xpath-functions-31/ XQuery 3.1 Functions and Operators] Working Draft have already been implementedadded. Please be aware that the functions are still subject to change:
* [[===Map Module|Map functions]]: <code>map:merge</code>, <code>map:size</code>, <code>map:keys</code>, <code>map:contains</code>, <code>map:get</code>, <code>map:entry</code>, <code>map:put</code>, <code>map:remove</code>, <code>map:for-each-entry</code>* [[Array Module|Array functions]]: <code>array:size</code>, <code>array:append</code>, <code>array:subarray</code>, <code>array:remove</code>, <code>array:insert-before</code>, <code>array:head</code>, <code>array:tail</code>, <code>array:reverse</code>, <code>array:join</code>, <code>array:for-each-member</code>, <code>array:filter</code>, <code>array:fold-left</code>, <code>array:fold-right</code>, <code>array:for-each-pair</code>* <code>fn:contains-token($input as xs:string*, $token as string, $collation as xs:string) as xs:boolean</code>: Checks if the input strings contain a given token.Functions===
New signatures have been added for the The following map functionsare now available:
<code>map:merge</code>, <code>map:size</code>, <code>map:keys</code>, <code>map:contains</code>, <code>map:get</code>, <code>map:entry</code>, <code>map:put</code>, <code>map:remove</code>, <code>map:for-each-entry</code> Please check out the [[Map Module]] for more details. ===Array Functions=== The following array functions are now available: <code>array:size</code>, <code>array:append</code>, <code>array:subarray</code>, <code>array:remove</code>, <code>array:insert-before</code>, <code>array:head</code>, <code>array:tail</code>, <code>array:reverse</code>, <code>array:join</code>, <code>array:for-each-member</code>, <code>array:filter</code>, <code>array:fold-left</code>, <code>array:fold-right</code>, <code>array:for-each-pair</code> Please check out the [[Array Module]] for more details. ===fn:contains-token=== ; Signatures* <code>fn:tokenizecontains-token($string input as xs:string*, $token as string) as xs:boolean</code>* <code>fn:contains-token($input as xs:string*, $token as string, $collation as xs:string) as xs:boolean</code> The supplied strings will be tokenized at whitespace boundaries. The function returns {{Code|true}} if one of the strings equals the supplied token, possibly under the rules of a supplied collation: Splits  <pre class="brush:xquery">contains-token(('a', 'b c', 'd'), 'c') (: yields true :)<xml class='one two'/>/contains-token(@class, 'one') (: yields true :)</pre> ===fn:format-number=== The function has been extended to support scientific notation: <pre class="brush:xquery">format-number(1984.42, '00.0E0') (: yields 19.8e2 :)</pre> ===fn:tokenize=== If no separator is specified, a string will be tokenized at whitespace boundaries.: <pre class="brush:xquery">fn:tokenize(" a b c d") (: yields "a", "b", "c", "d" :)</pre>
==Binary Data==
* Support for JSON: <code>fn:json-doc</code>, <code>fn:parse-json</code>
* New functions: <code>fn:collation-key</code>, <code>fn:load-module</code>, <code>fn:parse-ietf-date</code>, <code>fn:transform</code>
* Support for scientific notation: <code>format-number</code>
=Changelog=
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu