mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
0ee2ffc6bc
Differential Revision: https://phabricator.services.mozilla.com/D20581 --HG-- extra : moz-landing-system : lando
15 lines
578 B
HTML
15 lines
578 B
HTML
<html>
|
|
<script>
|
|
var xml = "<e/>";
|
|
var xsl = "<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"><xsl:decimal-format grouping-separator=\".\" /><xsl:template match=\"/\"><xsl:value-of select=\"format-number(0.1, '.#')\"/></xsl:template></xsl:stylesheet>";
|
|
|
|
var parser = new DOMParser();
|
|
var xmlDoc = parser.parseFromString(xml, "text/xml");
|
|
var xslDoc = parser.parseFromString(xsl, "text/xml");
|
|
|
|
xsltProcessor = new XSLTProcessor();
|
|
xsltProcessor.importStylesheet(xslDoc);
|
|
var result = xsltProcessor.transformToDocument(xmlDoc);
|
|
</script>
|
|
</html>
|