rfc9264.original.xml   rfc9264.xml 
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?> <!DOCTYPE rfc [
<?rfc toc="yes" ?> <!ENTITY nbsp "&#160;">
<?rfc sortrefs="yes" ?> <!ENTITY zwsp "&#8203;">
<?rfc symrefs="yes" ?> <!ENTITY nbhy "&#8209;">
<rfc category="std" ipr="trust200902" docName="draft-ietf-httpapi-linkset-10" ve <!ENTITY wj "&#8288;">
rsion="3" xmlns:xi="http://www.w3.org/2001/XInclude"> ]>
<rfc ipr="trust200902" docName="draft-ietf-httpapi-linkset-10" number="9264" sub
missionType="IETF" category="std" consensus="true" tocInclude="true" symRefs="tr
ue" sortRefs="true" updates="" obsoletes="" xml:lang="en" version="3" xmlns:xi="
http://www.w3.org/2001/XInclude">
<front> <front>
<title abbrev="Linkset">Linkset: Media Types and a Link Relation Type fo r Link Sets</title> <title abbrev="Linkset">Linkset: Media Types and a Link Relation Type fo r Link Sets</title>
<seriesInfo name="RFC" value="9264"/>
<author initials="E." surname="Wilde" fullname="Erik Wilde"> <author initials="E." surname="Wilde" fullname="Erik Wilde">
<organization>Axway</organization> <organization>Axway</organization>
<address> <address>
<email>erik.wilde@dret.net</email> <email>erik.wilde@dret.net</email>
<uri>http://dret.net/netdret/</uri>
</address> </address>
</author> </author>
<author initials="H." surname="Van de Sompel" fullname="Herbert Van de S ompel"> <author initials="H." surname="Van de Sompel" fullname="Herbert Van de S ompel">
<organization>Data Archiving and Networked Services</organization> <organization>Data Archiving and Networked Services</organization>
<address> <address>
<email>herbert.van.de.sompel@dans.knaw.nl</email> <email>herbert.van.de.sompel@dans.knaw.nl</email>
<uri>https://orcid.org/0000-0002-0715-6126</uri> <uri>https://orcid.org/0000-0002-0715-6126</uri>
</address> </address>
</author> </author>
<date day="5" month="May" year="2022"/>
<date month="July" year="2022"/>
<area>art</area>
<workgroup>httpapi</workgroup>
<keyword>Web linking</keyword>
<keyword>Typed links</keyword>
<keyword>JSON</keyword>
<keyword>HTTP</keyword>
<abstract> <abstract>
<t>This specification defines two formats and respective media types for representing sets of links as stand-alone documents. One format is JSON-base d, the other aligned with the format for representing links in the HTTP "Link" h eader field. This specification also introduces a link relation type to support discovery of sets of links.</t> <t>This specification defines two formats and associated media types for representing sets of links as standalone documents. One format is based on J SON, and the other is aligned with the format for representing links in the HTTP "Link" header field. This specification also introduces a link relation type to support the discovery of sets of links.</t>
</abstract> </abstract>
<note title="Note to Readers">
<t>Please discuss this draft on the "Building Blocks for HTTP APIs"
mailing list (<eref target="https://www.ietf.org/mailman/listinfo/httpapi"/>).</
t>
<t>Online access to all versions and files is available on GitHub (<
eref target="https://github.com/ietf-wg-httpapi/linkset"/>).</t>
</note>
</front> </front>
<middle> <middle>
<section title="Introduction" anchor="introduction"> <section anchor="introduction" numbered="true" toc="default">
<t>Resources on the Web often use typed Web Links <xref target="RFC8 <name>Introduction</name>
288"/>, either embedded in resource representations, for example using the &lt;l <t>Resources on the Web often use typed Web Links <xref target="RFC8
ink&gt; element for HTML documents, or conveyed in the HTTP "Link" header field 288"/>, either (1)&nbsp;embedded in resource representations -- for example, usi
for documents of any media type. In some cases, however, providing links in this ng the &lt;link&gt; element for HTML documents or (2)&nbsp;conveyed in the HTTP
manner is impractical or impossible and delivering a set of links as a stand-al "Link" header field for documents of any media type. In some cases, however, pro
one document is preferable.</t> viding links in this manner is impractical or impossible, and delivering a set o
<t>Therefore, this specification defines two formats for representin f links as a standalone document is preferable.</t>
g sets of Web Links and their attributes as stand-alone documents. One serialize <t>Therefore, this specification defines two formats for representin
s links in the same format as used in the HTTP Link header field, and the other g sets of Web Links and their attributes as standalone documents. One serializes
serializes links in JSON. It also defines associated media types to represent se links in the same format as the format used in the HTTP "Link" header field, an
ts of links, and the "linkset" relation type that supports discovery of any reso d the other serializes links in JSON. It also defines associated media types to
urce that conveys a set of links as a stand-alone document.</t> represent sets of links, and the "linkset" relation type to support the discover
y of any resource that conveys a set of links as a standalone document.</t>
</section> </section>
<section title="Terminology" anchor="terminology"> <section anchor="terminology" numbered="true" toc="default">
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT <name>Terminology</name>
", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONA <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
L" in this document are to be interpreted as described in BCP 14 <xref target="R "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>",
FC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capit "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>",
als, as shown here.</t> "<bcp14>SHOULD NOT</bcp14>",
<t>This specification uses the terms "link context" and "link target "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
" in the same manner as <xref target="RFC8288"/>.</t> "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document
are to be interpreted as described in BCP&nbsp;14
<xref target="RFC2119"/> <xref target="RFC8174"/> when, and only
when, they appear in all capitals, as shown here.</t>
<t>This specification uses the terms "link context" and "link target
" in the same manner that
<xref target="RFC8288">"Web Linking"</xref> uses them.</t>
<t>In the examples provided in this document, links in the HTTP "Lin k" header field are shown on separate lines in order to improve readability. <t>In the examples provided in this document, links in the HTTP "Lin k" header field are shown on separate lines in order to improve readability.
Note, however, that as per <xref target="I-D.ietf-httpbis-semant Note, however, that as per
ics" section="5.5"/>, line breaks are deprecated in values for HTTP fields; only <xref target="RFC9110" section="5.5">"HTTP Semantics"</xref>, line breaks are de
whitespaces and precated in values for HTTP fields; only whitespaces and
tabs are supported as separators.</t> tabs are supported as separators.</t>
<!--
<t>Additionally, this specification uses the following terms for typ
es of resources involved
in providing links by reference:</t>
<t><list style="symbols">
<t>A "linkset resource" is a resource that conveys a set of link
s. <xref target="linkset-formats"/>
defines two representations for a set of links, based on the
abstract link model defined in
<xref target="RFC8288"/>.</t>
<t>An "origin resource" is a resource that participates in one o
r more links provided
by a linkset resource. An origin resource can support discove
ry of an associated
linkset resource by using the relation type defined in <xref
target="linkset-link-relation"/>.
As such, from the perspective of the origin resource, the lin
ks conveyed by the linkset resource
are provided by reference.</t>
</list></t>
-->
</section> </section>
<section title="Use Cases and Motivation" anchor="use-cases"> <section anchor="use-cases" numbered="true" toc="default">
<name>Use Cases and Motivation</name>
<t>The following sections describe use cases in which providing link s by means of a standalone document instead of in an HTTP "Link" header field or as links embedded in the resource representation is advantageous or necessary.< /t> <t>The following sections describe use cases in which providing link s by means of a standalone document instead of in an HTTP "Link" header field or as links embedded in the resource representation is advantageous or necessary.< /t>
<t>For all scenarios, links could be provided by means of a stand-al <t>For all scenarios, links could be provided by means of a standalo
one document that is formatted according to the JSON-based serialization, the se ne document that is formatted according to the JSON-based serialization, the ser
rialization aligned with the HTTP "Link" field format, or both. The former seria ialization aligned with the HTTP "Link" field format, or both. The former serial
lization is motivated by the widespread use of JSON and related tools, which sug ization is motivated by the widespread use of JSON and related tools, which sugg
gests that handling sets of links expressed as JSON documents should be attracti ests that handling sets of links expressed as JSON documents should be attractiv
ve to developers. The latter serialization is provided for compatibility with th e to developers. The latter serialization is provided for compatibility with the
e existing serialization used in the HTTP "Link" field and to allow reuse of too existing serialization used in the HTTP "Link" field and to allow the reuse of
ls created to handle it.</t> tools created to handle it.</t>
<t>It is important to keep in mind that when providing links by mean <t>It is important to keep in mind that when providing links by mean
s of a standalone representation, other links can still be provided using other s of a standalone representation, other links can still be provided using other
approaches, i.e. it is possible to combine various mechanisms to convey links.</ approaches, i.e., it is possible to combine various mechanisms to convey links.<
t> /t>
<section title="Third-Party Links" anchor="third-party"> <section anchor="third-party" numbered="true" toc="default">
<t>In some cases it is useful that links pertaining to a resourc <name>Third-Party Links</name>
e are provided <t>In some cases, it is useful that links pertaining to a resour
ce are provided
by a server other than the one that hosts the resource. For example, this allows:</t> by a server other than the one that hosts the resource. For example, this allows:</t>
<ul> <ul>
<li>Providing links in which the resource is involved not ju <li>Providing links in which the resource is involved not ju
st as link context but st as a link context but
also as link target, with a different resource being the also as a link target, with a different resource being t
link context.</li> he link context.</li>
<li>Providing links pertaining to the resource that the serv er hosting that <li>Providing links pertaining to the resource that the serv er hosting that
resource is not aware of.</li> resource is not aware of.</li>
<li>External management of links pertaining to the resource in a special-purpose link <li>External management of links pertaining to the resource in a special-purpose link
management service.</li> management service.</li>
</ul> </ul>
<t>In such cases, links pertaining to a resource can be provided by another, specific resource. <t>In such cases, links pertaining to a resource can be provided by another, specific resource.
That specific resource may be managed by the same or by anot her custodian as the resource to which the links pertain. That specific resource may be managed, by the same custodian or by another custodian, as the resource to which the links pertain.
For clients intent on consuming links provided in that manne r, it would be beneficial if the following conditions were met:</t> For clients intent on consuming links provided in that manne r, it would be beneficial if the following conditions were met:</t>
<ul> <ul>
<li>Links are provided in a document that uses a well-define d media type.</li> <li>Links are provided in a document that uses a well-define d media type.</li>
<li>The resource to which the provided links pertain is able to link to the resource that provides these links using a well-known <li>The resource to which the provided links pertain is able to link to the resource that provides these links using a well-known
link relation type.</li> link relation type.</li>
</ul> </ul>
<t>These requirements are addressed in this specification throug h the definition of two media types and a link relation type, respectively.</t> <t>These requirements are addressed in this specification throug h the definition of two media types and a link relation type, respectively.</t>
<!--
<t>In order for the server hosting the resource to provide an up
-to-date and complete set of links
in which that resource participates,
the server would need to obtain the links from the third-par
ty resource,
and embed them in the resource's
representations prior to responding to a client. Doing so wo
uld increase latency and load,
which may be unnecessary if a client is not intent on consum
ing these links. Providing links by means of a standalone document,
removes the server-to-server communication and resulting ove
rhead required to obtain
links. Instead, the consumer of the resource can decide if t
hey need the additional links as context
for the resource and only access the third-party resource th
at provides the links if they do.</t>
-->
</section> </section>
<section title="Challenges Writing to HTTP Link Header Field" anchor <section anchor="header-writing" numbered="true" toc="default">
="header-writing"> <name>Challenges Writing to the HTTP "Link" Header Field</name>
<t>In some cases, it is not straightforward to write links to th e HTTP "Link" header field <t>In some cases, it is not straightforward to write links to th e HTTP "Link" header field
from an application. This can, for example, be the case beca use not all from an application. This can, for example, be the case beca use not all
required link information is available to the application or because the required link information is available to the application or because the
application does not have the capability to directly write H TTP fields. application does not have the capability to directly write H TTP fields.
In such cases, providing links by means of a standalone docu ment can be a solution. In such cases, providing links by means of a standalone docu ment can be a solution.
Making the resource that provides these links discoverable c an be achieved by means of a Making the resource that provides these links discoverable c an be achieved by means of a
typed link.</t> typed link.</t>
</section> </section>
<section title="Large Number of Links" anchor="link-volume"> <section anchor="link-volume" numbered="true" toc="default">
<name>Large Number of Links</name>
<t>When conveying links in an HTTP "Link" header field, it is po ssible for the size of the HTTP <t>When conveying links in an HTTP "Link" header field, it is po ssible for the size of the HTTP
response fields to become unpredictable. This can be the cas e when links are determined response fields to become unpredictable. This can be the cas e when links are determined
dynamically in a manner dependent on a range of contextual f actors. It is possible to statically configure dynamically in a manner dependent on a range of contextual f actors. It is possible to statically configure
a web server to correctly handle large HTTP response fields by specifying an upper bound a web server to correctly handle large HTTP response fields by specifying an upper bound
for their size. But when the number of links is for their size. But when the number of links is
unpredictable, estimating a reliable upper bound is challeng ing.</t> unpredictable, estimating a reliable upper bound is challeng ing.</t>
<t><xref target="I-D.ietf-httpbis-semantics" section="15">HTTP</ <t><xref target="RFC9110" section="15">"HTTP Semantics"</xref> d
xref> defines error codes related to excess communication efines error codes related to excess communication
by the user agent ("413 Request Entity Too Large" and "414 R by the user agent ("413 Content Too Large" and "414 URI Too
equest-URI Too Long"), but no specific Long"), but no specific
error codes are defined to indicate that response field cont ent exceeds the upper bound that can error codes are defined to indicate that response field cont ent exceeds the upper bound that can
be handled by the server and thus has been truncated. be handled by the server and thus has been truncated.
As a result, applications take counter measures aimed at con As a result, applications take countermeasures aimed at cont
trolling rolling
the size of the HTTP "Link" header field, for example by lim the size of the HTTP "Link" header field -- for example, by
iting the links they provide to those limiting the links they provide to those
with select relation types, thereby limiting the value of th e HTTP "Link" header field to clients. with select relation types, thereby limiting the value of th e HTTP "Link" header field to clients.
Providing links by means of a standalone document overcomes challenges related to the unpredictable Providing links by means of a standalone document overcomes challenges related to the unpredictable
(to the web server implementation) nature of the size of HTT P "Link" header fields.</t> (to the web server implementation) nature of the size of HTT P "Link" header fields.</t>
<!--
<t>In more extreme scenarios it is conceivable that the number o
f links to be conveyed becomes so
large that even a standalone document would become too large
.
For example, this could be the case for highly interlinked r
esources and when links are provided in which such
resources participates as both link context and link target.
In such cases, the links could be delivered incrementally, f
or example, by means of a paged resource model.</t>
-->
</section> </section>
</section> </section>
<section title="Document Formats for Sets of Links" anchor="linkset-form <section anchor="linkset-formats" numbered="true" toc="default">
ats"> <name>Document Formats for Sets of Links</name>
<t>This section specifies two document formats to convey a set of li <t>This section specifies two document formats to convey a set of li
nks. Both are based on the abstract model nks. Both are based on the abstract model specified in
specified in <xref target="RFC8288" section="2">Web Linking</xre <xref target="RFC8288" section="2">"Web Linking"</xref>,
f> which defines a link as consisting of a "link context", a "link
that defines a link as consisting of a "link context", a "link r relation type", a "link target",
elation type", a "link target",
and optional "target attributes":</t> and optional "target attributes":</t>
<ul> <ul>
<li>The format defined in <xref target="linkset-native"/> is nea rly identical to the field value <li>The format defined in <xref target="linkset-native"/> is nea rly identical to the field value
of the HTTP "Link" header field as specified in <xref target ="RFC8288" section="3"/>.</li> of the HTTP "Link" header field as specified in <xref target ="RFC8288" section="3"/>.</li>
<li>The format defined in <xref target="linkset-json"/> is expre ssed in <xref target="RFC8259">JSON</xref>.</li> <li>The format defined in <xref target="linkset-json"/> is expre ssed in <xref target="RFC8259">JSON</xref>.</li>
</ul> </ul>
<t>Links provided in the HTTP Link header are intended to be used in the context of an HTTP interaction and contextual information <t>Links provided in the HTTP "Link" header field are intended to be used in the context of an HTTP interaction, and contextual information
that is available during an interaction is used to correctly i nterpret them. that is available during an interaction is used to correctly i nterpret them.
Links provided in link sets, however, can be re-used outside o f an HTTP interaction, when no such contextual information is available. Links provided in link sets, however, can be reused outside of an HTTP interaction, when no such contextual information is available.
As a result, implementers of link sets should strive to make t hem self-contained by adhering to the following recommendations.</t> As a result, implementers of link sets should strive to make t hem self-contained by adhering to the following recommendations.</t>
<t>For links provided in the HTTP Link header that have no ancho r or that use relative references, <t>For links provided in the HTTP "Link" header field that have no anchor or that use relative references,
the URI of the resource that delivers the links provides the contextual information that is needed for their the URI of the resource that delivers the links provides the contextual information that is needed for their
correct interpretation. In order to support use cases whe correct interpretation. In order to support use cases whe
re link set documents are re-used outside the context re link set documents are reused outside the context
of an HTTP interaction, it is RECOMMENDED to make them se of an HTTP interaction, it is <bcp14>RECOMMENDED</bcp14>
lf-contained by adhering to the following guidelines:</t> to make them self-contained by adhering to the following guidelines:</t>
<ul> <ul>
<li>For every link provided in the set of links, explicitly provide the link context <li>For every link provided in the set of links, explicitly provide the link context
using the "anchor" attribute.</li> using the "anchor" attribute.</li>
<li>For link context ("anchor" attribute) and link target (" href" attribute), use URI references that are not relative references (as define d in <xref target="RFC3986" section="4.1"/>). <li>For the link context ("anchor" attribute) and link targe t ("href" attribute), use URI references that are not relative references (as de fined in <xref target="RFC3986" section="4.1"/>).
</li> </li>
</ul> </ul>
<t>If these recommendations are not followed, interpretation of links in link set documents will depend on which URI is used as context.</t> <t>If these recommendations are not followed, the interpretation of links in link set documents will depend on which URI is used as the context. </t>
<t>For a "title" attribute provided on a link in the HTTP Link header, the langu <t>For a "title" attribute provided on a link in the HTTP "Link" header field, t
age in which the title is expressed is provided by he language in which the title is expressed is provided by
the Content-Language header of the HTTP interaction with the resource tha the "Content-Language" header field of the HTTP interaction with the reso
t delivers the links. urce that delivers the links.
This does not apply to "title" attributes provided for links in link set documents because that would constrain This does not apply to "title" attributes provided for links in link set documents because that would constrain
all links in a link set to having a single title language and would not s upport determining title languages when all links in a link set to having a single title language and would not s upport determining title languages when
a link set is used outside of an HTTP interaction. In order to support us e cases where link set documents are a link set is used outside of an HTTP interaction. In order to support us e cases where link set documents are
re-used outside the context of an HTTP interaction, it is RECOMMENDED to make them self-contained by using the reused outside the context of an HTTP interaction, it is <bcp14>RECOMMEND ED</bcp14> to make them self-contained by using the
"title*" attribute instead of the "title" attribute because "title*" allo ws expressing the title language as part of its value by means of a language tag . "title*" attribute instead of the "title" attribute because "title*" allo ws expressing the title language as part of its value by means of a language tag .
With this regard, note that language tags are matched case-insensitively (see <xref target="RFC5646" section="2.1.1"/>). Note that, in this regard, language tags are matched case insensitively ( see <xref target="RFC5646" section="2.1.1"/>).
If this recommendation is not followed, accurately determining the langua ge of titles provided on links in link set documents will not be possible.</t> If this recommendation is not followed, accurately determining the langua ge of titles provided on links in link set documents will not be possible.</t>
<t>Note also that <xref target="RFC8288" section="3.3"/> deprecates the "rev" co nstruct that was provided by <xref target="RFC5988"/> as a means to express link s with a directionality that is the inverse of direct links that use the "rel" c onstruct. In both serializations for link sets defined here, inverse links may b e represented as direct links using the "rel" construct and by switching the rol es of the resources involved in the link.</t> <t>Note also that <xref target="RFC8288" section="3.3"/> deprecates the "rev" co nstruct that was provided by <xref target="RFC5988"/> as a means to express link s with a directionality that is the inverse of direct links that use the "rel" c onstruct. In both serializations for link sets defined here, inverse links may b e represented as direct links using the "rel" construct and by switching the rol es of the resources involved in the link.</t>
<section title="HTTP Link Document Format: application/linkset" anch <section anchor="linkset-native" numbered="true" toc="default">
or="linkset-native"> <name>HTTP Link Document Format: application/linkset</name>
<t>This document format is nearly identical to the field value o f the <t>This document format is nearly identical to the field value o f the
HTTP "Link" header field as defined in HTTP "Link" header field as defined in
<xref target="RFC8288" section="3"/>, more specifically by <xref target="RFC8288" section="3"/>, more specifically by
its ABNF <xref target="RFC5234"/> production rule for "Link" its ABNF <xref target="RFC5234"/> production rule for "Link"
and subsequent ones. It differs from the format for field values of the and its subsequent rules. It differs from the format for field values of the
HTTP "Link" header only in that not only spaces and horizont HTTP "Link" header field only in that not only spaces and ho
al tabs are allowed as separators but also newline rizontal tabs are allowed as separators but also newline
characters as a means to improve readability for humans. characters as a means to improve readability for humans.
The use of non-ASCII characters in the field value of the HT TP "Link" Header field is not allowed, The use of non-ASCII characters in the field value of the HT TP "Link" header field is not allowed
and as such is also not allowed in "application/linkset" link sets.</t> and as such is also not allowed in "application/linkset" link sets.</t>
<t>The assigned media type for this format is "application/links et".</t> <t>The assigned media type for this format is "application/links et".</t>
<t>When converting an "application/linkset" document to a field value for the <t>When converting an "application/linkset" document to a field value for the
HTTP "Link" header, newline characters MUST be removed or MU HTTP "Link" header field, newline characters <bcp14>MUST</bc
ST be replaced by white space (SP) in order to comply with p14> be removed or <bcp14>MUST</bcp14> be replaced by whitespace (SP) in order t
<xref target="I-D.ietf-httpbis-semantics" section="5.5"/>.</ o comply with
t> <xref target="RFC9110" section="5.5"/>.</t>
<t>Implementers of "application/linkset" link sets should strive to make them self-contained <t>Implementers of "application/linkset" link sets should strive to make them self-contained
by following the recommendations regarding their use outside t by following the recommendations provided in <xref target="lin
he context of an HTTP interaction provided in kset-formats"/> regarding their use outside the context of an HTTP interaction.<
<xref target="linkset-formats"/>.</t> /t>
<t>It should be noted that the "application/linkset" format spe cified here is different from the "application/link-format" <t>It should be noted that the "application/linkset" format spe cified here is different from the "application/link-format"
format specified in <xref target="RFC6690"/> in that the for mer fully matches the format specified in <xref target="RFC6690"/> in that the for mer fully matches the
field value of the HTTP "Link" header field as defined in <x ref target="RFC8288" section="3"/>, whereas field value of the HTTP "Link" header field as defined in <x ref target="RFC8288" section="3"/>, whereas
the latter introduces constraints on that definition to meet requirements for Constrained RESTful Environments (CoRE).</t> the latter introduces constraints on that definition to meet requirements for Constrained RESTful Environments (CoRE).</t>
</section> </section>
<section title="JSON Document Format: application/linkset+json" anch <section anchor="linkset-json" numbered="true" toc="default">
or="linkset-json"> <name>JSON Document Format: application/linkset+json</name>
<t>This document format uses JSON <xref target="RFC8259"/> as th e syntax to represent <t>This document format uses JSON <xref target="RFC8259"/> as th e syntax to represent
a set of links. The set of links follows the abstract model defined by Web Linking <xref target="RFC8288" section="2"/>.</t> a set of links. The set of links follows the abstract model defined by <xref target="RFC8288" section="2"/>.</t>
<t>The assigned media type for this format is "application/links et+json".</t> <t>The assigned media type for this format is "application/links et+json".</t>
<t>In the interests of interoperability "application/linkset+json " link sets MUST be encoded using UTF-8 as per <t>In the interests of interoperability, "application/linkset+jso n" link sets <bcp14>MUST</bcp14> be encoded using UTF-8 as per
<xref target="RFC8259" section="8.1"/>.</t> <xref target="RFC8259" section="8.1"/>.</t>
<t>Implementers of "application/linkset+json" link sets should st rive to make them self-contained <t>Implementers of "application/linkset+json" link sets should st rive to make them self-contained
by following the recommendations regarding their use outs by following the recommendations provided in <xref target
ide the context of an HTTP interaction ="linkset-formats"/> regarding their use outside the context of an HTTP interact
provided in <xref target="linkset-formats"/>.</t> ion.</t>
<t>The "application/linkset+json" serialization allows for OPTIO NAL support of a JSON-LD serialization. <t>The "application/linkset+json" serialization allows for <bcp1 4>OPTIONAL</bcp14> support of a JSON-LD serialization.
This can be achieved by adding an appropriate context to the "app lication/linkset+json" serialization using the approach described in This can be achieved by adding an appropriate context to the "app lication/linkset+json" serialization using the approach described in
Section 6.8. of <xref target="W3C.REC-json-ld-20140116"/>. <xref target="W3C.REC-json-ld" section="6.1" relative="#inte rpreting-json-as-json-ld"/>.
Communities of practice can decide which context best meets their application needs. Communities of practice can decide which context best meets their application needs.
<xref target="appendix-1"/> shows an example of a possible contex t that, when added to a JSON serialization, <xref target="appendix-1"/> shows an example of a possible contex t that, when added to a JSON serialization,
allows it to be interpreted as Resource Description Framework (RD F) <xref target="W3C.REC-rdf11-concepts-20140225"/> data.</t> allows it to be interpreted as Resource Description Framework (RD F) data <xref target="W3C.REC-rdf11-concepts"/>.</t>
<section title="Set of Links" anchor="linkset-in-json"> <section anchor="linkset-in-json" numbered="true" toc="default">
<name>Set of Links</name>
<t>In the JSON representation of a set of links:</t> <t>In the JSON representation of a set of links:</t>
<ul> <ul>
<li>A set of links is represented in JSON as an object w <li>A set of links is represented in JSON as an object t
hich MUST contain "linkset" as its sole member.</li> hat <bcp14>MUST</bcp14> contain "linkset" as its sole member.</li>
<li>The value of the "linkset" member is an array in whi <li>The value of the "linkset" member is an array in whi
ch a distinct JSON object - ch a distinct JSON object --
the "link context object" (see <xref target="linkset the "link context object" (see <xref target="linkset
-json-link-context-object"/>) - -json-link-context-object"/>) --
is used to represent links that have the same link c ontext.</li> is used to represent links that have the same link c ontext.</li>
json-link-context-object"/&gt;) <span class="insert">--</span> <li>Even if there is only one link context object, it <b
<li>Even if there is only one link context object, it MU cp14>MUST</bcp14> be wrapped in an array.</li>
ST be wrapped in an array.</li>
</ul> </ul>
</section> </section>
<section title="Link Context Object" anchor="linkset-json-link-c <section anchor="linkset-json-link-context-object" numbered="tru
ontext-object"> e" toc="default">
<t>In the JSON representation one or more links that have th <name>Link Context Object</name>
e same link context <t>In the JSON representation, one or more links that have t
are represented by a JSON object, the link context objec he same link context
t. A link context object are represented by a JSON object -- the link context obj
ect. A link context object
adheres to the following rules:</t> adheres to the following rules:</t>
<ul> <ul>
<li>Each link context object MAY contain an "anchor" mem <li>Each link context object <bcp14>MAY</bcp14> contain
ber with a value that represents an "anchor" member with a value that represents
the link context. If present, this value MUST be a U the link context. If present, this value <bcp14>MUST
RI reference </bcp14> be a URI reference
and SHOULD NOT be a relative reference as defined in and <bcp14>SHOULD NOT</bcp14> be a relative referenc
<xref target="RFC3986" section="4.1"/>.</li> e as defined in <xref target="RFC3986" section="4.1"/>.</li>
<li><t> <li><t>
For each distinct relation type that the link contex t has with link targets, For each distinct relation type that the link contex t has with link targets,
a link context object MUST contain an additional mem ber. a link context object <bcp14>MUST</bcp14> contain an additional member.
The value of this member is an array in which a dist inct JSON object The value of this member is an array in which a dist inct JSON object
- the "link target object" (see <xref target="linkse -- the "link target object" (see <xref target="links
t-json-link-target-object"/>) - et-json-link-target-object"/>) --
MUST be used for each link target for which the rela <bcp14>MUST</bcp14> be used for each link target for
tionship with which the relationship with
the link context (value of the encompassing anchor m the link context (value of the encompassing "anchor"
ember) applies. The name member) applies. The name
of this member expresses the relation type of the li nk as follows:</t> of this member expresses the relation type of the li nk as follows:</t>
<ul> <ul>
<li>For registered relation types (<xref target= "RFC8288" section="2.1.1"/>), <li>For registered relation types (<xref target= "RFC8288" section="2.1.1"/>),
the name of this member is the registered na me of the relation type.</li> the name of this member is the registered na me of the relation type.</li>
<li>For extension relation types (<xref target=" RFC8288" section="2.1.2"/>), <li>For extension relation types (<xref target=" RFC8288" section="2.1.2"/>),
the name of this member is the URI that uniq uely represents the relation type.</li> the name of this member is the URI that uniq uely represents the relation type.</li>
</ul></li> </ul></li>
<li>Even if there is only one link target object it MUST be wrapped in an array.</li> <li>Even if there is only one link target object, it <bc p14>MUST</bcp14> be wrapped in an array.</li>
</ul> </ul>
</section> </section>
<section title="Link Target Object" anchor="linkset-json-link-ta <section anchor="linkset-json-link-target-object" numbered="true
rget-object"> " toc="default">
<t>In the JSON representation a link target is represented b <name>Link Target Object</name>
y a JSON object, the link target object.
<t>In the JSON representation, a link target is represented
by a JSON object -- the link target object.
A link target object adheres to the following rules:</t> A link target object adheres to the following rules:</t>
<ul> <ul>
<li>Each link target object MUST contain an "href" membe <li>Each link target object <bcp14>MUST</bcp14> contain
r with a value that represents an "href" member with a value that represents
the link target. This value MUST be a URI reference the link target. This value <bcp14>MUST</bcp14> be a
and SHOULD NOT be a relative reference URI reference and <bcp14>SHOULD NOT</bcp14> be a relative reference
as defined in <xref target="RFC3986" section="4.1"/> as defined in <xref target="RFC3986" section="4.1"/>
. Cases where the href member is present, but no value is provided . Cases where the "href" member is present but no value is provided
for it (i.e. the resource providing the set of links for it (i.e., the resource providing the set of link
is the target of the link s is the target of the link
in the link target object) MUST be handled by provid in the link target object) <bcp14>MUST</bcp14> be ha
ing an "href" member with an empty string as its value ("href": "").</li> ndled by providing an "href" member with an empty string as its value ("href": "
").</li>
<li>In many cases, a link target is further qualified by target attributes. <li>In many cases, a link target is further qualified by target attributes.
Various types of attributes exist and they are conve yed as additional members of the link target object Various types of attributes exist, and they are conv eyed as additional members of the link target object
as detailed in <xref target="json-target-attributes" />.</li> as detailed in <xref target="json-target-attributes" />.</li>
</ul> </ul>
<t>The following example of a JSON-serialized set of links r epresents one <t>The following example of a JSON-serialized set of links r epresents one
link with its core components: link context, link relati on link with its core components: link context, link relati on
type, and link target.</t> type, and link target.</t>
<figure> <figure>
<name>Simple linkset example</name>
<sourcecode type="json"><![CDATA[ <sourcecode type="json"><![CDATA[
{ "linkset": { "linkset":
[ [
{ "anchor": "https://example.net/bar", { "anchor": "https://example.net/bar",
"next": [ "next": [
{"href": "https://example.com/foo"} {"href": "https://example.com/foo"}
] ]
} }
] ]
}]]> }]]>
</sourcecode> </sourcecode>
</figure> </figure>
<t>The following example of a JSON-serialized set of links r epresents two links <t>The following example of a JSON-serialized set of links r epresents two links
that share link context and relation type but have diffe rent link targets.</t> that share a link context and relation type but have dif ferent link targets.</t>
<figure> <figure>
<name>Linkset with two links with the same context</name >
<sourcecode type="json"><![CDATA[ <sourcecode type="json"><![CDATA[
{ "linkset": { "linkset":
[ [
{ "anchor": "https://example.net/bar", { "anchor": "https://example.net/bar",
"item": [ "item": [
{"href": "https://example.com/foo1"}, {"href": "https://example.com/foo1"},
{"href": "https://example.com/foo2"} {"href": "https://example.com/foo2"}
] ]
} }
] ]
}]]> }]]>
</sourcecode>
</sourcecode>
</figure> </figure>
<t>The following example shows a set of links that represent s two links, each with <t>The following example shows a set of links that represent s two links, each with
a different link context, link target, and relation type. a different link context, link target, and relation type.
One relation type is registered, the other is an extension r elation type.</t> One relation type is registered, and the other is an extensi on relation type.</t>
<figure> <figure>
<name>Linkset with two links with different contexts</na me>
<sourcecode type="json"><![CDATA[ <sourcecode type="json"><![CDATA[
{ "linkset": { "linkset":
[ [
{ "anchor": "https://example.net/bar", { "anchor": "https://example.net/bar",
"next": [ "next": [
{"href": "https://example.com/foo1"} {"href": "https://example.com/foo1"}
] ]
}, },
{ "anchor": "https://example.net/boo", { "anchor": "https://example.net/boo",
"https://example.com/relations/baz" : [ "https://example.com/relations/baz" : [
{"href": "https://example.com/foo2"} {"href": "https://example.com/foo2"}
] ]
} }
] ]
}]]> }]]>
</sourcecode> </sourcecode>
</figure> </figure>
</section> </section>
<section title="Link Target Attributes" anchor="json-target-attr <section anchor="json-target-attributes" numbered="true" toc="de
ibutes"> fault">
<name>Link Target Attributes</name>
<t>A link may be further qualified by target attributes as d efined by <xref target="RFC8288" section="2">Web Linking</xref>. <t>A link may be further qualified by target attributes as d efined by <xref target="RFC8288" section="2"/>.
Three types of attributes exist:</t> Three types of attributes exist:</t>
<ul> <ul>
<li>Serialisation-defined attributes described in <xref target="RFC8288" section="3.4.1">Web Linking</xref>.</li> <li>Serialization-defined attributes as described in <xr ef target="RFC8288" section="3.4.1"></xref>.</li>
<li>Extension attributes defined and used by communities as allowed by <li>Extension attributes defined and used by communities as allowed by
<xref target="RFC8288" section="3.4.2"/>.</li> <xref target="RFC8288" section="3.4.2"/>.</li>
<li>Internationalized versions of the "title" attribute defined by <xref target="RFC8288"/> and of extension attributes <li>Internationalized versions of the "title" attribute as defined by <xref target="RFC8288"/> and of extension attributes
allowed by <xref target="RFC8288" section="3.4"/>.</ li> allowed by <xref target="RFC8288" section="3.4"/>.</ li>
<!--
<li>Attributes defined by <xref target="I-D.nottingham-l
ink-hint">Link Hints</xref> and the associated HTTP Link Hint Registry.</li>
</ul> </ul>
<t>The handling of these different types of attributes is de scribed in the sections below.</t> <t>The handling of these different types of attributes is de scribed in the sections below.</t>
<section title="Target Attributes Defined by Web Linking" an <section anchor="json-target-attributes-existing" numbered="
chor="json-target-attributes-existing"> true" toc="default">
<name>Target Attributes Defined by Web Linking</name>
<t><xref target="RFC8288" section="3.4.1"/> defines the following target attributes that may be used to annotate links: <t><xref target="RFC8288" section="3.4.1"/> defines the following target attributes that may be used to annotate links:
"hreflang", "media", "title", "title*", and "type"; "hreflang", "media", "title", "title*", and "type";
these target attributes follow different occurrence and value patterns. these target attributes follow different occurrence and value patterns.
In the JSON representation, these attributes MUST be conveyed as additional In the JSON representation, these attributes <bcp14> MUST</bcp14> be conveyed as additional
members of the link target object as follows:</t> members of the link target object as follows:</t>
<ul> <dl spacing="normal">
<li>"hreflang": The "hreflang" target attribute, <dt>"hreflang":</dt><dd>The "hreflang" target attrib
ute,
defined as optional and repeatable by <xref t arget="RFC8288"/>, defined as optional and repeatable by <xref t arget="RFC8288"/>,
MUST be represented by an "hreflang" member, and <bcp14>MUST</bcp14> be represented by an "hrefla
its value MUST be an array (even if there only is one value to be represented), ng" member, its value <bcp14>MUST</bcp14> be an array (even if there is only one
and each value in that array MUST be a string - value to be represented),
representing one value and each value in that array <bcp14>MUST</bcp14>
of the "hreflang" target attribute for a link - be a string -- representing one value
which follows the same of the "hreflang" target attribute for a link --
model as in the <xref target="RFC8288"/> syntax. that follows the same
</li> model as the syntax discussed in <xref target="R
<li>"media": The "media" target attribute, FC8288"/>.</dd>
defined as optional and not repeatable by <xr <dt>"media":</dt><dd>The "media" target attribute,
ef target="RFC8288"/>, MUST be defined as optional and not repeatable by <xr
ef target="RFC8288"/>, <bcp14>MUST</bcp14> be
represented by a "media" member represented by a "media" member
in the link target object, and its value MUST be in the link target object, and its value <bcp14>
a string that follows the MUST</bcp14> be a string that follows the
same model as in the <xref target="RFC8288"/> sy same model as the syntax discussed in <xref targ
ntax.</li> et="RFC8288"/>.</dd>
<li>"type": The "type" target attribute, <dt>"title":</dt><dd>The "title" target attribute,
defined as optional and not repeatable by <xr
ef target="RFC8288"/>,
MUST be represented by a "type" member
in the link target object, and its value MUST be
a string that follows the
same model as in the <xref target="RFC8288"/> sy
ntax.</li>
<li>"title": The "title" target attribute,
defined as optional and not repeatable by <xr ef target="RFC8288"/>, defined as optional and not repeatable by <xr ef target="RFC8288"/>,
MUST be represented by a "title" <bcp14>MUST</bcp14> be represented by a "titl
member in the link target object, and its value e"
MUST be a JSON string.</li> member in the link target object, and its value
<li>"title*": The "title*" target attribute, <bcp14>MUST</bcp14> be a JSON string.</dd>
<dt>"title*":</dt><dd>The "title*" target attribute,
defined as optional and not repeatable by <xr ef target="RFC8288"/>, defined as optional and not repeatable by <xr ef target="RFC8288"/>,
is motivated by character encoding is motivated by character encoding
and language issues and follows the model define d in <xref target="RFC8187"/>. and language issues and follows the model define d in <xref target="RFC8187"/>.
The details of the JSON The details of the JSON
representation that applies to title* are descri bed in representation that applies to "title*" are desc ribed in
<xref target="linkset-json-i18n-link-parameter"/ >. <xref target="linkset-json-i18n-link-parameter"/ >.
</li> </dd>
</ul> <dt>"type":</dt><dd>The "type" target attribute,
defined as optional and not repeatable by <xr
ef target="RFC8288"/>,
<bcp14>MUST</bcp14> be represented by a "type
" member
in the link target object, and its value <bcp14>
MUST</bcp14> be a string that follows the
same model as the syntax discussed in <xref targ
et="RFC8288"/>.</dd>
</dl>
<t>The following example illustrates how the repeatable <t>The following example illustrates how the "hreflang"
"hreflang" and the (repeatable) target attribute and the "type" (not repeatable) target attribute a
not repeatable "type" target attributes are represen re represented in a link target object.</t>
ted in a link target object.</t>
<figure> <figure>
<name>Linkset with "hreflang" and "type" target attr ibutes</name>
<sourcecode type="json"><![CDATA[ <sourcecode type="json"><![CDATA[
{ "linkset": { "linkset":
[ [
{ "anchor": "https://example.net/bar", { "anchor": "https://example.net/bar",
"next": [ "next": [
{ "href": "https://example.com/foo", { "href": "https://example.com/foo",
"type": "text/html", "type": "text/html",
"hreflang": [ "en" , "de" ] "hreflang": [ "en" , "de" ]
} }
] ]
} }
] ]
}]]> }]]>
</sourcecode> </sourcecode>
</figure> </figure>
</section> </section>
<section title="Internationalized Target Attributes" anchor= <section anchor="linkset-json-i18n-link-parameter" numbered=
"linkset-json-i18n-link-parameter"> "true" toc="default">
<name>Internationalized Target Attributes</name>
<t>In addition to the target attributes described in <xr ef target="json-target-attributes-existing"/>, <t>In addition to the target attributes described in <xr ef target="json-target-attributes-existing"/>,
<xref target="RFC8288" section="3.4"/> also supports <xref target="RFC8288" section="3.4"/> also supports
attributes that follow the content model of <xref ta rget="RFC8187"/>. attributes that follow the content model of <xref ta rget="RFC8187"/>.
In <xref target="RFC8288"/>, these target In <xref target="RFC8288"/>, these target
attributes are recognizable by the use of a trailing asterisk in the attribute name, attributes are recognizable by the use of a trailing asterisk in the attribute name,
such as "title*". such as "title*".
The content model of <xref target="RFC8187"/> uses a string-based microsyntax The content model of <xref target="RFC8187"/> uses a string-based microsyntax
that represents the character encoding, an optional language tag, that represents the character encoding, an optional language tag,
and the escaped attribute value encoded according to the specified character encoding.</t> and the escaped attribute value encoded according to the specified character encoding.</t>
<t>The JSON serialization for these target attributes MU ST be <t>The JSON serialization for these target attributes <b cp14>MUST</bcp14> be
as follows:</t> as follows:</t>
<ul> <ul>
<li>An internationalized target attribute is represe nted as a member of the link context object with <li>An internationalized target attribute is represe nted as a member of the link context object with
the same name (including the *) as the attribute .</li> the same name (including the "*") as the attribu te.</li>
<li>The character encoding information <li>The character encoding information
as prescribed by <xref target="RFC8187"/> is not preserved; instead, the as prescribed by <xref target="RFC8187"/> is not preserved; instead, the
content of the internationalized attribute is re presented as a JSON string.</li> content of the internationalized attribute is re presented as a JSON string.</li>
<li>The value of the internationalized target attrib ute is an <li>The value of the internationalized target attrib ute is an
array that contains one or more JSON objects. Th e name of one member array that contains one or more JSON objects. Th e name of one member
of such JSON object is "value" of such JSON objects is "value",
and its value is the actual content (in its unes and its value is the actual content (in its unes
caped version) of the internationalized target attribute, i.e. the caped version) of the internationalized target attribute, i.e., the
value of the attribute from which value of the attribute from which
the encoding and language information are remove d. the encoding and language information are remove d.
The name of another, optional, member of such JS ON object is "language" and The name of another, optional member of such JSO N objects is "language", and
its value is the language tag <xref target="RFC5 646"/> its value is the language tag <xref target="RFC5 646"/>
for the language in which the attribute content is conveyed. for the language in which the attribute content is conveyed.
</li> </li>
</ul> </ul>
<t>The following example illustrates how the "title*" ta rget attribute <t>The following example illustrates how the "title*" ta rget attribute as
defined by <xref target="RFC8288" section="3.4.1"/> is represented in a link target object.</t> defined by <xref target="RFC8288" section="3.4.1"/> is represented in a link target object.</t>
<figure> <figure>
<name>Linkset with "title" and "title*" target attri butes</name>
<sourcecode type="json"><![CDATA[ <sourcecode type="json"><![CDATA[
{ "linkset": { "linkset":
[ [
{ "anchor": "https://example.net/bar", { "anchor": "https://example.net/bar",
"next": [ "next": [
{ "href": "https://example.com/foo", { "href": "https://example.com/foo",
"type": "text/html", "type": "text/html",
"hreflang": [ "en" , "de" ], "hreflang": [ "en" , "de" ],
"title": "Next chapter", "title": "Next chapter",
"title*": [ { "value": "nächstes Kapitel" , "title*": [ { "value": "nächstes Kapitel" ,
"language" : "de" } ] "language" : "de" } ]
} }
] ]
} }
] ]
}]]> }]]>
</sourcecode> </sourcecode>
</figure> </figure>
<t>The above example assumes that the German title conta ins an umlaut character (in the original syntax it would be encoded as title*=UT F-8'de'n%c3%a4chstes%20Kapitel), <t>The above example assumes that the German title conta ins an umlaut character (in the original syntax, it would be encoded as title*=U TF-8'de'n%c3%a4chstes%20Kapitel),
which gets encoded in its unescaped form in the JSON representation. which gets encoded in its unescaped form in the JSON representation.
Implementations MUST properly decode/encode internat ionalized target attributes that follow the model of <xref target="RFC8187"/> wh en transcoding between the "application/linkset" and the "application/linkset+js on" formats.</t> Implementations <bcp14>MUST</bcp14> properly decode/ encode internationalized target attributes that follow the model of <xref target ="RFC8187"/> when transcoding between the "application/linkset" format and the " application/linkset+json" format.</t>
</section> </section>
<section title="Extension Target Attributes" anchor="json-target <section anchor="json-target-attributes-extension" numbered="tru
-attributes-extension"> e" toc="default">
<t>Extension target attributes are attributes that are not d <name>Extension Target Attributes</name>
efined by <xref target="RFC8288" section="3.4.1"/> <t>Extension target attributes (e.g., as listed in <xref
(as listed in <xref target="json-target-attributes-exist target="json-target-attributes-existing"/>) are attributes that are not defined
ing"/>), but are nevertheless by <xref target="RFC8288" section="3.4.1"/> but are nevertheless
used to qualify links. used to qualify links.
They can be defined by communities in any way deemed nec essary, and it is up to them They can be defined by communities in any way deemed nec essary, and it is up to them
to make sure their usage is understood by target applica tions. to make sure their usage is understood by target applica tions.
However, lacking standardization, there is no interopera ble However, lacking standardization, there is no interopera ble
understanding of these extension attributes. One importa nt consequence is that understanding of these extension attributes. One importa nt consequence is that
their cardinality is unknown to generic applications. Th erefore, in the JSON serialization, their cardinality is unknown to generic applications. Th erefore, in the JSON serialization,
all extension target attributes are treated as repeatabl e.</t> all extension target attributes are treated as repeatabl e.</t>
<t>The JSON serialization for these target attributes MUST b e <t>The JSON serialization for these target attributes <bcp14 >MUST</bcp14> be
as follows:</t> as follows:</t>
<ul> <ul>
<li>An extension target attribute is represented as a me <li>An extension target attribute is represented as a me
mber of the link target object with the same name as the attribute, including th mber of the link target object with the same name as the attribute, including th
e * if applicable.</li> e "*" if applicable.</li>
<li>The value of an extension attribute MUST be represen <li>The value of an extension attribute <bcp14>MUST</bcp
ted by an array, even if there only is one value to be represented.</li> 14> be represented by an array, even if there is only one value to be represente
d.</li>
<li>If the extension target attribute does not have a na me with a trailing asterisk, <li>If the extension target attribute does not have a na me with a trailing asterisk,
then each value in that array MUST be a JSON string that represents one value then each value in that array <bcp14>MUST</bcp14> be a JSON string that represents one value
of the attribute.</li> of the attribute.</li>
<li>If the extension attribute has a name with a trailin g asterisk <li>If the extension attribute has a name with a trailin g asterisk
(it follows the content model of <xref target="RFC81 87"/>), (it follows the content model of <xref target="RFC81 87"/>),
then each value in that array MUST be a JSON object. then each value in that array <bcp14>MUST</bcp14> be
The value of each such JSON object a JSON object. The value of each such JSON object
MUST be structured as described in <xref target="lin <bcp14>MUST</bcp14> be structured as described in <x
kset-json-i18n-link-parameter"/>.</li> ref target="linkset-json-i18n-link-parameter"/>.</li>
</ul> </ul>
<t>The example shows a link target object with three extensi on target attributes. The value for each extension target attribute is an array. The two first are regular extension target attributes, with the first one ("foo ") having only one value and the second one ("bar") having two. <t>The following example shows a link target object with thr ee extension target attributes. The value for each extension target attribute is an array. The first two are regular extension target attributes, with the first one ("foo") having only one value and the second one ("bar") having two.
The last extension target attribute ("baz*") follows the naming rule of <xref target="RFC8187"/> and therefore is encoded according to t he serialization described in <xref target="linkset-json-i18n-link-parameter"/> .</t> The last extension target attribute ("baz*") follows the naming rule of <xref target="RFC8187"/> and therefore is encoded according to t he serialization described in <xref target="linkset-json-i18n-link-parameter"/> .</t>
<figure> <figure>
<name>Linkset with extension target attributes</name>
<sourcecode type="json"><![CDATA[ <sourcecode type="json"><![CDATA[
{ "linkset": { "linkset":
[ [
{ "anchor": "https://example.net/bar", { "anchor": "https://example.net/bar",
"next": [ "next": [
{ "href": "https://example.com/foo", { "href": "https://example.com/foo",
"type": "text/html", "type": "text/html",
"foo": [ "foovalue" ], "foo": [ "foovalue" ],
"bar": [ "barone", "bartwo" ], "bar": [ "barone", "bartwo" ],
"baz*": [ { "value": "bazvalue" , "baz*": [ { "value": "bazvalue" ,
"language" : "en" } ] "language" : "en" } ]
} }
] ]
} }
] ]
}]]> }]]>
</sourcecode> </sourcecode>
</figure> </figure>
</section> </section>
<!--
<section title="Target Attributes in the HTTP Link Hints Registr
y" anchor="json-target-attributes-hints">
<t>In order to augment interoperability regarding target
attributes,
<xref target="I-D.nottingham-link-hint">Link Hints</
xref> defines a registration mechanism for
target attributes, an associated HTTP Link Hint Regi
stry, and a set of attributes to initially populate that registry.
The initial registry, for example, includes the "all
ow" attribute that can be used to convey the HTTP methods that are supported
to interact with the target resource.</t>
<t>The JSON serialization for these target attributes MU
ST be as follows:</t>
<t><list style="symbols">
<t>A Link Hint target attribute is represented as a
member of the link context object with the same name of the attribute as registe
red in the HTTP Link Hint Registry.</t>
<t>The value of a Link Hint target attribute MUST ad
here to the content model specified for the attribute in the HTTP Link Hint Regi
stry.</t>
<t>Internationalization of Link Hint target attribut
es is not applicable.</t>
</list></t>
<t>The example shows a link target object with the "Type
" attribute defined by <xref target="RFC8187"/> and the "allow" attribute that i
s registered in the HTTP Link Hint Registry.
The registry specifies the content model for this at
tribute as an array of strings. Therefor, that same content model is used in the
"application/linkset+json"
serialization of sets of links.</t>
<figure>
<sourcecode type="json"><![CDATA[
{ "linkset":
[
{ "anchor": "http://example.net/bar",
"next": [
{ "href": "http://example.com/foo",
"type": "text/html",
"allow": [ "GET", "POST" ]
}
]
}
]
}]]>
</sourcecode>
</figure>
</section>
</section> </section>
<section title="JSON Extensibility" anchor="json-extensibility"> <section anchor="json-extensibility" numbered="true" toc="defaul
<t>The Web linking model (<xref target="RFC8288"/>) provides t">
for the use of extension target attributes as discussed in <name>JSON Extensibility</name>
<t>The Web Linking model <xref target="RFC8288"/> provides f
or the use of extension target attributes as discussed in
<xref target="json-target-attributes-extension"/>. <xref target="json-target-attributes-extension"/>.
The use of other forms of extensions is NOT RECOMMEND The use of other forms of extensions is <bcp14>NOT RE
ED. COMMENDED</bcp14>.
Limiting the JSON format in this way allows to unambi Limiting the JSON format in this way allows unambiguo
guously round trip between links provided in the HTTP "Link" header field, us round trips between links provided in the HTTP "Link" header field,
sets of links serialized according to the "application/l inkset" format, and sets of links serialized sets of links serialized according to the "application/l inkset" format, and sets of links serialized
according to the "application/linkset+json" format. according to the "application/linkset+json" format.
</t> </t>
<t>Cases may exist in which the use of extensions other than
those of <xref target="json-target-attributes-extension"/> may be useful. <t>Cases may exist in which the use of extensions other than
For example, when a link set publisher needs to include descripti those discussed in <xref target="json-target-attributes-extension"/> may be use
ve or technical metadata for internal consumption. ful --
In case such extensions are used they MUST NOT change the semantics for example, when a link set publisher needs to include descripti
of the JSON members defined in this specification. ve or technical metadata for internal consumption.
If such extensions are used, they <bcp14>MUST NOT</bcp14> change th
e semantics of the JSON members defined in this specification.
Agents that consume JSON linkset documents can safely ignore such e xtensions.</t> Agents that consume JSON linkset documents can safely ignore such e xtensions.</t>
</section> </section>
</section> </section>
</section> </section>
<section title='The "profile" parameter for media types to Represent Sets of <section anchor="profile-attribute" numbered="true" toc="default">
Links' anchor="profile-attribute"> <name>The &quot;profile&quot; Parameter for Media Types to R
epresent Sets of Links</name>
<t>As a means to convey specific constraints or conventions (as per <xre f target="RFC6906"/>) that apply to a link set document, <t>As a means to convey specific constraints or conventions (as per <xre f target="RFC6906"/>) that apply to a link set document,
the "profile" parameter MAY be used in conjunction with the media ty the "profile" parameter <bcp14>MAY</bcp14> be used in conjunction wi
pes "application/linkset" and th the media types "application/linkset" and
"application/linkset+json" detailed in "application/linkset+json" as detailed in
<xref target="linkset-native"/> and <xref target="linkset-json"/>, r Sections&nbsp;<xref target="linkset-native" format="counter"/> and <
espectively. xref target="linkset-json" format="counter"/>, respectively.
For example, the parameter could be used to indicate that a link set uses a specific, limited set of link relation For example, the parameter could be used to indicate that a link set uses a specific, limited set of link relation
types.</t> types.</t>
<t>The value of the "profile" parameter MUST be a non-empty list of spac e-separated URIs, <t>The value of the "profile" parameter <bcp14>MUST</bcp14> be a non-emp ty list of space-separated URIs,
each of which identifies specific constraints or conventions that ap ply to the link set document. When providing multiple each of which identifies specific constraints or conventions that ap ply to the link set document. When providing multiple
profile URIs, care should be taken that the corresponding profiles ar e not conflicting. profile URIs, care should be taken that the corresponding profiles ar e not conflicting.
Profile URIs MAY be registered in the IANA Profile URI Registry in t he manner specified by <xref target="RFC7284"/>.</t> Profile URIs <bcp14>MAY</bcp14> be registered in the IANA's "Profile URIs" registry in the manner specified by <xref target="RFC7284"/>.</t>
<t>The presence of a "profile" parameter in conjunction with the "applic ation/linkset" and <t>The presence of a "profile" parameter in conjunction with the "applic ation/linkset" and
"application/linkset+json" media types does not change the semantics of "application/linkset+json" media types does not change the semantics of
a link set. As such, clients with and without knowledge of profile U RIs can use the same representation.</t> a link set. As such, clients with and without knowledge of profile U RIs can use the same representation.</t>
<t><xref target="profile-parameter-example"/> shows an example of using the "profile" parameter in conjunction with the <t><xref target="profile-parameter-example"/> shows an example of using the "profile" parameter in conjunction with the
"application/linkset+json" media type.</t> "application/linkset+json" media type.</t>
</section> </section>
<section title='The "linkset" Relation Type for Linking to a Set of Link <section anchor="linkset-link-relation" numbered="true" toc="default">
s' anchor="linkset-link-relation"> <name>The &quot;linkset&quot; Relation Type for Linking to a
Set of Links</name>
<t>The target of a link with the "linkset" relation type provides a set of links, <t>The target of a link with the "linkset" relation type provides a set of links,
including links in which the resource that is the link context p articipates.</t> including links in which the resource that is the link context p articipates.</t>
<t>A link with the "linkset" relation type MAY be provided in the he ader field and/or <t>A link with the "linkset" relation type <bcp14>MAY</bcp14> be pro vided in the header field and/or
the body of a resource's representation. It may also be discover ed by other means, such as through the body of a resource's representation. It may also be discover ed by other means, such as through
client-side information.</t> client-side information.</t>
<t>A resource MAY provide more than one link with a "linkset" relati on type. <t>A resource <bcp14>MAY</bcp14> provide more than one link with a " linkset" relation type.
Multiple such links can refer to the same set of links expressed using different Multiple such links can refer to the same set of links expressed using different
media types, or to different sets of links, potentially provided by different third-party services.</t> media types, or to different sets of links, potentially provided by different third-party services.</t>
<!-- <t>The use of a link with the "linkset" relation
type does not preclude the provision of links with other relatio
n types,
i.e. the resource that is the link context can provide typed lin
ks other than a "linkset" link.
Therefore, the
effective set of links provided by that resource is the union of
the links that the
resource itself provides, and the links provided by the resource
that is the target of the "linkset" link -
in which it participates.</t> -->
<t>The set of links provided by the resource that is the target of a "linkset" link may contain links in which the <t>The set of links provided by the resource that is the target of a "linkset" link may contain links in which the
resource that is the context of the "linkset" link does not p resource that is the context of the "linkset" link does not p
articipate. User agents MUST process each link articipate. User agents <bcp14>MUST</bcp14> process each link
in the link set independently, including processing of link c in the link set independently, including processing of the li
ontext and link target, and MAY ignore links from nk context and link target, and <bcp14>MAY</bcp14> ignore links from
the link set in which the context of the "linkset" link does not participate.</t> the link set in which the context of the "linkset" link does not participate.</t>
<t>A user agent that follows a "linkset" link and obtains links for which anchors and targets are expressed as <t>A user agent that follows a "linkset" link and obtains links for which anchors and targets are expressed as
relative references (as per <xref target="RFC3986" section="4.1" />) MUST determine what the context is for these links; it SHOULD ignore links f or which it is unable to relative references (as per <xref target="RFC3986" section="4.1" />) <bcp14>MUST</bcp14> determine what the context is for these links; it <bcp14 >SHOULD</bcp14> ignore links for which it is unable to
unambiguously make that determination.</t> unambiguously make that determination.</t>
<t>As a means to convey specific constraints or conventions (as per <xref target="RFC6906"/>) that apply to a link set document, <t>As a means to convey specific constraints or conventions (as per <xref target="RFC6906"/>) that apply to a link set document,
the "profile" attribute MAY be used in conjunction with the "linkset" li nk relation type. the "profile" attribute <bcp14>MAY</bcp14> be used in conjunction with t he "linkset" link relation type.
For example, the attribute could be used to indicate that a link set use s a specific, limited set of link relation For example, the attribute could be used to indicate that a link set use s a specific, limited set of link relation
types. The value of the "profile" attribute MUST be a non-empty types. The value of the "profile" attribute <bcp14>MUST</bcp14> be a non -empty
list of space-separated URIs, each of which identifies specific constrai nts or conventions that apply list of space-separated URIs, each of which identifies specific constrai nts or conventions that apply
to the link set document. Profile URIs MAY be registered in the IANA Pro file URI Registry in the manner specified by <xref target="RFC7284"/>. to the link set document. Profile URIs <bcp14>MAY</bcp14> be registered in the IANA's "Profile URIs" registry in the manner specified by <xref target="R FC7284"/>.
<xref target="profile-attribute-example"/> shows an example of using the "profile" attribute on a link <xref target="profile-attribute-example"/> shows an example of using the "profile" attribute on a link
with the "linkset" relation type, making both the link set and the profi le(s) to which it complies discoverable.</t> with the "linkset" relation type, making both the link set and the profi le(s) to which it complies discoverable.</t>
<!--
<t>There is no constraint on the target URI of a link with the "link
set" relation type;
designing and using these URIs is left to the discretion of impl
ementers.</t>
<t>In common scenarios (the origin resource is distinct from the
linkset resource), it is essential for linkset representations t
o
make the URI of the origin resource explicit for those links in
which the origin resource acts as link context.</t>
-->
<!--
<t>If an origin resource provides a "linkset" link pointing at a li
nkset resource,
and that linkset resource provides a "linkset" link in turn,
then this latter link points at links pertaining to the linkset
resource.
This means that in the context of the latter link, the linkset r
esource is an origin
resource. This means that linkset relations are not transitive,
and it is up to a client
to decide whether they follow chains of "linkset" links or not.<
/t>
-->
</section> </section>
<section title="Examples" anchor="linkset-link-examples"> <section anchor="linkset-link-examples" numbered="true" toc="default">
<t><xref target="linkset-link-link-format"/> and <xref target="lin <name>Examples</name>
kset-link-json-format"/> <t>Sections&nbsp;<xref target="linkset-link-link-format" format="c
ounter"/> and <xref target="linkset-link-json-format" format="counter"/>
show examples whereby a set of links is provided as "application/l inkset" and "application/linkset+json" documents, respectively. show examples whereby a set of links is provided as "application/l inkset" and "application/linkset+json" documents, respectively.
<xref target="linkset-rel-example"/> illustrates the use of th e "linkset" link relation type to support discovery of sets of links and <xref target="linkset-rel-example"/> illustrates the use of th e "linkset" link relation type to support the discovery of sets of links, and
<xref target="profile-examples"/> shows how to convey profile information pertaining to a link set.</t> <xref target="profile-examples"/> shows how to convey profile information pertaining to a link set.</t>
<section title="Set of Links Provided as application/linkset" anchor= <section anchor="linkset-link-link-format" numbered="true" toc="defau
"linkset-link-link-format"> lt">
<name>Set of Links Provided as &quot;application/linkset&quo
t;</name>
<t><xref target="Request1"/> shows a client issuing an <t><xref target="Request1"/> shows a client issuing an
HTTP GET request against resource &lt;https://example.org/lin ks/resource1&gt;.</t> HTTP GET request against resource &lt;https://example.org/lin ks/resource1&gt;.</t>
<figure title="Client HTTP GET request" anchor="Request1"> <figure anchor="Request1">
<artwork type="http-message"><![CDATA[ <name>Client HTTP GET request</name>
<sourcecode type="http-message"><![CDATA[
GET /links/resource1 HTTP/1.1 GET /links/resource1 HTTP/1.1
Host: example.org Host: example.org
]]> ]]>
</artwork> </sourcecode>
</figure> </figure>
<t><xref target="Response1.1"/> shows the response to the GET req uest of <t><xref target="Response1.1"/> shows the response to the GET req uest of
<xref target="Request1"/>. The response contains a Content-Type hea der field <xref target="Request1"/>. The response contains a "Content-Type" h eader field
specifying that the media type of the response is "application/link set". A set of links, revealing authorship and versioning related specifying that the media type of the response is "application/link set". A set of links, revealing authorship and versioning related
to resource &lt;https://example.org/resource1&gt;, is provided in t he response body. The HTTP "Link" header field indicates the availability to resource &lt;https://example.org/resource1&gt;, is provided in t he response body. The HTTP "Link" header field indicates the availability
of an alternate representation of the set of links using media type "application/linkset+json".</t> of an alternate representation of the set of links using media type "application/linkset+json".</t>
<figure title="Response to HTTP GET includes a set of links" anchor= <figure anchor="Response1.1">
"Response1.1"> <name>Response to HTTP GET includes a set of links</name>
<artwork type="http-message"><![CDATA[ <sourcecode type="http-message"><![CDATA[
HTTP/1.1 200 OK HTTP/1.1 200 OK
Date: Mon, 12 Aug 2019 10:35:51 GMT Date: Mon, 12 Aug 2019 10:35:51 GMT
Server: Apache-Coyote/1.1 Server: Apache-Coyote/1.1
Content-Length: 1023 Content-Length: 1023
Content-Type: application/linkset Content-Type: application/linkset
Link: <https://example.org/links/resource1> Link: <https://example.org/links/resource1>
; rel="alternate" ; rel="alternate"
; type="application/linkset+json" ; type="application/linkset+json"
<https://authors.example.net/johndoe> <https://authors.example.net/johndoe>
skipping to change at line 687 skipping to change at line 639
; type="text/html" ; type="text/html"
; datetime="Thu, 13 Jun 2019 09:34:33 GMT" ; datetime="Thu, 13 Jun 2019 09:34:33 GMT"
; anchor="https://example.org/resource1", ; anchor="https://example.org/resource1",
<https://example.org/resource1?version=2> <https://example.org/resource1?version=2>
; rel="memento" ; rel="memento"
; type="text/html" ; type="text/html"
; datetime="Sun, 21 Jul 2019 12:22:04 GMT" ; datetime="Sun, 21 Jul 2019 12:22:04 GMT"
; anchor="https://example.org/resource1", ; anchor="https://example.org/resource1",
<https://authors.example.net/alice> <https://authors.example.net/alice>
; rel="author" ; rel="author"
; anchor="https://example.org/resource1#comment=1" ; anchor="https://example.org/resource1#comment=1" ]]>
]]> </sourcecode>
</artwork>
</figure> </figure>
</section> </section>
<section title="Set of Links Provided as application/linkset+json" <section anchor="linkset-link-json-format" numbered="true" toc="def
anchor="linkset-link-json-format"> ault">
<name>Set of Links Provided as &quot;application/linkset+jso
n&quot;</name>
<t><xref target="Request4"/> shows the client issuing an HTTP G ET <t><xref target="Request4"/> shows the client issuing an HTTP G ET
request against &lt;https://example.org/links/resource1&gt; . request against &lt;https://example.org/links/resource1&gt; .
In the request, the client uses an "Accept" header field to indicate it prefers a response in the In the request, the client uses an "Accept" header field to indicate that it prefers a response in the
"application/linkset+json" format.</t> "application/linkset+json" format.</t>
<figure title="Client HTTP GET request expressing preference fo <figure anchor="Request4">
r &quot;application/linkset+json&quot; response" anchor="Request4"> <name>Client HTTP GET request expressing preference for an &quo
<artwork type="http-message"><![CDATA[ t;application&wj;/linkset+json&quot; response</name>
<sourcecode type="http-message"><![CDATA[
GET links/resource1 HTTP/1.1 GET links/resource1 HTTP/1.1
Host: example.org Host: example.org
Accept: application/linkset+json Accept: application/linkset+json
]]>
]]></artwork> </sourcecode>
</figure> </figure>
<t><xref target="Response4.1"/> shows the response to the HTTP GET request of <xref target="Request4"/>. <t><xref target="Response4.1"/> shows the response to the HTTP GET request of <xref target="Request4"/>.
The set of links is serialized according to the media type "application/linkset+json".</t> The set of links is serialized according to the media type "application/linkset+json".</t>
<figure title="Response to the client's request for the set of <figure anchor="Response4.1">
links" anchor="Response4.1"> <name>Response to the client&apos;s request for the linkset</na
<artwork type="http-message"><![CDATA[ me>
<sourcecode type="http-message"><![CDATA[
HTTP/1.1 200 OK HTTP/1.1 200 OK
Date: Mon, 12 Aug 2019 10:46:22 GMT Date: Mon, 12 Aug 2019 10:46:22 GMT
Server: Apache-Coyote/1.1 Server: Apache-Coyote/1.1
Content-Type: application/linkset+json Content-Type: application/linkset+json
Link: <https://example.org/links/resource1> Link: <https://example.org/links/resource1>
; rel="alternate" ; rel="alternate"
; type="application/linkset" ; type="application/linkset"
Content-Length: 1246 Content-Length: 1246
{ "linkset": { "linkset":
skipping to change at line 764 skipping to change at line 718
} }
] ]
}, },
{ "anchor": "https://example.org/resource1#comment=1", { "anchor": "https://example.org/resource1#comment=1",
"author": [ "author": [
{ "href": "https://authors.example.net/alice"} { "href": "https://authors.example.net/alice"}
] ]
} }
] ]
}]]> }]]>
</artwork> </sourcecode>
</figure> </figure>
</section> </section>
<section title="Discovering a Link Set via the &quot;linkset&quot; <section anchor="linkset-rel-example" numbered="true" toc="default"
Link Relation Type" anchor="linkset-rel-example"> >
<name>Discovering a Link Set via the &quot;linkset&quot; Lin
k Relation Type</name>
<t><xref target="Request3"/> shows a client issuing an <t><xref target="Request3"/> shows a client issuing an
HTTP HEAD request against resource HTTP HEAD request against resource
&lt;https://example.org/resource1&gt;.</t> &lt;https://example.org/resource1&gt;.</t>
<figure title="Client HTTP HEAD request" anchor="Request3"> <figure anchor="Request3">
<artwork type="http-message"><![CDATA[ <name>Client HTTP HEAD request</name>
<sourcecode type="http-message"><![CDATA[
HEAD resource1 HTTP/1.1 HEAD resource1 HTTP/1.1
Host: example.org Host: example.org
]]> ]]>
</artwork> </sourcecode>
</figure> </figure>
<t><xref target="Response3.1"/> shows the response to the HEAD request of <t><xref target="Response3.1"/> shows the response to the HEAD request of
<xref target="Request3"/>. The response contains an HTTP "L ink" header field with <xref target="Request3"/>. The response contains an HTTP "L ink" header field with
a link that has the "linkset" relation type. It indicates t hat a set of links is provided a link that has the "linkset" relation type. It indicates t hat a set of links is provided
by resource &lt;https://example.org/links/resource1&gt;, wh ich by resource &lt;https://example.org/links/resource1&gt;, wh ich
provides a representation with media type "application/link set+json".</t> provides a representation with media type "application/link set+json".</t>
<figure title="Response to HTTP HEAD request" anchor="Response3 <figure anchor="Response3.1">
.1"> <name>Response to HTTP HEAD request</name>
<artwork type="http-message"><![CDATA[ <sourcecode type="http-message"><![CDATA[
HTTP/1.1 200 OK HTTP/1.1 200 OK
Date: Mon, 12 Aug 2019 10:45:54 GMT Date: Mon, 12 Aug 2019 10:45:54 GMT
Server: Apache-Coyote/1.1 Server: Apache-Coyote/1.1
Link: <https://example.org/links/resource1> Link: <https://example.org/links/resource1>
; rel="linkset" ; rel="linkset"
; type="application/linkset+json" ; type="application/linkset+json"
Content-Length: 236 Content-Length: 236
Content-Type: text/html;charset=utf-8 Content-Type: text/html;charset=utf-8
]]> ]]>
</artwork> </sourcecode>
</figure> </figure>
</section> </section>
<section title="Link Set Profiles" anchor="profile-examples"> <section anchor="profile-examples" numbered="true" toc="default">
<name>Link Set Profiles</name>
<t>The examples in this section illustrate the use of the "profile" at tribute for a link with the "linkset" link relation type and the "profile" attri bute for a link set media type. The examples are inspired by the implementation of link sets by GS1 (the standards body behind many of the world's barcodes).</t > <t>The examples in this section illustrate the use of the "profile" at tribute for a link with the "linkset" link relation type and the "profile" attri bute for a link set media type. The examples are inspired by the implementation of link sets by GS1 (the standards body behind many of the world's barcodes).</t >
<section title="Using a &quot;profile&quot; Attribute with a &quot;lin <section anchor="profile-attribute-example" numbered="true" toc="defau
kset&quot; Link" anchor="profile-attribute-example"> lt">
<name>Using a &quot;profile&quot; Attribute with a &quot;lin
kset&quot; Link</name>
<t><xref target="Request_pr_at"/> shows a client issuing an <t><xref target="Request_pr_at"/> shows a client issuing an
HTTP HEAD request against trade item 09506000134352 at <htt ps://id.gs1.org/01/9506000134352&gt;.</t> HTTP HEAD request against trade item 09506000134352 at <eref t arget="https://id.gs1.org/01/9506000134352" brackets="angle"/&gt;.</t>
<figure title="Client HTTP HEAD request" anchor="Request_pr_at"> <figure anchor="Request_pr_at">
<artwork type="http-message"><![CDATA[ <name>Client HTTP HEAD request</name>
<sourcecode type="http-message"><![CDATA[
HEAD /01/9506000134352 HTTP/1.1 HEAD /01/9506000134352 HTTP/1.1
Host: id.gs1.org Host: id.gs1.org
]]></artwork> ]]>
</sourcecode>
</figure> </figure>
<t><xref target="Response_pr_at"/> shows the server's response to the request of <t><xref target="Response_pr_at"/> shows the server's response to the request of
<xref target="Request_pr_at"/>, including a "linkset" link with a "profile" attribute <xref target="Request_pr_at"/>, including a "linkset" link with a "profile" attribute
that has the Profile URI &lt;https://www.gs1.org/voc/?show=linktypes&gt; as its value. that has the profile URI <eref target="https://www.gs1.org/voc/?show=linktyp es" brackets="angle"/> as its value.
Dereferencing that URI yields a profile document that lists all the link rel ation types that Dereferencing that URI yields a profile document that lists all the link rel ation types that
a client can expect when requesting the link set made discoverable by the "l inkset" link. The link relation types are a client can expect when requesting the link set made discoverable by the "l inkset" link. The link relation types are
presented in abbreviated form, e.g. &lt;gs1:activityIdeas&gt;, whereas th presented in abbreviated form, e.g., &lt;gs1:activityIdeas&gt;, whereas t
e actual link relation type URIs are he actual link relation type URIs are
available as hyperlinks on the abbreviations, e.g. &lt;https://www.gs1.or available as hyperlinks on the abbreviations, e.g., <eref target="https:/
g/voc/activityIdeas&gt;. /www.gs1.org/voc/activityIdeas" brackets="angle"/>.
For posterity that profile document was saved in the Internet Archive at For posterity, that profile document was saved in the Internet Archive at
&lt;https://web.archive.org/web/20210927160406/https://www.gs1.org/voc/?show <eref target="https://web.archive.org/web/20210927160406/https://www.gs1.org
=linktypes&gt; /voc/?show=linktypes" brackets="angle"/>
on 27 September 2021.</t> on 27 September 2021.</t>
<figure title="Response to the client's HEAD request including a &quot;profile&q <figure anchor="Response_pr_at">
uot; attribute for the &quot;linkset&quot; link" anchor="Response_pr_at"> <name>Response to the client&apos;s HEAD request, including a &
<artwork type="http-message"><![CDATA[ quot;profile&quot; attribute for the &quot;linkset&quot; link</name>
<sourcecode type="http-message"><![CDATA[
HTTP/1.1 307 Temporary Redirect HTTP/1.1 307 Temporary Redirect
Date: Mon, 27 Sep 2021 16:03:07 GMT Date: Mon, 27 Sep 2021 16:03:07 GMT
Server: nginx Server: nginx
Link: https://id.gs1.org/01/9506000134352?linkType=all Link: <https://id.gs1.org/01/9506000134352?linkType=all>
; rel="linkset" ; rel="linkset"
; type="application/linkset+json" ; type="application/linkset+json"
; profile="https://www.gs1.org/voc/?show=linktypes" ; profile="https://www.gs1.org/voc/?show=linktypes"
Location: https://example.com/risotto-rice-with-mushrooms/ Location: https://example.com/risotto-rice-with-mushrooms/
]]> ]]>
</artwork> </sourcecode>
</figure> </figure>
</section> </section>
<section title="Using a &quot;profile&quot; Parameter with a Link Set Media Type <section anchor="profile-parameter-example" numbered="true" toc="default">
" anchor="profile-parameter-example"> <name>Using a &quot;profile&quot; Parameter with a Link Set
Media Type</name>
<t><xref target="Request_pr_par"/> shows a client issuing an <t><xref target="Request_pr_par"/> shows a client issuing an
HTTP HEAD request against the link set <https://id.gs1.org/01/9506000134352?l inkType=all&gt; that was discovered through the HTTP interactions shown in <xref target="profile-attribute-example"/>.</t> HTTP HEAD request against the link set <eref target="https://id.gs1.org/01/95060 00134352?linkType=all" brackets="angle"/> that was discovered through the HTTP i nteractions shown in <xref target="profile-attribute-example"/>.</t>
<figure title="Client HTTP HEAD request" anchor="Request_pr_par"> <figure anchor="Request_pr_par">
<artwork type="http-message"><![CDATA[ <name>Client HTTP HEAD request</name>
<sourcecode type="http-message"><![CDATA[
HEAD /01/9506000134352?linkType=all HTTP/1.1 HEAD /01/9506000134352?linkType=all HTTP/1.1
Host: id.gs1.org Host: id.gs1.org
]]></artwork> ]]>
</sourcecode>
</figure> </figure>
<t><xref target="Response_pr_par"/> shows the server's response to the request o f <xref target="Request_pr_par"/>. Note the "profile" parameter for the applicat ion/linkset+json media type, which has as value the same Profile URI &lt;https:/ /www.gs1.org/voc/?show=linktypes&gt; as was used in &lt;xref target="Response_pr _at"/>.</t> <t><xref target="Response_pr_par"/> shows the server's response to the request o f <xref target="Request_pr_par"/>. Note the "profile" parameter for the "applica tion/linkset+json" media type, which has as its value the same profile URI <eref target="https://www.gs1.org/voc/?show=linktypes" brackets="angle"/> as was used in <xref target="Response_pr_at"/>.</t>
<figure title="Response to the client's HEAD request including a &quot;profile&q <figure anchor="Response_pr_par">
uot; parameter for the &quot;application/linkset+json&quot; media type" anchor=" <name>Response to the client&apos;s HEAD request, including a &
Response_pr_par"> quot;profile&quot; parameter for the &quot;application/linkset+json&quot; media
<artwork type="http-message"><![CDATA[ type</name>
<sourcecode type="http-message"><![CDATA[
HTTP/1.1 200 OK HTTP/1.1 200 OK
Date: Mon, 27 Sep 2021 16:03:33 GMT Date: Mon, 27 Sep 2021 16:03:33 GMT
Server: nginx Server: nginx
Content-Type: application/linkset+json; Content-Type: application/linkset+json;
profile="https://www.gs1.org/voc/?show=linktypes" profile="https://www.gs1.org/voc/?show=linktypes"
Content-Length: 396 Content-Length: 396
]]></artwork> ]]>
</sourcecode>
</figure> </figure>
</section> </section>
<section title="Using a Link with a &quot;profile&quot; Link Relation Type" anch <section anchor="profile-link-example" numbered="true" toc="default">
or="profile-link-example"> <name>Using a Link with a &quot;profile&quot; Link Relation
Type</name>
<t>Note that the response <xref target="Response_pr_par"/> from the link set res ource is equivalent to the response shown in <xref target="Response_pr_link"/>, which leverages the "profile" link relation type defined in <xref target="RFC690 6"/>.</t> <t>Note that the response shown in <xref target="Response_pr_par"/> from the lin k set resource is equivalent to the response shown in <xref target="Response_pr_ link"/>, which leverages the "profile" link relation type defined in <xref targe t="RFC6906"/>.</t>
<figure title="Response to the client's HEAD request including a &quot;profile&q <figure anchor="Response_pr_link">
uot; link" anchor="Response_pr_link"> <name>Response to the client&apos;s HEAD request, including a &
<artwork type="http-message"><![CDATA[ quot;profile&quot; link</name>
<sourcecode type="http-message"><![CDATA[
HTTP/1.1 200 OK HTTP/1.1 200 OK
Date: Mon, 27 Sep 2021 16:03:33 GMT Date: Mon, 27 Sep 2021 16:03:33 GMT
Server: nginx Server: nginx
Content-Type: application/linkset+json Content-Type: application/linkset+json
Link: https://www.gs1.org/voc/?show=linktypes; rel="profile" Link: <https://www.gs1.org/voc/?show=linktypes>; rel="profile"
Content-Length: 396 Content-Length: 396
]]></artwork> ]]>
</sourcecode>
</figure> </figure>
<t>A link with a "profile" link relation type as shown in <xref target="Response _pr_link"/> can also be conveyed in the link set document itself. This is illust rated by <xref target="Response_pr_linkset"/>. Following the recommendation that all links in a link set document should have an explicit anchor, such a link ha s the URI of the link set itself as anchor and the Profile URI as target. Multip le Profile URIs are handled by using multiple "href" members.</t> <t>A link with a "profile" link relation type as shown in <xref target="Response _pr_link"/> can also be conveyed in the link set document itself. This is illust rated by <xref target="Response_pr_linkset"/>. Following the recommendation that all links in a link set document should have an explicit anchor, such a link ha s the URI of the link set itself as the anchor and the profile URI as the target . Multiple profile URIs are handled by using multiple "href" members.</t>
<figure title="A Link Set that declares the profile it complies with using a &qu <figure anchor="Response_pr_linkset">
ot;profile&quot; link" anchor="Response_pr_linkset"> <name>A linkset that declares the profile it complies with, usi
ng a &quot;profile&quot; link</name>
<sourcecode type="json"><![CDATA[ <sourcecode type="json"><![CDATA[
{ "linkset": { "linkset":
[ [
{ "anchor": "https://id.gs1.org/01/9506000134352?linkType=all", { "anchor": "https://id.gs1.org/01/9506000134352?linkType=all",
"profile": [ "profile": [
{"href": "https://www.gs1.org/voc/?show=linktypes"} {"href": "https://www.gs1.org/voc/?show=linktypes"}
] ]
}, },
{ "anchor": "https://id.gs1.org/01/9506000134352", { "anchor": "https://id.gs1.org/01/9506000134352",
"https://gs1.org/voc/whatsInTheBox": [ "https://gs1.org/voc/whatsInTheBox": [
skipping to change at line 909 skipping to change at line 881
] ]
}]]> }]]>
</sourcecode> </sourcecode>
</figure> </figure>
</section> </section>
</section> </section>
</section> </section>
<section title="IANA Considerations" anchor="iana-considerations"> <section anchor="iana-considerations" numbered="true" toc="default">
<section title="Link Relation Type: linkset"> <name>IANA Considerations</name>
<t>The link relation type below should be registered by IANA in <section numbered="true" toc="default">
the Link Relation Type Registry <name>Link Relation Type: linkset</name>
as per <xref target="RFC8288" section="4.2">Web Linking</ <t>The link relation type below has been registered by IANA in t
xref>:</t> he "Link Relation Types" registry
<ul empty="true"> as per <xref target="RFC8288" section="4.2"/>:</t>
<li>Relation Name: linkset</li> <dl newline="false" spacing="normal">
<li>Description: The link target of a link with the "lin <dt>Relation Name:</dt><dd>linkset</dd>
kset" relation type <dt>Description:</dt><dd>The link target of a link with
provides a set of links, including links in which th the "linkset" relation type
e link context of the link participates.</li> provides a set of links, including links in which th
<li>Reference: [[ This document ]]</li> e link context of the link participates.</dd>
</ul> <dt>Reference:</dt><dd>RFC 9264</dd>
</dl>
</section> </section>
<section title="Media Type: application/linkset"> <section numbered="true" toc="default">
<t>The Internet media type application/linkset for a linkset <name>Media Type: application/linkset</name>
encoded as described in <xref target="linkset-native"/> <t>The Internet media type "application/linkset" for a links
should be registered by IANA in the Media Type Registry as et encoded as described in <xref target="linkset-native"/>
per <xref target="RFC6838"/>.</t> has been registered by IANA in the "Media Types" registry
<ul empty="true"> as per <xref target="RFC6838"/>.</t>
<li>Type name: application</li> <dl newline="false" spacing="normal">
<li>Subtype name: linkset</li> <dt>Type name:</dt><dd>application</dd>
<li>Required parameters: N/A</li> <dt>Subtype name:</dt><dd>linkset</dd>
<li>Optional parameters: profile</li> <dt>Required parameters:</dt><dd>N/A</dd>
<li>Encoding considerations: Linksets are encoded ac <dt>Optional parameters:</dt><dd>profile</dd>
cording to the definition of <xref target="RFC8288"/>. The encoding of <xref tar <dt>Encoding considerations:</dt><dd>Linksets are encode
get="RFC8288"/> is based on the general encoding rules of <xref target="I-D.ietf d according to the
-httpbis-semantics"/>, with the addition of allowing indicating character encodi definitions provided in <xref target="RFC8288"/>. Th
ng and language for specific parameters as defined by <xref target="RFC8187"/>.< e encoding discussed in
/li> <xref target="RFC8288"/> is based on the general enc
<li>Security considerations: The security considerat oding rules specified by
ions of [[ This document ]] apply.</li> HTTP <xref target="RFC9110"/> and allows specific pa
<li>Interoperability considerations: N/A</li> rameters to be extended
<li>Published specification: [[ This document ]]</li by the indication of character encoding and language
> as
<li>Applications that use this media type: This medi defined by <xref target="RFC8187"/>.</dd>
a type is not specific to any application, as it can be used by any application
that wants to interchange web links.</li> <dt>Security considerations:</dt><dd>The security co
<li><t>Additional information:</t> nsiderations of RFC 9264 apply.</dd>
<ul empty="true"> <dt>Interoperability considerations:</dt><dd>N/A</dd
<li>Magic number(s): N/A</li> >
<li>File extension(s): This media type does <dt>Published specification:</dt><dd>RFC 9264</dd>
not propose a specific extension.</li> <dt>Applications that use this media type:</dt><dd>T
<li>Macintosh file type code(s): TEXT</li> his media type is not specific to any application, as it can be used by any appl
</ul> ication that wants to interchange Web Links.</dd>
</li> </dl>
<li>Person &amp; email address to contact for furthe <dl newline="true" spacing="normal">
r information: Erik Wilde &lt;erik.wilde@dret.net&gt;</li> <dt>Additional information:</dt>
<li>Intended usage: COMMON</li> <dd>
<li>Restrictions on usage: none</li> <dl newline="false" spacing="compact">
<li>Author: Erik Wilde &lt;erik.wilde@dret.net&gt;</ <dt>Magic number(s):</dt><dd>N/A</dd>
li> <dt>File extension(s):</dt><dd>This media ty
<li>Change controller: IETF</li> pe does not propose a specific extension.</dd>
</ul> <dt>Macintosh file type code(s):</dt><dd>TEX
T</dd>
</dl>
</dd>
</dl>
<dl newline="false" spacing="normal">
<dt>Person &amp; email address to contact for furthe
r information:</dt><dd>Erik Wilde &lt;erik.wilde@dret.net&gt;</dd>
<dt>Intended usage:</dt><dd>COMMON</dd>
<dt>Restrictions on usage:</dt><dd>none</dd>
<dt>Author:</dt><dd>Erik Wilde &lt;erik.wilde@dret.n
et&gt;</dd>
<dt>Change controller:</dt><dd>IETF</dd>
</dl>
</section> </section>
<section title="Media Type: application/linkset+json"> <section numbered="true" toc="default">
<t>The Internet media type application/linkset+json for a linkse <name>Media Type: application/linkset+json</name>
t encoded as described in <xref target="linkset-json"/> <t>The Internet media type "application/linkset+json" for a link
should be registered by IANA in the Media Type Registry as per set encoded as described in <xref target="linkset-json"/>
<xref target="RFC6838"/>.</t> has been registered by IANA in the "Media Types" registry as p
<ul empty="true"> er <xref target="RFC6838"/>.</t>
<li>Type name: application</li> <dl newline="false" spacing="normal">
<li>Subtype name: linkset+json</li> <dt>Type name:</dt><dd>application</dd>
<li>Required parameters: N/A</li> <dt>Subtype name:</dt><dd>linkset+json</dd>
<li>Optional parameters: profile</li> <dt>Required parameters:</dt><dd>N/A</dd>
<li>Encoding considerations: The encoding considerations <dt>Optional parameters:</dt><dd>profile</dd>
of <xref target="RFC8259"/> apply</li> <dt>Encoding considerations:</dt><dd>The encoding consid
<li>Security considerations: The security considerations erations of <xref target="RFC8259"/> apply.</dd>
of [[ This document ]] apply.</li> <dt>Security considerations:</dt><dd>The security consid
<li>Interoperability considerations: The interoperabilit erations of RFC 9264 apply.</dd>
y considerations of <xref target="RFC8259"/> apply.</li> <dt>Interoperability considerations:</dt><dd>The interop
<li>Published specification: [[ This document ]]</li> erability considerations of <xref target="RFC8259"/> apply.</dd>
<li>Applications that use this media type: This media ty <dt>Published specification:</dt><dd>RFC 9264</dd>
pe is not specific to any application, as it can be used by any application that <dt>Applications that use this media type:</dt><dd>This
wants to interchange web links.</li> media type is not specific to any application, as it can be used by any applicat
<li><t>Additional information:</t> ion that wants to interchange Web Links.</dd>
<ul empty="true"> </dl>
<li>Magic number(s): N/A</li> <dl newline="true" spacing="normal">
<li>File extension(s): JSON documents often use <dt>Additional information:</dt>
".json" as the file extension, and this media type does not propose a specific e <dd>
xtension other than this generic one.</li> <dl newline="false" spacing="compact">
<li>Macintosh file type code(s): TEXT</li> <dt>Magic number(s):</dt><dd>N/A</dd>
</ul> <dt>File extension(s):</dt><dd>JSON documents of
</li> ten use ".json" as the file extension, and this media type does not propose a sp
<li>Person &amp; email address to contact for further in ecific extension other than this generic one.</dd>
formation: Erik Wilde &lt;erik.wilde@dret.net&gt;</li> <dt>Macintosh file type code(s):</dt><dd>TEXT</d
<li>Intended usage: COMMON</li> d>
<li>Restrictions on usage: none</li> </dl>
<li>Author: Erik Wilde &lt;erik.wilde@dret.net&gt;</li> </dd>
<li>Change controller: IETF</li> </dl>
</ul> <dl newline="false" spacing="normal">
<dt>Person &amp; email address to contact for further in
formation:</dt><dd>Erik Wilde &lt;erik.wilde@dret.net&gt;</dd>
<dt>Intended usage:</dt><dd>COMMON</dd>
<dt>Restrictions on usage:</dt><dd>none</dd>
<dt>Author:</dt><dd>Erik Wilde &lt;erik.wilde@dret.net&g
t;</dd>
<dt>Change controller:</dt><dd>IETF</dd>
</dl>
</section> </section>
</section> </section>
<section title="Security Considerations" anchor="security-considerations <section anchor="security-considerations" numbered="true" toc="default">
"> <name>Security Considerations</name>
<t>The security considerations of <xref target="RFC3986" section="7" /> apply, as well as those of Web Linking <xref target="RFC8288"/> as long as th e latter are not specifically discussing the risks of exposing information in HT TP header fields.</t> <t>The security considerations of <xref target="RFC3986" section="7" /> apply, as well as those of Web Linking <xref target="RFC8288"/> as long as th e latter are not specifically discussing the risks of exposing information in HT TP header fields.</t>
<t>In general, links may cause information leakage when they expose information (such as URIs) that can be sensitive or private. Links may expose "h idden URIs" that are not supposed to be openly shared, and may not be sufficient ly protected. Ideally, none of the URIs exposed in links should be supposed to b e "hidden"; instead, if these URIs are supposed to be limited to certain users, then technical measures should be put in place so that accidentally exposing the m does not cause any harm.</t> <t>In general, links may cause information leakage when they expose information (such as URIs) that can be sensitive or private. Links may expose "h idden URIs" that are not supposed to be openly shared and that may not be suffic iently protected. Ideally, none of the URIs exposed in links should be supposed to be "hidden"; instead, if these URIs are supposed to be limited to certain use rs, then technical measures should be put in place so that accidentally exposing them does not cause any harm.</t>
<t>For the specific mechanisms defined in this specification, two se curity considerations should be taken into account:</t> <t>For the specific mechanisms defined in this specification, two se curity considerations should be taken into account:</t>
<ul> <ul>
<li>The Web Linking model always has an "implicit context", <li>The Web Linking model always has an "implicit context",
which is the resource of the HTTP interaction. This original context can be lost which is the resource of the HTTP interaction. This original context can be lost
or can change when self-contained link representations are moved. Changing the or can change when self-contained link representations are moved. Changing the
context can change the interpretation of links when they have no explicit anchor context can change the interpretation of links when they have no explicit anchor
, or when they use relative URIs. Applications may choose to ignore links that h or when they use relative URIs. Applications may choose to ignore links that ha
ave no explicit anchor or that use relative URIs when these are exchanged in sta ve no explicit anchor or that use relative URIs when these are exchanged in stan
nd-alone resources.</li> dalone resources.</li>
<li>The model introduced in this specification supports "3rd <li>The model introduced in this specification supports "thi
party links", where one party can provide links that have another party's resou rd-party links", where one party can provide links that have another party's res
rce as an anchor. Depending on the link semantics and the application context, i ource as an anchor. Depending on the link semantics and the application context,
t is important to verify that there is sufficient trust in that 3rd party to all it is important to verify that there is sufficient trust in that third party to
ow it to provide these links. Applications may choose to treat 3rd party links d allow it to provide these links. Applications may choose to treat third-party l
ifferently than cases where a resource and the links for that resource are provi inks differently than cases where a resource and the links for that resource are
ded by the same party.</li> provided by the same party.</li>
</ul> </ul>
</section> </section>
</middle> </middle>
<back> <back>
<references title="Normative References"> <references>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/r <name>References</name>
eference.RFC.2119.xml"/> <references>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/r <name>Normative References</name>
eference.RFC.3986.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/r xml"/>
eference.RFC.5234.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3986.
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/r xml"/>
eference.RFC.5646.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5234.
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml4/ xml"/>
reference.W3C.REC-json-ld-20140116.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5646.
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/r xml"/>
eference.RFC.6838.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/r <reference anchor="W3C.REC-json-ld" target="https://www.w3.org/TR/json-ld/">
eference.RFC.8174.xml"/> <front>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/r <title>JSON-LD 1.1: A JSON-based Serialization for Linked Data</title>
eference.RFC.8187.xml"/> <author initials="M." surname="Sporny" fullname="Manu Sporny" role="editor">
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/r <organization/>
eference.RFC.8259.xml"/> </author>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/r <author initials="G." surname="Kellogg" fullname="Gregg Kellogg" role="editor">
eference.RFC.8288.xml"/> <organization/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/ </author>
reference.I-D.ietf-httpbis-semantics.xml"/> <author initials="M." surname="Lanthaler" fullname="Markus Lanthaler" role="edit
<!-- or">
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/ <organization/>
reference.I-D.nottingham-link-hint.xml"/> </author>
<!-- <date month="July" year="2020"/>
<reference anchor="W3C.REC-html401-19991224"> </front>
<front> <refcontent>W3C Recommendation REC-json-ld-20140116</refcontent>
<title abbrev="Media Queries">Media Queries</title> </reference>
<author initials="F." surname="Rivoal" fullname="Florian Riv
oal"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6838.
<date month="June" year="2012"/> xml"/>
</front> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.
<seriesInfo name="World Wide Web Consortium" value="Recommendati xml"/>
on REC-css3-mediaqueries-20120619"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8187.
</reference> xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8259.
xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8288.
xml"/>
<!-- draft-ietf-httpbis-semantics (RFC 9110, pub. 6 June 2022) -->
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9110.
xml"/>
</references> </references>
<references title="Informative References"> <references>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml4/re <name>Informative References</name>
ference.W3C.REC-rdf11-concepts-20140225.xml"/> <reference anchor="W3C.REC-rdf11-concepts" target="https://www.w3.org/TR/rdf11-c
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/ref oncepts/">
erence.RFC.5988.xml"/> <front>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refe <title>RDF 1.1 Concepts and Abstract Syntax</title>
rence.RFC.6690.xml"/> <author initials="R." surname="Cyganiak" fullname="Richard Cyganiak" role="edito
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refe r">
rence.RFC.6906.xml"/> <organization/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refe </author>
rence.RFC.7284.xml"/> <author initials="D." surname="Wood" fullname="David Wood" role="editor">
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refe <organization/>
rence.RFC.7942.xml"/> </author>
<reference anchor="DCMI-TERMS" target="https://www.dublincore.org/speci <author initials="M." surname="Lanthaler" fullname="Markus Lanthaler" role="edit
fications/dublin-core/dcmi-terms/"> or">
<organization/>
</author>
<date month="February" year="2014"/>
</front>
<refcontent>W3C Consortium Recommendation REC-rdf11-concepts</refcontent>
</reference>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5988.
xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6690.
xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6906.
xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7284.
xml"/>
<reference anchor="DCMI-TERMS" target="https://www.dublincore.org/specifications
/dublin-core/dcmi-terms/">
<front> <front>
<title abbrev="DCMI Terms">DCMI Metadata Terms</title> <title abbrev="DCMI Terms">DCMI Metadata Terms</title>
<author fullname="Dublin Core Metadata Initiative" /> <author>
<date year="2020"/> <organization>Dublin Core Metadata Initiative</organization>
</author>
<date month="January" year="2020"/>
</front> </front>
</reference> </reference>
</references> </references>
</references>
<section title="JSON-LD Context" anchor="appendix-1"> <section anchor="appendix-1" numbered="true" toc="default">
<name>JSON-LD Context</name>
<t>A set of links rendered according to the <t>A set of links rendered according to the
JSON serialization defined in <xref target="linkset-json"/> can b e interpreted JSON serialization defined in <xref target="linkset-json"/> can b e interpreted
as RDF triples by adding a <xref target="W3C.REC-json-ld-2014011 as RDF triples by adding a <xref target="W3C.REC-json-ld">JSON-L
6">JSON-LD context</xref> that maps D context</xref> that maps
the JSON keys to corresponding Linked Data terms. And, as per <x the JSON keys to corresponding Linked Data terms. And, as per
ref target="W3C.REC-json-ld-20140116"/> <xref target="W3C.REC-json-ld" section="6.1" relative="#interpre
<eref target="https://www.w3.org/TR/2014/REC-json-ld-20140116/#i ting-json-as-json-ld"/>,
nterpreting-json-as-json-ld">section 6.8</eref>,
when delivering a link set that is rendered according to the "ap plication/linkset+json" media type to a user agent, when delivering a link set that is rendered according to the "ap plication/linkset+json" media type to a user agent,
a server can convey the availability of such a JSON-LD context b y using a link with the relation type a server can convey the availability of such a JSON-LD context b y using a link with the relation type
"http://www.w3.org/ns/json-ld#context" in the HTTP "Link" header .</t> "<eref target="http://www.w3.org/ns/json-ld#context" brackets="n one"/>" in the HTTP "Link" header field.</t>
<t><xref target="contextlinkrel"/> shows the response to an HTTP GE T against the URI of a link set resource and <t><xref target="contextlinkrel"/> shows the response to an HTTP GE T against the URI of a link set resource and
illustrates this approach to support discovery of a JSON-LD Con illustrates this approach to support the discovery of a JSON-LD
text. The example is inspired by the GS1 implementation and context. This example is inspired by the GS1 implementation and
shows a link set that uses relation types from the GS1 vocabula shows a link set that uses relation types from the GS1 vocabula
ry at &lt;https://www.gs1.org/voc/&gt; ry at <eref target="https://www.gs1.org/voc/" brackets="angle"/>
that are expressed as HTTP URIs.</t> that are expressed as HTTP URIs.</t>
<figure title="Using a typed link to support discovery of a JSON-LD <figure anchor="contextlinkrel">
Context for a Set of Links" anchor="contextlinkrel"> <name>Using a typed link to support the discovery of a JSON-LD
<artwork type="http-message"><![CDATA[ context for a linkset</name>
<artwork type=""><![CDATA[
HTTP/1.1 200 OK HTTP/1.1 200 OK
Date: Mon, 11 Oct 2021 10:48:22 GMT Date: Mon, 11 Oct 2021 10:48:22 GMT
Server: Apache-Coyote/1.1 Server: Apache-Coyote/1.1
Content-Type: application/linkset+json Content-Type: application/linkset+json
Link: <https://example.org/contexts/linkset.jsonld> Link: <https://example.org/contexts/linkset.jsonld>
; rel="http://www.w3.org/ns/json-ld#context" ; rel="http://www.w3.org/ns/json-ld#context"
; type="application/ld+json" ; type="application/ld+json"
Content-Length: 1532 Content-Length: 1532
{ {
skipping to change at line 1119 skipping to change at line 1143
}, },
{ {
"value": "Voyez-le en action!", "value": "Voyez-le en action!",
"language": "fr" "language": "fr"
} }
] ]
} }
] ]
} }
] ]
} }]]>
]]>
</artwork> </artwork>
</figure> </figure>
<t>In order to obtain the JSON-LD Context conveyed by the server, th <t>In order to obtain the JSON-LD context conveyed by the server, th
e user agent issues an HTTP GET against the e user agent issues an HTTP GET against the
link target of the link with the "http://www.w3.org/ns/json-ld#c link target of the link with the "<eref target="http://www.w3.or
ontext" relation type. The response to this GET is g/ns/json-ld#context" brackets="none"/>" relation type. The response to this GET
is
shown in <xref target="jsonld-context"/>. This particular JSON-L D context maps "application/linkset+json" representations of link sets shown in <xref target="jsonld-context"/>. This particular JSON-L D context maps "application/linkset+json" representations of link sets
to Dublin Core Terms <xref target="DCMI-TERMS"/>. Note that the to Dublin Core terms <xref target="DCMI-TERMS"/>. Note that the
"linkset" entry in the JSON-LD context is "linkset" entry in the JSON-LD context is
introduced to support links with the <tt>"linkset"</tt> relation introduced to support links with the "linkset" relation type in
type in link sets.</t> link sets.</t>
<figure title="JSON-LD Context mapping to Dublin Core Terms" anchor= <figure anchor="jsonld-context">
"jsonld-context"> <name>JSON-LD context mapping to Dublin Core terms</name>
<artwork type="http-message"><![CDATA[ <sourcecode type="http-message"><![CDATA[
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/ld+json Content-Type: application/ld+json
Content-Length: 658 Content-Length: 658
{ {
"@context": [ "@context": [
{ {
"@version": 1.1, "@version": 1.1,
"@vocab": "https://gs1.org/voc/", "@vocab": "https://gs1.org/voc/",
"anchor": "@id", "anchor": "@id",
skipping to change at line 1168 skipping to change at line 1192
}, },
{ {
"language": "@language", "language": "@language",
"value": "@value", "value": "@value",
"hreflang": { "hreflang": {
"@id": "http://purl.org/dc/terms/language", "@id": "http://purl.org/dc/terms/language",
"@container": "@set" "@container": "@set"
} }
} }
] ]
} }]]>
]]> </sourcecode>
</artwork>
</figure> </figure>
<t>Applying the JSON-LD context of <xref target="jsonld-context"/> t o the link set of <xref target="contextlinkrel"/> <t>Applying the JSON-LD context of <xref target="jsonld-context"/> t o the link set of <xref target="contextlinkrel"/>
allows transforming the "application/linkset+json" link set to a n RDF link set. <xref target="triples"/> shows allows transforming the "application/linkset+json" link set to a n RDF link set. <xref target="triples"/> shows
the latter represented by means of the "text/turtle" RDF seriali zation.</t> the latter represented by means of the "text/turtle" RDF seriali zation.</t>
<figure title="RDF serialization of the link set resulting from applying <figure anchor="triples">
the JSON-LD context" anchor="triples"> <name>RDF serialization of the linkset resulting from applying
the JSON-LD context</name>
<artwork><![CDATA[ <artwork><![CDATA[
<https://example.com/en/defaultPage> <https://example.com/en/defaultPage>
<http://purl.org/dc/terms/format> <http://purl.org/dc/terms/format>
"text/html" . "text/html" .
<https://example.com/en/defaultPage> <https://example.com/en/defaultPage>
<http://purl.org/dc/terms/language> <http://purl.org/dc/terms/language>
"en" . "en" .
<https://example.com/en/defaultPage> <https://example.com/en/defaultPage>
<http://purl.org/dc/terms/title> <http://purl.org/dc/terms/title>
"Product information" . "Product information" .
skipping to change at line 1241 skipping to change at line 1265
<http://purl.org/dc/terms/language> <http://purl.org/dc/terms/language>
"en" . "en" .
<https://video.example> <https://video.example>
<http://purl.org/dc/terms/language> <http://purl.org/dc/terms/language>
"fr" . "fr" .
<https://video.example> <https://video.example>
<http://purl.org/dc/terms/title> <http://purl.org/dc/terms/title>
"See it in action!"@en . "See it in action!"@en .
<https://video.example> <https://video.example>
<http://purl.org/dc/terms/title> <http://purl.org/dc/terms/title>
"Voyez-le en action!"@fr . "Voyez-le en action!"@fr . ]]>
]]>
</artwork> </artwork>
</figure> </figure>
</section>
</section> <section numbered="false" toc="default">
<section title="Implementation Status" anchor="implementation-status" re <name>Acknowledgements</name>
moveInRFC="true"> <t>Thanks for comments and suggestions provided by <contact fullname="
<t>This section records the status of known implementations of the p Phil Archer"/>, <contact fullname="Dominique Guinard"/>, <contact fullname="Mark
rotocol defined by this specification at the time of posting of this Internet-Dr Nottingham"/>, <contact fullname="Julian Reschke"/>, <contact fullname="Rob San
aft, and is based on a proposal described in RFC 7942 <xref target="RFC7942"/>. derson"/>, <contact fullname="Stian Soiland-Reyes"/>, <contact fullname="Sarven
The description of implementations in this section is intended to assist the IET Capadisli"/>, and <contact fullname="Addison Phillips"/>.</t>
F in its decision processes in progressing drafts to RFCs. Please note that the
listing of any individual implementation here does not imply endorsement by the
IETF. Furthermore, no effort has been spent to verify the information presented
here that was supplied by IETF contributors. This is not intended as, and must n
ot be construed to be, a catalog of available implementations or their features.
Readers are advised to note that other implementations may exist.</t>
<t>According to RFC 7942, "this will allow reviewers and working gro
ups to assign due consideration to documents that have the benefit of running co
de, which may serve as evidence of valuable experimentation and feedback that ha
ve made the implemented protocols more mature. It is up to the individual workin
g groups to use this information as they see fit".</t>
<section title="GS1" anchor="implementation-GS1">
<t>GS1 is a provider of identifiers, most famously seen in EAN/U
PC barcodes for retail and healthcare products, and manages an ecology of servic
es and standards to leverage them at a global scale.
GS1 has indicated that it will fully implement this "linkset
" specification as a means to allow requesting and representing links pertaining
to products, shipments, assets and locations.
The current GS1 Digital Link specification makes an informat
ive reference to version 03 of the "linkset" I-D,
mentions the formal adoption of that I-D by the IETF HTTPAPI Work
ing Group,
and indicates it being on track to achieve RFC status.
The GS1 Digital Link specification adopts the JSON format
specified by the I-D
and mentions future plans to also support the Link header
format as well as their respective media types,
neither of which have changed since version 03.</t>
</section>
<section title="FAIR Signposting Profile" anchor="implementation-sig
nposting">
<t>The FAIR Signposting Profile is a community specification aim
ed at improving machine navigation
of scholarly objects on the web through the use of typed web
links pointing at e.g.
web resources that are part of a specific object, persistent
identifiers for the object and its authors,
license information pertaining to the object. The specificat
ion encourages the use of Linksets and
initial implementations are ongoing, for example, for the op
en source Dataverse data repository platform
that was initiated by Harvard University and is meanwhile us
ed by research institutions, worldwide.</t>
</section>
<section title="Open Journal Systems (OJS)" anchor="implementation-o
js">
<t>Open Journal Systems (OJS) is an open-source software for the
management of peer-reviewed academic journals, and is created by the Public Kno
wledge Project (PKP), released under the GNU General Public License. Open Journa
l Systems (OJS) is a journal management and publishing system that has been deve
loped by PKP through its federally funded efforts to expand and improve access t
o research.</t>
<t>The OJS platform has implemented "linkset" support as an alte
rnative way to provide links when there are more than a configured limit (they c
onsider using about 10 as a good default, for testing purpose it is currently se
t to 8).</t>
</section>
</section>
<section title="Acknowledgements" numbered="false">
<t>Thanks for comments and suggestions provided by Phil Archer, Domini
que Guinard, Mark Nottingham, Julian Reschke, Rob Sanderson, Stian Soiland-Reyes
, Sarven Capadisli, and Addison Phillips.</t>
</section> </section>
</back> </back>
</rfc> </rfc>
 End of changes. 176 change blocks. 
767 lines changed or deleted 683 lines changed or added

This html diff was produced by rfcdiff 1.48.