This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 30197 - [SER31] Adaptive serialization does not specify xs:float, and no decimal format for xs:decimal and xs:float
Summary: [SER31] Adaptive serialization does not specify xs:float, and no decimal form...
Status: CLOSED WORKSFORME
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Serialization 3.1 (show other bugs)
Version: Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-16 18:50 UTC by Abel Braaksma
Modified: 2018-01-03 13:46 UTC (History)
1 user (show)

See Also:


Attachments

Description Abel Braaksma 2017-11-16 18:50:15 UTC
This applies to the Adaptive Output Method:

For xs:double the specified format is scientific notation.

For xs:float, such format is not specified, which I think is an oversight. It should probably be the same as xs:double, albeit with less precision.

Also, for neither xs:decimal and xs:float, the decimal format properties are specified. This was discussed earlier through bug 29824, but only applied to xs:double, not the other two.
Comment 1 Andrew Coleman 2017-12-14 10:40:04 UTC
I agree that xs:float should follow the same rule as xs:double.  I can make that change in the errata doc.

xs:decimal is specified as follows:

  - An instance of xs:integer or xs:decimal is serialized by converting the value to a string using the fn:string function.

F&O specifies this behaviour:
https://www.w3.org/TR/xpath-functions-31/#casting-to-string
which in turn references the schema spec:
https://www.w3.org/TR/xmlschema-2/#decimal-canonical-representation
I don't think the decimal format properties are relevant to this.
Comment 2 Andrew Coleman 2017-12-19 16:52:21 UTC
The WG discussed this and decided that the current rule for serializing xs:float is well defined and expresses the desired intent.

- An atomic value of any other type is serialized using the syntax of a constructor function...
Comment 3 Abel Braaksma 2018-01-03 13:46:02 UTC
Ok, if that was intentional (and I can see now why it is), than it wasn't a bug. Thanks and happy New Year!