Uploaded image for project: 'OASIS Open Document Format for Office Applications (OpenDocument) TC'
  1. OASIS Open Document Format for Office Applications (OpenDocument) TC
  2. OFFICE-2893

6.13.28: NumberValue - text interpretation not defined for all symbols

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Applied
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: ODF 1.2 CD 05
    • Fix Version/s: ODF 1.2 CD 06
    • Component/s: OpenFormula
    • Labels:
      None
    • Proposal:
      Hide

      Section 6.13.28 NUMBERVALUE

      Replace semantics with the following:

      Converts given Text value X into Number. If X is a Reference, it is first dereferenced.

      X is transformed according to the following rules:

      1. Starting from the beginning, remove all occurrences of the group separator before any decimal separator
      2. Starting from the beginning, replace the first occurrence in the text of the decimal separator character with the FULL STOP (U+002E) character
      3. Remove all whitespace characters (See 5.14).
      4. If the first character of the resulting string is a period FULL STOP (U+002E) then prepend a zero
      5. If the string ends in one or more instances of PERCENT SIGN (U+0025) , remove the percent sign(s)

      If the resulting string is a valid xsd:float, then return the number corresponding to that string, according to the definition provided in XML Schema, Part 2, Section 3.2.4. If percent signs were removed in step 5, divide the value of the returned number by 100 for each percent sign removed.

      If the string is not a valid xsd:float then return an error.

      [Note for Editor -- We should also add a normative reference for XML Schema, Part 2. We can just copy the reference used in Part 1]

      Show
      Section 6.13.28 NUMBERVALUE Replace semantics with the following: Converts given Text value X into Number. If X is a Reference, it is first dereferenced. X is transformed according to the following rules: 1. Starting from the beginning, remove all occurrences of the group separator before any decimal separator 2. Starting from the beginning, replace the first occurrence in the text of the decimal separator character with the FULL STOP (U+002E) character 3. Remove all whitespace characters (See 5.14). 4. If the first character of the resulting string is a period FULL STOP (U+002E) then prepend a zero 5. If the string ends in one or more instances of PERCENT SIGN (U+0025) , remove the percent sign(s) If the resulting string is a valid xsd:float, then return the number corresponding to that string, according to the definition provided in XML Schema, Part 2, Section 3.2.4. If percent signs were removed in step 5, divide the value of the returned number by 100 for each percent sign removed. If the string is not a valid xsd:float then return an error. [Note for Editor -- We should also add a normative reference for XML Schema, Part 2. We can just copy the reference used in Part 1]

      Description

      The Numbervalue function includes a regular expression of the acceptable text strings, but doesn't specify how to interpret them. Specifically, the percent sign (%) and exp (eE). For percent, is everything to the left divided by 100?

        Attachments

          Activity

            People

            • Assignee:
              david.wheeler David Wheeler (Inactive)
              Reporter:
              ericpa Eric Patterson
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: