[Uri-review] Comments on draft-hoehrmann-javascript-scheme (was: Proposal regarding draft-hoehrmann-javascript-scheme)

Mykyta Yevstifeyev <evnikita2@gmail.com> Thu, 30 June 2011 10:12 UTC

Return-Path: <evnikita2@gmail.com>
X-Original-To: uri-review@ietfa.amsl.com
Delivered-To: uri-review@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 06A4921F85A7 for <uri-review@ietfa.amsl.com>; Thu, 30 Jun 2011 03:12:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.413
X-Spam-Level:
X-Spam-Status: No, score=-3.413 tagged_above=-999 required=5 tests=[AWL=0.186, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BbleNgxO+qnB for <uri-review@ietfa.amsl.com>; Thu, 30 Jun 2011 03:12:05 -0700 (PDT)
Received: from mail-bw0-f44.google.com (mail-bw0-f44.google.com [209.85.214.44]) by ietfa.amsl.com (Postfix) with ESMTP id 2AF7D21F8591 for <uri-review@ietf.org>; Thu, 30 Jun 2011 03:11:56 -0700 (PDT)
Received: by bwb17 with SMTP id 17so2003318bwb.31 for <uri-review@ietf.org>; Thu, 30 Jun 2011 03:11:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=PbB6XEqtiUw6kQwHW58eQMe51FOYLMJKID8dxIKhXT0=; b=i+igGaC5nC5UCqYJVMwqa2XUXJcRS8Bh5QpzoO4KkMfFYIMp0zQYvLvQOewXTybSO3 cFiKwKNQuO6uQA7Zga56MuvFDLIlT9jDk8ZojwxZ9od+3Bl72uoyAkaHV3PX8P+ydqQC 5gMZ4QyXnuT3hkuutU678F0BYZqm1QwHl3pbo=
Received: by 10.204.156.216 with SMTP id y24mr1795075bkw.75.1309428715024; Thu, 30 Jun 2011 03:11:55 -0700 (PDT)
Received: from [127.0.0.1] ([195.191.104.224]) by mx.google.com with ESMTPS id e6sm1941364bka.23.2011.06.30.03.11.53 (version=SSLv3 cipher=OTHER); Thu, 30 Jun 2011 03:11:54 -0700 (PDT)
Message-ID: <4E0C4C17.7010207@gmail.com>
Date: Thu, 30 Jun 2011 13:12:39 +0300
From: Mykyta Yevstifeyev <evnikita2@gmail.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11
MIME-Version: 1.0
To: Bjoern Hoehrmann <derhoermi@gmx.net>, "uri-review@ietf.org" <uri-review@ietf.org>
References: <4E0B5015.7010508@gmail.com> <p3km07hckpdl1ugp9lpk336h6v6dvgsaai@hive.bjoern.hoehrmann.de> <4E0B539E.6040009@gmail.com> <70lm0796citvujkm477f4oithbimerefas@hive.bjoern.hoehrmann.de>
In-Reply-To: <70lm0796citvujkm477f4oithbimerefas@hive.bjoern.hoehrmann.de>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Subject: [Uri-review] Comments on draft-hoehrmann-javascript-scheme (was: Proposal regarding draft-hoehrmann-javascript-scheme)
X-BeenThere: uri-review@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Proposed URI Schemes <uri-review.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/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, 30 Jun 2011 10:12:06 -0000

Hello Bjoern, all,

I'm copying this to uri-review list.  These are comments on 
draft-hoehrmann-javascript-scheme 
(http://tools.ietf.org/html/draft-hoehrmann-javascript-scheme-03), 
currently expired (these comments are in no particular order).

Some substantial comments:

As I identified before, the document is missing the syntax description.  
URIs have a limited number of allowed characters; some disallowed ones 
might be legal in Javascript code.  Therefore, if you define the URI 
scheme, those characters which do not suit to <unreserved> production of 
RFC 3986 should be percent-encoded within such URI, and this should be 
mentioned in the specification.  If you define IRI scheme, <reserved> in 
RFC 3987 are the same as in RFC 3986, which should be considered.  
Anyway, it's better to have formal definition of syntax using ABNF, even 
though it is going to be smth. like:

>      javascript-uri = "javascript:" code
>      code           = segment
>
>    where <segment> rule is defined in RFC 3986 [RFC3986].
If you add this ABNF, the following should be changed in Section 3:

>        1.  Represent the scheme-specific part as sequence of octets in
>            the UTF-8 character encoding.
s/the scheme-specific part/the <code> part.

Other comments to Section 3.
>        2.  Replace any percent-encoded octet by its corresponding octet.
s/corresponding octet/corresponding ASCII character (or UCS character, 
if you decide to define IRIs).

>        3.  If the sequence starts with the sequence 0xEF 0xBB 0xBF, the
>            UTF-8 signature, then discard this signature.
Probably editorial.  This is a tautology; I propose

>        3.  If the obtined chain of octets starts with 0xEF 0xBB 0xBF,
>            which is the UTF-8 signtaure, ignore these 3 octets.
Next,

>        4.  Decode the octet sequence using the UTF-8 character encoding
>            and transform the result into source text.
Probably it would be better to mention "Decode the octet sequence using 
the algorithm defined in Section 3 of RFC 3629; obtained ASCII text 
should be considered to be Javascript source code."

Section 3.2 (and global): I don't see why you chose the name "In-context 
evaluation".  Shouldn't "In-context execution" be better?

Section 7 is missing registration template required by RFC 4395 
(http://tools.ietf.org/html/rfc4395#section-5.4).

29.06.2011 19:36, Bjoern Hoehrmann wrote:
> * Mykyta Yevstifeyev wrote:
>> Actually, I have identified a number of other issues, the main of which
>> is absence of section dedicated to syntax of the javascript URI.  There
>> are a number of editorial flaws, too.  So please, when you decide to
>> proceed, reconsider my offer.
> The Conformance section is dedicated to syntax. There is nothing more to
> it as it's just "javascript:" followed by the scheme specific part which
> is restricted in prose as that is not feasible in ABNF beyond "anything
> goes" if you have a proper IRI to begin with. Editorial problems, please
> do report, either to me directly or uri-review or wheverever.
Among other minor/editorial issues:

Global: s/resource identifier/URI (should be explained in Abstract when 
first mentioned as Uniform Resource Identifier) or IRI, dependent on 
what you define.  I suppose URI is a better term for 'javascript' RI.

Abstract:

>     Using
>     this scheme, executable script code can be specified in contexts that
>     support resource identifiers.

I propose:

>     Using 'javascript' URIs, Javascript (also known as ECMAScript)
>     executable code may be specified in such URI and executed by
>     the application resolving it.

Section 2:

>    Resource identifiers, including percent-encoding and requirements for
>    IRIs, are defined in STD 66, [RFC3986], and [RFC3987].  Source text
>    and the media type application/javascript are defined in [RFC4329],
>    the 'data' scheme in [RFC2397], and UTF-8, including the term byte
>    order mark, in STD 63, [RFC3629].


I think mentioning specification for these terms in the text of the 
document itself rather than combining them in one section seems to be a 
better option.  This will add clarity to the document.

Section 1:

>     The first operation, source text retrieval, defines which script code
>     a given 'javascript' resource identifier represents.
Maybe here s/defines which script code/defined how to determine the 
script code.

Ibid:

> <a href='javascript:doSomething()'>...</a>
For the purpose of an example, it would be better to mention something like

> <a href='javascript:doSomething()'>Run doSomething</a>
Ibid:

>     script, style sheet, HTML document, resource identifier, or other
>     type of resource, as appropriate for the context.
Considered you provide this list as an illustration of the previous 
phrase "like an Internet media type, how to process it" I should note 
URIs aren't classified as some media type so it's better to remove URIs 
from this list.  Moreover, probably you meant "MIME media type", not 
"Internet media type".  Also, informative reference to RFC 2046 is 
probably missing.

I hope my remarks were useful.

Thanks,
Mykyta Yevstifeyev