Re: [apps-discuss] Question about URI template and expansion of an empty list

James M Snell <jasnell@gmail.com> Mon, 08 April 2013 14:51 UTC

Return-Path: <jasnell@gmail.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A7BF421F9774 for <apps-discuss@ietfa.amsl.com>; Mon, 8 Apr 2013 07:51:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.099
X-Spam-Level:
X-Spam-Status: No, score=-3.099 tagged_above=-999 required=5 tests=[AWL=0.500, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8u4e4KMflAzR for <apps-discuss@ietfa.amsl.com>; Mon, 8 Apr 2013 07:51:06 -0700 (PDT)
Received: from mail-oa0-f43.google.com (mail-oa0-f43.google.com [209.85.219.43]) by ietfa.amsl.com (Postfix) with ESMTP id 05A6021F9758 for <apps-discuss@ietf.org>; Mon, 8 Apr 2013 07:51:05 -0700 (PDT)
Received: by mail-oa0-f43.google.com with SMTP id l10so6237660oag.2 for <apps-discuss@ietf.org>; Mon, 08 Apr 2013 07:51:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=3jM3Xh1cNkWdjxi7PsxrSpS7ZvG0v8olvLSaV7PILrw=; b=K7ZGJoPpEZizhmnbgZLESFzEUlTeAQxxHp5m+F2hIVnMs4rC1Ry2BIY9kqzzbHFu62 rwOO72c/uXQ2WF5ipFW7WYX2dyC6N7kohgJEC9209K1+7B+zi+GtYoG67VoYTRIcZBng 7xL6ciwzzi76uuQ75BJssfxkh1ZbhJHH3MiD9KyRcrLsoKFR44olpyGaWP1PhOirQEo/ 74rzJGJ28je/28Erl4AURo9Mqs5F03Wag5VZavJAb3smP1gzbTACsTorLocuSSZFIfM2 Z1n7U9jjzKcsf8DdTq29Q3K3YPLj3XtpwaV5iXC0XuKnmmqDJ6K+/p9PlIRfeTPgm9dn mTVg==
X-Received: by 10.60.50.102 with SMTP id b6mr15523241oeo.46.1365432665633; Mon, 08 Apr 2013 07:51:05 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.60.132.102 with HTTP; Mon, 8 Apr 2013 07:50:45 -0700 (PDT)
In-Reply-To: <CAL0qLwYsVt63VAtg0yqG=KDO7e1DvmE-8ywXM8CBqrt8mxDZOA@mail.gmail.com>
References: <CALcybBBXFDvAp1xpbi4=55Gq0QbfbTH7TV=1MTko7nNdtt-5WQ@mail.gmail.com> <CALcybBBcCTh8+RVWp5UW+2-s9EdKxdoeGdcq6+yGrGJk1nzP0w@mail.gmail.com> <51625870.8000906@berkeley.edu> <CAL0qLwYR+HknkVH5Y_jusqBv3=QbALFe=5t3FhYArNxzQYDPpQ@mail.gmail.com> <CALcybBCeyJce+m7GB8ak_Wmwfk6+Z=bcaDKs489H0v4vLOgahw@mail.gmail.com> <CABP7RbfLQ5wCTNEJ4ufEs76YoVBePP8JYLQkjgUHJQ-o3=pUeg@mail.gmail.com> <CAL0qLwYsVt63VAtg0yqG=KDO7e1DvmE-8ywXM8CBqrt8mxDZOA@mail.gmail.com>
From: James M Snell <jasnell@gmail.com>
Date: Mon, 08 Apr 2013 07:50:45 -0700
Message-ID: <CABP7RbfDOS4pdnx5Z4arwLw8demRfKrT4bE+Jb4uzvcdgzKRfw@mail.gmail.com>
To: "Murray S. Kucherawy" <superuser@gmail.com>, Joe Gregorio <joe@bitworking.org>
Content-Type: text/plain; charset="UTF-8"
Cc: IETF Apps Discuss <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] Question about URI template and expansion of an empty list
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 08 Apr 2013 14:51:07 -0000

"empty_keys" is not defined explicitly as an empty associative array.
The only definition given for "empty_keys" in section 3.2 is
"empty_keys := []" which is semantically and structurally identical to
an empty list. So to amend your rules, we have:

- an undefined value produces "X"
- a defined-but-empty string produces "X."
- a defined-but-empty list/associative-array produces "X"

- James


On Mon, Apr 8, 2013 at 6:53 AM, Murray S. Kucherawy <superuser@gmail.com> wrote:
> empty_keys (defined in 3.2) is an empty associative array, not an empty
> list.  So we have:
>
> - an undefined value produces "X"
> - a defined-but-empty string produces "X."
> - a defined-but-empty associative array produces "X"
>
> It's not clear to me that there's a pattern here yielding an obvious answer
> for which of the two a defined-but-empty list should produce.
>
>
> On Mon, Apr 8, 2013 at 6:37 AM, James M Snell <jasnell@gmail.com> wrote:
>>
>> Am I missing something subtle about the question? The examples in Section
>> 3.2.5 show "X{.empty_keys}" where empty keys = [], expands to "X". Given
>> that the list is empty, there's nothing to expand it into.
>>
>> On Apr 8, 2013 5:54 AM, "Francis Galiegue" <fgaliegue@gmail.com> wrote:
>>>
>>> On Mon, Apr 8, 2013 at 8:55 AM, Murray S. Kucherawy <superuser@gmail.com>
>>> wrote:
>>> > I'm inclined to think it's "X." for the same reason "X{.empty}" is
>>> > "X.",
>>> > which is to say that an empty list, like an empty string, isn't
>>> > undefined,
>>> > but there is indeed nothing to expand.
>>> >
>>> > Either way, there may be grounds for an erratum here.  The RFC does
>>> > talk
>>> > about handling empty strings, but not empty lists.  The closest is
>>> > Section
>>> > 3.2.1 which talks about "expansion of a defined, non-empty value",
>>> > meaning
>>> > defined, empty values aren't explicitly covered in the prose as far as
>>> > I can
>>> > see.
>>> >
>>>
>>> Similarly, it doesn't talk about extending empty maps.
>>>
>>> --
>>> Francis Galiegue, fgaliegue@gmail.com
>>> JSON Schema in Java: http://json-schema-validator.herokuapp.com
>>> _______________________________________________
>>> apps-discuss mailing list
>>> apps-discuss@ietf.org
>>> https://www.ietf.org/mailman/listinfo/apps-discuss
>
>