20120416
========
Experimenting
-------------
I launch LibreOffice, create an empty text document and save it as "a.odt".
Then I add three Custom Properties...
.. image:: 0416/0416a.jpg
:scale: 90
... then save the file under a name `b.odt`.
Then I compare the content of the .odt package.
The only difference is in `meta.xml`::
...
2012-04-16
true
name
Great! So it should be easy to add values for these variables when generating an .odt.
But oops:
Custom Document properties are not accessible when specifying
`conditions `_!
(At least I didn't get it to work and I didn't find
any documentation that states is would.)
Same exercise with a document where I inserted custom fields using "Set Variable" and "Show Variable". Now the difference is in the `content.xml`, inside the `` element. Before the first `` there is now a new `` container, a global list which LO obviously has automatically guessed::
After this, here is how "Set Variable" fields look like::
Set Variable last_name = Arens , date_issued =
Dienstag, 13. März 2012
And "Show Variable" fields look similar::
Show Variable last_name = Arens, date_issued =
13.03.2012
It should be easy, using :term:`ODFPy`, to generate a document with
predefined variables:
- ```` --> `text.VariableDecls`
- ```` --> `text.VariableGet`
- ```` --> `text.VariableSet`