Skip to main content



      Home
Home » Eclipse Projects » Gendoc » External EMF reference: InvalidType
External EMF reference: InvalidType [message #1781113] Thu, 01 February 2018 10:19 Go to next message
Eclipse UserFriend
Again I have in my output model some external references to another EMF file:
index.php/fa/31978/0/

<?xml version="1.0" encoding="UTF-8"?>
<output:Output xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:output="http://www.astron.biz/output/1.0" template="www" name="Mon output">
<outputHasChapters name="Chapitre 1" foreach="building"/>
<outputHasChapters name="Chapitre 2"/>
<outputHasQuote href="../Quotes/My.cypq#PRICEPARENTmaquote"/>
<dummyBuilding href="../Quotes/My.cypq#PRICEPARENTbuilding2toto"/>
</output:Output>


Here is my external file:
<?xml version="1.0" encoding="UTF-8"?>
<quoting:Quote xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:quoting="http://www.astron.biz/sales/quoting/1.0" name="ma quote" lastModifiedDate="2018-02-01T16:11:48.596+0100" lastModifiedUid="vjaromij">
<quoteHasBuildings name="Mon batiment"/>
<quoteHasBuildings name="building 2 toto"/>
...


With my docx Template, the Building type is not recognized:
See details.
The execution of a script failed: Error during generation of Gendoc script :Invalid Type: Building
Incomplete reference to variable declaration in variable expression: (building)


Here is the template: in bold the line cannot recognize the type.

<context element='{0}' /><drop/>
<gendoc><drop/>

[for (building: Building| self.outputHasQuote.quoteHasBuildings)]<drop/>
[building.name/]
[/for] <drop/>
[self.name/]:[self.outputHasQuote.name/]
[for (chapter: Chapter| self.outputHasChapters)]<drop/>
[if (chapter.foreach='building')] <drop/>
toto
[else] <drop/>
[chapter.name/]
[/if] <drop/>
[/for] <drop/>
</gendoc><drop/>



Re: External EMF reference: InvalidType [message #1781116 is a reply to message #1781113] Thu, 01 February 2018 10:40 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

Try to prefix the type with the model prefix:

[for (building: quoting::Building| self.outputHasQuote.quoteHasBuildings)]<drop/>

I am assuming Buildings type is defined in the "quoting" emf model... and it is registered as quoting, Otherwise you need to use the name of the model where Building is defined as prefix.

Regards,
Antonio

Re: External EMF reference: InvalidType [message #1781121 is a reply to message #1781116] Thu, 01 February 2018 11:08 Go to previous message
Eclipse UserFriend
Perfecto.

You saved my life.
Thx
Jim
Previous Topic:Use gendoc with external eObject references
Next Topic:include external fragments
Goto Forum:
  


Current Time: Thu Jul 17 05:01:51 EDT 2025

Powered by FUDForum. Page generated in 0.09575 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top