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

"Murray S. Kucherawy" <superuser@gmail.com> Mon, 08 April 2013 13:53 UTC

Return-Path: <superuser@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 77C9321F8D52 for <apps-discuss@ietfa.amsl.com>; Mon, 8 Apr 2013 06:53:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.598
X-Spam-Level:
X-Spam-Status: No, score=-3.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, 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 WDsUx146RMUW for <apps-discuss@ietfa.amsl.com>; Mon, 8 Apr 2013 06:53:52 -0700 (PDT)
Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com [74.125.82.44]) by ietfa.amsl.com (Postfix) with ESMTP id E85DB21F8D2C for <apps-discuss@ietf.org>; Mon, 8 Apr 2013 06:53:50 -0700 (PDT)
Received: by mail-wg0-f44.google.com with SMTP id z12so5846332wgg.35 for <apps-discuss@ietf.org>; Mon, 08 Apr 2013 06:53:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=yHsUmL+D+HNtYDIFJKhX6hhJGD+6F54p3powI5lIDrE=; b=vCSAOMJDsn+LbXF2zJ+Jg9UtuAl4ZJIWJKCS9vHlOQ4S/AOaP8UeYFJWnHjsPkSlNs LkLgH8l078VQnw06B4a9boktqcJYEJCrW467+DZsLavLlZ3q7DwyrTqsZwl0naodNVwM kHEXrUFNSHVdjX3ufpeZMAh/3SQg0h8i5hS3jW1hDQjXi5dZOvxtNqBV2ZqMXAE2jmTW mzIxr1Sf1biPgG+YfawLX8O8eXKPALA2olckgv5VtmbQ6DvmbN1NWqkjkfxtvB/nd5oV /Gs2Faz0wf+x5Wfo0jQRPMkUhZb3wm8gb9f1lfFyg06/TzX340YASExbEab3HZj/Wk1i 9+7A==
MIME-Version: 1.0
X-Received: by 10.194.109.35 with SMTP id hp3mr31792217wjb.15.1365429229947; Mon, 08 Apr 2013 06:53:49 -0700 (PDT)
Received: by 10.180.36.176 with HTTP; Mon, 8 Apr 2013 06:53:49 -0700 (PDT)
In-Reply-To: <CABP7RbfLQ5wCTNEJ4ufEs76YoVBePP8JYLQkjgUHJQ-o3=pUeg@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>
Date: Mon, 08 Apr 2013 06:53:49 -0700
Message-ID: <CAL0qLwYsVt63VAtg0yqG=KDO7e1DvmE-8ywXM8CBqrt8mxDZOA@mail.gmail.com>
From: "Murray S. Kucherawy" <superuser@gmail.com>
To: James M Snell <jasnell@gmail.com>
Content-Type: multipart/alternative; boundary="089e010d857437974404d9d9c4be"
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 13:53:55 -0000

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
>>
>