I use TBS and OpenTBS for parsing office templates in a PHP script. Files of type rtf
or txt
are processed with TBS and those of types docx
or pptx
with OpenTBS.
The merged files are used in an office context for letters, submissions and the lot, so I want tags that were not merged in the first place, for instance due to missing data, to be removed before the files are produced. A solution that covers both TBS and OpenTBS would be ideal.
At this time I use fields like [onload.nonexistant;ifempty=’’]
for TBS but the lengthy syntax is kind of awkward, error prone and doesn't work for OpenTBS.
If an empty default value doesn't work, maybe there is some kind of cleanup operation for remaining fields?