RSSとATOMの文書構造モデル(メモ書き) - During The Prime Hacking Hours.

[][]RSSとATOMの文書構造モデル(メモ書き)

必要に迫られてRSSとATOMの文書構造を調べています。
Web KANZAKIさんRSS 1.0全要素のツリーが見やすかったので、これを手本に文書構造をモデル化。
個人的メモなので説明はなし。

RSS 0.91

RSS 0.92

RSS 1.00(Web KANZAKIさん)

RSS 2.00

ATOM 0.3

ATOM 1.0

http://backend.userland.com/rss091

  • rss version="0.91"
    • channel
      • title(100)
      • link(500:url)
      • description(500)
      • language(sample)
      • image
      • copyright(100)?
      • managingEditor(100:mail)?
      • webMaster(100:mail)?
      • rating(500:PICS)?
      • pubDate(RFC822 format)?
      • lastBuildDate(RFC822 format)?
      • docs(500:url)?
      • textInput?
      • skipDays?
      • skipHours?
      • items*
    • image
      • url(500:url)
      • title(100)
      • link(500:url)
      • width?
      • height?
    • item*
      • title(100)
      • link(500:url)
      • description(500)?
    • textinput?
      • title(100)
      • description(500)
      • name(20)
      • link(500:url)

http://www.rssboard.org/rss-0-9-2

  • rss version="0.92"
    • channel
      • title
      • link(url)
      • description
      • language(sample)?
      • image?
      • copyright?
      • managingEditor(mail)?
      • webMaster(mail)?
      • rating(PICS)?
      • pubDate(RFC822 format)?
      • lastBuildDate(RFC822 format)?
      • docs(url)?
      • textInput?
      • skipDays?
      • skipHours?
      • items*
    • image
      • url(url)
      • title
      • link(url)
      • width?
      • height?
    • item*
      • title?
      • link(url)?
      • description?
      • source(attr[url])?
      • enclosure(attr[url,length,type])?
      • category(forward-slash-separated)?
      • cloud(rssCloud)?
    • textinput?
      • title
      • description
      • name
      • link(url)

http://www.rssboard.org/rss-2-0

  • rss version="2.0"
    • channel
    • image
      • url(url)
      • title
      • link(url)
      • width?
      • height?
    • item*
      • title?
      • link(url)?
      • description?
      • source(attr[url])?
      • enclosure(attr[url,length,type])?
      • category(forward-slash-separated)?
      • cloud(rssCloud)?
      • author(email)?
      • comments(url)?
      • guid(url,attr[isParmalink?])?
      • pubDate(RFC822 format)?
    • textinput?
      • title
      • description
      • name
      • link(url)

ATOM 0.3

http://www.witha.jp/Atom/Chapter-2_The_Atom_Syndication_Format.html

コンストラクト

  • Constructs
    • Content
      • attr[title,summary,content,mode]
    • Person
      • attr[name,uri?,email?]
    • Date
    • Link
      • attr[ref="alternate|start|next|prev|service.edit|service.post|service.feed"]
      • attr[href,type,title]

構造

  • feed version="0.3"(attr[version,xml:lang?])
    • title
    • link(attr[rel="alternate",type,href])
    • link(Link)*
    • author(Person)
    • contributer(Person)*
    • tagline(Content)+
    • id?
    • generator(attr[url?,version?]?
    • copyright(Content)?
    • info(Content)?
    • modified(Date)?
    • entry*
  • entry*
    • title(Content)
    • link(attr[rel="alternate",type,href])
    • link(Link)*
    • author(Person)?
    • contributer(Person)*
    • id?
    • modified(Date)
    • issued(Date)
    • created(Date)?
    • summary(Content)?
    • content(Content)*

ATOM 1.0

http://www.atomenabled.org/developers/syndication/atom-format-spec.php

コンストラクト

  • Constructs
    • Text
      • attr[#common#,type="text|html|xhtml"?,text?]
    • Person
      • attr[#common#]
      • atom:name
      • atom:url?
      • atom:email?
      • (extentionElement)*
    • Date
      • xsd:dateTime

構造

    • atom:feed|atom:entry
  • atom:feed [xml:base?xml:lang?]
    • atom:author(Person)*
    • atom:category([#common#,term,scheme?,label?],#undef#)*
    • atom:contributor(Person)*
    • atom:generator([#common#,uri?,version?])?
    • atom:icon([#common#],xsd:anyURI)?
    • atom:id([#common#],xsd:anyURI)
    • atom:link([#common#,href,rel?,type?,hreflang?,title?,length?],#undef#)*
    • atom:logo([#common#],xsd:anyURI)?
    • atom:rights(Text)?
    • atom:subtitle(Text)?
    • atom:title(Text)
    • atom:updated(Date)
    • extensionElement*
    • atomEntry*
  • atom:entry([#common#])
    • atom:author(Person)*
    • atom:category([#common#,term,scheme?,label?],#undef#)*
    • atom:content([#common#,type?],#any#*)?
    • atom:contributor(Person)*
    • atom:id([#common#],xsd:anyURI)
    • atom:link([#common#,href,rel?,type?,hreflang?,title?,length?],#undef#)*
    • atom:published(Date)?
    • atom:rights(Text)?
    • atom:source?
    • atom:summary(Text)?
    • atom:title(Text)
    • atom:updated(Date)
    • extensionElement*
  • atom:source?
    • atom:author(Person)*
    • atom:category([#common#,term,scheme?,label?],#undef#)*
    • atom:contributor(Person)*
    • atom:generator([#common#,uri?,version?])?
    • atom:icon([#common#],xsd:anyURI)?
    • atom:id([#common#],xsd:anyURI)
    • atom:link([#common#,href,rel?,type?,hreflang?,title?,length?],#undef#)*
    • atom:logo([#common#],xsd:anyURI)?
    • atom:rights(Text)?
    • atom:subtitle(Text)?
    • atom:title(Text)
    • atom:updated(Date)
    • extensionElement*
  • その他
    • #common# = attr[xml:base?,xml:lang?]