DocGen

MDWorkbench offers a template-based approach to generate Microsoft WordŽ documents and Open documents. A Doc Template is designed using a Microsoft WordŽ XML file, Microsoft WordŽ docx file or OpenDocument odt file which contains placeholders for data to be extracted from models. These placeholders are essentially expressions specified for metamodel entities with queries and patterns being the primary mechanisms for selecting and extracting the values from models.

Doc Templates use markups to distinguish static text from dynamic code. You design the template like a regular document, with some extra markups to generate dynamic contents.

We invite you to follow the Documentation Tutorial as an introduction.

Example

[#parameters]in model : uml21[/#parameters]
[#file]generated/output.xml[/#file]
UML model documentation
[#foreach class in model.getInstances("Class")]
    Class: ${class.name}
[/#foreach]

Prerequisites  
Edit and View Editing or viewing a doc template requires either:
  • Microsoft Office 2007 or higher for .docx files
  • Microsoft Office WordŽ 2003 or higher for .xml files
  • Open Document compliant authoring tool (e.g. OpenOffice, IBM Lotus Symphony, Google Docs, etc.) for .odt files
Generate Running a doc template generation is a standalone process and does not require authoring tool at all.