MarkLogic Server 11.0 Product Documentation
sc:typesc:type(
[$arg as item()]
) as schema-type()?
Summary
Returns the type of item, as a schema component, if any.
If the item has no type, the empty sequence is returned.
The context item is used if no argument is given.
- If the item is a document node, the result is the type of its root element.
- If the item is an element node, the result is the type of its element declaration.
- If the item is an attribute node, the result is the type of its attribute declaration.
- If the item is a schema component, the result is the associated type schema component.
- If the item is an atomic value, the result is the type of that atomic value.
- In other cases, the result is the empty sequence.
Parameters |
arg |
The item whose type is to be returned.
|
Example
xdmp:describe(sc:type(47))
=> "#xs:integer"
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.