Dear TC members,
just a quick update on the discussions I had with Regina and Andreas.
The most importantÂchapter to understand the semantic of 'empty cell' seems to be the chapter of @office:value-type:
which might be improved in clarity. (Once a mentor of mine said if he has toÂslow down the reading toÂunderstand, the text is not well written).
There are some minor editorial mistakes asÂmissing italic (or character styles for attribute value types)ÂorÂexpressing the OASIS 'shall'ÂorÂmixing the naming of "value-type" and "value type".Â
But not for table cells, which only have the common type without 'void'.
(Please note above URLs, I have enabled some fragment identifierÂfor text line spans on the RNG HTML)ÂÂ
Instead of making @office:value-type mandatory and always have a type and some boilerplate, obviously the absence of the attribute was set equal to the attribute value 'void'.
To me, theÂcolumns are not precisely definedÂand theÂmost important two paragraphs are quite separated:
Finally,Âthe connection betweenÂisBlank(), type 'void' and the _expression_ 'empty cell' was not explicitly made.
We might want to strive for a semantic dictionary similar to the DublinÂcore for the basic semantic of our office file format.Â
Unfortunately, Number, Text or Logical are not explicitly mapped to Table 14 of part1.Â
I assume that those three types above are all types of table 14 just without voidÂ(which is not allowed in table cells anyway), right?
Is theÂempty cellÂequal toÂblankÂandÂtype void? I would think so.ÂOr do you see indications against it?
TheÂonly indicator I can see for an empty cell from reading carefully the spec is the missing of @office:value-type within the cell element.
Still, it seems problematic that user content is being deleted from a cell during roundtrip instead of adding an extra rule that a cell with content is by default of type string.
This seems so easy now and then I created a simple test document with three cells, which are being tested on blank from its follow (right) cell.
- The first cell is easy a cell with string content and string type. Clearly not empty andÂFALSEÂas the result of isBlank()!
- The second cell has an empty string. String type with empty paragraph. This case is explicitly mentioned in part 2 and the result of isBlank() should beÂTRUE!
- The third cell is a completely empty cell without descendant nodes. It can not be more blank.ÂTRUEÂshould be the result of isBlank()!
- The fourth cell has an empty paragraph but no data type attribute.ÂÂTRUEÂshould be the result of isBlank()!
- The fifth cell has a paragraphÂwith text content but no data type attribute.ÂTRUEÂshould be the result of isBlank()!ÂÂ
- The sixth cell has a paragraphÂwith text content but an invalid data type attribute.ÂTRUEÂshould be the result of isBlank()!
PS: Please note the test document is invalid on purpose.