Hi Michael,
With the help of Dave Howorth's links to the OpenDocument spec, I just spent a couple hours trying
to track down and understand your references, and realize that I am:
(a) in over my head (even just to understanding the relevance of the different files organized
under v.1.2), and
(b) nowhere near a solution to how to test if a field is empty for the purpose of controlling
conditional text.
[Indeed, I could not even see the connection between the schema for text:condition and my
understanding of Writer's conditional text functions. It appears that working through the spec
would take months -- and even then I'm not sure I would see the relationship to LO program design
and functionality. (I wonder if that does not reflect your own experience, as you described it.)]
Thank you so much for the education in LO design, which I will mark to study further, but I can't
afford to study it further now. I'm afraid I will have to accept that LO Writer cannot (for now) do
what I thought it might do.
Kind regards,
John
On 2021-01-01 15:46, Michael H wrote:
John,
To follow up on the conditions aren't really conditional, but static
states: I got as far as page 613 of the ODF 1.2 specification. (which used
to be free from OASIS, but now costs chf198 from ISO.org.)
it says
"The text:condition attribute specifies a condition. Conditions do not have
a predefined
syntax, but the attribute value should begin with a namespace prefix,
followed by a ":" (U+003A,
COLON) separator, followed by the text of a formula. The namespace bound to
the prefix
determines the syntax and semantics of the formula."
But all my attempts to make this work within Libreoffice writer failed. LO
Writer evaluated anything I put into <text:conditional-text> as pure text,
not as a formula (as far as I could tell.)
I was approaching from a differential analysis on .fodt documents before
and after I made various changes, then studying ODF spec to determine what
that field could actually do.
There's clearly no interface to support this. It's in the spec so there
should be capability in LO Writer (or at least OpenOffice 2 & 3).. but
regardless what program I tried, I continued to get similar results...
regardless of what was in the <text:condition> attribute, i always got one
of the two results unless the evaluation was strictly either "FALSE" or
"TRUE" or some variant of capitalization of one of these. So wherever the
actual statement was it was looking for a boolean result but a string
result, which LO wasn't returning if the evaluation ever happened.
So, I switched to Calc where I know how to do boolean logic, and each cell
is visible realtime, so it doesn't take advanced forensics to see what is,
and fix.
--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.