LP#1847800 / LP#1834687: secondary admin pages: config_field attribute in IDL
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xsd
1 <?xml version="1.0" encoding="UTF-8" ?>
2
3 <!--
4
5 Copyright (C) 2007 Laurentian University
6 Dan Scott <dscott@laurentian.ca>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
25  xmlns:idl="http://opensrf.org/spec/IDL/base/v1"
26  xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1"
27  xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1"
28  xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1"
29  xmlns:crud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"
30  targetNamespace="http://opensrf.org/spec/IDL/base/v1"
31  elementFormDefault="qualified"
32  attributeFormDefault="unqualified"
33 >
34
35 <xs:import namespace="http://open-ils.org/spec/opensrf/IDL/persistence/v1"
36  schemaLocation="oils_persist.xsd"/>
37
38 <xs:import namespace="http://open-ils.org/spec/opensrf/IDL/objects/v1"
39  schemaLocation="oils_obj.xsd"/>
40
41 <xs:import namespace="http://open-ils.org/spec/opensrf/IDL/reporter/v1"
42  schemaLocation="reporter.xsd"/>
43
44 <xs:import namespace="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"
45  schemaLocation="permacrud.xsd"/>
46
47 <!-- define simple elements -->
48 <xs:element name="field" nillable="true">
49  <xs:complexType>
50   <xs:sequence>
51    <xs:element ref="idl:description" minOccurs="0" maxOccurs="1"/>
52   </xs:sequence>
53   <xs:attribute name="name"/>
54   <xs:attribute name="suppress_controller"/>
55   <xs:attribute ref="oils_obj:array_position"/>
56   <xs:attribute ref="oils_obj:required"/>
57   <xs:attribute ref="oils_obj:validate"/>
58   <xs:attribute ref="oils_persist:i18n"/>
59   <xs:attribute ref="oils_persist:primitive"/>
60   <xs:attribute ref="oils_persist:virtual"/>
61   <xs:attribute ref="reporter:label"/>
62   <xs:attribute ref="reporter:datatype"/>
63   <xs:attribute ref="reporter:selector"/>
64   <xs:attribute ref="config_field"/>
65  </xs:complexType>
66 </xs:element>
67
68 <xs:element name="description" nillable="true"/>
69
70 <xs:element name="link" nillable="true">
71  <xs:complexType>
72   <xs:attribute name="field" type="xs:string" use="required"/>
73   <xs:attribute name="reltype" type="xs:string" use="required"/>
74   <xs:attribute name="key" type="xs:string" use="required"/>
75   <xs:attribute name="map" type="xs:string" use="required"/>
76   <xs:attribute name="class" type="xs:string" use="required"/>
77   <xs:attribute ref="reporter:label"/>
78  </xs:complexType>
79 </xs:element>
80
81 <xs:element name="fields">
82  <xs:complexType>
83   <xs:sequence>
84    <xs:element ref="idl:field" minOccurs="1" maxOccurs="unbounded"/>
85   </xs:sequence>
86   <xs:attribute ref="oils_persist:primary"/>
87   <xs:attribute ref="oils_persist:sequence"/>
88  </xs:complexType>
89 </xs:element>
90
91 <xs:element name="links">
92  <xs:complexType>
93   <xs:sequence>
94    <xs:element ref="idl:link" minOccurs="0" maxOccurs="unbounded"/>
95   </xs:sequence>
96  </xs:complexType>
97 </xs:element>
98
99 <xs:element name="class">
100  <xs:complexType>
101   <xs:sequence>
102    <xs:element ref="idl:description" minOccurs="0" maxOccurs="1"/>
103    <xs:element ref="oils_persist:source_definition" minOccurs="0" maxOccurs="unbounded"/>
104    <xs:element ref="idl:fields"/>
105    <xs:element ref="idl:links" minOccurs="0"/>
106    <xs:element ref="crud:permacrud" minOccurs="0"/>
107   </xs:sequence>
108   <xs:attribute name="id"/>
109   <xs:attribute name="controller"/>
110   <xs:attribute ref="oils_obj:fieldmapper"/>
111   <xs:attribute ref="oils_persist:readonly"/>
112   <xs:attribute ref="oils_persist:tablename"/>
113   <xs:attribute ref="oils_persist:virtual"/>
114   <xs:attribute ref="oils_persist:field_safe"/>
115   <xs:attribute ref="oils_persist:restrict_primary"/>
116   <xs:attribute ref="reporter:core"/>
117   <xs:attribute ref="reporter:label"/>
118  </xs:complexType>
119 </xs:element>
120
121 <xs:element name="IDL">
122  <xs:complexType>
123   <xs:sequence>
124    <xs:element ref="idl:class" minOccurs="1" maxOccurs="unbounded"/>
125   </xs:sequence>
126  </xs:complexType>
127 </xs:element>
128
129 </xs:schema>