Re: [apps-discuss] Media Type for HTML 'snippets'?

Larry Masinter <masinter@adobe.com> Thu, 25 October 2012 02:42 UTC

Return-Path: <masinter@adobe.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 36D8321F8231 for <apps-discuss@ietfa.amsl.com>; Wed, 24 Oct 2012 19:42:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.099
X-Spam-Level:
X-Spam-Status: No, score=-104.099 tagged_above=-999 required=5 tests=[AWL=2.500, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
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 LFgwvzogNVDv for <apps-discuss@ietfa.amsl.com>; Wed, 24 Oct 2012 19:42:49 -0700 (PDT)
Received: from exprod6og115.obsmtp.com (exprod6og115.obsmtp.com [64.18.1.35]) by ietfa.amsl.com (Postfix) with ESMTP id 60B1421F8200 for <apps-discuss@ietf.org>; Wed, 24 Oct 2012 19:42:49 -0700 (PDT)
Received: from outbound-smtp-1.corp.adobe.com ([192.150.11.134]) by exprod6ob115.postini.com ([64.18.5.12]) with SMTP ID DSNKUIinKKnedCswqIqsqt7nR5i6uGKcYQCJ@postini.com; Wed, 24 Oct 2012 19:42:49 PDT
Received: from inner-relay-1.corp.adobe.com ([153.32.1.51]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q9P2e51v005595; Wed, 24 Oct 2012 19:40:05 -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 q9P2gmNc000155; Wed, 24 Oct 2012 19:42:48 -0700 (PDT)
Received: from nambxv01a.corp.adobe.com ([10.8.189.95]) by nahub01.corp.adobe.com ([10.8.189.97]) with mapi; Wed, 24 Oct 2012 19:42:48 -0700
From: Larry Masinter <masinter@adobe.com>
To: Jan Algermissen <algermissen1971@mac.com>, "apps-discuss@ietf.org application-layer protocols" <apps-discuss@ietf.org>
Date: Wed, 24 Oct 2012 19:42:44 -0700
Thread-Topic: [apps-discuss] Media Type for HTML 'snippets'?
Thread-Index: Ac2m94m7U/thciyuRlyyGl4FcxrGjwLXhYfg
Message-ID: <C68CB012D9182D408CED7B884F441D4D1E36C369D0@nambxv01a.corp.adobe.com>
References: <8573713A-4AEC-4C63-8379-F2FDE9274BB6@mac.com>
In-Reply-To: <8573713A-4AEC-4C63-8379-F2FDE9274BB6@mac.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [apps-discuss] Media Type for HTML 'snippets'?
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: Thu, 25 Oct 2012 02:42:50 -0000

Content-type annotations are only advisory, in a world where receivers regularly "sniff" the content and override the content-type label anyway.

Since you have an application which receives these snippits and processes them, and you don't want intermediaries or proxies to rewrite them, search them, or do any generic processing of the content,  perhaps "application/octet-stream" would be appropriate. Or no content-type at all... who cares?

The new registration for text/html  http://www.iana.org/assignments/media-types/text/html
points to the HTML5 spec;  snippets wrapped  <div>   </div> would be processed fine, so "text/html" would be appropriate.

If you mean for the snippets to be processed as XML and not as HTML, consider 
(from http://tools.ietf.org/html/draft-lilley-xml-mediatypes-00 ) 
"text/xml-external-parsed-entity" (or "application/xml-external-parsed-entity") might do you.


> -----Original Message-----
> From: apps-discuss-bounces@ietf.org [mailto:apps-discuss-bounces@ietf.org]
> On Behalf Of Jan Algermissen
> Sent: Wednesday, October 10, 2012 4:03 AM
> To: apps-discuss@ietf.org application-layer protocols
> Subject: [apps-discuss] Media Type for HTML 'snippets'?
> 
> Hi,
> 
> I am looking for an appropriate media type to use when serving HTML snippets
> that have a <div> as their root element.
> 
> I feel that serving HTML document fragments has become such a common
> scenario, I think there must be some solution already. However - I cannot find
> anything appropriate.
> 
> The closest thing is likely Atom's type attribute:
> http://tools.ietf.org/html/rfc4287#section-3.1.1.3
> 
> Can anyone provide a pointer or ideas?
> 
> Or is it time probably time for application/xhtml-div+xml
> 
> Jan
> _______________________________________________
> apps-discuss mailing list
> apps-discuss@ietf.org
> https://www.ietf.org/mailman/listinfo/apps-discuss