mode

Text 構造 (Atom)

Text construct (Atom 1.0)

[8] AtomText construct は、人間可読文章を含みます。 普通は短い文章です。 Atom 1.0 3.1.

内容モデル
type 依存
属性
type

[9] 仕様書:

意味

[10] Text construct内容Language-Sensitive です Atom 1.0 3.1.

内容

[22] Text construct要素内容は、 type 属性の値によって決まります。

テキスト

[23] typetext の場合、 子要素を含んではなりません Atom 1.0 3.1.1.1.

HTML

[27] typehtml の場合、 子要素を含んではなりません Atom 1.0 3.1.1.2.

[28] 内容HTML 4.01 として処理するのに適切であるべきですHTML マーク付けescape しなければなりませんdiv 要素内に現れたとして妥当であるべきですAtom 1.0 3.1.1.2.

escaped markup の項も参照してください。

XHTML

[30] typexhtml の場合、 内容XHTML m12n 1.0 div 要素だけでなければなりませんXHTML として処理するのに適切であるべきですAtom 1.0 3.1.1.3.

[31] div 要素自体は内容の一部と考えてはなりませんAtom 1.0 3.1.1.3.

[32] でも、 div 要素自体は内容でないとしても、そこに lang 属性dir 属性が指定されることがあるので、 注意が必要です。 とはいっても、 div 要素が特別なのではなく、 それ以外にも xml:base 属性名前空間属性などのように先祖 (div より更に上からも。) から継承する属性は色々ありますので、 フィードの一部を取り出して他のところに使うときには本当に注意しないといけません。

もちろん、他の type でもです。

処理

[38] 未知の type に遭遇した時どうするべきなのかは不明です。

[39] type=texttype=html子要素が出現した時どうするべきなのかは不明です。

[40] type=xhtmldiv 要素がなかったり、他に子要素があったりするときどうするべきなのかは不明です。

レンダリング

テキスト

[24] typetext の場合、 Atom処理器空白 (改行を含みます。) をまとめたり、 両端揃え可変幅フォントのような組版上の技術を適用したりして構いません Atom 1.0 3.1.1.1.

歴史

[18] Atom 0.3 では atom:content 要素も含めて Content construct という名前でしたが、 Atom 1.0 では Text construct に改名され、 同要素は別個の定義となりました。

[19] Atom 0.3Content construct には modetype の2つの属性がありましたが、両者は統合されて type 属性のみになりました。

関連

[17] Atom 1.0atom:content 要素Text construct と似ていますが、 平文HTML 以外の内容も表せます。

[25]

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

Atom 1.0 3.1.1.1.

[26]

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

Atom 1.0 3.1.1.2.

[29]

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

Atom 1.0 3.1.1.3.

[33]

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

Atom 1.0 3.1.1.3.

[34]

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

Atom 1.0 3.1.1.3.

[35]

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

Atom 1.0 3.1.1.3.

[7] A Blog From Behind the Trenches ( 版) <http://my.opera.com/haavard/xml/atom/blog/>

<entry>
  <title type="xhtml" xml:lang="en">
    <div xmlns="http://www.w3.org/1999/xhtml" lang="en" dir="ltr">Net Applications admits to skewed statistics</div>
  </title>
  <author>
    <name>Haavard</name>
  </author>
  <link href="http://my.opera.com/haavard/blog/show.dml/2779029"/>
  <id>http://my.opera.com/haavard/blog/2779029</id>
  <updated>2008-12-03T12:56:55Z</updated>
  <content xml:lang="en" type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml" lang="en" dir="ltr"><hr/>In an article at &quot;The Industry Standard&quot;, Net Applications apparently <a href="http://www.thestandard.com/news/2008/12/02/safari-tops-7-global-browser-market-share-sort" target="_blank">admit that their numbers are skewed</a>. More specifically, they admit that they are skewed towards certain regions of the world (US-centric, anyone?). In such an amazing moment of honesty, I wonder why they didn't also admit to actively <a href="http://my.opera.com/haavard/blog/2008/09/04/why-is-net-applications-hitslink-changing-its-browser-stats-after-publishing" target="_blank">editing their own statistics</a>.<br/><br/><strong>Update:</strong> Their claim to be skewed towards Europe doesn't really match <a href="http://www.xitimonitor.com/en-us/browsers-barometer/browsers-barometer-september-2008/index-1-2-3-145.html" target="_blank">XiTi Monitor's statistics for Europe</a>. This would indicate that Net Applications is <strong>heavily</strong> skewed towards the US.</div></content>

</entry>

