OASIS Open Document Format for Office Applications (OpenDocument) TC

 View Only
  • 1.  Empty Cell by @office:value-type

    Posted 05-10-2020 22:36
    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 : If the value type is not string , the corresponding Value Attribute(s) ( Table 14 - Value attributes ) shall contain the value(s) of the element. 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. 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()! Regards, Svante PS: Please note the test document is invalid on purpose. Attachment: emptyIam.ods Description: application/vnd.oasis.opendocument.spreadsheet


  • 2.  Re: [office] Empty Cell by @office:value-type

    Posted 05-11-2020 00:19
    Hi Svante, you wrote: 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 ! Where do you read this in part 2. I see: in 4.7 in part 2: An empty cell is neither zero nor the empty string and in 6.13.14: A cell with the empty string is not considered blank . So that cell is not an empty (or blank) cell, IsBlank() should be FALSE . What am I missing? Andreas On 2020-05-10 4:35 p.m., Svante Schubert wrote: 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 : If the value type is not string , the corresponding Value Attribute(s) ( Table 14 - Value attributes ) shall contain the value(s) of the element. 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. 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()! Regards, Svante PS: Please note the test document is invalid on purpose. --------------------------------------------------------------------- To unsubscribe from this mail list, you must leave the OASIS TC that generates this mail. Follow this link to all your TCs in OASIS at: https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php -- Andreas J. Guelzow, PhD FTICA Registrar & Director of Enrolment Services Professor, Mathematical & Computing Sciences Direct: +1 780 479 9290 Toll-Free: +1 866 479 5200 concordia.ab.ca


  • 3.  Re: [office] Empty Cell by @office:value-type

    Posted 05-11-2020 06:08
    Hello Andreas, Am Mo., 11. Mai 2020 um 02:18 Uhr schrieb Andreas J Guelzow < andreas.guelzow@concordia.ab.ca >: Hi Svante, you wrote: 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 ! Where do you read this in part 2. I see: in 4.7 in part 2: "An empty cell is neither zero nor the empty string" and in 6.13.14: "A cell with the empty string is not considered blank". So that cell is not an empty (or blank) cell, IsBlank() should be FALSE . What am I missing? In my first - unofficial - version of my test document, I made a mistake last week. I had fixed the test document, but forgot to fix the documentation in the email. You are of course right, as the last sentence of isBlank() of ODF 1.2 part 2 is stating: " Semantics: 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. " from http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#ISBLANK And please find attached a valid - stripped version - of the previous test document, now called 'emptyIamValid.ods' so you might drop your argument that 'everything is possible'. Talk to you later, Svante Andreas On 2020-05-10 4:35 p.m., Svante Schubert wrote: 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 : If the value type is not string , the corresponding Value Attribute(s) ( Table 14 - Value attributes ) shall contain the value(s) of the element. 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. 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()! Regards, Svante PS: Please note the test document is invalid on purpose. --------------------------------------------------------------------- To unsubscribe from this mail list, you must leave the OASIS TC that generates this mail. Follow this link to all your TCs in OASIS at: https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php -- Andreas J. Guelzow, PhD FTICA Registrar & Director of Enrolment Services Professor, Mathematical & Computing Sciences Direct: +1 780 479 9290 Toll-Free: +1 866 479 5200 concordia.ab.ca Attachment: emptyIamValid.ods Description: application/vnd.oasis.opendocument.spreadsheet


  • 4.  Re: [office] Empty Cell by @office:value-type

    Posted 05-11-2020 02:43
    Hi, On 2020-05-10 4:35 p.m., Svante Schubert wrote: The first cell is easy a cell with string content and string type. Clearly not empty and FALSE as the result of isBlank()! yes, agree 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 ! as I mentioned in an email, ODF specifically states that cells containing the empty string are not empty. So the correct answer here is FALSE. (Which is also what you said in the file proper).) The third cell is a completely empty cell without descendant nodes. It can not be more blank. TRUE should be the result of isBlank()! yes agree The fourth cell has an empty paragraph but no data type attribute. TRUE should be the result of isBlank()! First of all, this should really never exist. ODF is currently mute on what the value of this cell is. According to my reading, in the absence of the value type it is not defined what the value of the cell is. Since the value type is not given in this case, I am really do not know whether the value type is not string is true or false. It really cannot be true since we do not have a corresponding value attribute . The fifth cell has a paragraph with text content but no data type attribute. TRUE should be the result of isBlank()! same as the previous one. The sixth cell has a paragraph with text content but an invalid data type attribute. TRUE should be the result of isBlank()! This is not valid ODF. So anything is possible. There is also a seventh cell, but again that is not valid ODF. Andreas -- Andreas J. Guelzow, PhD FTICA Registrar & Director of Enrolment Services Professor, Mathematical & Computing Sciences Direct: +1 780 479 9290 Toll-Free: +1 866 479 5200 concordia.ab.ca


  • 5.  Re: Empty Cell by @office:value-type

    Posted 05-11-2020 07:15
    Please excuse the badly viewed line break characters in my email. I have sent a bug report to Google: https://support.google.com/mail/thread/45891518?hl=en Svante