<?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.4 (Ruby 3.2.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-bormann-asdf-sdftype-link-02" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.18.1 -->
  <front>
    <title abbrev="sdfType for Links">An sdfType for Links</title>
    <seriesInfo name="Internet-Draft" value="draft-bormann-asdf-sdftype-link-02"/>
    <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="2023" month="December" day="03"/>
    <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="I-D.ietf-core-target-attr"/>.)</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="5" month="November" year="2023"/>
            <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 (-17) addresses additional Working Group Last
   // Call comments that came in during a grace period added.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-asdf-sdf-17"/>
        </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="I-D.ietf-core-target-attr">
          <front>
            <title>CoRE Target Attributes Registry</title>
            <author fullname="Carsten Bormann" initials="C." surname="Bormann">
              <organization>Universität Bremen TZI</organization>
            </author>
            <date day="11" month="October" year="2023"/>
            <abstract>
              <t>   The Constrained RESTful Environments (CoRE) specifications apply Web
   technologies to constrained environments.  One important such
   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 CoAP's Resource Discovery Protocol (Section 7.2
   of RFC7252) and the Resource Directory (RD, RFC 9176).

   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="Internet-Draft" value="draft-ietf-core-target-attr-06"/>
        </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+klEvZluOxN3Emij5SdRrLIytNp5Mf
BndBEtXuYgNgxTAW/TR9k75Yz73A7lK2m+lMOCORXAD389x7D5jnuQgm1LqQ
J6301fJm22m5tE7+zbS3XqjFwum74jMrpQp6Zd0Wa6ESPjitmkJent9ciNK2
Xre+94UMrtdCVLZsVQMdlVPLkC+sa1Tb5gpSc/wFSM5rSM1rCPVBtH2z0K4Q
Fb4WAuqPhYL8QmYnXVcbqDZQIVVbyWut6vzGNDoTG+tuV872HXx5e3Yhf/pe
3OotnlaFkLm8tDf0RtbT+096wZ9NuxJ3uu2hSMp0PDuRbzVMDKaUZ3ppWkMK
5QXZHTgGZyoo1n/ZBu1UGQ2yS3mzhkCfQVajTA1R5OS3Rofl3LoVPV+ZsO4X
WCnVwh7tu58JIVQf1hau59gZY3aqnA+6ld/FqOE5BBXyx9bcaedN+M+/g/zO
6QZbbv55iWXKhQ6FfGN9WKpyLY+PHz979hgrpQnIV9xMX20F+Wf50xfHX77k
730bKKPfa1K1xaNubVvs+fOzl/mzp0/yp09e5M+PXz59giUdHSQvvg2/GXJP
iJZDBMsompf52Zw8HxPNOMLC9cXpi6cvXhSSvBbCtMv9Y1h9/vzl47iax6Uk
rVbKmSjO6TrCgIXi277C0jqdB+VWOuQqBFdI+i9EnudSLRAgZEwI5MpLYLNH
OIKsKNE6osrplUHQHX0bsZ9xjjj9Ya3F7yDkAPA7/H9wIg5iRTyI0uE8GtqY
qqpRPY/osLNVz6fJbP0H4SnIwJl8/57U7XaHEnFQcjmdryyS20r9a6dd8DJY
2Xst8QSOyxKlyJaQAtoHdKq21CS/GhSbSbFsgLPaD8fZpFYHbBfRHPh7AvA1
DfayAKoI7IUxt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