Used to declare whether a global context item is required, and if so, to declare its required type.

Category: declaration
Content: none
Permitted parent elements: xsl:package ; xsl:stylesheet ; xsl:transform




The required type of the global context item; the default is item().


"required" | "optional" | "absent"

Specifies whether a stylesheet module requires a global context item; the default is optional.

Notes on the Saxon implementation

Implemented since Saxon 9.7.

An earlier draft of the XSLT 3.0 specification defined attributes streamable and use-accumulators (to define which accumulators are available with the document containing the global context item) for xsl:global-context-item. These were briefly implemented in Saxon but have now been dropped.

Links to W3C specifications

XSLT 3.0 Specification