Hello Helene


>From what I see, you just use in <bookmarks> ... </bookmarks> an identifer 
>that exists only between the [for ...] ...[/for] in the appendix. So the error 
>VAR does not exist is perfectly normal if the code is exactly the same as you 
>provided there.



But, I am not sure that you provided it in the same order as it is present in 
your template. Can you provide the word template ?



Best regards

Cedric Gava

________________________________
De : [email protected] 
<[email protected]> de la part de Topcased user list 
where issues are discussed <[email protected]>
Envoyé : mercredi 11 juin 2014 16:16
À : [email protected]
Objet : [Topcased-users] Gendoc2, How to use bookmarks tag


Hello,



I tried to use <bookmarks> tag to create dynamic hyperlink in my generated 
document but it doesn't work. I use Word 2013 and Gendoc2 1.7.0.



I followed the TOPCASED Gendoc2 v1.7.1 tutorial doing this:



<bookmarks>

<alias source='modelID' target='[VAR.getUUID()/]'/>

</bookmarks>



[for (m:Model | self.oclAsType(Model).getAllModels())]

[m.getTitleName()/]

See: [m.getDocumentTitle()/]

[/for]



Appendix

[for (VAR:Model | self.oclAsType(Model).getAllModels())] <drop/> 
[VAR.getDocumentTitle()/] [/for] models loop <drop/>



- modelID is my bookmark identifier

- my bookmark identifier is before [VAR.getDocumentTitle()/]

- hyperlink is on [m.getDocumentTitle()/]



When generating, I get this message:

!MESSAGE The execution of a script failed: Error during generation of Gendoc 
script :Unrecognized variable: (VAR)

org.topcased.gendoc2.services.exception.GenerationException: Error during 
generation of Gendoc script :Unrecognized variable: (VAR)

                at 
org.topcased.gendoc2.script.acceleo.AcceleoM2TProcess.doRunScript(AcceleoM2TProcess.java:87)

                at 
org.topcased.gendoc2.script.acceleo.AcceleoM2TProcess.runScript(AcceleoM2TProcess.java:62)

                at 
org.topcased.gendoc2.tags.handlers.AbstractScriptTagHandler.runProcessorScript(AbstractScriptTagHandler.java:83)

                at 
org.topcased.gendoc2.tags.handlers.AbstractScriptTagHandler.runScripts(AbstractScriptTagHandler.java:59)

                at 
org.topcased.gendoc2.tags.handlers.AbstractTagHandler.run(AbstractTagHandler.java:120)

                at 
org.topcased.gendoc2.tags.handlers.AbstractPrePostTagHandler.doRun(AbstractPrePostTagHandler.java:114)

                at 
org.topcased.gendoc2.tags.handlers.AbstractPrePostTagHandler.run(AbstractPrePostTagHandler.java:55)

                at 
org.topcased.gendoc2.tags.handlers.process.TagAnalyserProcess.executeOneTag(TagAnalyserProcess.java:221)

                at 
org.topcased.gendoc2.tags.handlers.process.TagAnalyserProcess.executeTags(TagAnalyserProcess.java:199)

                at 
org.topcased.gendoc2.tags.handlers.process.TagAnalyserProcess.executeAndInjectTags(TagAnalyserProcess.java:144)

                at 
org.topcased.gendoc2.tags.handlers.process.TagAnalyserProcess.step(TagAnalyserProcess.java:135)

                at 
org.topcased.gendoc2.process.AbstractStepProcess.doRun(AbstractStepProcess.java:51)

                at 
org.topcased.gendoc2.process.AbstractProcess.run(AbstractProcess.java:71)

                at 
org.topcased.gendoc2.GendocProcess.runProcess(GendocProcess.java:81)

                at 
org.topcased.gendoc2.GendocProcess.runProcess(GendocProcess.java:140)

                at 
com.cofluent.studio.docgen.runnable.DocGeneratorRunnable.run(DocGeneratorRunnable.java:80)

                at 
com.cofluent.studio.docgen.actions.GenDocx.generate(GenDocx.java:62)

                at 
com.cofluent.studio.build.ui.actions.GenerateAction.generate(GenerateAction.java:75)

                at 
com.cofluent.studio.docgen.ui.actions.DocGenAction$1.run(DocGenAction.java:76)

                at 
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

Caused by: 
org.topcased.gendoc2.script.acceleo.exception.AcceleoParsingException: 
Unrecognized variable: (VAR)

                at 
org.topcased.gendoc2.script.acceleo.Generator.<init>(Generator.java:126)

                at 
org.topcased.gendoc2.script.acceleo.AcceleoM2TProcess.generate(AcceleoM2TProcess.java:135)

                at 
org.topcased.gendoc2.script.acceleo.AcceleoM2TProcess.doRunScript(AcceleoM2TProcess.java:75)

                ... 19 more



Thanks for the help, best regards



Helene


---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/cgi-bin/mailman/listinfo/topcased-users

Reply via email to