<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>28180</bug_id>
          
          <creation_ts>2015-03-09 16:48:35 +0000</creation_ts>
          <short_desc>[f+o 3.1] Whitespace in xml-to-json()</short_desc>
          <delta_ts>2016-04-29 20:42:34 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Functions and Operators 3.1</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>118461</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-03-09 16:48:35 +0000</bug_when>
    <thetext>The specification of xml-to-json() states that whitespace text nodes are ignored. However, this doesn&apos;t make sense for text nodes that are children of a &lt;j:string&gt; element, since the text node child of j:string contains the value of the string, which may be whitespace. It should say &quot;whitespace text nodes are ignored, except those whose parent element is an element named &apos;string&apos;&quot;

Also, for the content of other simple-valued elements (number, boolean) I think it makes sense to strip leading and trailing whitespace, so that an untyped input is accepted if the result of validating it against the schema would be accepted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118526</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-03-11 13:01:08 +0000</bug_when>
    <thetext>The change was accepted by the WG on 10 Mar 2015 and has been applied to the spec.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>