<?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:fm="http://www.og.dti.gov/fox_module"  xmlns:widget="http://www.og.dti.gov/fox" xmlns:docgen="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_GENERATE_DOC</fm:name>
					<fm:title>FOXOpen Demo Doc Generation</fm:title>
					<fm:application-title>FOXOpen</fm:application-title>
					<fm:version-no>$Revision$</fm:version-no>
					<fm:version-desc>$Header$</fm:version-desc>
					<fm:history>
          $Log$
          </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>DEC009X</fm:library>
				</fm:library-list>
				<fm:storage-location-list>
					<fm:storage-location name="main">
						<fm:cache-key string="DEMO_GENERATE_DOC: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}" for-schema="DOCUMENT_GENERATION/* "/>
						</fm:do>
					</fm:action>
					<fm:action name="action-generate-pdf" docgen:run="." fox:widget="link" fox:prompt="Generate PDF Document">
						<fm:do>
							<fm:remove match=":{theme}/DOCUMENT_TEMPLATE"/>
							<fm:assign initTarget=":{theme}/DOCUMENT_TEMPLATE/TEMPLATE_NAME" textValue="DTI_INFO_REPORT"/>
							<fm:assign initTarget=":{theme}/DOCUMENT_TEMPLATE/TITLE" textValue="Document Test"/>
							<fm:assign initTarget=":{theme}/DOCUMENT_TEMPLATE/CONTENT" textValue="You have successfully downloaded a document"/>
							<fm:context-set scope="state" name="docdata1" xpath=":{theme}/DOCUMENT_TEMPLATE"/>
							<fm:call action="action-DEC009XpreviewDocTemplate"/>
						</fm:do>
					</fm:action>
				</fm:action-list>
				<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-docGenTitle">
            							Document Generation
          						</fm:set-buffer>
							<fm:set-buffer name="buffer-content">
								<table width="30%">
									<tr>
										<th class="setoutForm" align="left">
											<fm:include name="buffer-docGenTitle"/>
										</th>
									</tr>
								</table>
								<br/>
                Please download the document by clicking the link and indicate whether this was successful.
                <br/>
								<br/>
								<fm:set-out match=":{theme}/DOCUMENT_GENERATION" docgen:mode="."/>
								<br/>
								<br/>
							</fm:set-buffer>
						</fm:presentation>
					</fm:state>
				</fm:state-list>
				<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="DOCUMENT_GENERATION" docgen:ro=".">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="GENERATE_DOCUMENT" type="phantom" docgen:ro="." docgen:run="." fox:action="action-generate-pdf" fox:widget="link" fox:prompt="View Document"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>