atom:content 要素Text construct である atom:title 要素子供div 要素属性が指定されています。 意外と珍しい気がします。 type=xhtml 自体珍しいかもしれませんが、 その中でも更に珍しいんじゃないかな。 xml:lang 属性でなく lang 属性を使っているところにも注目したいですね。

Content construct (Atom 0.3)

[1] Atom 0.3Content construct は、 任意の子供内容を含めることができます Atom 0.3

仕様書: The Atom Syndication Format 0.3 (PRE-DRAFT) ( 版) <http://www.mnot.net/drafts/draft-nottingham-atom-format-02.html#rfc.section.3.1>

[2] 属性は2つあり、子供特性を指定します Atom 0.3

関連

[6] Content construct は、 Atom 1.0 では Text construct に改名され、 2つの属性も1つの type 属性に統合されています。 更に、 atom:content 要素は独立した内容モデルに変更されています。

type 属性 (Atom 1.0)

[11] Atom 1.0Text constructtype 属性は、 内容の種類を表します。

[12]

要素
Text construct要素
属性名
type
データ型
text | html | xhtml
既定値
text

[13] 仕様書:

属性値

[14] Atom 1.0 では3種類の値が定義されています。

text
平文を表します。
html
HTML を表します。 escaped markup として解釈されます。
xhtml
XHTML を表します。子孫要素がそのまま HTML 片として解釈されます。

[21] atom:content 属性type 属性とは異なり、 媒体型を指定してはなりません Atom 1.0 3.1.1.

既定値

[15] この属性既定値は陽には定義されていません。

[16] Atom処理器は、この属性が存在しない場合、 text と同じように動作しなければなりません Atom 1.0 3.1.1.

歴史

[20] Atom 0.3 Content construct には type 属性mode 属性がありましたが、 Atom 1.0 では両者が統合され、 type 属性のみとなりました。 Content construct と違って Base64 や任意の媒体型を使うことはできなくなっています (Atom 1.0 atom:content 要素では可能です)。

mode 属性 (Atom 0.3)

[3] Atom 0.3Content constructmode 属性は、 内容符号化の方法を表します Atom 0.3

状態
廃止Atom 1.0 Text construct/atom:content type
要素
Content construct要素
局所名
mode
データ型
xml / escaped / base64

仕様書: The Atom Syndication Format 0.3 (PRE-DRAFT) ( 版) <http://www.mnot.net/drafts/draft-nottingham-atom-format-02.html#rfc.section.3.1.2>

属性値

[4] 属性値は次のいずれかでなければなりません Atom 0.3

xml
要素内容行内 XML であることを表します。 (例: 名前空間に属する XHTML) Atom 0.3
escaped
要素内容逃避された文字列であることを示します。 処理器は、 type で指定された媒体型として解釈する前に逃避を元に戻さなければなりませんAtom 0.3
base64
要素内容RFC 2045 Base64符号化された文字列です。 処理器は、 type で指定された媒体型として解釈する前に復号しなければなりませんAtom 0.3

既定値

[5] 既定値xml です Atom 0.3

Text construct (Metalink)

[37] MetalinkText construct属性を持たず、常に text 相当のようです。

[41] ( 版) <http://blog.suzaka.jp/xmlsrv/atom.php?blog=79>

<entry>

<title type="text/plain" mode="xml">新刊入荷しました&#38;休館日のお知らせ</title>

[42] はてなフォトライフAtomAPI - Hatena Developer Center ( 版) <http://developer.hatena.ne.jp/ja/documents/fotolife/apis/atom>

POST /atom/post

<entry xmlns="http://purl.org/atom/ns#">

<title>Sample</title>

<content mode="base64" type="image/jpeg">/9j/2wCEAAQDAwQDAw.../9n/AA==</content>

</entry>

[43] Blogger: Atom API Documentation ( 版) <https://blogger-developers.googleblog.com/archives/atom-docs.html>

<title mode="escaped" type="text/plain">atom test</title>

[44] Blogger: Atom API Documentation ( 版) <https://blogger-developers.googleblog.com/archives/atom-docs.html>

<content type="application/xhtml+xml">

<div xmlns="http://www.w3.org/1999/xhtml">Testing the Atom API</div>

</content>

[45] RFC 8120 - Mutual Authentication Protocol for HTTP () <https://tools.ietf.org/html/rfc8120#section-3.2.3>

[46] Clarify base64 vs base64url for hashes. (mikewest著, ) <https://github.com/w3c/webappsec-csp/commit/1ceea1b95e73d34dd717282fbe8c19189043c07b>

[47] () <https://info.quantcast.com/rs/516-DGM-318/images/Framework%20CMP%20JS%20API%20Specification.pdf>

metadata: websafe-base64 encoded string,