[Bug 29357] New: Treat string as array

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29357

            Bug ID: 29357
           Summary: Treat string as array
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Requirements for Future Versions
          Assignee: jim.melton@acm.org
          Reporter: benito@benibela.de
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

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:

"string"(3)   becomes r

"string"?*    becomes ("s", "t", "r", "i", "n", "g")

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

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

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

Too bad  it is too late to make string-join(tokenize($foo)) = $foo

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Sunday, 3 January 2016 23:20:36 UTC