[要約] RFC 9264は、リンクセットを独立したドキュメントとして表現するための2つのフォーマットと関連するメディアタイプを定義しています。また、リンクセットの発見をサポートするためのリンク関係タイプも導入しています。

Internet Engineering Task Force (IETF)                          E. Wilde
Request for Comments: 9264                                         Axway
Category: Standards Track                               H. Van de Sompel
ISSN: 2070-1721                    Data Archiving and Networked Services
                                                               July 2022
        

Linkset: Media Types and a Link Relation Type for Link Sets

リンクセット:メディアタイプとリンクセットのリンク関係タイプ

Abstract

概要

This specification defines two formats and associated media types for representing sets of links as standalone documents. One format is based on JSON, 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.

この仕様では、リンクのセットをスタンドアロンドキュメントとして表現するための2つの形式と関連するメディアタイプを定義します。1つの形式はJSONに基づいており、もう1つはHTTP「リンク」ヘッダーフィールドでリンクを表すための形式と一致しています。この仕様では、リンクのセットの発見をサポートするリンク関係タイプも導入されています。

Status of This Memo

本文書の位置付け

This is an Internet Standards Track document.

これは、インターネット標準トラックドキュメントです。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.

このドキュメントは、インターネットエンジニアリングタスクフォース(IETF)の製品です。IETFコミュニティのコンセンサスを表しています。公開レビューを受けており、インターネットエンジニアリングステアリンググループ(IESG)からの出版が承認されています。インターネット標準の詳細については、RFC 7841のセクション2で入手できます。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc9264.

このドキュメントの現在のステータス、任意のERRATA、およびそのフィードバックを提供する方法に関する情報は、https://www.rfc-editor.org/info/rfc9264で取得できます。

Copyright Notice

著作権表示

Copyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.

著作権(c)2022 IETF Trustおよび文書著者として特定された人。全著作権所有。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.

