Modify schema for sru_z3950 (database? -> database*)
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 8 Jul 2009 12:29:23 +0000 (14:29 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 8 Jul 2009 12:29:23 +0000 (14:29 +0200)
For sru_z3950, database elements in sru_z3950 is zero or more rather
than one or more. Sort filters in schema.

xml/schema/metaproxy.rnc
xml/schema/metaproxy.rng
xml/schema/metaproxy.xsd

index 6e1aabb..8711820 100644 (file)
@@ -53,6 +53,7 @@ filter =
     | filter_cql_rpn
     | filter_frontend_net
     | filter_http_file
+    | filter_limit
     | filter_load_balance
     | filter_log
     | filter_multi
@@ -62,7 +63,6 @@ filter =
     | filter_sru_z3950
     | filter_virt_db
     | filter_z3950_client
-    | filter_limit
 #    | filter_zeerex_explain
   }
 
@@ -180,7 +180,7 @@ filter_sru_z3950 =
   element mp:database {  
      attribute name { xsd:NCName },
      any        
-  }+
+  }*
 
 filter_virt_db =
   attribute type { "virt_db" },
index 54c54fc..4f59d79 100644 (file)
@@ -90,6 +90,7 @@
         <ref name="filter_cql_rpn"/>
         <ref name="filter_frontend_net"/>
         <ref name="filter_http_file"/>
+        <ref name="filter_limit"/>
         <ref name="filter_load_balance"/>
         <ref name="filter_log"/>
         <ref name="filter_multi"/>
         <ref name="filter_sru_z3950"/>
         <ref name="filter_virt_db"/>
         <ref name="filter_z3950_client"/>
-        <ref name="filter_limit"/>
       </choice>
       <!--    | filter_zeerex_explain -->
     </element>
         <data type="NCName"/>
       </attribute>
     </optional>
-    <oneOrMore>
+    <zeroOrMore>
       <element name="mp:database">
         <attribute name="name">
           <data type="NCName"/>
         </attribute>
         <ref name="any"/>
       </element>
-    </oneOrMore>
+    </zeroOrMore>
   </define>
   <define name="filter_virt_db">
     <attribute name="type">
index 1869052..7fbd314 100644 (file)
@@ -79,6 +79,7 @@
         <xs:element ref="mp:conversion"/>
         <xs:group ref="mp:filter_frontend_net"/>
         <xs:group ref="mp:filter_http_file"/>
+        <xs:group ref="mp:filter_limit"/>
         <xs:group ref="mp:filter_log"/>
         <xs:group ref="mp:filter_multi"/>
         <xs:element ref="mp:xslt"/>
@@ -87,7 +88,6 @@
         <xs:group ref="mp:filter_sru_z3950"/>
         <xs:group ref="mp:filter_virt_db"/>
         <xs:group ref="mp:filter_z3950_client"/>
-        <xs:group ref="mp:filter_limit"/>
       </xs:choice>
       <xs:attribute name="type">
         <xs:simpleType>
@@ -98,6 +98,7 @@
             <xs:enumeration value="cql_rpn"/>
             <xs:enumeration value="frontend_net"/>
             <xs:enumeration value="http_file"/>
+            <xs:enumeration value="limit"/>
             <xs:enumeration value="load_balance"/>
             <xs:enumeration value="log"/>
             <xs:enumeration value="multi"/>
             <xs:enumeration value="sru_z3950"/>
             <xs:enumeration value="virt_db"/>
             <xs:enumeration value="z3950_client"/>
-            <xs:enumeration value="limit"/>
           </xs:restriction>
         </xs:simpleType>
       </xs:attribute>
   </xs:attributeGroup>
   <xs:group name="filter_sru_z3950">
     <xs:sequence>
-      <xs:element maxOccurs="unbounded" ref="mp:database"/>
+      <xs:element minOccurs="0" maxOccurs="unbounded" ref="mp:database"/>
     </xs:sequence>
   </xs:group>
   <xs:element name="database">