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

Francis Galiegue <fgaliegue@gmail.com> Wed, 17 April 2013 14:31 UTC

Return-Path: <fgaliegue@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 8D35721F8A11 for <apps-discuss@ietfa.amsl.com>; Wed, 17 Apr 2013 07:31:16 -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 agUMkw3jn3RA for <apps-discuss@ietfa.amsl.com>; Wed, 17 Apr 2013 07:31:15 -0700 (PDT)
Received: from mail-ee0-f42.google.com (mail-ee0-f42.google.com [74.125.83.42]) by ietfa.amsl.com (Postfix) with ESMTP id 519A121F8A0C for <apps-discuss@ietf.org>; Wed, 17 Apr 2013 07:31:15 -0700 (PDT)
Received: by mail-ee0-f42.google.com with SMTP id e49so86399eek.29 for <apps-discuss@ietf.org>; Wed, 17 Apr 2013 07:31:14 -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=elMzPReFzqd4L5CvLmJ43QjZNdVWFqcspUFvOIHYhY4=; b=idlX9ncZ+Sl2tt7N/1Evm116LZa+XzOSmodUgYRgDRUtZuqOfQAvTDJNNwZPMIWrfM zG480eYz65kC5d/1nl5W6qZbeF/ixmpFCkrvKdLVGiUmn9NDCegNCnNUWeGmQxlVBElg 8y30Ay0iEz0Jeqvpzq0m5DK2iR0W6lCtMrjelRBdOcy1YlxOoCq3GEOepfBv/FWiqd/3 IMTiEfSwZyfeDuh4LMDfBBj3cfZejub80ELo518rgpSulEK/lrFToIG/qW3fYyfGXCQv +9UEZ8nuAEL5LFOi2LfFuvfjgp8EQYa/YYXQUzhnLla2dBrCZL1Y7kPiLm7XpS/Kl4eG dDMQ==
MIME-Version: 1.0
X-Received: by 10.14.179.201 with SMTP id h49mr18758668eem.26.1366209074414; Wed, 17 Apr 2013 07:31:14 -0700 (PDT)
Received: by 10.14.213.4 with HTTP; Wed, 17 Apr 2013 07:31:14 -0700 (PDT)
In-Reply-To: <CA+-NybWfR47yScyTBi7BRpJgj5SnCxWY1rDV5KC8PuE+JEV90A@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>
Date: Wed, 17 Apr 2013 16:31:14 +0200
Message-ID: <CALcybBD83_x9P0=tNy+4i91mgyYrDWpVHp++QtF06Ouc7sjZ8w@mail.gmail.com>
From: Francis Galiegue <fgaliegue@gmail.com>
To: Joe Gregorio <joe@bitworking.org>
Content-Type: text/plain; charset=UTF-8
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:31:16 -0000

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? I don't see an empty list as an undefined variable.

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