このドキュメントは、BCP 78およびIETFドキュメント(https://trustee.ietf.org/license-info)に関連するIETF Trustの法的規定の対象となります。この文書に関するあなたの権利と制限を説明するので、これらの文書を注意深く確認してください。このドキュメントから抽出されたコードコンポーネントには、セクション4.Eで説明されている法的規定のセクション4.Eで説明されており、修正されたBSDライセンスで説明されているように保証なしで提供される修正されたBSDライセンステキストを含める必要があります。

Table of Contents

目次

   1.  Introduction
   2.  Terminology
   3.  Use Cases and Motivation
     3.1.  Third-Party Links
     3.2.  Challenges Writing to the HTTP "Link" Header Field
     3.3.  Large Number of Links
   4.  Document Formats for Sets of Links
     4.1.  HTTP Link Document Format: application/linkset
     4.2.  JSON Document Format: application/linkset+json
       4.2.1.  Set of Links
       4.2.2.  Link Context Object
       4.2.3.  Link Target Object
       4.2.4.  Link Target Attributes
       4.2.5.  JSON Extensibility
   5.  The "profile" Parameter for Media Types to Represent Sets of
           Links
   6.  The "linkset" Relation Type for Linking to a Set of Links
   7.  Examples
     7.1.  Set of Links Provided as "application/linkset"
     7.2.  Set of Links Provided as "application/linkset+json"
     7.3.  Discovering a Link Set via the "linkset" Link Relation Type
     7.4.  Link Set Profiles
       7.4.1.  Using a "profile" Attribute with a "linkset" Link
       7.4.2.  Using a "profile" Parameter with a Link Set Media Type
       7.4.3.  Using a Link with a "profile" Link Relation Type
   8.  IANA Considerations
     8.1.  Link Relation Type: linkset
     8.2.  Media Type: application/linkset
     8.3.  Media Type: application/linkset+json
   9.  Security Considerations
   10. References
     10.1.  Normative References
     10.2.  Informative References
   Appendix A.  JSON-LD Context
   Acknowledgements
   Authors' Addresses
        
1. Introduction
1. はじめに

Resources on the Web often use typed Web Links [RFC8288], either (1) embedded in resource representations -- for example, using the <link> element for HTML documents or (2) conveyed in the HTTP "Link" header field for documents of any media type. In some cases, however, providing links in this manner is impractical or impossible, and delivering a set of links as a standalone document is preferable.

Web上のリソースは、多くの場合、型付けされたWebリンク[RFC8288]を使用します。任意のメディアタイプの。ただし、場合によっては、この方法でリンクを提供することは非現実的または不可能であり、スタンドアロンドキュメントとして一連のリンクを配信することが望ましいです。

Therefore, this specification defines two formats for representing sets of Web Links and their attributes as standalone documents. One serializes links in the same format as the format used in the HTTP "Link" header field, and the other serializes links in JSON. It also defines associated media types to represent sets of links, and the "linkset" relation type to support the discovery of any resource that conveys a set of links as a standalone document.

したがって、この仕様では、Webリンクのセットとその属性をスタンドアロンドキュメントとして表すための2つの形式を定義します。1つは、HTTP「リンク」ヘッダーフィールドで使用されている形式と同じ形式でリンクをシリアル化し、もう1つはJSONのリンクをシリアル化します。また、関連するメディアタイプを定義して、リンクのセットを表し、「リンクセット」関係タイプを定義して、リンクのセットをスタンドアロンドキュメントとして伝えるリソースの発見をサポートします。

2. Terminology
2. 用語

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

この文書のキーワード "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", および "OPTIONAL" はBCP 14 [RFC2119] [RFC8174]で説明されているように、すべて大文字の場合にのみ解釈されます。

This specification uses the terms "link context" and "link target" in the same manner that "Web Linking" [RFC8288] uses them.

この仕様は、「Webリンク」[RFC8288]がそれらを使用するのと同じ方法で、「リンクコンテキスト」と「リンクターゲット」という用語を使用します。

In the examples provided in this document, links in the HTTP "Link" header field are shown on separate lines in order to improve readability. Note, however, that as per Section 5.5 of "HTTP Semantics" [RFC9110], line breaks are deprecated in values for HTTP fields; only whitespaces and tabs are supported as separators.

このドキュメントで提供されている例では、読みやすさを向上させるために、HTTP「リンク」ヘッダーフィールドのリンクが別々の行に表示されます。ただし、「HTTPセマンティクス」[RFC9110]のセクション5.5によると、HTTPフィールドの値ではラインブレークが非推奨されることに注意してください。セパレーターとしてサポートされている白人とタブのみがサポートされています。

3. Use Cases and Motivation
3. ユースケースとモチベーション

The following sections describe use cases in which providing links 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.

次のセクションでは、HTTPの「リンク」ヘッダーフィールドではなく、スタンドアロンドキュメントを使用してリンクを提供するユースケースについて、またはリソース表現に埋め込まれたリンクが有利または必要であるためです。

For all scenarios, links could be provided by means of a standalone document that is formatted according to the JSON-based serialization, the serialization aligned with the HTTP "Link" field format, or both. The former serialization is motivated by the widespread use of JSON and related tools, which suggests that handling sets of links expressed as JSON documents should be attractive to developers. The latter serialization is provided for compatibility with the existing serialization used in the HTTP "Link" field and to allow the reuse of tools created to handle it.

すべてのシナリオについて、JSONベースのシリアル化に従ってフォーマットされたスタンドアロンドキュメント、HTTP「リンク」フィールド形式、またはその両方に合わせたシリアル化によってリンクを提供できます。以前のシリアル化は、JSONと関連するツールの広範な使用によって動機付けられています。これは、JSONドキュメントとして表されるリンクの処理セットが開発者にとって魅力的であるべきであることを示唆しています。後者のシリアル化は、HTTP「リンク」フィールドで使用される既存のシリアル化と互換性があり、それを処理するために作成されたツールの再利用を可能にするために提供されます。

It is important to keep in mind that when providing links by means 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.

スタンドアロン表現によってリンクを提供する場合、他のアプローチを使用して他のリンクを提供できること、つまり、リンクを伝えるためにさまざまなメカニズムを組み合わせることができることに留意することが重要です。

3.1. サードパーティリンク

In some cases, it is useful that links pertaining to a resource are provided by a server other than the one that hosts the resource. For example, this allows:

場合によっては、リソースに関連するリンクがリソースをホストするサーバー以外のサーバーによって提供されることが有用です。たとえば、これにより:

* Providing links in which the resource is involved not just as a link context but also as a link target, with a different resource being the link context.

* リソースがリンクコンテキストとしてだけでなく、リンクターゲットとしても関係するリンクを提供し、異なるリソースがリンクコンテキストです。

* Providing links pertaining to the resource that the server hosting that resource is not aware of.

* そのリソースをホストするサーバーが認識していないリソースに関連するリンクを提供します。

* External management of links pertaining to the resource in a special-purpose link management service.

* 特別な目的のリンク管理サービスのリソースに関連するリンクの外部管理。

In such cases, links pertaining to a resource can be provided by another, specific resource. 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 manner, it would be beneficial if the following conditions were met:

そのような場合、リソースに関連するリンクは、別の特定のリソースによって提供できます。その特定のリソースは、リンクが関係するリソースとして、同じカストディアンまたは別のカストディアンによって管理される場合があります。そのように提供されるリンクを消費することを意図しているクライアントの場合、次の条件が満たされた場合、それは有益です。

* Links are provided in a document that uses a well-defined media type.

* リンクは、明確に定義されたメディアタイプを使用するドキュメントで提供されています。

* 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.

* 提供されたリンクが関係するリソースは、よく知られているリンク関係タイプを使用してこれらのリンクを提供するリソースにリンクできます。

These requirements are addressed in this specification through the definition of two media types and a link relation type, respectively.

これらの要件は、2つのメディアタイプとリンク関係タイプの定義を通じて、この仕様でそれぞれ対処されています。

3.2. HTTP「リンク」ヘッダーフィールドへの書き込みに挑戦

In some cases, it is not straightforward to write links to the HTTP "Link" header field from an application. This can, for example, be the case because not all required link information is available to the application or because the application does not have the capability to directly write HTTP fields. In such cases, providing links by means of a standalone document can be a solution. Making the resource that provides these links discoverable can be achieved by means of a typed link.

場合によっては、アプリケーションからHTTP「リンク」ヘッダーフィールドへのリンクを作成するのは簡単ではありません。たとえば、これは、必要なすべてのリンク情報がアプリケーションで利用できるわけではないため、またはアプリケーションにHTTPフィールドを直接書き込む機能がないためです。そのような場合、スタンドアロンドキュメントを使用してリンクを提供することが解決策になります。これらのリンクを提供できるリソースを発見可能にすることは、入力されたリンクによって実現できます。

3.3. 多数のリンク

When conveying links in an HTTP "Link" header field, it is possible for the size of the HTTP response fields to become unpredictable. This can be the case when links are determined dynamically in a manner dependent on a range of contextual factors. It is possible to statically configure 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 unpredictable, estimating a reliable upper bound is challenging.

HTTP「リンク」ヘッダーフィールドでリンクを伝えると、HTTP応答フィールドのサイズが予測不可能になる可能性があります。これは、リンクがさまざまなコンテキスト要因に依存して動的に決定される場合に当てはまります。サイズの上限を指定することにより、大きなHTTP応答フィールドを正しく処理するようにWebサーバーを静的に構成することができます。しかし、リンクの数が予測不可能な場合、信頼できる上限を推定することは困難です。

Section 15 of "HTTP Semantics" [RFC9110] defines error codes related to excess communication by the user agent ("413 Content Too Large" and "414 URI Too Long"), but no specific error codes are defined to indicate that response field content exceeds the upper bound that can be handled by the server and thus has been truncated. As a result, applications take countermeasures aimed at controlling the size of the HTTP "Link" header field -- for example, by limiting the links they provide to those with select relation types, thereby limiting the value of the HTTP "Link" header field to clients. Providing links by means of a standalone document overcomes challenges related to the unpredictable (to the web server implementation) nature of the size of HTTP "Link" header fields.

「HTTPセマンティクス」[RFC9110]のセクション15は、ユーザーエージェントによる過剰な通信に関連するエラーコード(「413コンテンツが大きすぎる」および「414 URIが長すぎる」)を定義しますが、応答フィールドコンテンツを示す特定のエラーコードは定義されていません。サーバーによって処理できる上限を超えて、したがって切り捨てられています。その結果、アプリケーションは、HTTP「リンク」ヘッダーフィールドのサイズを制御することを目的とした対策を講じます。たとえば、選択した関係タイプを持つリンクにリンクを制限し、HTTP「リンク」ヘッダーフィールドの値を制限することにより、クライアントに。スタンドアロン文書を使用してリンクを提供すると、HTTP「リンク」ヘッダーフィールドのサイズの予測不可能な(Webサーバーの実装)性質に関連する課題を克服します。

4. リンクのセットのドキュメント形式

This section specifies two document formats to convey a set of links. Both are based on the abstract model specified in Section 2 of "Web Linking" [RFC8288], which defines a link as consisting of a "link context", a "link relation type", a "link target", and optional "target attributes":

このセクションでは、リンクのセットを伝えるための2つのドキュメント形式を指定します。どちらも「Webリンク」[RFC8288]のセクション2で指定された抽象モデルに基づいています。これは、「リンクコンテキスト」、「リンク関係タイプ」、「リンクターゲット」、およびオプションの「ターゲット」で構成されるリンクを定義します。属性」:

* The format defined in Section 4.1 is nearly identical to the field value of the HTTP "Link" header field as specified in Section 3 of [RFC8288].

* セクション4.1で定義されている形式は、[RFC8288]のセクション3で指定されているように、HTTP「リンク」ヘッダーフィールドのフィールド値とほぼ同じです。

* The format defined in Section 4.2 is expressed in JSON [RFC8259].

* セクション4.2で定義されている形式は、JSON [RFC8259]で表されます。

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 interpret them. 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 them self-contained by adhering to the following recommendations.

HTTP「リンク」ヘッダーフィールドで提供されるリンクは、HTTP相互作用のコンテキストで使用することを目的としており、インタラクション中に利用可能なコンテキスト情報は、それらを正しく解釈するために使用されます。ただし、リンクセットで提供されるリンクは、そのようなコンテキスト情報が利用できない場合、HTTP相互作用の外で再利用できます。その結果、リンクセットの実装者は、以下の推奨事項を順守することにより、それらを自己完結させるよう努力する必要があります。

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 correct interpretation. In order to support use cases where link set documents are reused outside the context of an HTTP interaction, it is RECOMMENDED to make them self-contained by adhering to the following guidelines:

HTTP「リンク」ヘッダーフィールドにアンカーがない、または相対参照を使用するリンクの場合、リンクを配信するリソースのURIは、正しい解釈に必要なコンテキスト情報を提供します。リンクセットドキュメントがHTTP相互作用のコンテキストの外で再利用されるユースケースをサポートするために、次のガイドラインを順守することで自己完結させることをお勧めします。

* For every link provided in the set of links, explicitly provide the link context using the "anchor" attribute.

* リンクのセットで提供されるすべてのリンクについて、「アンカー」属性を使用してリンクコンテキストを明示的に提供します。

* For the link context ("anchor" attribute) and link target ("href" attribute), use URI references that are not relative references (as defined in Section 4.1 of [RFC3986]).

* リンクコンテキスト(「アンカー」属性)とリンクターゲット(「HREF」属性)の場合、相対参照ではないURI参照を使用します([RFC3986]のセクション4.1で定義)。

If these recommendations are not followed, the interpretation of links in link set documents will depend on which URI is used as the context.

これらの推奨事項に従わない場合、リンクセットドキュメントのリンクの解釈は、どのURIがコンテキストとして使用されるかによって異なります。

For a "title" attribute provided on a link in the HTTP "Link" header field, the language in which the title is expressed is provided by the "Content-Language" header field of the HTTP interaction with the resource that delivers the links. 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 support determining title languages when a link set is used outside of an HTTP interaction. In order to support use cases where link set documents are reused outside the context of an HTTP interaction, it is RECOMMENDED to make them self-contained by using the "title*" attribute instead of the "title" attribute because "title*" allows expressing the title language as part of its value by means of a language tag. Note that, in this regard, language tags are matched case insensitively (see Section 2.1.1 of [RFC5646]). If this recommendation is not followed, accurately determining the language of titles provided on links in link set documents will not be possible.

HTTP「リンク」ヘッダーフィールドのリンクで提供される「タイトル」属性の場合、タイトルが表現される言語は、HTTPの「コンテンツ言語」ヘッダーフィールドとリンクを提供するリソースとの相互作用によって提供されます。これは、リンクセットドキュメントのリンクに提供される「タイトル」属性には適用されません。これにより、リンクセットのすべてのリンクが単一のタイトル言語を持つことに制限され、HTTPインタラクション以外でリンクセットが使用される場合にタイトル言語の決定をサポートしないためです。 。リンクセットドキュメントがHTTPインタラクションのコンテキストの外で再利用されるユースケースをサポートするために、「title*」属性の代わりに「title*」属性の代わりに「title*」属性を使用して自己完結することをお勧めします。言語タグを使用して、その価値の一部としてタイトル言語を表現します。この点で、言語タグはケースに慎重に一致していることに注意してください([RFC5646]のセクション2.1.1を参照)。この推奨事項に従わない場合、リンクセットドキュメントのリンクで提供されるタイトルの言語を正確に決定することは不可能です。

Note also that Section 3.3 of [RFC8288] deprecates the "rev" construct that was provided by [RFC5988] as a means to express links with a directionality that is the inverse of direct links that use the "rel" construct. In both serializations for link sets defined here, inverse links may be represented as direct links using the "rel" construct and by switching the roles of the resources involved in the link.

また、[RFC8288]のセクション3.3は、「REL」コンストラクトを使用する直接リンクの逆である方向性とリンクを表現する手段として[RFC5988]によって提供された「REV」構造を非難していることに注意してください。ここで定義されているリンクセットのシリアル化の両方で、逆リンクは、「Rel」構成を使用した直接リンクとして表され、リンクに含まれるリソースの役割を切り替えることによって表される場合があります。

4.1. HTTPリンクドキュメント形式:アプリケーション/リンクセット

This document format is nearly identical to the field value of the HTTP "Link" header field as defined in Section 3 of [RFC8288], more specifically by its ABNF [RFC5234] production rule for "Link" and its subsequent rules. It differs from the format for field values of the HTTP "Link" header field only in that not only spaces and horizontal tabs are allowed as separators but also newline characters as a means to improve readability for humans. The use of non-ASCII characters in the field value of the HTTP "Link" header field is not allowed and as such is also not allowed in "application/linkset" link sets.

このドキュメント形式は、[RFC8288]のセクション3で定義されているHTTP「リンク」ヘッダーフィールドのフィールド値とほぼ同一であり、より具体的には「リンク」およびその後のルールのABNF [RFC5234]生産規則によって同一です。HTTP "link"ヘッダーフィールドのフィールド値の形式とは異なります。スペースや水平タブだけでなく、人間の読みやすさを改善する手段としての新しいライン文字も許可されているだけでなく、新しいライン文字も許可されています。HTTP「リンク」ヘッダーフィールドのフィールド値での非ASCII文字の使用は許可されておらず、「アプリケーション/リンクセット」リンクセットでも許可されていません。

The assigned media type for this format is "application/linkset".

この形式に割り当てられたメディアタイプは「アプリケーション/リンクセット」です。

When converting an "application/linkset" document to a field value for the HTTP "Link" header field, newline characters MUST be removed or MUST be replaced by whitespace (SP) in order to comply with Section 5.5 of [RFC9110].

「アプリケーション/リンクセット」ドキュメントをHTTP「リンク」ヘッダーフィールドのフィールド値に変換する場合、[RFC9110]のセクション5.5に準拠するために、newline文字を削除する必要があります。

Implementers of "application/linkset" link sets should strive to make them self-contained by following the recommendations provided in Section 4 regarding their use outside the context of an HTTP interaction.

「アプリケーション/リンクセット」リンクセットの実装者は、HTTP相互作用のコンテキスト以外での使用に関してセクション4で提供された推奨事項に従うことにより、それらを自己完結型にするよう努力する必要があります。

It should be noted that the "application/linkset" format specified here is different from the "application/link-format" format specified in [RFC6690] in that the former fully matches the field value of the HTTP "Link" header field as defined in Section 3 of [RFC8288], whereas the latter introduces constraints on that definition to meet requirements for Constrained RESTful Environments (CoRE).

ここで指定された「アプリケーション/リンクセット」形式は、[RFC6690]で指定された「アプリケーション/リンクフォーマット」形式とは異なることに注意してください。[RFC8288]のセクション3では、後者は制約された安らかな環境の要件を満たすためにその定義に制約を導入します(Core)。

4.2. JSON Document Format: application/linkset+json
4.2. JSONドキュメント形式:Application/Linkset JSON

This document format uses JSON [RFC8259] as the syntax to represent a set of links. The set of links follows the abstract model defined by Section 2 of [RFC8288].

このドキュメント形式は、JSON [RFC8259]を構文として使用して、一連のリンクを表します。リンクのセットは、[RFC8288]のセクション2で定義された抽象モデルに従います。

The assigned media type for this format is "application/ linkset+json".

この形式に割り当てられたメディアタイプは、「アプリケーション/リンクセットJSON」です。

In the interests of interoperability, "application/linkset+json" link sets MUST be encoded using UTF-8 as per Section 8.1 of [RFC8259].

相互運用性の利益のために、[RFC8259]のセクション8.1に従って、UTF-8を使用して「アプリケーション/リンクセットJSON」リンクセットをエンコードする必要があります。

Implementers of "application/linkset+json" link sets should strive to make them self-contained by following the recommendations provided in Section 4 regarding their use outside the context of an HTTP interaction.

「Application/Linkset JSON」リンクセットの実装者は、HTTP相互作用のコンテキスト外での使用に関してセクション4で提供された推奨事項に従って、自己完結型にするよう努めている必要があります。

The "application/linkset+json" serialization allows for OPTIONAL support of a JSON-LD serialization. This can be achieved by adding an appropriate context to the "application/linkset+json" serialization using the approach described in Section 6.1 of [W3C.REC-json-ld]. Communities of practice can decide which context best meets their application needs. Appendix A shows an example of a possible context that, when added to a JSON serialization, allows it to be interpreted as Resource Description Framework (RDF) data [W3C.REC-rdf11-concepts].

「Application/Linkset JSON」シリアル化により、JSON-LDシリアル化のオプションのサポートが可能になります。これは、[w3c.rec-json-ld]のセクション6.1で説明されているアプローチを使用して、「アプリケーション/リンクセットJSON」シリアル化に適切なコンテキストを追加することで実現できます。実践コミュニティは、どのコンテキストがアプリケーションのニーズを最適に満たすかを決定できます。付録Aは、JSONシリアル化に追加されると、リソース説明フレームワーク(RDF)データ[W3C.REC-RDF11 Concepts]として解釈できるようにする可能性のあるコンテキストの例を示しています。

4.2.1. リンクのセット

In the JSON representation of a set of links:

一連のリンクのJSON表現:

* A set of links is represented in JSON as an object that MUST contain "linkset" as its sole member.

* 一連のリンクは、JSONでは、唯一のメンバーとして「リンクセット」を含める必要があるオブジェクトとして表されます。

* The value of the "linkset" member is an array in which a distinct JSON object -- the "link context object" (see Section 4.2.2) -- is used to represent links that have the same link context.

* 「リンクセット」メンバーの値は、個別のJSONオブジェクト(「リンクコンテキストオブジェクト」(セクション4.2.2を参照))が同じリンクコンテキストを持つリンクを表すために使用される配列です。

* Even if there is only one link context object, it MUST be wrapped in an array.

* リンクコンテキストオブジェクトが1つしかない場合でも、配列にラップする必要があります。

4.2.2. リンクコンテキストオブジェクト

In the JSON representation, one or more links that have the same link context are represented by a JSON object -- the link context object. A link context object adheres to the following rules:

JSON表現では、同じリンクコンテキストを持つ1つ以上のリンクがJSONオブジェクト(リンクコンテキストオブジェクト)によって表されます。リンクコンテキストオブジェクトは、次のルールに準拠しています。

* Each link context object MAY contain an "anchor" member with a value that represents the link context. If present, this value MUST be a URI reference and SHOULD NOT be a relative reference as defined in Section 4.1 of [RFC3986].

* 各リンクコンテキストオブジェクトには、リンクコンテキストを表す値を持つ「アンカー」メンバーを含めることができます。存在する場合、この値はURI参照である必要があり、[RFC3986]のセクション4.1で定義されているように、相対的な参照ではないはずです。

* For each distinct relation type that the link context has with link targets, a link context object MUST contain an additional member. The value of this member is an array in which a distinct JSON object -- the "link target object" (see Section 4.2.3) -- MUST be used for each link target for which the relationship with the link context (value of the encompassing "anchor" member) applies. The name of this member expresses the relation type of the link as follows:

* リンクコンテキストがリンクターゲットに搭載している個別の関係タイプごとに、リンクコンテキストオブジェクトには追加のメンバーが含まれている必要があります。このメンバーの値は、個別のJSONオブジェクト(「リンクターゲットオブジェクト」(セクション4.2.3を参照))が、リンクコンテキストとの関係(の値)に使用する必要がある配列です。「アンカー」メンバーを含む)が適用されます。このメンバーの名前は、次のようにリンクの関係タイプを表します。

