parent is

operator

Return type:
Switch
Returns:
Returns true if the element has the specified parent, and false otherwise. Replacing is with isnt reverses the result.
Syntax
parent (of element-expression)? (is | isnt) namespace-modifier? (element-name | element-name-list)
    


Purpose

parent is tests whether the parent of the current element of 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.

If element-expression is not specified, the test applies to the parent element of the current element. If element-expression is specified, the test applies to the parent element of the element specified by element-expression.

You can specify the name dynamically by using the identity operator (~) followed by a string expression: for example, to check for elements with a parent of the same name as the current element,

  element #implied when parent is ~(name of element)
     suppress