forked from seam2/jboss-seam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRss.xml
269 lines (264 loc) · 10.6 KB
/
Rss.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
<?xml version="1.0" standalone="no"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<chapter id="rss">
<title>RSS support</title>
<para>
It is now easy to integrate RSS feeds in Seam through the
<ulink url="http://yarfraw.sourceforge.net/">YARFRAW</ulink>
library. The RSS support is currently in the state of "tech preview"
in the current release.
</para>
<section id="rss.installation">
<title>Installation</title>
<para>
To enable RSS support, include the <literal>jboss-seam-rss.jar</literal>
in your applications <literal>WEB-INF/lib</literal> directory. The RSS
library also has some dependent libraries that should be placed in the
same directory. See <xref linkend="dependencies.rss"/> for a list of
libraries to include.
</para>
<para>
The Seam RSS support requires the use of Facelets as the view
technology.
</para>
</section>
<section id="rss.usage">
<title>Generating feeds</title>
<para>
The <literal>examples/rss</literal> project contains an example of
RSS support in action. It demonstrates proper deployment
packaging, and it shows the exposed functionality.
</para>
<para>
A feed is a xhtml-page that consist of a feed and a list of nested
entry items.
</para>
<programlisting role="XML">
<![CDATA[
<r:feed
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:r="http://jboss.org/schema/seam/rss"
title="#{rss.feed.title}"
uid="#{rss.feed.uid}"
subtitle="#{rss.feed.subtitle}"
updated="#{rss.feed.updated}"
link="#{rss.feed.link}">
<ui:repeat value="#{rss.feed.entries}" var="entry">
<r:entry
uid="#{entry.uid}"
title="#{entry.title}"
link="#{entry.link}"
author="#{entry.author}"
summary="#{entry.summary}"
published="#{entry.published}"
updated="#{entry.updated}"
/>
</ui:repeat>
</r:feed>
]]>
</programlisting>
</section>
<section id="rss.feeds">
<title>Feeds</title>
<para>
Feeds are the top-level entities that describe the properties of the
information source. It contains zero or more nested entries.
</para>
<informaltable>
<tgroup cols="2">
<colspec colnum="1" colwidth="1*" />
<colspec colnum="2" colwidth="3*" />
<tbody>
<row>
<entry valign="top">
<para>
<literal><r:feed></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>uid</literal>
— An optional unique feed id. The value is a string.
</para>
</listitem>
<listitem>
<para>
<literal>title</literal>
— The title of the feed. The value is a string.
</para>
</listitem>
<listitem>
<para>
<literal>subtitle</literal>
— The subtitle of the feed. The value is a string.
</para>
</listitem>
<listitem>
<para>
<literal>updated</literal>
— When was the feed updated? The value is a date.
</para>
</listitem>
<listitem>
<para>
<literal>link</literal>
— The link to the source of the information.
The value is a string.
</para>
</listitem>
<listitem>
<para>
<literal>feedFormat</literal>
— The feed format. The value is a string and defaults
to ATOM1. Valid values are RSS10, RSS20, ATOM03 and ATOM10.
</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Child elements</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>Zero or more feed entries</literal>
</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Facets</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>none</literal>
</para>
</listitem>
</itemizedlist>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section id="rss.entries">
<title>Entries</title>
<para>
Entries are the "headlines" in the feed.
</para>
<informaltable>
<tgroup cols="2">
<colspec colnum="1" colwidth="1*" />
<colspec colnum="2" colwidth="3*" />
<tbody>
<row>
<entry valign="top">
<para>
<literal><r:feed></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>uid</literal>
— An optional unique entry id. The value is a string.
</para>
</listitem>
<listitem>
<para>
<literal>title</literal>
— The title of the entry. The value is a string.
</para>
</listitem>
<listitem>
<para>
<literal>link</literal>
— A link to the item. The value is a string.
</para>
</listitem>
<listitem>
<para>
<literal>author</literal>
— The author of the story. The value is a string.
</para>
</listitem>
<listitem>
<para>
<literal>summary</literal>
— The body of the story. The value is a string.
</para>
</listitem>
<listitem>
<para>
<literal>textFormat</literal>
— The format of the body and title of the story.
The value is a string and valid values are "text" and
"html". Defaults to "html".
</para>
</listitem>
<listitem>
<para>
<literal>published</literal>
— When was the story first published? The value is a date.
</para>
</listitem>
<listitem>
<para>
<literal>updated</literal>
— When was the story updated? The value is a date.
</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Child elements</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>none</literal>
</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Facets</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>none</literal>
</para>
</listitem>
</itemizedlist>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section id="rss.links">
<title>Links and further documentation</title>
<para>
The core of the RSs functionality is based on the YARFRAW library
which can be found on <ulink url="http://yarfraw.sourceforge.net/">http://yarfraw.sourceforge.net/</ulink> and most
features and possible limitations are inherited from here.
</para>
<para>
For details on the ATOM 1.0 format, have a look at
<ulink url="http://atompub.org/2005/07/11/draft-ietf-atompub-format-10.html">
the specs</ulink>
</para>
<para>
For details on the RSS 2.0 format, have a look at
<ulink url="http://cyber.law.harvard.edu/rss/rss.html">the specs</ulink>
</para>
</section>
</chapter>