Changes

Jump to navigation Jump to search
944 bytes added ,  12:47, 15 November 2019
|-
| '''Summary'''
|Returns function items for all user-defined functions (both public and private) that are known in the current query context. If a {{Code|$uri}} is specified, the addressed module specified resource will be retrieved as string and compiled, and its functions will be added to the query context and returned to the user. A relative URI will be resolved against the static base URI of the query.
|-
|'''Examples'''
=Documentation=
 
==inspect:type==
 
{{Mark|Introduced with Version 9.3:}}
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|inspect:type|$value as item()*|xs:string}}
|-
| '''Summary'''
|Returns a string representation of the type of a value:
* The string includes the occurrence indicator.
* The type of functions and nodes may be stricter than the returned type.
* For type checking, the standard expressions {{Code|typeswitch}} and {{Code|instance of}} should be used instead.
|-
| '''Examples'''
|
* <code>inspect:type(1 to 100)</code> returns <code>xs:integer+</code>
* <code>inspect:type(map { 'a': (1, 2)[. = 1] })</code> returns <code>map(*)</code>; a stricter type representation would be <code>map(xs:string, xs:string)</code>
* <code>inspect:type(<a/>)</code> returns <code>element()</code>; a stricter type representation would be <code>element(a)</code>
|}
==inspect:function==
=Changelog=
 
;Version 9.3
* Added: [[#inspect:type|inspect:type]]
;Version 8.5
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu