-
Notifications
You must be signed in to change notification settings - Fork 5
/
atomactivity.xml
1020 lines (860 loc) · 48.3 KB
/
atomactivity.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 "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="exp" docName="atomactivity-00" ipr="none">
<front>
<title abbrev="AtomActivity">Atom Activity Extensions (Draft)</title>
<author fullname="Martin Atkins" initials="M." surname="Atkins">
<organization>Six Apart</organization>
</author>
<author fullname="David Recordon" initials="D." surname="Recordon">
<organization>Facebook</organization>
</author>
<author fullname="Chris Messina" initials="C." surname="Messina">
<organization>Citizen Agency</organization>
</author>
<author fullname="Monica Keller" initials="M." surname="Keller">
<organization>Facebook</organization>
</author>
<author fullname="Ari Steinberg" initials="A." surname="Steinberg">
<organization>Facebook</organization>
</author>
<author fullname="Rob Dolin" initials="R." surname="Dolin">
<organization>Microsoft</organization>
</author>
<date />
<abstract>
<t>This document presents an extension that allows activities on social
objects to be expressed within the Atom Syndication Format.</t>
</abstract>
<note title="Requirements Language">
<t>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 <xref
target="RFC2119">RFC 2119</xref>.</t>
</note>
</front>
<middle>
<section title="Introduction">
<t>This document presents an extension that allows activities on social
objects to be expressed within <xref target="RFC4287">the Atom
Syndication Format</xref>.</t>
</section>
<section title="Notational Conventions">
<t>The XML Namespaces URI [W3C.REC-xml-names-19990114] for the XML
elements and attributes described in this specification is: <spanx
style="verb">http://activitystrea.ms/spec/1.0/</spanx>.</t>
<t>In this document, this namespace is referred to as "the AtomActivity
namespace", and the namespace prefix "activity:" is used for the above
namespace URI. The namespace prefix "atom:" is used for the namespace
URI <spanx style="verb">http://www.w3.org/2005/Atom</spanx>. The
namespace prefix "thr:" is used for the namespace URI <spanx
style="verb">http://purl.org/syndication/thread/1.0</spanx>. The choices
of namespace prefix are arbitrary and not semantically significant.</t>
<t>This specification uses a shorthand form of terms from the XML
Infoset [W3C.REC-xml-infoset-20040204]. The phrase "Information Item" is
omitted when naming element and attribute information items. Therefore,
when this specification uses the term "element," it is referring to an
element information item in infoset terms. Likewise, when this
specification uses the term "attribute," it is referring to an attribute
information item.</t>
<t>This specification allows the use of IRIs [RFC3987]. Every URI
[RFC3986] is also an IRI, so a URI may be used wherever an IRI is named.
When an IRI that is not also a URI is given for dereferencing, it MUST
be mapped to a URI using the steps in Section 3.1 of [RFC3987]. When an
IRI is serving as an identifier, it MUST NOT be so mapped.</t>
<t>The text of this specification provides the sole definition of
conformance. Examples in this specification are non-normative.</t>
<t>This specification uses "the Atom specification" to refer to <xref
target="RFC4287"></xref>.</t>
</section>
<section title="Activity Concepts">
<t>For the purpose of this specification, an activity is a description
of an action that was performed (the verb) at some instant in time by
some actor (the actor, as described in <xref
target="activityactor"></xref> ), with some social object (the object).
An activity feed is a feed of such activities.</t>
<t>An activity may also have a target, which is the object into which or
to which the action was done. Whether a target is allowed and the
specific meaning of a target is defined by each verb.</t>
<t>It is expected that in many cases consumers of activity feeds will
use them to turn machine readable descriptions of activities into
human-readable sentences such as "Joanne posted a Photo: 'My Cat'". The
process for forming such sentences is not defined by this
specification.</t>
<section title="Verbs and Object Types">
<t>Verbs and object types are identified by IRIs (verb and object
identifiers) as defined by <xref target="RFC3987"></xref> though these
IRIs MAY not resolve to any useful resource. One verb is defined by
this specification in <xref target="postverb"></xref>.</t>
<t>Other specifications MAY define further verb and object types with
corresponding IRIs. Such specifications MUST define the meaning of
these verb and object identifiers, and SHOULD also describe how any
additional properties of the verb or object type are to be encoded in
an Atom entry.</t>
<t>Verbs and object types MAY derive from other verbs and object
types. The properties required by the parents will also be required by
the derived types. For example, if there is a base object type image
and a derived type of photo, all properties that are defined for image
are also defined for photo. Consumers that do not support the photo
object type may use their recognition of the image object type as a
fallback when processing an object of type photo.</t>
</section>
</section>
<section anchor="activityentries" title="Activity Entries">
<t>An activity entry is an entry element as described by the Atom
specification that represents an activity. The actor of the activity
entry is the author of the entry. The verbs and object of the activity
are identified explicitly in the Activity entry as described in the
following sections. An Atom entry is considered to be an activity entry
if and only if it has at least one <spanx style="verb">activity:verb</spanx>
child element and one or more <spanx style="verb">activity:object</spanx>
child elements as described in the following sections.</t>
<section anchor="titlesummarydetail"
title="Activity Title, Summary and Detail">
<t>In an activity entry, the <spanx style="verb">atom:title</spanx>,
<spanx style="verb">atom:summary</spanx> and <spanx style="verb">atom:content</spanx>
elements as described by <xref target="RFC4287"></xref> MUST contain a
human-readable description of the activity. This text will be used by
general Atom processors that do not understand this extension. This
text MAY also be used by feed processors that do not recognize the
verb. Any other non-activity elements may be used in an activity entry
to effect a desired handling by non-activity processors.</t>
<t>Feed producers MAY use information from outside sources to choose a
suitable language to use for the activity description. For example, a
feed producer responding to an HTTP request might use the HTTP
Accept-Language header or a user preference otherwise determined to
select a language. Feed producers SHOULD use <spanx style="verb">xml:lang</spanx>
as described in <xref target="RFC4287"></xref> section 2 to identify
the language used.</t>
</section>
<section title="Time of the Activity">
<t>The time at which an activity occurred is represented in the
atom:published element within each activity entry. An activity entry
MUST have exactly one atom:published element.</t>
<t>The time stored herein is the time that the activity occurred,
<spanx>not</spanx> the time that the associated activity object was
published. Feed processors MAY use this element to sort a list of
activity entries into chronological order.</t>
</section>
<section title="Activity Link">
<t>An activity entry SHOULD include an atom:link element with a link
relationship of "alternate", a type of "text/html" and a href
attribute containing the URL of an HTML-based representation of this
activity or the associated object. Though this link does not have any
special significance in this specification, general Atom processors
that do not support the activity extensions will often present such a
link to the user.</t>
</section>
<section anchor="activityverbelement" title="Activity Verb">
<t>Verbs are represented using the activity:verb Extension Element.
All activity entries MUST have at least one activity:verb element.</t>
<t>The content of the activity:verb element MUST be a verb identifier
(an IRI as defined by <xref target="RFC3987"></xref>). Note that the
definition of IRI excludes relative references. Although the IRI MAY
use a dereferencable scheme, processors must not assume that it can be
dereferenced.</t>
<t>The verb identifier within this element defines a verb for this
activity. A given activity entry MAY have more than one activity:verb
element, which indicates that there are several verbs describing this
activity. Where multiple verbs are used, all verbs MUST be
generalizations or specializations of one another. For example, the
general verb "to experience" might be specialized by a verb "to listen
to". If a derived verb is used, publishers SHOULD also include all of
its ancestor types so that a consumer may use the most specific verb
it understands.</t>
<t>An activity feed processor SHOULD use the most specific verb it
understands within each entry. If none of the activity's verbs are
understood by the processor, the processor MAY use other information
to infer the verb, or the processor MAY use the content of the
atom:title, atom:summary and/or atom:content to obtain a
human-readable description of the activity as a fallback.</t>
<figure>
<artwork><![CDATA[<entry>
<id>tag:versioncentral.example.org,2009:/commit/1643245</id>
<published>2009-06-01T12:54:00Z</published>
<title>Geraldine committed a change to yate</title>
<content type="html">Geraldine just committed a change to yate on VersionCentral</content>
<link rel="alternate" type="text/html"
href="http://versioncentral.example.org/geraldine/yate/commit/1643245" />
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
<activity:verb>http://versioncentral.example.org/activity/commit</activity:verb>
<activity:object>
<activity:object-type>http://versioncentral.example.org/activity/changeset</activity:object-type>
<id>tag:versioncentral.example.org,2009:/change/1643245</id>
<title>Punctuation Changeset</title>
<summary>Fixing punctuation because it makes it more readable.</summary>
<link rel="alternate" type="text/html" href="..." />
</activity:object>
</entry>]]></artwork>
<postamble>Example: This example introduces a "changeset" object
type and a "commit" verb, both ficticious, invented for the
ficticious example service "VersionCentral". Since the "commit" verb
is a derived type of "post", VersionCentral's activity entries
include both the "post" verb and the "commit" verb so that consumers
which do not support their proprietary extension may fall back on
the "post" verb.</postamble>
</figure>
</section>
<section anchor="activityobjectelement" title="Activity Object">
<t>The object is represented using the activity:object extension
element. The activity:object element contains information about the
main object of the activity. All activity entries MUST have one or
more activity:object elements. The content model of activity:object is
identical to that of atom:entry when used to describe an object as
described in <xref target="objectentries"></xref>.</t>
<t>activity:object MUST contain exactly one atom:id element. If this
object is also published elsewhere, the atom:id value SHOULD be the
same in all representations.</t>
<t>activity:object SHOULD contain exactly one atom:title element,
whose value provides the human-readable display name for the
object.</t>
<t>activity:object SHOULD also contain exactly one atom:link element
with a link relationship of "alternate" and the type "text/html", with
the href attribute containing the URL of the HTML representation of
the object if available.</t>
<t>activity:object MAY also contain an atom:source element, as
described by the Atom specification, describing the feed where this
object resides. Processors MAY use this information to give context to
the activity. If an atom:source element is not present, the feed which
contains the object is the source.</t>
<t>activity:object MAY also contain a thr:in-reply-to element, as
described by <xref target="RFC4685"></xref>, identifying a second
object that this object is considered to be in reply to.</t>
<t>activity:object MAY contain additional elements whose meaning
depends on the definition of the object types identified in the
activity:object-type element as described in <xref
target="objecttypeelement"></xref>.</t>
<t>An activity entry and its associated object entry MUST NOT share
the same atom:id value.</t>
<t>If an activity entry contains more than one activity:object
element, that activity entry represents several activities. These
activities all share the same actor, target, verbs, and time
but use each activity:object element in turn. When a set of activities
is coalesced in this way it holds no special meaning to activity
processors; it is intended to allow publishers to provide
pre-coalesced activities to generic Atom consumers.</t>
<section anchor="objecttypeelement"
title="The activity:object-type Extension Element">
<t>The content of the activity:object-type element MUST be an object
identifier (an IRI as defined by <xref target="RFC3987"></xref>).
The definition of IRI excludes relative references. Though the IRI
MAY use a dereferenceable scheme, processors MUST not assume that it
can be dereferenced.</t>
<t>The object identifier within this element gives an object type
for the object described by this object entry. A given object entry
MAY have more than one activity:object-type element, which indicates
that this object has several types. Where multiple types are used,
all types MUST be generalizations or specializations of one another.
For example, the general type "web page" might be specialized by a
type "weblog entry". If a derived type is used, publishers SHOULD
also include all of its ancestor types so that a consumer may use
the most specific type it understands.</t>
<t>An object entry SHOULD have at least one activity:object-type
element.</t>
<t>Activity feed processors SHOULD use the most specific object type
that they understand within each entry. The processor MAY use other
information to infer the object type if it cannot understand any of
the object types given. If it cannot so infer the object type, a
processor MUST act as though no activity:object-type element is
present.</t>
<t>If no activity:object-type element is present, the object has no
specific type. Processors SHOULD refer to such objects only by their
titles. For example, when forming an activity sentence a processor
might say "Johan posted 'My Cat'" rather than "Johan posted a photo:
'My Cat'".</t>
</section>
</section>
<section title="Activity Target">
<t>The activity:target element contains information about the target
of the activity, for verbs that support a target. The target is the
object that the action was done to. The content model of <spanx
style="verb">activity:target</spanx> and the meaning of its child
elements are identical to that of <spanx style="verb">activity:object</spanx>.
The precise meaning of the target as relates to the activity depends
on the verb in use, but its meaning is somewhat similar to the English
preposition "to". The activity:target extension element MUST NOT be
used for indirect objects that are not targets.</t>
<t>For example, in <xref target="activityentrycomplex"></xref> the
target is a photo album to which photos were added.</t>
</section>
<section anchor="activityactor" title="Activity Actor">
<t>
The actor of an activity is identified by the atom:author element of the
activity entry. The Atom specification defines the atom:author element to
identify the author of an entry, feed, or source feed. This specification
extends the object model of atom:author to include the additional elements
defined for activity:object.
</t>
<t>
If an activity entry does not contain an atom:author element, a consumer
SHOULD use the atom:author of the contained atom:source element or of the
containing atom:feed, as defined in Section 4.2.1 of the Atom specification.
</t>
</section>
<section title="Activity Generator">
<t>
The atom:generator element is defined by the Atom specification as a
feed-level element for identifying the agent used to generate a feed.
This specification defines an additional use of the atom:generator
element as a child element of an activity. In this context, it
identifies the agent used to create that individual activity entry.
</t>
<t>
If an activity entry does not contain an atom:generator element, then
the atom:generator of the contained atom:source element is considered to
apply. In an Activity Feed Document, the atom:generator element of the
containing atom:feed element are considered to apply to the entry if
there are no atom:generator elements in the locations described above.
</t>
</section>
</section>
<section anchor="objectentries" title="Object Entries">
<t>An object entry is an entry element as described by the Atom
specification that represents the object of an activity. Any entry that
does not meet the criteria for being an activity entry as described in
<xref target="activityentries"></xref> is considered an object entry by
this specification. In particular, this means that a valid Atom entry
without any activity annotations is considered to be an object entry by
this specification.</t>
<t>Object entries are intended to be used by feeds that describe the
creation of content. In a valid object entry, all Atom elements SHOULD
describe the object that was created or otherwise the object of an
activity, rather than describing the activity itself.</t>
<t>The content model of an object entry is the same as that of an <spanx
style="verb">activity:object</spanx> element used within an activity
entry, as defined in <xref target="activityobjectelement"></xref>.</t>
<section anchor="impliedpost" title="Implied Activity">
<t>When used alone, outside of the context of an explicit activity
entry, an object entry has an implied activity. The implied activity
entry for an object entry is constructed as follows:</t>
<t><list style="numbers">
<t>Create an empty atom:entry element. This is the activity entry
element.</t>
<t>If the object entry has as a child at least one activity:verb
element, copy all such elements into the activity entry element.
Otherwise, insert into the activity entry element a new
activity:verb element containing the verb Identifier of the post
verb as described in <xref target="postverb"></xref>.</t>
<t>Copy the atom:published element from the object entry element
into the activity entry element.</t>
<t>Insert into the activity entry element a new activity:object
element.</t>
<t>Do a deep copy of all child elements of the object entry
element into the activity:object element, excluding activity:verb
and atom:published.</t>
<t>If the activity entry has as a child an activity:verb element
containing the verb Identifier of the post verb, copy the
atom:published element from the object entry to the
activity:object element.</t>
</list></t>
<t>Processors SHOULD generate suitable human-readable descriptions of
the action and insert them as described in <xref
target="titlesummarydetail"></xref>.</t>
<t>If the resulting entry will be published, processors SHOULD
generate suitable values for all other elements that the Atom
specification requires as children of atom:entry. In particular, an
atom:id value SHOULD be generated; this value MUST NOT be the same as
that of the object entry's atom:id.</t>
<t>If the resulting entry is to be published, processors MAY omit
elements from the generated activity:object element to reduce
overhead. Such processors SHOULD bear in mind the requirements in
<xref target="activityobjectelement"></xref>.</t>
<t>Processors expecting activity entries SHOULD apply the above
transformation to any object entries they encounter in order to
process them as activities, or at least act as if they have done
so.</t>
<t>Due to the way it is constructed, there is no way to represent
additional properties for the verb(s) of an implied activity. If a
particular verb requires additional properties then it MUST NOT be
used in an implied activity.</t>
<section title="The verbs for the Implied Activity">
<t>When appearing as a child of an object entry (that is, an entry
that does not also have an activity:object child element), the
content of the <spanx style="verb">activity:verb</spanx> element
MUST be the verb type of the implied activity for the object entry,
as defined in <xref target="impliedpost"></xref>. When used in this
way, the content model is identical to when used in an activity
entry as described in <xref
target="activityverbelement"></xref>.</t>
</section>
</section>
</section>
<section title="Activity Feeds">
<t>This specification defines no required extensions to the atom:feed
element as defined by the Atom specification. Therefore a standard Atom
feed that contains only activity entries as defined above can be
considered to be an activity feed. Processors MAY create an activity
entry representing the implied post activity of an object entry (see
<xref target="impliedpost"></xref>) in order to synthesize an activity
feed from a traditional Atom feed.</t>
<t>A feed MAY contain both activity and object entries.</t>
<section title="A Note about Legacy Feeds">
<t>This section is non-normative.</t>
<t>The implied post activity as described in <xref
target="impliedpost"></xref>, along with the advice about untyped
object entries in <xref target="objectentries"></xref>, are together
intended to provide a mechanism for processing traditional
non-activity Atom feeds as Activity Feeds. At the time of writing this
specification, most such feeds serve to describe the activity of
posting an item such as a weblog entry or a photo.</t>
<t>It is acknowledged, however, that there exist feeds that have other
meanings, such as a list of a particular user's "favorite" objects.
When applying the advice for processing feeds without activity
extensions to such feeds, a processor will likely misinterpret the
nature of the activity. In practice, however, it seems that most feeds
of this kind include something in the title indicating their nature,
so rendering such a misinterpreted activity to a sentence will lead to
something such as <spanx>Joe posted "Funny Cats" in "Joe's Favorite Videos"</spanx>,
which, while not ideal, is an acceptable result in situations where
activities are primarily for human consumption.</t>
</section>
</section>
<section anchor="postverb" title="The 'post' Verb">
<t>This specification defines a single verb, which has the verb
Identifier IRI <spanx style="verb">http://activitystrea.ms/schema/1.0/post</spanx>.</t>
<t>This verb describes the act of posting or publishing an object on the
web. The implication is that before this activity occurred the object
was not posted, and after the activity has occurred it <spanx>is</spanx>
posted or published.</t>
<t>This verb is used when creating the Implied post activity for a
standalone object entry that has no explicit verb. It MAY also be used
as the value of activity:verb in an explicit activity entry.</t>
<t>In an activity entry which has the 'post' verb, the value of the
atom:published element SHOULD be the same as the atom:published element
in the associated object entry.</t>
<t>If an activity using this verb has an <spanx style="verb">activity:target</spanx>
element, the target object is the collection in which the item was
posted.</t>
<t>The 'post' verb has no additional properties or modifiers.</t>
</section>
<section title="Requirements for Activity Re-publishers">
<t>An activity re-publisher is any system that produces feeds that
contain activities or objects that were obtained from another feed or
feed-like data source. This section contains requirements for such
systems that aim to allow consumers of such feeds to process the
activities described in such feeds in a way similar to how they would
have processed the activities when obtained directly from the source,
and to allow consumers to detect duplicate activities or objects
obtained via multiple feeds.</t>
<t>An activity re-publisher may choose to produce either object entries
or Activity Entries, except where the the re-publisher is re-publishing
an activity entry, in which case the activity entry MUST be produced to
avoid loss of information that cannot be expressed in an object
entry.</t>
<t>Where a re-publisher produces a full activity entry from a source
object entry, the mapping process described in <xref
target="impliedpost"></xref> MUST be used. A re-publisher MAY perform
additional mapping steps when doing this conversion.</t>
<t>Where a re-publisher produces a full activity entry from a source RSS
object entry, the mapping process described in <xref
target="rss"></xref> MUST be used. A re-publisher MAY perform additional
mapping steps when doing this conversion.</t>
<t>If a source object entry does not contain verb or object type
information, a re-publisher MAY use information obtained elsewhere to
synthesize appropriate verb or object type annotations.</t>
<t>When a re-publisher reproduces a source activity entry, the publisher
MUST copy the atom:id and atom:published elements from the source
activity entry without modification, and MUST similarly preserve the
contents of all elements in the AtomActivity namespace where these
elements are used correctly as per this specification. Additionally,
the re-publisher SHOULD copy the entry's atom:generator element without
modification, if present.</t>
<t>When a re-publisher reproduces an entry, the atom:source element MUST
be used in accordance with its definition in the Atom specification. A
re-publisher SHOULD include as much information as possible from the
source entry, paying special attention to data that is of significance
to the object type(s) and/or verb(s) used on the entry where these are
known to the re-publisher.</t>
<t>When a re-publisher produces a feed of activities aggregated from
multiple sources but known via some externally-obtained information to
be by the same actor, even if that actor is represented by a different
object in different source feeds, the re-publisher SHOULD create a
feed-level atom:author element that describes the re-publisher's
representation of the actor and then substitute this representation in
any atom:author, activity:object or activity:target element known to
represent the same actor.</t>
</section>
<section title="Security Considerations">
<t>As this specification defines an extension to the Atom Syndication
Format, it is subject to the same security considerations defined in
<xref target="RFC4287"></xref>.</t>
<t>
Publishers or Consumers implementing Activity Streams as a stream
of public data may also want to consider the potential for unsolicited
commercial or malicious content and should take preventative measures
to recognize such content and either identify it or not include it in
their stream implementations.
</t>
<t>
Publishers should take reasonable measures to make sure potentially
malicious user input such as cross-site scripting attacks are not
included in the Activity Streams data they publish.
</t>
<t>
Consumers that re-emit ingested content to end-users MUST take
reasonable measures if emitting ingested content to make sure
potentially malicious ingested input is not re-emitted.
</t>
<t>
Consumers that re-emit ingested content for crawling by search engines
should take reasonable measures to limit any use of their site as a
Search Engine Optimization loophole. This may include converting
un-trusted hyperlinks to text or including a rel="nofollow" attribute.
</t>
</section>
<section title="IANA Considerations">
<t>None.</t>
</section>
</middle>
<back>
<references title="Normative References">
<reference anchor="RFC4287">
<front>
<title>The Atom Syndication Format</title>
<author fullname="Mark Nottingham" initials="M."
surname="Nottingham">
<organization></organization>
</author>
<author fullname="Robert Sayre" initials="R." surname="Sayre">
<organization></organization>
<address>
<postal>
<street></street>
<city></city>
<region></region>
<code></code>
<country></country>
</postal>
<phone></phone>
<facsimile></facsimile>
<email></email>
<uri></uri>
</address>
</author>
<date month="December" year="2005" />
</front>
</reference>
<reference anchor="RFC4685">
<front>
<title>Atom Threading Extensions</title>
<author fullname="James Snell" initials="J." surname="Snell">
<organization></organization>
</author>
<date month="September" year="2006" />
</front>
</reference>
<reference anchor="RFC2119">
<front>
<title>Key words for use in RFCs to Indicate Requirement
Levels</title>
<author fullname="Scott Bradner" initials="S." surname="Bradner">
<organization></organization>
</author>
<date month="March" year="1997" />
</front>
</reference>
<reference anchor="RFC3987">
<front>
<title>Internationalized Resource Identifiers (IRIs)</title>
<author fullname="Martin Duerst" initials="M." surname="Duerst">
<organization></organization>
</author>
<author fullname="Michel Suignard" initials="M." surname="Suignard">
<organization></organization>
<address>
<postal>
<street></street>
<city></city>
<region></region>
<code></code>
<country></country>
</postal>
<phone></phone>
<facsimile></facsimile>
<email></email>
<uri></uri>
</address>
</author>
<date month="January" year="2005" />
</front>
</reference>
<reference anchor="RFC3339">
<front>
<title>Date and Time on the Internet: Timestamps</title>
<author fullname="Graham Klyne" initials="G." surname="Klyne">
<organization></organization>
</author>
<date month="July" year="2002" />
</front>
</reference>
<reference anchor="RSS_2.0"
target="http://www.rssboard.org/rss-specification">
<front>
<title>Date and Time on the Internet: Timestamps</title>
<author fullname="Graham Klyne" initials="G." surname="Klyne">
<organization></organization>
</author>
<date month="July" year="2002" />
</front>
</reference>
</references>
<section title="Acknowledgements">
<t>...</t>
</section>
<section title="Examples">
<t>This appendix is non-normative. Where these examples include
fragments of XML documents, assume the namespace declarations <spanx
style="verb">xmlns="http://www.w3.org/2005/Atom" xmlns:activity="http://activitystrea.ms/spec/1.0/"</spanx>
are in scope.</t>
<section anchor="activityentryexample" title="Activity Entry Examples">
<figure anchor="activityentrysimple">
<preamble>A typical activity entry</preamble>
<artwork><![CDATA[<entry>
<id>tag:photopanic.example.com,2008:activity01</id>
<title>Geraldine posted a Photo on PhotoPanic</title>
<published>2008-11-02T15:29:00Z</published>
<link rel="alternate" type="text/html"
href="http://example.com/geraldine/activities/1" />
<activity:verb>
http://activitystrea.ms/schema/1.0/post
</activity:verb>
<activity:object>
<id>tag:photopanic.example.com,2008:photo01</id>
<title>My Cat</title>
<published>2008-11-02T15:29:00Z</published>
<link rel="alternate" type="text/html"
href="http://example.com/geraldine/photos/1" />
<activity:object-type>
tag:atomactivity.example.com,2008:photo
</activity:object-type>
<source>
<title>Geraldine's Photos</title>
<link rel="self" type="application/atom+xml"
href="http://example.com/geraldine/photofeed.xml" />
<link rel="alternate" type="text/html"
href="http://example.com/geraldine/" />
</source>
</activity:object>
<content type="html">
<p>Geraldine posted a Photo on PhotoPanic</p>
<img src="/geraldine/photo1.jpg">
</content>
</entry>]]></artwork>
<postamble>This example shows a typical activity entry using the
post verb defined by this specification and a hypothetical "photo"
object type. It also demonstrates the use of atom:title and
atom:content to provide fallback content for feed processors that do
not support activity extensions. An activity stream application
might render this entry into the sentence "Geraldine posted a photo
titled 'My Cat' in Geraldine's Photos", with the photo title and the
source feed title presented as links.</postamble>
</figure>
<figure anchor="activityentrycomplex">
<artwork><![CDATA[<entry>
<id>tag:photopanic.example.com,2009:/activity/4859568/PhotoAdd/2519358/2009171</id>
<title type="text">Geraldine added two new photos to the My Pets album.</title>
<published>2009-06-21T00:28:35Z</published>
<author>
<name>Geraldine</name>
<uri>http://example.com/geraldine</uri>
<id>tag:photopanic.example.com,2009:/Person/4859568</id>
<activity:object-type>
http://activitystrea.ms/schema/1.0/person
</activity:object-type>
<link rel="alternate" type="text/html"
href="http://example.com/geraldine" />
</author>
<link rel="alternate" type="text/html"
href="http://example.com/geraldine/activities/1234" />
<content type="xhtml">...</content>
<activity:target>
<activity:object-type>http://activitystrea.ms/schema/1.0/photo-album</activity:object-type>
<id>tag:photopanic.example.com,2009:/Photo_Album/2519358</id>
<title>My Pets</title>
<link rel="alternate" type="text/html"
href="/geraldine/albums/pets" />
</activity:target>
<activity:object>
<activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
<activity:object-type>http://activitystrea.ms/schema/1.0/image</activity:object-type>
<id>tag:photopanic.example.com,2009:/Photo/2519358/60764840</id>
<title>My Cat</title>
<link rel="alternate" type="text/html"
href="/geraldine/photos/1643" />
<link rel="preview" type="image/jpeg"
href="/geraldine/photos/1643/thumb.jpg" />
<link rel="enclosure" type="image/jpeg"
href="/geraldine/photos/1643/full.jpg" />
</activity:object>
<activity:object>
<activity:object-type>http://activitystrea.ms/schema/1.0/image</activity:object-type>
<activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
<id>tag:photopanic.example.com,2009:/Photo/2519358/60764844</id>
<title></title>
<link rel="alternate" type="text/html"
href="/geraldine/photos/1634" />
<link rel="preview" type="image/jpeg"
href="/geraldine/photos/1634/thumb.jpg" />
<link rel="enclosure" type="image/jpeg"
href="/geraldine/photos/1634/full.jpg" />
</activity:object>
</entry>]]></artwork>
<postamble>Example: An activity entry showing the use of the actor,
verb, object and target elements. Also illustrated is the use of
multiple objects in a single activity entry, which serves as a
shorthand for publishing multiple consecutive activities with the
same verb and target.</postamble>
</figure>
</section>
<section anchor="objectentryexample" title="Object Entry Example">
<figure>
<preamble>A simple object entry</preamble>
<artwork><![CDATA[<entry>
<id>tag:photopanic.example.com,2008:photo01</id>
<title>My Cat</title>
<published>2008-11-02T15:29:00Z</published>
<link rel="alternate" type="text/html"
href="/geraldine/photos/1" />
<activity:object-type>
tag:atomactivity.example.com,2008:photo
</activity:object-type>
</entry>
]]></artwork>
<postamble>This example shows an object entry describing the object
referred to in the activity from <xref
target="activityentryexample"></xref>. That example would also be an
acceptable implied post activity for this entry, assuming that this
entry were in a feed whose attributes match those of the atom:source
in the activity entry example.</postamble>
</figure>
</section>
</section>
<section anchor="rss" title="Object Entries in RSS">
<t>For compatibility with existing deployments, this specification
also recommends a subset of the activity markup that may be used in <xref
target="RSS_2.0">RSS 2.0</xref> feeds to add verb and object type
annotations to objects published in RSS rather than Atom feeds.</t>
<t>Objects published as RSS 2.0 <spanx style="verb">item</spanx>
elements may use the <spanx style="verb">activity:verb</spanx> and
<spanx style="verb">activity:object-type</spanx> elements with
equivalent content models and semantics as described above for their
use in Atom object entries.</t>
<t>Activity processors should use the following process to construct the
implied activity for an object entry published as an RSS 2.0 <spanx
style="verb">item</spanx> element, or should act as if they have done
so:</t>
<t><list style="numbers">
<t>Create an empty atom:entry element. This is the activity entry
element.</t>
<t>If the object entry has as a child at least one activity:verb
element, copy all such elements into the activity entry element.
Otherwise, insert into the activity entry element a new
activity:verb element containing the verb Identifier of the post
verb as described in <xref target="postverb"></xref>.</t>
<t>If the object entry has a RSS <spanx style="verb">pubDate</spanx>
element as a child, parse its content as per the RSS 2.0
specification to obtain a date and time value. Create an <spanx
style="verb">atom:published</spanx> element whose content is the
serialization of this data and time value as described in <xref
target="RFC3339"></xref>, and insert this element into the
activity entry element.</t>
<t>Insert into the activity entry element a new <spanx
style="verb">activity:object</spanx> element.</t>
<t>If the object entry has as a child an RSS title element, create
an atom:title element whose text content matches the text content
of that element element and insert the new element into the <spanx
style="verb">activity:object</spanx> element.</t>
<t>If the object entry has as a child a <spanx style="verb">content</spanx>
element in the namespace <spanx style="verb">http://purl.org/rss/1.0/modules/content/</spanx>,
create an <spanx style="verb">atom:content </spanx>element whose
text content matches the text content of that element and which
has the attribute <spanx style="verb">type</spanx> with the value
<spanx style="verb">html</spanx>. Otherwise, if the object entry
has as a child an RSS <spanx style="verb">description</spanx>
element, create an <spanx style="verb">atom:content</spanx>
element whose text content matches the text content of that
element and which has the attribute <spanx style="verb">type</spanx>
with the value <spanx style="verb">html</spanx>. In both cases,
insert the created <spanx style="verb">atom:content</spanx>
element into the <spanx style="verb">activity:object</spanx>
element.</t>
<t>If the object entry a RSS <spanx style="verb">link</spanx>
element as as a child, create an <spanx style="verb">atom:link</spanx>
element with a <spanx style="verb">href</spanx> attribute whose
value is the text content of the RSS <spanx style="verb">link</spanx>
element, and with a <spanx style="verb">type</spanx> attribute
whose value is <spanx style="verb">text/html</spanx>. Insert the
<spanx style="verb">atom:link</spanx> element into the <spanx
style="verb">activity:object</spanx> element.</t>
<t>If the object entry has one or more RSS <spanx style="verb">enclosure</spanx>
elements as children, create for each an <spanx style="verb">atom:link</spanx>
element with a <spanx style="verb">href</spanx> attribute whose
value is the text content of the <spanx style="verb">enclosure</spanx>
element's <spanx style="verb">url</spanx> attribute, a <spanx
style="verb">rel</spanx> attribute whose value is <spanx
style="verb">enclosure</spanx>, a <spanx style="verb">type</spanx>
attribute whose value is the text content of the <spanx
style="verb">enclosure</spanx> element's <spanx style="verb">type</spanx>
attribute, and a <spanx style="verb">length</spanx> attribute
whose value is the text content of the <spanx style="verb">enclosure</spanx>
element's <spanx style="verb">length</spanx> attribute. If any of
these attributes are not present on the <spanx style="verb">enclosure</spanx>
element, the equivalent attribute on the <spanx style="verb">atom:link</spanx>
element MUST NOT be created. Insert the created <spanx
style="verb">atom:link</spanx> elements into the <spanx
style="verb">activity:object</spanx> element.</t>
<t>If the object entry has a <spanx>descendent</spanx> one or more
<spanx style="verb">thumbnail</spanx> elements in the namespace
<spanx style="verb">http://search.yahoo.com/mrss/</spanx>, create
for each an <spanx style="verb">atom:link</spanx> element with a
<spanx style="verb">href</spanx> attribute whose value is the text
content of the <spanx style="verb">thumbnail</spanx> element's url
attribute, a <spanx style="verb">rel</spanx> attribute whose value
is <spanx style="verb">preview</spanx>, a <spanx style="verb">width</spanx>
attribute in the namespace <spanx style="verb">http://purl.org/syndication/atommedia</spanx>
whose value is the text content of the <spanx style="verb">thumbnail</spanx>
element's <spanx style="verb">width</spanx> attribute, and a
<spanx style="verb">height</spanx> attribute in the namespace
<spanx style="verb">http://purl.org/syndication/atommedia</spanx>
whose value is the text content of the <spanx style="verb">thumbnail</spanx>
element's <spanx style="verb">height</spanx> attribute. If any of
these attributes are not present on the <spanx style="verb">thumbnail</spanx>
element, the equivalent attribute on the <spanx style="verb">atom:link</spanx>
element MUST NOT be created. Insert the created <spanx
style="verb">atom:link</spanx> elements into the <spanx
style="verb">activity:object</spanx> element.</t>
<t>If the object entry has as a child an RSS <spanx style="verb">guid</spanx>
element, create an <spanx style="verb">atom:id</spanx> element
whose text content matches the text content of that element. If
the <spanx style="verb">guid</spanx> element has an attribute
<spanx style="verb">isPermaLink</spanx> with the value <spanx
style="verb">true</spanx>, additionally create an <spanx
style="verb">atom:link</spanx> element with a <spanx style="verb">href</spanx>