The rss aa module server has at least two different tasks: Its primary purpose is to generate xml data to transport Action Application item information. Its secondary purpose is to assist a remote node in establishing a feed.
The rss aa module server must perform the following tasks:
A new php file getxml.php3 is created.
Different from most files in the admin/ directory, this file does not include init_page.php3 because does not use session management.
In case of errors such as bad authentication, bad authorization, bad arguments and so on, a clear text error message is sent to the client. No effort is taken to put this error message into an xml like structure.
The program parses its GET or PUSH arguments and extracts these:
node_username: The name of the node making the request.password: The password of the node.user: A user at the remote node. This is the user who is trying
to establish a feed or who established the feed.slice_id: The id of the local slice from which a feed is requested.start_timestamp: A timestamp
which indicates the creation time of the first
item to be sent. Time format is according to
http://www.w3.org/TR/NOTE-datetimecategories: A list of local category ids. The list can be empty.
Ids are separated by a space character.The node_username and password values are checked against the nodes table's data. In case the credentials are not correct, the request is rejected.
If the parameter slice_id is empty, the program goes into
feed establishing mode. It must try to find the
correct slice by searching the slice table. Search criteria are:
node field matches
exactly the value of the node_username parameter or where the node
field is emptyuser
must either
exactly match the user parameter OR
ef_permissions
.user
must be an empty string, granting access to all users of a node.If the parameter slice_id is not empty, the program goes into
feeding mode. It then looks up
permissions for the slice slice_id, the user user of node node_username
in the table
ef_permissions
. If the remote user at the remote
node does not appear in this table, the request is rejected. (If the
ef_permissions.user field is empty, access is granted to all users
of the node. If the ef_permissions.node field is empty, access is granted
to all nodes.)
Then the program starts to create an xml/rss aa module message.
The rss aa module first section contains informations about the slice or feed itself. If the program is in feed establishing mode, the informations about all slices found during the search for the correct slice are put into the first section. If the program is in feeding mode, the informations of the slice from which the feed is requested are put into the first section.
Any categories mentioned in the first section must be specified after the slice and feed section. This is the second section of the message.
Any fields mentioned in the first section must be specified after the categories section. This is the third section of the message.
The rss aa module fourth section contains informations about the items itself.
The items section is empty if the program is in feed establishing mode. It
contains items if the program is in feeding mode. The items to be sent are
selected by the slice_id and further narrowed by the timestamp information
from the start_timestamp parameter. Only those items are sent which
have been created between the time of start_timestamp and the current
time. If the parameter categories is not empty, only those items
are sent which belong to one of the categories given. Finally, only those
items are sent which have not been imported from another remote slice.
In case there is anything left, it is sent.
The text of the actual items is transported in the content:items container (as described in content:items ). The format used is selected accoring to the format of the acual text of the item.
Fields other than the actual item text which are to be tranported but are not in plain text format must be converted to plain text for transmission. html for other fields is not supported.