As far as I can tell the problem is caused by the attempt (in an included stylesheet) to use
<msxsl:script language="JScript" implements-prefix="exsl">
this['node-set'] = function (x) {
return x;
}
</msxsl:script>
to get MSXML, the XSLT processor used by IE and Edge, to support the exsl:node-set
extension function. That code using msxsl:script
works in IE but does not seem to be supported in Edge, probably because they disabled msxsl:script
for security reasons or because their new, leaner architecture in Edge does not support it (I am guessing about the reasons, I have never seen any documentation on Edge/MSXML saying that msxsl:script
is not supported and why). For what it's worth, I have now tried to file that issue on Microsoft Edge at https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7598626/.
There is no easy way out, with stylesheets as complex as you have them and authored by others I guess you need to ask the authors whether they are aware of the Edge problem and are working on a fix or whether they have informed Microsoft about the problem that it is an established XSLT hack to use msxsl:script
to enforce exsl:node-set
compatibility across XSLT 1.0 processors which is now broken in Edge.
As a quick fix you could try to uncomment the msxsl:script
block in the imported stylesheet and then replace
<xsl:template name="xml-to-string">
<xsl:param name="node-set" select="."/>
<xsl:apply-templates select="exsl:node-set($node-set)/*" mode="xml-to-string">
<xsl:with-param name="depth" select="1"/>
</xsl:apply-templates>
</xsl:template>
with
<xsl:template name="xml-to-string">
<xsl:param name="node-set" select="."/>
<xsl:choose>
<xsl:when test="function-available('msxsl:node-set')">
<xsl:apply-templates select="msxsl:node-set($node-set)/*" mode="xml-to-string">
<xsl:with-param name="depth" select="1"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="exsl:node-set($node-set)/*" mode="xml-to-string">
<xsl:with-param name="depth" select="1"/>
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
I have not tested whether that solves the problem for the particular input document and obviously not whether it breaks things for other input documents.