Page 1 of 1

Conditional control remains after preprocess

PostPosted: Wed May 25, 2011 3:41 am
by Peter.BY
Hello!

I have a conditional content control (od:conditional) in my document, after running OpenDoPEHandler.preprocess(wordMLPackage) it either remains in resulting document or disappears entirely depending on result of condition evaluation. Is it by design that this content control (and not just the content inside it) remains unchanged? I expected that the content part inside it will be included into document (unwrapped) not the control itself. Just want to be sure I do everything right when dealing with od:conditional. Any ideas?

Re: Conditional control remains after preprocess

PostPosted: Wed May 25, 2011 8:20 pm
by tinne
I guess it's meant to provide limited round-trip facilities.

Compare my discussion at the bottom of Thread "Sample document 'invoice' ill-generated in trunk".

Re: Conditional control remains after preprocess

PostPosted: Wed May 25, 2011 11:46 pm
by Peter.BY
tinne wrote:I guess it's meant to provide limited round-trip facilities.


Thank you for the response. What is round-trip in that context? Does that means that conditional sdt may be referenced in other places of the document and therefore we have to retain it to keep up the referencial integrity? Or it is something other thing?

Re: Conditional control remains after preprocess

PostPosted: Thu May 26, 2011 1:05 am
by jason
Ideally you'd be able to specify:

- retain controls, so that the docx can be preprocessed again (with different data), with the conditional controls and repeats reflecting this new data, OR

- remove controls, so that conditionals which are false are deleted in their entirety, and there is no evidence that ones which are true are optional text.

You quite probably want controls removed before sending the docx to a third party.

Re: Conditional control remains after preprocess

PostPosted: Thu May 26, 2011 1:44 am
by Peter.BY
jason wrote:Ideally you'd be able to specify:

- retain controls, so that the docx can be preprocessed again (with different data), with the conditional controls and repeats reflecting this new data, OR

- remove controls, so that conditionals which are false are deleted in their entirety, and there is no evidence that ones which are true are optional text.

You quite probably want controls removed before sending the docx to a third party.


Ok, now I've got the idea. Thanks, Jason.