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