I fear we still got a general problem here..
The specification writes
"D.3)If the namespace prefix of a style:condition, table:condition, table:expression, table:formula or text:formula attribute is associated with the "urn:oasis:names:tc:opendocument:xmlns:of:1.2" namespace, or if a namespace prefix is omitted for any of these attributes, the syntax of any formula which is contained in the values of these attributes shall conform to part 2 of this specification."
Looking at our test case adding the formula:
If the original document does not already have the formula ODFDOM will not add it.
Adding it to our templates will not fix the problem, as a user might open his own file and add a formula or even would like to add a formula of his choice with a different namespace.
The question remains:
How can we make it possible to add another namespace prefix and namespace URL toegether with the attibute?
I will add the given patch, but I keep this issue open as it does not solve the general problem.
We need to be able to give the user the capability to add a custom namespace for the prefix of the values of style:condition, table:condition, table:expression, table:formula or text:formula attributes.
PS: I suggest that make the tests of OdfTableCellTest independent/orthogonal to each other reading a fresh ODS and writing its own ODS output. Currently all are reloading the same test file.
If you remove the of namespace URL from the ODF input file it will not be added by ODFDOM.