2.1.2.2.3 [XQuery1.0/2] Section 2.2.3.1 Expression Processing - Static Analysis Phase

XQuery in SQL Server supports the static analysis phase of expression processing. XQuery in SQL Server supports the static typing feature and raises the type error XPTY0004 if static analysis encounters a type error.