adding permacrud XSD
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 28 Dec 2007 18:21:48 +0000 (18:21 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 28 Dec 2007 18:21:48 +0000 (18:21 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@8288 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/fm_IDL.xsd
Open-ILS/examples/permacrud.xsd [new file with mode: 0644]

index 7f564cb..90b8ecf 100644 (file)
@@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
  xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1"
  xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1"
  xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1"
+ xmlns:crud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"
  targetNamespace="http://opensrf.org/spec/IDL/base/v1"
  elementFormDefault="qualified"
  attributeFormDefault="unqualified"
@@ -40,6 +41,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 <xs:import namespace="http://open-ils.org/spec/opensrf/IDL/reporter/v1"
  schemaLocation="reporter.xsd"/>
 
+<xs:import namespace="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"
+ schemaLocation="permacrud.xsd"/>
+
 <!-- define simple elements -->
 <xs:element name="field" nillable="true">
  <xs:complexType>
@@ -89,6 +93,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
    <xs:element ref="oils_persist:source_definition" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element ref="idl:fields"/>
    <xs:element ref="idl:links" minOccurs="0"/>
+   <xs:element ref="crud:permacrud" minOccurs="0"/>
   </xs:sequence>
   <xs:attribute name="id"/>
   <xs:attribute name="controller"/>
diff --git a/Open-ILS/examples/permacrud.xsd b/Open-ILS/examples/permacrud.xsd
new file mode 100644 (file)
index 0000000..8ddcf0a
--- /dev/null
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+
+Copyright (C) 2007 Laurentian University
+Dan Scott <dscott@laurentian.ca>
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"
+ targetNamespace="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"
+ elementFormDefault="unqualified"
+ attributeFormDefault="unqualified"
+>
+
+<xs:attribute name="permsission" type="xs:string"/>
+<xs:attribute name="context_field" type="xs:string"/>
+
+<xs:element name="context" nillable="true">
+ <xs:complexType>
+  <xs:attribute name="link"/>
+  <xs:attribute name="field"/>
+ </xs:complexType>
+</xs:element>
+
+<xs:element name="create" nillable="true">
+ <xs:complexType>
+  <xs:sequence>
+   <xs:element ref="context" minOccurs="0" maxOccurs="1"/>
+  </xs:sequence>
+  <xs:attribute name="permission" use="required"/>
+  <xs:attribute name="context_field"/>
+ </xs:complexType>
+</xs:element>
+
+<xs:element name="retrieve" nillable="true">
+ <xs:complexType>
+  <xs:sequence>
+   <xs:element ref="context" minOccurs="0" maxOccurs="1"/>
+  </xs:sequence>
+  <xs:attribute name="permission"/>
+  <xs:attribute name="context_field"/>
+ </xs:complexType>
+</xs:element>
+
+<xs:element name="update" nillable="true">
+ <xs:complexType>
+  <xs:sequence>
+   <xs:element ref="context" minOccurs="0" maxOccurs="1"/>
+  </xs:sequence>
+  <xs:attribute name="permission" use="required"/>
+  <xs:attribute name="context_field"/>
+ </xs:complexType>
+</xs:element>
+
+<xs:element name="delete" nillable="true">
+ <xs:complexType>
+  <xs:sequence>
+   <xs:element ref="context" minOccurs="0" maxOccurs="1"/>
+  </xs:sequence>
+  <xs:attribute name="permission" use="required"/>
+  <xs:attribute name="context_field"/>
+ </xs:complexType>
+</xs:element>
+
+<xs:element name="actions">
+ <xs:complexType>
+  <xs:sequence>
+   <xs:element ref="create" minOccurs="0" maxOccurs="1"/>
+   <xs:element ref="retrieve" minOccurs="0" maxOccurs="1"/>
+   <xs:element ref="update" minOccurs="0" maxOccurs="1"/>
+   <xs:element ref="delete" minOccurs="0" maxOccurs="1"/>
+  </xs:sequence>
+ </xs:complexType>
+</xs:element>
+
+<xs:element name="permacrud">
+ <xs:complexType>
+  <xs:sequence>
+   <xs:element ref="actions" minOccurs="1" maxOccurs="1"/>
+  </xs:sequence>
+ </xs:complexType>
+</xs:element>
+
+</xs:schema>