Fix IDL schema validation errors user/dbs/fix_IDL_schema
authorDan Scott <dscott@laurentian.ca>
Fri, 28 Dec 2012 16:54:07 +0000 (11:54 -0500)
committerDan Scott <dscott@laurentian.ca>
Fri, 28 Dec 2012 16:54:07 +0000 (11:54 -0500)
The permacrud schema needs to allow more than one "context" element per
action type.

Also, create needs to come before retrieve in the list of actions.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/examples/fm_IDL.xml
Open-ILS/examples/permacrud.xsd

index a7a765d..91503e7 100644 (file)
@@ -2924,14 +2924,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
-                               <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
-                                       <context link="usr" field="home_ou" />
-                                       <context link="ws" field="owning_lib" />
-                               </retrieve>
                                <create permission="ADMIN_TOOLBAR" context_field="org">
                                        <context link="usr" field="home_ou" />
                                        <context link="ws" field="owning_lib" />
                                </create>
+                               <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
+                                       <context link="usr" field="home_ou" />
+                                       <context link="ws" field="owning_lib" />
+                               </retrieve>
                                <update permission="ADMIN_TOOLBAR" context_field="org">
                                        <context link="usr" field="home_ou" />
                                        <context link="ws" field="owning_lib" />
index 451ac4b..b1867de 100644 (file)
@@ -43,7 +43,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 <xs:element name="create" nillable="true">
  <xs:complexType>
   <xs:sequence>
-   <xs:element ref="permacrud:context" minOccurs="0" maxOccurs="1"/>
+   <xs:element ref="permacrud:context" minOccurs="0" maxOccurs="unbounded"/>
   </xs:sequence>
   <xs:attribute name="permission" use="required"/>
   <xs:attribute name="context_field"/>
@@ -65,7 +65,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 <xs:element name="update" nillable="true">
  <xs:complexType>
   <xs:sequence>
-   <xs:element ref="permacrud:context" minOccurs="0" maxOccurs="1"/>
+   <xs:element ref="permacrud:context" minOccurs="0" maxOccurs="unbounded"/>
   </xs:sequence>
   <xs:attribute name="permission" use="required"/>
   <xs:attribute name="context_field"/>
@@ -76,7 +76,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 <xs:element name="delete" nillable="true">
  <xs:complexType>
   <xs:sequence>
-   <xs:element ref="permacrud:context" minOccurs="0" maxOccurs="1"/>
+   <xs:element ref="permacrud:context" minOccurs="0" maxOccurs="unbounded"/>
   </xs:sequence>
   <xs:attribute name="permission" use="required"/>
   <xs:attribute name="context_field"/>