Hi Gajendra, You do not have to declare the object a. I think you shall try to be more familiar with M2T Acceleo syntax language. In MTL specification language derived from OCL specification language it exists mechanism for model navigation with the usage of self keyword. In MTL there is variables (iterators)which can help you. So in your code : [for(cur:requirement::CurrentRequirement | a.getRequirementList())]<drop/> <== Replace a by self if you want the requirement list of element in gendoc2 context <context model='c:/path/yourmodel.uml' /> [cur.identifier/] <richText>[cur.shortDescription/]</richText> <== in for declaration the iterator 'cur' has been declared so it can be used #EndText [for(al:requirement::AttributeLink|cur.attribute)]<drop/> <== the same for 'al' [if (al.value.eClass().name='Requirement')][al.name/<http://al.name/><http://al.name/>] [al.value.oclAsType(ttm::Requirement).ident/][/if][/for] [for(ta:requirement::TextAttribute|cur.attribute)]<drop/> [if not (ta.value='')][ta.name/<http://ta.name/><http://ta.name/>] <richText>[ta.value/]</richText>[/if][/for] [/for]
Regards Tristan FAURE Tristan Faure Software Engineer T : +33(0)5 34 36 34 46 [email protected]<mailto:[email protected]> 6, impasse Alice Guy - BP 43045 31024 Toulouse Cedex 3 www.Atos.net<http://www.atos.net/> [atos_logotype.gif] De : [email protected] [mailto:[email protected]] De la part de Topcased user list where issues are discussed Envoyé : mardi 2 août 2011 23:26 À : [email protected] Objet : [Topcased-users] Topcased gendoc syntax Hi Tristan, Thanks for your response and reference. As I have mentioned in the previous mail I do have the gendoc pdf from Topcased, I have already seen it and tried. Still, I can't figure out how to declare the object "a" in question. I do know that it is the model to which requirements are attached but what is it? a. Is it the name of the sysmldi file? b. Is it the name of the diagram? c. Is it the name of the requirement file? d. Is it the name of the package which contains the requirements? What is the object and how to declare it? Can you please provide the syntax? I can't figure this out. Hope you got to the nature of the problem. If the question is still not clear let me know. Regards, Gajendra Kashyap Hi Gajendra, A is an element in the model. Did you consult the gendoc2 tutorial ? When you use gendoc2, you have to define a context to browse your model if you want to reuse the script you received in a gendoc tag, you shall replace 'a' by 'self' the keyword representing the current element. Actually the code 'a.getRequirementList' get the current requirements linked to an element in the model. Don't hesitate if you have more questions. Regards Tristan Tristan Faure Software Engineer T : +33(0)5 34 36 34 46<tel:%2B33%280%295%2034%2036%2034%2046> [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>> 6, impasse Alice Guy - BP 43045 31024 Toulouse Cedex 3 www.Atos.net<http://www.atos.net/><http://www.atos.net/> [atos_logotype.gif] De : [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] De la part de Topcased user list where issues are discussed Envoy? : samedi 30 juillet 2011 12:10 ? : [email protected]<mailto:[email protected]> Objet : [Topcased-users] Document generation from Topcased Hi, I need a bit of help in generating a requirement document from the requirement model created in Topcased. I have received a small script which I received but I can't figure out the whole stuff due to lack of proper documentation of the API. Unfortunately I've not received a response from the person who sent me this script. Can somebody help me figure out how to declare and use "a" in the first line of this script part? [for(cur:requirement::CurrentRequirement | a.getRequirementList())]<drop/> [cur.identifier/] <richText>[cur.shortDescription/]</richText> #EndText [for(al:requirement::AttributeLink|cur.attribute)]<drop/> [if (al.value.eClass().name='Requirement')][al.name/<http://al.name/><http://al.name/>] [al.value.oclAsType(ttm::Requirement).ident/][/if][/for] [for(ta:requirement::TextAttribute|cur.attribute)]<drop/> [if not (ta.value='')][ta.name/<http://ta.name/><http://ta.name/>] <richText>[ta.value/]</richText>[/if][/for] [/for] I've already seen the Topcased pdf available on the website but I'm not able to proceed by that. Can the developers provide documentation on the APIs involved and the objects used in the document generation? Thanks for the help. Kind Regards, Gajendra __________ ________________________________ Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos ne pourra être engagée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être engagée pour tout dommage résultant d'un virus transmis. This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
<<inline: image001.gif>>
<<inline: image002.gif>>
_______________________________________________ Topcased-users mailing list [email protected] http://lists.gforge.enseeiht.fr/cgi-bin/mailman/listinfo/topcased-users
