Changes

Jump to navigation Jump to search
918 bytes added ,  12:47, 15 November 2019
=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,551

edits

Navigation menu