広告
広告
https://www.7key.jp/rfc/4287/rfc4287_3.html#source
https://www.7key.jp/rfc/4287/rfc4287_3.html#translation
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.
Atomの要素は、いくつかの共通する構造を共有することが少なくない。当章では適切な要素定義をすることにより、参照し易い構造と必要条件を定義する。
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.
DateコンストラクトやIRI内で空白を用いてはならない(MUST NOT)ことに注意が必要である。XML発行の実装によっては、値の前後に不必要な空白を挿入するものがあり、それによって妥当ではないAtom文書が発行される可能性がある。
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 atomXHTMLTextConstruct = atomCommonAttributes, attribute type { "xhtml" }, xhtmlDiv atomTextConstruct = atomPlainTextConstruct | atomXHTMLTextConstruct
通常少量ではあるが、Textコンストラクトは人間によって可読な文字列を含む。Textコンストラクトの内容は言語依存である。
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.
Textコンストラクトにtype
属性を用いてもよい(MAY)。type
属性が取り得る値は、text
、html
、xhtml
のいずれか1つでなければならない(MUST)。あるTextコンストラクトにtype
属性が指定されていない場合、Atom処理装置はそのTextコンストラクトのtype
属性値がtext
であると解釈をしなければならない(MUST)。「4.1.3. "atom:content"要素」で定義のあるatom:content
とは違い、Textコンストラクトのtype
属性値としてMIMEメディアタイプ[MIMEREG]を用いてはならない(MUST NOT)。
Example atom:title with text content: ... <title type="text"> Less: < </title> ... 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.
テキストを内容として持つatom:title
の例:
type
属性値がtext
の場合、そのTextコンストラクトの内容として子要素を含んではならない(MUST NOT)。内容となる文字列は、人間が判読可能な形式を提示するものと意図される。そのためAtom処理装置は、(改行を含め)複数の空白をまとめたり、行端揃えやプロポーショナルフォントのような印刷技術を用いて文字列を整形表示したりすることができる(MAY)。
Example atom:title with HTML content: ... <title type="html"> Less: <em> &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 "<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.
HTMLを内容として持つatom:title
の例:
type
属性値がhtml
の場合、そのTextコンストラクトの内容として子要素を含んではならず(MUST NOT)、そのTextコンストラクトの内容はHTMLとして処理に適したものであるべきだ(SHOULD)。例えば<br>
であれば<br>
のように、Textコンストラクトの内容としてのマークアップは全てエスケープしなければならず(MUST)、エスケープを解除した後に直接HTMLの<DIV>要素に正当に含まれるようなものであるべきだ(SHOULD)。Atom処理装置は、マークアップを解釈した上でその内容を表示してもよい(MAY)。
Example atom:title with XHTML content: ... <title type="xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <xhtml:div> Less: <xhtml:em> < </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
の場合、そのTextコンストラクトの内容は1つのXHTML div要素でなければならず(MUST)、そのTextコンストラクトの内容はXHTMLとして処理に適したものであるべきだ(SHOULD)。XHTMLのdiv要素そのものを、そのコンテンツの一部と解釈すべきではない(MUST NOT)。アトム処理装置は、マークアップを解釈した上でその内容を表示してもよい(MAY)。"&"や">"のようにエスケープされた文字の結果については、マークアップとしてではなく文字そのものとして表すこととなる。
Examples of valid XHTML content: ... <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> ...
妥当なXHTMLの内容の例:
The following example assumes that the XHTML namespace has been bound to the "xh" prefix earlier in the document: ... <summary type="xhtml"> <xh:div> This is <xh:b>XHTML</xh:b> content. </xh:div> </summary> ...
XHTML名前空間が、文書内で既に"xh"プレフィックスに結び付けられている場合の例:
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*) 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"と表す)を指し示す要素である。
当仕様書で示しているPersonコンストラクト内にて子要素が出現する順番は意味を持つものではない。Personコンストラクトは拡張メタデータ要素を認めるものである(「6.4. 拡張要素」を参照)。
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
要素の内容は、人間によって判読可能なpersonの名称を伝達するものである。atom:name
の内容は言語依存である。Personコンストラクトは必ずただ1つのatom:name
要素を含まなければならない(MUST)。
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
要素の内容は、personに関連付けられたIRIを伝達するものである。Personコンストラクトは1つのatom:uri
要素を含んでもよいが(MAY)、1つ以上含んではならない(MUST NOT)。Personコンストラクト内のatom:uri
の内容はIRI参照[RFC3987]でなければならない(MUST)。
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に関連付けられた電子メールアドレスを伝達するものである。Personコンストラクトは1つのatom:email
要素を含んでもよいが(MAY)、1つ以上含んではならない(MUST NOT)。atom:email
要素の内容は、[RFC2822]で定義される"addr-spec"形式に準拠させなければならない(MUST)。
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. atomDateConstruct = atomCommonAttributes, xsd:dateTime
Dateコンストラクトは要素であり、その内容は[RFC3339]で定義される"date-time"形式に準拠させなければならない(MUST)。また、日付と時間の区切り文字には大文字の"T"を用いなければならず(MUST)、タイムゾーンオフセット定数を指定しないのであれば代わりに大文字の"Z"を記さなければならない(MUST)。
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> 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.
Dateコンストラクトの例:
日付の値は可能な限り精密にすべきである(SHOULD)。例えばある出版システムにおいて、同じ日に発刊されたエントリのタイムスタンプが全て同一であることは、一般的に不適切だと言えるだろう。
広告