PageRenderTime 23ms CodeModel.GetById 1ms app.highlight 12ms RepoModel.GetById 2ms app.codeStats 0ms

/sigmah/src/main/resources/report-def.xsd

http://sigma-h.googlecode.com/
XML Schema | 294 lines | 246 code | 48 blank | 0 comment | 0 complexity | 433eb98bf6786ac0e2eeebbf5d55c16f MD5 | raw file
  1<?xml version="1.0" encoding="UTF-8"?>
  2<!--
  3  ~ All Sigmah code is released under the GNU General Public License v3
  4  ~ See COPYRIGHT.txt and LICENSE.txt.
  5  -->
  6
  7<schema xmlns="http://www.w3.org/2001/XMLSchema"
  8		xmlns:rpt="http://www.activityinfo.org/report-def" 
  9		targetNamespace="http://www.activityinfo.org/report-def" xmlns:Q1="http://www.activityinfo.org/report-def.xsd">
 10
 11
 12    <complexType name="reportType">
 13    	<sequence>
 14    		<element name="title" type="string"></element>
 15            <element name="filename" type="string"></element>
 16            <element name="parameters" type="rpt:parametersType"
 17    			maxOccurs="1" minOccurs="0" />
 18            <element name="filter" type="rpt:filterType" maxOccurs="1"
 19            	minOccurs="0" />
 20            <element name="body" type="rpt:bodyType" maxOccurs="1"
 21    			minOccurs="1" />
 22
 23    	</sequence>
 24    </complexType>
 25    
 26    
 27    <complexType name="parametersType">
 28    	<sequence>
 29    		<element name="parameter">
 30    			<complexType>
 31    				<attribute name="type"
 32    					type="rpt:parameterDataType">
 33    				</attribute>
 34    				<attribute name="date-unit"
 35    					type="rpt:dateUnitType">
 36    				</attribute>
 37    				<attribute name="name" type="string"></attribute>
 38    			</complexType></element>
 39    	</sequence>
 40    </complexType>
 41
 42    <complexType name="bodyType">
 43    	<sequence>
 44    		<element name="title" type="string" maxOccurs="1" minOccurs="1"></element>
 45            <element name="sheetTitle" type="string" maxOccurs="1" minOccurs="0"></element>
 46            <choice maxOccurs="unbounded" minOccurs="1">
 47                <element name="chart" type="rpt:chartType" />
 48    			<element name="pivotTable" type="rpt:pivotTableType" />
 49    			<element name="table" type="rpt:tableType" />
 50
 51    		</choice>
 52
 53    	</sequence>
 54    </complexType>
 55
 56	
 57    <complexType name="chartType">
 58    	<complexContent>
 59    		<extension base="rpt:bodyElementType">
 60    			<sequence>
 61    				<element name="dimensions" maxOccurs="1"
 62    					minOccurs="1">
 63    					<complexType>
 64    						<sequence>
 65    							<element name="category"
 66    								type="rpt:dimensionCollectionType">
 67    							</element>
 68    							<element name="legend" type="string">
 69    							</element>
 70    						</sequence>
 71    					</complexType>
 72    				</element>
 73    				<element name="values"
 74    					type="string">
 75    				</element>
 76    			</sequence>
 77    			
 78    			<attribute name="type" type="rpt:chartTypeType"></attribute>
 79
 80    		</extension>
 81    	</complexContent>
 82    </complexType>
 83
 84    <complexType name="pivotTableType"></complexType>
 85
 86    <complexType name="tableType">
 87    	<complexContent>
 88    		<extension base="rpt:bodyElementType">
 89    			<sequence>
 90    				<element name="columns" maxOccurs="1"
 91    					minOccurs="1">
 92    					<complexType>
 93    						<sequence>
 94    							<element name="column"
 95    								type="rpt:columnTreeType">
 96    							</element>
 97    						</sequence>
 98    					</complexType>
 99    				</element>
