All data is typed according to XML Schema Part 2: Datatypes.
A schema specifies the types
If no schema is available, the default complex type is xs:anyType
and the default simple type is
xdt:untypedAtomic
Operators and functions are type-aware; e.g. can't add a string to a double or compare an integer to a year.
Constructors and casts are are available to convert data to appropriate types
Automatic casting is sometimes performed on untyped data, but can fail