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 27360 - "string value" is not defined for atomic values
Summary: "string value" is not defined for atomic values
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Serialization 3.1 (show other bugs)
Version: Working drafts
Hardware: PC All
: 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: 2014-11-18 15:29 UTC by Josh Spiegel
Modified: 2014-11-25 16:43 UTC (History)
1 user (show)

See Also:


Attachments

Description Josh Spiegel 2014-11-18 15:29:10 UTC
In section 9 it says:

"An atomic valueXP31 in the data model instance of any other type is serialized to a JSON string by outputting the string value of the item."

Where "string value" is linked to this definition: 

"The term string value is defined in Section 5.12 string-value Accessor DM31. Every node has a string value. For example, the string value of an element is the concatenation of the string values of all its descendant text nodes."

String value is not defined for atomic values.
Comment 1 Andrew Coleman 2014-11-21 15:15:50 UTC
Good point.  I propose replacing:

"An atomic valueXP31 in the data model instance of any other type is serialized to a JSON string by outputting the string value of the item."

with the following:

"An atomic valueXP31 in the data model instance of any other type is serialized to a JSON string by outputting the result of applying the fn:string function to the item."
Comment 2 Josh Spiegel 2014-11-21 16:36:58 UTC
The input is a single atomic value in this case so I think calling fn:string is equivalent to $value cast as xs:string.  So you could be more specific and say "... a JSON string by outputting the result of casting the value to xs:string."  But this is editorial - I think your proposal is correct.