The Formal Semantics specification describes the static semantics of XPath.
The XPath 2.0 specification describes the dynamic semantics of XPath.
The XSLT 2.0 specification describes all of the semantics of XSLT.