<?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>29357</bug_id>
          
          <creation_ts>2016-01-03 23:20:34 +0000</creation_ts>
          <short_desc>Treat string as array</short_desc>
          <delta_ts>2016-01-03 23:20: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>Requirements for Future Versions</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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="Benito van der Zander">benito</reporter>
          <assigned_to name="Jim Melton">jim.melton</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>124510</commentid>
    <comment_count>0</comment_count>
    <who name="Benito van der Zander">benito</who>
    <bug_when>2016-01-03 23:20:34 +0000</bug_when>
    <thetext>Strings are basically lists of characters. But in XQuery it is hard to access the individual characters and you cannot use sequence manipulation on the string. string-to-codepoints is way too long to type. You could not treat the string as sequence, as they could not nest, but now there are arrays and you can treat the string as array:

&quot;string&quot;(3)   becomes r

&quot;string&quot;?*    becomes (&quot;s&quot;, &quot;t&quot;, &quot;r&quot;, &quot;i&quot;, &quot;n&quot;, &quot;g&quot;)

Then you can use all the sequence stuff on it. (&quot;string&quot;?*)[. &gt; &quot;n&quot;]=&gt;reverse()=&gt;string-join() and get &quot;ts&quot;

The NCName could be an contains test. &quot;string&quot;?str = true(), &quot;string&quot;?xxx = false()
Or a some matching. Would be more general. &quot;string&quot;?str = &quot;string&quot;, &quot;string&quot;?tr = &quot;tring&quot;, &quot;string&quot;?ing = &quot;ing&quot;, &quot;string&quot;?xxx = &quot;&quot;

Perhaps also remove the silly FORX0003 and let tokenize(&quot;string&quot;, &quot;&quot;) = &quot;string&quot;?*

Too bad  it is too late to make string-join(tokenize($foo)) = $foo</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>