100
101    				<element name="sortBy"
102    					type="rpt:orderedColumnCollectionType" maxOccurs="1"
103    					minOccurs="0">
104    				</element>
105    				<element name="groupBy" type="rpt:orderedColumnCollectionType" maxOccurs="1"
106    					minOccurs="0">
107    				</element>
108    				<element name="panelBy" type="rpt:orderedColumnCollectionType" maxOccurs="1"
109    					minOccurs="0">
110    				</element>
111
112    			</sequence>
113    		</extension>
114    	</complexContent>
115    </complexType>
116
117	
118
119
120    <complexType name="narrativeType">
121    	<complexContent>
122    		<extension base="rpt:bodyElementType"></extension>
123    	</complexContent>
124    </complexType>
125
126    <simpleType name="dateUnitType">
127    	<restriction base="string">
128    		<enumeration value="day"></enumeration>
129    		<enumeration value="month"></enumeration>
130    		<enumeration value="year"></enumeration>
131    		<enumeration value="quarter"></enumeration>
132    		<enumeration value="week"></enumeration>
133    	</restriction>
134    </simpleType>
135    
136    <complexType name="dateRangeType">
137    	<attribute use="optional" name="min" type="string"></attribute>
138    	<attribute name="max" type="string" use="optional"></attribute>
139    	<attribute name="date-unit" type="rpt:dateUnitType" use="optional"></attribute>
140    	<attribute name="last" type="int" use="optional"></attribute>
141    </complexType>
142
143
144    <complexType name="bodyElementType">
145    	<sequence>
146    		<element name="title" type="string"></element>
147            <element name="sheetTitle" type="string"></element>
148            <element name="filter" type="string"></element>
149    	</sequence>
150    </complexType>
151
152
153    <complexType name="dimensionCollectionType">
154    	<sequence>
155    		<element name="dimension" type="rpt:dimensionType"/>
156    	</sequence>
157    </complexType>
158    
159    <complexType name="dimensionType">
160    	<attribute name="type">
161    		<simpleType>
162    			<restriction base="string">
163    				<enumeration value="partner"></enumeration>
164    				<enumeration value="date1"></enumeration>
165    				<enumeration value="date2"></enumeration>
166    			   	<enumeration value="location"></enumeration>
167    		  		<enumeration value="location2"></enumeration>
168    		  		<enumeration value="admin"></enumeration>
169    		  		<enumeration value="indicator"/>
170    		 		<enumeration value="admin"/>
171    		 		<enumeration value="attribute"/>
172    			</restriction>
173    		</simpleType>
174    	</attribute>
175 
176    	<attribute name="level" type="int"/>
177    	<attribute name="id" type="int"/>    
178  
179    </complexType>
180
181
182    <simpleType name="chartTypeType">
183    	<restriction base="string"></restriction>
184    </simpleType>
185
186
187
188    <element name="report" type="rpt:reportType"></element>
189
190    <simpleType name="parameterDataType">
191    	<restriction base="string">
192    		<enumeration value="date"></enumeration>
193    		<enumeration value="activity"></enumeration>
194    		<enumeration value="database"></enumeration>
195    		<enumeration value="indicator"></enumeration>
196    		<enumeration value="admin-entity"></enumeration>
197    		<enumeration value="admin-level"></enumeration>
198    	</restriction>
199    </simpleType>
200
201    <complexType name="parameterizedValueType">
202    	<attribute name="literalValue" type="string"></attribute>
203    	<attribute name="parameterRef" type="string"></attribute>
204    </complexType>
205
206    <complexType name="filterType">
207    	<sequence>
208    		<element name="dimension">
209    			<complexType>
210    				<sequence>
211    					<element name="include" maxOccurs="unbounded"
212    						minOccurs="0">
213    						<complexType>
214    							<attribute name="id" type="int">
215    							</attribute>
216    						</complexType>
217    					</element>
218    				</sequence>
219    				<attribute name="type"
220    					type="rpt:dimensionTypeType">
221    				</attribute>
222
223    			</complexType>
224    		</element>
225    		<element name="dateRange" type="rpt:dateRangeType"></element>
226    	</sequence>
227    </complexType>
228
229    <simpleType name="dimensionTypeType">
230    	<restriction base="string">
231    		<enumeration value="database"></enumeration>
232    		<enumeration value="indicator"></enumeration>
233    		<enumeration value="admin"></enumeration>
234    		<enumeration value="activity"></enumeration>
235    		<enumeration value="partner"></enumeration>
236    		<enumeration value="status"></enumeration>
237    		<enumeration value="date"></enumeration>
238    	</restriction>
239    </simpleType>
240
241    <complexType name="columnType">
242    	<attribute name="source" type="rpt:columnSourceType"></attribute>
243    </complexType>
244
245    <simpleType name="columnSourceType">
246    	<restriction base="string">
247    		<enumeration value="date1"></enumeration>
248    		<enumeration value="date2"></enumeration>
249    		<enumeration value="location.name"></enumeration>
250    		<enumeration value="location.axe"></enumeration>
251    		<enumeration value="location.x"></enumeration>
252    		<enumeration value="location.y"></enumeration>
253    		<enumeration value="admin"></enumeration>
254    		<enumeration value="partner"></enumeration>
255    		<enumeration value="status"></enumeration>
256    		<enumeration value="indicator"></enumeration>
257    		<enumeration value="attribute"></enumeration>
258    		<enumeration value="attributeGroup"></enumeration>
259    	</restriction>
260    </simpleType>
261
262    <complexType name="columnTreeType">
263    	<complexContent>
264    		<extension base="rpt:columnType">
265    			<sequence>
266    				<element name="column" type="rpt:columnTreeType" maxOccurs="1" minOccurs="0"></element>
267    			</sequence>
268
269    		</extension>
270    	</complexContent>
271    </complexType>
272
273
274    <complexType name="orderedColumnCollectionType">
275    	<sequence>
276    		<element name="column" type="rpt:orderedColumnType"></element>
277    	</sequence>
278    </complexType>
279
280    <complexType name="orderedColumnType">
281    	<complexContent>
282    		<extension base="rpt:columnType">
283    			<attribute name="order" type="rpt:orderType"></attribute>
284    		</extension>
285    	</complexContent>
286    </complexType>
287
288    <simpleType name="orderType">
289    	<restriction base="string">
290    		<enumeration value="ascending"></enumeration>
291    		<enumeration value="descending"></enumeration>
292    	</restriction>
293    </simpleType>
294</schema>