]> gitweb @ CieloNegro.org - Rakka.git/blob - schemas/rakka-page-1.0.rng
Bugfix
[Rakka.git] / schemas / rakka-page-1.0.rng
1 <?xml version="1.0" encoding="utf-8"?>
2 <grammar ns="http://cielonegro.org/schema/Rakka/Page/1.0"
3          datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
4          xmlns="http://relaxng.org/ns/structure/1.0">
5
6   <start>
7     <element name="page">
8       <optional>
9         <element name="updateInfo">
10           <!-- 旧リビジョン -->
11           <attribute name="oldRevision">
12             <data type="decimal">
13               <param name="minInclusive">0</param>
14             </data>
15           </attribute>
16
17           <!-- ページ移動 -->
18           <optional>
19             <element name="move">
20               <attribute name="from">
21                 <ref name="pageName" />
22               </attribute>
23             </element>
24           </optional>
25         </element>
26
27         <!-- 猶、更新時に type 屬性を空欄にすると自動判別される。但し
28              binaryData の場合のみ許される。 -->
29       </optional>
30
31       <optional>
32         <!-- ログインしてゐないユーザーの編集を禁止するフラグ -->
33         <attribute name="isLocked">
34           <ref name="boolean" />
35         </attribute>
36       </optional>
37
38       <choice>
39         <!-- リダイレクトの場合 -->
40         <ref name="redirection" />
41     
42         <!-- リダイレクトでない場合 -->
43         <ref name="entity" />
44       </choice>
45     </element>
46   </start>
47
48   <define name="boolean">
49     <choice>
50       <value>yes</value>
51       <value>no</value>
52     </choice>
53   </define>
54
55   <define name="pageName">
56     <data type="string">
57       <param name="pattern">^[^ a-z.|#\[\]][^ .|#\[\]]*$</param>
58     </data>
59   </define>
60
61   <define name="redirection">
62     <attribute name="redirect">
63       <ref name="pageName" />
64     </attribute>
65   </define>
66
67   <define name="entity">
68     <group>
69       <attribute name="type">
70         <!-- MIME Type -->
71         <text />
72       </attribute>
73
74       <optional>
75         <attribute name="lang">
76           <data type="language" />
77         </attribute>
78       </optional>
79
80       <optional>
81         <!-- text/css でなければ無視される -->
82         <attribute name="isTheme">
83           <ref name="boolean" />
84         </attribute>
85       </optional>
86
87       <optional>
88         <!-- text/x-rakka でなければ無視される -->
89         <attribute name="isFeed">
90           <ref name="boolean" />
91         </attribute>
92       </optional>
93
94       <interleave>
95         <optional>
96           <element name="summary">
97             <text />
98           </element>
99         </optional>
100
101         <optional>
102           <element name="otherLang">
103             <zeroOrMore>
104               <element name="link">
105                 <attribute name="lang">
106                   <data type="language" />
107                 </attribute>
108                 <attribute name="page">
109                   <ref name="pageName" />
110                 </attribute>
111               </element>
112             </zeroOrMore>
113           </element>
114         </optional>
115       </interleave>
116
117       <choice>
118         <element name="textData">
119           <text />
120         </element>
121
122         <element name="binaryData">
123           <data type="base64Binary" />
124         </element>
125       </choice>
126     </group>
127   </define>
128 </grammar>