- For registered relation types (Section 2.1.1 of [RFC8288]), the name of this member is the registered name of the relation type.

- 登録された関係タイプ([RFC8288]のセクション2.1.1)の場合、このメンバーの名前は関係タイプの登録名です。

- For extension relation types (Section 2.1.2 of [RFC8288]), the name of this member is the URI that uniquely represents the relation type.

- 拡張関係タイプ([RFC8288]のセクション2.1.2)の場合、このメンバーの名前は、関係タイプを一意に表すURIです。

* Even if there is only one link target object, it MUST be wrapped in an array.

* リンクターゲットオブジェクトが1つしかない場合でも、配列にラップする必要があります。

4.2.3. ターゲットオブジェクトをリンクします

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:

JSON表現では、リンクターゲットはJSONオブジェクト(リンクターゲットオブジェクト)によって表されます。リンクターゲットオブジェクトは、次のルールに準拠しています。

* Each link target object MUST contain an "href" member with a value that represents the link target. This value MUST be a URI reference and SHOULD NOT be a relative reference as defined in Section 4.1 of [RFC3986]. Cases where the "href" member is present but no value is provided for it (i.e., the resource providing the set of links is the target of the link in the link target object) MUST be handled by providing an "href" member with an empty string as its value ("href": "").

* 各リンクターゲットオブジェクトには、リンクターゲットを表す値を持つ「HREF」メンバーを含める必要があります。この値はURIの参照である必要があり、[RFC3986]のセクション4.1で定義されているように、相対的な参照であるべきではありません。「HREF」メンバーが存在するが、それに対して値が提供されていない場合(つまり、リンクのセットを提供するリンクをリンクターゲットオブジェクトのリンクのターゲットである)は、「HREF」メンバーに「HREF」メンバーに提供することで処理する必要があります。その値としての空の文字列( "href": "")。

* In many cases, a link target is further qualified by target attributes. Various types of attributes exist, and they are conveyed as additional members of the link target object as detailed in Section 4.2.4.

* 多くの場合、リンクターゲットはターゲット属性によってさらに資格があります。さまざまなタイプの属性が存在し、セクション4.2.4で詳述されているように、リンクターゲットオブジェクトの追加メンバーとして伝えられます。

The following example of a JSON-serialized set of links represents one link with its core components: link context, link relation type, and link target.

JSON標準化されたリンクセットの次の例は、コアコンポーネントの1つのリンクを表しています。リンクコンテキスト、リンク関係タイプ、リンクターゲットです。

   { "linkset":
     [
       { "anchor": "https://example.net/bar",
         "next": [
           {"href": "https://example.com/foo"}
         ]
       }
     ]
   }
        

Figure 1: Simple linkset example

図1:単純なリンクセットの例

The following example of a JSON-serialized set of links represents two links that share a link context and relation type but have different link targets.

JSON標準化されたリンクセットの次の例は、リンクのコンテキストと関係タイプを共有するが、リンクターゲットが異なる2つのリンクを表しています。

   { "linkset":
     [
       { "anchor": "https://example.net/bar",
         "item": [
           {"href": "https://example.com/foo1"},
           {"href": "https://example.com/foo2"}
         ]
       }
     ]
   }
        

Figure 2: Linkset with two links with the same context

図2:同じコンテキストで2つのリンクを持つリンクセット

The following example shows a set of links that represents two links, each with a different link context, link target, and relation type. One relation type is registered, and the other is an extension relation type.

次の例は、それぞれ異なるリンクコンテキスト、リンクターゲット、および関係タイプを持つ2つのリンクを表すリンクのセットを示しています。1つの関係タイプが登録され、もう1つは拡張関係タイプです。

   { "linkset":
     [
       { "anchor": "https://example.net/bar",
         "next": [
           {"href": "https://example.com/foo1"}
         ]
       },
       { "anchor": "https://example.net/boo",
         "https://example.com/relations/baz" : [
           {"href": "https://example.com/foo2"}
         ]
       }
     ]
   }
        

Figure 3: Linkset with two links with different contexts

図3:異なるコンテキストを持つ2つのリンクを持つリンクセット

4.2.4. ターゲット属性をリンクします

A link may be further qualified by target attributes as defined by Section 2 of [RFC8288]. Three types of attributes exist:

[RFC8288]のセクション2で定義されているように、リンクはターゲット属性によってさらに資格があります。3種類の属性が存在します。

* Serialization-defined attributes as described in Section 3.4.1 of [RFC8288].

* [RFC8288]のセクション3.4.1で説明されているシリアル化定義属性。

* Extension attributes defined and used by communities as allowed by Section 3.4.2 of [RFC8288].

* [RFC8288]のセクション3.4.2で許可されているように、コミュニティが定義および使用する拡張属性。

* Internationalized versions of the "title" attribute as defined by [RFC8288] and of extension attributes allowed by Section 3.4 of [RFC8288].

* [RFC8288]で定義されている「タイトル」属性と[RFC8288]のセクション3.4で許可されている拡張属性の国際化バージョン。

The handling of these different types of attributes is described in the sections below.

これらのさまざまなタイプの属性の処理については、以下のセクションで説明します。

4.2.4.1. Target Attributes Defined by Web Linking
4.2.4.1. Webリンクで定義されたターゲット属性

Section 3.4.1 of [RFC8288] defines the following target attributes that may be used to annotate links: "hreflang", "media", "title", "title*", and "type"; these target attributes follow different occurrence and value patterns. In the JSON representation, these attributes MUST be conveyed as additional members of the link target object as follows:

[RFC8288]のセクション3.4.1は、リンクの注釈に使用できる次のターゲット属性を定義します:「hreflang」、「メディア」、「タイトル」、「タイトル*」、および「タイプ」。これらのターゲット属性は、異なる発生と値パターンに従います。JSON表現では、これらの属性は、次のようにリンクターゲットオブジェクトの追加メンバーとして伝えなければなりません。

"hreflang": The "hreflang" target attribute, defined as optional and repeatable by [RFC8288], MUST be represented by an "hreflang" member, its value MUST be an array (even if there is only one value to be represented), and each value in that array MUST be a string -- representing one value of the "hreflang" target attribute for a link -- that follows the same model as the syntax discussed in [RFC8288].

