What are annotations?

Wikipedia defines an annotation as a metadatum (e.g. a post, explanation, markup) attached to location or other data. Their use in mainstream software engineering began in 2004 when Java 5 introduced them via JSR 175.

Annotations were added as part of XQuery 3.0 in 2014. The syntax is a "%" followed by an EQName and optionally a set of values. The specification simply states: XQuery uses annotations to declare properties associated with functions (inline or declared in the prolog) and variables.