Subtype substitution

Subtype substitution is the use of a value whose type is derived from an expected type.

Subtype substitution does not change the actual type of a value. For example, if an xs:integer value is used where an xs:decimal value is expected, the value retains its type as xs:integer.

Subtype substitution is used whenever a value that is derived from an expected type is passed to an expression.