Fixed XSLT issue uncovered by a recent Microsoft Edge release

This commit is contained in:
Jeff Parsons 2015-12-13 11:06:38 -08:00
commit 51d187f145
14 changed files with 1027 additions and 1000 deletions

View file

@ -403,6 +403,14 @@ function embedMachine(sName, sVersion, idElement, sXMLFile, sXSLFile, sStateFile
xsltProcessor['importStylesheet'](xsl);
var eFragment = xsltProcessor['transformToFragment'](xml, window.document);
if (eFragment) {
/*
* This fails in Microsoft Edge...
*
var machine = eFragment.getElementById(idElement);
if (!machine) {
displayError("machine generation failed: " + idElement);
} else
*/
if (eMachine.parentNode) {
eMachine.parentNode.replaceChild(eFragment, eMachine);
doneMachine();

View file

@ -8,6 +8,8 @@
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template name="commonStyles">
<meta charset="utf-8"/>
<link rel="shortcut icon" href="/versions/images/current/favicon.ico" type="image/x-icon"/>

View file

@ -8,6 +8,8 @@
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template name="documentStyles">
<link rel="stylesheet" type="text/css" href="document.css"/>
</xsl:template>

View file

@ -7,7 +7,7 @@
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output doctype-system="about:legacy-compat"/>
<xsl:output doctype-system="about:legacy-compat" method="html"/>
<xsl:include href="common.xsl"/>
<!-- There is no "shared" components.xsl, so we just pick one to eliminate IDE inspection warnings -->

View file

@ -7,7 +7,7 @@
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output doctype-system="about:legacy-compat"/>
<xsl:output doctype-system="about:legacy-compat" method="html"/>
<xsl:include href="common.xsl"/>
<!-- There is no "shared" components.xsl, so we just pick one to eliminate IDE inspection warnings -->

View file

@ -7,7 +7,7 @@
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output doctype-system="about:legacy-compat"/>
<xsl:output doctype-system="about:legacy-compat" method="html"/>
<xsl:include href="common.xsl"/>
<xsl:include href="document.xsl"/>