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: [OASIS Issue Tracker] Commented: (OFFICE-2893) 6.13.28: NumberValue- text interpretation not defined for all symbols



    [ http://tools.oasis-open.org/issues/browse/OFFICE-2893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21581#action_21581 ] 

Robert Weir  commented on OFFICE-2893:
--------------------------------------

Who implements this function?  I don't see it in MS Office or OpenOffice.  In Gnumeric I see a NUMBERVALUE function, but it is two parameters (text and decimal, not no grouping) and the 2nd parameter is not optional.

So where is the definition in the draft coming from?

Rather than try to express an all encompassing RE for numbers, I wonder whether we can settle for the xsd:float definition from W3C Schema Datatypes:

"float values have a lexical representation consisting of a mantissa followed, optionally, by the character "E" or "e", followed by an exponent. The exponent - must-  be an integer. The mantissa must be a decimal number. The representations for exponent and mantissa must follow the lexical rules for integer and decimal. If the "E" or "e" and the following exponent are omitted, an exponent value of 0 is assumed."

(In fact we could simply capture that definition by reference to XML Schema, Part 2, Section 3.2.4.1, with the proviso that we exclude the "special characters", INF, -INF and NaN.

Of course we want to allow more than that, so we then define some rewriting rules that take the input text and transform it.  So something like:

1) Replace all occurrences of the decimal separator character with the  ',' character
2) Remove all occurrences of the group separator
3) Remove all whitespace characters.

If the resulting string is a valid xsd:float, then we return the number corresponding to the text, according to the definition provided in XML Schema, Part 2, Section 3.2.4.  

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

> 6.13.28: NumberValue - text interpretation not defined for all symbols
> ----------------------------------------------------------------------
>
>                 Key: OFFICE-2893
>                 URL: http://tools.oasis-open.org/issues/browse/OFFICE-2893
>             Project: OASIS Open Document Format for Office Applications (OpenDocument) TC
>          Issue Type: Bug
>          Components: Needs Discussion, OpenFormula
>    Affects Versions: ODF 1.2 CD 05
>            Reporter: Eric Patterson
>            Assignee: Robert Weir 
>             Fix For: ODF 1.2 CD 06
>
>
> 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?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


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