Network Working Group                                 M. Nottingham, Ed.
Request for Comments: 4287                                 R. Sayre, Ed.
Category: Standards Track                                  December 2005
        
Network Working Group                                 M. Nottingham, Ed.
Request for Comments: 4287                                 R. Sayre, Ed.
Category: Standards Track                                  December 2005
        

The Atom Syndication Format

Atom联合格式

Status of This Memo

关于下段备忘

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (2005).

版权所有(C)互联网协会(2005年)。

Abstract

摘要

This document specifies Atom, an XML-based Web content and metadata syndication format.

本文档指定Atom,一种基于XML的Web内容和元数据联合格式。

Table of Contents

目录

   1. Introduction ....................................................3
      1.1. Examples ...................................................3
      1.2. Namespace and Version ......................................5
      1.3. Notational Conventions .....................................5
   2. Atom Documents ..................................................6
   3. Common Atom Constructs ..........................................7
      3.1. Text Constructs ............................................7
           3.1.1. The "type" Attribute ................................8
      3.2. Person Constructs .........................................10
           3.2.1. The "atom:name" Element ............................10
           3.2.2. The "atom:uri" Element .............................10
           3.2.3. The "atom:email" Element ...........................10
      3.3. Date Constructs ...........................................10
   4. Atom Element Definitions .......................................11
      4.1. Container Elements ........................................11
           4.1.1. The "atom:feed" Element ............................11
           4.1.2. The "atom:entry" Element ...........................13
           4.1.3. The "atom:content" Element .........................14
      4.2. Metadata Elements .........................................17
           4.2.1. The "atom:author" Element ..........................17
           4.2.2. The "atom:category" Element ........................18
           4.2.3. The "atom:contributor" Element .....................18
        
   1. Introduction ....................................................3
      1.1. Examples ...................................................3
      1.2. Namespace and Version ......................................5
      1.3. Notational Conventions .....................................5
   2. Atom Documents ..................................................6
   3. Common Atom Constructs ..........................................7
      3.1. Text Constructs ............................................7
           3.1.1. The "type" Attribute ................................8
      3.2. Person Constructs .........................................10
           3.2.1. The "atom:name" Element ............................10
           3.2.2. The "atom:uri" Element .............................10
           3.2.3. The "atom:email" Element ...........................10
      3.3. Date Constructs ...........................................10
   4. Atom Element Definitions .......................................11
      4.1. Container Elements ........................................11
           4.1.1. The "atom:feed" Element ............................11
           4.1.2. The "atom:entry" Element ...........................13
           4.1.3. The "atom:content" Element .........................14
      4.2. Metadata Elements .........................................17
           4.2.1. The "atom:author" Element ..........................17
           4.2.2. The "atom:category" Element ........................18
           4.2.3. The "atom:contributor" Element .....................18
        
           4.2.4. The "atom:generator" Element .......................18
           4.2.5. The "atom:icon" Element ............................19
           4.2.6. The "atom:id" Element ..............................19
           4.2.7. The "atom:link" Element ............................21
           4.2.8. The "atom:logo" Element ............................23
           4.2.9. The "atom:published" Element .......................23
           4.2.10. The "atom:rights" Element .........................24
           4.2.11. The "atom:source" Element .........................24
           4.2.12. The "atom:subtitle" Element .......................25
           4.2.13. The "atom:summary" Element ........................25
           4.2.14. The "atom:title" Element ..........................25
           4.2.15. The "atom:updated" Element ........................25
   5. Securing Atom Documents ........................................26
      5.1. Digital Signatures ........................................26
      5.2. Encryption ................................................27
      5.3. Signing and Encrypting ....................................28
   6. Extending Atom .................................................28
      6.1. Extensions from Non-Atom Vocabularies .....................28
      6.2. Extensions to the Atom Vocabulary .........................28
      6.3. Processing Foreign Markup .................................28
      6.4. Extension Elements ........................................29
           6.4.1. Simple Extension Elements ..........................29
           6.4.2. Structured Extension Elements ......................29
   7. IANA Considerations ............................................30
      7.1. Registry of Link Relations ................................31
   8. Security Considerations ........................................31
      8.1. HTML and XHTML Content ....................................31
      8.2. URIs ......................................................31
      8.3. IRIs ......................................................31
      8.4. Spoofing ..................................................31
      8.5. Encryption and Signing ....................................32
   9. References .....................................................32
      9.1. Normative References ......................................32
      9.2. Informative References ....................................34
   Appendix A. Contributors ..........................................35
   Appendix B. RELAX NG Compact Schema ...............................35
        
           4.2.4. The "atom:generator" Element .......................18
           4.2.5. The "atom:icon" Element ............................19
           4.2.6. The "atom:id" Element ..............................19
           4.2.7. The "atom:link" Element ............................21
           4.2.8. The "atom:logo" Element ............................23
           4.2.9. The "atom:published" Element .......................23
           4.2.10. The "atom:rights" Element .........................24
           4.2.11. The "atom:source" Element .........................24
           4.2.12. The "atom:subtitle" Element .......................25
           4.2.13. The "atom:summary" Element ........................25
           4.2.14. The "atom:title" Element ..........................25
           4.2.15. The "atom:updated" Element ........................25
   5. Securing Atom Documents ........................................26
      5.1. Digital Signatures ........................................26
      5.2. Encryption ................................................27
      5.3. Signing and Encrypting ....................................28
   6. Extending Atom .................................................28
      6.1. Extensions from Non-Atom Vocabularies .....................28
      6.2. Extensions to the Atom Vocabulary .........................28
      6.3. Processing Foreign Markup .................................28
      6.4. Extension Elements ........................................29
           6.4.1. Simple Extension Elements ..........................29
           6.4.2. Structured Extension Elements ......................29
   7. IANA Considerations ............................................30
      7.1. Registry of Link Relations ................................31
   8. Security Considerations ........................................31
      8.1. HTML and XHTML Content ....................................31
      8.2. URIs ......................................................31
      8.3. IRIs ......................................................31
      8.4. Spoofing ..................................................31
      8.5. Encryption and Signing ....................................32
   9. References .....................................................32
      9.1. Normative References ......................................32
      9.2. Informative References ....................................34
   Appendix A. Contributors ..........................................35
   Appendix B. RELAX NG Compact Schema ...............................35
        
1. Introduction
1. 介绍

Atom is an XML-based document format that describes lists of related information known as "feeds". Feeds are composed of a number of items, known as "entries", each with an extensible set of attached metadata. For example, each entry has a title.

Atom是一种基于XML的文档格式,用于描述称为“提要”的相关信息列表。提要由许多项组成,称为“条目”,每个项都有一组可扩展的附加元数据。例如,每个条目都有一个标题。

The primary use case that Atom addresses is the syndication of Web content such as weblogs and news headlines to Web sites as well as directly to user agents.

Atom地址的主要使用情形是将Web内容(如Weblog和新闻标题)联合到Web站点以及直接到用户代理。

1.1. Examples
1.1. 例子

A brief, single-entry Atom Feed Document:

简单的单条目Atom提要文档:

   <?xml version="1.0" encoding="utf-8"?>
   <feed xmlns="http://www.w3.org/2005/Atom">
        
   <?xml version="1.0" encoding="utf-8"?>
   <feed xmlns="http://www.w3.org/2005/Atom">
        
     <title>Example Feed</title>
     <link href="http://example.org/"/>
     <updated>2003-12-13T18:30:02Z</updated>
     <author>
       <name>John Doe</name>
     </author>
     <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
        
     <title>Example Feed</title>
     <link href="http://example.org/"/>
     <updated>2003-12-13T18:30:02Z</updated>
     <author>
       <name>John Doe</name>
     </author>
     <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
        
     <entry>
       <title>Atom-Powered Robots Run Amok</title>
       <link href="http://example.org/2003/12/13/atom03"/>
       <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
       <updated>2003-12-13T18:30:02Z</updated>
       <summary>Some text.</summary>
     </entry>
        
     <entry>
       <title>Atom-Powered Robots Run Amok</title>
       <link href="http://example.org/2003/12/13/atom03"/>
       <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
       <updated>2003-12-13T18:30:02Z</updated>
       <summary>Some text.</summary>
     </entry>
        
   </feed>
        
   </feed>
        

A more extensive, single-entry Atom Feed Document:

更广泛的单条目Atom提要文档:

   <?xml version="1.0" encoding="utf-8"?>
   <feed xmlns="http://www.w3.org/2005/Atom">
     <title type="text">dive into mark</title>
     <subtitle type="html">
       A &lt;em&gt;lot&lt;/em&gt; of effort
       went into making this effortless
     </subtitle>
     <updated>2005-07-31T12:29:29Z</updated>
     <id>tag:example.org,2003:3</id>
     <link rel="alternate" type="text/html"
      hreflang="en" href="http://example.org/"/>
     <link rel="self" type="application/atom+xml"
      href="http://example.org/feed.atom"/>
     <rights>Copyright (c) 2003, Mark Pilgrim</rights>
     <generator uri="http://www.example.com/" version="1.0">
       Example Toolkit
     </generator>
     <entry>
       <title>Atom draft-07 snapshot</title>
       <link rel="alternate" type="text/html"
        href="http://example.org/2005/04/02/atom"/>
       <link rel="enclosure" type="audio/mpeg" length="1337"
        href="http://example.org/audio/ph34r_my_podcast.mp3"/>
       <id>tag:example.org,2003:3.2397</id>
       <updated>2005-07-31T12:29:29Z</updated>
       <published>2003-12-13T08:29:29-04:00</published>
       <author>
         <name>Mark Pilgrim</name>
         <uri>http://example.org/</uri>
         <email>f8dy@example.com</email>
       </author>
       <contributor>
         <name>Sam Ruby</name>
       </contributor>
       <contributor>
         <name>Joe Gregorio</name>
       </contributor>
       <content type="xhtml" xml:lang="en"
        xml:base="http://diveintomark.org/">
         <div xmlns="http://www.w3.org/1999/xhtml">
           <p><i>[Update: The Atom draft is finished.]</i></p>
         </div>
       </content>
     </entry>
   </feed>
        
   <?xml version="1.0" encoding="utf-8"?>
   <feed xmlns="http://www.w3.org/2005/Atom">
     <title type="text">dive into mark</title>
     <subtitle type="html">
       A &lt;em&gt;lot&lt;/em&gt; of effort
       went into making this effortless
     </subtitle>
     <updated>2005-07-31T12:29:29Z</updated>
     <id>tag:example.org,2003:3</id>
     <link rel="alternate" type="text/html"
      hreflang="en" href="http://example.org/"/>
     <link rel="self" type="application/atom+xml"
      href="http://example.org/feed.atom"/>
     <rights>Copyright (c) 2003, Mark Pilgrim</rights>
     <generator uri="http://www.example.com/" version="1.0">
       Example Toolkit
     </generator>
     <entry>
       <title>Atom draft-07 snapshot</title>
       <link rel="alternate" type="text/html"
        href="http://example.org/2005/04/02/atom"/>
       <link rel="enclosure" type="audio/mpeg" length="1337"
        href="http://example.org/audio/ph34r_my_podcast.mp3"/>
       <id>tag:example.org,2003:3.2397</id>
       <updated>2005-07-31T12:29:29Z</updated>
       <published>2003-12-13T08:29:29-04:00</published>
       <author>
         <name>Mark Pilgrim</name>
         <uri>http://example.org/</uri>
         <email>f8dy@example.com</email>
       </author>
       <contributor>
         <name>Sam Ruby</name>
       </contributor>
       <contributor>
         <name>Joe Gregorio</name>
       </contributor>
       <content type="xhtml" xml:lang="en"
        xml:base="http://diveintomark.org/">
         <div xmlns="http://www.w3.org/1999/xhtml">
           <p><i>[Update: The Atom draft is finished.]</i></p>
         </div>
       </content>
     </entry>
   </feed>
        
1.2. Namespace and Version
1.2. 名称空间和版本

The XML Namespaces URI [W3C.REC-xml-names-19990114] for the XML data format described in this specification is:

本规范中描述的XML数据格式的XML名称空间URI[W3C.REC-XML-names-19990114]为:

   http://www.w3.org/2005/Atom
        
   http://www.w3.org/2005/Atom
        

For convenience, this data format may be referred to as "Atom 1.0". This specification uses "Atom" internally.

为方便起见,此数据格式可称为“Atom 1.0”。本规范在内部使用“Atom”。

1.3. Notational Conventions
1.3. 符号约定

This specification describes conformance in terms of two artifacts: Atom Feed Documents and Atom Entry Documents. Additionally, it places some requirements on Atom Processors.

本规范描述了两个工件的一致性:Atom提要文档和Atom条目文档。此外,它对Atom处理器提出了一些要求。

This specification uses the namespace prefix "atom:" for the Namespace URI identified in Section 1.2, above. Note that the choice of namespace prefix is arbitrary and not semantically significant.

本规范使用名称空间前缀“atom:”作为上面第1.2节中标识的名称空间URI。请注意,名称空间前缀的选择是任意的,在语义上并不重要。

Atom is specified using terms from the XML Infoset [W3C.REC-xml-infoset-20040204]. However, this specification uses a shorthand for two common terms: the phrase "Information Item" is omitted when naming Element Information Items 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 it uses the term "attribute," it is referring to an Attribute Information Item.

Atom是使用XML信息集[W3C.REC-XML-Infoset-20040204]中的术语指定的。然而,本规范使用两个常用术语的缩写:在命名元素信息项和属性信息项时省略短语“信息项”。因此,当本规范使用术语“元素”时,它指的是Infoset术语中的元素信息项。同样,当它使用术语“属性”时,它指的是属性信息项。

Some sections of this specification are illustrated with fragments of a non-normative RELAX NG Compact schema [RELAX-NG]. However, the text of this specification provides the definition of conformance. A complete schema appears in Appendix B.

本规范的某些部分用非标准RELAX-NG紧凑模式[RELAX-NG]的片段进行了说明。然而,本规范的文本提供了一致性的定义。完整的模式见附录B。

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 BCP 14, [RFC2119], as scoped to those conformance targets.

本文件中的关键词“必须”、“不得”、“要求”、“应”、“不得”、“应”、“不应”、“建议”、“可”和“可选”应按照BCP 14、[RFC2119]中的描述进行解释,并适用于这些合规性目标。

2. Atom Documents
2. Atom文档

This specification describes two kinds of Atom Documents: Atom Feed Documents and Atom Entry Documents.

本规范描述了两种Atom文档:Atom提要文档和Atom条目文档。

An Atom Feed Document is a representation of an Atom feed, including metadata about the feed, and some or all of the entries associated with it. Its root is the atom:feed element.

Atom提要文档是Atom提要的表示,包括有关提要的元数据以及与之关联的部分或全部条目。它的根是atom:feed元素。

