vs72737 / xdocreport

Automatically exported from code.google.com/p/xdocreport
0 stars 0 forks source link

Simplify syntax for fields, condition, loop in the doucment docx, odt... #41

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Today XDocReport use Velocity or Freemarker syntax to manage condition, 
loop,etc... which works well but which can be complex for a secretary.

The basic idea is to manage a mapping between a word and complex syntax. For 
instance to start a loop with Freemarker you must write in the docx, odt 
mergefield:

----------------------------------------
[#list developers as d]
----------------------------------------

To simplify this syntax you could just write : 

----------------------------------------
MyList
----------------------------------------

Ex you could use FieldsMetadata to set this mapping  : 

----------------------------------------
FieldsMetadata metada = new FieldsMetadata();
metada.setMapping("MyList", "[#list developers as d]");
----------------------------------------

We could provide too an helper class which build docmosis syntax
http://www.docmosis.com/features/template-management

and we could use docmosis syntax in the docx, odt and transform this syntax to 
Velocity, Freemarker syntax. In teh PDF 
https://www.docmosis.com/docmosisfiles/download/release2.2/Docmosis-template-gui
de2.2.3_3415.pdf you can see Docmosis syntax

We could write this in the report : 

----------------------------------------
rs_developers
----------------------------------------

(rs_ means Repeat Section) instead of writing that : 

----------------------------------------
[#list developers as d]
----------------------------------------

Original issue reported on code.google.com by angelo.z...@gmail.com on 23 Sep 2011 at 1:18

GoogleCodeExporter commented 8 years ago
Hello,
Thank you for the great job that you do.
I have a problem with the methode setMapping.
Could you please upload a docx and code example it will be very helpfull for my 
work
Thank you

Original comment by amamou.h...@gmail.com on 4 Mar 2013 at 2:02

GoogleCodeExporter commented 8 years ago
Hi,

This issue was just an idea. The FieldMetata#setMapping doesn't exist. I'm 
waiting for that people (like you) needs this feature and find time to develop 
it.

Could you please explain me what you wish to simplify as syntax?

Regards Angelo 

Original comment by angelo.z...@gmail.com on 4 Mar 2013 at 2:07