<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.14 (Ruby 3.3.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-bormann-asdf-sdftype-link-03" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.21.0 -->
  <front>
    <title abbrev="sdfType for Links">An sdfType for Links</title>
    <seriesInfo name="Internet-Draft" value="draft-bormann-asdf-sdftype-link-03"/>
    <author initials="C." surname="Bormann" fullname="Carsten Bormann">
      <organization>Universität Bremen TZI</organization>
      <address>
        <postal>
          <street>Postfach 330440</street>
          <city>Bremen</city>
          <code>D-28359</code>
          <country>Germany</country>
        </postal>
        <phone>+49-421-218-63921</phone>
        <email>cabo@tzi.org</email>
      </address>
    </author>
    <date year="2024" month="June" day="04"/>
    <area>Applications and Real-Time</area>
    <workgroup>ASDF WG</workgroup>
    <keyword>IoT</keyword>
    <keyword>Link</keyword>
    <keyword>Web Linking</keyword>
    <abstract>
      <?line 44?>

<t>This document defines and registers an sdfType "link" for the
Semantic Definition Format (SDF) for Data and Interactions of Things
(draft-ietf-asdf-sdf).</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-bormann-asdf-sdftype-link/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        A Semantic Definition Format for Data and Interactions of Things Working Group mailing list (<eref target="mailto:asdf@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/asdf/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/asdf/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/cabo/sdftype-link"/>.</t>
    </note>
  </front>
  <middle>
    <?line 50?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>The Semantic Definition Format for Data and Interactions of Things
(SDF, <xref target="I-D.ietf-asdf-sdf"/>) is a format for domain experts to use in the creation
and maintenance of data and interaction models in the Internet of
Things.</t>
      <t>A common data type that occurs in the modeling of IoT devices is the
<em>link</em>.
<xref target="RFC8288"/> defines the concept of Web Linking, which complements the
target URI that any link will contain, with additional parameters, such
as the "link relation type" that explains the relationship expressed
by the link, as well as "target attributes" that provide additional
information about the target of the link (without a need to
"dereference", i.e., follow, the link).</t>
      <t>This document defines and registers an sdfType "link" for the Semantic
Definition Format.
This type models an abstract "serialization" <xref target="RFC8288"/> of a link, in a
way that is compatible with the way SDF maps information models to its
data modeling language.</t>
      <section anchor="conventions-and-definitions">
        <name>Conventions and Definitions</name>
        <!--
{: :boilerplate bcp14-tagged}
 -->

<t>The definitions of <xref target="RFC6690"/>, <xref target="RFC8288"/>, and <xref target="I-D.ietf-asdf-sdf"/> apply.</t>
      </section>
    </section>
    <section anchor="the-sdftype-link">
      <name>The sdfType "link"</name>
      <t>The sdfType "link" is intended to be used with the SDF "type" of "object".
The members of that object are strings that are named the same as the
link parameter (attribute) names.
The special parameter name "href" is used to express the link target.
(Parameter names specific to the Constrained RESTful Environment (CoRE) are also discussed in <xref target="RFC9423"/>.)</t>
      <t>An example for the instance of a link is provided in <xref section="5" sectionFormat="of" target="RFC6690"/>:</t>
      <sourcecode type="link-format"><![CDATA[
   </sensors/temp>;rt="temperature-c";if="sensor",
]]></sourcecode>
      <t>An sdfProperty that is used to describe an SDF affordance that is intended to
hold a link like this (without getting specific on the actual link to
the link target) could look like:</t>
      <sourcecode type="sdf"><![CDATA[
{
 "sdfProperty": {
  "temp-c-link": {
   "type": "object",
   "sdfType": "link",
   "properties": {
     "href": { "type": "string"},
     "rt": { "type": "string", "const": "temperature-c"},
     "if": { "type": "string", "const": "sensor"}
   }
  }
 }
}
]]></sourcecode>
    </section>
    <section anchor="discussion">
      <name>Discussion</name>
      <t>Links play an important role in SDF modeling both during definition
time (for adding information to a model, such as in <tt>sdfRef</tt>) and
during run time (for making links to instances into a subject of data
and interaction modeling).
The present document is an early attempt at addressing the run-time
usage of links, in particular links that fit the Web Linking <xref target="RFC8288"/>
abstractions.
A related draft <xref target="I-D.laari-asdf-relations"/> addresses definition-time links, but does
seem to touch modeling run-time use of links as well (e.g., by
discussing "writable" link relations).</t>
      <t>Not all links used in ecosystems are based on URIs.
E.g., OMA has "object links", which are pairs of numbers (object/instance).
These ecosystem links may have some structure that should be modeled
in the SDF model (e.g., where the object id part of a link always has
to have a specific value).
This structure can be mapped into URI strings using some convention,
e.g., an OMA object link could be <tt>oma-object:3303:0</tt> (where
<tt>oma-object</tt> is placeholder for a URI scheme to be defined).
However, burying structural components of the ecosystem-specific link
in a string syntax makes it hard to access and control those
components from the model.</t>
      <t>TODO: Examples are needed to show how the OCF collection pattern is
addressed by the current specification.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The security considerations of <xref target="RFC8288"/> apply in a general way,
although modeling a link as a datatype does not incur all of the
security considerations that will apply to actually interchanging
these links.</t>
      <t>(TODO)</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>// RFC Ed.: please replace RFC XXXX with this RFC number and remove this note.</t>
      <t>IANA is requested to register the sdfType "link" in the "sdfType Values" sub-registry in
the "SDF Parameters" registry, with the following completion for the
registration template:</t>
      <table anchor="sdftype-r">
        <name>Registration for sdfType "link"</name>
        <thead>
          <tr>
            <th align="left">Name</th>
            <th align="left">Description</th>
            <th align="left">type</th>
            <th align="left">JSON Representation</th>
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">link</td>
            <td align="left">A Web Link <xref target="RFC8288"/></td>
            <td align="left">object</td>
            <td align="left">object members for link attributes</td>
            <td align="left">RFCXXXX</td>
          </tr>
        </tbody>
      </table>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="I-D.ietf-asdf-sdf">
          <front>
            <title>Semantic Definition Format (SDF) for Data and Interactions of Things</title>
            <author fullname="Michael Koster" initials="M." surname="Koster">
              <organization>KTC</organization>
            </author>
            <author fullname="Carsten Bormann" initials="C." surname="Bormann">
              <organization>Universität Bremen TZI</organization>
            </author>
            <author fullname="Ari Keränen" initials="A." surname="Keränen">
              <organization>Ericsson</organization>
            </author>
            <date day="28" month="February" year="2024"/>
            <abstract>
              <t>   The Semantic Definition Format (SDF) is a format for domain experts
   to use in the creation and maintenance of data and interaction models
   that describe Things, i.e., physical objects that are available for
   interaction over a network.  An SDF specification describes
   definitions of SDF Objects/SDF Things and their associated
   interactions (Events, Actions, Properties), as well as the Data types
   for the information exchanged in those interactions.  Tools convert
   this format to database formats and other serializations as needed.


   // The present revision (-18) adds security considerations, a few
   // editorial cleanups, discusses JSON pointer encodings, and adds
   // sockets to the CDDL for easier future extension.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-asdf-sdf-18"/>
        </reference>
        <reference anchor="RFC8288">
          <front>
            <title>Web Linking</title>
            <author fullname="M. Nottingham" initials="M." surname="Nottingham"/>
            <date month="October" year="2017"/>
            <abstract>
              <t>This specification defines a model for the relationships between resources on the Web ("links") and the type of those relationships ("link relation types").</t>
              <t>It also defines the serialisation of such links in HTTP headers with the Link header field.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8288"/>
          <seriesInfo name="DOI" value="10.17487/RFC8288"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="RFC6690">
          <front>
            <title>Constrained RESTful Environments (CoRE) Link Format</title>
            <author fullname="Z. Shelby" initials="Z." surname="Shelby"/>
            <date month="August" year="2012"/>
            <abstract>
              <t>This specification defines Web Linking using a link format for use by constrained web servers to describe hosted resources, their attributes, and other relationships between links. Based on the HTTP Link Header field defined in RFC 5988, the Constrained RESTful Environments (CoRE) Link Format is carried as a payload and is assigned an Internet media type. "RESTful" refers to the Representational State Transfer (REST) architecture. A well-known URI is defined as a default entry point for requesting the links hosted by a server. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6690"/>
          <seriesInfo name="DOI" value="10.17487/RFC6690"/>
        </reference>
        <reference anchor="I-D.laari-asdf-relations">
          <front>
            <title>Extended relation information for Semantic Definition Format (SDF)</title>
            <author fullname="Petri Laari" initials="P." surname="Laari">
              <organization>Ericsson</organization>
            </author>
            <date day="13" month="September" year="2023"/>
            <abstract>
              <t>   The Semantic Definition Format (SDF) base specification defines set
   of basic information elements that can be used for describing a large
   share of the existing data models from different ecosystems.  While
   these data models are typically very simple, such as basic sensors
   definitions, more complex models, and in particular bigger systems,
   benefit from ability to describe additional information on how
   different definitions relate to each other.  This document specifies
   an extension to SDF for describing complex relationships in class
   level descriptions.  This specification does not consider instance-
   specific information.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-laari-asdf-relations-02"/>
        </reference>
        <reference anchor="RFC9423">
          <front>
            <title>Constrained RESTful Environments (CoRE) Target Attributes Registry</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <date month="April" year="2024"/>
            <abstract>
              <t>The Constrained RESTful Environments (CoRE) specifications apply web technologies to constrained environments. One such important technology is Web Linking (RFC 8288), which CoRE specifications use as the basis for a number of discovery protocols, such as the Link Format (RFC 6690) in the Constrained Application Protocol's (CoAP's) resource discovery process (Section 7.2 of RFC 7252) and the Resource Directory (RD) (RFC 9176).</t>
              <t>Web Links can have target attributes, the names of which are not generally coordinated by the Web Linking specification (Section 2.2 of RFC 8288). This document introduces an IANA registry for coordinating names of target attributes when used in CoRE. It updates the "RD Parameters" IANA registry created by RFC 9176 to coordinate with this registry.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9423"/>
          <seriesInfo name="DOI" value="10.17487/RFC9423"/>
        </reference>
      </references>
    </references>
    <?line 167?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>Discussions in the OneDM liaison organization shaped this proposal.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA6VY7XIbtxX9j6dA13+klEvZkuKxmDgTRR+pOo3lkZSm08kP
g7sgiWp3sQGwYhiLfpq+SV+s515gdynbzXQmnJFILoD7ee69B8zzXAQTKj2T
p4305eJu02q5sE7+zTT3Xqj53OmH2WdWChX00roN1kIpfHBa1TN5dXF3KQrb
eN34zs9kcJ0WorRFo2roKJ1ahHxuXa2aJleQmuMvQHJeQWpeQagPounquXYz
UeLrTED9kVCQP5PZadtWBqoNVEjVlPJGqyq/M7XOxNq6+6WzXQtfbs8v5U/f
i3u9wdNyJmQur+wdvZH19P6TnvNn0yzFg246KJIyHc9O5a2GicEU8lwvTGNI
obwkuwPH4FwFxfqvmqCdKqJBdiHvVhDoM8iqlakgipz81uiwmFq3pOdLE1bd
HCuFmtuDXfczIYTqwsrC9Rw7Y8zOlPNBN/K7GDU8h6CZ/LExD9p5E/7z7yC/
c7rGlrt/XmGZcqHDTL61PixUsZJHR8+Pj59jpTAB+Yqb6astIf88P3x19OUJ
f++aQBn9XpOqDR61K9tgz5+PT/Ljwxf54YtX+cujk8MXWNLRQfLi2/CbIfeE
aDhEsIyieZWfT8nzIdGMIyzcXJ69Onz1aibJayFMs9g9htWXL0+ex9U8LiVp
lVLORHFOVxEGLBTf4smT48OjmVQhOCHyPJdqjnAgP0IgM14CiR2cD7KktOqI
IaeXBiF29G1AesYZ4WSHlRa/g4c9gG3//0GF2Iv4fxKT/Wk0tDZlWaFWntFh
Z8uOT5PZ+g+CUZCBE/n+Panbbvcl4qDkYjxfWqSykfrXVrvgZbCy81riCRyX
BQqPLSEFtA9YVE2hSX7ZKzajYlkDVZXvj7NJjQ7YLqI58PcUUKtr7GUBhH/s
hTG2KDo3HGVBOEGaULxI2YMpkDK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