An Atom Entry Document represents exactly one Atom entry, outside of the context of an Atom feed. Its root is the atom:entry element.

Atom条目文档仅表示一个Atom条目,位于Atom提要的上下文之外。它的根是atom:entry元素。

   namespace atom = "http://www.w3.org/2005/Atom"
   start = atomFeed | atomEntry
        
   namespace atom = "http://www.w3.org/2005/Atom"
   start = atomFeed | atomEntry
        

Both kinds of Atom Documents are specified in terms of the XML Information Set, serialized as XML 1.0 [W3C.REC-xml-20040204] and identified with the "application/atom+xml" media type. Atom Documents MUST be well-formed XML. This specification does not define a DTD for Atom Documents, and hence does not require them to be valid (in the sense used by XML).

这两种Atom文档都是根据XML信息集指定的,序列化为XML1.0[W3C.REC-XML-20040204],并用“application/Atom+XML”媒体类型标识。Atom文档必须是格式良好的XML。该规范没有为Atom文档定义DTD,因此不要求它们有效(在XML使用的意义上)。

Atom allows the use of IRIs [RFC3987]. Every URI [RFC3986] is also an IRI, so a URI may be used wherever below an IRI is named. There are two special considerations: (1) 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] and (2) when an IRI is serving as an atom:id value, it MUST NOT be so mapped, so that the comparison works as described in Section 4.2.6.1.

Atom允许使用IRIs[RFC3987]。每个URI[RFC3986]也是一个IRI,因此可以在IRI下面的任何地方使用URI。有两个特殊注意事项:(1)当为解引用而给出的IRI不是URI时,必须使用[RFC3987]第3.1节中的步骤将其映射到URI;(2)当IRI用作atom:id值时,不得如此映射,以便按照第4.2.6.1节所述进行比较。

Any element defined by this specification MAY have an xml:base attribute [W3C.REC-xmlbase-20010627]. When xml:base is used in an Atom Document, it serves the function described in section 5.1.1 of [RFC3986], establishing the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.

本规范定义的任何元素都可能具有xml:base属性[W3C.REC-xmlbase-20010627]。当在Atom文档中使用xml:base时,它提供[RFC3986]第5.1.1节中描述的功能,建立基本URI(或IRI),用于解析在xml:base属性的有效范围内找到的任何相对引用。

Any element defined by this specification MAY have an xml:lang attribute, whose content indicates the natural language for the element and its descendents. The language context is only significant for elements and attributes declared to be "Language-Sensitive" by this specification. Requirements regarding the content and interpretation of xml:lang are specified in XML 1.0 [W3C.REC-xml-20040204], Section 2.12.

本规范定义的任何元素都可能具有xml:lang属性,其内容表示元素及其子代的自然语言。语言上下文仅对本规范声明为“语言敏感”的元素和属性有效。xml 1.0[W3C.REC-xml-20040204]第2.12节规定了有关xml:lang的内容和解释的要求。

   atomCommonAttributes =
      attribute xml:base { atomUri }?,
      attribute xml:lang { atomLanguageTag }?,
      undefinedAttribute*
        
   atomCommonAttributes =
      attribute xml:base { atomUri }?,
      attribute xml:lang { atomLanguageTag }?,
      undefinedAttribute*
        

Atom is an extensible format. See Section 6 of this document for a full description of how Atom Documents can be extended.

Atom是一种可扩展格式。有关如何扩展Atom文档的完整描述,请参见本文档第6节。

Atom Processors MAY keep state sourced from Atom Feed Documents and combine them with other Atom Feed Documents, in order to facilitate a contiguous view of the contents of a feed. The manner in which Atom Feed Documents are combined in order to reconstruct a feed (e.g., updating entries and metadata, dealing with missing entries) is out of the scope of this specification.

Atom处理器可以保持源于Atom提要文档的状态,并将它们与其他Atom提要文档相结合,以便于对提要的内容进行连续查看。为了重建提要而组合Atom提要文档的方式(例如,更新条目和元数据,处理丢失的条目)超出了本规范的范围。

3. Common Atom Constructs
3. 公共原子结构

Many of Atom's elements share a few common structures. This section defines those structures and their requirements for convenient reference by the appropriate element definitions.

许多原子元素有一些共同的结构。本节定义了这些结构及其要求,以便于通过适当的元素定义进行参考。

When an element is identified as being a particular kind of construct, it inherits the corresponding requirements from that construct's definition in this section.

当一个元素被标识为一种特殊类型的构造时,它将从本节中该构造的定义继承相应的需求。

Note that there MUST NOT be any white space in a Date construct or in any IRI. Some XML-emitting implementations erroneously insert white space around values by default, and such implementations will emit invalid Atom Documents.

请注意,日期构造或任何IRI中不得有任何空白。默认情况下,一些发出XML的实现会错误地在值周围插入空格,这样的实现将发出无效的Atom文档。

3.1. Text Constructs
3.1. 文本结构

A Text construct contains human-readable text, usually in small quantities. The content of Text constructs is Language-Sensitive.

文本构造包含人类可读的文本,通常数量很少。文本结构的内容是语言敏感的。

   atomPlainTextConstruct =
      atomCommonAttributes,
      attribute type { "text" | "html" }?,
      text
        
   atomPlainTextConstruct =
      atomCommonAttributes,
      attribute type { "text" | "html" }?,
      text
        

atomXHTMLTextConstruct = atomCommonAttributes, attribute type { "xhtml" }, xhtmlDiv

atomXHTMLTextConstruct=atomCommonAttributes,属性类型{“xhtml”},xhtmlDiv

atomTextConstruct = atomPlainTextConstruct | atomXHTMLTextConstruct

atomTextConstruct=atomPlainTextConstruct | atomXHTMLTextConstruct

3.1.1. The "type" Attribute
3.1.1. “类型”属性

Text constructs MAY have a "type" attribute. When present, the value MUST be one of "text", "html", or "xhtml". If the "type" attribute is not provided, Atom Processors MUST behave as though it were present with a value of "text". Unlike the atom:content element defined in Section 4.1.3, MIME media types [MIMEREG] MUST NOT be used as values for the "type" attribute on Text constructs.

文本构造可能具有“type”属性。当存在时,该值必须是“text”、“html”或“xhtml”中的一个。如果未提供“type”属性,则Atom处理器的行为必须与它的值为“text”时相同。与第4.1.3节中定义的atom:content元素不同,MIME媒体类型[MIMEREG]不能用作文本构造的“type”属性的值。

3.1.1.1. Text
3.1.1.1. 文本

Example atom:title with text content:

示例atom:包含文本内容的标题:

... <title type="text"> Less: &lt; </title> ...

... <title type=“text”>更少:&lt</标题>。。。

If the value is "text", the content of the Text construct MUST NOT contain child elements. Such text is intended to be presented to humans in a readable fashion. Thus, Atom Processors MAY collapse white space (including line breaks) and display the text using typographic techniques such as justification and proportional fonts.

如果值为“text”,则文本构造的内容不得包含子元素。这样的文本旨在以可读的方式呈现给人类。因此,Atom处理器可能会压缩空白(包括换行符)并使用排版技术(如对齐和比例字体)显示文本。

3.1.1.2. HTML
3.1.1.2. HTML

Example atom:title with HTML content:

示例atom:包含HTML内容的标题:

... <title type="html"> Less: &lt;em> &amp;lt; &lt;/em> </title> ...

... <title type=“html”>更少:&lt;em>&amp;lt&lt/em></title>。。。

If the value of "type" is "html", the content of the Text construct MUST NOT contain child elements and SHOULD be suitable for handling as HTML [HTML]. Any markup within MUST be escaped; for example, "<br>" as "&lt;br>". HTML markup within SHOULD be such that it could validly appear directly within an HTML <DIV> element, after unescaping. Atom Processors that display such content MAY use that markup to aid in its display.

如果“type”的值为“html”,则文本构造的内容不得包含子元素,并且应适合作为html[html]处理。必须转义其中的任何标记;例如,“<br>”作为“&lt;br>”。中的HTML标记应该是这样的,即它可以有效地直接出现在HTML<DIV>元素中,在取消跳过之后。显示此类内容的Atom处理器可以使用该标记来辅助其显示。

3.1.1.3. XHTML
3.1.1.3. XHTML

Example atom:title with XHTML content:

示例atom:包含XHTML内容的标题:

... <title type="xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <xhtml:div> Less: <xhtml:em> &lt; </xhtml:em> </xhtml:div> </title> ...

... <title type=“xhtml”xmlns:xhtml=”http://www.w3.org/1999/xhtml“><xhtml:div>更少:<xhtml:em>&lt</xhtml:em></xhtml:div></title>。。。

If the value of "type" is "xhtml", the content of the Text construct MUST be a single XHTML div element [XHTML] and SHOULD be suitable for handling as XHTML. The XHTML div element itself MUST NOT be considered part of the content. Atom Processors that display the content MAY use the markup to aid in displaying it. The escaped versions of characters such as "&" and ">" represent those characters, not markup.

如果“type”的值是“xhtml”,则文本构造的内容必须是单个xhtml div元素[xhtml],并且应该适合作为xhtml处理。XHTML div元素本身不能被视为内容的一部分。显示内容的Atom处理器可以使用标记来帮助显示内容。诸如“&”和“>”等字符的转义版本表示这些字符,而不是标记。

Examples of valid XHTML content:

有效的XHTML内容示例:

   ...
   <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
         This is <b>XHTML</b> content.
      </div>
   </summary>
   ...
   <summary type="xhtml">
      <xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml">
         This is <xhtml:b>XHTML</xhtml:b> content.
      </xhtml:div>
   </summary>
   ...
        
   ...
   <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
         This is <b>XHTML</b> content.
      </div>
   </summary>
   ...
   <summary type="xhtml">
      <xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml">
         This is <xhtml:b>XHTML</xhtml:b> content.
      </xhtml:div>
   </summary>
   ...
        

The following example assumes that the XHTML namespace has been bound to the "xh" prefix earlier in the document:

以下示例假定XHTML命名空间已绑定到文档前面的“xh”前缀:

... <summary type="xhtml"> <xh:div> This is <xh:b>XHTML</xh:b> content. </xh:div> </summary> ...

... <summary type=“xhtml”><xh:div>这是<xh:b>xhtml</xh:b>内容</xh:div></summary>。。。

3.2. Person Constructs
3.2. 人构

A Person construct is an element that describes a person, corporation, or similar entity (hereafter, 'person').

人员结构是描述人员、公司或类似实体(以下简称“人员”)的元素。

   atomPersonConstruct =
      atomCommonAttributes,
      (element atom:name { text }
       & element atom:uri { atomUri }?
       & element atom:email { atomEmailAddress }?
       & extensionElement*)
        
   atomPersonConstruct =
      atomCommonAttributes,
      (element atom:name { text }
       & element atom:uri { atomUri }?
       & element atom:email { atomEmailAddress }?
       & extensionElement*)
        

This specification assigns no significance to the order of appearance of the child elements in a Person construct. Person constructs allow extension Metadata elements (see Section 6.4).

本规范未对Person构造中的子元素的外观顺序赋予任何意义。Person构造允许扩展元数据元素(参见第6.4节)。

3.2.1. The "atom:name" Element
3.2.1. “atom:name”元素

The "atom:name" element's content conveys a human-readable name for the person. The content of atom:name is Language-Sensitive. Person constructs MUST contain exactly one "atom:name" element.

“atom:name”元素的内容为此人传递了一个可读的名字。atom:name的内容对语言敏感。Person构造必须只包含一个“atom:name”元素。

3.2.2. The "atom:uri" Element
3.2.2. “atom:uri”元素

The "atom:uri" element's content conveys an IRI associated with the person. Person constructs MAY contain an atom:uri element, but MUST NOT contain more than one. The content of atom:uri in a Person construct MUST be an IRI reference [RFC3987].

“atom:uri”元素的内容传递与此人相关联的IRI。Person构造可以包含atom:uri元素,但不能包含多个元素。Person构造中atom:uri的内容必须是IRI引用[RFC3987]。

3.2.3. The "atom:email" Element
3.2.3. “atom:email”元素

The "atom:email" element's content conveys an e-mail address associated with the person. Person constructs MAY contain an atom:email element, but MUST NOT contain more than one. Its content MUST conform to the "addr-spec" production in [RFC2822].

“atom:email”元素的内容传递与此人相关联的电子邮件地址。Person构造可以包含atom:email元素,但不能包含多个元素。其内容必须符合[RFC2822]中的“addr规范”产品。

3.3. Date Constructs
3.3. 日期结构

A Date construct is an element whose content MUST conform to the "date-time" production in [RFC3339]. In addition, an uppercase "T" character MUST be used to separate date and time, and an uppercase "Z" character MUST be present in the absence of a numeric time zone offset.

日期构造是一个元素,其内容必须符合[RFC3339]中的“日期-时间”产品。此外,必须使用大写“T”字符分隔日期和时间,如果没有数字时区偏移,则必须使用大写“Z”字符。

atomDateConstruct = atomCommonAttributes, xsd:dateTime

atomDateConstruct=AtomCommonatAttributes,xsd:dateTime

Such date values happen to be compatible with the following specifications: [ISO.8601.1988], [W3C.NOTE-datetime-19980827], and [W3C.REC-xmlschema-2-20041028].

这些日期值恰好与以下规范兼容:[ISO.8601.1988]、[W3C.NOTE-datetime-19980827]和[W3C.REC-xmlschema-2-20041028]。

Example Date constructs:

日期构造示例:

   <updated>2003-12-13T18:30:02Z</updated>
   <updated>2003-12-13T18:30:02.25Z</updated>
   <updated>2003-12-13T18:30:02+01:00</updated>
   <updated>2003-12-13T18:30:02.25+01:00</updated>
        
   <updated>2003-12-13T18:30:02Z</updated>
   <updated>2003-12-13T18:30:02.25Z</updated>
   <updated>2003-12-13T18:30:02+01:00</updated>
   <updated>2003-12-13T18:30:02.25+01:00</updated>
        

Date values SHOULD be as accurate as possible. For example, it would be generally inappropriate for a publishing system to apply the same timestamp to several entries that were published during the course of a single day.

日期值应尽可能准确。例如,发布系统通常不适合对在一天内发布的多个条目应用相同的时间戳。

4. Atom Element Definitions
4. 原子元素定义
4.1. Container Elements
4.1. 容器元素
4.1.1. The "atom:feed" Element
4.1.1. “atom:feed”元素

The "atom:feed" element is the document (i.e., top-level) element of an Atom Feed Document, acting as a container for metadata and data associated with the feed. Its element children consist of metadata elements followed by zero or more atom:entry child elements.

