<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fox="http://www.og.dti.gov/fox" xmlns:dataset="http://www.og.dti.gov/fox" xmlns:fm="http://www.og.dti.gov/fox_module"  xmlns:widget="http://www.og.dti.gov/fox" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema
C:\pvcswork\Fox\source\altova_xmlspy\schema\fox_schema.xsd">
	<xs:import schemaLocation="C:\pvcswork\Fox\source\altova_xmlspy\schema\fox_import.xsd"/>
	<xs:annotation>
		<xs:appinfo>
			<fm:module>
				<fm:header>
					<fm:name>DEMO_DATASET_DISPLAY</fm:name>
					<fm:title>FOX Demo Dataset Display</fm:title>
					<fm:application-title>FOX Demo Dataset Display</fm:application-title>
					<fm:version-no>$Revision:   1.0  $</fm:version-no>
					<fm:version-desc/>
					<fm:history/>
					<fm:description/>
					<fm:build-notes/>
					<fm:help-text/>
				</fm:header>
				<fm:control>
					<fm:transaction-mode>read-committed</fm:transaction-mode>
					<fm:authentication>not-required</fm:authentication>
				</fm:control>
				<fm:security-list/>
				<fm:library-list>
					<fm:library>LAYOUT1</fm:library>
				</fm:library-list>
				<fm:storage-location-list>
					<fm:storage-location name="main">
						<fm:cache-key string="DEMO_DATASET_DISPLAY:1">
							<fm:using using-type="UNIQUE"/>
						</fm:cache-key>
						<fm:new-document>
							<fm:root-element>ROOT</fm:root-element>
						</fm:new-document>
					</fm:storage-location>
				</fm:storage-location-list>
				<fm:entry-theme-list>
					<fm:entry-theme name="new">
						<fm:storage-location>main</fm:storage-location>
						<fm:state>state-main</fm:state>
						<fm:attach>/*</fm:attach>
						<fm:do>
							<fm:call action="action-initialise-demo"/>
						</fm:do>
					</fm:entry-theme>
				</fm:entry-theme-list>
				<fm:action-list>
					<fm:action name="action-initialise-demo">
						<fm:do>
							<fm:init target=":{theme}/DATASET_DISPLAY"/>
							<fm:init target=":{theme}/DATASET_DISPLAY/ORDER_LIST" template="tmpl-dataset"/>
						</fm:do>
					</fm:action>
				</fm:action-list>
				<fm:presentation>
					<fm:set-buffer name="buffer-datasetDisplay">
						<fm:set-out match=":{theme}/DATASET_DISPLAY/ORDER_LIST" dataset:mode="."/>
					</fm:set-buffer>
				</fm:presentation>
				<fm:state-list>
					<fm:state name="state-main">
						<fm:action-list/>
						<fm:presentation>
							<!-- Override buffers within LAYOUT1LIB to remove images -->
							<fm:set-buffer name="buffer-top-left-logo"/>
							<fm:set-buffer name="buffer-mid-left-logo"/>
							<!-- Override topNav and bottomNav to remove -->
							<fm:set-buffer name="buffer-topNav"/>
							<fm:set-buffer name="buffer-bottomNav"/>
							<fm:set-buffer name="buffer-datasetDisplay">
								<fm:set-out match=":{theme}/DATASET_DISPLAY/ORDER_LIST" dataset:mode="."/>
							</fm:set-buffer>
							<fm:set-buffer name="buffer-content">
								<br/>
								<br/>
								<div class="setoutHeader">Dataset Display</div>
								<br/>
								<table>
									<tr>
										<td>
											<fm:include name="buffer-datasetDisplay"/>
										</td>
									</tr>
								</table>
								<br/>
							</fm:set-buffer>
						</fm:presentation>
					</fm:state>
				</fm:state-list>
				<fm:template-list>
					<fm:template name="tmpl-dataset">
						<ORDER>
							<ORDER_REF>1</ORDER_REF>
							<CUSTOMER>
								<NAME>Mr John Smith</NAME>
								<ADDRESS>
                  59, Test Apartments,
                  Example Street
                  A Town
               						 </ADDRESS>
							</CUSTOMER>
							<ITEM_LIST>
								<ITEM>
									<DESC>Part 01234</DESC>
									<QUANTITY>5</QUANTITY>
								</ITEM>
								<ITEM>
									<DESC>Part 67890</DESC>
									<QUANTITY>27</QUANTITY>
								</ITEM>
							</ITEM_LIST>
						</ORDER>
						<ORDER>
							<ORDER_REF>2</ORDER_REF>
							<CUSTOMER>
								<NAME>Mr Tom Jones</NAME>
								<ADDRESS>
                  1, The House
                  Example Street
                  Some Town
                						</ADDRESS>
							</CUSTOMER>
							<ITEM_LIST>
								<ITEM>
									<DESC>Part ABCD4</DESC>
									<QUANTITY>1</QUANTITY>
								</ITEM>
							</ITEM_LIST>
						</ORDER>
						<ORDER>
							<ORDER_REF>3</ORDER_REF>
							<CUSTOMER>
								<NAME>Mrs Sally Smith</NAME>
								<ADDRESS>
                  14, The Drive,
                  Some Town
                </ADDRESS>
							</CUSTOMER>
							<ITEM_LIST>
								<ITEM>
									<DESC>Part XYX4</DESC>
									<QUANTITY>3</QUANTITY>
								</ITEM>
							</ITEM_LIST>
						</ORDER>
					</fm:template>
				</fm:template-list>
				<fm:map-set-list/>
			</fm:module>
		</xs:appinfo>
	</xs:annotation>
	<xs:element name="ROOT"/>
	<xs:element name="theme">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="DATASET_DISPLAY">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="ORDER_LIST" dataset:ro="." fox:prompt="">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="ORDER" minOccurs="0" maxOccurs="unbounded" dataset:ro=".">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="ORDER_REF" type="xs:string" dataset:ro="." fox:promptStyle="padding: 5px;"/>
													<xs:element name="CUSTOMER" dataset:ro="." fox:promptStyle="padding: 5px;" fox:formMaxCols="1">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="NAME" type="xs:string" dataset:ro="." fox:prompt=""/>
																<xs:element name="ADDRESS" type="xs:string" dataset:ro="." fox:prompt="" fox:fieldStyle="white-space: nowrap; font-size: 0.8em; color: #0000ff;"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="ITEM_COUNT" type="xs:integer"/>
													<xs:element name="ITEM_LIST" dataset:ro="." fox:listTableStyle="vertical-align: top;">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="ITEM" minOccurs="0" maxOccurs="unbounded" dataset:ro=".">
																	<xs:complexType>
																		<xs:sequence>
																			<xs:element name="DESC" dataset:ro="."/>
																			<xs:element name="QUANTITY" dataset:ro="."/>
																			<xs:element name="phantom-bulk-order" type="phantom" dataset:ro="./QUANTITY > 10" fox:widget="button+" fox:imageUrl="img/hint" fox:prompt="Bulk Order" fox:hint="Orders for over 10 of a particular item qualify as a bulk order" fox:prompt-short=""/>
																		</xs:sequence>
																	</xs:complexType>
																</xs:element>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>
