[1] 
>
:[DFN[[RUBYB[サービス文書]@en[Service Document]]]] :
[[作業空間]]として[[群]]化された、1つ以上の[[集成]]の[[所在]]と[[能力]]を説明する[[文書]]。

[2] 仕様書:
-[CITE@en[RFC 5023 - The Atom Publishing Protocol]]
-- <http://tools.ietf.org/html/rfc5023#section-3>
--<http://tools.ietf.org/html/rfc5023#section-4.2>
--<http://tools.ietf.org/html/rfc5023#section-8>

[3] [[サービス文書]]は[[資源]]の作成や編集の処理を始めるために使います。
[SRC@en[[[AtomPub]]]]

[4]
[[サービス文書]]は[[集成]]が受け入れる[[媒体型]]や[[分類]]を示すことができます。
[SRC@en[[[AtomPub]]]]

[6] 
[[サービス文書]]をどう[[発見]]するかは [[AtomPub]] では定義されていません。
[SRC@en[[[AtomPub]]]]

* 媒体型

[7] [[サービス文書]]は[[媒体型]] [DFN[[CODE(MIME)@en[[[application/atomsvc+xml]]]]]]
で識別されます。 [SRC@en[[[AtomPub]]]]

** [CODE(MIME)@en[application/atomsvc+xml]] 媒体型

[13] [[媒体型]] [DFN[[CODE(MIME)@en[[[application/atomsvc+xml]]]]]]
は、 [[XML 1.0]] で[[直列化]]された [[AtomPub]] [[サービス文書]]を表します。
[SRC@en[[[AtomPub]]]]

[14] 仕様書:
[CITE@en[RFC 5023 - The Atom Publishing Protocol]] ([TIME[2008-11-20 18:52:14 +09:00]] 版) <http://tools.ietf.org/html/rfc5023#section-16.2>

*** 引数

[15] [CODE(MIME)@en[[[charset]]]]: [CODE(MIME)@en[[[application/xml]]]] と同じ (省略可能)。
[SRC@en[[[AtomPub]]]]

*** 拡張子

[10] [CODE(file)[.[[atomsvc]]]]。
[SRC@en[[[AtomPub]]]]

*** 素片識別子

[11] [[素片識別子]]については [CODE(MIME)@en[[[application/xml]]]] と同じです。
[SRC@en[[[AtomPub]]]]

*** Macintosh ファイル型符号

[12] [CODE[[[TEXT]]]]。 [SRC@en[[[AtomPub]]]]



* 文書要素

[9] [[サービス文書]]の[[根要素]]は [CODE(XMLe)@en[app:[[service]]]] [[要素]]です。
[SRC@en[[[AtomPub]]]]

* 取り出し

[5] [[クライアント]]が[[サービス文書]]の [[URI]] について [CODE(HTTP)@en[[[GET]]]]
[[要求]]を送信すると、[[鯖]]は[[応答]]で[[サービス文書]]を返します。
この[[サービス文書]]の[[内容]]は、[[認証]]等[[クライアント]]の[[要求]]に応じて変化し得ます。

;; [CITE@en[RFC 5023 - The Atom Publishing Protocol]] ([TIME[2008-11-20 18:52:14 +09:00]] 版) <http://tools.ietf.org/html/rfc5023#section-5.1>

* 例

[8] 
[PRE(XML example code)[
   <?xml version="1.0" encoding='utf-8'?>
   <service xmlns="http://www.w3.org/2007/app"
            xmlns:atom="http://www.w3.org/2005/Atom">
     <workspace>
       <atom:title>Main Site</atom:title>
       <collection
           href="http://example.org/blog/main" >
         <atom:title>My Blog Entries</atom:title>
         <categories
            href="http://example.com/cats/forMain.cats" />
       </collection>
       <collection
           href="http://example.org/blog/pic" >
         <atom:title>Pictures</atom:title>
         <accept>image/png</accept>
         <accept>image/jpeg</accept>
         <accept>image/gif</accept>
       </collection>
     </workspace>
     <workspace>
       <atom:title>Sidebar Blog</atom:title>
       <collection
           href="http://example.org/sidebar/list" >
         <atom:title>Remaindered Links</atom:title>
         <accept>application/atom+xml;type=entry</accept>
         <categories fixed="yes">
           <atom:category
             scheme="http://example.org/extra-cats/"
             term="joke" />
           <atom:category
             scheme="http://example.org/extra-cats/"
             term="serious" />
         </categories>
       </collection>
     </workspace>
   </service>
]PRE]

;; [[AtomPub]] より