“atom:feed”元素是atom提要文档的文档(即顶级)元素,充当与提要关联的元数据和数据的容器。它的元素子元素由元数据元素和零个或多个atom:entry子元素组成。

   atomFeed =
      element atom:feed {
         atomCommonAttributes,
         (atomAuthor*
          & atomCategory*
          & atomContributor*
          & atomGenerator?
          & atomIcon?
          & atomId
          & atomLink*
          & atomLogo?
          & atomRights?
          & atomSubtitle?
          & atomTitle
          & atomUpdated
          & extensionElement*),
         atomEntry*
      }
        
   atomFeed =
      element atom:feed {
         atomCommonAttributes,
         (atomAuthor*
          & atomCategory*
          & atomContributor*
          & atomGenerator?
          & atomIcon?
          & atomId
          & atomLink*
          & atomLogo?
          & atomRights?
          & atomSubtitle?
          & atomTitle
          & atomUpdated
          & extensionElement*),
         atomEntry*
      }
        

This specification assigns no significance to the order of atom:entry elements within the feed.

本规范对提要中atom:entry元素的顺序没有任何意义。

The following child elements are defined by this specification (note that the presence of some of these elements is required):

本规范定义了以下子元素(请注意,其中一些元素是必需的):

o atom:feed elements MUST contain one or more atom:author elements, unless all of the atom:feed element's child atom:entry elements contain at least one atom:author element. o atom:feed elements MAY contain any number of atom:category elements. o atom:feed elements MAY contain any number of atom:contributor elements. o atom:feed elements MUST NOT contain more than one atom:generator element. o atom:feed elements MUST NOT contain more than one atom:icon element. o atom:feed elements MUST NOT contain more than one atom:logo element. o atom:feed elements MUST contain exactly one atom:id element. o atom:feed elements SHOULD contain one atom:link element with a rel attribute value of "self". This is the preferred URI for retrieving Atom Feed Documents representing this Atom feed. o atom:feed elements MUST NOT contain more than one atom:link element with a rel attribute value of "alternate" that has the same combination of type and hreflang attribute values. o atom:feed elements MAY contain additional atom:link elements beyond those described above. o atom:feed elements MUST NOT contain more than one atom:rights element. o atom:feed elements MUST NOT contain more than one atom:subtitle element. o atom:feed elements MUST contain exactly one atom:title element. o atom:feed elements MUST contain exactly one atom:updated element.

o atom:feed元素必须包含一个或多个atom:author元素,除非所有atom:feed元素的子atom:entry元素至少包含一个atom:author元素。o atom:feed元素可以包含任意数量的atom:category元素。o atom:feed元素可以包含任意数量的atom:contributor元素。o atom:feed元素不能包含多个atom:generator元素。o atom:feed元素不能包含多个atom:icon元素。o atom:feed元素不能包含多个atom:logo元素。o atom:feed元素必须只包含一个atom:id元素。o atom:feed元素应该包含一个具有rel属性值“self”的atom:link元素。这是检索表示此Atom提要的Atom提要文档的首选URI。o atom:feed元素不能包含多个rel属性值为“alternate”且类型和hreflang属性值组合相同的atom:link元素。o atom:feed元素可能包含上述元素之外的其他atom:link元素。o atom:feed元素不能包含多个atom:rights元素。o atom:feed元素不能包含多个atom:subtitle元素。o atom:feed元素必须只包含一个atom:title元素。o atom:feed元素必须只包含一个atom:updated元素。

If multiple atom:entry elements with the same atom:id value appear in an Atom Feed Document, they represent the same entry. Their atom:updated timestamps SHOULD be different. If an Atom Feed Document contains multiple entries with the same atom:id, Atom Processors MAY choose to display all of them or some subset of them. One typical behavior would be to display only the entry with the latest atom:updated timestamp.

如果atom提要文档中出现多个具有相同atom:id值的atom:entry元素,则它们表示相同的条目。他们的atom:更新的时间戳应该是不同的。如果一个Atom提要文档包含多个具有相同Atom:id的条目,Atom处理器可以选择显示所有条目或其中的某个子集。一个典型的行为是只显示带有最新atom:updated timestamp的条目。

4.1.1.1. Providing Textual Content
4.1.1.1. 提供文本内容

Experience teaches that feeds that contain textual content are in general more useful than those that do not. Some applications (one example is full-text indexers) require a minimum amount of text or (X)HTML to function reliably and predictably. Feed producers should be aware of these issues. It is advisable that each atom:entry element contain a non-empty atom:title element, a non-empty

经验告诉我们,包含文本内容的提要通常比不包含文本内容的提要更有用。一些应用程序(例如全文索引器)需要最少的文本量或(X)HTML才能可靠和可预测地运行。饲料生产者应该意识到这些问题。建议每个atom:entry元素包含一个非空的atom:title元素,一个非空的atom:title元素

atom:content element when that element is present, and a non-empty atom:summary element when the entry contains no atom:content element. However, the absence of atom:summary is not an error, and Atom Processors MUST NOT fail to function correctly as a consequence of such an absence.

atom:content元素(当该元素存在时)和非空的atom:summary元素(当条目不包含atom:content元素时)。然而,缺少atom:summary并不是一个错误,atom处理器不能因为缺少atom:summary而无法正常工作。

4.1.2. The "atom:entry" Element
4.1.2. “atom:entry”元素

The "atom:entry" element represents an individual entry, acting as a container for metadata and data associated with the entry. This element can appear as a child of the atom:feed element, or it can appear as the document (i.e., top-level) element of a stand-alone Atom Entry Document.

“atom:entry”元素表示单个条目,充当与该条目关联的元数据和数据的容器。此元素可以显示为atom:feed元素的子元素,也可以显示为独立atom条目文档的文档(即顶级)元素。

   atomEntry =
      element atom:entry {
         atomCommonAttributes,
         (atomAuthor*
          & atomCategory*
          & atomContent?
          & atomContributor*
          & atomId
          & atomLink*
          & atomPublished?
          & atomRights?
          & atomSource?
          & atomSummary?
          & atomTitle
          & atomUpdated
          & extensionElement*)
      }
        
   atomEntry =
      element atom:entry {
         atomCommonAttributes,
         (atomAuthor*
          & atomCategory*
          & atomContent?
          & atomContributor*
          & atomId
          & atomLink*
          & atomPublished?
          & atomRights?
          & atomSource?
          & atomSummary?
          & atomTitle
          & atomUpdated
          & extensionElement*)
      }
        

This specification assigns no significance to the order of appearance of the child elements of atom:entry.

本规范对atom:entry的子元素的出现顺序没有任何意义。

The following child elements are defined by this specification (note that it requires the presence of some of these elements):

本规范定义了以下子元素(请注意,它要求存在其中一些元素):

o atom:entry elements MUST contain one or more atom:author elements, unless the atom:entry contains an atom:source element that contains an atom:author element or, in an Atom Feed Document, the atom:feed element contains an atom:author element itself. o atom:entry elements MAY contain any number of atom:category elements. o atom:entry elements MUST NOT contain more than one atom:content element. o atom:entry elements MAY contain any number of atom:contributor elements.

o atom:entry元素必须包含一个或多个atom:author元素,除非atom:entry包含包含atom:author元素的atom:source元素,或者在atom提要文档中,atom:Feed元素本身包含atom:author元素。o atom:entry元素可以包含任意数量的atom:category元素。o atom:entry元素不能包含多个atom:content元素。o atom:entry元素可以包含任意数量的atom:contributor元素。

o atom:entry elements MUST contain exactly one atom:id element. o atom:entry elements that contain no child atom:content element MUST contain at least one atom:link element with a rel attribute value of "alternate". o atom:entry elements MUST NOT contain more than one atom:link element with a rel attribute value of "alternate" that has the same combination of type and hreflang attribute values. o atom:entry elements MAY contain additional atom:link elements beyond those described above. o atom:entry elements MUST NOT contain more than one atom:published element. o atom:entry elements MUST NOT contain more than one atom:rights element. o atom:entry elements MUST NOT contain more than one atom:source element. o atom:entry elements MUST contain an atom:summary element in either of the following cases: * the atom:entry contains an atom:content that has a "src" attribute (and is thus empty). * the atom:entry contains content that is encoded in Base64; i.e., the "type" attribute of atom:content is a MIME media type [MIMEREG], but is not an XML media type [RFC3023], does not begin with "text/", and does not end with "/xml" or "+xml". o atom:entry elements MUST NOT contain more than one atom:summary element. o atom:entry elements MUST contain exactly one atom:title element. o atom:entry elements MUST contain exactly one atom:updated element.

o atom:entry元素必须只包含一个atom:id元素。o不包含子atom:content元素的atom:entry元素必须至少包含一个rel属性值为“alternate”的atom:link元素。o atom:entry元素不能包含多个rel属性值为“alternate”且类型和hreflang属性值组合相同的atom:link元素。o atom:entry元素可能包含上述元素之外的其他atom:link元素。o atom:entry元素不能包含多个atom:published元素。o atom:entry元素不能包含多个atom:rights元素。o atom:entry元素不能包含多个atom:source元素。o atom:entry元素在以下任一情况下都必须包含atom:summary元素:*atom:entry包含具有“src”属性的atom:content(因此为空)。*atom:条目包含以Base64编码的内容;i、 例如,atom:content的“type”属性是MIME媒体类型[MIMEREG],但不是XML媒体类型[RFC3023],不以“text/”开头,也不以“/XML”或“+XML”结尾。o atom:entry元素不能包含多个atom:summary元素。o atom:entry元素必须只包含一个atom:title元素。o atom:entry元素必须只包含一个atom:updated元素。

4.1.3. The "atom:content" Element
4.1.3. “atom:content”元素

The "atom:content" element either contains or links to the content of the entry. The content of atom:content is Language-Sensitive.

“atom:content”元素包含或链接到条目的内容。atom的内容:内容对语言敏感。

   atomInlineTextContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { "text" | "html" }?,
         (text)*
      }
        
   atomInlineTextContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { "text" | "html" }?,
         (text)*
      }
        
   atomInlineXHTMLContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { "xhtml" },
         xhtmlDiv
      }
        
   atomInlineXHTMLContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { "xhtml" },
         xhtmlDiv
      }
        
   atomInlineOtherContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { atomMediaType }?,
         (text|anyElement)*
      }
        
   atomInlineOtherContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { atomMediaType }?,
         (text|anyElement)*
      }
        
   atomOutOfLineContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { atomMediaType }?,
         attribute src { atomUri },
         empty
      }
        
   atomOutOfLineContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { atomMediaType }?,
         attribute src { atomUri },
         empty
      }
        
   atomContent = atomInlineTextContent
    | atomInlineXHTMLContent
    | atomInlineOtherContent
    | atomOutOfLineContent
        
   atomContent = atomInlineTextContent
    | atomInlineXHTMLContent
    | atomInlineOtherContent
    | atomOutOfLineContent
        
4.1.3.1. The "type" Attribute
4.1.3.1. “类型”属性

On the atom:content element, the value of the "type" attribute MAY be one of "text", "html", or "xhtml". Failing that, it MUST conform to the syntax of a MIME media type, but MUST NOT be a composite type (see Section 4.2.6 of [MIMEREG]). If neither the type attribute nor the src attribute is provided, Atom Processors MUST behave as though the type attribute were present with a value of "text".

在atom:content元素上,“type”属性的值可以是“text”、“html”或“xhtml”中的一个。否则,它必须符合MIME媒体类型的语法,但不能是复合类型(见[MIMEREG]第4.2.6节)。如果既不提供type属性也不提供src属性,则Atom处理器的行为必须与type属性的值为“text”的情况相同。

4.1.3.2. The "src" Attribute
4.1.3.2. “src”属性

atom:content MAY have a "src" attribute, whose value MUST be an IRI reference [RFC3987]. If the "src" attribute is present, atom:content MUST be empty. Atom Processors MAY use the IRI to retrieve the content and MAY choose to ignore remote content or to present it in a different manner than local content.

atom:content可能有一个“src”属性,其值必须是IRI引用[RFC3987]。如果存在“src”属性,则atom:content必须为空。Atom处理器可以使用IRI检索内容,并可以选择忽略远程内容或以与本地内容不同的方式呈现远程内容。

If the "src" attribute is present, the "type" attribute SHOULD be provided and MUST be a MIME media type [MIMEREG], rather than "text", "html", or "xhtml". The value is advisory; that is to say, when the corresponding URI (mapped from an IRI, if necessary) is dereferenced, if the server providing that content also provides a media type, the server-provided media type is authoritative.

如果存在“src”属性,则应提供“type”属性,并且该属性必须是MIME媒体类型[MIMEREG],而不是“text”、“html”或“xhtml”。其价值是咨询性的;也就是说,当相应的URI(如有必要,从IRI映射)被解引用时,如果提供该内容的服务器也提供媒体类型,则服务器提供的媒体类型是权威的。

4.1.3.3. Processing Model
4.1.3.3. 加工模型

Atom Documents MUST conform to the following rules. Atom Processors MUST interpret atom:content according to the first applicable rule.

Atom文档必须符合以下规则。Atom处理器必须根据第一条适用规则解释Atom:content。

1. If the value of "type" is "text", the content of atom:content MUST NOT contain child elements. Such text is intended to be presented to humans in a readable fashion. Thus, Atom Processors MAY collapse white space (including line breaks), and display the text using typographic techniques such as justification and proportional fonts.

1. 如果“type”的值是“text”,则atom:content的内容不能包含子元素。这样的文本旨在以可读的方式呈现给人类。因此,Atom处理器可能会压缩空白(包括换行符),并使用排版技术(如对齐和比例字体)显示文本。

2. If the value of "type" is "html", the content of atom:content MUST NOT contain child elements and SHOULD be suitable for handling as HTML [HTML]. The HTML markup MUST be escaped; for example, "<br>" as "&lt;br>". The HTML markup SHOULD be such that it could validly appear directly within an HTML <DIV> element. Atom Processors that display the content MAY use the markup to aid in displaying it.

2. 如果“type”的值是“html”,那么atom:content的内容不能包含子元素,并且应该适合作为html[html]处理。HTML标记必须转义;例如,“<br>”作为“&lt;br>”。HTML标记应该能够有效地直接出现在HTML<DIV>元素中。显示内容的Atom处理器可以使用标记来帮助显示内容。

3. If the value of "type" is "xhtml", the content of atom:content MUST be a single XHTML div element [XHTML] and SHOULD be suitable for handling as XHTML. The XHTML div element itself MUST NOT be considered part of the content. Atom Processors that display the content MAY use the markup to aid in displaying it. The escaped versions of characters such as "&" and ">" represent those characters, not markup.

3. 如果“type”的值是“xhtml”,那么atom:content的内容必须是单个xhtml div元素[xhtml],并且应该适合作为xhtml处理。XHTML div元素本身不能被视为内容的一部分。显示内容的Atom处理器可以使用标记来帮助显示内容。诸如“&”和“>”等字符的转义版本表示这些字符,而不是标记。

