]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - schemas/rakka-page-1.0.rng
clean up rakka-page-1.0.rng
[Rakka.git] / schemas / rakka-page-1.0.rng
index 812e1e16700cccbf520e22b3ae0dd19c4a039707..6e4a545db3c0a624c750ef5132b2939c690ebb10 100644 (file)
@@ -9,17 +9,16 @@
         <element name="updateInfo">
           <!-- 旧リビジョン -->
           <attribute name="oldRevision">
-            <!-- HXT が對應してゐない。
-                 <data type="nonNegativeInteger" />
-            -->
-            <text />
+            <data type="decimal">
+              <param name="minInclusive">0</param>
+            </data>
           </attribute>
 
           <!-- ページ移動 -->
           <optional>
             <element name="move">
               <attribute name="from">
-                <text />
+                <ref name="pageName" />
               </attribute>
             </element>
           </optional>
       <optional>
         <!-- ログインしてゐないユーザーの編集を禁止するフラグ -->
         <attribute name="isLocked">
-          <choice>
-            <value>yes</value>
-            <value>no</value>
-          </choice>
+          <ref name="boolean" />
         </attribute>
       </optional>
 
     </element>
   </start>
 
+  <define name="boolean">
+    <choice>
+      <value>yes</value>
+      <value>no</value>
+    </choice>
+  </define>
+
+  <define name="pageName">
+    <data type="string">
+      <param name="pattern">^[^ a-z|#\[\]][^ |#\[\]]*$</param>
+    </data>
+  </define>
+
   <define name="redirection">
     <attribute name="redirect">
-      <!-- ページ名 -->
-      <data type="anyURI" />
+      <ref name="pageName" />
     </attribute>
   </define>
 
 
       <optional>
         <attribute name="lang">
-          <text />
+          <data type="language" />
         </attribute>
       </optional>
 
       <optional>
         <!-- text/css でなければ無視される -->
         <attribute name="isTheme">
-          <choice>
-            <value>yes</value>
-            <value>no</value>
-          </choice>
+          <ref name="boolean" />
         </attribute>
       </optional>
 
       <optional>
         <!-- text/x-rakka でなければ無視される -->
         <attribute name="isFeed">
-          <choice>
-            <value>yes</value>
-            <value>no</value>
-          </choice>
+          <ref name="boolean" />
         </attribute>
       </optional>
 
             <zeroOrMore>
               <element name="link">
                 <attribute name="lang">
-                  <!-- RFC 4646 言語コード -->
-                  <text />
+                  <data type="language" />
                 </attribute>
                 <attribute name="page">
-                  <!-- ページ名 -->
-                  <data type="anyURI" />
+                  <ref name="pageName" />
                 </attribute>
               </element>
             </zeroOrMore>
         </element>
 
         <element name="binaryData">
-          <!-- これは HXT が對應してゐない。
-               <data type="base64Binary" />
-          -->
-          <text />
+          <data type="base64Binary" />
         </element>
       </choice>
-
-      <optional>
-        <element name="attachment">
-          <zeroOrMore>
-            <element name="entry">
-              <attribute name="name" />
-              <ref name="anyElement" />
-            </element>
-          </zeroOrMore>
-        </element>
-      </optional>
     </group>
   </define>
-
-  <define name="anyElement">
-    <element>
-      <anyName />
-      <zeroOrMore>
-        <choice>
-          <attribute>
-            <anyName />
-          </attribute>
-          <text />
-          <ref name="anyElement" />
-        </choice>
-      </zeroOrMore>
-    </element>
-  </define>
 </grammar>