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

Joe Gregorio <joe@bitworking.org> Wed, 17 April 2013 14:41 UTC

Return-Path: <joe.gregorio@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 D0F0F21E8051 for <apps-discuss@ietfa.amsl.com>; Wed, 17 Apr 2013 07:41:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.978
X-Spam-Level:
X-Spam-Status: No, score=-1.978 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, NO_RELAYS=-0.001]
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 X53asPToobmr for <apps-discuss@ietfa.amsl.com>; Wed, 17 Apr 2013 07:41:36 -0700 (PDT)
Received: from mail-ie0-x229.google.com (mail-ie0-x229.google.com [IPv6:2607:f8b0:4001:c03::229]) by ietfa.amsl.com (Postfix) with ESMTP id 12D2A21E804D for <apps-discuss@ietf.org>; Wed, 17 Apr 2013 07:41:36 -0700 (PDT)
Received: by mail-ie0-f169.google.com with SMTP id ar20so2017720iec.0 for <apps-discuss@ietf.org>; Wed, 17 Apr 2013 07:41:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=JpjmOvbsroKe8JK50XG8DtitwcRRnMUHQxmaHqRiBtk=; b=FBKNxA3NO9OD1KAuC3EHP0exvCJyrdE0kC13U5akMWH7p6iJkIRNccnFzTx8glSiJ5 NiZ3mFatSntNZILEsOO8nCWieb1UBOCikAb9KxEk0X28S0zny8OGVWwE4NUOZJz2bGIW CqrBxS47zjTUFTauZpGlmIHN0BcEy3P/b/7Hw6Mcq/9jAQi4EnQAMgLru9o3CsvvEFEx SEWJ5Oy6IQFoyChYkWoDMsTPguV3UF7sftyYPvQd4faSVIszO7QMhhSOd/7ZaxFlqg7a tbAjpCRo/7aWuB5ywrfS3WDf55n4J+9/mEI3fPww7teTX4Ox5lhhTewJL29N3sgNSqdV c+vg==
MIME-Version: 1.0
X-Received: by 10.50.55.8 with SMTP id n8mr4233381igp.28.1366209695610; Wed, 17 Apr 2013 07:41:35 -0700 (PDT)
Sender: joe.gregorio@gmail.com
Received: by 10.64.53.136 with HTTP; Wed, 17 Apr 2013 07:41:35 -0700 (PDT)
In-Reply-To: <CALcybBD83_x9P0=tNy+4i91mgyYrDWpVHp++QtF06Ouc7sjZ8w@mail.gmail.com>
References: <CALcybBBXFDvAp1xpbi4=55Gq0QbfbTH7TV=1MTko7nNdtt-5WQ@mail.gmail.com> <CALcybBBcCTh8+RVWp5UW+2-s9EdKxdoeGdcq6+yGrGJk1nzP0w@mail.gmail.com> <51625870.8000906@berkeley.edu> <CA+-NybWfR47yScyTBi7BRpJgj5SnCxWY1rDV5KC8PuE+JEV90A@mail.gmail.com> <CALcybBD83_x9P0=tNy+4i91mgyYrDWpVHp++QtF06Ouc7sjZ8w@mail.gmail.com>
Date: Wed, 17 Apr 2013 10:41:35 -0400
X-Google-Sender-Auth: aD6Uqlb724ko--9SJFXymc7PPS8
Message-ID: <CA+-NybWeL0MtaXOiq-zqYpyWU7TmveoR+q20yb5Rr6XOw0W3QA@mail.gmail.com>
From: Joe Gregorio <joe@bitworking.org>
To: Francis Galiegue <fgaliegue@gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"
Cc: "apps-discuss@ietf.org" <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: Wed, 17 Apr 2013 14:41:39 -0000

On Wed, Apr 17, 2013 at 10:31 AM, Francis Galiegue <fgaliegue@gmail.com> wrote:
> On Wed, Apr 17, 2013 at 4:03 PM, Joe Gregorio <joe@bitworking.org> wrote:
> [...]
>>>
>>>
>>> https://github.com/dret/uritemplate-test/blob/master/spec-examples-by-section.json
>>> (line 234) says it's "X", but i am really interested in the "why"
>>> explanation as well. http://tools.ietf.org/html/rfc6570#section-3.2.5 says
>>> that
>>
>> The answer is in the text you quote:
>>
>> "for each defined variable in the variable-list, append '.' to the
>> result string and then perform variable expansion"
>>
>> The set of variables in the variable list is the empty set, so no '.'
>> is appended.
>>
>
> Is it really the case?

Yes.

> I don't see an empty list as an undefined variable.

Which is why an addendum should be added to the spec.

>
> Or it would mean that the first thing which needs to be done is expand
> variable values (scalars, lists, associative arrays) before "grouping"
> them.
>
>
> --
> 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



--
Joe Gregorio        http://bitworking.org