Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-781

substring: what to return if the start index is outside the first argument string, or the desired length exceeds the remaining string length

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_ERRATA02
    • Fix Version/s: V4.0_ERRATA03
    • Component/s: URL Conventions
    • Labels:
      None
    • Environment:

      [Applied]

    • Proposal:
      Hide

      -Empty string should be returned for an index larger than the length of the string.
      -Length too long should be allowed and return as many characters up to the specified length.
      -The behavior for a negative index is undefined.
      -A negative length is a bad request.

      Because negative index is undefined, interoperable clients should not use negative indexes.

      In 4.01, negative indexes mean count from the end, see ODATA-901

      Show
      -Empty string should be returned for an index larger than the length of the string. -Length too long should be allowed and return as many characters up to the specified length. -The behavior for a negative index is undefined. -A negative length is a bad request. Because negative index is undefined, interoperable clients should not use negative indexes. In 4.01, negative indexes mean count from the end, see ODATA-901
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/57553/odata-v4.0-wd08-part2-url-conventions-2016-02-17.docx

      Description

      This could be a "bad request" returning no results at all, or it could evaluate to null, which may just lead to excluding the offending instance from the result.

      Or a mix of both: negative start index is "bad request", start index or desired length beyond the end of the first argument is "null".

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              handl Ralf Handl
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: