Bug 484188 - gendoc template language should be unified
Summary: gendoc template language should be unified
Status: NEW
Alias: None
Product: Gendoc
Classification: Modeling
Component: Core (show other bugs)
Version: 0.5RC1   Edit
Hardware: PC Windows 8
: P3 enhancement
Target Milestone: 1.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-11 05:56 EST by Romain Guider CLA
Modified: 2018-02-06 06:17 EST (History)
1 user (show)

See Also:


Attachments
example template (18.89 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-12-11 05:56 EST, Romain Guider CLA
no flags Details
screenshot of a template using Word fields. (234.29 KB, image/png)
2015-12-11 10:40 EST, Romain Guider CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Romain Guider CLA 2015-12-11 05:56:53 EST
Created attachment 258603 [details]
example template

Gendoc's language would benefit from a unified definition of it's own:  
- it currently is a mix of acceleo and a tag vocabulary that is gendoc's. This makes the learning curve steeper than necessary. Plus, gendoc language definition depends on Acceleo's roadmap which makes roadmap management potentially complex. Not talking about the fact that, as a template writer, you have to watch at two projects to ensure youre templates still compile.
- the gendoc template language would benefit from the AQL query language employed in Sirius for the same reasons as Sirius : simplify the writing of queries, ignoring null values, etc.
- last, the fact that gendoc has a language definition of it's own would allow the use of Word's field codes to implement the gendoc vocabulary. This would allows a clean separation between template's parts and the document's parts. This would ease parsing a lot.

A last advantage of using Word field codes is that it makes it possible to configure Word's menus to contain the gendoc vocabulary and ease the edition of templates for newcomers and non technical people. 

The attached docx provides an exemple of what could be such a language. Besides this the tag vocabulary has been added to the Quickpart menu so that template edition benefits from an assistance that is very simple to provide and precious to use.
Comment 1 Romain Guider CLA 2015-12-11 10:39:26 EST
In order to see the Word fields, the display must be in a mode where field's code are displayed instead of their content. hit Alt-F9 to get in this mode. Alternatively, I provide a screeshot of the template.
Comment 2 Romain Guider CLA 2015-12-11 10:40:25 EST
Created attachment 258622 [details]
screenshot of a template using Word fields.
Comment 3 Antonio Campesino CLA 2018-02-06 06:17:06 EST
That is something I have been thinking about, at least to provide the gendoc tags as fields in Word templates.

What I don't agree at all is to use Sirius AQL. Rigth now, acceleo and Gendoc use an OMG standard language for the Model-to-text generation:

http://www.omg.org/spec/MOFM2T

The uses of MOFM2T is an advantage over a proprietary language such as AQL.

That it could be a new feature for Gendoc v0.8 / 1.0