Subject: [apps-discuss] About URI templates in descriptors

From: Goix Laurent Walter <[email-masked]>
Date: Tue, 17 Jul 2012 14:33:59 +0200

Hello all,

I have noticed over the past months different drafts making use on URI templates (rfc6570 typically) with different approaches/syntaxes. I'd like to understand whether a best -common- practice can be found on its usage (unless it exists already). Here are some examples:

-          http://tools.ietf.org/html/draft-nottingham-json-home-01 makes use of "href-template" together with "href-vars" for dynamic definition of template variables, such as:
         "href-template": "/widgets/{widget_id}",
         "href-vars": {
           "widget_id": "http://example.org/param/widget"
         }

-          http://tools.ietf.org/html/draft-kelly-json-hal-03 uses < href > for regular URIS as well as templates, and defines a "templated" boolean flag to discriminate them, such as:

        "href": "http://docs.acme.com/relations/{rel}",

         "templated": true

-          http://tools.ietf.org/html/draft-ietf-appsawg-webfinger-00 relies on the "template" link attribute defined in OASIS XRD (or in RFC6415's JRD in json), and only uses the "uri" template variable defined in RFC6415, such as:

        "template" : "https://example.com/lrdd/?format=json&uri={uri}"

I am wondering whether it could make sense to:

-          Harmonize the syntax in referencing template URIs within descriptors, at least in these use cases, which seem consistent in their reference to such type of URIs

-          Consider a registry for reserved template variables (just like for link rels), to improve interoperability, whilst still allowing for extensibility/dynamicity

Here would be a very personal consideration:

-          Leverage the XRD/rfc6415 syntax for referencing template URIs through the "template" property (in lieu of "href" or "href-template" and with no "template: true" extra property)

-          Leverage the json-home concept of "template-vars" for dynamic definition of template variables (in a first place these could be seen as "local variables" that override the "reserved" variables if present)

-          register globally some early template variable names, such as "uri" (rfc6415) and "username" (cited as example in json-home draft)

I apologize if this was somehow already discussed in the past (e.g. the concept of a registry for uri template variable names) and would be happy to get some pointer of the outcome of that discussion, or any type of other feedback.

thanks
walter

------------------------------------------------------------------
Telecom Italia
Laurent-Walter Goix
Innovation & Industry Relations, Research & Prototyping, Future Internet
Piazza Einaudi 8 - 20124 Milano (Italy)
Tel. +39 026213445
Mob. +39 3356114196
Fax +39 0641869055

Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.

This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks.

Rispetta l'ambiente. Non stampare questa mail se non ? necessario.

---

From: Graham Klyne <[email-masked]>
Date: Tue, 17 Jul 2012 14:40:39 +0100

Hi,

I've been doing work that supplies templates in RDF data, which is yet another 
syntax (or three).

I don't think a common syntax is really an option, as it depends somewhat on the 
carrier syntax adopted by the application.  Mark's JSON-home draft provides a 
possible common entry point (along with his Link-template proposal) - I don't 
see that it makes sense to do much more than that without further context.

#g
--

On 17/07/2012 13:33, Goix Laurent Walter wrote:
> -          http://tools.ietf.org/html/draft-kelly-json-hal-03 uses<  href>  for regular URIS as well as templates, and defines a "templated" boolean flag to discriminate them, such as:
>
> Innovation&  Industry Relations, Research&  Prototyping, Future Internet
> _______________________________________________
> apps-discuss mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/apps-discuss