Skip to content


Used to construct a new map.

Available in XSLT 3.0. From Saxon 9.8, available in all editions. Implemented in Saxon-PE and Saxon-EE since Saxon 9.6.

  • Category: instruction
  • Content: sequence-constructor
  • Permitted parent elements: any XSLT element whose content model is sequence-constructor; any literal result element
  • Element has no attributes


The sequence constructor must evaluate to a sequence of maps. These can be constructed using xsl:map-entry elements.


Example 1

<xsl:variable name="week" as="map(xs:string, xs:string)">
        <xsl:map-entry key="'Mo'" select="'Monday'"/>
        <xsl:map-entry key="'Tu'" select="'Tuesday'"/>
        <xsl:map-entry key="'We'" select="'Wednesday'"/>
        <xsl:map-entry key="'Th'" select="'Thursday'"/>
        <xsl:map-entry key="'Fr'" select="'Friday'"/>
        <xsl:map-entry key="'Sa'" select="'Saturday'"/>
        <xsl:map-entry key="'Su'" select="'Sunday'"/>

Example 2

<xsl:variable name="index" as="map(xs:string, element(employee))">
        <xsl:for-each select="//employee">
            <xsl:map-entry key="@empNr" select="."/>

See also