Re: [core] Link target attributes in CoRAL (was: Review of CoRAL)

Christian M. Amsüss <> Mon, 05 November 2018 12:36 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id A31C5128CFD for <>; Mon, 5 Nov 2018 04:36:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -0.921
X-Spam-Status: No, score=-0.921 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FROM_EXCESS_BASE64=0.979] autolearn=no autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id V_EujvcvKjCj for <>; Mon, 5 Nov 2018 04:36:09 -0800 (PST)
Received: from ( [IPv6:2a01:4f8:190:3064::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id F1D191298C5 for <>; Mon, 5 Nov 2018 04:36:08 -0800 (PST)
Received: from (unknown [IPv6:2a02:b18:c13b:8010:a800:ff:fede:b1bd]) by (Postfix) with ESMTPS id 0A50241E9D; Mon, 5 Nov 2018 13:36:07 +0100 (CET)
Received: from ( []) by (Postfix) with ESMTP id 7A2C810A; Mon, 5 Nov 2018 13:36:05 +0100 (CET)
Received: from ( [IPv6:2a02:b18:c13b:8010::71b]) by (Postfix) with ESMTPSA id 2E21B5B; Mon, 5 Nov 2018 13:36:05 +0100 (CET)
Received: (nullmailer pid 13712 invoked by uid 1000); Mon, 05 Nov 2018 12:36:04 -0000
Date: Mon, 5 Nov 2018 13:36:04 +0100
From: Christian =?iso-8859-1?B?TS4gQW1z/HNz?= <>
To: Klaus Hartke <>
Cc: " WG" <>
Message-ID: <>
References: <>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wRRV7LY7NUeQGEoC"
Content-Disposition: inline
In-Reply-To: <>
User-Agent: Mutt/1.10.1 (2018-07-13)
Archived-At: <>
Subject: Re: [core] Link target attributes in CoRAL (was: Review of CoRAL)
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 05 Nov 2018 12:36:12 -0000


On Mon, Nov 05, 2018 at 12:57:10PM +0100, Klaus Hartke wrote:
> > * ibd: Then, it can say something like "MUST NOT occur in a CoRAL
> >   document as attributes, but are expressed as link relations, nested
> >   links and link relations, respectively" to indicate that their
> >   information is not lost in the transition.
> This is true for "rel" and "anchor", but not for potential new
> attributes defined in the future. I don't think CoRAL should try to
> accommodate those, so I'd just forbid all of them (without giving a
> mapping to CoRAL) as it is now.

Non-target link attributes are something I'd discourage in general;
would you, when someone does define new non-target attributes, encourage
them to specify how they'd be expressed in CoRAL?

(RDF would typically do some form of reificiation there, or provide an
intermediate anonymous node).

> Since in CoRAL it's possible to make statements about link targets
> (here: the literal "Überschrift"), something like this would look
> natural to me:
>       #using iana = <>
>       #using attr = <http://TBD2/>
>       iana:terms-of-service </tos> {
>          attr:title "Nutzungsbedingungen" { attr:hreflang "de" }
>          attr:title "Terms of use"        { attr:hreflang "en" }
>       }
>    <=>
>       </tos>; rel=terms-of-service;
>          title*=UTF-8'de'Nutzungsbedingungen;
>          title*=UTF-8'en'Terms%20of%20use

That's kind of neat and kind of scary. The scary comes from the
implications of

    hosts </present> {
        attr:title "Gift" { attr:hreflang "en" }
        attr:title "Geschenk" { attr:hreflang "de" }
    hosts </posion> {
        attr:title "Poison" { attr:hreflang "en" }
        attr:title "Gift" { attr:hreflang "de" }

which may be read to imply that there is a string "Gift" that is both
English and German and describes both resources.

I think it can still work b/c none of that would survive a naïve
round-trip to RDF, and a converter would need to make

    </present> attr:title "Gift"@en, "Geschenk"@de .
    </poison> attr:title "Poison"@en, "Gift"@de .

out of it because RDF statements can't have literals in their subject,
but that issue would need to be well-understood, and literals would need
to be described along the lines of "Two literals are only interchangable
if they have the same literal value *and* all their properties are
identical", where it is not possible to give a literal properties
outside of where it is defined (for that would create a different

> Another, related question is how to express link target attributes
> containing multiple, white-space separated values.

Yes; I have a similar proposal for that in micrurus[1], but it does not
go as far as converting to URIs or numerics yet.


> If there's a guarantee that there won't be any new link target
> attributes in the future (for RFC 6690 link serializations), then we
> could skip the whole mapping topic and just define a new, more natural
> set of link relation types:

I don't think we need a guarantee for that. We can, as they pop up, for
some funny-string-valued attributes define equivalent more semantic
attributes, each with their own mapping. So a general CoRAL processor
you could encounter both `attr: rt="x y"` or `split-attr:rt rt:x,
split-attr rt:y` and needs to know of the equivalence.

A profile like links-CoRAL could then say that types need to be
expressed using the split attributes.

I would, in general, discourage defining new white-space-separated
attributes, and in particular I already do so in RD, for the RD would
need to know that an attribute is such a one for usable lookup.

As for the prefix, attr:rt, attr:if and attr:ct have registries, so we
could treat non-URI bare values in analogy to link relation types.
(Those produce currently uncompressible URIs, leading to profile-defined
URIs in what will be another thread).

Best regards

To use raw power is to make yourself infinitely vulnerable to greater powers.
  -- Bene Gesserit axiom