<commit_before>/* ©Copyright Utrecht University (Department of Information and Computing Sciences) */

var Save;

(function()
{
    "use strict";

    Save =
    {
        exportScenario: exportScenario,
        getStartNodeIDs: getStartNodeIDs
    };

    var xmlNameSpace = "http://www.w3.org/XML/1998/namespace";

    $(document).ready(function()
    {
        $("#exportScenario").on('click', exportScenario);
    });

    // Generates the XML
    function generateXML()
    {
        var sortedTrees = sortTrees(Main.trees);

        var nameSpace = "urn:uurage-temporary";
        var doc = document.implementation.createDocument(nameSpace, 'scenario', null);
        
        if (Metadata.metaObject.version !== null)
        {
            if (Main.unsavedChanges) Metadata.metaObject.version++;
            doc.documentElement.setAttribute("version", Metadata.metaObject.version);
        }
        doc.documentElement.setAttribute("schemaVersion", 4);
        doc.documentElement.setAttribute("configidref", Config.configObject.id);

        // Save definitions
        generateDefinitionsXML(doc.documentElement, nameSpace);

        // Save metadata
        var metadataEl = addAndReturnElement("metadata", nameSpace, doc.documentElement);
        addAndReturnElement("name", nameSpace, metadataEl).textContent = Metadata.metaObject.name;
        addAndReturnElement("date", nameSpace, metadataEl).textContent = new Date().toISOString();
        addAndReturnElement("description", nameSpace, metadataEl, true).textContent = Metadata.metaObject.description;
        addAndReturnElement("difficulty", nameSpace, metadataEl).textContent = Metadata.metaObject.difficulty;
<commit_msg>Switched over to new namespace<commit_after>/* ©Copyright Utrecht University (Department of Information and Computing Sciences) */

var Save;

(function()
{
    "use strict";

    Save =
    {
        exportScenario: exportScenario,
        getStartNodeIDs: getStartNodeIDs
    };

    var xmlNameSpace = "http://www.w3.org/XML/1998/namespace";

    $(document).ready(function()
    {
        $("#exportScenario").on('click', exportScenario);
    });

    // Generates the XML
    function generateXML()
    {
        var sortedTrees = sortTrees(Main.trees);

        var nameSpace = "http://uudsl.github.io/scenario/namespace";
        var doc = document.implementation.createDocument(nameSpace, 'scenario', null);
        
        if (Metadata.metaObject.version !== null)
        {
            if (Main.unsavedChanges) Metadata.metaObject.version++;
            doc.documentElement.setAttribute("version", Metadata.metaObject.version);
        }
        doc.documentElement.setAttribute("schemaVersion", 4);
        doc.documentElement.setAttribute("configidref", Config.configObject.id);

        // Save definitions
        generateDefinitionsXML(doc.documentElement, nameSpace);

        // Save metadata
        var metadataEl = addAndReturnElement("metadata", nameSpace, doc.documentElement);
        addAndReturnElement("name", nameSpace, metadataEl).textContent = Metadata.metaObject.name;
        addAndReturnElement("date", nameSpace, metadataEl).textContent = new Date().toISOString();
        addAndReturnElement("description", nameSpace, metadataEl, true).textContent = Metadata.metaObject.description;
        addAndReturnElement("difficulty", nameSpace, metadataEl).textContent = Metadata.metaObject.difficulty;

{'fraction_non_alphanumeric': 0.11725146198830409, 'fraction_numerical': 0.0035087719298245615, 'mean_word_length': 3.2977386934673367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1021281', 'n_tokens_mistral': 925, 'n_tokens_neox': 897, 'n_words': 170}