Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QXmlQuery XSLT 2.0



  • Hi;

    Does QXmlQuery(XSLT20) support xsl:for-each-group ? When I use it then following error occured by xmlpatterns tool;

    "The element with local name for-each-group does not exist in XSL-T."

    Thanks for your support.



  • Late reply, but for anyone else still encountering this issue: as of Qt 5.12, this issue is still present.

    It seems that Qt simply does not support xsl:for-each-group. That was also the result of a 2013 blog post where somebody analyzed this issue.

    There are some limited ways to achieve the same functionality without xsl:for-each-group, see here. But this did not work for me due to a bug in Qt's XSLT variable binding. Finally I resorted to avoid even a xsl:for-each loop because the order and identity of the groups was known initially. See my code. Unfortunately Qt XSLT is barely useful as of Qt 5.12; like they say, the implementation is "experimental".


Log in to reply