The XSLT 4.0 Community Draft

XSLT, XPath and XQuery 4.0 are drafts of the W3C XQuery and XSLT Extensions Community Group (QT4CG, qt4cg.org (https://qt4cg.org/)); the editor's draft is dated 29 September 2026, the last stable snapshot 28 January 2026, and none is on the Recommendation track, so XSLT 3.0 remains the standard. The draft adds xsl:switch, xsl:array and xsl:array-member, xsl:record-type and xsl:item-type for named types, xsl:select, and JNodes for navigating maps and arrays like XML trees. Saxon 13 726,956 (29 May 2026) implements 4.0 features in its commercial PE and EE editions only:

switch.xsl: an XSLT 4.0 xsl:switchXML
<xsl:stylesheet version="4.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/catalog">
    <xsl:switch select="string(book[1]//availability)">
      <xsl:when test="'in-stock'">ships today</xsl:when>
    </xsl:switch>
  </xsl:template>
</xsl:stylesheet>
Saxon-HE 13 rejects xsl:switch; BaseX 12.4 runs XPath 4.0 functions
d=~/xml-tools/saxon13 && mkdir -p $d && cd $d && v=SaxonHE13-0
[ -f ${v}J.zip ] ||
  curl -fsSLO https://github.com/Saxonica/Saxon-HE/releases/download/$v/${v}J.zip
unzip -oq ${v}J.zip && cd - > /dev/null
java -jar $d/saxon-he-13.0.jar -s:booknest-catalog.xml -xsl:switch.xsl 2>&1 | head -n 2
basex '"BN" => characters(), (1 to 5) => slice(2, 4), () otherwise "default"' | paste -sd' '
Output
Error on line 3 column 56 of switch.xsl:
  XTSE0010  Unknown XSLT instruction xsl:switch
B N 2 3 4 default

BaseX 693,830 already runs much of XPath and XQuery 4.0. Keep production stylesheets on 3.0 until the drafts settle.


XSLT 4 0

XSLT 4.0 is a superset of XSLT 3.0, under active development by the W3C's XQuery and XSLT Extensions Community Group (QT4CG) as a Community Group draft. It is not yet an official W3C Recommendation. The draft specification is published at https://qt4cg.org/specifications/xslt-40/Overview.html.

Among the instructions proposed for XSLT 4.0 are: As the specification is still evolving, the syntax, attributes, and full semantics of these instructions are subject to change before XSLT 4.0 reaches Recommendation status.