4. If the value of "type" is an XML media type [RFC3023] or ends with "+xml" or "/xml" (case insensitive), the content of atom:content MAY include child elements and SHOULD be suitable for handling as the indicated media type. If the "src" attribute is not provided, this would normally mean that the "atom:content" element would contain a single child element that would serve as the root element of the XML document of the indicated type.

4. 如果“type”的值是XML媒体类型[RFC3023]或以“+XML”或“/XML”结尾(不区分大小写),则atom:content的内容可能包含子元素,并且应该适合作为指示的媒体类型进行处理。如果未提供“src”属性,这通常意味着“atom:content”元素将包含一个子元素,该子元素将用作指定类型的XML文档的根元素。

5. If the value of "type" begins with "text/" (case insensitive), the content of atom:content MUST NOT contain child elements.

5. 如果“type”的值以“text/(不区分大小写)开头,则atom:content的内容不得包含子元素。

6. For all other values of "type", the content of atom:content MUST be a valid Base64 encoding, as described in [RFC3548], section 3. When decoded, it SHOULD be suitable for handling as the indicated media type. In this case, the characters in the Base64 encoding MAY be preceded and followed in the atom:content element by white space, and lines are separated by a single newline (U+000A) character.

6. 对于“type”的所有其他值,atom:content的内容必须是有效的Base64编码,如[RFC3548]第3节所述。解码时,它应适合处理为指示的媒体类型。在这种情况下,Base64编码中的字符可以在atom:content元素中前后加空格,行之间用一个换行符(U+000A)分隔。

4.1.3.4. Examples
4.1.3.4. 例子

XHTML inline:

XHTML内联:

   ...
   <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
         This is <b>XHTML</b> content.
      </div>
   </content>
   ...
   <content type="xhtml">
      <xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml">
         This is <xhtml:b>XHTML</xhtml:b> content.
      </xhtml:div>
   </content>
   ...
        
   ...
   <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
         This is <b>XHTML</b> content.
      </div>
   </content>
   ...
   <content type="xhtml">
      <xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml">
         This is <xhtml:b>XHTML</xhtml:b> content.
      </xhtml:div>
   </content>
   ...
        

The following example assumes that the XHTML namespace has been bound to the "xh" prefix earlier in the document:

以下示例假定XHTML命名空间已绑定到文档前面的“xh”前缀:

... <content type="xhtml"> <xh:div> This is <xh:b>XHTML</xh:b> content. </xh:div> </content> ...

... <content type=“xhtml”><xh:div>这是<xh:b>xhtml</xh:b>内容</xh:div></content>。。。

4.2. Metadata Elements
4.2. 元数据元素
4.2.1. The "atom:author" Element
4.2.1. “atom:author”元素

The "atom:author" element is a Person construct that indicates the author of the entry or feed.

“atom:author”元素是一个Person构造,表示条目或提要的作者。

   atomAuthor = element atom:author { atomPersonConstruct }
        
   atomAuthor = element atom:author { atomPersonConstruct }
        

If an atom:entry element does not contain atom:author elements, then the atom:author elements of the contained atom:source element are considered to apply. In an Atom Feed Document, the atom:author elements of the containing atom:feed element are considered to apply to the entry if there are no atom:author elements in the locations described above.

如果atom:entry元素不包含atom:author元素,则认为所包含的atom:source元素的atom:author元素适用。在Atom提要文档中,如果上述位置中没有Atom:author元素,则认为包含Atom:Feed元素的Atom:author元素应用于条目。

4.2.2. The "atom:category" Element
4.2.2. “原子:类别”元素

The "atom:category" element conveys information about a category associated with an entry or feed. This specification assigns no meaning to the content (if any) of this element.

“atom:category”元素传递与条目或提要关联的类别的信息。本规范对该元素的内容(如有)不赋予任何意义。

   atomCategory =
      element atom:category {
         atomCommonAttributes,
         attribute term { text },
         attribute scheme { atomUri }?,
         attribute label { text }?,
         undefinedContent
      }
        
   atomCategory =
      element atom:category {
         atomCommonAttributes,
         attribute term { text },
         attribute scheme { atomUri }?,
         attribute label { text }?,
         undefinedContent
      }
        
4.2.2.1. The "term" Attribute
4.2.2.1. “术语”属性

The "term" attribute is a string that identifies the category to which the entry or feed belongs. Category elements MUST have a "term" attribute.

“term”属性是一个字符串,用于标识条目或提要所属的类别。类别元素必须具有“term”属性。

4.2.2.2. The "scheme" Attribute
4.2.2.2. “方案”属性

The "scheme" attribute is an IRI that identifies a categorization scheme. Category elements MAY have a "scheme" attribute.

“scheme”属性是标识分类方案的IRI。类别元素可能具有“scheme”属性。

4.2.2.3. The "label" Attribute
4.2.2.3. “标签”属性

The "label" attribute provides a human-readable label for display in end-user applications. The content of the "label" attribute is Language-Sensitive. Entities such as "&amp;" and "&lt;" represent their corresponding characters ("&" and "<", respectively), not markup. Category elements MAY have a "label" attribute.

“标签”属性为最终用户应用程序中的显示提供了一个人类可读的标签。“label”属性的内容对语言敏感。诸如“&amp;”和“&lt;”等实体分别表示其对应的字符(&”和“<”),而不是标记。类别元素可能具有“标签”属性。

4.2.3. The "atom:contributor" Element
4.2.3. “atom:contributor”元素

The "atom:contributor" element is a Person construct that indicates a person or other entity who contributed to the entry or feed.

“atom:contributor”元素是一个Person构造,表示对条目或提要作出贡献的人或其他实体。

   atomContributor = element atom:contributor { atomPersonConstruct }
        
   atomContributor = element atom:contributor { atomPersonConstruct }
        
4.2.4. The "atom:generator" Element
4.2.4. “原子:生成器”元素

The "atom:generator" element's content identifies the agent used to generate a feed, for debugging and other purposes.

“atom:generator”元素的内容标识用于生成提要的代理,用于调试和其他目的。

   atomGenerator = element atom:generator {
      atomCommonAttributes,
      attribute uri { atomUri }?,
      attribute version { text }?,
      text
   }
        
   atomGenerator = element atom:generator {
      atomCommonAttributes,
      attribute uri { atomUri }?,
      attribute version { text }?,
      text
   }
        

The content of this element, when present, MUST be a string that is a human-readable name for the generating agent. Entities such as "&amp;" and "&lt;" represent their corresponding characters ("&" and "<" respectively), not markup.

此元素的内容(如果存在)必须是一个字符串,该字符串是生成代理的可读名称。诸如“&amp;”和“&lt;”等实体分别表示其对应的字符(&”和“<”),而不是标记。

The atom:generator element MAY have a "uri" attribute whose value MUST be an IRI reference [RFC3987]. When dereferenced, the resulting URI (mapped from an IRI, if necessary) SHOULD produce a representation that is relevant to that agent.

atom:generator元素可能有一个“uri”属性,其值必须是IRI引用[RFC3987]。取消引用时,生成的URI(如有必要,从IRI映射)应生成与该代理相关的表示。

The atom:generator element MAY have a "version" attribute that indicates the version of the generating agent.

atom:generator元素可能有一个“version”属性,指示生成代理的版本。

4.2.5. The "atom:icon" Element
4.2.5. “atom:icon”元素

The "atom:icon" element's content is an IRI reference [RFC3987] that identifies an image that provides iconic visual identification for a feed.

“atom:icon”元素的内容是一个IRI参考[RFC3987],它标识了一个图像,该图像为提要提供了标志性的视觉标识。

   atomIcon = element atom:icon {
      atomCommonAttributes,
      (atomUri)
   }
        
   atomIcon = element atom:icon {
      atomCommonAttributes,
      (atomUri)
   }
        

The image SHOULD have an aspect ratio of one (horizontal) to one (vertical) and SHOULD be suitable for presentation at a small size.

图像的纵横比应为1(水平)与1(垂直),并且应适合小尺寸显示。

4.2.6. The "atom:id" Element
4.2.6. “atom:id”元素

The "atom:id" element conveys a permanent, universally unique identifier for an entry or feed.

“atom:id”元素为条目或提要传递一个永久的、通用的唯一标识符。

   atomId = element atom:id {
      atomCommonAttributes,
      (atomUri)
   }
        
   atomId = element atom:id {
      atomCommonAttributes,
      (atomUri)
   }
        

Its content MUST be an IRI, as defined by [RFC3987]. Note that the definition of "IRI" excludes relative references. Though the IRI might use a dereferencable scheme, Atom Processors MUST NOT assume it can be dereferenced.

其内容必须是[RFC3987]定义的IRI。请注意,“IRI”的定义不包括相对引用。尽管IRI可能使用一个可解引用的方案,但Atom处理器不能假设它可以被解引用。

When an Atom Document is relocated, migrated, syndicated, republished, exported, or imported, the content of its atom:id element MUST NOT change. Put another way, an atom:id element pertains to all instantiations of a particular Atom entry or feed; revisions retain the same content in their atom:id elements. It is suggested that the atom:id element be stored along with the associated resource.

重新定位、迁移、联合、重新发布、导出或导入Atom文档时,其Atom:id元素的内容不得更改。换句话说,atom:id元素属于特定atom条目或提要的所有实例化;修订在其atom:id元素中保留相同的内容。建议将atom:id元素与相关资源一起存储。

The content of an atom:id element MUST be created in a way that assures uniqueness.

必须以确保唯一性的方式创建atom:id元素的内容。

Because of the risk of confusion between IRIs that would be equivalent if they were mapped to URIs and dereferenced, the following normalization strategy SHOULD be applied when generating atom:id elements:

由于IRI之间存在混淆的风险,如果它们被映射到URI并被取消引用,则它们将是等效的,因此在生成atom:id元素时应应用以下规范化策略:

o Provide the scheme in lowercase characters. o Provide the host, if any, in lowercase characters. o Only perform percent-encoding where it is essential. o Use uppercase A through F characters when percent-encoding. o Prevent dot-segments from appearing in paths. o For schemes that define a default authority, use an empty authority if the default is desired. o For schemes that define an empty path to be equivalent to a path of "/", use "/". o For schemes that define a port, use an empty port if the default is desired. o Preserve empty fragment identifiers and queries. o Ensure that all components of the IRI are appropriately character normalized, e.g., by using NFC or NFKC.

o 以小写字符提供方案。o以小写字符提供主机(如果有)。o仅在必要时执行百分比编码。o百分比编码时使用大写A到F字符。o防止点段出现在路径中。o对于定义默认权限的方案,如果需要默认权限,请使用空权限。o对于将空路径定义为“/”路径的方案,请使用“/”。o对于定义端口的方案,如果需要默认值,请使用空端口。o保留空片段标识符和查询。o确保IRI的所有组件都适当地进行了字符规范化,例如使用NFC或NFKC。

4.2.6.1. Comparing atom:id
4.2.6.1. 比较atom:id

Instances of atom:id elements can be compared to determine whether an entry or feed is the same as one seen before. Processors MUST compare atom:id elements on a character-by-character basis (in a case-sensitive fashion). Comparison operations MUST be based solely on the IRI character strings and MUST NOT rely on dereferencing the IRIs or URIs mapped from them.

可以比较atom:id元素的实例,以确定条目或提要是否与前面看到的条目或提要相同。处理器必须逐个字符(以区分大小写的方式)比较atom:id元素。比较操作必须仅基于IRI字符串,并且不得依赖于取消引用从它们映射的IRI或URI。

As a result, two IRIs that resolve to the same resource but are not character-for-character identical will be considered different for the purposes of identifier comparison.

因此,出于标识符比较的目的,解析到相同资源但不是字符对字符相同的两个虹膜将被视为不同。

For example, these are four distinct identifiers, despite the fact that they differ only in case:

例如,这是四个不同的标识符,尽管它们仅在以下情况下不同:

      http://www.example.org/thing
      http://www.example.org/Thing
      http://www.EXAMPLE.org/thing
      HTTP://www.example.org/thing
        
      http://www.example.org/thing
      http://www.example.org/Thing
      http://www.EXAMPLE.org/thing
      HTTP://www.example.org/thing
        

Likewise, these are three distinct identifiers, because IRI %-escaping is significant for the purposes of comparison:

同样,这是三个不同的标识符,因为IRI%转义对于比较而言非常重要:

      http://www.example.com/~bob
      http://www.example.com/%7ebob
      http://www.example.com/%7Ebob
        
      http://www.example.com/~bob
      http://www.example.com/%7ebob
      http://www.example.com/%7Ebob
        
4.2.7. The "atom:link" Element
4.2.7. “原子:链接”元素

The "atom:link" element defines a reference from an entry or feed to a Web resource. This specification assigns no meaning to the content (if any) of this element.

“atom:link”元素定义了从条目或提要到Web资源的引用。本规范对该元素的内容(如有)不赋予任何意义。

   atomLink =
      element atom:link {
         atomCommonAttributes,
         attribute href { atomUri },
         attribute rel { atomNCName | atomUri }?,
         attribute type { atomMediaType }?,
         attribute hreflang { atomLanguageTag }?,
         attribute title { text }?,
         attribute length { text }?,
         undefinedContent
      }
        
   atomLink =
      element atom:link {
         atomCommonAttributes,
         attribute href { atomUri },
         attribute rel { atomNCName | atomUri }?,
         attribute type { atomMediaType }?,
         attribute hreflang { atomLanguageTag }?,
         attribute title { text }?,
         attribute length { text }?,
         undefinedContent
      }
        
4.2.7.1. The "href" Attribute
4.2.7.1. “href”属性

The "href" attribute contains the link's IRI. atom:link elements MUST have an href attribute, whose value MUST be a IRI reference [RFC3987].

“href”属性包含链接的IRI。atom:link元素必须具有href属性,其值必须是IRI引用[RFC3987]。

4.2.7.2. The "rel" Attribute
4.2.7.2. “rel”属性

atom:link elements MAY have a "rel" attribute that indicates the link relation type. If the "rel" attribute is not present, the link element MUST be interpreted as if the link relation type is "alternate".

atom:link元素可能有一个指示链接关系类型的“rel”属性。如果“rel”属性不存在,则必须将链接元素解释为链接关系类型为“alternate”。

The value of "rel" MUST be a string that is non-empty and matches either the "isegment-nz-nc" or the "IRI" production in [RFC3987]. Note that use of a relative reference other than a simple name is not allowed. If a name is given, implementations MUST consider the link relation type equivalent to the same name registered within the IANA

“rel”的值必须是非空字符串,并且与[RFC3987]中的“ISEMENT nz nc”或“IRI”产品相匹配。请注意,不允许使用简单名称以外的相对引用。如果给定名称,则实现必须考虑等同于IANA中注册的同名的链接关系类型。

