element(ElementName, TypeName) matches a (non-nilled) element named ElementName with the type TypeName.
element(ElementName, TypeName?) is the same, but will also match nilled elements.
In element tests, a type matches the specified type or any type derived from it. So r:DrinkRecipe matches r:Recipe, for example.