]> gitweb @ CieloNegro.org - Rakka.git/commitdiff
clean up rakka-page-1.0.rng
authorpho <pho@cielonegro.org>
Sun, 17 Feb 2008 02:52:24 +0000 (11:52 +0900)
committerpho <pho@cielonegro.org>
Sun, 17 Feb 2008 02:52:24 +0000 (11:52 +0900)
darcs-hash:20080217025224-62b54-46dc5e44413d5d9d7d463112c37399b386915d05.gz

Rakka/Resource/PageEntity.hs
schemas/rakka-page-1.0.rng

index 09b5ecd367caa2ab24569f595447070f98d45f7b..8f4bd9caced4f263c09be86f1f02d6bfbcaf953c 100644 (file)
@@ -134,7 +134,7 @@ entityToXHTML env
                  += sattr "xmlns" "http://www.w3.org/1999/xhtml"
                  += ( getXPathTreesInDoc "/page/@lang"
                       `guards`
-                      qattr (QN "xml" "lang" "")
+                      qattr (mkQName "xml" "lang" "")
                                 ( getXPathTreesInDoc "/page/@lang/text()" )
                     )
                  += ( eelem "head"
index 15894bbe5afa5049044df6da163d50c73668dd93..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">
-                  <!-- ページ名 -->
-                  <text />
+                  <ref name="pageName" />
                 </attribute>
               </element>
             </zeroOrMore>
         </element>
 
         <element name="binaryData">
-          <!-- これは HXT が對應してゐない。
-               <data type="base64Binary" />
-          -->
-          <text />
+          <data type="base64Binary" />
         </element>
       </choice>
     </group>