Registry of Link Relations (Section 7), and thus to the IRI that would be obtained by appending the value of the rel attribute to the string "http://www.iana.org/assignments/relation/". The value of "rel" describes the meaning of the link, but does not impose any behavioral requirements on Atom Processors.

链接关系注册表(第7节),并因此添加到IRI,该IRI将通过将rel属性的值附加到字符串中获得”http://www.iana.org/assignments/relation/". “rel”的值描述了链接的含义,但没有对Atom处理器施加任何行为要求。

This document defines five initial values for the Registry of Link Relations:

本文件定义了链接关系注册表的五个初始值:

1. The value "alternate" signifies that the IRI in the value of the href attribute identifies an alternate version of the resource described by the containing element.

1. 值“alternate”表示href属性值中的IRI标识包含元素所描述的资源的替代版本。

2. The value "related" signifies that the IRI in the value of the href attribute identifies a resource related to the resource described by the containing element. For example, the feed for a site that discusses the performance of the search engine at "http://search.example.com" might contain, as a child of atom:feed:

2. 值“related”表示href属性值中的IRI标识与包含元素所描述的资源相关的资源。例如,讨论搜索引擎性能的站点的提要“http://search.example.com作为atom:feed的子级,可能包含:

       <link rel="related" href="http://search.example.com/"/>
        
       <link rel="related" href="http://search.example.com/"/>
        

An identical link might appear as a child of any atom:entry whose content contains a discussion of that same search engine.

相同的链接可能会显示为任何atom的子项:其内容包含对同一搜索引擎的讨论的条目。

3. The value "self" signifies that the IRI in the value of the href attribute identifies a resource equivalent to the containing element.

3. 值“self”表示href属性值中的IRI标识与包含元素等效的资源。

4. The value "enclosure" signifies that the IRI in the value of the href attribute identifies a related resource that is potentially large in size and might require special handling. For atom:link elements with rel="enclosure", the length attribute SHOULD be provided.

4. 值“enclosure”表示href属性值中的IRI标识可能较大且可能需要特殊处理的相关资源。对于带有rel=“enclosure”的atom:link元素,应该提供length属性。

5. The value "via" signifies that the IRI in the value of the href attribute identifies a resource that is the source of the information provided in the containing element.

5. 值“via”表示href属性值中的IRI标识一个资源,该资源是包含元素中提供的信息的来源。

4.2.7.3. The "type" Attribute
4.2.7.3. “类型”属性

On the link element, the "type" attribute's value is an advisory media type: it is a hint about the type of the representation that is expected to be returned when the value of the href attribute is dereferenced. Note that the type attribute does not override the actual media type returned with the representation. Link elements MAY have a type attribute, whose value MUST conform to the syntax of a MIME media type [MIMEREG].

在link元素上,“type”属性的值是一个咨询媒体类型:它是一个关于当href属性的值被取消引用时预期返回的表示类型的提示。请注意,“类型”属性不会覆盖随表示返回的实际媒体类型。链接元素可能有一个type属性,其值必须符合MIME媒体类型[MIMEREG]的语法。

4.2.7.4. The "hreflang" Attribute
4.2.7.4. “hreflang”属性

The "hreflang" attribute's content describes the language of the resource pointed to by the href attribute. When used together with the rel="alternate", it implies a translated version of the entry. Link elements MAY have an hreflang attribute, whose value MUST be a language tag [RFC3066].

“hreflang”属性的内容描述href属性指向的资源的语言。当与rel=“alternate”一起使用时,它表示条目的翻译版本。链接元素可能具有hreflang属性,其值必须是语言标记[RFC3066]。

4.2.7.5. The "title" Attribute
4.2.7.5. “标题”属性

The "title" attribute conveys human-readable information about the link. The content of the "title" attribute is Language-Sensitive. Entities such as "&amp;" and "&lt;" represent their corresponding characters ("&" and "<", respectively), not markup. Link elements MAY have a title attribute.

“title”属性传递有关链接的可读信息。“title”属性的内容对语言敏感。诸如“&amp;”和“&lt;”等实体分别表示其对应的字符(&”和“<”),而不是标记。链接元素可能具有title属性。

4.2.7.6. The "length" Attribute
4.2.7.6. “长度”属性

The "length" attribute indicates an advisory length of the linked content in octets; it is a hint about the content length of the representation returned when the IRI in the href attribute is mapped to a URI and dereferenced. Note that the length attribute does not override the actual content length of the representation as reported by the underlying protocol. Link elements MAY have a length attribute.

“长度”属性以八位字节表示链接内容的建议长度;它是关于当href属性中的IRI映射到URI并取消引用时返回的表示的内容长度的提示。请注意,length属性不会覆盖底层协议报告的表示的实际内容长度。链接元素可能具有长度属性。

4.2.8. The "atom:logo" Element
4.2.8. “atom:logo”元素

The "atom:logo" element's content is an IRI reference [RFC3987] that identifies an image that provides visual identification for a feed.

“atom:logo”元素的内容是一个IRI参考[RFC3987],它标识了一个图像,该图像为提要提供了视觉标识。

   atomLogo = element atom:logo {
      atomCommonAttributes,
      (atomUri)
   }
        
   atomLogo = element atom:logo {
      atomCommonAttributes,
      (atomUri)
   }
        

The image SHOULD have an aspect ratio of 2 (horizontal) to 1 (vertical).

图像的纵横比应为2(水平)与1(垂直)。

4.2.9. The "atom:published" Element
4.2.9. “atom:published”元素

The "atom:published" element is a Date construct indicating an instant in time associated with an event early in the life cycle of the entry.

“atom:published”元素是一个日期构造,表示在条目生命周期早期与事件相关联的即时时间。

   atomPublished = element atom:published { atomDateConstruct }
        
   atomPublished = element atom:published { atomDateConstruct }
        

Typically, atom:published will be associated with the initial creation or first availability of the resource.

通常,atom:published将与资源的初始创建或第一次可用性相关联。

4.2.10. The "atom:rights" Element
4.2.10. “原子:权利”元素

The "atom:rights" element is a Text construct that conveys information about rights held in and over an entry or feed.

“atom:rights”元素是一个文本构造,它传递有关条目或提要中或其上的权限的信息。

   atomRights = element atom:rights { atomTextConstruct }
        
   atomRights = element atom:rights { atomTextConstruct }
        

The atom:rights element SHOULD NOT be used to convey machine-readable licensing information.

不应使用atom:rights元素传递机器可读的许可信息。

If an atom:entry element does not contain an atom:rights element, then the atom:rights element of the containing atom:feed element, if present, is considered to apply to the entry.

如果atom:entry元素不包含atom:rights元素,则包含atom:feed元素的atom:rights元素(如果存在)将被视为应用于该条目。

4.2.11. The "atom:source" Element
4.2.11. “原子:源”元素

If an atom:entry is copied from one feed into another feed, then the source atom:feed's metadata (all child elements of atom:feed other than the atom:entry elements) MAY be preserved within the copied entry by adding an atom:source child element, if it is not already present in the entry, and including some or all of the source feed's Metadata elements as the atom:source element's children. Such metadata SHOULD be preserved if the source atom:feed contains any of the child elements atom:author, atom:contributor, atom:rights, or atom:category and those child elements are not present in the source atom:entry.

如果一个atom:entry从一个提要复制到另一个提要中,那么源atom:feed的元数据(atom:feed的所有子元素,而不是atom:entry元素)可以通过添加atom:source子元素(如果它尚未出现在该条目中)来保留在复制的条目中,并将部分或全部源提要的元数据元素作为atom:source元素的子元素包含。如果源atom:feed包含任何子元素atom:author、atom:contributor、atom:rights或atom:category,并且源atom:entry中不存在这些子元素,则应保留此类元数据。

   atomSource =
      element atom:source {
         atomCommonAttributes,
         (atomAuthor*
          & atomCategory*
          & atomContributor*
          & atomGenerator?
          & atomIcon?
          & atomId?
          & atomLink*
          & atomLogo?
          & atomRights?
          & atomSubtitle?
          & atomTitle?
          & atomUpdated?
          & extensionElement*)
      }
        
   atomSource =
      element atom:source {
         atomCommonAttributes,
         (atomAuthor*
          & atomCategory*
          & atomContributor*
          & atomGenerator?
          & atomIcon?
          & atomId?
          & atomLink*
          & atomLogo?
          & atomRights?
          & atomSubtitle?
          & atomTitle?
          & atomUpdated?
          & extensionElement*)
      }
        

The atom:source element is designed to allow the aggregation of entries from different feeds while retaining information about an entry's source feed. For this reason, Atom Processors that are performing such aggregation SHOULD include at least the required feed-level Metadata elements (atom:id, atom:title, and atom:updated) in the atom:source element.

atom:source元素被设计为允许聚合来自不同提要的条目,同时保留关于条目源提要的信息。因此,执行此类聚合的Atom处理器应在Atom:source元素中至少包含所需的提要级元数据元素(Atom:id、Atom:title和Atom:Update)。

4.2.12. The "atom:subtitle" Element
4.2.12. “原子:字幕”元素

The "atom:subtitle" element is a Text construct that conveys a human-readable description or subtitle for a feed.

“atom:subtitle”元素是一个文本构造,它为提要传递人类可读的描述或字幕。

   atomSubtitle = element atom:subtitle { atomTextConstruct }
        
   atomSubtitle = element atom:subtitle { atomTextConstruct }
        
4.2.13. The "atom:summary" Element
4.2.13. “atom:summary”元素

The "atom:summary" element is a Text construct that conveys a short summary, abstract, or excerpt of an entry.

“atom:summary”元素是一个文本构造,它传递条目的简短摘要、摘要或摘录。

   atomSummary = element atom:summary { atomTextConstruct }
        
   atomSummary = element atom:summary { atomTextConstruct }
        

It is not advisable for the atom:summary element to duplicate atom:title or atom:content because Atom Processors might assume there is a useful summary when there is none.

不建议atom:summary元素复制atom:title或atom:content,因为atom处理器可能会假设没有有用的摘要。

4.2.14. The "atom:title" Element
4.2.14. “atom:title”元素

The "atom:title" element is a Text construct that conveys a human-readable title for an entry or feed.

“atom:title”元素是一个文本构造,它为条目或提要传递人类可读的标题。

   atomTitle = element atom:title { atomTextConstruct }
        
   atomTitle = element atom:title { atomTextConstruct }
        
4.2.15. The "atom:updated" Element
4.2.15. “atom:updated”元素

The "atom:updated" element is a Date construct indicating the most recent instant in time when an entry or feed was modified in a way the publisher considers significant. Therefore, not all modifications necessarily result in a changed atom:updated value.

“atom:updated”元素是一个日期构造,表示最近一个条目或提要以发布者认为重要的方式被修改的时刻。因此,并不是所有的修改都必然导致atom:updated值的改变。

   atomUpdated = element atom:updated { atomDateConstruct }
        
   atomUpdated = element atom:updated { atomDateConstruct }
        

Publishers MAY change the value of this element over time.

发布者可能会随着时间的推移更改此元素的值。

5. Securing Atom Documents
5. 保护Atom文档的安全

Because Atom is an XML-based format, existing XML security mechanisms can be used to secure its content.

因为Atom是基于XML的格式,所以可以使用现有的XML安全机制来保护其内容。

Producers of feeds and/or entries, and intermediaries who aggregate feeds and/or entries, may have sound reasons for signing and/or encrypting otherwise-unprotected content. For example, a merchant might digitally sign a message that contains a discount coupon for its products. A bank that uses Atom to deliver customer statements is very likely to want to sign and encrypt those messages to protect their customers' financial information and to assure the customer of their authenticity. Intermediaries may want to encrypt aggregated feeds so that a passive observer cannot tell what topics the recipient is interested in. Of course, many other examples exist as well.

提要和/或条目的制作者,以及聚合提要和/或条目的中间人,可能有充分的理由对未受保护的内容进行签名和/或加密。例如,商户可以对包含其产品折扣券的消息进行数字签名。使用Atom传递客户对账单的银行很可能希望对这些信息进行签名和加密,以保护客户的财务信息,并确保客户的真实性。中间人可能希望加密聚合的提要,以便被动观察者无法知道收件人感兴趣的主题。当然,还有许多其他例子。

The algorithm requirements in this section pertain to the Atom Processor. They require that a recipient, at a minimum, be able to handle messages that use the specified cryptographic algorithms. These requirements do not limit the algorithms that the sender can choose.

本节中的算法要求与Atom处理器有关。它们要求收件人至少能够处理使用指定加密算法的邮件。这些要求并不限制发送方可以选择的算法。

5.1. Digital Signatures
5.1. 数字签名

The root of an Atom Document (i.e., atom:feed in an Atom Feed Document, atom:entry in an Atom Entry Document) or any atom:entry element MAY have an Enveloped Signature, as described by XML-Signature and Syntax Processing [W3C.REC-xmldsig-core-20020212].

Atom文档的根(即Atom提要文档中的Atom:feed,Atom条目文档中的Atom:entry)或任何Atom:entry元素都可以具有封装的签名,如XML签名和语法处理[W3C.REC-xmldsig-core-20020212]所述。

Atom Processors MUST NOT reject an Atom Document containing such a signature because they are not capable of verifying it; they MUST continue processing and MAY inform the user of their failure to validate the signature.

Atom处理器不得拒绝包含此类签名的Atom文档,因为他们无法对其进行验证;他们必须继续处理,并可能通知用户他们未能验证签名。

In other words, the presence of an element with the namespace URI "http://www.w3.org/2000/09/xmldsig#" and a local name of "Signature" as a child of the document element MUST NOT cause an Atom Processor to fail merely because of its presence.

换句话说,名称空间URI为“”的元素的存在http://www.w3.org/2000/09/xmldsig#作为document元素的子元素的“Signature”的本地名称不能仅仅因为Atom处理器的存在而导致其失败。

Other elements in an Atom Document MUST NOT be signed unless their definitions explicitly specify such a capability.

Atom文档中的其他元素不能被签名,除非它们的定义明确指定了这种功能。

Section 6.5.1 of [W3C.REC-xmldsig-core-20020212] requires support for Canonical XML [W3C.REC-xml-c14n-20010315]. However, many implementers do not use it because signed XML documents enclosed in other XML documents have their signatures broken. Thus, Atom Processors that verify signed Atom Documents MUST be able to

[W3C.REC-xmldsig-core-20020212]第6.5.1节要求支持规范XML[W3C.REC-XML-c14n-20010315]。但是,许多实现者不使用它,因为包含在其他XML文档中的签名XML文档的签名被破坏了。因此,验证已签名Atom文档的Atom处理器必须能够

