XSLT 2.0 allows you to declare:
The type of variables.
The return type of templates.
The type of sequences (constructed with xsl:sequence)
The return type of (user-declared) functions.
Both the type and required type of parameters.