<?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>1422</bug_id>
          
          <creation_ts>2005-05-13 21:26:05 +0000</creation_ts>
          <short_desc>[FO] Types of substring arguments</short_desc>
          <delta_ts>2005-09-29 11:10:15 +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>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</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>
          <dependson>1467</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Rys">mrys</reporter>
          <assigned_to name="Ashok Malhotra">ashok.malhotra</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>3355</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Rys">mrys</who>
    <bug_when>2005-05-13 21:26:06 +0000</bug_when>
    <thetext>startingLoc and length should be allowed to be empty. Often these values are 
being calculated and the static type of the calculation will result in an 
optionally empty type. With the current signature, this leads to a type error. 
Thus change the two parameter types to be optional.

If any of them is () the result should be ().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3117</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Rys">mrys</who>
    <bug_when>2005-05-19 20:10:58 +0000</bug_when>
    <thetext>Here is the proposed rewording:

fn:substring( $sourceString  as xs:string?, 
$startingLoc  as xs:double?) as xs:string? 

fn:substring( $sourceString  as xs:string?, 
$startingLoc  as xs:double?, 
$length  as xs:double?) as xs:string? 

Summary: Returns the portion of the value of $sourceString beginning at the 
position indicated by the value of $startingLoc and continuing for the number 
of characters indicated by the value of $length. The characters returned do 
not extend beyond $sourceString. If $startingLoc is zero or negative, only 
those characters in positions greater than zero are returned. If $startingLoc 
is the empty sequence an error FORG--99 is raised. If $length is the empty 
sequence, the length is considered to be 0 and the empty sequence is being 
returned.

More specifically, the three argument version of the function returns the 
characters in $sourceString whose position $p obeys:

fn:round($startingLoc) &lt;= $p &lt; fn:round($startingLoc) + fn:round($length)

The two argument version of the function assumes that $length is infinite and 
returns the characters in $sourceString whose position $p obeys:

fn:round($startingLoc) &lt;= $p &lt; fn:round(INF)

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5091</commentid>
    <comment_count>2</comment_count>
    <who name="Mary Holstege">holstege</who>
    <bug_when>2005-07-21 20:41:57 +0000</bug_when>
    <thetext>The working group considered this comment at its meeting today
and decided not to accept it. For rationale, please see bug 1467.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>