diff --git a/.gitignore b/.gitignore index 27caef2ee05e97794a99f1a936993406f937f026..af6ab7af07e1bafeae0e725b50906576067ed045 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ dcc-viewer/node_modules/ node_modules/ coverage/ + +dist/ diff --git a/data/sin_acceleration_example_dcc_WithExampleConformatyStatmentXLT.xml b/data/sin_acceleration_example_dcc_WithExampleConformatyStatmentXLT.xml index 12778ad98b4e9cd649d3e768066468c72ce217b6..c4b2794dd9324ebffedcdd0a1020f25fe0026302 100644 --- a/data/sin_acceleration_example_dcc_WithExampleConformatyStatmentXLT.xml +++ b/data/sin_acceleration_example_dcc_WithExampleConformatyStatmentXLT.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="https://ptb.de/dcc https://gitlab1.ptb.de/digitaldynamicmeasurement/dccanddsischemawithoutdepricatedelements/-/raw/main/dcc.xsd" schemaVersion="3.3.0"> - <!-- Embedded XSLT stylesheet --> + <!-- Embedded XSLT stylesheet for production --> <xsl:stylesheet id="embeddedXSL" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common"> @@ -19,21 +19,24 @@ <head> <meta charset="UTF-8"/> <title>DCC Viewer</title> + <!-- Link to production CSS --> <link rel="stylesheet" type="text/css" href="http://141.25.102.20:5173/dist/style.css"/> </head> <body> <div id="app"></div> - <!-- Output the entire XML into a hidden script block as plain text --> + <!-- Output the certificate XML into a hidden script block --> <script id="xmlContent" type="application/xml"> <xsl:copy-of select="dcc:digitalCalibrationCertificate"/> </script> <!-- Load the production bundle and initialize the app --> <script type="module"> - <![CDATA[import { init } from 'http://localhost:5173/src/app.js'; -const xmlNode = document.getElementById('xmlContent').firstChild; -const xmlStr = new XMLSerializer().serializeToString(xmlNode); -console.log('Serialized XML:', xmlStr); -init(xmlStr, { containerId: 'app', language: 'en' });]]> + <![CDATA[ + import { init } from 'http://141.25.102.20:5173/dist/dccviewer-js.es.js'; + const xmlNode = document.getElementById('xmlContent').firstChild; + const xmlStr = new XMLSerializer().serializeToString(xmlNode); + console.log('Serialized XML:', xmlStr); + init(xmlStr, { containerId: 'app', language: 'en' }); + ]]> </script> </body> </html>