Tristan,

Thanks, I got it to work. I didn't add a type to my iteration variable. The 
following works.

[gPut('a', Sequence{'x', 'y'})/]
[for (s: String | gGet('a'))]
[s/]
[/for]

- Lutz

-----Original Message-----
From: topcased-users-boun...@gforge.enseeiht.fr 
[mailto:topcased-users-boun...@gforge.enseeiht.fr] On Behalf Of Topcased user 
list where issues are discussed
Sent: Monday, March 12, 2012 6:48 AM
To: topcased-us...@gforge.enseeiht.fr
Subject: Re: [Topcased-users] Gendoc2 and multiple model files

Hi,
It is strange the oclAsType shall work did you try to put the result of your 
gGet in a [let/] ?

Regards

Tristan FAURE

-----Message d'origine-----
De : topcased-users-boun...@gforge.enseeiht.fr 
[mailto:topcased-users-boun...@gforge.enseeiht.fr] De la part de Topcased user 
list where issues are discussed
Envoyé : vendredi 9 mars 2012 20:54
À : topcased-us...@gforge.enseeiht.fr
Objet : Re: [Topcased-users] Gendoc2 and multiple model files

I would like to use list approach, but can't get it to work. It seems that gGet 
always returns OclAny, so you can't do anything with the result. In particular, 
it's not a sequence, so I can't append to it.

Here's what I tried:
<gendoc>
[gPut('a', Sequence{'x', 'y'})/] -- initialize a with a sequence [gGet('a')/] 
-- this generates the text xy [gPut('a', gGet('a').append('z'))/] -- this fails 
with an error that there's no operation append on type OclAny [for (s | 
gGet('a'))/] -- fails, with an error message invalid variable s, I assume 
because it can't iterate over OclAny [/for] </gendoc>

Is there a way to turn the result into a sequence again? I tried 
oclAsType(Sequence) and oclAsType(Sequence(String)), but they don't work.

Thanks,
Lutz

-----Original Message-----
From: topcased-users-boun...@gforge.enseeiht.fr 
[mailto:topcased-users-boun...@gforge.enseeiht.fr] On Behalf Of Topcased user 
list where issues are discussed
Sent: Monday, February 27, 2012 9:43 AM
To: topcased-us...@gforge.enseeiht.fr
Subject: Re: [Topcased-users] Gendoc2 and multiple model files

Himy remarks bellow,

-----Message d'origine-----
De : topcased-users-boun...@gforge.enseeiht.fr 
[mailto:topcased-users-boun...@gforge.enseeiht.fr] De la part de Topcased user 
list where issues are discussed Envoyé : lundi 27 février 2012 15:22 À : 
topcased-users@lists.gforge.enseeiht.fr
Objet : [Topcased-users] Gendoc2 and multiple model files

Hello

I have some models organized into a folder hierarchy in my project, and I'am 
wondering how can I produce one document with many of these model's files :

A - Combining the models into a Top, and including the parts I'm interested in 
with "Additional ressources" and playing with "package import"
     BUT I'm not, at first sight, sure that Gendoc engine will be able, this 
way, to find the external elements (that's the first potential issue) and find 
the associated diagrams (sic...)
    TRUE ?
[Tristan FAURE] this way shall work, the additional resources (and package 
imports) are totally navigable with Gendoc2 and the related diagrams are 
normally loaded.
This way is quite easy because you can have a "hat" model with only package 
imports. You declare in your template a query getting all the package import 
and you can iterate on this list.

B - Combining the models into the Gendoc template, by calling different models' 
contexts :
     BUT Without the fragments, I need to copy/paste my template code ;(
     AND I need to write my models list down into the template...
     IS there a way to create a list of models (in an environment variable, for 
example) and iterating over this var inside the template ?
[Tristan FAURE] You can also have this kind of code <context model='A'/> 
<gendoc>gPut(gGet('myList').add(self))</gendoc>
<context model='B'/>
<gendoc>gPut(gGet('myList').add(self))</gendoc>
<context model='C'/>
<gendoc>gPut(gGet('myList').add(self))</gendoc>
And finally
<context model='A'/>
<gendoc>
[for (element | gGet('myList'))]
 // code of your template
[/for]
</gendoc>


C - Generating the Template from Another Template
     as a workaround, this would only need to escape the <gendoc> tags ... no ?
[Tristan FAURE] We never tried but I think this could not be possible

D - Other ?

Any idea welcome

Best regards
[Tristan FAURE] Regards
Tristan FAURE
Cedric Gava

@Tristan : Thank you for your last answer, I'am impatient to test the new 
<fragment> feature... on Topcased models (not papyrus one's) :p 
_______________________________________________
Topcased-users mailing list
Topcased-users@lists.gforge.enseeiht.fr
http://lists.gforge.enseeiht.fr/cgi-bin/mailman/listinfo/topcased-users

________________________________


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.


_______________________________________________
Topcased-users mailing list
Topcased-users@lists.gforge.enseeiht.fr
http://lists.gforge.enseeiht.fr/cgi-bin/mailman/listinfo/topcased-users

_______________________________________________
Topcased-users mailing list
Topcased-users@lists.gforge.enseeiht.fr
http://lists.gforge.enseeiht.fr/cgi-bin/mailman/listinfo/topcased-users



_______________________________________________
Topcased-users mailing list
Topcased-users@lists.gforge.enseeiht.fr
http://lists.gforge.enseeiht.fr/cgi-bin/mailman/listinfo/topcased-users

_______________________________________________
Topcased-users mailing list
Topcased-users@lists.gforge.enseeiht.fr
http://lists.gforge.enseeiht.fr/cgi-bin/mailman/listinfo/topcased-users

Reply via email to