canonicalize with the exclusive XML canonicalization method identified by the URI "http://www.w3.org/2001/10/xml-exc-c14n#", as specified in Exclusive XML Canonicalization [W3C.REC-xml-exc-c14n-20020718].

使用URI标识的独占XML规范化方法进行规范化“http://www.w3.org/2001/10/xml-exc-c14n#“,如专用XML规范化[W3C.REC-XML-exc-c14n-20020718]中所述。

Intermediaries such as aggregators may need to add an atom:source element to an entry that does not contain its own atom:source element. If such an entry is signed, the addition will break the signature. Thus, a publisher of individually-signed entries should strongly consider adding an atom:source element to those entries before signing them. Implementers should also be aware of the issues concerning the use of markup in the "xml:" namespace as it interacts with canonicalization.

中介体(如聚合器)可能需要将atom:source元素添加到不包含自己的atom:source元素的条目中。如果签署了此类条目,则添加内容将破坏签名。因此,单独签署的条目发布者应该强烈考虑在签署之前将Atom:源元素添加到这些条目中。实现者还应该意识到与“xml:”命名空间中标记的使用有关的问题,因为它与规范化交互。

Section 4.4.2 of [W3C.REC-xmldsig-core-20020212] requires support for DSA signatures and recommends support for RSA signatures. However, because of the much greater popularity in the market of RSA versus DSA, Atom Processors that verify signed Atom Documents MUST be able to verify RSA signatures, but do not need be able to verify DSA signatures. Due to security issues that can arise if the keying material for message authentication code (MAC) authentication is not handled properly, Atom Documents SHOULD NOT use MACs for signatures.

[W3C.REC-xmldsig-core-20020212]第4.4.2节要求支持DSA签名,并建议支持RSA签名。但是,由于RSA与DSA相比在市场上更受欢迎,验证已签名Atom文档的Atom处理器必须能够验证RSA签名,但不需要能够验证DSA签名。由于如果消息身份验证代码(MAC)身份验证的密钥材料处理不当,可能会出现安全问题,因此Atom文档不应使用MAC进行签名。

5.2. Encryption
5.2. 加密

The root of an Atom Document (i.e., atom:feed in an Atom Feed Document, atom:entry in an Atom Entry Document) MAY be encrypted, using the mechanisms described by XML Encryption Syntax and Processing [W3C.REC-xmlenc-core-20021210].

可以使用XML加密语法和处理[W3C.REC-xmlenc-core-20021210]描述的机制对Atom文档的根(即Atom提要文档中的Atom:feed,Atom条目文档中的Atom:entry)进行加密。

Section 5.1 of [W3C.REC-xmlenc-core-20021210] requires support of TripleDES, AES-128, and AES-256. Atom Processors that decrypt Atom Documents MUST be able to decrypt with AES-128 in Cipher Block Chaining (CBC) mode.

[W3C.REC-xmlenc-core-20021210]第5.1节要求支持TripleDES、AES-128和AES-256。解密Atom文档的Atom处理器必须能够在密码块链接(CBC)模式下使用AES-128进行解密。

Encryption based on [W3C.REC-xmlenc-core-20021210] does not ensure integrity of the original document. There are known cryptographic attacks where someone who cannot decrypt a message can still change bits in a way where part or all the decrypted message makes sense but has a different meaning. Thus, Atom Processors that decrypt Atom Documents SHOULD check the integrity of the decrypted document by verifying the hash in the signature (if any) in the document, or by verifying a hash of the document within the document (if any).

基于[W3C.REC-xmlenc-core-20021210]的加密无法确保原始文档的完整性。有一些已知的加密攻击,其中无法解密消息的人仍然可以以某种方式更改位,其中部分或全部解密的消息有意义,但具有不同的含义。因此,解密Atom文档的Atom处理器应该通过验证文档中签名(如果有)中的哈希值,或者通过验证文档中文档(如果有)的哈希值来检查解密文档的完整性。

5.3. Signing and Encrypting
5.3. 签名和加密

When an Atom Document is to be both signed and encrypted, it is generally a good idea to first sign the document, then encrypt the signed document. This provides integrity to the base document while encrypting all the information, including the identity of the entity that signed the document. Note that, if MACs are used for authentication, the order MUST be that the document is signed and then encrypted, and not the other way around.

在对Atom文档进行签名和加密时,通常最好先对文档进行签名,然后对签名的文档进行加密。这为基础文档提供了完整性,同时加密了所有信息,包括签署文档的实体的身份。请注意,如果使用Mac进行身份验证,则顺序必须是先对文档进行签名,然后进行加密,而不是相反。

6. Extending Atom
6. 扩展原子
6.1. Extensions from Non-Atom Vocabularies
6.1. 非原子词汇表的扩展

This specification describes Atom's XML markup vocabulary. Markup from other vocabularies ("foreign markup") can be used in an Atom Document. Note that the atom:content element is designed to support the inclusion of arbitrary foreign markup.

本规范描述了Atom的XML标记词汇表。来自其他词汇表的标记(“外来标记”)可以在Atom文档中使用。请注意,atom:content元素被设计为支持包含任意外部标记。

6.2. Extensions to the Atom Vocabulary
6.2. 原子词汇表的扩展

The Atom namespace is reserved for future forward-compatible revisions of Atom. Future versions of this specification could add new elements and attributes to the Atom markup vocabulary. Software written to conform to this version of the specification will not be able to process such markup correctly and, in fact, will not be able to distinguish it from markup error. For the purposes of this discussion, unrecognized markup from the Atom vocabulary will be considered "foreign markup".

Atom名称空间是为将来的Atom向前兼容版本保留的。该规范的未来版本可能会向Atom标记词汇表中添加新的元素和属性。按照本规范版本编写的软件将无法正确处理此类标记,事实上,也无法将其与标记错误区分开来。出于本讨论的目的,Atom词汇表中无法识别的标记将被视为“外来标记”。

6.3. Processing Foreign Markup
6.3. 处理外来标记

Atom Processors that encounter foreign markup in a location that is legal according to this specification MUST NOT stop processing or signal an error. It might be the case that the Atom Processor is able to process the foreign markup correctly and does so. Otherwise, such markup is termed "unknown foreign markup".

根据本规范,在合法位置遇到外来标记的Atom处理器不得停止处理或发出错误信号。可能的情况是,Atom处理器能够正确地处理外来标记,并且能够这样做。否则,这种标记称为“未知外部标记”。

When unknown foreign markup is encountered as a child of atom:entry, atom:feed, or a Person construct, Atom Processors MAY bypass the markup and any textual content and MUST NOT change their behavior as a result of the markup's presence.

当作为atom:entry、atom:feed或Person构造的子级遇到未知的外部标记时,atom处理器可能会绕过标记和任何文本内容,并且不得因标记的存在而更改其行为。

When unknown foreign markup is encountered in a Text Construct or atom:content element, software SHOULD ignore the markup and process any text content of foreign elements as though the surrounding markup were not present.

当在文本构造或atom:content元素中遇到未知的外部标记时,软件应该忽略该标记并处理外部元素的任何文本内容,就像周围的标记不存在一样。

6.4. Extension Elements
6.4. 扩展元素

Atom allows foreign markup anywhere in an Atom document, except where it is explicitly forbidden. Child elements of atom:entry, atom:feed, atom:source, and Person constructs are considered Metadata elements and are described below. Child elements of Person constructs are considered to apply to the construct. The role of other foreign markup is undefined by this specification.

Atom允许在Atom文档中的任何位置使用外来标记,除非明确禁止。atom:entry、atom:feed、atom:source和Person构造的子元素被视为元数据元素,如下所述。Person构造的子元素被视为应用于该构造。本规范未定义其他外部标记的角色。

6.4.1. Simple Extension Elements
6.4.1. 简单扩展元素

A Simple Extension element MUST NOT have any attributes or child elements. The element MAY contain character data or be empty. Simple Extension elements are not Language-Sensitive.

简单扩展元素不能有任何属性或子元素。元素可能包含字符数据或为空。简单的扩展元素对语言不敏感。

   simpleExtensionElement =
      element * - atom:* {
         text
      }
        
   simpleExtensionElement =
      element * - atom:* {
         text
      }
        

The element can be interpreted as a simple property (or name/value pair) of the parent element that encloses it. The pair consisting of the namespace-URI of the element and the local name of the element can be interpreted as the name of the property. The character data content of the element can be interpreted as the value of the property. If the element is empty, then the property value can be interpreted as an empty string.

元素可以解释为包含它的父元素的简单属性(或名称/值对)。由元素的名称空间URI和元素的本地名称组成的对可以解释为属性的名称。元素的字符数据内容可以解释为属性值。如果元素为空,则属性值可以解释为空字符串。

6.4.2. Structured Extension Elements
6.4.2. 结构化扩展元素

The root element of a Structured Extension element MUST have at least one attribute or child element. It MAY have attributes, it MAY contain well-formed XML content (including character data), or it MAY be empty. Structured Extension elements are Language-Sensitive.

结构化扩展元素的根元素必须至少有一个属性或子元素。它可能具有属性,可能包含格式良好的XML内容(包括字符数据),也可能为空。结构化扩展元素对语言敏感。

   structuredExtensionElement =
      element * - atom:* {
         (attribute * { text }+,
            (text|anyElement)*)
       | (attribute * { text }*,
          (text?, anyElement+, (text|anyElement)*))
      }
        
   structuredExtensionElement =
      element * - atom:* {
         (attribute * { text }+,
            (text|anyElement)*)
       | (attribute * { text }*,
          (text?, anyElement+, (text|anyElement)*))
      }
        

The structure of a Structured Extension element, including the order of its child elements, could be significant.

结构化扩展元素的结构,包括其子元素的顺序,可能非常重要。

This specification does not provide an interpretation of a Structured Extension element. The syntax of the XML contained in the element (and an interpretation of how the element relates to its containing element) is defined by the specification of the Atom extension.

本规范不提供结构化扩展元素的解释。元素中包含的XML语法(以及元素与其包含元素的关系的解释)由Atom扩展的规范定义。

7. IANA Considerations
7. IANA考虑

An Atom Document, when serialized as XML 1.0, can be identified with the following media type:

当序列化为XML 1.0时,可以使用以下媒体类型标识Atom文档:

MIME media type name: application MIME subtype name: atom+xml Mandatory parameters: None. Optional parameters: "charset": This parameter has semantics identical to the charset parameter of the "application/xml" media type as specified in [RFC3023]. Encoding considerations: Identical to those of "application/xml" as described in [RFC3023], Section 3.2. Security considerations: As defined in this specification. In addition, as this media type uses the "+xml" convention, it shares the same security considerations as described in [RFC3023], Section 10. Interoperability considerations: There are no known interoperability issues. Published specification: This specification. Applications that use this media type: No known applications currently use this media type.

MIME媒体类型名称:应用程序MIME子类型名称:atom+xml强制参数:无。可选参数:“字符集”:此参数的语义与[RFC3023]中指定的“应用程序/xml”媒体类型的字符集参数相同。编码注意事项:与[RFC3023]第3.2节中描述的“应用程序/xml”相同。安全注意事项:如本规范所定义。此外,由于该媒体类型使用“+xml”约定,因此它具有与[RFC3023]第10节所述相同的安全注意事项。互操作性注意事项:不存在已知的互操作性问题。已发布规范:本规范。使用此媒体类型的应用程序:目前没有已知的应用程序使用此媒体类型。

Additional information:

其他信息:

   Magic number(s):  As specified for "application/xml" in [RFC3023],
      Section 3.2.
   File extension:  .atom
   Fragment identifiers:  As specified for "application/xml" in
      [RFC3023], Section 5.
   Base URI:  As specified in [RFC3023], Section 6.
   Macintosh File Type code:  TEXT
   Person and email address to contact for further information:  Mark
      Nottingham <mnot@pobox.com>
   Intended usage:  COMMON
   Author/Change controller:  IESG
        
   Magic number(s):  As specified for "application/xml" in [RFC3023],
      Section 3.2.
   File extension:  .atom
   Fragment identifiers:  As specified for "application/xml" in
      [RFC3023], Section 5.
   Base URI:  As specified in [RFC3023], Section 6.
   Macintosh File Type code:  TEXT
   Person and email address to contact for further information:  Mark
      Nottingham <mnot@pobox.com>
   Intended usage:  COMMON
   Author/Change controller:  IESG
        
7.1. Registry of Link Relations
7.1. 联系关系登记处

This registry is maintained by IANA and initially contains five values: "alternate", "related", "self", "enclosure", and "via". New assignments are subject to IESG Approval, as outlined in [RFC2434]. Requests should be made by email to IANA, which will then forward the request to the IESG, requesting approval. The request should use the following template:

该注册表由IANA维护,最初包含五个值:“备用”、“相关”、“自我”、“附件”和“通过”。如[RFC2434]所述,新任务需经IESG批准。请求应通过电子邮件发送至IANA,IANA随后将请求转发至IESG,请求批准。请求应使用以下模板:

o Attribute Value: (A value for the "rel" attribute that conforms to the syntax rule given in Section 4.2.7.2) o Description: o Expected display characteristics: o Security considerations:

o 属性值:(符合第4.2.7.2节中给出的语法规则的“rel”属性值)o说明:o预期显示特性:o安全注意事项:

8. Security Considerations
8. 安全考虑
8.1. HTML and XHTML Content
8.1. HTML和XHTML内容

Text constructs and atom:content allow the delivery of HTML and XHTML. Many elements in these languages are considered 'unsafe' in that they open clients to one or more types of attack. Implementers of software that processes Atom should carefully consider their handling of every type of element when processing incoming (X)HTML in Atom Documents. See the security sections of [RFC2854] and [HTML] for guidance.

文本构造和atom:内容允许交付HTML和XHTML。这些语言中的许多元素被认为是“不安全的”,因为它们会使客户端遭受一种或多种类型的攻击。处理原子的软件的实现者在处理Atom文档中的传入(X)HTML时,应该仔细考虑它们对每种类型元素的处理。请参阅[RFC2854]和[HTML]的安全部分以获取指导。

Atom Processors should pay particular attention to the security of the IMG, SCRIPT, EMBED, OBJECT, FRAME, FRAMESET, IFRAME, META, and LINK elements, but other elements might also have negative security properties.

Atom处理器应该特别注意IMG、脚本、嵌入、对象、帧、帧集、IFRAME、META和LINK元素的安全性,但其他元素也可能具有负面的安全属性。

(X)HTML can either directly contain or indirectly reference executable content.

(十) HTML可以直接包含或间接引用可执行内容。

8.2. URIs
8.2. URI

Atom Processors handle URIs. See Section 7 of [RFC3986].

Atom处理器处理URI。参见[RFC3986]第7节。

8.3. IRIs
8.3. 虹膜

Atom Processors handle IRIs. See Section 8 of [RFC3987].

