forked from ietf-wg-httpapi/linkset
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdraft-ietf-httpapi-linkset-01.xml
1095 lines (1033 loc) · 70 KB
/
draft-ietf-httpapi-linkset-01.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "http://xml.resource.org/authoring/rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
There has to be one entity for each item to be referenced.
An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC4287 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4287.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC6690 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6690.xml">
<!ENTITY RFC8259 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8259.xml">
<!ENTITY RFC7230 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7230.xml">
<!ENTITY RFC7231 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7231.xml">
<!ENTITY RFC8187 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8187.xml">
<!ENTITY RFC3986 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml">
<!ENTITY RFC6838 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6838.xml">
<!ENTITY RFC5646 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5646.xml">
<!ENTITY RFC8288 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8288.xml">
<!ENTITY RFC6982 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6982.xml">
<!ENTITY RFC5988 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5988.xml">
<!ENTITY W3CJSONLD SYSTEM "http://xml.resource.org/public/rfc/bibxml4/reference.W3C.REC-json-ld-20140116.xml">
<!ENTITY I-D.nottingham-link-hint SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.nottingham-link-hint.xml">
<!ENTITY RFC6690 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6690.xml">
<!ENTITY RFC0822 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.0822.xml">
<!ENTITY RFC3629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3629.xml">
]>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc toc="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc symrefs="yes" ?>
<rfc category="info" ipr="trust200902" docName="draft-ietf-httpapi-linkset-01">
<front>
<title abbrev="Linkset">Linkset: Media Types and a Link Relation Type for Link Sets</title>
<author initials="E." surname="Wilde" fullname="Erik Wilde">
<organization>Axway</organization>
<address>
<email>[email protected]</email>
<uri>http://dret.net/netdret/</uri>
</address>
</author>
<author initials="H." surname="Van de Sompel" fullname="Herbert Van de Sompel">
<organization>Data Archiving and Networked Services</organization>
<address>
<email>[email protected]</email>
<uri>https://orcid.org/0000-0002-0715-6126</uri>
</address>
</author>
<date day="12" month="March" year="2021"/>
<abstract>
<t>This specification defines two document formats and respective media types for representing sets of links as stand-alone resources. One format is JSON-based, the other aligned with the format for representing links in the HTTP "Link" header field. This specification also introduces a link relation type to support discovery of sets of links.</t>
</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>
<middle>
<section title="Introduction" anchor="introduction">
<t>Resources on the Web often use typed Web Links <xref target="RFC8288"/>, either embedded in resource representations, for example using the <link> element for HTML documents, or conveyed in the HTTP "Link" header 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 stand-alone document is preferable.</t>
<t>Therefore, this specification defines two document formats and associated media types to represent sets of links. It also defines the "linkset" relation type that supports discovery of any resource that conveys a set of links as a stand-alone document.</t>
</section>
<section title="Terminology" anchor="terminology">
<t>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 <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" as defined in
<xref target="RFC8288"/>.
These terms respectively correspond with "Context IRI" and "Target IRI" as used in <xref target="RFC5988"/>. Although defined as IRIs, in common scenarios they are also URIs.</t>
<t>In the examples provided in this document, links in the HTTP "Link" header are shown on separate lines in order to improve readability.
Note, however, that as per Section 3.2 of <xref target="RFC7230"/>, line breaks are not allowed in values for HTTP headers; only whitespaces and
tabs are supported as seperators.
</t>
<!--
<t>Additionally, this specification uses the following terms for types 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 links. <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 or more links provided
by a linkset resource. An origin resource can support discovery 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 links conveyed by the linkset resource
are provided by reference.</t>
</list></t>
-->
</section>
<section title="Scenarios" anchor="scenarios">
<t>The following sections outline scenarios 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.</t>
<t>For all scenarios, links could be provided by means of a stand-alone document that is formatted according to the JSON-based serialization, the serialization aligned with the HTTP "Link" header 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" header and to allow reuse of tools created to handle it.</t>
<t>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 combine various mechanisms to convey links.</t>
<section title="Third-Party Links" anchor="third-party">
<t>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:</t>
<t><list style="symbols">
<t>Providing links in which the resource is involved not just as link context but
also as link target.</t>
<t>Providing links pertaining to the resource that the server hosting that
resource is not aware of.</t>
<t>External management of links pertaining to the resource in a special-purpose link
management service.</t>
</list></t>
<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 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:</t>
<t><list style="symbols">
<t>Links are provided in a document that uses a well-defined media type.</t>
<t>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.</t>
</list></t>
<t>These requirements are addressed in this specification through 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-party resource,
and embed them in the resource's
representations prior to responding to a client. Doing so would increase latency and load,
which may be unnecessary if a client is not intent on consuming these links. Providing links by means of a standalone document,
removes the server-to-server communication and resulting overhead required to obtain
links. Instead, the consumer of the resource can decide if they need the additional links as context
for the resource and only access the third-party resource that provides the links if they do.</t>
-->
</section>
<section title="Challenges Writing to HTTP Link Header Field" anchor="header-writing">
<t>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 headers.
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.</t>
</section>
<section title="Large Number of Links" anchor="link-volume">
<t>When conveying links in an HTTP "Link" header field, it is possible for the size of the HTTP
response header to become unpredictable. This can be the case when links are determined
dynamically dependent on a range of contextual factors. It is possible to statically configure
a web server to correctly handle large HTTP response headers by specifying an upper bound
for their size. But when the number of links is
unpredictable, estimating a reliable upper bound is challenging.</t>
<t>HTTP <xref target="RFC7231"/> defines error codes related to excess communication
by the user agent ("413 Request Entity Too Large" and "414 Request-URI Too Long"), but no specific
error codes are defined to indicate that response header content exceeds the upper bound that can
be handled by the server, and thus it has been truncated.
As a result, applications take counter measures 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
nature of the size of HTTP "Link" header fields.</t>
<!--
<t>In more extreme scenarios it is conceivable that the number of 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 resources 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, for example, by means of a paged resource model.</t>
-->
</section>
</section>
<section title="Document Formats for Sets of Links" anchor="linkset-formats">
<t>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 <xref target="RFC8288"/>
that defines a link as consisting of a "link context", a "link relation type", a "link target",
and optional "target attributes":</t>
<t><list style="symbols">
<t>The format defined in <xref target="linkset-native"/> is identical to the payload
of the HTTP "Link" header field as specified in Web Linking <xref target="RFC8288"/>.</t>
<t>The format defined in <xref target="linkset-json"/> is based on <xref target="RFC8259">JSON</xref>.</t>
</list></t>
<t>Note that <xref target="RFC8288"/> deprecates the "rev" construct that was provided by <xref target="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 SHOULD be represented as direct links using the "rel" construct and by switching the position of the resources involved
in the link.</t>
<section title="HTTP Link Document Format: application/linkset" anchor="linkset-native">
<t>This document format is identical to the payload of the
HTTP "Link" header field as defined in Section 3 of
<xref target="RFC8288"/>, more specifically by
its ABNF production rule for "Link" and subsequent ones.
Whereas the HTTP "Link" Header field depends on HTTP and hence on <xref target="RFC0822"/> for its
encoding, the format specified here is encoded as UTF-8 <xref target="RFC3629"/>.</t>
<t>The assigned media type for this format is "application/linkset".</t>
<t>In order to support use cases where "application/linkset" documents are re-used
outside the context of an HTTP interaction,
it is RECOMMENDED to make them self-contained by adhering to the following guidelines:</t>
<t><list style="symbols">
<t>For every link provided in the set of links, explicitly provide the link context
using the "anchor" attribute.</t>
<t>For link context ("anchor" attribute) and link target
("href" attribute), use absolute URIs (as defined in Section 4.3 of <xref target="RFC3986"/>).
</t>
</list></t>
<t>If these recommendations are not followed, interpretation of links in "application/linkset" documents will depend on
which URI is used as context.</t>
<t>It should be noted that the "application/linkset" format specified here is different than the "application/link-format"
format specified in <xref target="RFC6690"/> in that the former fully matches the
payload of the HTTP "Link" header as defined in Section 3 of <xref target="RFC8288"/>, whereas
the latter introduces constraints on that definition to meet requirements for Constrained RESTful Environments.</t>
</section>
<section title="JSON Document Format: application/linkset+json" anchor="linkset-json">
<t>This document format uses JSON <xref target="RFC8259"/> as the syntax to represent
a set of links. The set of links follows the abstract model defined by Web Linking <xref target="RFC8288"/>.</t>
<t>The assigned media type for this format is "application/linkset+json".</t>
<t>In order to support use cases where "application/linkset+json" documents are re-used
outside the context of an HTTP interaction,
it is RECOMMENDED to make them self-contained by adhering to the following guidelines:</t>
<t><list style="symbols">
<t>For every link provided in the set of links, explicitly provide the link context
using the "anchor" member.</t>
<t>For link context ("anchor" member) and link target
("href" member), use absolute URIs (as defined in Section 4.3 of <xref target="RFC3986"/>).</t>
</list></t>
<t>If these recommendations are not followed, interpretation of "application/linkset+json" will depend on which URI is used as context URI.</t>
<t>The "application/linkset+json" serialization is designed such that it can directly be used as the
content of a JSON-LD serialization by adding an appropriate context.
<xref target="appendix-1"/> shows an example of a possible context that, when added to
a JSON serialization, allows it to be interpreted as RDF.</t>
<section title="Set of Links" anchor="linkset-in-json">
<t>In the JSON representation of a set of links:</t>
<t><list style="symbols">
<t>A set of links MUST be represented as a JSON object which MUST have "linkset" as its sole member.</t>
<t>The "linkset" member is an array in which a distinct JSON object -
the "link context object" (see <xref target="linkset-json-link-context-object"/>) -
MUST be used to represent links that have the same link context.</t>
<t>If necessary, the "linkset" member MAY contain information in addition to link context objects, in which case
that information MUST NOT change the semantics of the links provided by those link context objects.</t>
<t>Even if there is only one link context object, it MUST be wrapped in an array.
Members other than link context objects MUST NOT be included
in this array.</t>
</list></t>
</section>
<section title="Link Context Object" anchor="linkset-json-link-context-object">
<t>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:</t>
<t><list style="symbols">
<t>Each link context object MUST have an "anchor" member with a value that represents
the link context. This value SHOULD be an absolute URI
as defined in Section 4.3 of <xref target="RFC3986"/>. Cases whereby no value is to be provided
for the "anchor" member (i.e. the resource providing the set of links is the link context for each link
in the link context object) MUST be handled by providing an "anchor" member with null value ("anchor": "").</t>
<t>For each distinct relation type that the link context has with link targets,
a link context object MUST have an additional member.
This member is an array in which a distinct JSON object
- the "link target object" (see <xref target="linkset-json-link-target-object"/>) -
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:</t>
<t><list style="symbols">
<t>For registered relation types <xref target="RFC8288"/>,
the name of this member is the registered name of the relation type.</t>
<t>For extension relation types <xref target="RFC8288"/>,
the name of this member is the URI that uniquely represents the relation type.</t>
</list></t>
<t>Even if there is only one link target object it MUST be wrapped in an array.
Members other than link target objects MUST NOT be included
in this array.</t>
</list></t>
</section>
<section title="Link Target Object" anchor="linkset-json-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>
<t><list style="symbols">
<t>Each link target object MUST have an "href" member with a value that represents
the link target. This value SHOULD be an absolute URI
as defined in Section 4.3 of <xref target="RFC3986"/>. Cases whereby no value is to be provided
for the "href" member (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 null value ("href": "").</t>
<t>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 <xref target="json-target-attributes"/>.</t>
</list></t>
<t>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.</t>
<figure>
<artwork align="left" type="JSON"><![CDATA[
{
"linkset":
[
{ "anchor": "http://example.net/bar",
"next": [
{"href": "http://example.com/foo"}
]
}
]
}]]>
</artwork>
</figure>
<t>The following example of a JSON-serialized set of links represents two links
that share link context and relation type but have different link targets.
</t>
<figure>
<artwork align="left" type="JSON"><![CDATA[
{
"linkset":
[
{ "anchor": "http://example.net/bar",
"item": [
{"href": "http://example.com/foo1"},
{"href": "http://example.com/foo2"}
]
}
]
}]]>
</artwork>
</figure>
<t>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, the other is an extension relation type.</t>
<figure>
<artwork align="left" type="JSON"><![CDATA[
{
"linkset":
[
{ "anchor": "http://example.net/bar",
"next": [
{"href": "http://example.com/foo1"}
]
},
{ "anchor": "http://example.net/boo",
"http://example.com/relations/baz" : [
{"href": "http://example.com/foo2"}
]
}
]
}]]>
</artwork>
</figure>
</section>
<section title="Link Target Attributes" anchor="json-target-attributes">
<t>A link may be further qualified by target attributes. Three types of attributes exist:</t>
<t><list style="symbols">
<t>Attributes defined by the serialization of <xref target="RFC8288">Web Linking</xref>.</t>
<t>Extension attributes defined and used by communities as allowed by
<xref target="RFC8288"/>.</t>
<t>Internationalized versions of the "title" attribute defined by <xref target="RFC8288"/> and of extension attributes
allowed by <xref target="RFC8288"/>.</t>
<!--
<t>Attributes defined by <xref target="I-D.nottingham-link-hint">Link Hints</xref> and the associated HTTP Link Hint Registry.</t>
-->
</list></t>
<t>The handling of these different types of attributes is described in the sections below.</t>
<section title="Target Attributes Defined by Web Linking" anchor="json-target-attributes-existing">
<t>RFC 8288 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:</t>
<t><list style="symbols">
<t>"hreflang": The optional and repeatable "hreflang" target attribute
MUST be represented by an array (even if there only is 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 - which follows the same
model as in the <xref target="RFC8288"/> syntax.</t>
<t>"media": The optional and not repeatable "media" target attribute 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 in the <xref target="RFC8288"/> syntax.</t>
<t>"type": The optional and not repeatable "type" target attribute 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"/> syntax.</t>
<t>"title": The optional and not repeatable "title" target attribute MUST be represented by a "title"
member in the link target object, and its value MUST be a string that follows
the same model as in the <xref target="RFC8288"/> syntax.</t>
<t>"title*": The optional and not repeatable "title*" target attribute
is motivated by character encoding
and language issues and follows the model defined in <xref target="RFC8187"/>.
The details of the JSON
representation that applies to title* are described in
<xref target="linkset-json-i18n-link-parameter"/>.
</t>
</list></t>
<t>The following example illustrates how the repeatable "hreflang" and the
not repeatable "type" target attributes are represented in a link target object.</t>
<figure>
<artwork align="left" type="JSON"><![CDATA[
{
"linkset":
[
{ "anchor": "http://example.net/bar",
"next": [
{"href": "http://example.com/foo",
"type": "text/html",
"hreflang": [ "en" , "de" ]
}
]
}
]
}]]>
</artwork>
</figure>
</section>
<section title="Internationalized Target Attributes" anchor="linkset-json-i18n-link-parameter">
<t>In addition to the target attributes described in <xref target="json-target-attributes-existing"/>,
<xref target="RFC8288"/> also supports
attributes that follow the content model of <xref target="RFC8187"/>.
In <xref target="RFC8288"/>, these target
attributes are recognizable by the use of a trailing asterisk in the attribute name,
such as "title*".
The content model of <xref target="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.</t>
<t>The JSON serialization for these target attributes MUST be
as follows:</t>
<t><list style="symbols">
<t>An internationalized target attribute is represented as a member of the link context object with
the same name (including the *) of the attribute.</t>
<t>The character encoding information
as prescribed by <xref target="RFC8187"/> is not preserved; instead, the
content of the internationalized attribute is represented in the character encoding used for the JSON set of links.</t>
<t>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 object 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 object is "language" and
its value is the language tag <xref target="RFC5646"/>
for the language in which the attribute content is conveyed.
</t>
</list></t>
<t>The following example illustrates how the "title*" target attribute
defined by <xref target="RFC8288"/> is represented in a link target object.</t>
<figure>
<artwork align="left" type="JSON"><![CDATA[
{
"linkset":
[
{ "anchor": "http://example.net/bar",
"next": [
{"href": "http://example.com/foo",
"type": "text/html",
"hreflang": [ "en" , "de" ],
"title": "Next chapter",
"title*": [ { "value": "nachstes Kapitel" , "language" : "de" } ]
}
]
}
]
}]]>
</artwork>
</figure>
<t>The above example assumes that the German title contains an umlaut character (in the native 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. This is not shown in the above example due to the limitations of RFC publication.
Implementations MUST properly decode/encode internationalized target attributes that follow the model of <xref target="RFC8187"/> when transcoding between the "application/linkset" and the "application/linkset+json" formats.</t>
</section>
<section title="Extension Target Attributes" anchor="json-target-attributes-extension">
<t>Extension target attributes are attributes that are not defined by RFC 8288
(as listed in <xref target="json-target-attributes-existing"/>), 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.</t>
<t>The JSON serialization for these target attributes MUST be
as follows:</t>
<t><list style="symbols">
<t>An extension target attribute is represented as a member of the link context object with the same name of the attribute, including the * if applicable.</t>
<t>The value of an extension attribute MUST be represented by an array, even if there only is one value to be represented.</t>
<t>If the extension target attribute does not have a name with a trailing asterisk,
then each value in that array MUST be a string that represents one value
of the attribute.</t>
<t>If the extension attribute has a name with a trailing asterisk
(it follows the content model of <xref target="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 <xref target="linkset-json-i18n-link-parameter"/>.</t>
</list></t>
<t>The example shows a link target object with three extension 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.
The last extension target attribute ("baz*") follows the naming rule of <xref target="RFC8187"/> and therefore is encoded according to the serialization described in <xref target="linkset-json-i18n-link-parameter"/>. </t>
<figure>
<artwork align="left" type="JSON"><![CDATA[
{
"linkset":
[
{ "anchor": "http://example.net/bar",
"next": [
{ "href": "http://example.com/foo",
"type": "text/html",
"foo": [ "foovalue" ],
"bar": [ "barone", "bartwo" ],
"baz*": [ { "value": "bazvalue" , "language" : "en" } ]
}
]
}
]
}]]>
</artwork>
</figure>
</section>
<!--
<section title="Target Attributes in the HTTP Link Hints Registry" 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 Registry, and a set of attributes to initially populate that registry.
The initial registry, for example, includes the "allow" 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 MUST 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 registered in the HTTP Link Hint Registry.</t>
<t>The value of a Link Hint target attribute MUST adhere to the content model specified for the attribute in the HTTP Link Hint Registry.</t>
<t>Internationalization of Link Hint target attributes 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 is registered in the HTTP Link Hint Registry.
The registry specifies the content model for this attribute as an array of strings. Therefor, that same content model is used in the "application/linkset+json"
serialization of sets of links.</t>
<figure>
<artwork align="left" type="JSON"><![CDATA[
{
"linkset":
[
{ "anchor": "http://example.net/bar",
"next": [
{ "href": "http://example.com/foo",
"type": "text/html",
"allow": [ "GET", "POST" ]]
}
]
}
]
}]]>
</artwork>
</figure>
</section>
-->
</section>
</section>
</section>
<section title='The "linkset" Relation Type for Linking to a Set of Links' anchor="linkset-link-relation">
<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 participates.</t>
<t>A link with the "linkset" relation type MAY be provided in the header and/or
the body of a resource's representation. It may also be discovered by other means, such as through
client-side information.</t>
<t>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.</t>
<!-- <t>The use of a link with the "linkset" relation
type does not preclude the provision of links with other relation types,
i.e. the resource that is the link context can provide typed links 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>A user agent that follows a "linkset" link MUST be aware that the set of links provided by the resource that is the target of the link
can contain links in which the resource that is the context of the link does not participate; it MAY decide to ignore those links.</t>
<t>A user agent that follows a "linkset" link and obtains links for which anchors and targets are not expressed as
absolute URIs MUST properly determine what the context is for these links; it SHOULD ignore links for which it is unable to
unambiguously make that determination.</t>
<!--
<t>There is no constraint on the target URI of a link with the "linkset" relation type;
designing and using these URIs is left to the discretion of implementers.</t>
<t>In common scenarios (the origin resource is distinct from the
linkset resource), it is essential for linkset representations to
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 linkset 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 resource 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 title="Examples" anchor="linkset-link-examples">
<t><xref target="linkset-link-link-format"/> and <xref target="linkset-link-json-format"/>
show examples whereby the set of links are provided as "application/linkset" and "application/linkset+json" documents, respectively.
<xref target="linkset-rel-example"/> illustrates the use of the "linkset" link relation type to support discovery of sets of links.
</t>
<section title="Set of Links Provided as application/linkset" anchor="linkset-link-link-format">
<t><xref target="Request1"/> shows a client issuing an
HTTP GET request against resource <http://example.org/resource1>.</t>
<figure title="Client HTTP GET request" align="center" anchor="Request1">
<artwork align="left"><![CDATA[
GET /resource1 HTTP/1.1
Host: example.org
Connection: close
]]>
</artwork>
</figure>
<t><xref target="Response1.1"/> shows the response to the GET request of
<xref target="Request1"/>. The response contains a Content-Type header
specifying that the media type of the response is "application/linkset". A set of links, including links that pertain
to the responding resource, is provided in the response body.
</t>
<figure title="Response to HTTP GET includes a set of links" align="center" anchor="Response1.1">
<artwork align="left"><![CDATA[
HTTP/1.1 200 OK
Date: Mon, 12 Aug 2019 10:35:51 GMT
Server: Apache-Coyote/1.1
Content-Length: 855
Content-Type: application/linkset; charset=UTF-8
Connection: close
<http://authors.example.net/johndoe>
; rel="author"
; type="application/rdf+xml"
; anchor="http://example.org/resource1",
<http://authors.example.net/janedoe>
; rel="author"
; type="application/rdf+xml"
; anchor="http://example.org/resource1",
<http://example.org/resource1/items/AF48EF.pdf>
; rel="item"
; type="application/pdf"
; anchor="http://example.org/resource1",
<http://example.org/resource1/items/CB63DA.html>
; rel="item"
; type="text/html"
; anchor="http://example.org/resource1",
<http://example.org/resource1>
; rel="latest-version"
; anchor="http://example.org/resource41/",
<http://example.org/resource40>
; rel="prev"
; anchor="http://example.org/resource41/",
<http://authors.example.net/alice>
; rel="author"
; anchor="http://example.org/resource1/items/CB63DA.html#comment-1"
]]>
</artwork>
</figure>
</section>
<section title="Set of Links Provided as application/linkset+json" anchor="linkset-link-json-format">
<t><xref target="Request4"/> shows the client issuing an HTTP GET
request against <http://example.com/links/article/7507>.
In the request, the client uses an "Accept" header to indicate it prefers a response in the
"application/linkset+json" format.
</t>
<figure title="Client HTTP GET request expressing preference for "application/linkset+json" response" align="center" anchor="Request4">
<artwork align="left"><![CDATA[
GET links/article/7507 HTTP/1.1
Host: example.com
Accept: application/linkset+json
Connection: close
]]></artwork>
</figure>
<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>
<figure title="Response to the client's request for the set of links" align="center" anchor="Response4.1">
<artwork align="left"><![CDATA[
HTTP/1.1 200 OK
Date: Mon, 12 Aug 2019 10:46:22 GMT
Server: Apache-Coyote/1.1
Content-Type: application/linkset+json
Content-Length: 802
{
"linkset": [
{
"anchor": "https://example.org/article/view/7507",
"author": [
{
"href": "https://orcid.org/0000-0002-1825-0097"
}
],
"item": [
{
"href": "https://example.org/article/7507/item/1",
"type": "application/pdf"
},
{
"href": "https://example.org/article/7507/item/2",
"type": "text/csv"
}
],
"cite-as": [
{
"href": "https://doi.org/10.5555/12345680",
"title": "A Methodology for the Emulation of Architecture"
}
]
},
{
"anchor": "https://example.com/links/article/7507",
"alternate": [
{
"href": "https://mirror.example.com/links/article/7507",
"type": "application/linkset"
}
]
}
]
}]]>
</artwork>
</figure>
</section>
<section title="Discovering a Link Set via the "linkset" Link Relation Type" anchor="linkset-rel-example">
<t><xref target="Request3"/> shows a client issuing an
HTTP HEAD request against resource
<http://example.org/article/view/7507>.</t>
<figure title="Client HTTP HEAD request" align="center" anchor="Request3">
<artwork align="left"><![CDATA[
HEAD article/view/7507 HTTP/1.1
Host: example.org
Connection: close
]]>
</artwork>
</figure>
<t><xref target="Response3.1"/> shows the response to the HEAD request of
<xref target="Request3"/>. The response contains a "Link" header with
a link that has the "linkset" relation type. It indicates that a set of links is provided
by resource <http://example.com/links/article/7507>, which
provides a representation with media type "application/linkset+json".
</t>
<figure title="Response to HTTP HEAD request" align="center" anchor="Response3.1">
<artwork align="left"><![CDATA[
HTTP/1.1 200 OK
Date: Mon, 12 Aug 2019 10:45:54 GMT
Server: Apache-Coyote/1.1
Link: <http://example.com/links/article/7507>
; rel="linkset"
; type="application/linkset+json"
Content-Length: 236
Content-Type: text/html;charset=utf-8
Connection: close
]]>
</artwork>
</figure>
<t><xref target="linkset-link-json-format"/> shows a client obtaining a set of links by issuing an HTTP GET on the
target of the link with the "linkset" relation type, <http://example.com/links/article/7507>.</t>
</section>
</section>
<section title="Implementation Status" anchor="implementation-status">
<t>Note to RFC Editor: Please remove this section before publication.</t>
<t>This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on a proposal described in RFC 6982 <xref target="RFC6982"/>. The description of implementations in this section is intended to assist the IETF 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 not 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 6982, "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature. It is up to the individual working groups to use this information as they see fit".</t>
<section title="GS1" anchor="implementation-GS1">
<t>GS1 is a provider of barcodes (GS1 GTINs and EAN/UPC) for retail products and manages an ecology of services and standards to leverage them at a global scale.
GS1 has indicated that it will implement this "linkset" specification as a means to allow requesting and representing links pertaining to products from various retailers.
Currently, the GS1 Digital Link specification makes an informative reference
to version 03 of the "linkset" I-D. GS1 expresses confidence that this will become a normative reference in the
next iteration of that specification, likely to be ratified as a GS1 standard around February 2021.</t>
</section>
<section title="FAIR Signposting Profile" anchor="implementation-signposting">
<t>The FAIR Signposting Profile is a community specification aimed 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 specification encourages the use of Linksets and
initial implementations are ongoing, for example, for the open source Dataverse data repository platform
that was initiated by Harvard University and is meanwhile used by research institutions, worldwide.</t>
</section>
<section title="Open Journal Systems (OJS)" anchor="implementation-ojs">
<t>Open Journal Systems (OJS) is an open-source software for the management of peer-reviewed academic journals, and is created by the Public Knowledge Project (PKP), released under the GNU General Public License. Open Journal Systems (OJS) is a journal management and publishing system that has been developed by PKP through its federally funded efforts to expand and improve access to research.</t>
<t>The OJS platform has implemented "linkset" support as an alternative way to provide links when there are more than a configured limit (they consider using about 10 as a good default, for testing purpose it is currently set to 8).</t>
</section>
</section>
<section title="IANA Considerations" anchor="iana-considerations">
<section title="Link Relation Type: linkset">
<t>The link relation type below has been registered by IANA per Section 6.2.1 of Web Linking <xref target="RFC8288"/>:</t>
<t>
<list>
<t>Relation Name: linkset</t>
<t>Description: The Target IRI of a link with the "linkset" relation type
provides a set of links, including links in which the Context IRI of the link participates.</t>
<t>Reference: [[ This document ]]</t>
</list>
</t>
</section>
<section title="Media Type: application/linkset">
<section title="IANA Considerations" anchor="iana">
<t>The Internet media type <xref target="RFC6838"/> for a natively encoded linkset is application/linkset.</t>
<t>
<list>
<t>Type name: application</t>
<t>Subtype name: linkset</t>
<t>Required parameters: none</t>
<t>Optional parameters: none</t>
<t>Encoding considerations: Linksets are encoded according to the definition of <xref target="RFC8288"/>. The encoding of <xref target="RFC8288"/> is based on the general encoding rules of <xref target="RFC7230"/>, with the addition of allowing indicating character encoding and language for specific parameters as defined by <xref target="RFC8187"/>.</t>
<t>Security considerations: The security considerations of [[ This document ]] apply.</t>
<t>Interoperability considerations: The interoperability considerations of <xref target="RFC7230"/> apply.</t>
<t>Published specification: [[ This document ]]</t>
<t>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.</t>
<t>Additional information:
<list>
<t>Magic number(s): N/A</t>
<t>File extension(s): This media type does not propose a specific extension.</t>
<t>Macintosh file type code(s): TEXT</t>
</list>
</t>
<t>Person & email address to contact for further information: Erik Wilde <[email protected]></t>
<t>Intended usage: COMMON</t>
<t>Restrictions on usage: none</t>
<t>Author: Erik Wilde <[email protected]></t>
<t>Change controller: IETF</t>
</list>
</t>
</section>
</section>
<section title="Media Type: application/linkset+json">
<t>The Internet media type <xref target="RFC6838"/> for a JSON-encoded linkset is application/linkset+json.</t>
<t>
<list>
<t>Type name: application</t>
<t>Subtype name: linkset+json</t>
<t>Required parameters: none</t>
<t>Optional parameters: none</t>
<t>Encoding considerations: The encoding considerations of <xref target="RFC8259"/> apply</t>
<t>Security considerations: The security considerations of [[ This document ]] apply.</t>
<t>Interoperability considerations: The interoperability considerations of <xref target="RFC8259"/> apply.</t>
<t>Published specification: [[ This document ]]</t>
<t>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.</t>
<t>Additional information:
<list>
<t>Magic number(s): N/A</t>
<t>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.</t>
<t>Macintosh file type code(s): TEXT</t>
</list>
</t>
<t>Person & email address to contact for further information: Erik Wilde <[email protected]></t>
<t>Intended usage: COMMON</t>
<t>Restrictions on usage: none</t>
<t>Author: Erik Wilde <[email protected]></t>
<t>Change controller: IETF</t>
</list>
</t>
</section>
</section>
<section title="Security Considerations" anchor="security-considerations">
<t>The security considerations of Web Linking <xref target="RFC8288"/> apply, as long as they are not specifically discussing the risks of exposing information in HTTP 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 "hidden URIs" that are not supposed to be openly shared, and 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.</t>
<t>For the specific mechanisms defined in this specification, two security considerations should be taken into account:</t>
<t>
<list style="symbols">
<t>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 stand-alone resources.</t>
<t>The model introduced in this specification supports "3rd 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 3rd party to allow it to provide these links. Applications may choose to treat 3rd party links differently than cases where a resource and the links for that resource are provided by the same party.</t>
</list>
</t>
</section>
</middle>
<back>
<references title="Normative References">
&RFC2119;
&RFC8174;
&RFC8259;
&RFC7230;
&RFC7231;
&RFC8288;
&RFC8187;
&RFC3986;
&RFC6838;
&RFC5646;
&RFC6982;
&RFC0822;
&RFC3629;
&RFC6690;
<!--
&I-D.nottingham-link-hint;
-->
<!--
<reference anchor="W3C.REC-html401-19991224">
<front>
<title abbrev="Media Queries">Media Queries</title>
<author initials="F." surname="Rivoal" fullname="Florian Rivoal"/>
<date month="June" year="2012"/>
</front>
<seriesInfo name="World Wide Web Consortium" value="Recommendation REC-css3-mediaqueries-20120619"/>
</reference>
-->
<!--
<reference anchor="RFC6690">
<front>
<title>Constrained RESTful Environments (CoRE) Link Format</title>
<author initials="Z." surname="Shelby" fullname="Zach Shelby"/>
<date month="August" year="2012"/>
</front>
<seriesInfo name="RFC" value="6690"/>
</reference>
-->
</references>
<references title="Informative References">
&W3CJSONLD;
&RFC4287;
&RFC5988;
</references>
<section title="Acknowledgements">
<t>Thanks for comments and suggestions provided by Phil Archer, Dominique Guinard, Mark Nottingham, Stian Soiland-Reyes, and Sarven Capadisli.</t>
</section>
<section title="JSON-LD Context" anchor="appendix-1">
<t>A set of links rendered according to the
JSON serialization defined in <xref target="linkset-json"/> can be interpreted
as RDF triples by adding a <xref target="W3C.REC-json-ld-20140116">JSON-LD context</xref> that maps
the JSON keys to corresponding Linked Data terms. And, as per <xref target="W3C.REC-json-ld-20140116"/>
<eref target="https://www.w3.org/TR/2014/REC-json-ld-20140116/#interpreting-json-as-json-ld">section 6.8</eref>,
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.</t>
<t>Using the latter approach to support discovery of a JSON-LD Context, the response to the GET request of
<xref target="Request4"/> against the URI of a set of links would be as shown in <xref target="contextlinkrel"/>.</t>
<figure title="Using a typed link to support discovery of a JSON-LD Context for a Set of Links" anchor="contextlinkrel">
<artwork align="left"><![CDATA[
HTTP/1.1 200 OK
Date: Mon, 12 Aug 2019 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: 846
{
"linkset": [
{
"anchor": "https://example.org/article/view/7507",
"author": [
{
"href": "https://orcid.org/0000-0002-1825-0097"
}
],
"item": [
{
"href": "https://example.org/article/7507/item/1",
"type": "application/pdf"
},
{
"href": "https://example.org/article/7507/item/2",
"type": "text/csv"
}
],
"cite-as": [
{
"href": "https://doi.org/10.5555/12345680",
"title": "A Methodology for the Emulation of Architecture"
}
]
},
{
"anchor": "https://example.com/links/article/7507",
"alternate": [
{
"href": "https://mirror.example.com/links/article/7507",
"type": "application/linkset"
}
]
}
]
}]]>
</artwork>
</figure>
<t>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 <xref target="jsonld-context"/>. This particular JSON-LD context maps "application/linkset+json" representations of link sets
to Dublin Core Terms. It also renders each link relation as an absolute URI, inspired by the same approach used for <xref target="RFC4287">Atom</xref> described in <xref target="RFC8288"/>
<eref target="https://tools.ietf.org/html/rfc8288#appendix-A.2">appendix A.2</eref>.
</t>
<figure title="JSON-LD Context mapping to schema.org and IANA assignments" anchor="jsonld-context">
<artwork align="left"><![CDATA[
HTTP/1.1 200 OK
Content-Type: application/ld+json
Content-Length: 638
{
"@context": [
{
"@vocab": "http://www.iana.org/assignments/relation/",
"anchor": "@id",
"href": "@id",
"linkset": "@graph",
"_linkset": "@graph",