CICS 的 Atom 元素引用

These tables provide a reference for the relationships between the elements used in an Atom feed document; the elements used in an Atom entry element; the attributes of the <cics:fieldnames> element; and the parameters that CICS® can pass to a service routine for resource handling.

在 CICS 中创建 Atom 订阅源文档时,您可以指定按 RFC 4287 中 Atom 格式规范定义的元素。 Some of these elements are used as child elements of the <atom:feed> element to supply metadata for the whole of the Atom feed, such as the title for the feed. Some of the elements are used as child elements of an <atom:entry> element to supply metadata or content for an individual entry. The majority of the elements are specified for the feed and specified again for the individual entries; for example, each entry has a unique identifier specified by the <atom:id> element, and the feed also has a unique identifier. 有关每个元素的完整描述,请阅读 RFC 4287。

In an Atom feed document in CICS, CICS uses a single prototype <atom:entry> element to generate the individual entries. 如果在该元素中指定子元素,那么缺省情况下,此处的元数据将应用于所有条目。 However, if the CICS resource that you are using to supply the content for the Atom feed contains suitable metadata, you can use attributes of the <cics:fieldnames> element to tell CICS if and where the data for the child elements is present in the resource record. 例如,您可以在资源记录中指定一个字段,用于为包含在该记录中的条目提供标题。 If your resource records do not contain certain metadata, such as the author's name, you can omit that attribute for the <cics:fieldnames> element. CICS either supplies that item of metadata from the corresponding element in the prototype <atom:entry> element in the configuration file or omits it. If your resource records do not contain any suitable metadata, you can omit the <cics:fieldnames> element completely, and CICS publishes the whole of the resource record as the content of the entry.

The parameters that CICS passes to a service routine include parameters corresponding to the attributes of the <cics:fieldnames> element. 如果您希望编写一个用于从 Atom 配置文件中获取有关资源结构的信息的服务例程,而不是将该信息直接编码到服务例程中,那么可以使用这些资源处理参数。 通过该方法,您可以创建能够处理多个资源的类属服务例程。

表 1. Child elements of the <atom:feed> and <atom:entry> elements
元素 含义 对于订阅源 对于条目 <cics:fieldnames> attribute (for entries) 服务例程参数(对于条目)
<app:edited> 上一次编辑条目的时间 未使用 必需(如果在集合中),由 CICS 生成 edited ATMP_ EDITED
<atom:author> 主要作者的详细信息 必需(只要不是所有条目都包含该元素) 可选(如果订阅源包含该元素) 不适用(数据位于子元素中) 不适用(数据位于子元素中)
<atom:category> 对订阅源或条目进行分类的类别 可选 可选 category ATMP_ CATEGORY_ FLD
<atom:content type=" "> 条目的内容 未使用 必需 content, content_type ATMP_ CONTENT_ FLD 和 ATMP_ CONTENT_ TYPE_FLD
<atom:contributor> 辅助作者的详细信息 可选 可选 不适用(数据位于子元素中) 不适用(数据位于子元素中)
<atom:email> 作者或参与者的电子邮件地址 可选 可选 email(仅限作者,不支持参与者) ATMP_ EMAIL_ FLD
<atom:generator> 生成订阅源的代理程序 由 CICS 生成 未使用 不适用(不用于条目) 不适用(不用于条目)
<atom:icon> 表示订阅源的图标 可选 未使用 不适用(不用于条目) 不适用(不用于条目)
<atom:id> 订阅源或条目的唯一标识 Required, CICS produces if you specify <cics:authority> element Required, CICS produces if you specify <cics:authority> element atomid ATMP_ ID_ FLD
<atom:link rel="self"> 用于检索订阅源或条目文档的 URL 必需 必需(对于 CICS) 不适用(未存储在资源中) 不适用(未存储在资源中)
<atom:link rel="edit"> 用于编辑集合中条目的 URL(成员 URI) CICS 为集合生成 由 CICS 生成(条目在集合中时) 不适用(未存储在资源中) 不适用(未存储在资源中)
<atom:logo> 订阅源的徽标 可选 未使用 不适用(不用于条目) 不适用(不用于条目)
<atom:name> 作者或参与者的姓名 必需(在作者或参与者元素中) 必需(在作者或参与者元素中) author(仅限作者,不支持参与者) ATMP_ AUTHOR_ FLD
<atom:published> 第一次创建或发布条目的时间 未使用 可选 published ATMP_ PUBLISHED_ FLD
<atom:rights> 订阅源的知识产权 可选 可选 在资源中不受支持 在资源中不受支持
<atom:source> 通过使用其他订阅源中的条目而获得的元数据 未使用 可选,但 CICS 不支持 不支持 不支持
<atom:subtitle> 订阅源的子标题 可选 未使用 不适用(不用于条目) 不适用(不用于条目)
<atom:summary> 条目内容的简要描述 未使用 必需(如果内容为非文本或 XML) summary ATMP_ SUMMARY_ FLD
<atom:title> 订阅源的标题 必需 必需 title ATMP_ TITLE_ FLD
<atom:updated> 上一次更新订阅源的时间 必需,由 CICS 生成 必需,由 CICS 生成 更新 ATMP_ UPDATED_ FLD
<atom:uri> 作者或参与者 Web 站点的 URL 可选 可选 authoruri(仅限作者,不支持参与者) ATMP_ AUTHORURI_ FLD