doctype is

operator

Return type: Switch
Returns:        Returns true if the outermost element is the specified element, and false otherwise. Replacing is with isnt reverses the result.

Syntax
doctype (is | isnt) namespace-modifier? (element-name | element-name-list)
    


Purpose

doctype is tests whether the outermost element in the currently-active parse is an instance of the element element-name, or one of the elements listed in element-name-list. element-name-list is a parenthesized list of elements, separated by |. Replacing is with isnt will reverse these results.

You can specify an element name dynamically by using the identity operator (~) followed by a string expression.