原子处理器处理虹膜。参见[RFC3987]第8节。

8.4. Spoofing
8.4. 欺骗

Atom Processors should be aware of the potential for spoofing attacks where the attacker publishes an atom:entry with the atom:id value of an entry from another feed, perhaps with a falsified atom:source

Atom处理器应该知道攻击者发布Atom:entry时可能会发生欺骗攻击,其中Atom:id值为另一个提要中的条目的Atom:id值,可能是伪造的Atom:source

element duplicating the atom:id of the other feed. For example, an Atom Processor could suppress display of duplicate entries by displaying only one entry from a set of entries with identical atom:id values. In that situation, the Atom Processor might also take steps to determine whether the entries originated from the same publisher before considering them duplicates.

复制原子的元素:另一个提要的id。例如,Atom处理器可以通过只显示一组具有相同Atom:id值的条目中的一个条目来抑制重复条目的显示。在这种情况下,Atom处理器还可能在考虑条目是否重复之前,先确定条目是否来自同一发布者。

8.5. Encryption and Signing
8.5. 加密和签名

Atom Documents can be encrypted and signed using [W3C.REC-xmlenc-core-20021210] and [W3C.REC-xmldsig-core-20020212], respectively, and are subject to the security considerations implied by their use.

Atom文档可以分别使用[W3C.REC-xmlenc-core-20021210]和[W3C.REC-xmldsig-core-20020212]进行加密和签名,并受其使用所隐含的安全注意事项的约束。

Digital signatures provide authentication, message integrity, and non-repudiation with proof of origin. Encryption provides data confidentiality.

数字签名提供身份验证、消息完整性和不可否认性以及来源证明。加密提供了数据保密性。

9. References
9. 工具书类
9.1. Normative References
9.1. 规范性引用文件

[HTML] Raggett, D., Hors, A., and I. Jacobs, "HTML 4.01 Specification", W3C REC REC-html401-19991224, December 1999, <http://www.w3.org/TR/1999/REC-html401-19991224>.

[HTML]Raggett,D.,Hors,A.,和I.Jacobs,“HTML 4.01规范”,W3C REC REC-html401-19991224,1999年12月<http://www.w3.org/TR/1999/REC-html401-19991224>.

[MIMEREG] Freed, N. and J. Klensin, "Media Type Specifications and Registration Procedures", BCP 13, RFC 4288, December 2005.

[MIMEREG]Freed,N.和J.Klensin,“介质类型规范和注册程序”,BCP 13,RFC 4288,2005年12月。

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[RFC2822] Resnick, P., "Internet Message Format", RFC 2822, April 2001.

[RFC2822]Resnick,P.,“互联网信息格式”,RFC 2822,2001年4月。

[RFC2854] Connolly, D. and L. Masinter, "The 'text/html' Media Type", RFC 2854, June 2000.

[RFC2854]Connolly,D.和L.Masinter,“文本/html”媒体类型”,RFC 28542000年6月。

[RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media Types", RFC 3023, January 2001.

[RFC3023]Murata,M.,St.Laurent,S.,和D.Kohn,“XML媒体类型”,RFC 3023,2001年1月。

[RFC3066] Alvestrand, H., "Tags for the Identification of Languages", BCP 47, RFC 3066, January 2001.

[RFC3066]Alvestrand,H.,“语言识别标签”,BCP 47,RFC 3066,2001年1月。

[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: Timestamps", RFC 3339, July 2002.

[RFC3339]Klyne,G.和C.Newman,“互联网上的日期和时间:时间戳”,RFC 3339,2002年7月。

[RFC3548] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 3548, July 2003.

[RFC3548]Josefsson,S.,“Base16、Base32和Base64数据编码”,RFC3548,2003年7月。

[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005.

[RFC3986]Berners Lee,T.,Fielding,R.,和L.Masinter,“统一资源标识符(URI):通用语法”,STD 66,RFC 3986,2005年1月。

[RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource Identifiers (IRIs)", RFC 3987, January 2005.

[RFC3987]Duerst,M.和M.Suignard,“国际化资源标识符(IRIs)”,RFC 3987,2005年1月。

[W3C.REC-xml-20040204] Yergeau, F., Paoli, J., Sperberg-McQueen, C., Bray, T., and E. Maler, "Extensible Markup Language (XML) 1.0 (Third Edition)", W3C REC REC-xml-20040204, February 2004, <http://www.w3.org/TR/2004/REC-xml-20040204>.

[W3C.REC-xml-20040204]Yergeau,F.,Paoli,J.,Sperberg McQueen,C.,Bray,T.,和E.Maler,“可扩展标记语言(xml)1.0(第三版)”,W3C REC-xml-200402042004年2月<http://www.w3.org/TR/2004/REC-xml-20040204>.

[W3C.REC-xml-c14n-20010315] Boyer, J., "Canonical XML Version 1.0", W3C REC REC-xml-c14n-20010315, March 2001, <http://www.w3.org/TR/2001/REC-xml-c14n-20010315>.

[W3C.REC-xml-c14n-20010315]Boyer,J.,“规范xml版本1.0”,W3C REC-xml-c14n-20010315,2001年3月<http://www.w3.org/TR/2001/REC-xml-c14n-20010315>.

[W3C.REC-xml-exc-c14n-20020718] Eastlake, D., Boyer, J., and J. Reagle, "Exclusive XML Canonicalization Version 1.0", W3C REC REC-xml-exc-c14n-20020718, July 2002, <http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718>.

[W3C.REC-xml-exc-c14n-20020718]伊斯特莱克,D.,博耶,J.,和J.雷格尔,“独家xml规范化版本1.0”,W3C REC-xml-exc-c14n-20020718,2002年7月<http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718>.

[W3C.REC-xml-infoset-20040204] Cowan, J. and R. Tobin, "XML Information Set (Second Edition)", W3C REC REC-xml-infoset-20040204, February 2004, <http://www.w3.org/TR/2004/REC-xml-infoset-20040204>.

[W3C.REC-xml-infoset-20040204]Cowan,J.和R.Tobin,“xml信息集(第二版)”,W3C REC-xml-infoset-20040204,2004年2月<http://www.w3.org/TR/2004/REC-xml-infoset-20040204>.

[W3C.REC-xml-names-19990114] Hollander, D., Bray, T., and A. Layman, "Namespaces in XML", W3C REC REC-xml-names-19990114, January 1999, <http://www.w3.org/TR/1999/REC-xml-names-19990114>.

[W3C.REC-xml-names-19990114]Hollander,D.,Bray,T.,和A.Layman,“xml中的名称空间”,W3C REC-xml-names-19990114,1999年1月<http://www.w3.org/TR/1999/REC-xml-names-19990114>.

[W3C.REC-xmlbase-20010627] Marsh, J., "XML Base", W3C REC REC-xmlbase-20010627, June 2001, <http://www.w3.org/TR/2001/REC-xmlbase-20010627>.

[W3C.REC-xmlbase-20010627]马什,J.,“XML库”,W3C REC-xmlbase-20010627,2001年6月<http://www.w3.org/TR/2001/REC-xmlbase-20010627>.

[W3C.REC-xmldsig-core-20020212] Solo, D., Reagle, J., and D. Eastlake, "XML-Signature Syntax and Processing", W3C REC REC-xmldsig-core-20020212, February 2002, <http://www.w3.org/TR/2002/REC-xmldsig-core-20020212>.

[W3C.REC-xmldsig-core-20020212]Solo,D.,Reagle,J.和D.Eastlake,“XML签名语法和处理”,W3C REC-xmldsig-core-20020212,2002年2月<http://www.w3.org/TR/2002/REC-xmldsig-core-20020212>.

[W3C.REC-xmlenc-core-20021210] Reagle, J. and D. Eastlake, "XML Encryption Syntax and Processing", W3C REC REC-xmlenc-core-20021210, December 2002, <http://www.w3.org/TR/2002/REC-xmlenc-core-20021210>.

[W3C.REC-xmlenc-core-20021210]Reagle,J.和D.Eastlake,“XML加密语法和处理”,W3C REC-xmlenc-core-20021210,2002年12月<http://www.w3.org/TR/2002/REC-xmlenc-core-20021210>.

[XHTML] Altheim, M., Boumphrey, F., McCarron, S., Dooley, S., Schnitzenbaumer, S., and T. Wugofski, "Modularization of XHTML[TM]", W3C REC REC-xhtml-modularization-20010410, April 2001, <http://www.w3.org/TR/2001/ REC-xhtml-modularization-20010410>.

[XHTML]Altheim,M.,Boumphrey,F.,McCarron,S.,Dooley,S.,Schnitzenbaumer,S.,和T.Wugofski,“XHTML[TM]的模块化”,W3C REC-XHTML-Modulation-20010410,2001年4月<http://www.w3.org/TR/2001/ REC-xhtml-modulation-20010410>。

9.2. Informative References
9.2. 资料性引用

[ISO.8601.1988] International Organization for Standardization, "Data elements and interchange formats - Information interchange - Representation of dates and times", ISO Standard 8601, June 1988.

[ISO.8601.1988]国际标准化组织,“数据元素和交换格式-信息交换-日期和时间的表示”,ISO标准86011988年6月。

[RELAX-NG] Clark, J., "RELAX NG Compact Syntax", December 2001, <http://www.oasis-open.org/committees/relax-ng/ compact-20021121.html>.

[RELAX-NG]Clark,J.,“RELAX-NG紧凑语法”,2001年12月<http://www.oasis-open.org/committees/relax-ng/ compact-20021121.html>。

[RFC2434] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 2434, October 1998.

[RFC2434]Narten,T.和H.Alvestrand,“在RFCs中编写IANA注意事项部分的指南”,BCP 26,RFC 2434,1998年10月。

[W3C.NOTE-datetime-19980827] Wolf, M. and C. Wicksteed, "Date and Time Formats", W3C NOTE NOTE-datetime-19980827, August 1998, <http://www.w3.org/TR/1998/NOTE-datetime-19980827>.

[W3C.NOTE-datetime-19980827]Wolf,M.和C.Wicksteed,“日期和时间格式”,W3C NOTE-datetime-19980827,1998年8月<http://www.w3.org/TR/1998/NOTE-datetime-19980827>.

[W3C.REC-xmlschema-2-20041028] Malhotra, A. and P. Biron, "XML Schema Part 2: Datatypes Second Edition", W3C REC REC-xmlschema-2-20041028, October 2004, <http://www.w3.org/TR/2004/REC-xmlschema-2-20041028>.

[W3C.REC-xmlschema-2-20041028]Malhotra,A.和P.Biron,“XML模式第2部分:数据类型第二版”,W3C REC-xmlschema-2-20041028,2004年10月<http://www.w3.org/TR/2004/REC-xmlschema-2-20041028>.

Appendix A. Contributors
附录A.贡献者

The following people contributed to preliminary versions of this document: Tim Bray, Mark Pilgrim, and Sam Ruby. Norman Walsh provided the Relax NG schema. The content and concepts within are a product of the Atom community and the Atompub Working Group.

以下人员参与了本文档的初步版本:Tim Bray、Mark Pilgrim和Sam Ruby。诺曼·沃尔什提供了RELAXNG模式。其中的内容和概念是Atom社区和Atompub工作组的产物。

The Atompub Working Group has dozens of very active contributors who proposed ideas and wording for this document, including:

Atompub工作组有几十位非常积极的贡献者,他们为本文件提出了想法和措辞,包括:

Danny Ayers, James Aylett, Roger Benningfield, Arve Bersvendsen, Tim Bray, Dan Brickley, Thomas Broyer, Robin Cover, Bill de hOra, Martin Duerst, Roy Fielding, Joe Gregorio, Bjoern Hoehrmann, Paul Hoffman, Anne van Kesteren, Brett Lindsley, Dare Obasanjo, David Orchard, Aristotle Pagaltzis, John Panzer, Graham Parks, Dave Pawson, Mark Pilgrim, David Powell, Julian Reschke, Phil Ringnalda, Antone Roundy, Sam Ruby, Eric Scheid, Brent Simmons, Henri Sivonen, Ray Slakinski, James Snell, Henry Story, Asbjorn Ulsberg, Walter Underwood, Norman Walsh, Dave Winer, and Bob Wyman.

丹尼·艾尔斯、詹姆斯·艾利特、罗杰·本宁菲尔德、阿尔夫·伯斯文森、蒂姆·布雷、丹·布里克利、托马斯·布罗耶、罗宾·盖德、比尔·德霍拉、马丁·杜尔斯、罗伊·菲尔丁、乔·格雷戈里奥、比约恩·霍尔曼、保罗·霍夫曼、安妮·范·凯斯特伦、布雷特·林斯利、黛尔·奥巴桑乔、大卫·乌节、亚里士多德·帕格茨、约翰·帕泽、格雷厄姆·帕克斯、戴夫·帕森、马克·皮格林、,大卫·鲍威尔、朱利安·雷什克、菲尔·林纳达、安东·罗迪、山姆·鲁比、埃里克·谢德、布伦特·西蒙斯、亨利·斯莱金斯基、詹姆斯·斯内尔、亨利·斯托里、阿斯比约恩·艾尔斯伯格、沃尔特·安德伍德、诺曼·沃尔什、戴夫·怀纳和鲍勃·怀曼。

Appendix B. RELAX NG Compact Schema
附录B.RELAXNG紧凑模式

This appendix is informative.

本附录为资料性附录。

The Relax NG schema explicitly excludes elements in the Atom namespace that are not defined in this revision of the specification. Requirements for Atom Processors encountering such markup are given in Sections 6.2 and 6.3.

RELAXNG模式显式排除了本规范修订版中未定义的Atom命名空间中的元素。第6.2节和第6.3节给出了遇到此类标记的Atom处理器的要求。

   # -*- rnc -*-
   # RELAX NG Compact Syntax Grammar for the
   # Atom Format Specification Version 11
        
   # -*- rnc -*-
   # RELAX NG Compact Syntax Grammar for the
   # Atom Format Specification Version 11
        
   namespace atom = "http://www.w3.org/2005/Atom"
   namespace xhtml = "http://www.w3.org/1999/xhtml"
   namespace s = "http://www.ascc.net/xml/schematron"
   namespace local = ""
        
   namespace atom = "http://www.w3.org/2005/Atom"
   namespace xhtml = "http://www.w3.org/1999/xhtml"
   namespace s = "http://www.ascc.net/xml/schematron"
   namespace local = ""
        

start = atomFeed | atomEntry

start=atomFeed | atomEntry

# Common attributes

#共同属性

   atomCommonAttributes =
      attribute xml:base { atomUri }?,
      attribute xml:lang { atomLanguageTag }?,
      undefinedAttribute*
        
   atomCommonAttributes =
      attribute xml:base { atomUri }?,
      attribute xml:lang { atomLanguageTag }?,
      undefinedAttribute*
        

# Text Constructs

#文本结构

   atomPlainTextConstruct =
      atomCommonAttributes,
      attribute type { "text" | "html" }?,
      text
        
   atomPlainTextConstruct =
      atomCommonAttributes,
      attribute type { "text" | "html" }?,
      text
        

atomXHTMLTextConstruct = atomCommonAttributes, attribute type { "xhtml" }, xhtmlDiv

atomXHTMLTextConstruct=atomCommonAttributes,属性类型{“xhtml”},xhtmlDiv

atomTextConstruct = atomPlainTextConstruct | atomXHTMLTextConstruct

atomTextConstruct=atomPlainTextConstruct | atomXHTMLTextConstruct

# Person Construct

#人结构

   atomPersonConstruct =
      atomCommonAttributes,
      (element atom:name { text }
       & element atom:uri { atomUri }?
       & element atom:email { atomEmailAddress }?
       & extensionElement*)
        
   atomPersonConstruct =
      atomCommonAttributes,
      (element atom:name { text }
       & element atom:uri { atomUri }?
       & element atom:email { atomEmailAddress }?
       & extensionElement*)
        

# Date Construct

#日期结构

atomDateConstruct = atomCommonAttributes, xsd:dateTime

atomDateConstruct=AtomCommonatAttributes,xsd:dateTime

# atom:feed

#原子:饲料

   atomFeed =
      [
         s:rule [
            context = "atom:feed"
            s:assert [
               test = "atom:author or not(atom:entry[not(atom:author)])"
               "An atom:feed must have an atom:author unless all "
               ~ "of its atom:entry children have an atom:author."
            ]
         ]
      ]
      element atom:feed {
         atomCommonAttributes,
         (atomAuthor*
          & atomCategory*
          & atomContributor*
          & atomGenerator?
          & atomIcon?
          & atomId
        
   atomFeed =
      [
         s:rule [
            context = "atom:feed"
            s:assert [
               test = "atom:author or not(atom:entry[not(atom:author)])"
               "An atom:feed must have an atom:author unless all "
               ~ "of its atom:entry children have an atom:author."
            ]
         ]
      ]
      element atom:feed {
         atomCommonAttributes,
         (atomAuthor*
          & atomCategory*
          & atomContributor*
          & atomGenerator?
          & atomIcon?
          & atomId
        

& atomLink* & atomLogo? & atomRights? & atomSubtitle? & atomTitle & atomUpdated & extensionElement*), atomEntry* }

&atomLink*&atomLogo?&原子灯atomSubtitle?&atomTitle&AtomUpdate&extensionElement*),atomEntry*}

# atom:entry

#原子:条目

   atomEntry =
      [
         s:rule [
            context = "atom:entry"
            s:assert [
               test = "atom:link[@rel='alternate'] "
               ~ "or atom:link[not(@rel)] "
               ~ "or atom:content"
               "An atom:entry must have at least one atom:link element "
               ~ "with a rel attribute of 'alternate' "
               ~ "or an atom:content."
            ]
         ]
         s:rule [
            context = "atom:entry"
            s:assert [
               test = "atom:author or "
               ~ "../atom:author or atom:source/atom:author"
               "An atom:entry must have an atom:author "
               ~ "if its feed does not."
            ]
         ]
      ]
      element atom:entry {
         atomCommonAttributes,
         (atomAuthor*
          & atomCategory*
          & atomContent?
          & atomContributor*
          & atomId
          & atomLink*
          & atomPublished?
          & atomRights?
          & atomSource?
          & atomSummary?
          & atomTitle
        
   atomEntry =
      [
         s:rule [
            context = "atom:entry"
            s:assert [
               test = "atom:link[@rel='alternate'] "
               ~ "or atom:link[not(@rel)] "
               ~ "or atom:content"
               "An atom:entry must have at least one atom:link element "
               ~ "with a rel attribute of 'alternate' "
               ~ "or an atom:content."
            ]
         ]
         s:rule [
            context = "atom:entry"
            s:assert [
               test = "atom:author or "
               ~ "../atom:author or atom:source/atom:author"
               "An atom:entry must have an atom:author "
               ~ "if its feed does not."
            ]
         ]
      ]
      element atom:entry {
         atomCommonAttributes,
         (atomAuthor*
          & atomCategory*
          & atomContent?
          & atomContributor*
          & atomId
          & atomLink*
          & atomPublished?
          & atomRights?
          & atomSource?
          & atomSummary?
          & atomTitle
        

& atomUpdated & extensionElement*) }

&AtomUpdate&extensionElement*)}

# atom:content

#原子:内容

   atomInlineTextContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { "text" | "html" }?,
         (text)*
      }
        
   atomInlineTextContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { "text" | "html" }?,
         (text)*
      }
        
   atomInlineXHTMLContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { "xhtml" },
         xhtmlDiv
      }
        
   atomInlineXHTMLContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { "xhtml" },
         xhtmlDiv
      }
        
   atomInlineOtherContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { atomMediaType }?,
         (text|anyElement)*
      }
        
   atomInlineOtherContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { atomMediaType }?,
         (text|anyElement)*
      }
        
   atomOutOfLineContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { atomMediaType }?,
         attribute src { atomUri },
         empty
      }
        
   atomOutOfLineContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { atomMediaType }?,
         attribute src { atomUri },
         empty
      }
        
   atomContent = atomInlineTextContent
    | atomInlineXHTMLContent
    | atomInlineOtherContent
    | atomOutOfLineContent
        
   atomContent = atomInlineTextContent
    | atomInlineXHTMLContent
    | atomInlineOtherContent
    | atomOutOfLineContent
        

