Subject: [T2TRG] Extensibility of link attributes

From: Klaus Hartke <[email-masked]>
Date: Mon, 28 Nov 2016 19:00:30 +0100

There is a number of RFCs that define link attributes for use with RFC
5988-style links. I've compiled a list of what I found below. There
may be more, though, as there is no registry for link attributes.

RFC 5988 [1]
    - rel
    - anchor
    - rev
    - hreflang
    - media
    - title
    - title*
    - type

RFC 6690 [2]
    - rt
    - if
    - sz

RFC 7252 [3]
    - ct

RFC 7641 [4]
    - obs

draft-ietf-core-resource-directory [5]
    - ins
    - exp
    - d
    - ep
    - gp

Link attributes generally fall in one of two categories: those that
describe the link itself (like 'rel' and 'anchor') and those that
describe the link target (like 'type' and 'sz').

There are many use cases where it makes sense to have additional
metadata that describe the link target. For example, if a resource
directory [5] links to a temperature sensor, it might be useful to
provide the physical location of the sensor (like "room 5230 in the
MZH building") along with the link in the resource directory. Or, if a
data hub [6] stores a collection of RFCs, it might be useful provide
the title, author and publication date along with the links in the
data hub.

So I was thinking if it'd make sense to use link attributes in CoRAL
[7] only to describe the link itself and use RDF predicates to
describe the link target.

For example, links to sensor resources could look like this:

    |
    +-- link rel='hosts' href='/sensors/temp'
    |   |
    |   +-- rfc6690:if "sensor"
    |   |
    |   +-- rfc6690:rt "temperature-c"
    |   |
    |   +-- example:location "room5230.floor5.mzh.uni-bremen.de"
    |
    +-- link rel='hosts' href='/sensors/light'
        |
        +-- rfc6690:if "sensor"
        |
        +-- rfc6690:rt "light-lux"
        |
        +-- rfc7641:obs "true"

And a collection of RFCs could look like this:

    |
    +-- link rel='item' href='/rfc/rfc2119.txt'
    |   |
    |   +-- dc:title "Key words for use in RFCs"
    |   |
    |   +-- dc:creator "S. Bradner"
    |   |
    |   +-- dc:date "March 1997"
    |
    +-- link rel='item' href='/rfc/rfc5988.txt'
        |
        +-- dc:title "Web Linking"
        |
        +-- dc:creator "M. Nottingham"
        |
        +-- dc:date "October 2010"
        |
        +-- rfc5988:hreflang "en"
        |
        +-- rfc5988:type "text/plain"

The disadvantage of this extensibility is that it adds a lot of
complexity (namespaces, prefixes, ...) compared to the really, really
simple RFC 5988-style links.

Thoughts?

Klaus

[1] https://tools.ietf.org/html/rfc5988
[2] https://tools.ietf.org/html/rfc6690
[3] https://tools.ietf.org/html/rfc7252
[4] https://tools.ietf.org/html/rfc7641
[5] https://tools.ietf.org/html/draft-ietf-core-resource-directory-09
[6] https://tools.ietf.org/html/draft-hartke-t2trg-data-hub-00
[7] https://tools.ietf.org/html/draft-hartke-t2trg-coral-01