Re: [Uri-review] review requested for the YANG definition of a URI datatype

Larry Masinter <masinter@adobe.com> Thu, 02 April 2009 03:48 UTC

Return-Path: <masinter@adobe.com>
X-Original-To: uri-review@core3.amsl.com
Delivered-To: uri-review@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 9769F3A67F2 for <uri-review@core3.amsl.com>; Wed, 1 Apr 2009 20:48:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.349
X-Spam-Level:
X-Spam-Status: No, score=-6.349 tagged_above=-999 required=5 tests=[AWL=-0.050, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q-pwHP7gatcr for <uri-review@core3.amsl.com>; Wed, 1 Apr 2009 20:48:19 -0700 (PDT)
Received: from exprod6og103.obsmtp.com (exprod6og103.obsmtp.com [64.18.1.185]) by core3.amsl.com (Postfix) with ESMTP id CC93D3A6838 for <uri-review@ietf.org>; Wed, 1 Apr 2009 20:47:48 -0700 (PDT)
Received: from source ([192.150.8.22]) by exprod6ob103.postini.com ([64.18.5.12]) with SMTP ID DSNKSdQ1m4qzsMBQ1WJRDn70pD3m1FXRsbOi@postini.com; Wed, 01 Apr 2009 20:49:20 PDT
Received: from inner-relay-1.corp.adobe.com ([153.32.1.51]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id n323mdE0021879; Wed, 1 Apr 2009 20:48:40 -0700 (PDT)
Received: from nahub01.corp.adobe.com (nahub01.corp.adobe.com [10.8.189.97]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id n323mciq001179; Wed, 1 Apr 2009 20:48:38 -0700 (PDT)
Received: from nambx04.corp.adobe.com ([10.8.127.98]) by nahub01.corp.adobe.com ([10.8.189.97]) with mapi; Wed, 1 Apr 2009 20:48:38 -0700
From: Larry Masinter <masinter@adobe.com>
To: " Martin J. Dürst " <duerst@it.aoyama.ac.jp>
Date: Wed, 01 Apr 2009 20:48:28 -0700
Thread-Topic: [Uri-review] review requested for the YANG definition of a URI datatype
Thread-Index: AcmzRegHqTDg4IL3Q0eaCj+XuoQ97g==
Message-ID: <D09979E0-BC50-47C0-85CE-F41A3C75B8F6@adobe.com>
References: <20090401091257.GC15362@elstar.local> <49D420EA.5090906@it.aoyama.ac.jp>
In-Reply-To: <49D420EA.5090906@it.aoyama.ac.jp>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-Mailman-Approved-At: Wed, 01 Apr 2009 22:14:14 -0700
Cc: "uri-review@ietf.org" <uri-review@ietf.org>, Martin Bjorklund <mbj@tail-f.com>, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, "uri@w3.org" <uri@w3.org>, David Partain <david@partain.se>
Subject: Re: [Uri-review] review requested for the YANG definition of a URI datatype
X-BeenThere: uri-review@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Proposed URI Schemes <uri-review.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/uri-review>, <mailto:uri-review-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/uri-review>
List-Post: <mailto:uri-review@ietf.org>
List-Help: <mailto:uri-review-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/uri-review>, <mailto:uri-review-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 02 Apr 2009 03:48:21 -0000

I'm not sure that "necessary" percent encoding is well defined

Sent from my iPhone

On Apr 1, 2009, at 7:22 PM, "Martin J. Dürst" <duerst@it.aoyama.ac.jp>  
wrote:

> Hello Juergen,
>
> I think this is a question about generic URI syntax, and therefore
> should go to uri@w3.org (which I have cc'ed).
>
> Did you also consider having a datatype for IRIs?
>
> Regards,    Martin.
>
> P.S.: Please remove uri-review@ietf.org from the cc list when  
> replying.
>
> On 2009/04/01 18:12, Juergen Schoenwaelder wrote:
>> Hi,
>>
>> I am editor of a document defining among other things a URI data type
>> for the YANG data modeling language (NETMOD working group). Right  
>> now,
>> our definition looks as follows (<draft-ietf-netmod-yang-types-02>):
>>
>>    typedef uri {
>>      type string;    // [TODO] add the regex from RFC 3986 here?
>>      description
>>       "The uri type represents a Uniform Resource Identifier
>>        (URI) as defined by STD 66.
>>
>>        Objects using the uri type must be in US-ASCII encoding,
>>        and MUST be normalized as described by RFC 3986 Sections
>>        6.2.1, 6.2.2.1, and 6.2.2.2.  All unnecessary
>>        percent-encoding is removed, and all case-insensitive
>>        characters are set to lowercase except for hexadecimal
>>        digits, which are normalized to uppercase as described in
>>        Section 6.2.2.1.
>>
>>        The purpose of this normalization is to help provide
>>        unique URIs.  Note that this normalization is not
>>        sufficient to provide uniqueness.  Two URIs that are
>>        textually distinct after this normalization may still be
>>        equivalent.
>>
>>        Objects using the uri type may restrict the schemes that
>>        they permit.  For example, 'data:' and 'urn:' schemes
>>        might not be appropriate.
>>
>>        A zero-length URI is not a valid URI.  This can be used to
>>        express 'URI absent' where required
>>
>>        This type is in the value set and its semantics equivalent
>>        to the Uri textual convention of the SMIv2.";
>>      reference
>>       "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax
>>        RFC 3305: Report from the Joint W3C/IETF URI Planning Interest
>>                  Group: Uniform Resource Identifiers (URIs), URLs,
>>                  and Uniform Resource Names (URNs): Clarifications
>>                  and Recommendations
>>        RFC 5017: MIB Textual Conventions for Uniform Resource
>>                  Identifiers (URIs)";
>>    }
>>
>> One particular question is whether it is safe to add the following
>> pattern restriction (XSD regular expression syntax):
>>
>>   type string {
>>     pattern '(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))? 
>> (#(.*))?';
>>   }
>>
>> The regular expression is taken from appendix B of RFC 3986.
>>
>> /js
>>
>
> -- 
> #-# Martin J.Dürst, Professor, Aoyama Gakuin University
> #-# http://www.sw.it.aoyama.ac.jp   mailto:duerst@it.aoyama.ac.jp
>