<?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>4974</bug_id>
          
          <creation_ts>2007-08-21 20:49:48 +0000</creation_ts>
          <short_desc>[FO] Clarify error condition in fn:normalize-space()</short_desc>
          <delta_ts>2007-11-16 09:34:40 +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 1.0</component>
          <version>Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</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>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Don Chamberlin">chamberl</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>16237</commentid>
    <comment_count>0</comment_count>
    <who name="Don Chamberlin">chamberl</who>
    <bug_when>2007-08-21 20:49:48 +0000</bug_when>
    <thetext>This is an editorial suggestion. The description of fn:normalize-space() contains the following sentence:

&quot;If no argument is supplied or if the argument is the context item and the context item is undefined an error is raised.&quot;

This could be misinterpreted as &quot;If no argument is supplied, or (...), then an error is raised.&quot;

A less ambiguous way to state this rule is as follows:
&quot;If the implicit or explicit argument is the context item, and the context item is undefined, an error is raised.&quot;

Regards,
Don Chamberlin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16785</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2007-09-25 14:55:10 +0000</bug_when>
    <thetext>The proposed revision isn&apos;t quite right, because the implicit argument is not &quot;.&quot; but &quot;string(.)&quot;. (I&apos;m not really sure why: but that&apos;s the way it is, and they aren&apos;t quite the same.)

I don&apos;t think we need to say that &quot;if the argument is the context item and the context item is undefined then XPDY0002 is raised&quot;. This means you have written normalize-space(.), and in this case normalize-space() gets no say in the matter because the error has already occurred while evaluating the argument, &quot;.&quot;, under XPath section 3.1.4. So (avoiding the temptation to make more extensive changes) I think we should change the relevant paragraph to read:

&lt;new&gt;
If no argument is supplied, then $arg defaults to the string value (calculated using fn:string()) of the context item (.). If no argument is supplied and the context item is undefined then an error is raised: [err:XPDY0002]XP.
&lt;/new&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16787</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2007-09-25 16:00:40 +0000</bug_when>
    <thetext>The WG agreed on 25 Sep 2007 to make the change proposed in comment #1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17761</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2007-11-15 22:10:17 +0000</bug_when>
    <thetext>The erratum will be published as E14</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>