EnAr-Docs is a DSL for model-based documentation generation. Is designed to support the Enterprise Architecture process described by frameworks like TOGAF, to generate deliverables and artifacts based in model's content. EnAr-Docs uses EnAr-Analyse functions to query the models and generate the artifacts.
The language has instructions to define the basic structure of a document with: chapters, sections and content elements. Additionally, shares the hierarchy of objects with EnAr-Analyse to support the integration of result analysis.
Up to this date EnAr-Docs supports ECORE models, but it can be extended to support other type of models. In order to use a model inside the template you must use the following syntax:
Syntax:
importModel "absolute_path_to_the_model" as $model_alias conformTo "absolute_path_to_the_metamodel"
Example:
//imports a model conform to the MDLA metamodel importModel "D:/models/v1/MDLA.mdla" as $model conformTo "D:/models/v1/MDLA.ecore"
Imports the EnAr-Analyse function libraries that will be used to query the models, generate artifacts and analysis tasks.
Syntax:
importFunction "absolute_path_to_fuction_library.jar" as $function_library
Example:
//imports the core functions of EnAr-Analyse importFunction "D:/functions/core.jar" as $f_core
In construction
Sets the configuration options for the output document.
Syntax:
template { name: "document_name", output_dir: "path_for_output" }
Example:
template { name: "MDLA Architecture", output_dir: "D:/mdla/documents/" }
Adds one chapter to the document structure. A chapter can contain elements like text, images and sections, however a chapter cannot contain other chapters.
Syntax:
chapter { id: "identifier", //identifies the chapter (optional) title: "title" //title to display }
Example:
chapter { id: "chapt_ia", title: "Information architecture" }
Adds one section to the document structure, under a chapter or another section. Sections in the document can be nested, and provides the basic container for text, images and other containers like tables and lists.
Syntax:
section { id: "identifier", //identifies the section (optional) title: "title" //title to display parent: "parent_identifier" //indentifier of the section's parent (chapter or section id) }
Example:
section { id: "sect_ie", title: "Information Entities", parent: "chapt_ia" }
Adds a table container. Tables have rows, headers and data cells, wich can contain elements like text, images and lists. If the output document's format allows it, it can contains another tables.
Syntax:
table { id: "identifier", //identifier for the table (optional) title: "title", //title to display (optional) parent: "parent_identifier" //identifier of the table's parent (optional) } tr //row th //header cell element //content /th /tr tr td //data cell element //element /td /tr ... /table
Example:
//application portfolio table { title: "application portfolio" } tr th t{"Name"} /th th t{"Description"} /th th t{"Version"} /th /tr ... tr td t{app.name} /td td t{app.description} /td td t{app.version} /td /tr ... /table
Adds a list container. Lists have items and can be ordered or unordered.
Syntax:
list { id: "identifier", //identifier for the list (optional) title: "title", //title to display (optional) parent: "parent_identifier", //identifier of the list's parent (optional) type: "list_type" //type of list: "ordered" (1, 2, 3...) or "unordered" (bullets). Default is "unordered". } item element /item ... /list
Example:
//application portfolio list { title: "Applications list", type: "ordered" } ... item app.name /item ... /list
Project | Version | SVN |
---|---|---|
EnAr-Docs | 1.0 | SVN: http://minsky2.uniandes.edu.co/especiales/enar/Docs |