Eike Rathke <> wrote on 09/29/2009 11:16:40 AM:
> I further see some contradiction between the definition in OpenFormula
> 5.2 Basic Expressions that says
>
> Formula ::= '=' ForceRecalc? Expression
>
> and thus mandates a leading '=' equal sign, and some places in ODF 1.2
> part-1 that make the '=' optional or explicitly state that no '=' equal
> sign is present. IMHO, the presence of '=' and ForceRecalc should be
> defined at the document level of part-1 instead of in OpenFormula.
>
We need to partition the requirements carefully between Part 1 and
OpenFormula. I'd like OpenFormula to be independent of XML, i.e., not say
anything about the namespace prefix. And I'd like it to also be
independent of recalculation settings. OpenFormula is a formula
expression specification, not a spreadsheet specification.
So one way of dividing this is to say in Part 1:
ForceRecalc ::= '='
NameSpacePrefix ::==NCName:
Formula ::= NameSpacePrefix? '=' ForceRecalc? OpenFormulaExpression
In that case, the initial '=' is required otherwise it is ambiguous
whether you have a force recalc or not.
Then in OpenFormula we can define an "expression" more simply, and not
deal with the namespace prefix or leading '='. This also allows
OpenFormula to be reused in other contexts, such as conditions.
As for whether we require a namespace prefix, although it is a clean
approach to require it, the implementation cost in terms of
reading/writing the document is substantial, since these prefixes would
need to be added to every cell that contains a formula. It might only be
a three extra characters "of:" per cell, but you could easily have 100,000
cells.
Would it be possible to allow this to be defined at the document-level,
something like table:formula-namespace="urn:foo"? I cannot imagine that
anyone is going to mix formula languages in the same document. If we did
that we could eliminate the namespace prefix altogether for table:formula.
If so we can state (in Part 1) that the default value of
table:formula-namespace is that of OpenFormula, and that support of that
expression language is required for Spreadsheet conformance. However, the
"extended" conformance class would allow other formula namespaces, in
which case the expression language would be implementation-defined.
-Rob