templated-docs icon indicating copy to clipboard operation
templated-docs copied to clipboard

May provide corrupted document

Open vushe opened this issue 7 years ago • 2 comments

When coding Django's tags via LibreOffice window, we are practically unable to control the way LibreOffice stores them in its messy zipped od* archive. One may happen that Django's tags are messed up with xml tags as shown below:

    <text:p text:style-name="P21">Lorem ipsum {{
        <text:span text:style-name="T12">element.el0 }</text:span>}
        <text:span text:style-name="T12">and {{ element.el1 }} and {{ element.el2 }} and </text:span>{{
        <text:span text:style-name="T12">element.eln }</text:span>}
    </text:p>

So templated-docs unzips template and Django replaces its tags with data. But how it works with markup like this }</text:span>}? Obviously, source xml will be broken and, furthermore, od* corrupted.

Maybe here is the explanation of the issue #8

I don't know if there's any way to fix the issue except programming source xml.

vushe avatar Dec 05 '17 14:12 vushe

Perhaps use odf's fields as in this project: https://github.com/jakogut/python-relatorio

danilogbotelho avatar Sep 03 '18 21:09 danilogbotelho

Thanks for comment @danilogbotelho. Issue persists with ODF fields too. And actually I see no reason why it should not. As document is getting more complicated, sooner or later you will unfortunately face the issue.

vushe avatar Sep 04 '18 12:09 vushe