Issue 14031: current version of the specification doesn't allow for any "post-processing" of the generated text. (mtt-rtf) Source: (, ) Nature: Enhancement Severity: Significant Summary: The current version of the specification doesn't allow for any "post-processing" of the generated text. I can see two potential needs of post-processing : 1) template level. As well as users can specify guards and overrides, They should be offered the possibility to specify a "post" action in the form of a template or operation call that would be executed on the whole generated text (except for those nested within [file] blocks, see point 2)). For example, I could be defining a template that generates the text pertaining to the body of a Java Class. I might want to trim this text from all surrounding whitespaces before generating and returning it. This would make something like (on UML Class) : [template public classBody(clazz : Class) post (trim())] ... [/template] Such a feature would allow for more readable templates as the user wouldn't be forced to trim() everywhere this template is used. 2) file level. Users might want to call something as a post-processing of a file generation. The most obvious example is the call for a code formatter after a code generation. As above, this would give something like : [file ('Class.java', false) post (format())/] ... [/file] Resolution: Revised Text: Actions taken: June 25, 2009: received issue Discussion: End of Annotations:===== m: webmaster@omg.org Date: 25 Jun 2009 06:02:29 -0400 To: Subject: Issue/Bug Report -------------------------------------------------------------------------------- Name: Laurent Goubet Company: Obeo mailFrom: laurent.goubet@obeo.fr Notification: Yes Specification: MOF Model to Text Transformation Language (MOFM2T) Section: none FormalNumber: formal/2008-01-16 Version: 1.0 RevisionDate: 01/16/08 Page: none Nature: Enhancement Severity: Significant HTTP User Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9) Gecko/2008052912 Firefox/3.0 Description The current version of the specification doesn't allow for any "post-processing" of the generated text. I can see two potential needs of post-processing : 1) template level. As well as users can specify guards and overrides, They should be offered the possibility to specify a "post" action in the form of a template or operation call that would be executed on the whole generated text (except for those nested within [file] blocks, see point 2)). For example, I could be defining a template that generates the text pertaining to the body of a Java Class. I might want to trim this text from all surrounding whitespaces before generating and returning it. This would make something like (on UML Class) : [template public classBody(clazz : Class) post (trim())] ... [/template] Such a feature would allow for more readable templates as the user wouldn't be forced to trim() everywhere this template is used. 2) file level. Users might want to call something as a post-processing of a file generation. The most obvious example is the call for a code formatter after a code generation. As above, this would give something like : [file ('Class.java', false) post (format())/] ... [/file] Subject: RE: issue 14031 -- MOF Model to Text RTF issue Date: Wed, 8 Jul 2009 09:14:34 -0700 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: issue 14031 -- MOF Model to Text RTF issue Thread-Index: Acn/KlhgK866v4yaRlmlpw8O/pl2TgAvLh1Q From: "Pete Rivett" To: IMHO this sort of enhancement is out of scope for an RTF. Pete From: Juergen Boldt [mailto:juergen@omg.org] Sent: 07 July 2009 10:41 To: issues@omg.org; mtt-rtf@omg.org Subject: issue 14031 -- MOF Model to Text RTF issue From: webmaster@omg.org Date: 25 Jun 2009 06:02:29 -0400 To: Subject: Issue/Bug Report -------------------------------------------------------------------------------- Name: Laurent Goubet Company: Obeo mailFrom: laurent.goubet@obeo.fr Notification: Yes Specification: MOF Model to Text Transformation Language (MOFM2T) Section: none FormalNumber: formal/2008-01-16 Version: 1.0 RevisionDate: 01/16/08 Page: none Nature: Enhancement Severity: Significant HTTP User Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9) Gecko/2008052912 Firefox/3.0 Description The current version of the specification doesn't allow for any "post-processing" of the generated text. I can see two potential needs of post-processing : 1) template level. As well as users can specify guards and overrides, They should be offered the possibility to specify a "post" action in the form of a template or operation call that would be executed on the whole generated text (except for those nested within [file] blocks, see point 2)). For example, I could be defining a template that generates the text pertaining to the body of a Java Class. I might want to trim this text from all surrounding whitespaces before generating and returning it. This would make something like (on UML Class) : [template public classBody(clazz : Class) post (trim())] ... [/template] Such a feature would allow for more readable templates as the user wouldn't be forced to trim() everywhere this template is used. 2) file level. Users might want to call something as a post-processing of a file generation. The most obvious example is the call for a code formatter after a code generation. As above, this would give something like : [file ('Class.java', false) post (format())/] ... [/file] Juergen Boldt Director, Member Services Object Management Group 140 Kendrick St Building A Suite 300 Needham, MA 02494 USA tel: +1 781 444 0404 x 132 fax: +1 781 444 0320 email: juergen@omg.org www.omg.org