xml - How do I markup a word document with template directives? -
i have unenviable task of writing template system sits on top of word 2007/10/13 allows people inject simple logic document end data store (tbd exported xml document of form) in following forms:
- direct binding data element (for example paragraph/heading/section title)
- repeating data element number of times (for example table body or list)
- providing in-line logic (for example if-block checks business rule result value).
rather providing program on case case basis, want put in hands of client means need use authoring tools provided word. can use add-in we're writing markup document, upload document template our solution above directives in , execute them there.
i've looked @ following ideas of have big holes in them unfortunately.
- xml schema. gone in word 2007+ unfortunately though.
- adding xml namespace content.xml file , writing directives in using attributes in namespace (easy post-process then!). can't work out how edit these or display them on document via vsto unfortunately.
- adding content inline contains template instructions (don't breaks semantic separation between template , document content).
- using content controls (which fine 2013+ have repeat capability without ugly hacks)
- others?
does have ideas on best approach resolve problem or workaround above issues?
i'm using vsto + vs2012 toolchain , need target 2007, 2010 , 2013 versions of word.
you can make share folder on client side machine\server store templates. client can upload new template doing copy on share folder , addsin can link template option (depends on requirements).
Comments
Post a Comment