<?xml version="1.0" encoding="iso-8859-1" ?>
<engine-configurations>
	<configuration id = "demonstration_12:setup">
	
		<h2>Setup Provider</h2>

		<import-xml
			id = "import_components_xml"
			src = "/projects/engine/demonstrations/demonstration_12/application_components.xml"
			context_path = "/application-components/application-component[@id = 'data_provider']"
		/>

	</configuration>

	<configuration id = "demonstration_12:util">
		<h2>Utilities</h2>
		<import-xml
			id = "import_components_xml"
			src = "/projects/engine/demonstrations/demonstration_12/application_components.xml"
			context_path = "/application-components/application-component[@id = 'provider_util']"
		/>
	</configuration>
	
	<configuration id = "demonstration_12:providers">
		<h2>Demonstrate Data Providers</h2>
		
		<p><b>Provider #1: GET XML</b></p>
		<provider method = "getOrganizations" />
		
		<p><b>Provider #2: POST XML</b></p>
		<provider method = "postOrganizations" />

		<import-xml
			id = "import_components_xml"
			src = "/projects/engine/demonstrations/demonstration_12/application_components.xml"
			context_path = "/application-components/application-component[@id = 'dyn_config']"
		/>

	</configuration>
	
	
	
	<object-definitions>

		<definition id="import-xml">
			<implementation context-switch = "1" context-path = "ora:context_path_attr">
				<package pid="org.cote.js.xml" />
				<constructor name="getXml">
					<param value="ora:src_attr" />
					<param value="ora:integer_0" />
					<param value="ora:integer_0" />
					<param value="ora:id_attr" />
					<param value="ora:integer_1" />
				</constructor>
			</implementation>
		</definition>
		
		<definition id="application-component">
			<implementation>
				<package pid="org.cote.js.appcomp.ApplicationComponent" />
				<constructor name="newInstance">
					<param value="ora:integer_0" />
					<param value="ora:node_context" />
					<param value="ora:engine_id" />
					<param value="ora:integer_0" />
					<param value="ora:integer_0" />
					<param value="ora:integer_1" />
				</constructor>
			</implementation>
		</definition>

		<!--
			Even though a context path is specified for child nodes in application-components,
			the root node must be handled because the tree gets copied
		-->
		<definition id = "application-components">
			<implementation abstract = "1" />
		</definition>


		<!--
			Though component-fragment isn't used, it will match <p /> and <input /> elements,
			which provides the  hooks for binding the elements to XHTML Components.
		-->
		<definition id = "component-fragment">

			<matdef rid = "p" />
			<matdef rid = "input" />
			<implementation>
				<package pid = "org.cote.js.xhtml.XHTMLComponent" />
				<constructor name = "newInstance">
					<param value="ora:parent_element" />
					<param value="ora:node_context" />
					<param value="ora:rid_attr" />
					<param value="ora:engine_id" />
					<param value = "org.cote.js.xhtml.form.XHTMLFormComponent" />
				</constructor>
			</implementation>
		</definition>
		<definition id = "html-fragment">
			<implementation abstract = "1" />
		</definition>
		
		<definition id="provider">
			<implementation>
				<package pid="org.cote.js.token.TokenStack" mid="getTokenValue" midparam = "provider_util" />
				<constructor name="_prehandle_provide">
					<param value="ora:engine_id" />
					<param value="ora:xml_document" />
					<param value="ora:node_context" />
					<param value="ora:method_attr" />
				</constructor>
			</implementation>
		</definition>
		
	</object-definitions>
</engine-configurations>