OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Empty Cell by @office:value-type


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:
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#attribute-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 most surprising is that theÂ'void' value is not always an allowed attribute value of @office:value-typeÂ- it only used as part of the form properties:
https://tdf.github.io/odftoolkit/docs/odf1.2/OpenDocument-v1.2-os-schema-rng.html#11038-11158ÂÂ
But not for table cells, which only have the common type without 'void'.
https://tdf.github.io/odftoolkit/docs/odf1.2/OpenDocument-v1.2-os-schema-rng.html#3645ÂÂ
(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'.
Unfortunately,ÂTable 14 - Value attributesÂdoes not make the absence of the 'void' value for cells obvious.

To me, theÂcolumns are not precisely definedÂand theÂmost important two paragraphs are quite separated:
  1. If the value type is notÂstring, the corresponding Value Attribute(s) (Table 14 - Value attributes) shall contain the value(s) of the element.
  2. If the value type is string and theÂoffice:string-valueÂattribute is not present, the element content defines the value.
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.Â

In isBlank:Âhttp://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#ISBLANKÂthe semantics are:
"If X is of type Number, Text, or Logical, return FALSE. If X is a reference to a cell, examine the cell; if it is blank (has no value), return TRUE, but if it has a value, return FALSE. A cell with the empty string isÂnotÂconsidered blank."

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.
  1. The first cell is easy a cell with string content and string type. Clearly not empty andÂFALSEÂas the result of isBlank()!
  2. 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!
  3. The third cell is a completely empty cell without descendant nodes. It can not be more blank.ÂTRUEÂshould be the result of isBlank()!
  4. The fourth cell has an empty paragraph but no data type attribute.ÂÂTRUEÂshould be the result of isBlank()!
  5. The fifth cell has a paragraphÂwith text content but no data type attribute.ÂTRUEÂshould be the result of isBlank()!ÂÂ
  6. The sixth cell has a paragraphÂwith text content but an invalid data type attribute.ÂTRUEÂshould be the result of isBlank()!

Regards,
Svante

PS: Please note the test document is invalid on purpose.

Attachment: emptyIam.ods
Description: application/vnd.oasis.opendocument.spreadsheet



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]