-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.html
1666 lines (1562 loc) · 82.9 KB
/
index.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head profile="http://www.w3.org/2006/03/hcard http://dublincore.org/documents/2008/08/04/dc-html/">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<title>Application-Level Profile Semantics (ALPS) </title>
<style type="text/css" title="Xml2Rfc (sans serif)">
/*<![CDATA[*/
a {
text-decoration: none;
}
/* info code from SantaKlauss at http://www.madaboutstyle.com/tooltip2.html */
a.info {
/* This is the key. */
position: relative;
z-index: 24;
text-decoration: none;
}
a.info:hover {
z-index: 25;
color: #FFF; background-color: #900;
}
a.info span { display: none; }
a.info:hover span.info {
/* The span will display just on :hover state. */
display: block;
position: absolute;
font-size: smaller;
top: 2em; left: -5em; width: 15em;
padding: 2px; border: 1px solid #333;
color: #900; background-color: #EEE;
text-align: left;
}
a.smpl {
color: black;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: underline;
}
address {
margin-top: 1em;
margin-left: 2em;
font-style: normal;
}
body {
color: black;
font-family: verdana, helvetica, arial, sans-serif;
font-size: 10pt;
max-width: 55em;
}
cite {
font-style: normal;
}
dd {
margin-right: 2em;
}
dl {
margin-left: 2em;
}
ul.empty {
list-style-type: none;
}
ul.empty li {
margin-top: .5em;
}
dl p {
margin-left: 0em;
}
dt {
margin-top: .5em;
}
h1 {
font-size: 14pt;
line-height: 21pt;
page-break-after: avoid;
}
h1.np {
page-break-before: always;
}
h1 a {
color: #333333;
}
h2 {
font-size: 12pt;
line-height: 15pt;
page-break-after: avoid;
}
h3, h4, h5, h6 {
font-size: 10pt;
page-break-after: avoid;
}
h2 a, h3 a, h4 a, h5 a, h6 a {
color: black;
}
img {
margin-left: 3em;
}
li {
margin-left: 2em;
margin-right: 2em;
}
ol {
margin-left: 2em;
margin-right: 2em;
}
ol p {
margin-left: 0em;
}
p {
margin-left: 2em;
margin-right: 2em;
}
pre {
margin-left: 3em;
background-color: lightyellow;
padding: .25em;
}
pre.text2 {
border-style: dotted;
border-width: 1px;
background-color: #f0f0f0;
width: 69em;
}
pre.inline {
background-color: white;
padding: 0em;
}
pre.text {
border-style: dotted;
border-width: 1px;
background-color: #f8f8f8;
width: 69em;
}
pre.drawing {
border-style: solid;
border-width: 1px;
background-color: #f8f8f8;
padding: 2em;
}
table {
margin-left: 2em;
}
table.tt {
vertical-align: top;
}
table.full {
border-style: outset;
border-width: 1px;
}
table.headers {
border-style: outset;
border-width: 1px;
}
table.tt td {
vertical-align: top;
}
table.full td {
border-style: inset;
border-width: 1px;
}
table.tt th {
vertical-align: top;
}
table.full th {
border-style: inset;
border-width: 1px;
}
table.headers th {
border-style: none none inset none;
border-width: 1px;
}
table.left {
margin-right: auto;
}
table.right {
margin-left: auto;
}
table.center {
margin-left: auto;
margin-right: auto;
}
caption {
caption-side: bottom;
font-weight: bold;
font-size: 9pt;
margin-top: .5em;
}
table.header {
border-spacing: 1px;
width: 95%;
font-size: 10pt;
color: white;
}
td.top {
vertical-align: top;
}
td.topnowrap {
vertical-align: top;
white-space: nowrap;
}
table.header td {
background-color: gray;
width: 50%;
}
table.header a {
color: white;
}
td.reference {
vertical-align: top;
white-space: nowrap;
padding-right: 1em;
}
thead {
display:table-header-group;
}
ul.toc, ul.toc ul {
list-style: none;
margin-left: 1.5em;
margin-right: 0em;
padding-left: 0em;
}
ul.toc li {
line-height: 150%;
font-weight: bold;
font-size: 10pt;
margin-left: 0em;
margin-right: 0em;
}
ul.toc li li {
line-height: normal;
font-weight: normal;
font-size: 9pt;
margin-left: 0em;
margin-right: 0em;
}
li.excluded {
font-size: 0pt;
}
ul p {
margin-left: 0em;
}
.comment {
background-color: yellow;
}
.center {
text-align: center;
}
.error {
color: red;
font-style: italic;
font-weight: bold;
}
.figure {
font-weight: bold;
text-align: center;
font-size: 9pt;
}
.filename {
color: #333333;
font-weight: bold;
font-size: 12pt;
line-height: 21pt;
text-align: center;
}
.fn {
font-weight: bold;
}
.hidden {
display: none;
}
.left {
text-align: left;
}
.right {
text-align: right;
}
.title {
color: #990000;
font-size: 18pt;
line-height: 18pt;
font-weight: bold;
text-align: center;
margin-top: 36pt;
}
.vcardline {
display: block;
}
.warning {
font-size: 14pt;
background-color: yellow;
}
@media print {
.noprint {
display: none;
}
a {
color: black;
text-decoration: none;
}
table.header {
width: 90%;
}
td.header {
width: 50%;
color: black;
background-color: white;
vertical-align: top;
font-size: 12pt;
}
ul.toc a::after {
content: leader('.') target-counter(attr(href), page);
}
ul.ind li li a {
content: target-counter(attr(href), page);
}
.print2col {
column-count: 2;
-moz-column-count: 2;
column-fill: auto;
}
}
@page {
@top-left {
content: "Internet-Draft";
}
@top-right {
content: "December 2010";
}
@top-center {
content: "Abbreviated Title";
}
@bottom-left {
content: "Doe";
}
@bottom-center {
content: "Expires June 2011";
}
@bottom-right {
content: "[Page " counter(page) "]";
}
}
@page:first {
@top-left {
content: normal;
}
@top-right {
content: normal;
}
@top-center {
content: normal;
}
}
/*]]>*/
</style>
<link href="#rfc.toc" rel="Contents">
<link href="#rfc.section.1" rel="Chapter" title="1 Introduction">
<link href="#rfc.section.1.1" rel="Chapter" title="1.1 Notational Conventions">
<link href="#rfc.section.1.2" rel="Chapter" title="1.2 Motivation">
<link href="#rfc.section.1.2.1" rel="Chapter" title="1.2.1 Describing Domain-Specific Semantics">
<link href="#rfc.section.1.2.2" rel="Chapter" title="1.2.2 ALPS-based Server Implementations">
<link href="#rfc.section.1.2.3" rel="Chapter" title="1.2.3 ALPS-based Client Implementations">
<link href="#rfc.section.1.3" rel="Chapter" title="1.3 A Simple ALPS Example">
<link href="#rfc.section.1.4" rel="Chapter" title="1.4 Identifying an ALPS Document">
<link href="#rfc.section.2" rel="Chapter" title="2 ALPS Documents">
<link href="#rfc.section.2.1" rel="Chapter" title="2.1 Compliance">
<link href="#rfc.section.2.2" rel="Chapter" title="2.2 ALPS Document Properties">
<link href="#rfc.section.2.2.1" rel="Chapter" title="2.2.1 'alps'">
<link href="#rfc.section.2.2.2" rel="Chapter" title="2.2.2 'contentType'">
<link href="#rfc.section.2.2.3" rel="Chapter" title="2.2.3 'def'">
<link href="#rfc.section.2.2.4" rel="Chapter" title="2.2.4 'descriptor'">
<link href="#rfc.section.2.2.5" rel="Chapter" title="2.2.5 'doc'">
<link href="#rfc.section.2.2.6" rel="Chapter" title="2.2.6 'ext'">
<link href="#rfc.section.2.2.7" rel="Chapter" title="2.2.7 'format'">
<link href="#rfc.section.2.2.8" rel="Chapter" title="2.2.8 'href'">
<link href="#rfc.section.2.2.9" rel="Chapter" title="2.2.9 'id'">
<link href="#rfc.section.2.2.10" rel="Chapter" title="2.2.10 'link'">
<link href="#rfc.section.2.2.11" rel="Chapter" title="2.2.11 'name'">
<link href="#rfc.section.2.2.12" rel="Chapter" title="2.2.12 'rel'">
<link href="#rfc.section.2.2.13" rel="Chapter" title="2.2.13 'rt'">
<link href="#rfc.section.2.2.14" rel="Chapter" title="2.2.14 'tag'">
<link href="#rfc.section.2.2.15" rel="Chapter" title="2.2.15 'title'">
<link href="#rfc.section.2.2.16" rel="Chapter" title="2.2.16 'type'">
<link href="#rfc.section.2.2.17" rel="Chapter" title="2.2.17 'value'">
<link href="#rfc.section.2.2.18" rel="Chapter" title="2.2.18 'version'">
<link href="#rfc.section.2.3" rel="Chapter" title="2.3 ALPS Representations">
<link href="#rfc.section.2.3.1" rel="Chapter" title="2.3.1 Sample HTML">
<link href="#rfc.section.2.3.2" rel="Chapter" title="2.3.2 XML Representation Example">
<link href="#rfc.section.2.3.3" rel="Chapter" title="2.3.3 JSON Representation Example">
<link href="#rfc.section.3" rel="Chapter" title="3 Applying ALPS documents to Existing Media Types">
<link href="#rfc.section.3.1" rel="Chapter" title="3.1 Linking to ALPS Documents">
<link href="#rfc.section.4" rel="Chapter" title="4 IANA Considerations">
<link href="#rfc.section.4.1" rel="Chapter" title="4.1 application/alps+xml">
<link href="#rfc.section.4.2" rel="Chapter" title="4.2 application/alps+json">
<link href="#rfc.section.5" rel="Chapter" title="5 Internationalization Considerations">
<link href="#rfc.section.6" rel="Chapter" title="6 Acknowledgements">
<link href="#rfc.references" rel="Chapter" title="7 Normative References">
<link href="#rfc.appendix.A" rel="Chapter" title="A Frequently Asked Questions">
<link href="#rfc.appendix.A.1" rel="Chapter" title="A.1 Why are there no URLs in ALPS?">
<link href="#rfc.appendix.A.2" rel="Chapter" title="A.2 Why is there no workflow component in the ALPS specification?">
<link href="#rfc.appendix.A.3" rel="Chapter" title="A.3 Why is there no way to indicate ranges for semantic descriptors?">
<link href="#rfc.authors" rel="Chapter">
<meta name="generator" content="xml2rfc version 2.40.0 - https://tools.ietf.org/tools/xml2rfc" />
<link rel="schema.dct" href="http://purl.org/dc/terms/" />
<meta name="dct.creator" content="Amundsen, M., Richardson, L., and M. Foster" />
<meta name="dct.identifier" content="urn:ietf:id:draft-amundsen-richardson-foster-alps-07" />
<meta name="dct.issued" scheme="ISO8601" content="2021-19" />
<meta name="dct.abstract" content="This document describes ALPS, a data format for defining simple descriptions of application-level semantics, similar in complexity to HTML microformats. An ALPS document can be used as a profile to explain the application semantics of a document with an application-agnostic media type (such as HTML, HAL, Collection+JSON, Siren, etc.). This increases the reusability of profile documents across media types. " />
<meta name="description" content="This document describes ALPS, a data format for defining simple descriptions of application-level semantics, similar in complexity to HTML microformats. An ALPS document can be used as a profile to explain the application semantics of a document with an application-agnostic media type (such as HTML, HAL, Collection+JSON, Siren, etc.). This increases the reusability of profile documents across media types. " />
</head>
<body>
<table class="header">
<tbody>
<tr>
<td class="left">Network Working Group</td>
<td class="right">M. Amundsen</td>
</tr>
<tr>
<td class="left">Internet-Draft</td>
<td class="right"></td>
</tr>
<tr>
<td class="left">Intended status: Informational</td>
<td class="right">L. Richardson</td>
</tr>
<tr>
<td class="left">Expires: November 20, 2021</td>
<td class="right"></td>
</tr>
<tr>
<td class="left"></td>
<td class="right">M. Foster</td>
</tr>
<tr>
<td class="left"></td>
<td class="right">May 19, 2021</td>
</tr>
</tbody>
</table>
<p class="title">Application-Level Profile Semantics (ALPS) <br />
<span class="filename">draft-amundsen-richardson-foster-alps-07</span></p>
<h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1>
<p>This document describes ALPS, a data format for defining simple descriptions of application-level semantics, similar in complexity to HTML microformats. An ALPS document can be used as a profile to explain the application semantics of a document with an application-agnostic media type (such as HTML, HAL, Collection+JSON, Siren, etc.). This increases the reusability of profile documents across media types. </p>
<h1><a>Editorial Note (To be removed by RFC Editor)</a></h1>
<p>Distribution of this document is unlimited. Comments should be sent to the IETF Media-Types mailing list (see <span><</span><a href="https://www.ietf.org/mailman/listinfo/media-types">https://www.ietf.org/mailman/listinfo/media-types</a><span>></span>). </p>
<h1 id="rfc.status"><a href="#rfc.status">Status of This Memo</a></h1>
<p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.</p>
<p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.</p>
<p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."</p>
<p>This Internet-Draft will expire on November 20, 2021.</p>
<h1 id="rfc.copyrightnotice"><a href="#rfc.copyrightnotice">Copyright Notice</a></h1>
<p>Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
<p>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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.</p>
<hr class="noprint" />
<h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1>
<ul class="toc">
<li>1. <a href="#rfc.section.1">Introduction</a>
</li>
<ul><li>1.1. <a href="#rfc.section.1.1">Notational Conventions</a>
</li>
<li>1.2. <a href="#rfc.section.1.2">Motivation</a>
</li>
<ul><li>1.2.1. <a href="#rfc.section.1.2.1">Describing Domain-Specific Semantics</a>
</li>
<li>1.2.2. <a href="#rfc.section.1.2.2">ALPS-based Server Implementations</a>
</li>
<li>1.2.3. <a href="#rfc.section.1.2.3">ALPS-based Client Implementations</a>
</li>
</ul><li>1.3. <a href="#rfc.section.1.3">A Simple ALPS Example</a>
</li>
<li>1.4. <a href="#rfc.section.1.4">Identifying an ALPS Document</a>
</li>
</ul><li>2. <a href="#rfc.section.2">ALPS Documents</a>
</li>
<ul><li>2.1. <a href="#rfc.section.2.1">Compliance</a>
</li>
<li>2.2. <a href="#rfc.section.2.2">ALPS Document Properties</a>
</li>
<ul><li>2.2.1. <a href="#rfc.section.2.2.1">'alps'</a>
</li>
<li>2.2.2. <a href="#rfc.section.2.2.2">'contentType'</a>
</li>
<li>2.2.3. <a href="#rfc.section.2.2.3">'def'</a>
</li>
<li>2.2.4. <a href="#rfc.section.2.2.4">'descriptor'</a>
</li>
<li>2.2.5. <a href="#rfc.section.2.2.5">'doc'</a>
</li>
<li>2.2.6. <a href="#rfc.section.2.2.6">'ext'</a>
</li>
<li>2.2.7. <a href="#rfc.section.2.2.7">'format'</a>
</li>
<li>2.2.8. <a href="#rfc.section.2.2.8">'href'</a>
</li>
<li>2.2.9. <a href="#rfc.section.2.2.9">'id'</a>
</li>
<li>2.2.10. <a href="#rfc.section.2.2.10">'link'</a>
</li>
<li>2.2.11. <a href="#rfc.section.2.2.11">'name'</a>
</li>
<li>2.2.12. <a href="#rfc.section.2.2.12">'rel'</a>
</li>
<li>2.2.13. <a href="#rfc.section.2.2.13">'rt'</a>
</li>
<li>2.2.14. <a href="#rfc.section.2.2.14">'tag'</a>
</li>
<li>2.2.15. <a href="#rfc.section.2.2.15">'title'</a>
</li>
<li>2.2.16. <a href="#rfc.section.2.2.16">'type'</a>
</li>
<li>2.2.17. <a href="#rfc.section.2.2.17">'value'</a>
</li>
<li>2.2.18. <a href="#rfc.section.2.2.18">'version'</a>
</li>
</ul><li>2.3. <a href="#rfc.section.2.3">ALPS Representations</a>
</li>
<ul><li>2.3.1. <a href="#rfc.section.2.3.1">Sample HTML</a>
</li>
<li>2.3.2. <a href="#rfc.section.2.3.2">XML Representation Example</a>
</li>
<li>2.3.3. <a href="#rfc.section.2.3.3">JSON Representation Example</a>
</li>
</ul></ul><li>3. <a href="#rfc.section.3">Applying ALPS documents to Existing Media Types</a>
</li>
<ul><li>3.1. <a href="#rfc.section.3.1">Linking to ALPS Documents</a>
</li>
</ul><li>4. <a href="#rfc.section.4">IANA Considerations</a>
</li>
<ul><li>4.1. <a href="#rfc.section.4.1">application/alps+xml</a>
</li>
<li>4.2. <a href="#rfc.section.4.2">application/alps+json</a>
</li>
</ul><li>5. <a href="#rfc.section.5">Internationalization Considerations</a>
</li>
<li>6. <a href="#rfc.section.6">Acknowledgements</a>
</li>
<li>7. <a href="#rfc.references">Normative References</a>
</li>
<li>Appendix A. <a href="#rfc.appendix.A">Frequently Asked Questions</a>
</li>
<ul><li>A.1. <a href="#rfc.appendix.A.1">Why are there no URLs in ALPS?</a>
</li>
<li>A.2. <a href="#rfc.appendix.A.2">Why is there no workflow component in the ALPS specification?</a>
</li>
<li>A.3. <a href="#rfc.appendix.A.3">Why is there no way to indicate ranges for semantic descriptors?</a>
</li>
</ul><li><a href="#rfc.authors">Authors' Addresses</a>
</li>
</ul>
<h1 id="rfc.section.1">
<a href="#rfc.section.1">1.</a> Introduction</h1>
<p id="rfc.section.1.p.1">This document describes ALPS, a media type for defining simple descriptions of application-level semantics, similar in complexity to HTML microformats. These descriptions contain both human-readable and machine-readable explanations of the semantics. An ALPS document can be used as a profile to explain the application semantics of a document with an application-agnostic media type (such as HTML, HAL, Collection+JSON, Siren. etc.). </p>
<p id="rfc.section.1.p.2">This document identifies a registry for ALPS documents, (The ALPS Profile Registry or APR). The details of this registry, its goals, and operations are covered in a separate document (TBD). </p>
<p id="rfc.section.1.p.3">This document also identifies a process for authoring, publishing, and sharing normative human-readable instructions on applying an ALPS document as a profile to responses of a given media type. For example, a document that describes how to apply the semantics of an ALPS profile to an HTML document. </p>
<p id="rfc.section.1.p.4">This document registers two media-type identifiers with the IANA: 'application/alps+xml' ('ALPS+XML') and 'application/alps+json' ('ALPS+JSON'). </p>
<h1 id="rfc.section.1.1">
<a href="#rfc.section.1.1">1.1.</a> Notational Conventions</h1>
<p id="rfc.section.1.1.p.1">The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <a href="#RFC2119" class="xref">[RFC2119]</a>. </p>
<h1 id="rfc.section.1.2">
<a href="#rfc.section.1.2">1.2.</a> Motivation</h1>
<p id="rfc.section.1.2.p.1">When implementing a hypermedia client/server application using a general media type (HTML, Atom, Collection+JSON, etc.), client and server instances need to share an understanding of domain-specific information such as data element names, link relation values, and state transfer parameters. This information is directly related to the application being implemented (e.g. accounting, contact management, etc.) rather than the media type used in the representations. </p>
<h1 id="rfc.section.1.2.1">
<a href="#rfc.section.1.2.1">1.2.1.</a> Describing Domain-Specific Semantics</h1>
<p id="rfc.section.1.2.1.p.1">Instead of creating and registering an entirely new media type (i.e. 'application/accounting'), representation authors can create an ALPS document that describes a 'profile' of the target domain; one that explains the vital domain-specific semantic descriptors and state transitions. This profile can then be consistently applied to a wide range of media types by server implementors and successfully consumed by client applications. The focus on defining application-level semantics, independent of transfer protocol or media type, makes it possible to serve application-specific representations using an application-agnostic media type. </p>
<h1 id="rfc.section.1.2.2">
<a href="#rfc.section.1.2.2">1.2.2.</a> ALPS-based Server Implementations</h1>
<p id="rfc.section.1.2.2.p.1">Server implementors can use ALPS documents as a basis for building domain-specific solutions without having to create their own custom media type or re-invent the vocabulary and transition set for a common domain (e.g. accounting, microblogging, etc.). Using a preexisting ALPS profile as a guide, servers can map internal data to commonly-understood semantic descriptors and state transitions, increasing the likelihood that existing client applications (those who share the same understanding of the ALPS document) will be able to successfully interact with that server. </p>
<h1 id="rfc.section.1.2.3">
<a href="#rfc.section.1.2.3">1.2.3.</a> ALPS-based Client Implementations</h1>
<p id="rfc.section.1.2.3.p.1">Armed with a document's ALPS profile, client applications can associate the ALPS descriptor 'id' and/or 'name' attribute values with the appropriate elements within the document. Client applications can 'code for the profile' and better adjust to detailed changes to the response layout, or even the wholesale replacement of one media type with another. </p>
<h1 id="rfc.section.1.3">
<a href="#rfc.section.1.3">1.3.</a> <a href="#example" id="example">A Simple ALPS Example</a>
</h1>
<p id="rfc.section.1.3.p.1">Below is an ALPS document that describes elements of a simple request/response interaction in a contact management application. The profile defines a semantic descriptor called 'contact', and three subordinate descriptors ('fullName', 'email', and 'phone'). </p>
<p id="rfc.section.1.3.p.2">The ALPS document also defines a single, safe state transition, to be represented by a hypermedia control (e.g. HTML.GET form) with the 'id' value of 'collection.' This hypermedia control has one input value ('nameSearch'). When executed, the response will contain one or more 'contact' type items. </p>
<pre>
<alps version="1.0">
<doc format="text">A contact list.</doc>
<link rel="help" href="http://example.org/help/contacts.html" />
<!-- a hypermedia control for returning contacts -->
<descriptor id="collection" type="safe" rt="contact">
<doc>
A simple link/form for getting a list of contacts.
</doc>
<descriptor id="nameSearch" type="semantic">
<doc>Input for a search form.</doc>
</descriptor>
</descriptor>
<!-- a contact: one or more of these may be returned -->
<descriptor id="contact" type="semantic">
<descriptor id="item" type="safe">
<doc>A link to an individual contact.</doc>
</descriptor>
<descriptor id="fullName" type="semantic" />
<descriptor id="email" type="semantic" />
<descriptor id="phone" type="semantic" />
</descriptor>
</alps>
</pre>
<p class="figure">ALPS Contact Profile document</p>
<p id="rfc.section.1.3.p.3">Implementing the ALPS profile above requires implementing the descriptors defined by the ALPS document. In this case, there are two 'top level' descriptors: the safe state transition ('collection') and the semantic descriptor 'contact'. Below is a single HTML document that shows both these elements in a representation. </p>
<pre>
<html>
<head>
<link href="http://alps.io/profiles/contact"
rel="profile" />
<link href="http://alps.io/profiles/contact#contact"
rel="type" />
<link href="http://example.org/help/contacts.html"
rel="help" />
</head>
<body>
<form class="collection"
method="get"
action="http://example.org/contacts/">
<label>Name:</label>
<input name="nameSearch" value="" />
<input type="submit" value="Search" />
</form>
<table>
<tr class="contact">
<td>
<a href="http://example.org/contacts/1"
rel="item">
<span class="fullName">Ann Arbuckle</span>
</a>
</td>
<td>
<span class="email">[email protected]</span>
</td>
<td>
<span class="phone">123.456.7890</span>
</td>
</tr>
<tr>
<td>
<a href="http://example.org/contacts/100"
rel="item">
<span class="fullName">Zelda Zackney</span>
</a>
</td>
<td>
<span class="email">[email protected]</span>
</td>
<td>
<span class="phone">098.765.4321</span>
</td>
</tr>
</table>
</body>
</html>
</pre>
<p class="figure">HTML ALPS Contact Representation</p>
<p id="rfc.section.1.3.p.4">HTML representations implement most ALPS elements using HTML's 'class' attribute. The 'collection' ID has become the CSS class of an HTML form's submit button. The 'contact' ID has become the CSS class of the TR elements in an HTML table. The subordinate descriptors 'fullname','email', and 'phone' are rendered as the TD elements of each TR. </p>
<p id="rfc.section.1.3.p.5">This HAL document uses the same profile to express the same application-level semantics as the HTML document. </p>
<pre>
<resource href="http://example.org/contacts/">
<link href="http://alps.io/profiles/contacts#contact"
rel="type" />
<link href="http://example.org/help-file/contacts.html"
rel="help" />
<link rel="collection"
href="http://example.org/contacts/{?nameSearch}"
templated="true" />
<resource rel="item" href="http://example.org/contacts/1">
<link href="http://alps.io/profiles/contacts#contact"
rel="type" />
<fullName>Ann Arbuckle</fullName>
<email>[email protected]</email>
<phone>123.456.7890</phone>
</resource>
<resource rel="item" href="http://example.org/contacts/100">
<link href="http://alps.io/profiles/contacts#contact"
rel="type" />
<fullName>Zelda Zackney</fullName>
<email>[email protected]</email>
<phone>987.664.3210</phone>
</resource>
</resource>
</pre>
<p class="figure">HAL XML Contacts Representation</p>
<p id="rfc.section.1.3.p.6">In a HAL representation, all state transitions ('collection' and 'item', in this case) are represented as link relations. All data descriptors ('fullName', 'email', and 'phone') are represented as XML tags named after the descriptors. </p>
<p id="rfc.section.1.3.p.7">This Collection+JSON document uses the ALPS profile to express the same application-level semantics as the HTML and HAL documents. </p>
<pre>
{
"collection" : {
"version" : "1.0",
"href" : "http://example.org/contacts/",
"links" : [
{
"rel" : "profile",
"href" : "http://alps.io/profiles/contacts"
},
{
"rel" : "help",
"href" : "http://example.org/help/contacts.html"
},
{
"rel" : "type",
"href" : "http://alps.io/profiles/contacts#contact"
}
],
"queries" : [
{
"rel" : "collection",
"rt" : "contact",
"href" : "http://example.org/contacts/",
"data" : [
{
"name" : "nameSearch",
"value" : "",
"prompt" : "Search Name"
}
]
}
],
"items" : [
{
"href" : "http://example.org/contacts/1",
"rel" : "item",
"rt" : "contact",
"data" : [
{"name" : "fullName", "value" : "Ann Arbuckle"},
{"name" : "email", "value" : "[email protected]"},
{"name" : "phone", "value" : "123.456.7890"}
],
"links" : [
{
"rel" : "type",
"href" : "http://alps.io/profiles/contacts#contact"
}
]
},
{
"href" : "http://example.org/contacts/100",
"rel" : "item",
"rt" : "contact",
"data" : [
{
"name" : "fullName",
"value" : "Zelda Zackney"
},
{
"name" : "email",
"value" : "[email protected]"
},
{
"name" : "phone",
"value" : "987.654.3210"
}
],
"links" : [
{
"rel" : "type",
"href" : "http://alps.io/profiles/contacts#contact"
}
]
}
]
}
}
</pre>
<p class="figure">Collection+JSON Contacts Representation</p>
<p id="rfc.section.1.3.p.8">The descriptor 'collection' has become the link relation associated with a Collection+JSON query. The descriptors 'fullName', 'email', and 'phone' have become the names of key-value pairs in the items in a Collection+JSON collection. </p>
<h1 id="rfc.section.1.4">
<a href="#rfc.section.1.4">1.4.</a> Identifying an ALPS Document</h1>
<p id="rfc.section.1.4.p.1">An ALPS vocabulary is identified by a unique URL. This SHOULD be a URL that can be dereferenced. All ALPS URLs MUST be unique and all ALPS documents intended for public consumption SHOULD be registered in an ALPS Registry [TK: add text on where/how to find registries -mamund]. </p>
<p id="rfc.section.1.4.p.2">In order to reduce load on servers responding to ALPS document requests, it is RECOMMENDED that servers use cache control directives that instruct client apps to locally cache the results. Clients making these ALPS document requests SHOULD honor the server's caching directives. </p>
<h1 id="rfc.section.2">
<a href="#rfc.section.2">2.</a> ALPS Documents</h1>
<p id="rfc.section.2.p.1">An ALPS document contains a machine-readable collection of identifying strings and their human-readable explanations. An ALPS document can be represented in either XML or JSON format. This section identifies the general elements and properties of an ALPS document, their meaning, and their use, independent of how the document is represented. <a href="#representations" class="xref">Section 2.3</a> provides specific details on constructing a valid ALPS document in XML and in JSON format. </p>
<h1 id="rfc.section.2.1">
<a href="#rfc.section.2.1">2.1.</a> Compliance</h1>
<p id="rfc.section.2.1.p.1">An implementation is not compliant if it fails to satisfy one or more of the MUST or REQUIRED level requirements. An implementation that satisfies all the MUST or REQUIRED level and all the SHOULD level requirements is said to be 'unconditionally compliant'; one that satisfies all the MUST level requirements but not all the SHOULD level requirements is said to be 'conditionally compliant.' </p>
<h1 id="rfc.section.2.2">
<a href="#rfc.section.2.2">2.2.</a> ALPS Document Properties</h1>
<p id="rfc.section.2.2.p.1">The ALPS media type defines a small set of properties. These properties appear in both the XML and JSON formats. Below is a list of the properties that can appear in an ALPS document. </p>
<h1 id="rfc.section.2.2.1">
<a href="#rfc.section.2.2.1">2.2.1.</a> <a href="#prop-alps" id="prop-alps">'alps'</a>
</h1>
<p id="rfc.section.2.2.1.p.1">Indicates the root of the ALPS document. This property is REQUIRED, and it SHOULD have one or more <a href="#prop-descriptor" class="xref">'descriptor'</a> child properties. </p>
<p id="rfc.section.2.2.1.p.2">Examples: </p>
<dl>
<dt>XML:</dt>
<dd style="margin-left: 8"><alps>...</alps> </dd>
<dt>JSON:</dt>
<dd style="margin-left: 8">{ "alps" : ... } </dd>
</dl>
<p> </p>
<h1 id="rfc.section.2.2.2">
<a href="#rfc.section.2.2.2">2.2.2.</a> <a href="#prop-contentType" id="prop-contentType">'contentType'</a>
</h1>
<p id="rfc.section.2.2.2.p.1">This is a property of the <a href="#prop-doc" class="xref">'doc'</a> element. It indicates the media type of the content enclosed by the <a href="#prop-doc" class="xref">'doc'</a> element. This is an OPTIONAL property and it MAY be ignored by document parsers. It's value SHOULD be an Internet Media Type (see <a href="#RFC2045" class="xref">[RFC2045]</a>). </p>
<p></p>
<dl>
<dt>NOTE:</dt>
<dd style="margin-left: 8">Media-type values are registered with the Internet Assigned Number Authority (see <a href="#RFC2045" class="xref">[RFC2045]</a>). The use of non-registered media types is discouraged. </dd>
</dl>
<p> </p>
<p id="rfc.section.2.2.2.p.3">The 'contentType' property and the <a href="#prop-format" class="xref">'format'</a> property serve the same purpose. When the 'contentType' property appears it SHOULD be used. If both the <a href="#prop-format" class="xref">'format'</a> and the 'contentType' property appears, the <a href="#prop-format" class="xref">'format'</a> SHOULD be ignored. If the 'contentType' property does not appear and the <a href="#prop-format" class="xref">'format'</a> does not appear, document parsers SHOULD assume the 'contentType' value is set to text/plain. Since some ALPS document parsers MAY only understand the <a href="#prop-format" class="xref">'format'</a> property, even when document writers include the 'contentType' property, they should also be sure that any exsiting <a href="#prop-format" class="xref">'format'</a> does not conflict with the supplied 'contentType' property. </p>
<p id="rfc.section.2.2.2.p.4">Examples: </p>
<dl>
<dt>XML:</dt>
<dd style="margin-left: 8"><doc contentType="text/html" > <![CDATA[ <h1>Help File</h1> <p>...</p> ]]> </doc> </dd>
<dt>JSON:</dt>
<dd style="margin-left: 8">{ "doc" : { "contentType" : "text/html", "value" : "<h1>Help File</h1><p>...</p>" } } </dd>
</dl>
<p> </p>
<h1 id="rfc.section.2.2.3">
<a href="#rfc.section.2.2.3">2.2.3.</a> <a href="#prop-def" id="prop-def">'def'</a>
</h1>
<p id="rfc.section.2.2.3.p.1">Contains a valid IRI (see <a href="#RFC3987" class="xref">[RFC3987]</a>) value that idenfities the source definition of the descriptor. This is a property of the <a href="#prop-descriptor" class="xref">'descriptor'</a> element and it is OPTIONAL. It MAY or MAY NOT be an IRI that can be dereferenced. </p>
<p id="rfc.section.2.2.3.p.2">Examples: </p>
<dl>
<dt>XML:</dt>
<dd style="margin-left: 8"><descriptor id="title" def="http://schema.org/title" /> </dd>
<dt>JSON:</dt>
<dd style="margin-left: 8">{ "descriptor" : [ {"id" : "title", "def":"http://schema.org/title" } ]} </dd>
</dl>
<p> </p>
<h1 id="rfc.section.2.2.4">
<a href="#rfc.section.2.2.4">2.2.4.</a> <a href="#prop-descriptor" id="prop-descriptor">'descriptor'</a>
</h1>
<p id="rfc.section.2.2.4.p.1">A 'descriptor' element defines the semantics of specific data elements or state transitions that MAY exist in an associated representation. </p>
<p id="rfc.section.2.2.4.p.2">One or more 'descriptor' elements SHOULD appear as children of <a href="#prop-alps" class="xref">'alps'</a>. It may also appear as a child of itself; that is, the 'descriptor' property may be nested. </p>
<p id="rfc.section.2.2.4.p.3">The 'descriptor' element MAY be represented as a single element or it MAY be represented as an array of single elements. </p>
<p id="rfc.section.2.2.4.p.4">The 'descriptor' property SHOULD have either an <a href="#prop-id" class="xref">'id'</a> or <a href="#prop-href" class="xref">'href'</a> attribute. It MAY have both. Additionally, the 'descriptor' MAY have any of the following attributes: </p>
<ol>
<li>
<a href="#prop-def" class="xref">'def'</a> </li>
<li>
<a href="#prop-doc" class="xref">'doc'</a> </li>
<li>
<a href="#prop-href" class="xref">'href'</a> </li>
<li>
<a href="#prop-name" class="xref">'name'</a> </li>
<li>
<a href="#prop-title" class="xref">'title'</a> </li>
<li>
<a href="#prop-type" class="xref">'type'</a> </li>
<li>
<a href="#prop-rel" class="xref">'rel'</a> </li>
<li>
<a href="#prop-tag" class="xref">'tag'</a> </li>
</ol>
<p> </p>
<p id="rfc.section.2.2.4.p.5">If present, the 'def' property SHOULD be contain a valid IRI (see <a href="#RFC3987" class="xref">[RFC3987]</a>). This IRI MAY or MAY NOT be one that can be dereferenced. </p>
<p id="rfc.section.2.2.4.p.6">If present, the 'href' property MUST contain a URL that can be dereferenced that points to another 'descriptor' either within the current ALPS document or in another ALPS document. </p>
<p id="rfc.section.2.2.4.p.7">If 'descriptor' has an 'href' attribute, then 'descriptor' is inheriting all the attributes and sub-properties of the descriptor pointed to by 'href'. When 'descriptor' has a property defined locally, that property value takes precedence over any inherited property value. Since there is no limit to the nesting of elements -- even ones linked remotely -- it is important to process 'all descriptor' chains starting from the bottom to make sure you have collected all the available properties and have established the correct value for each of them. </p>
<p id="rfc.section.2.2.4.p.8">If 'descriptor' is declared at the top level of an ALPS document, then a client SHOULD assume that 'descriptor' can appear anywhere in a runtime message. </p>
<p id="rfc.section.2.2.4.p.9">If 'descriptor' is nested, i.e. declared as a child of another descriptor, then: </p>
<ol>
<li>A client SHOULD assume them to appear in any sibling 'descriptor' element and recursively in their child descriptors. </li>
<li>A client SHOULD NOT assume that it can appear anywhere outside of parent descriptor, unless it was explicitly referenced by another descriptor in 'href' attribute. In that case the same rules are applied to 'descriptor' containing 'href' attribute. </li>
</ol>
<p> </p>
<h1 id="rfc.section.2.2.4.1">
<a href="#rfc.section.2.2.4.1">2.2.4.1.</a> <a href="#prop-descriptor-link-relations" id="prop-descriptor-link-relations">'Descriptors and Link Relation Types'</a>
</h1>
<p id="rfc.section.2.2.4.1.p.1">When a representation is generated that includes state transitions, valid values for link relation types are: </p>
<p></p>
<ol>
<li>A registered link relation type (e.g. rel="edit", a short string) from from IANA, Microformats.org or other registries. </li>
<li>An extension link relation type as defined by <a href="#RFC8288" class="xref">[RFC8288]</a> whose value is the fully-qualified URI of an associated document describing the relation type. This includes URI fragment identifiers of ALPS descriptors (e.g. rel="http://alps.io/profiles/item#purchased-by", a URI) per the conventions of <a href="#prop-id-frag" class="xref">Section 2.2.9.2</a>. </li>
<li>The 'id' property of a state transition descriptor of an associated ALPS document (e.g. rel="purchased-by", a short string) per the conventions of section <a href="#prop-id-name" class="xref">Section 2.2.9.1</a> and <a href="#prop-id-rels" class="xref">Section 2.2.9.3</a> if the representation includes an ALPS profile. </li>
</ol>
<p> </p>
<h1 id="rfc.section.2.2.5">
<a href="#rfc.section.2.2.5">2.2.5.</a> <a href="#prop-doc" id="prop-doc">'doc'</a>
</h1>
<p id="rfc.section.2.2.5.p.1">A text field that contains free-form, usually human-readable, text. The 'doc' element MAY be represented as a single element or it MAY be represented as an array of single elements. </p>
<p id="rfc.section.2.2.5.p.2">The 'doc' element MAY have the following properties: <a href="#prop-href" class="xref">'href'</a>, <a href="#prop-format" class="xref">'format'</a>, and <a href="#prop-tag" class="xref">'tag'</a>. </p>
<p id="rfc.section.2.2.5.p.3">If the 'href' property appears it SHOULD contain a URL that can be dereferenced which points to human-readable text. If the 'format' property appears it SHOULD contain one of the following values: 'text', 'html', 'asciidoc', or 'markdown'. Any program processing 'doc' elements SHOULD honor the 'format' directive and parse/render the content appropriately. If the value in the 'format' property is not recognized and/or supported, the processing program MUST treat the content as plain text. If no 'format' property is present, the content SHOULD be treated as plain text. </p>
<p></p>
<dl>
<dt>NOTE:</dt>
<dd style="margin-left: 8">In the XML representation of ALPS documents, the contents of the 'doc' element SHOULD be enclosed by <!CDATA[ and ]]>. Even when not enclosed, the contents of the XML 'doc' element MUST be treated as a string when parsing the ALPS document. </dd>
</dl>
<p> </p>
<p></p>
<dl>
<dt>XML:</dt>
<dd style="margin-left: 8"><doc format="html"> <![CDATA[ <h1>Date of Birth</h1> <p>...</p> ]]> </doc> </dd>
<dt>JSON:</dt>
<dd style="margin-left: 8">{ "doc" : { "format" : "text" , "value" : "Date of Birth ..." } } </dd>
</dl>
<p> </p>
<p id="rfc.section.2.2.5.p.6">A 'doc' element SHOULD appear as a child of <a href="#prop-descriptor" class="xref">'descriptor'</a>. When present, it describes the meaning and use of the related 'descriptor'. </p>
<dl>
<dt>XML:</dt>
<dd style="margin-left: 8"><descriptor ... > <doc><![CDATA[...]]></doc> </descriptor> </dd>
<dt>JSON:</dt>
<dd style="margin-left: 8">{ "descriptor" : [ { "doc" : { "value" : "..." } ... ] } </dd>
</dl>
<p> </p>
<p id="rfc.section.2.2.5.p.7">The 'doc' element MAY appear as a child of <a href="#prop-alps" class="xref">'alps'</a>. When present, it describes the purpose of the ALPS document as a whole. </p>
<dl>
<dt>XML:</dt>
<dd style="margin-left: 8"><alps> <doc><![CDATA[...]]></doc> ... >/alps> </dd>
<dt>JSON:</dt>
<dd style="margin-left: 8">{ "alps : { "doc" : { "value" : "..." } } ... } </dd>
</dl>
<p> </p>
<h1 id="rfc.section.2.2.6">
<a href="#rfc.section.2.2.6">2.2.6.</a> <a href="#prop-ext" id="prop-ext">'ext'</a>
</h1>
<p id="rfc.section.2.2.6.p.1">The 'ext' element can be used to extend the ALPS document with author-specific information. It provides a way to customize ALPS documents with additional properties not covered in this specification. This is an OPTIONAL element. </p>
<p id="rfc.section.2.2.6.p.2">The 'ext' element MAY be represented as a single element or it MAY be represented as an array of single elements. </p>
<p id="rfc.section.2.2.6.p.3">The 'ext' element has the following properties. </p>
<ol>
<li>
<a href="#prop-id" class="xref">'id'</a> </li>
<li>
<a href="#prop-href" class="xref">'href'</a> </li>
<li>
<a href="#prop-value" class="xref">'value'</a> </li>
<li>
<a href="#prop-tag" class="xref">'tag'</a> </li>
</ol>
<p> </p>
<p id="rfc.section.2.2.6.p.4">The <a href="#prop-id" class="xref">'id'</a> property is REQUIRED. The <a href="#prop-href" class="xref">'href'</a> is RECOMMENDED and it SHOULD point to documentation that explains the use and meaning of this <a href="#prop-ext" class="xref">'ext'</a> element. The <a href="#prop-value" class="xref">'value'</a> property is OPTIONAL. The content is undetermined; its meaning and use SHOULD be explained by the document found by de-referencing the <a href="#prop-href" class="xref">'href'</a> property. </p>
<p id="rfc.section.2.2.6.p.5">Examples: </p>
<dl>
<dt>XML:</dt>
<dd style="margin-left: 8"><ext id="directions" href="http://alps.io/ext/directions" value="north south east west" > </dd>
<dt>JSON:</dt>
<dd style="margin-left: 8">{ "ext" : { "id" : "directions", "href" : "http://alps.io/ext/directions", value="north south east west" } } </dd>
</dl>
<p> </p>