• Generate the HTML representation of the vocabulary, based on an HTML template file. The template file is parsed to create a DOM, which is manipulated using the standard DOM calls before stored.

    The template files have element with a predefined @id value at all points where some content must be added. Ie, the usual model in the code below is:

    const some_element = document.getElementById('properties');
    manipulate the subtree at 'some_element' to add content

    Parameters

    • vocab: Vocab

      The internal representation of the vocabulary

    • template_text: string

      The textual content of the template file

    • basename: string
    • context: boolean

      Whether a context file is also generated (if yes, some extra notes may appear in the output)

    Returns string