Returns the simple type of item, as a schema component, if any.
If the item has a complex type rather than a simple 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 simple type of its
root element.
If the item is an element node, the result is the simple type of
its element declaration.
If the item is an attribute node, the result is the simple type of its
attribute declaration.
If the item is a schema component, the result is the associated
simple type schema component.
If the item is an atomic value, the result is the simple type of that
atomic value.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.