「hreflang」:[hreflang "ターゲット属性は、[rfc8288]によってオプションで繰り返し可能であると定義されていますが、「hreflang」メンバーによって表される必要があります。また、その配列内の各値は、[RFC8288]で説明されている構文と同じモデルに従うリンクの「hreflang」ターゲット属性の1つの値を表す文字列でなければなりません。

"media": The "media" target attribute, defined as optional and not repeatable by [RFC8288], MUST be represented by a "media" member in the link target object, and its value MUST be a string that follows the same model as the syntax discussed in [RFC8288].

「メディア」:[RFC8288]によってオプションであり、繰り返しないものとして定義される「メディア」ターゲット属性は、リンクターゲットオブジェクトの「メディア」メンバーによって表現され、その値は同じモデルに従う文字列でなければなりません。[RFC8288]で説明されている構文。

"title": The "title" target attribute, defined as optional and not repeatable by [RFC8288], MUST be represented by a "title" member in the link target object, and its value MUST be a JSON string.

「タイトル」:[RFC8288]によって繰り返されないオプションとして定義された「タイトル」ターゲット属性は、リンクターゲットオブジェクトの「タイトル」メンバーで表現する必要があり、その値はJSON文字列でなければなりません。

"title*": The "title*" target attribute, defined as optional and not repeatable by [RFC8288], is motivated by character encoding and language issues and follows the model defined in [RFC8187]. The details of the JSON representation that applies to "title*" are described in Section 4.2.4.2.

「タイトル*」:「タイトル*」ターゲット属性は、オプションとして定義され、[RFC8288]によって繰り返されないものとして定義され、文字エンコードと言語の問題によって動機付けられ、[RFC8187]で定義されたモデルに従います。「タイトル*」に適用されるJSON表現の詳細は、セクション4.2.4.2で説明されています。

"type": The "type" target attribute, defined as optional and not repeatable by [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 the syntax discussed in [RFC8288].

「タイプ」:オプションとして定義され、[RFC8288]によって繰り返されない「タイプ」ターゲット属性は、リンクターゲットオブジェクトの「タイプ」メンバーで表現する必要があり、その値は同じモデルに従う文字列でなければなりません。[RFC8288]で説明されている構文。

The following example illustrates how the "hreflang" (repeatable) target attribute and the "type" (not repeatable) target attribute are represented in a link target object.

次の例は、「hreflang」(繰り返し可能な)ターゲット属性と「タイプ」(繰り返しない)ターゲット属性がリンクターゲットオブジェクトでどのように表されるかを示しています。

   { "linkset":
     [
       { "anchor": "https://example.net/bar",
         "next": [
           { "href":     "https://example.com/foo",
             "type":     "text/html",
             "hreflang": [ "en" , "de" ]
           }
         ]
       }
     ]
   }
        

Figure 4: Linkset with "hreflang" and "type" target attributes

図4:「hreflang」および「タイプ」ターゲット属性とのリンクセット

4.2.4.2. Internationalized Target Attributes
4.2.4.2. 国際化されたターゲット属性

In addition to the target attributes described in Section 4.2.4.1, Section 3.4 of [RFC8288] also supports attributes that follow the content model of [RFC8187]. In [RFC8288], these target attributes are recognizable by the use of a trailing asterisk in the attribute name, such as "title*". The content model of [RFC8187] uses a string-based microsyntax that represents the character encoding, an optional language tag, and the escaped attribute value encoded according to the specified character encoding.

セクション4.2.4.1で説明されているターゲット属性に加えて、[RFC8288]のセクション3.4は[RFC8187]のコンテンツモデルに従う属性もサポートしています。[rfc8288]では、これらのターゲット属性は、「title*」などの属性名でトレーリングアスタリスクを使用することで認識できます。[RFC8187]のコンテンツモデルは、文字列ベースのマイクロシンダックスを使用します。これは、指定された文字エンコードに従ってエンコードされた文字エンコード、オプションの言語タグ、および脱出された属性値を表します。

The JSON serialization for these target attributes MUST be as follows:

これらのターゲット属性のJSONシリアル化は次のとおりでなければなりません。

* An internationalized target attribute is represented as a member of the link context object with the same name (including the "*") as the attribute.

* 国際化されたターゲット属性は、属性と同じ名前(「*」を含む)を持つリンクコンテキストオブジェクトのメンバーとして表されます。

* The character encoding information as prescribed by [RFC8187] is not preserved; instead, the content of the internationalized attribute is represented as a JSON string.

* [RFC8187]によって規定されている情報をエンコードする文字は保存されていません。代わりに、国際化された属性のコンテンツはJSON文字列として表されます。

* The value of the internationalized target attribute is an array that contains one or more JSON objects. The name of one member of such JSON objects is "value", and its value is the actual content (in its unescaped version) of the internationalized target attribute, i.e., the value of the attribute from which the encoding and language information are removed. The name of another, optional member of such JSON objects is "language", and its value is the language tag [RFC5646] for the language in which the attribute content is conveyed.

* 国際化されたターゲット属性の値は、1つ以上のJSONオブジェクトを含む配列です。このようなJSONオブジェクトの1つのメンバーの名前は「値」であり、その値は、国際化されたターゲット属性の実際のコンテンツ(その非脱型バージョン)、つまりエンコードと言語情報が削除される属性の値です。このようなJSONオブジェクトの別のオプションメンバーの名前は「言語」であり、その値は、属性コンテンツが伝達される言語の言語タグ[RFC5646]です。

The following example illustrates how the "title*" target attribute as defined by Section 3.4.1 of [RFC8288] is represented in a link target object.

次の例は、[RFC8288]のセクション3.4.1で定義されている「タイトル*」ターゲット属性がリンクターゲットオブジェクトでどのように表されるかを示しています。

   { "linkset":
     [
       { "anchor": "https://example.net/bar",
         "next": [
           { "href":     "https://example.com/foo",
             "type":     "text/html",
             "hreflang": [ "en" , "de" ],
             "title":    "Next chapter",
             "title*":   [ { "value": "nächstes Kapitel" ,
                             "language" : "de" } ]
           }
         ]
       }
     ]
   }
        

Figure 5: Linkset with "title" and "title*" target attributes

図5:「タイトル」および「タイトル*」とのリンクセット

The above example assumes that the German title contains an umlaut character (in the original syntax, it would be encoded as title*=UTF-8'de'n%c3%a4chstes%20Kapitel), which gets encoded in its unescaped form in the JSON representation. Implementations MUST properly decode/encode internationalized target attributes that follow the model of [RFC8187] when transcoding between the "application/linkset" format and the "application/linkset+json" format.

上記の例は、ドイツのタイトルにUmlaut文字が含まれていることを前提としています(元の構文では、タイトル*= utf-8'de'n%c3%a4chstes%20kapitelとしてエンコードされます)。JSON代表。実装は、「アプリケーション/リンクセット」形式と「Application/Linkset JSON」形式の間をトランスコードするときに、[RFC8187]のモデルに従う国際化されたターゲット属性を適切にデコード/エンコードする必要があります。

4.2.4.3. Extension Target Attributes
4.2.4.3. 拡張ターゲット属性

Extension target attributes (e.g., as listed in Section 4.2.4.1) are attributes that are not defined by Section 3.4.1 of [RFC8288] but are nevertheless used to qualify links. They can be defined by communities in any way deemed necessary, and it is up to them to make sure their usage is understood by target applications. However, lacking standardization, there is no interoperable understanding of these extension attributes. One important consequence is that their cardinality is unknown to generic applications. Therefore, in the JSON serialization, all extension target attributes are treated as repeatable.

拡張ターゲット属性(例:セクション4.2.4.1にリストされているように)は、[RFC8288]のセクション3.4.1で定義されていないが、それでもリンクの資格に使用される属性です。それらはコミュニティによって必要とみなされる方法で定義することができ、ターゲットアプリケーションによってそれらの使用が理解されることを確認するのは彼ら次第です。ただし、標準化がないため、これらの拡張属性について相互運用可能な理解はありません。重要な結果の1つは、彼らのカーディナリティが一般的なアプリケーションでは知られていないことです。したがって、JSONシリアル化では、すべての拡張ターゲット属性が再現可能として扱われます。

The JSON serialization for these target attributes MUST be as follows:

これらのターゲット属性のJSONシリアル化は次のとおりでなければなりません。

* An extension target attribute is represented as a member of the link target object with the same name as the attribute, including the "*" if applicable.

* 拡張ターゲット属性は、該当する場合は「*」を含む属性と同じ名前を持つリンクターゲットオブジェクトのメンバーとして表されます。

* The value of an extension attribute MUST be represented by an array, even if there is only one value to be represented.

* 拡張属性の値は、表現する値が1つしかない場合でも、配列で表す必要があります。

* If the extension target attribute does not have a name with a trailing asterisk, then each value in that array MUST be a JSON string that represents one value of the attribute.

* 拡張ターゲット属性にトレーリングアスタリスクの名前がない場合、その配列の各値は、属性の1つの値を表すJSON文字列でなければなりません。

* If the extension attribute has a name with a trailing asterisk (it follows the content model of [RFC8187]), then each value in that array MUST be a JSON object. The value of each such JSON object MUST be structured as described in Section 4.2.4.2.

* 拡張属性に、後続のアスタリスクを備えた名前がある場合([RFC8187]のコンテンツモデルに従う)、その配列の各値はJSONオブジェクトでなければなりません。そのような各JSONオブジェクトの値は、セクション4.2.4.2で説明されているように構成する必要があります。

The following example shows a link target object with three 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 [RFC8187] and therefore is encoded according to the serialization described in Section 4.2.4.2.

次の例は、3つの拡張ターゲット属性を持つリンクターゲットオブジェクトを示しています。各拡張ターゲット属性の値は配列です。最初の2つは通常の拡張ターゲット属性であり、最初の1つ( "foo")は1つの値のみ、2番目の値( "bar")が2つを持つ属性があります。最後の拡張ターゲット属性( "baz*")は[RFC8187]の命名ルールに従います。したがって、セクション4.2.4.2で説明されているシリアル化に従ってエンコードされます。

   { "linkset":
     [
       { "anchor": "https://example.net/bar",
         "next": [
           { "href": "https://example.com/foo",
             "type": "text/html",
             "foo":  [ "foovalue" ],
             "bar":  [ "barone", "bartwo" ],
             "baz*": [ { "value": "bazvalue" ,
                         "language" : "en" } ]
           }
         ]
       }
     ]
   }
        

Figure 6: Linkset with extension target attributes

図6:拡張ターゲット属性とのリンクセット

4.2.5. JSON Extensibility
4.2.5. JSONの拡張性

The Web Linking model [RFC8288] provides for the use of extension target attributes as discussed in Section 4.2.4.3. The use of other forms of extensions is NOT RECOMMENDED. Limiting the JSON format in this way allows unambiguous round trips between links provided in the HTTP "Link" header field, sets of links serialized according to the "application/linkset" format, and sets of links serialized according to the "application/linkset+json" format.

Webリンクモデル[RFC8288]は、セクション4.2.4.3で説明したように、拡張ターゲット属性の使用を提供します。他の形式の拡張機能の使用は推奨されません。この方法でJSON形式を制限することで、HTTP「リンク」ヘッダーフィールドで提供されるリンク、「アプリケーション/リンクセット」形式に従ってシリアル化されたリンクのセット、および「Application/Linkset JSON」に従ってシリアル化されたリンクのセット間の明確なラウンドトリップが可能になります。" フォーマット。

Cases may exist in which the use of extensions other than those discussed in Section 4.2.4.3 may be useful -- for example, when a link set publisher needs to include descriptive or technical metadata for internal consumption. If such extensions are used, they MUST NOT change the semantics of the JSON members defined in this specification. Agents that consume JSON linkset documents can safely ignore such extensions.

セクション4.2.4.3で説明されているもの以外の拡張機能の使用が役立つ場合があるケースが存在する可能性があります。たとえば、リンクセットのパブリッシャーに内部消費のために記述的または技術的なメタデータを含める必要がある場合。このような拡張機能が使用されている場合、この仕様で定義されているJSONメンバーのセマンティクスを変更してはなりません。JSON Linksetドキュメントを消費するエージェントは、このような拡張機能を安全に無視できます。

5. リンクのセットを表すメディアタイプの「プロファイル」パラメーター

As a means to convey specific constraints or conventions (as per [RFC6906]) that apply to a link set document, the "profile" parameter MAY be used in conjunction with the media types "application/linkset" and "application/linkset+json" as detailed in Sections 4.1 and 4.2, respectively. For example, the parameter could be used to indicate that a link set uses a specific, limited set of link relation types.

リンクセットドキュメントに適用される特定の制約または規則([RFC6906]に従って)を伝える手段として、「プロファイル」パラメーターは、メディアタイプ「アプリケーション/リンクセット」および「アプリケーション/リンクセットJSON」と組み合わせて使用できます。それぞれセクション4.1と4.2で詳述されています。たとえば、パラメーターを使用して、リンクセットが特定の限られたリンク関連タイプを使用していることを示すことができます。

The value of the "profile" parameter MUST be a non-empty list of space-separated URIs, each of which identifies specific constraints or conventions that apply to the link set document. When providing multiple profile URIs, care should be taken that the corresponding profiles are not conflicting. Profile URIs MAY be registered in the IANA's "Profile URIs" registry in the manner specified by [RFC7284].

「プロファイル」パラメーターの値は、空間分離されたURIの空ではないリストでなければなりません。それぞれが、リンクセットドキュメントに適用される特定の制約または規則を識別します。複数のプロファイルURIを提供する場合、対応するプロファイルが矛盾していないことに注意する必要があります。プロファイルURIは、[RFC7284]で指定された方法で、IANAの「プロファイルURIS」レジストリに登録される場合があります。

The presence of a "profile" parameter in conjunction with the "application/linkset" and "application/linkset+json" media types does not change the semantics of a link set. As such, clients with and without knowledge of profile URIs can use the same representation.

「アプリケーション/リンクセット」および「アプリケーション/リンクセットJSON」メディアタイプと組み合わせた「プロファイル」パラメーターの存在は、リンクセットのセマンティクスを変更しません。そのため、プロファイルの知識がある場合とないクライアントは、URISと同じ表現を使用できます。

Section 7.4.2 shows an example of using the "profile" parameter in conjunction with the "application/linkset+json" media type.

セクション7.4.2は、「アプリケーション/リンクセットJSON」メディアタイプと組み合わせて「プロファイル」パラメーターを使用する例を示しています。

6. 一連のリンクにリンクするための「リンクセット」関係タイプ

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 participates.

「リンクセット」関係タイプを使用したリンクのターゲットは、リンクコンテキストであるリソースが参加するリンクを含む一連のリンクを提供します。

A link with the "linkset" relation type MAY be provided in the header field and/or the body of a resource's representation. It may also be discovered by other means, such as through client-side information.

「リンクセット」関係タイプのリンクは、ヘッダーフィールドおよび/またはリソースの表現の本文で提供される場合があります。また、クライアント側の情報など、他の手段によっても発見される場合があります。

A resource MAY provide more than one link with a "linkset" relation type. 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.

リソースは、「リンクセット」関係タイプを含む複数のリンクを提供する場合があります。複数のそのようなリンクは、異なるメディアタイプを使用して表現された同じリンクセット、または異なるサードパーティサービスによって潜在的に提供されるリンクの異なるセットを参照できます。

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 participate. User agents MUST process each link in the link set independently, including processing of the link context and link target, and MAY ignore links from the link set in which the context of the "linkset" link does not participate.

「リンクセット」リンクのターゲットであるリソースによって提供されるリンクのセットには、「リンクセット」リンクのコンテキストであるリソースが参加しないリンクが含まれる場合があります。ユーザーエージェントは、リンクコンテキストとリンクターゲットの処理など、リンクセットの各リンクを個別に処理する必要があり、「リンクセット」リンクのコンテキストが参加しないリンクセットからのリンクを無視する場合があります。

A user agent that follows a "linkset" link and obtains links for which anchors and targets are expressed as relative references (as per Section 4.1 of [RFC3986]) MUST determine what the context is for these links; it SHOULD ignore links for which it is unable to unambiguously make that determination.

「リンクセット」リンクに従い、アンカーとターゲットが相対参照として表されるリンクを取得するユーザーエージェント([RFC3986]のセクション4.1に従って)は、これらのリンクのコンテキストとは何かを決定する必要があります。それは、その決定を明確に行うことができないリンクを無視する必要があります。

As a means to convey specific constraints or conventions (as per [RFC6906]) that apply to a link set document, the "profile" attribute MAY be used in conjunction with the "linkset" link relation type. For example, the attribute could be used to indicate that a link set uses a specific, limited set of link relation types. The value of the "profile" attribute MUST be a non-empty list of space-separated URIs, each of which identifies specific constraints or conventions that apply to the link set document. Profile URIs MAY be registered in the IANA's "Profile URIs" registry in the manner specified by [RFC7284]. Section 7.4.1 shows an example of using the "profile" attribute on a link with the "linkset" relation type, making both the link set and the profile(s) to which it complies discoverable.

リンクセットドキュメントに適用される特定の制約または規則([RFC6906]による)を伝える手段として、「プロファイル」属性は「リンクセット」リンク関係タイプと組み合わせて使用できます。たとえば、属性を使用して、リンクセットが特定の限られたリンク関係タイプを使用していることを示すことができます。「プロファイル」属性の値は、空間分離されたURIの空ではないリストでなければなりません。それぞれが、リンクセットドキュメントに適用される特定の制約または規則を識別します。プロファイルURIは、[RFC7284]で指定された方法で、IANAの「プロファイルURIS」レジストリに登録される場合があります。セクション7.4.1は、「リンクセット」関係タイプのリンクで「プロファイル」属性を使用している例を示しており、リンクセットとそれが適合するプロファイルの両方を発見可能にします。

7. Examples
7. 例

Sections 7.1 and 7.2 show examples whereby a set of links is provided as "application/linkset" and "application/linkset+json" documents, respectively. Section 7.3 illustrates the use of the "linkset" link relation type to support the discovery of sets of links, and Section 7.4 shows how to convey profile information pertaining to a link set.

セクション7.1および7.2は、リンクのセットがそれぞれ「アプリケーション/リンクセット」および「アプリケーション/リンクセットJSON」ドキュメントとして提供される例を示しています。セクション7.3では、リンクのセットの発見をサポートする「リンクセット」リンク関係タイプの使用を示し、セクション7.4は、リンクセットに関連するプロファイル情報を伝える方法を示しています。

7.1. 「アプリケーション/リンクセット」として提供されるリンクのセット

Figure 7 shows a client issuing an HTTP GET request against resource <https://example.org/links/resource1>.

図7は、クライアントがリソース<https://example.org/links/resource1>に対してHTTP GETリクエストを発行することを示しています。

   GET /links/resource1 HTTP/1.1
   Host: example.org
        

Figure 7: Client HTTP GET request

図7:クライアントhttp get request

Figure 8 shows the response to the GET request of Figure 7. The response contains a "Content-Type" header field specifying that the media type of the response is "application/linkset". A set of links, revealing authorship and versioning related to resource <https://example.org/resource1>, is provided in the 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".

図8は、図7のGETリクエストに対する応答を示しています。応答には、メディアタイプの応答が「アプリケーション/リンクセット」であることを指定する「コンテンツタイプ」ヘッダーフィールドが含まれています。リソース<https://example.org/resource1>に関連する著者とバージョンの明らかなリンクのセットは、応答本体に提供されています。HTTP「リンク」ヘッダーフィールドは、メディアタイプ「アプリケーション/リンクセットJSON」を使用して、リンクのセットの代替表現の可用性を示します。

   HTTP/1.1 200 OK
   Date: Mon, 12 Aug 2019 10:35:51 GMT
   Server: Apache-Coyote/1.1
   Content-Length: 1023
   Content-Type: application/linkset
   Link: <https://example.org/links/resource1>
         ; rel="alternate"
         ; type="application/linkset+json"
        
   <https://authors.example.net/johndoe>
      ; rel="author"
      ; type="application/rdf+xml"
      ; anchor="https://example.org/resource1",
   <https://example.org/resource1?version=3>
      ; rel="latest-version"
      ; type="text/html"
      ; anchor="https://example.org/resource1",
   <https://example.org/resource1?version=2>
      ; rel="predecessor-version"
      ; type="text/html"
      ; anchor="https://example.org/resource1?version=3",
   <https://example.org/resource1?version=1>
      ; rel="predecessor-version"
      ; type="text/html"
      ; anchor="https://example.org/resource1?version=2",
   <https://example.org/resource1?version=1>
      ; rel="memento"
      ; type="text/html"
      ; datetime="Thu, 13 Jun 2019 09:34:33 GMT"
      ; anchor="https://example.org/resource1",
   <https://example.org/resource1?version=2>
      ; rel="memento"
      ; type="text/html"
      ; datetime="Sun, 21 Jul 2019 12:22:04 GMT"
      ; anchor="https://example.org/resource1",
   <https://authors.example.net/alice>
      ; rel="author"
      ; anchor="https://example.org/resource1#comment=1"
        

Figure 8: Response to HTTP GET includes a set of links

図8:HTTPへの応答GETにはリンクのセットが含まれています

7.2. 「アプリケーション/リンクセットJSON」として提供されるリンクのセット

Figure 9 shows the client issuing an HTTP GET request against <https://example.org/links/resource1>. In the request, the client uses an "Accept" header field to indicate that it prefers a response in the "application/linkset+json" format.

図9は、クライアントが<https://example.org/links/resource1>に対してHTTP GETリクエストを発行することを示しています。リクエストでは、クライアントは「Accept」ヘッダーフィールドを使用して、「Application/Linkset JSON」形式の応答を好むことを示します。

   GET links/resource1 HTTP/1.1
   Host: example.org
   Accept: application/linkset+json
        

Figure 9: Client HTTP GET request expressing preference for an "application/linkset+json" response

図9:クライアントhttp「アプリケーション/リンクセットjson」応答の優先を表すリクエストを取得する

Figure 10 shows the response to the HTTP GET request of Figure 9. The set of links is serialized according to the media type "application/linkset+json".

図10は、図9のHTTP GETリクエストに対する応答を示しています。リンクのセットは、メディアタイプの「アプリケーション/リンクセットJSON」に従ってシリアル化されています。

   HTTP/1.1 200 OK
   Date: Mon, 12 Aug 2019 10:46:22 GMT
   Server: Apache-Coyote/1.1
   Content-Type: application/linkset+json
   Link: <https://example.org/links/resource1>
         ; rel="alternate"
         ; type="application/linkset"
   Content-Length: 1246
        
   { "linkset":
     [
       { "anchor": "https://example.org/resource1",
         "author": [
           { "href": "https://authors.example.net/johndoe",
             "type": "application/rdf+xml"
           }
         ],
         "memento": [
           { "href": "https://example.org/resource1?version=1",
             "type": "text/html",
             "datetime": "Thu, 13 Jun 2019 09:34:33 GMT"
           },
           { "href": "https://example.org/resource1?version=2",
             "type": "text/html",
             "datetime": "Sun, 21 Jul 2019 12:22:04 GMT"
           }
         ],
         "latest-version": [
           { "href": "https://example.org/resource1?version=3",
             "type": "text/html"
           }
         ]
       },
       { "anchor": "https://example.org/resource1?version=3",
         "predecessor-version": [
           { "href": "https://example.org/resource1?version=2",
             "type": "text/html"
           }
         ]
       },
       { "anchor": "https://example.org/resource1?version=2",
         "predecessor-version": [
           { "href": "https://example.org/resource1?version=1",
             "type": "text/html"
           }
         ]
       },
       { "anchor": "https://example.org/resource1#comment=1",
         "author": [
           { "href": "https://authors.example.net/alice"}
         ]
       }
     ]
   }
        

Figure 10: Response to the client's request for the linkset

図10:リンクセットに対するクライアントの要求への応答

7.3. 「リンクセット」リンク関係タイプを介して設定されたリンクの発見

Figure 11 shows a client issuing an HTTP HEAD request against resource <https://example.org/resource1>.

図11は、クライアントがリソース<https://example.org/resource1>に対してHTTPヘッドリクエストを発行することを示しています。

HEAD resource1 HTTP/1.1 Host: example.org

Head Resource1 HTTP/1.1 HOST:emple.org

Figure 11: Client HTTP HEAD request

図11:クライアントHTTPヘッドリクエスト

Figure 12 shows the response to the HEAD request of Figure 11. The response contains an HTTP "Link" header field with a link that has the "linkset" relation type. It indicates that a set of links is provided by resource <https://example.org/links/resource1>, which provides a representation with media type "application/linkset+json".

図12は、図11のヘッドリクエストに対する応答を示しています。応答には、「リンクセット」関係タイプのリンクを持つHTTP「リンク」ヘッダーフィールドが含まれています。これは、リンクのセットがリソース<https://example.org/links/resource1>によって提供されていることを示しています。

   HTTP/1.1 200 OK
   Date: Mon, 12 Aug 2019 10:45:54 GMT
   Server: Apache-Coyote/1.1
   Link: <https://example.org/links/resource1>
         ; rel="linkset"
         ; type="application/linkset+json"
   Content-Length: 236
   Content-Type: text/html;charset=utf-8
        

Figure 12: Response to HTTP HEAD request

図12:HTTPヘッドリクエストへの応答

7.4. リンク設定プロファイル

The examples in this section illustrate the use of the "profile" attribute for a link with the "linkset" link relation type and the "profile" attribute 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).

このセクションの例は、「リンクセット」リンク関係タイプとリンクセットメディアタイプの「プロファイル」属性を使用したリンクの「プロファイル」属性の使用を示しています。例は、GS1(世界の多くのバーコードの背後にある標準機関)によるリンクセットの実装に触発されています。

7.4.1. 「リンクセット」リンクを使用して「プロファイル」属性を使用する

Figure 13 shows a client issuing an HTTP HEAD request against trade item 09506000134352 at <https://id.gs1.org/01/9506000134352>.

図13は、<https://id.gs1.org/01/9506000134352> <https://id.gs1.org/01/9506000134352>のトレードアイテムに対するHTTPヘッド要求を発行するクライアントを示しています。

   HEAD /01/9506000134352 HTTP/1.1
   Host: id.gs1.org
        

Figure 13: Client HTTP HEAD request

図13:クライアントHTTPヘッドリクエスト

Figure 14 shows the server's response to the request of Figure 13, including a "linkset" link with a "profile" attribute that has the profile URI <https://www.gs1.org/voc/?show=linktypes> as its value. Dereferencing that URI yields a profile document that lists all the link relation types that a client can expect when requesting the link set made discoverable by the "linkset" link. The link relation types are presented in abbreviated form, e.g., <gs1:activityIdeas>, whereas the actual link relation type URIs are available as hyperlinks on the abbreviations, e.g., <https://www.gs1.org/voc/activityIdeas>. For posterity, that profile document was saved in the Internet Archive at <https://web.archive.org/web/20210927160406/https://www.gs1.org/ voc/?show=linktypes> on 27 September 2021.

図14は、図13の要求に対するサーバーの応答を示しています。これには、プロファイルURI <https://www.gs1.org/voc/?show=linktypes>を持つ「プロファイル」属性を含む「リンクセット」リンクが含まれます。価値。URIが、「リンクセット」リンクで発見可能になったリンクセットを要求するときにクライアントが期待できるすべてのリンク関係タイプをリストするプロファイルドキュメントを生成することを緩和します。リンク関係のタイプは、略語形式で示されています。たとえば、<gs1:activityideas>、実際のリンク関係タイプは、略語のハイパーリンクとして利用可能です。。後世のために、そのプロフィールドキュメントは、2021年9月27日に<https://web.archive.org/web/20210927160406/https://www.gs1.org/ voc/show = linktypes>のインターネットアーカイブに保存されました。

   HTTP/1.1 307 Temporary Redirect
   Date:  Mon, 27 Sep 2021 16:03:07 GMT
   Server: nginx
   Link: <https://id.gs1.org/01/9506000134352?linkType=all>
         ; rel="linkset"
         ; type="application/linkset+json"
         ; profile="https://www.gs1.org/voc/?show=linktypes"
   Location: https://example.com/risotto-rice-with-mushrooms/
        

Figure 14: Response to the client's HEAD request, including a "profile" attribute for the "linkset" link

図14:「リンクセット」リンクの「プロファイル」属性を含む、クライアントのヘッドリクエストへの応答

7.4.2. リンクセットメディアタイプを使用して「プロファイル」パラメーターを使用する

Figure 15 shows a client issuing an HTTP HEAD request against the link set <https://id.gs1.org/01/9506000134352?linkType=all> that was discovered through the HTTP interactions shown in Section 7.4.1.

図15は、リンクセットに対してHTTPヘッド要求を発行するクライアントを示しています<https://id.gs1.org/01/9506000134352?linktype=all>セクション7.4.1に示されているHTTP相互作用を通じて発見されたことを示しています。

   HEAD /01/9506000134352?linkType=all HTTP/1.1
   Host: id.gs1.org
        

Figure 15: Client HTTP HEAD request

図15:クライアントHTTPヘッドリクエスト

Figure 16 shows the server's response to the request of Figure 15. Note the "profile" parameter for the "application/linkset+json" media type, which has as its value the same profile URI <https://www.gs1.org/voc/?show=linktypes> as was used in Figure 14.

図16は、図15の要求に対するサーバーの応答を示しています。「アプリケーション/リンクセットJSON」メディアタイプの「プロファイル」パラメーターに注意してください。Voc/?show = linktypes>図14で使用されたのは。

   HTTP/1.1 200 OK
   Date:  Mon, 27 Sep 2021 16:03:33 GMT
   Server: nginx
   Content-Type: application/linkset+json;
        profile="https://www.gs1.org/voc/?show=linktypes"
   Content-Length: 396
        

Figure 16: Response to the client's HEAD request, including a "profile" parameter for the "application/linkset+json" media type

図16:「アプリケーション/リンクセットjson」メディアタイプの「プロファイル」パラメーターを含む、クライアントのヘッドリクエストへの応答

7.4.3. 「プロファイル」リンク関係タイプのリンクを使用する

Note that the response shown in Figure 16 from the link set resource is equivalent to the response shown in Figure 17, which leverages the "profile" link relation type defined in [RFC6906].

リンクセットリソースの図16に示す応答は、[RFC6906]で定義された「プロファイル」リンク関係タイプを活用する図17に示す応答と同等であることに注意してください。

   HTTP/1.1 200 OK
   Date:  Mon, 27 Sep 2021 16:03:33 GMT
   Server: nginx
   Content-Type: application/linkset+json
   Link: <https://www.gs1.org/voc/?show=linktypes>; rel="profile"
   Content-Length: 396
        

Figure 17: Response to the client's HEAD request, including a "profile" link

図17:「プロファイル」リンクを含むクライアントのヘッドリクエストへの応答

A link with a "profile" link relation type as shown in Figure 17 can also be conveyed in the link set document itself. This is illustrated by Figure 18. Following the recommendation that all links in a link set document should have an explicit anchor, such a link has 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.

図17に示すように、「プロファイル」リンク関係タイプを使用したリンクは、リンクセットドキュメント自体でも伝えます。これは図18に示されています。リンクセットドキュメント内のすべてのリンクに明示的なアンカーが必要であるという推奨に従って、そのようなリンクにはアンカーとしてのURIがターゲットとしてURIのURIを設定します。複数のプロファイルURIは、複数の「HREF」メンバーを使用して処理されます。

   { "linkset":
     [
       { "anchor": "https://id.gs1.org/01/9506000134352?linkType=all",
         "profile": [
               {"href": "https://www.gs1.org/voc/?show=linktypes"}
         ]
       },
        { "anchor": "https://id.gs1.org/01/9506000134352",
          "https://gs1.org/voc/whatsInTheBox": [
            {"href": "https://example.com/en/packContents/GB"}
          ]
       }
     ]
   }
        

Figure 18: A linkset that declares the profile it complies with, using a "profile" link

図18:「プロファイル」リンクを使用して、準拠したプロファイルを宣言するリンクセット

8. IANA Considerations
8. IANAの考慮事項
8.1. リンク関係タイプ:リンクセット

The link relation type below has been registered by IANA in the "Link Relation Types" registry as per Section 4.2 of [RFC8288]:

以下のリンク関係タイプは、[RFC8288]のセクション4.2に従って、「リンク関係タイプ」レジストリにIANAによって登録されています。

Relation Name: linkset

関係名:リンクセット

Description: The link target of a link with the "linkset" relation type provides a set of links, including links in which the link context of the link participates.

説明:「リンクセット」関係タイプのリンクのリンクターゲットは、リンクのリンクコンテキストが参加するリンクを含む一連のリンクを提供します。

Reference: RFC 9264

参照:RFC 9264

8.2. Media Type: application/linkset
8.2. メディアタイプ:アプリケーション/リンクセット

The Internet media type "application/linkset" for a linkset encoded as described in Section 4.1 has been registered by IANA in the "Media Types" registry as per [RFC6838].

セクション4.1で説明されているようにエンコードされたリンクセットのインターネットメディアタイプ「アプリケーション/リンクセット」は、[RFC6838]に従って「メディアタイプ」レジストリにIANAによって登録されています。

Type name: application

タイプ名:アプリケーション

Subtype name: linkset

サブタイプ名:linkset

Required parameters: N/A

必要なパラメーター:n/a

Optional parameters: profile

オプションのパラメーター:プロファイル

   Encoding considerations:  Linksets are encoded according to the
      definitions provided in [RFC8288].  The encoding discussed in
      [RFC8288] is based on the general encoding rules specified by HTTP
      [RFC9110] and allows specific parameters to be extended by the
      indication of character encoding and language as defined by
      [RFC8187].
        

Security considerations: The security considerations of RFC 9264 apply.

セキュリティ上の考慮事項:RFC 9264のセキュリティ上の考慮事項が適用されます。

Interoperability considerations: N/A

相互運用性の考慮事項:n/a

Published specification: RFC 9264

公開された仕様:RFC 9264

Applications that use this media type: This media type is not specific to any application, as it can be used by any application that wants to interchange Web Links.

このメディアタイプを使用するアプリケーション:このメディアタイプは、Webリンクを交換したいアプリケーションで使用できるため、どのアプリケーションにも固有ではありません。

   Additional information:
      Magic number(s):  N/A
      File extension(s):  This media type does not propose a specific
         extension.
      Macintosh file type code(s):  TEXT
        
   Person & email address to contact for further information:  Erik
      Wilde <erik.wilde@dret.net>
        

Intended usage: COMMON

意図された使用法:共通

Restrictions on usage: none

使用に関する制限:なし

   Author:  Erik Wilde <erik.wilde@dret.net>
        

Change controller: IETF

Change Controller:IETF

8.3. Media Type: application/linkset+json
8.3. メディアタイプ:アプリケーション/リンクセットJSON

The Internet media type "application/linkset+json" for a linkset encoded as described in Section 4.2 has been registered by IANA in the "Media Types" registry as per [RFC6838].

セクション4.2で説明されているようにエンコードされたリンクセットのインターネットメディアタイプ「アプリケーション/リンクセットJSON」は、[RFC6838]に従って「メディアタイプ」レジストリにIANAによって登録されています。

Type name: application

タイプ名:アプリケーション

Subtype name: linkset+json

サブタイプ名:Linkset JSON

Required parameters: N/A

必要なパラメーター:n/a

Optional parameters: profile

オプションのパラメーター:プロファイル

Encoding considerations: The encoding considerations of [RFC8259] apply.

考慮事項のエンコーディング:[RFC8259]のエンコーディングに関する考慮事項が適用されます。

Security considerations: The security considerations of RFC 9264 apply.

セキュリティ上の考慮事項:RFC 9264のセキュリティ上の考慮事項が適用されます。

Interoperability considerations: The interoperability considerations of [RFC8259] apply.

相互運用性の考慮事項:[RFC8259]の相互運用性の考慮事項が適用されます。

Published specification: RFC 9264

公開された仕様:RFC 9264

Applications that use this media type: This media type is not specific to any application, as it can be used by any application that wants to interchange Web Links.

このメディアタイプを使用するアプリケーション:このメディアタイプは、Webリンクを交換したいアプリケーションで使用できるため、どのアプリケーションにも固有ではありません。

   Additional information:
      Magic number(s):  N/A
      File extension(s):  JSON documents often use ".json" as the file
         extension, and this media type does not propose a specific
         extension other than this generic one.
      Macintosh file type code(s):  TEXT
        
   Person & email address to contact for further information:  Erik
      Wilde <erik.wilde@dret.net>
        

Intended usage: COMMON

意図された使用法:共通

Restrictions on usage: none

使用に関する制限:なし

   Author:  Erik Wilde <erik.wilde@dret.net>
        

Change controller: IETF

Change Controller:IETF

9. Security Considerations
9. セキュリティに関する考慮事項

The security considerations of Section 7 of [RFC3986] apply, as well as those of Web Linking [RFC8288] as long as the latter are not specifically discussing the risks of exposing information in HTTP header fields.

[RFC3986]のセクション7のセキュリティ上の考慮事項は、後者がHTTPヘッダーフィールドで情報を公開するリスクについて具体的に議論していない限り、[RFC8288]と同様にWebリンクのセキュリティに関する考慮事項を適用します。

In general, links may cause information leakage when they expose information (such as URIs) that can be sensitive or private. Links may expose "hidden URIs" that are not supposed to be openly shared and that may not be sufficiently 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 users, then technical measures should be put in place so that accidentally exposing them does not cause any harm.

一般に、リンクは、敏感またはプライベートな情報(URIなど)を公開すると、情報の漏れを引き起こす可能性があります。リンクは、公然と共有されておらず、十分に保護されていない「隠されたウリ」を公開する可能性があります。理想的には、リンクに露出したurisは「隠されている」と想定されるべきではありません。代わりに、これらのURIが特定のユーザーに限定されることになっている場合、誤ってそれらを暴露しても害を及ぼさないように技術的な措置を導入する必要があります。

For the specific mechanisms defined in this specification, two security considerations should be taken into account:

この仕様で定義されている特定のメカニズムについては、2つのセキュリティに関する考慮事項を考慮する必要があります。

* The Web Linking model always has an "implicit context", 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 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 have no explicit anchor or that use relative URIs when these are exchanged in standalone resources.

* Webリンクモデルには常に「暗黙的なコンテキスト」があり、HTTP相互作用のリソースです。この元のコンテキストは、自己完結型のリンク表現が移動されると変化する可能性があります。コンテキストを変更すると、リンクが明示的なアンカーがない場合、または相対的なURIを使用した場合にリンクの解釈を変更できます。アプリケーションは、明示的なアンカーがない、またはこれらがスタンドアロンリソースで交換されている場合に相対URIを使用するリンクを無視することを選択できます。

* The model introduced in this specification supports "third-party links", where one party can provide links that have another party's resource as an anchor. Depending on the link semantics and the application context, it is important to verify that there is sufficient trust in that third party to allow it to provide these links. Applications may choose to treat third-party links differently than cases where a resource and the links for that resource are provided by the same party.

* この仕様で導入されたモデルは、「サードパーティリンク」をサポートしています。ここでは、ある当事者がアンカーとして別の当事者のリソースを持つリンクを提供できます。リンクセマンティクスとアプリケーションのコンテキストに応じて、これらのリンクを提供できるようにするためにその第三者に十分な信頼があることを確認することが重要です。アプリケーションは、リソースとそのリソースのリンクが同じ当事者によって提供される場合とは異なる方法で、サードパーティのリンクを異なる方法で扱うことを選択できます。

10. References
10. 参考文献
10.1. Normative References
10.1. 引用文献

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>.

[RFC2119] Bradner、S。、「要件レベルを示すためにRFCで使用するためのキーワード」、BCP 14、RFC 2119、DOI 10.17487/RFC2119、1997年3月、<https://www.rfc-editor.org/info/RFC2119>。

[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, DOI 10.17487/RFC3986, January 2005, <https://www.rfc-editor.org/info/rfc3986>.

[RFC3986] Berners-Lee、T.、Fielding、R。、およびL. Masinter、「Uniform Resource Identifier(URI):Generic Syntax」、Std 66、RFC 3986、DOI 10.17487/RFC3986、2005年1月、<https://www.rfc-editor.org/info/rfc3986>。

[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, January 2008, <https://www.rfc-editor.org/info/rfc5234>.

[RFC5234] Crocker、D.、ed。P. Overell、「構文仕様のためのBNFの増強:ABNF:STD 68、RFC 5234、DOI 10.17487/RFC5234、2008年1月、<https://www.rfc-editor.org/info/rfc5234>。

[RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646, September 2009, <https://www.rfc-editor.org/info/rfc5646>.

[RFC5646]フィリップス、A。、編およびM.デイビス編、「言語を識別するためのタグ」、BCP 47、RFC 5646、DOI 10.17487/RFC5646、2009年9月、<https://www.rfc-editor.org/info/rfc5646>。

[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type Specifications and Registration Procedures", BCP 13, RFC 6838, DOI 10.17487/RFC6838, January 2013, <https://www.rfc-editor.org/info/rfc6838>.

[RFC6838] Freed、N.、Klensin、J。、およびT. Hansen、「メディアタイプの仕様と登録手順」、BCP 13、RFC 6838、DOI 10.17487/RFC6838、2013年1月、<https://www.rfc-editor.org/info/rfc6838>。

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.

[RFC8174] Leiba、B。、「RFC 2119キーワードの大文字と小文字のあいまいさ」、BCP 14、RFC 8174、DOI 10.17487/RFC8174、2017年5月、<https://www.rfc-editor.org/info/RFC8174>。

[RFC8187] Reschke, J., "Indicating Character Encoding and Language for HTTP Header Field Parameters", RFC 8187, DOI 10.17487/RFC8187, September 2017, <https://www.rfc-editor.org/info/rfc8187>.

[RFC8187] Reschke、J。、「HTTPヘッダーフィールドパラメーターの文字エンコードと言語を示す」、RFC 8187、DOI 10.17487/RFC8187、2017年9月、<https://www.rfc-editor.org/info/rfc8187>。

[RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", STD 90, RFC 8259, DOI 10.17487/RFC8259, December 2017, <https://www.rfc-editor.org/info/rfc8259>.

[RFC8259] Bray、T.、ed。、「JavaScriptオブジェクト表記(JSON)データインターチェンジ形式」、STD 90、RFC 8259、DOI 10.17487/RFC8259、2017年12月、<https://www.rfc-editor.org/info/rfc8259>。

[RFC8288] Nottingham, M., "Web Linking", RFC 8288, DOI 10.17487/RFC8288, October 2017, <https://www.rfc-editor.org/info/rfc8288>.

[RFC8288]ノッティンガム、M。、「Webリンク」、RFC 8288、DOI 10.17487/RFC8288、2017年10月、<https://www.rfc-editor.org/info/rfc8288>。

[RFC9110] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "HTTP Semantics", STD 97, RFC 9110, DOI 10.17487/RFC9110, June 2022, <https://www.rfc-editor.org/info/rfc9110>.

[RFC9110] Fielding、R.、Ed。、Ed。、Nottingham、M.、Ed。、およびJ. Reschke、ed。、 "HTTP Semantics"、Std 97、RFC 9110、DOI 10.17487/RFC9110、2022年6月、<https://www.rfc-editor.org/info/rfc9110>。

[W3C.REC-json-ld] Sporny, M., Ed., Kellogg, G., Ed., and M. Lanthaler, Ed., "JSON-LD 1.1: A JSON-based Serialization for Linked Data", W3C Recommendation REC-json-ld-20140116, July 2020, <https://www.w3.org/TR/json-ld/>.

[W3C.REC-JSON-LD] Sporny、M.、Ed。、Ed。、Kellogg、G.、ed。、およびM. Lanthaler、ed。、「JSON-LD 1.1:リンクデータのJSONベースのシリアル化」、W3C推奨事項rec-json-ld-20140116、2020年7月、<https://www.w3.org/tr/json-ld/>。

10.2. Informative References
10.2. 参考引用

[DCMI-TERMS] Dublin Core Metadata Initiative, "DCMI Metadata Terms", January 2020, <https://www.dublincore.org/specifications/ dublin-core/dcmi-terms/>.

[DCMI-TERMS]ダブリンコアメタデータイニシアチブ、「DCMIメタデータ条件」、2020年1月、<https://www.dublincore.org/specifications/ dublin-core/dcmi-terms/>。

[RFC5988] Nottingham, M., "Web Linking", RFC 5988, DOI 10.17487/RFC5988, October 2010, <https://www.rfc-editor.org/info/rfc5988>.

[RFC5988]ノッティンガム、M。、「Webリンク」、RFC 5988、DOI 10.17487/RFC5988、2010年10月、<https://www.rfc-editor.org/info/rfc5988>。

[RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, <https://www.rfc-editor.org/info/rfc6690>.

[RFC6690]シェルビー、Z。、「制約付き安静環境(コア)リンク形式」、RFC 6690、DOI 10.17487/RFC6690、2012年8月、<https://www.rfc-editor.org/info/rfc690>

[RFC6906] Wilde, E., "The 'profile' Link Relation Type", RFC 6906, DOI 10.17487/RFC6906, March 2013, <https://www.rfc-editor.org/info/rfc6906>.

[RFC6906] Wilde、E。、「「プロファイル」リンク関係タイプ」、RFC 6906、DOI 10.17487/RFC6906、2013年3月、<https://www.rfc-editor.org/info/rfc6906>。

[RFC7284] Lanthaler, M., "The Profile URI Registry", RFC 7284, DOI 10.17487/RFC7284, June 2014, <https://www.rfc-editor.org/info/rfc7284>.

[RFC7284] Lanthaler、M。、「The Profile URIレジストリ」、RFC 7284、DOI 10.17487/RFC7284、2014年6月、<https://www.rfc-editor.org/info/rfc7284>。

[W3C.REC-rdf11-concepts] Cyganiak, R., Ed., Wood, D., Ed., and M. Lanthaler, Ed., "RDF 1.1 Concepts and Abstract Syntax", W3C Consortium Recommendation REC-rdf11-concepts, February 2014, <https://www.w3.org/TR/rdf11-concepts/>.

[W3C.REC-RDF11 Concepts] Cyganiak、R.、ed。、Ed。、Wood、D.、and M. Lanthaler、ed。、「RDF 1.1概念と抽象的な構文」、W3Cコンソーシアムの推奨REC-RDF11コントセプティ、2014年2月、<https://www.w3.org/tr/rdf11concepts/>。

Appendix A. JSON-LD Context
付録A. JSON-LDコンテキスト

A set of links rendered according to the JSON serialization defined in Section 4.2 can be interpreted as RDF triples by adding a JSON-LD context [W3C.REC-json-ld] that maps the JSON keys to corresponding Linked Data terms. And, as per Section 6.1 of [W3C.REC-json-ld], when delivering a link set that is rendered according to the "application/linkset+json" media type to a user agent, a server can convey the availability of such a JSON-LD context by using a link with the relation type "http://www.w3.org/ns/json-ld#context" in the HTTP "Link" header field.

セクション4.2で定義されたJSONシリアル化に従ってレンダリングされた一連のリンクは、JSONキーを対応するリンクデータ用語にマップするJSON-LDコンテキスト[W3C.REC-JSON-LD]を追加することにより、RDFトリプルとして解釈できます。また、[w3c.rec-json-ld]のセクション6.1に従って、「アプリケーション/リンクセットjson」メディアタイプに従ってレンダリングされるリンクセットをユーザーエージェントに配信する場合、サーバーはそのようなAの可用性を伝えることができます。json-ldコンテキスト "http://www.w3.org/ns/json-ld#context" http "link"ヘッダーフィールドのタイプのリンクを使用して。

Figure 19 shows the response to an HTTP GET against the URI of a link set resource and illustrates this approach to support the discovery of a JSON-LD context. This example is inspired by the GS1 implementation and shows a link set that uses relation types from the GS1 vocabulary at <https://www.gs1.org/voc/> that are expressed as HTTP URIs.

図19は、HTTPへの応答をリンクセットリソースのURIに反し、JSON-LDコンテキストの発見をサポートするこのアプローチを示しています。この例はGS1実装に触発され、http urisとして表される<https://www.gs1.org/voc/>のGS1語彙の関係タイプを使用するリンクセットを示しています。

   HTTP/1.1 200 OK
   Date: Mon, 11 Oct 2021 10:48:22 GMT
   Server: Apache-Coyote/1.1
   Content-Type: application/linkset+json
   Link: <https://example.org/contexts/linkset.jsonld>
         ; rel="http://www.w3.org/ns/json-ld#context"
         ; type="application/ld+json"
   Content-Length: 1532
        
   {
     "linkset": [
       {
         "anchor": "https://id.gs1.org/01/09506000149301",
         "https://gs1.org/voc/pip": [
           {
             "href": "https://example.com/en/defaultPage",
             "hreflang": [
               "en"
             ],
             "type": "text/html",
             "title": "Product information"
           },
           {
             "href": "https://example.com/fr/defaultPage",
             "hreflang": [
               "fr"
             ],
             "title": "Information produit"
           }
         ],
         "https://gs1.org/voc/whatsInTheBox": [
           {
             "href": "https://example.com/en/packContents/GB",
             "hreflang": [
               "en"
             ],
             "title": "What's in the box?"
           },
           {
             "href": "https://example.com/fr/packContents/FR",
             "hreflang": [
               "fr"
             ],
             "title": "Qu'y a-t-il dans la boite?"
           },
           {
             "href": "https://example.com/fr/packContents/CH",
             "hreflang": [
               "fr"
             ],
             "title": "Qu'y a-t-il dans la boite?"
           }
         ],
         "https://gs1.org/voc/relatedVideo": [
           {
             "href": "https://video.example",
             "hreflang": [
               "en",
               "fr"
             ],
             "title*": [
               {
                 "value": "See it in action!",
                 "language": "en"
               },
               {
                 "value": "Voyez-le en action!",
                 "language": "fr"
               }
             ]
           }
         ]
       }
     ]
   }
        

Figure 19: Using a typed link to support the discovery of a JSON-LD context for a linkset

図19:リンクセットのJSON-LDコンテキストの発見をサポートするためにタイプ付きリンクを使用する

In order to obtain the JSON-LD context conveyed by the server, the user agent issues an HTTP GET against the link target of the link with the "http://www.w3.org/ns/json-ld#context" relation type. The response to this GET is shown in Figure 20. This particular JSON-LD context maps "application/linkset+json" representations of link sets to Dublin Core terms [DCMI-TERMS]. Note that the "linkset" entry in the JSON-LD context is introduced to support links with the "linkset" relation type in link sets.

サーバーによって伝えられるJSON-LDコンテキストを取得するために、ユーザーエージェントは、「http://www.w3.org/ns/json-ld#context」とのリンクのリンクターゲットに対してHTTP Getに対してHTTP Getを発行します。タイプ。このGETに対する応答を図20に示します。この特定のJSON-LDコンテキストマップ「アプリケーション/リンクセットJSON」リンクセットの表現は、ダブリンコア用語[DCMI-TERMS]への表現です。JSON-LDコンテキストの「リンクセット」エントリが導入され、リンクセットの「リンクセット」関係タイプとのリンクをサポートすることに注意してください。

   HTTP/1.1 200 OK
   Content-Type: application/ld+json
   Content-Length: 658
        
   {
     "@context": [
       {
         "@version": 1.1,
         "@vocab": "https://gs1.org/voc/",
         "anchor": "@id",
         "href": "@id",
         "linkset": {
           "@id": "@graph",
           "@context": {
             "linkset": "linkset"
           }
         },
         "title": {
           "@id": "http://purl.org/dc/terms/title"
         },
         "title*": {
           "@id": "http://purl.org/dc/terms/title"
         },
         "type": {
           "@id": "http://purl.org/dc/terms/format"
         }
       },
       {
         "language": "@language",
         "value": "@value",
         "hreflang": {
           "@id": "http://purl.org/dc/terms/language",
           "@container": "@set"
         }
       }
     ]
   }
        

Figure 20: JSON-LD context mapping to Dublin Core terms

図20:ダブリンのコア用語へのJSON-LDコンテキストマッピング

Applying the JSON-LD context of Figure 20 to the link set of Figure 19 allows transforming the "application/linkset+json" link set to an RDF link set. Figure 21 shows the latter represented by means of the "text/turtle" RDF serialization.

図20のJSON-LDコンテキストを図19のリンクセットに適用すると、「アプリケーション/リンクセットJSON」リンクをRDFリンクセットに変換できます。図21は、「テキスト/タートル」RDFシリアル化によって表される後者を示しています。

<https://example.com/en/defaultPage> <http://purl.org/dc/terms/format> "text/html" . <https://example.com/en/defaultPage> <http://purl.org/dc/terms/language> "en" . <https://example.com/en/defaultPage> <http://purl.org/dc/terms/title> "Product information" . <https://example.com/en/packContents/GB> <http://purl.org/dc/terms/language> "en" . <https://example.com/en/packContents/GB> <http://purl.org/dc/terms/title> "What's in the box?" . <https://example.com/fr/defaultPage> <http://purl.org/dc/terms/language> "fr" . <https://example.com/fr/defaultPage> <http://purl.org/dc/terms/title> "Information produit" . <https://example.com/fr/packContents/CH> <http://purl.org/dc/terms/language> "fr" . <https://example.com/fr/packContents/CH> <http://purl.org/dc/terms/title> "Qu'y a-t-il dans la boite?" . <https://example.com/fr/packContents/FR> <http://purl.org/dc/terms/language> "fr" . <https://example.com/fr/packContents/FR> <http://purl.org/dc/terms/title> "Qu'y a-t-il dans la boite?" . <https://id.gs1.org/01/09506000149301> <https://gs1.org/voc/pip> <https://example.com/en/defaultPage> . <https://id.gs1.org/01/09506000149301> <https://gs1.org/voc/pip> <https://example.com/fr/defaultPage> . <https://id.gs1.org/01/09506000149301> <https://gs1.org/voc/relatedVideo> <https://video.example> . <https://id.gs1.org/01/09506000149301> <https://gs1.org/voc/whatsInTheBox> <https://example.com/en/packContents/GB> . <https://id.gs1.org/01/09506000149301> <https://gs1.org/voc/whatsInTheBox> <https://example.com/fr/packContents/CH> . <https://id.gs1.org/01/09506000149301> <https://gs1.org/voc/whatsInTheBox> <https://example.com/fr/packContents/FR> . <https://video.example> <http://purl.org/dc/terms/language> "en" . <https://video.example> <http://purl.org/dc/terms/language> "fr" . <https://video.example> <http://purl.org/dc/terms/title> "See it in action!"@en . <https://video.example> <http://purl.org/dc/terms/title> "Voyez-le en action!"@fr .

<https://example.com/en/defaultpage> <http://purl.org/dc/terms/format> "text/html"。 <https://example.com/en/defaultpage> <http://purl.org/dc/terms/language> "en"。 <https://example.com/en/defaultpage> <http://purl.org/dc/terms/title>「製品情報」。 <https://example.com/en/packcontents/gb> <http://purl.org/dc/terms/language> "en"。 <https://example.com/en/packcontents/gb> <http://purl.org/dc/terms/title>「ボックスには何がありますか?」 。 <https://example.com/fr/defaultpage> <http://purl.org/dc/terms/language> "fr"。 <https://example.com/fr/defaultpage> <http://purl.org/dc/terms/title> "Information Produit"。 <https://example.com/fr/packcontents/ch> <http://purl.org/dc/terms/language> "fr"。 <https://example.com/fr/packcontents/ch> <http://purl.org/dc/terms/title> "qu'y a-t-il dans la boite?" 。 <https://example.com/fr/packcontents/fr> <http://purl.org/dc/terms/language> "fr"。 <https://example.com/fr/packcontents/fr> <http://purl.org/dc/terms/title> "qu'y a-t-il dans la boite?" 。 <https://id.gs1.org/01/09506000149301> <https://gs1.org/voc/pip> <https://example.com/en/defaultpage>。 <https://id.gs1.org/01/09506000149301> <https://gs1.org/voc/pip> <https://example.com/fr/defaultpage>。 <https://id.gs1.org/01/09506000149301> <https://gs1.org/voc/relatedvideo> <https://video.example>。 <https://id.gs1.org/01/09506000149301> <https://gs1.org/voc/whatsinthebox> <https://example.com/en/packcontents/gb> <https://id.gs1.org/01/09506000149301> <https://gs1.org/voc/whatsinthebox> <https://example.com/fr/packcontents/ch>。 <https://id.gs1.org/01/09506000149301> <https://gs1.org/voc/whatsinthebox> <https://example.com/fr/packcontents/fr>。 <https://video.example> <http://purl.org/dc/terms/language> "en"。 <https://video.example> <http://purl.org/dc/terms/language> "fr"。 <https://video.example> <http://purl.org/dc/terms/title>「アクションでそれを見る!」@en。 <https://video.example> <http://purl.org/dc/terms/title> "voyez-le en action!"@fr。

Figure 21: RDF serialization of the linkset resulting from applying the JSON-LD context

図21:JSON-LDコンテキストの適用に起因するリンクセットのRDFシリアル化

Acknowledgements

謝辞

Thanks for comments and suggestions provided by Phil Archer, Dominique Guinard, Mark Nottingham, Julian Reschke, Rob Sanderson, Stian Soiland-Reyes, Sarven Capadisli, and Addison Phillips.

Phil Archer、Dominique Guinard、Mark Nottingham、Julian Reschke、Rob Sanderson、Stian Soiland-Reyes、Sarven Capadisli、Addison Phillipsから提供されたコメントと提案をありがとう。

Authors' Addresses

著者のアドレス

Erik Wilde Axway Email: erik.wilde@dret.net

Erik Wilde Axwayメール:erik.wilde@dret.net

   Herbert Van de Sompel
   Data Archiving and Networked Services
   Email: herbert.van.de.sompel@dans.knaw.nl
   URI:   https://orcid.org/0000-0002-0715-6126