# atom:author

#原子:作者

   atomAuthor = element atom:author { atomPersonConstruct }
        
   atomAuthor = element atom:author { atomPersonConstruct }
        

# atom:category

#原子:范畴

atomCategory = element atom:category {

atomCategory=元素原子:类别{

atomCommonAttributes, attribute term { text }, attribute scheme { atomUri }?, attribute label { text }?, undefinedContent }

AtomCommonatAttributes,属性项{text},属性方案{atomUri}?,属性标签{text}?,未定义内容}

# atom:contributor

#原子:贡献者

   atomContributor = element atom:contributor { atomPersonConstruct }
        
   atomContributor = element atom:contributor { atomPersonConstruct }
        

# atom:generator

#原子发生器

   atomGenerator = element atom:generator {
      atomCommonAttributes,
      attribute uri { atomUri }?,
      attribute version { text }?,
      text
   }
        
   atomGenerator = element atom:generator {
      atomCommonAttributes,
      attribute uri { atomUri }?,
      attribute version { text }?,
      text
   }
        

# atom:icon

#原子:图标

   atomIcon = element atom:icon {
      atomCommonAttributes,
      (atomUri)
   }
        
   atomIcon = element atom:icon {
      atomCommonAttributes,
      (atomUri)
   }
        

# atom:id

#原子:id

   atomId = element atom:id {
      atomCommonAttributes,
      (atomUri)
   }
        
   atomId = element atom:id {
      atomCommonAttributes,
      (atomUri)
   }
        

# atom:logo

#原子:标志

   atomLogo = element atom:logo {
      atomCommonAttributes,
      (atomUri)
   }
        
   atomLogo = element atom:logo {
      atomCommonAttributes,
      (atomUri)
   }
        

# atom:link

#原子:链接

atomLink = element atom:link { atomCommonAttributes, attribute href { atomUri }, attribute rel { atomNCName | atomUri }?,

atomLink=元素原子:链接{AtomCommonatAttributes,属性href{atomUri},属性rel{atomNCName | atomUri}?,

         attribute type { atomMediaType }?,
         attribute hreflang { atomLanguageTag }?,
         attribute title { text }?,
         attribute length { text }?,
         undefinedContent
      }
        
         attribute type { atomMediaType }?,
         attribute hreflang { atomLanguageTag }?,
         attribute title { text }?,
         attribute length { text }?,
         undefinedContent
      }
        

# atom:published

#原子:已出版

   atomPublished = element atom:published { atomDateConstruct }
        
   atomPublished = element atom:published { atomDateConstruct }
        

# atom:rights

#原子:权利

   atomRights = element atom:rights { atomTextConstruct }
        
   atomRights = element atom:rights { atomTextConstruct }
        

# atom:source

#原子:源

   atomSource =
      element atom:source {
         atomCommonAttributes,
         (atomAuthor*
          & atomCategory*
          & atomContributor*
          & atomGenerator?
          & atomIcon?
          & atomId?
          & atomLink*
          & atomLogo?
          & atomRights?
          & atomSubtitle?
          & atomTitle?
          & atomUpdated?
          & extensionElement*)
      }
        
   atomSource =
      element atom:source {
         atomCommonAttributes,
         (atomAuthor*
          & atomCategory*
          & atomContributor*
          & atomGenerator?
          & atomIcon?
          & atomId?
          & atomLink*
          & atomLogo?
          & atomRights?
          & atomSubtitle?
          & atomTitle?
          & atomUpdated?
          & extensionElement*)
      }
        

# atom:subtitle

#原子:字幕

   atomSubtitle = element atom:subtitle { atomTextConstruct }
        
   atomSubtitle = element atom:subtitle { atomTextConstruct }
        

# atom:summary

#原子:摘要

   atomSummary = element atom:summary { atomTextConstruct }
        
   atomSummary = element atom:summary { atomTextConstruct }
        

# atom:title

#原子:标题

   atomTitle = element atom:title { atomTextConstruct }
        
   atomTitle = element atom:title { atomTextConstruct }
        

# atom:updated

#原子:更新

   atomUpdated = element atom:updated { atomDateConstruct }
        
   atomUpdated = element atom:updated { atomDateConstruct }
        

# Low-level simple types

#低级简单类型

   atomNCName = xsd:string { minLength = "1" pattern = "[^:]*" }
        
   atomNCName = xsd:string { minLength = "1" pattern = "[^:]*" }
        
   # Whatever a media type is, it contains at least one slash
   atomMediaType = xsd:string { pattern = ".+/.+" }
        
   # Whatever a media type is, it contains at least one slash
   atomMediaType = xsd:string { pattern = ".+/.+" }
        
   # As defined in RFC 3066
   atomLanguageTag = xsd:string {
      pattern = "[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*"
   }
        
   # As defined in RFC 3066
   atomLanguageTag = xsd:string {
      pattern = "[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*"
   }
        
   # Unconstrained; it's not entirely clear how IRI fit into
   # xsd:anyURI so let's not try to constrain it here
   atomUri = text
        
   # Unconstrained; it's not entirely clear how IRI fit into
   # xsd:anyURI so let's not try to constrain it here
   atomUri = text
        
   # Whatever an email address is, it contains at least one @
   atomEmailAddress = xsd:string { pattern = ".+@.+" }
        
   # Whatever an email address is, it contains at least one @
   atomEmailAddress = xsd:string { pattern = ".+@.+" }
        

# Simple Extension

#简单扩展

   simpleExtensionElement =
      element * - atom:* {
         text
      }
        
   simpleExtensionElement =
      element * - atom:* {
         text
      }
        

# Structured Extension

#结构化扩展

   structuredExtensionElement =
      element * - atom:* {
         (attribute * { text }+,
            (text|anyElement)*)
       | (attribute * { text }*,
          (text?, anyElement+, (text|anyElement)*))
      }
        
   structuredExtensionElement =
      element * - atom:* {
         (attribute * { text }+,
            (text|anyElement)*)
       | (attribute * { text }*,
          (text?, anyElement+, (text|anyElement)*))
      }
        

# Other Extensibility

#其他扩展性

extensionElement = simpleExtensionElement | structuredExtensionElement

extensionElement=simpleExtensionElement | StructureXtensionElement

   undefinedAttribute =
     attribute * - (xml:base | xml:lang | local:*) { text }
        
   undefinedAttribute =
     attribute * - (xml:base | xml:lang | local:*) { text }
        
   undefinedContent = (text|anyForeignElement)*
        
   undefinedContent = (text|anyForeignElement)*
        
   anyElement =
      element * {
         (attribute * { text }
          | text
          | anyElement)*
      }
        
   anyElement =
      element * {
         (attribute * { text }
          | text
          | anyElement)*
      }
        
   anyForeignElement =
      element * - atom:* {
         (attribute * { text }
          | text
          | anyElement)*
      }
        
   anyForeignElement =
      element * - atom:* {
         (attribute * { text }
          | text
          | anyElement)*
      }
        

# XHTML

#XHTML

   anyXHTML = element xhtml:* {
      (attribute * { text }
       | text
       | anyXHTML)*
   }
        
   anyXHTML = element xhtml:* {
      (attribute * { text }
       | text
       | anyXHTML)*
   }
        
   xhtmlDiv = element xhtml:div {
      (attribute * { text }
       | text
       | anyXHTML)*
   }
        
   xhtmlDiv = element xhtml:div {
      (attribute * { text }
       | text
       | anyXHTML)*
   }
        

# EOF

#EOF

Authors' Addresses

作者地址

Mark Nottingham (editor)

马克·诺丁汉(编辑)

   EMail: mnot@pobox.com
   URI:   http://www.mnot.net/
        
   EMail: mnot@pobox.com
   URI:   http://www.mnot.net/
        

Robert Sayre (editor)

罗伯特·赛尔(编辑)

   EMail: rfsayre@boswijck.com
   URI:   http://boswijck.com
        
   EMail: rfsayre@boswijck.com
   URI:   http://boswijck.com
        

Full Copyright Statement

完整版权声明

Copyright (C) The Internet Society (2005).

版权所有(C)互联网协会(2005年)。

This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.

本文件受BCP 78中包含的权利、许可和限制的约束,除其中规定外,作者保留其所有权利。

This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件及其包含的信息是按“原样”提供的,贡献者、他/她所代表或赞助的组织(如有)、互联网协会和互联网工程任务组不承担任何明示或暗示的担保,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Intellectual Property

知识产权

The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.

IETF对可能声称与本文件所述技术的实施或使用有关的任何知识产权或其他权利的有效性或范围,或此类权利下的任何许可可能或可能不可用的程度,不采取任何立场;它也不表示它已作出任何独立努力来确定任何此类权利。有关RFC文件中权利的程序信息,请参见BCP 78和BCP 79。

Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.

向IETF秘书处披露的知识产权副本和任何许可证保证,或本规范实施者或用户试图获得使用此类专有权利的一般许可证或许可的结果,可从IETF在线知识产权存储库获取,网址为http://www.ietf.org/ipr.

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.

IETF邀请任何相关方提请其注意任何版权、专利或专利申请,或其他可能涵盖实施本标准所需技术的专有权利。请将信息发送至IETF的IETF-ipr@ietf.org.

Acknowledgement

确认

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC编辑功能的资金目前由互联网协会提供。