<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.springframework.org/schema/batch" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
	xmlns:tool="http://www.springframework.org/schema/tool" targetNamespace="http://www.springframework.org/schema/batch"
	elementFormDefault="qualified" attributeFormDefault="unqualified"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
	http://www.springframework.org/schema/tool http://www.springframework.org/schema/tool/spring-tool-2.5.xsd"
	version="2.1">

	<xsd:import namespace="http://www.springframework.org/schema/beans" />
	<xsd:import namespace="http://www.springframework.org/schema/tool" />

	<xsd:annotation>
		<xsd:documentation><![CDATA[
	Defines the configuration elements for Spring Batch Core.
		]]></xsd:documentation>
	</xsd:annotation>

	<xsd:element name="job">
		<xsd:annotation>
			<xsd:documentation>
				Defines a job composed of a set of steps and
				transitions between steps. The job will be exposed in
				the enclosing
				bean factory as a component of type Job
				that can be launched using a
				JobLauncher.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="description" type="description" minOccurs="0" />
				<xsd:choice minOccurs="0" maxOccurs="unbounded">
					<xsd:group ref="flowGroup" minOccurs="1" maxOccurs="unbounded" />
					<xsd:element name="listeners">
						<xsd:annotation>
							<xsd:documentation><![CDATA[
							List of all listeners for the job
							]]>
							</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:sequence>
								<xsd:element name="listener" type="jobExecutionListenerType" minOccurs="0" maxOccurs="unbounded" />
							</xsd:sequence>
							<xsd:attributeGroup ref="mergeAttribute" />
						</xsd:complexType>
					</xsd:element>
					<xsd:element name="validator">
						<xsd:annotation>
							<xsd:documentation><![CDATA[
							A JobParametersValidator as an inner bean definition.
							]]>
							</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:group ref="beanElementGroup" minOccurs="0" maxOccurs="1" />
							<xsd:attribute name="ref">
								<xsd:annotation>
									<xsd:documentation><![CDATA[
							A reference to a JobParametersValidator.
							]]>
									</xsd:documentation>
								</xsd:annotation>
							</xsd:attribute>
						</xsd:complexType>
					</xsd:element>
				</xsd:choice>
			</xsd:sequence>
			<xsd:attribute name="id" type="xsd:ID" use="required" />
			<xsd:attributeGroup ref="jobRepositoryAttribute" />
			<xsd:attribute name="incrementer" type="xsd:string" use="optional">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
						A reference to a JobParametersIncrementer bean definition.  This will be
						used to provide new parameters to a Job instance that is starting in a
						sequence.
						]]>
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref" />
						<tool:expected-type type="org.springframework.batch.core.JobParametersIncrementer" />
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="restartable" type="xsd:string" use="optional">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
					Whether the job should be retartable or not in case of failure.  Set this to false
					if the Job should not be restarted.
					]]></xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attributeGroup ref="parentAttribute" />
			<xsd:attributeGroup ref="abstractAttribute" />
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="step">
		<xsd:annotation>
			<xsd:documentation>
				Defines a stage in job processing backed by a
				Step. The id attribute must be specified since this
				step definition
				will be referred to from other elements
				to form a Job flow.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="stepType">
					<xsd:attribute name="id" type="xsd:ID" use="required" />
					<xsd:attributeGroup ref="abstractAttribute" />
					<xsd:attributeGroup ref="jobRepositoryAttribute" />
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="flow">
		<xsd:annotation>
			<xsd:documentation>
				Defines a flow composed of a set of steps and
				transitions between steps.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="description" type="description" minOccurs="0" />
				<xsd:choice minOccurs="0" maxOccurs="unbounded">
					<xsd:group ref="flowGroup" />
				</xsd:choice>
			</xsd:sequence>
			<xsd:attribute name="id" type="xsd:ID" use="required" />
			<xsd:attribute name="abstract" type="xsd:boolean" />
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="job-listener">
		<xsd:annotation>
			<xsd:documentation>
				A reference to a JobExecutionListener (or a POJO
				if using before-job-method / after-job-method or
				source level
				annotations).
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="jobExecutionListenerType">
					<xsd:attribute name="id" type="xsd:ID" use="optional" />
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="step-listener">
		<xsd:annotation>
			<xsd:documentation>
				A bean definition for a step listener (or POJO if
				using *-method attributes or source level
				annotations)
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="stepListenerType">
					<xsd:attribute name="id" type="xsd:ID" use="optional" />
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="job-repository">
		<xsd:annotation>
			<xsd:documentation><![CDATA[
			Configures a JobRepository using a relational database.  This is
			needed by many other components (principally Job and Step implementations).
			]]></xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="beans:identifiedType">
					<xsd:attribute name="data-source" type="xsd:string" default="dataSource">
						<xsd:annotation>
							<xsd:documentation source="java:javax.sql.DataSource"><![CDATA[
ref"							is not required, and only needs to be specified explicitly
							if the bean name of the desired DataSource is not 'dataSource'.
							]]></xsd:documentation>
							<xsd:appinfo>
								<tool:annotation kind="ref">
									<tool:expected-type type="javax.sql.DataSource" />
								</tool:annotation>
							</xsd:appinfo>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="transaction-manager" type="xsd:string" default="transactionManager">
						<xsd:annotation>
							<xsd:documentation source="java:org.springframework.transaction.PlatformTransactionManager"><![CDATA[
							The bean name of the TransactionManager that is to be used. This attribute
							is not required, and only needs to be specified explicitly
							if the bean name of the desired TransactionManager is not 'transactionManager'.
							]]></xsd:documentation>
							<xsd:appinfo>
								<tool:annotation kind="ref">
									<tool:expected-type type="org.springframework.transaction.PlatformTransactionManager" />
								</tool:annotation>
							</xsd:appinfo>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="isolation-level-for-create" default="SERIALIZABLE" type="isolationType">
						<xsd:annotation>
							<xsd:documentation><![CDATA[
							The isolation level to use for creation of job execution entities.
							The default is SERIALIZABLE, which prevents accidental
							concurrent execution of the same job (REPEATABLE_READ
							would work as well).
							]]></xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="max-varchar-length" type="xsd:int">
						<xsd:annotation>
							<xsd:documentation><![CDATA[
							The maximum length for a Java String that will fit in the long VARCHAR
							columns in the database.  Can be less than the declared length in the DDL
							if the database	supports multi-byte characters.
							]]></xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="table-prefix" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation><![CDATA[
							The the table prefix to use for all the batch meta-data tables.
							Defaults to "BATCH_".
							]]></xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="lob-handler" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation><![CDATA[
							A reference to the lob handler (optional).  Only override if using Oracle and
							the database type is not being detected for some reason.
							]]></xsd:documentation>
							<xsd:appinfo>
								<tool:annotation kind="ref">
									<tool:expected-type type="org.springframework.jdbc.support.lob.LobHandler" />
								</tool:annotation>
							</xsd:appinfo>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<xsd:group name="flowGroup">
		<xsd:choice>
			<xsd:element name="step">
				<xsd:annotation>
					<xsd:documentation>
						Defines a stage in job processing backed by a
						Step. The id attribute must be specified. The
						step
						requires either
						a chunk definition,
						a tasklet reference, or a reference to a
						(possibly abstract) parent step.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:extension base="stepType">
							<xsd:attribute name="id" type="xsd:ID" use="required" />
							<xsd:attributeGroup ref="nextAttribute" />
						</xsd:extension>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="split">
				<xsd:annotation>
					<xsd:documentation>
						Declares job should split here into two or more
						subflows.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:choice minOccurs="0" maxOccurs="unbounded">
						<xsd:element name="flow">
							<xsd:annotation>
								<xsd:documentation>
									A subflow within a job, having the same
									format as a job, but without a separate identity.
								</xsd:documentation>
							</xsd:annotation>
							<xsd:complexType>
								<xsd:group ref="flowGroup" minOccurs="0" maxOccurs="unbounded" />
								<xsd:attribute name="parent" type="xsd:string" use="optional">
									<xsd:annotation>
										<xsd:documentation source="java:org.springframework.batch.core.job.flow.Flow"><![CDATA[
										The flow that will execute at this point in the job.
										]]></xsd:documentation>
										<xsd:appinfo>
											<tool:annotation kind="ref">
												<tool:expected-type type="org.springframework.batch.core.job.flow.Flow" />
											</tool:annotation>
										</xsd:appinfo>
									</xsd:annotation>
								</xsd:attribute>
							</xsd:complexType>
						</xsd:element>
						<xsd:group ref="transitions" />
					</xsd:choice>
					<xsd:attribute name="id" type="xsd:ID" use="required" />
					<xsd:attribute name="task-executor" type="xsd:string" use="optional">
						<xsd:annotation>
							<xsd:documentation source="java:org.springframework.core.task.TaskExecutor"><![CDATA[
							The task executor responsible for executing the task.
							]]></xsd:documentation>
							<xsd:appinfo>
								<tool:annotation kind="ref">
									<tool:expected-type type="java:org.springframework.core.task.TaskExecutor" />
								</tool:annotation>
							</xsd:appinfo>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attributeGroup ref="nextAttribute" />
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="flow">
				<xsd:annotation>
					<xsd:documentation>
						Declares job should include an externalized flow
						here.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:group ref="transitions" minOccurs="0" maxOccurs="unbounded" />
					<xsd:attribute name="id" type="xsd:ID" use="required" />
					<xsd:attribute name="parent" type="xsd:string" use="required">
						<xsd:annotation>
							<xsd:documentation source="java:org.springframework.batch.core.job.flow.Flow"><![CDATA[
							The flow that will execute at this point in the job specified as a
							parent bean definition id.
							]]></xsd:documentation>
							<xsd:appinfo>
								<tool:annotation kind="ref">
									<tool:expected-type type="org.springframework.batch.core.job.flow.Flow" />
								</tool:annotation>
							</xsd:appinfo>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attributeGroup ref="nextAttribute" />
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="decision">
				<xsd:annotation>
					<xsd:documentation>
						Declares job should query a decider to determine
						where execution should go next.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:group ref="transitions" minOccurs="0" maxOccurs="unbounded" />
					<xsd:attribute name="id" type="xsd:ID" use="required" />
					<xsd:attribute name="decider" type="xsd:string" use="required">
						<xsd:annotation>
							<xsd:documentation>
								The decider is a reference to a
								JobExecutionDecider that can produce a status to base
								the next
								transition on.
							</xsd:documentation>
							<xsd:appinfo>
								<tool:annotation kind="ref">
									<tool:expected-type type="org.springframework.batch.core.job.flow.JobExecutionDecider" />
								</tool:annotation>
							</xsd:appinfo>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:complexType>
			</xsd:element>
		</xsd:choice>
	</xsd:group>

	<xsd:complexType name="stepType">
		<xsd:sequence>
			<xsd:element name="description" type="description" minOccurs="0" />
			<xsd:choice minOccurs="0" maxOccurs="1">
				<xsd:choice>
					<xsd:element name="tasklet" type="taskletType" />
					<!-- custom namespace tasklet declaration -->
					<xsd:any namespace="##other" minOccurs="1" maxOccurs="1" processContents="skip"/>
				</xsd:choice>
				<xsd:element name="partition" type="partitionType" />
				<xsd:element name="job">
					<xsd:complexType>
						<xsd:attribute name="ref">
							<xsd:annotation>
								<xsd:documentation source="java:org.springframework.batch.core.Job"><![CDATA[
							The job that will execute in this step.
							]]></xsd:documentation>
								<xsd:appinfo>
									<tool:annotation kind="ref">
										<tool:expected-type type="org.springframework.batch.core.Job" />
									</tool:annotation>
								</xsd:appinfo>
							</xsd:annotation>
						</xsd:attribute>
						<xsd:attribute name="job-launcher">
							<xsd:annotation>
								<xsd:documentation source="java:org.springframework.batch.core.launch.JobLauncher"><![CDATA[
							The job that will execute in this step.
							]]></xsd:documentation>
								<xsd:appinfo>
									<tool:annotation kind="ref">
										<tool:expected-type type="java:org.springframework.batch.core.launch.JobLauncher" />
									</tool:annotation>
								</xsd:appinfo>
							</xsd:annotation>
						</xsd:attribute>
						<xsd:attribute name="job-parameters-extractor">
							<xsd:annotation>
								<xsd:documentation source="java:org.springframework.batch.core.step.job.JobParametersExtractor"><![CDATA[
							The job parameters extractor to convert step execution into job parameters.
							]]></xsd:documentation>
								<xsd:appinfo>
									<tool:annotation kind="ref">
										<tool:expected-type type="java:org.springframework.batch.core.step.job.JobParametersExtractor" />
									</tool:annotation>
								</xsd:appinfo>
							</xsd:annotation>
						</xsd:attribute>
					</xsd:complexType>
				</xsd:element>
				<xsd:element name="flow">
					<xsd:complexType>
						<xsd:attribute name="parent" type="xsd:string" use="required">
							<xsd:annotation>
								<xsd:documentation source="java:org.springframework.batch.core.job.flow.Flow"><![CDATA[
							The flow that will execute in this step.
							]]></xsd:documentation>
								<xsd:appinfo>
									<tool:annotation kind="parent">
										<tool:expected-type type="org.springframework.batch.core.job.flow.Flow" />
									</tool:annotation>
								</xsd:appinfo>
							</xsd:annotation>
						</xsd:attribute>
					</xsd:complexType>
				</xsd:element>
			</xsd:choice>
			<xsd:group ref="transitions" minOccurs="0" maxOccurs="unbounded" />
			<xsd:element name="listeners" type="stepListenersType" minOccurs="0" maxOccurs="1" />
		</xsd:sequence>
		<xsd:attributeGroup ref="parentAttribute" />
	</xsd:complexType>

	<xsd:complexType name="partitionType">
		<xsd:all>
			<xsd:element name="step" type="stepType" minOccurs="0" maxOccurs="1" />
			<xsd:element name="handler" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
					Inline specification of a simple TaskExecutorPartitionHandler]]>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:attribute name="task-executor">
						<xsd:annotation>
							<xsd:documentation><![CDATA[
					Reference to a TaskExecutor]]>
							</xsd:documentation>
							<xsd:appinfo>
								<tool:annotation kind="ref">
									<tool:expected-type type="org.springframework.core.task.TaskExecutor" />
								</tool:annotation>
							</xsd:appinfo>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="grid-size">
						<xsd:annotation>
							<xsd:documentation><![CDATA[
								Grid size for the handler.  Defaults to 6.]]>
							</xsd:documentation>
							<xsd:appinfo>
								<tool:annotation kind="direct" />
							</xsd:appinfo>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:complexType>
			</xsd:element>
		</xsd:all>
		<xsd:attribute name="handler">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					Reference to a PartitionHandler]]>
				</xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref">
						<tool:expected-type type="org.springframework.core.partition.PartitionHandler" />
					</tool:annotation>
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="aggregator">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					Reference to a StepExecutionAggregator that will be used to merge the partition results back into the master StepExecution]]>
				</xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref">
						<tool:expected-type type="org.springframework.core.partition.support.StepExecutionAggregator" />
					</tool:annotation>
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="partitioner">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					Reference to a Partitioner]]>
				</xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref">
						<tool:expected-type type="org.springframework.core.partition.support.Partitioner" />
					</tool:annotation>
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="step">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					Reference to a Step]]>
				</xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref">
						<tool:expected-type type="org.springframework.core.Step" />
					</tool:annotation>
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>

	<xsd:complexType name="taskletType">
		<xsd:all>
			<xsd:element name="chunk" type="chunkTaskletType" minOccurs="0" maxOccurs="1" />
			<xsd:element name="transaction-attributes" type="transaction-attributesType" minOccurs="0" maxOccurs="1" />
			<xsd:element name="no-rollback-exception-classes" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
					List of exception classes that should not cause rollback if possible.  This list
					is only a hint and has to be interpreted by the step to make sense in context (e.g.
					it might not be possible to honour the hint during a write operation, so consider moving
					code that throws these exceptions to a processor or validator).
					]]>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:group ref="includeElementGroup" minOccurs="0" maxOccurs="unbounded" />
					<xsd:attributeGroup ref="mergeAttribute" />
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="listeners" type="stepListenersType" minOccurs="0" maxOccurs="1" />
			<xsd:element ref="beans:bean" minOccurs="0" maxOccurs="1" />
			<xsd:element ref="beans:ref" minOccurs="0" maxOccurs="1" />
		</xsd:all>
		<xsd:attribute name="ref" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation>
					The tasklet is a reference to another bean
					definition that implements
					the Tasklet interface.
				</xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref" />
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="method" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation>
					If the tasklet is specified as a bean definition, then a method can be specified and a POJO
					will
					be adapted to the Tasklet interface. The method suggested should have the same arguments
					as Tasklet.execute (or a subset), and have a compatible return type (boolean, void or RepeatStatus).
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="start-limit" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
				The maximum number of times a Step may be started.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="allow-start-if-complete" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
				Set to true to allow a step to be started even if it is already complete.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="transaction-manager" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation source="java:org.springframework.transaction.PlatformTransactionManager"><![CDATA[
				The bean name of the TransactionManager that is to be used. This attribute
				is not required, and only needs to be specified explicitly
				if the bean name of the desired TransactionManager is not 'transactionManager'.
				]]></xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref">
						<tool:expected-type type="org.springframework.transaction.PlatformTransactionManager" />
					</tool:annotation>
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="task-executor" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation source="java:org.springframework.core.task.TaskExecutor"><![CDATA[
				The task executor responsible for executing the task.
				]]></xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref">
						<tool:expected-type type="org.springframework.core.task.TaskExecutor" />
					</tool:annotation>
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="throttle-limit" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
				This limits the number of tasks queued for concurrent
				processing to prevent thread pools from being overwhelmed.
				Default is 4.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>

	<xsd:complexType name="transaction-attributesType">
		<xsd:attribute name="propagation">
			<xsd:annotation>
				<xsd:documentation source="java:org.springframework.transaction.annotation.Propagation"><![CDATA[
				The transaction propagation behavior.
				]]></xsd:documentation>
			</xsd:annotation>
			<xsd:simpleType>
				<xsd:restriction base="xsd:string">
					<xsd:enumeration value="REQUIRED" />
					<xsd:enumeration value="SUPPORTS" />
					<xsd:enumeration value="MANDATORY" />
					<xsd:enumeration value="REQUIRES_NEW" />
					<xsd:enumeration value="NOT_SUPPORTED" />
					<xsd:enumeration value="NEVER" />
					<xsd:enumeration value="NESTED" />
				</xsd:restriction>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="isolation" type="isolationType">
			<xsd:annotation>
				<xsd:documentation source="java:org.springframework.transaction.annotation.Isolation"><![CDATA[
				The transaction isolation level.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="timeout" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
				The transaction timeout value (in seconds).
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>

	<xsd:simpleType name="isolationType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="DEFAULT" />
			<xsd:enumeration value="READ_UNCOMMITTED" />
			<xsd:enumeration value="READ_COMMITTED" />
			<xsd:enumeration value="REPEATABLE_READ" />
			<xsd:enumeration value="SERIALIZABLE" />
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:group name="beanElementGroup">
		<xsd:choice>
			<xsd:element ref="beans:bean" />
			<xsd:element ref="beans:ref" />
		</xsd:choice>
	</xsd:group>

	<xsd:complexType name="chunkTaskletType">
		<xsd:all>
			<xsd:element name="reader" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
					The ItemReader used by the step.
					]]>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:group ref="beanElementGroup" minOccurs="0" maxOccurs="1" />
					<xsd:attributeGroup ref="adapterMethodAttribute" />
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="processor" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
					The ItemProcessor used by the step.
					]]>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:group ref="beanElementGroup" minOccurs="0" maxOccurs="1" />
					<xsd:attributeGroup ref="adapterMethodAttribute" />
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="writer" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
					The ItemWriter used by the step.
					]]>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:group ref="beanElementGroup" minOccurs="0" maxOccurs="1" />
					<xsd:attributeGroup ref="adapterMethodAttribute" />
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="skip-policy" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
					The SkipPolicy used by the step.  If specified then the skip limit and skippable exceptions are ignored
					]]>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:group ref="beanElementGroup" minOccurs="0" maxOccurs="1" />
					<xsd:attributeGroup ref="adapterMethodAttribute" />
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="retry-policy" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
					The RetryPolicy used by the step.  If specified then the retry limit and retryable exceptions are ignored
					]]>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:group ref="beanElementGroup" minOccurs="0" maxOccurs="1" />
					<xsd:attributeGroup ref="adapterMethodAttribute" />
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="retry-listeners" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
					List of all listeners for the step definition
					]]>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="listener" type="listenerType" minOccurs="0" maxOccurs="unbounded" />
					</xsd:sequence>
					<xsd:attributeGroup ref="mergeAttribute" />
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="streams" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
					List of all streams to be included for the step definition
					]]>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="stream" minOccurs="0" maxOccurs="unbounded">
							<xsd:complexType>
								<xsd:attribute name="ref" type="xsd:string">
									<xsd:annotation>
										<xsd:documentation><![CDATA[
										A reference to an ItemStream bean definition
										]]>
										</xsd:documentation>
										<xsd:appinfo>
											<tool:annotation kind="ref" />
											<tool:expected-type type="org.springframework.batch.item.ItemStream" />
										</xsd:appinfo>
									</xsd:annotation>
								</xsd:attribute>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
					<xsd:attributeGroup ref="mergeAttribute" />
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="skippable-exception-classes" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
					List of exception classes that are skippable.  Exceptions (and their subclasses) that
					are declared as included take precedence over the same value if it is also excluded.
					Exceptions that are already marked as no-rollback
					are automatically skippable (but it doesn't hurt to add them again here).
					]]>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:group ref="includeExcludeElementGroup" minOccurs="0" maxOccurs="unbounded" />
					<xsd:attributeGroup ref="mergeAttribute" />
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="retryable-exception-classes" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
					List of exception classes that are retryable. Exceptions (and their subclasses) that
					are declared as included take precedence over the same value if it is also excluded.
					]]>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:group ref="includeExcludeElementGroup" minOccurs="0" maxOccurs="unbounded" />
					<xsd:attributeGroup ref="mergeAttribute" />
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="listeners" type="stepListenersType" minOccurs="0" maxOccurs="1" />
		</xsd:all>
		<xsd:attribute name="commit-interval" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
				The number of items that will be processed before commit is called for the transaction.
				Either set this or the chunk-completion-policy but not both.  Can be specified as an expression
				that will be evaluated in the scope of the step (e.g. "#{jobParameters['commit.interval']}").
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="reader" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
				The bean name of the item reader that is to be used for the process.
				]]></xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref" />
					<tool:expected-type type="org.springframework.batch.item.ItemReader" />
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="processor" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
				The bean name of the item processor that is to be used for the process.
				]]></xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref" />
					<tool:expected-type type="org.springframework.batch.item.ItemProcessor" />
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="writer" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
				The bean name of the item writer that is to be used for the process.
				]]></xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref" />
					<tool:expected-type type="org.springframework.batch.item.ItemWriter" />
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="skip-limit" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
				The maximum number of items that will be allowed to be skipped.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="skip-policy" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
				The skip policy to use.  If specified then the skip limit and skippable exceptions are ignored.
				]]></xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref" />
					<tool:expected-type type="org.springframework.core.step.skip.SkipPolicy" />
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="retry-policy" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
				The retry policy to use.  If specified then the retry limit and retryable exceptions are ignored.
				]]></xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref" />
					<tool:expected-type type="org.springframework.batch.retry.RetryPolicy" />
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="retry-limit" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
				The maximum number of times the processing of an item will be retried.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="cache-capacity" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
				The capacity of the cache in the retry policy.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="reader-transactional-queue" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
				Whether the reader is a transactional queue. If it is then items read should not be cached
				in the event of a rollback since they will be returned to the queue. Default is false.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="processor-transactional" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
				Whether the processor is transaction aware. If it is then processed items should not be
				cached in between transactions in case of a rollback.  N.B. if reader-transactional-queue
				is true then so should this be.  Default is true.  If false then the processor is only called
				once per item per chunk, even if there are rollbacks with retries and skips.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="chunk-completion-policy" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation source="java:org.springframework.batch.repeat.CompletionPolicy"><![CDATA[
				A transaction will be committed when this policy decides to
				complete. Defaults to a SimpleCompletionPolicy with chunk size
				equal to the commit-interval attribute.
				]]></xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref">
						<tool:expected-type type="java:org.springframework.batch.repeat.CompletionPolicy" />
					</tool:annotation>
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>

	<xsd:attributeGroup name="nextAttribute">
		<xsd:attribute name="next" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
				A shortcut for specifying the next step to execute after this one, if there is only one choice.    The next
				attribute is a synonym for &lt;next on="*"/&gt; plus &lt;fail on="FAILED"/&gt; in a transition.
				If this attribute is specified, then there should be no nested transition elements]]>
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:attributeGroup>

	<xsd:attributeGroup name="exceptionClassAttribute">
		<xsd:attribute name="class" type="xsd:string" use="required">
			<xsd:annotation>
				<xsd:documentation>
					An exception class name.
				</xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="direct">
						<tool:expected-type type="java.lang.Class" />
						<tool:assignable-to type="java.lang.Throwable" />
					</tool:annotation>
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:attributeGroup>

	<xsd:group name="includeElementGroup">
		<xsd:choice>
			<xsd:element name="include">
				<xsd:annotation>
					<xsd:documentation>
						Classify an exception as "included" in the set. Exceptions of this type or a subclass are
						included.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:attributeGroup ref="exceptionClassAttribute" />
				</xsd:complexType>
			</xsd:element>
		</xsd:choice>
	</xsd:group>

	<xsd:group name="includeExcludeElementGroup">
		<xsd:choice>
			<xsd:group ref="includeElementGroup" />
			<xsd:element name="exclude">
				<xsd:annotation>
					<xsd:documentation>
						Classify an exception as "excluded" from the
						set. Exceptions of this type or a subclass are
						excluded
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:attributeGroup ref="exceptionClassAttribute" />
				</xsd:complexType>
			</xsd:element>
		</xsd:choice>
	</xsd:group>

	<xsd:complexType name="listenerType">
		<xsd:group ref="beanElementGroup" minOccurs="0" maxOccurs="1" />
		<xsd:attribute name="ref" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					A reference to a listener, a POJO with a
					listener-annotated method, or a POJO with
					a method
					referenced by a
					*-method attribute.
				</xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref" />
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>

	<xsd:complexType name="jobExecutionListenerType">
		<xsd:complexContent>
			<xsd:extension base="listenerType">
				<xsd:attribute name="before-job-method" type="xsd:string" />
				<xsd:attribute name="after-job-method" type="xsd:string" />
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="stepListenerType">
		<xsd:complexContent>
			<xsd:extension base="listenerType">
				<xsd:attribute name="before-step-method" type="xsd:string" />
				<xsd:attribute name="after-step-method" type="xsd:string" />
				<xsd:attribute name="before-chunk-method" type="xsd:string" />
				<xsd:attribute name="after-chunk-method" type="xsd:string" />
				<xsd:attribute name="before-read-method" type="xsd:string" />
				<xsd:attribute name="after-read-method" type="xsd:string" />
				<xsd:attribute name="on-read-error-method" type="xsd:string" />
				<xsd:attribute name="before-process-method" type="xsd:string" />
				<xsd:attribute name="after-process-method" type="xsd:string" />
				<xsd:attribute name="on-process-error-method" type="xsd:string" />
				<xsd:attribute name="before-write-method" type="xsd:string" />
				<xsd:attribute name="after-write-method" type="xsd:string" />
				<xsd:attribute name="on-write-error-method" type="xsd:string" />
				<xsd:attribute name="on-skip-in-read-method" type="xsd:string" />
				<xsd:attribute name="on-skip-in-process-method" type="xsd:string" />
				<xsd:attribute name="on-skip-in-write-method" type="xsd:string" />
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="stepListenersType">
		<xsd:annotation>
			<xsd:documentation><![CDATA[
			The listeners for a step definition of any type relevant for a step (extensions of StepListener),
			]]>
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="listener" type="stepListenerType" minOccurs="0" maxOccurs="unbounded" />
		</xsd:sequence>
		<xsd:attributeGroup ref="mergeAttribute" />
	</xsd:complexType>

	<xsd:group name="transitions">
		<xsd:choice>
			<xsd:element name="next">
				<xsd:annotation>
					<xsd:documentation>
						Defines a transition from this step to the
						next
						one depending on the value of the exit
						status.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:attribute name="on" type="xsd:string" use="required">
						<xsd:annotation>
							<xsd:documentation>A pattern to match against the exit status
								code. Use * and ? as wildcard characters. When a
								step finishes
								the most
								specific match will be chosen to select the next step.
								Hint:
								always include a default
								transition with on=&quot;*&quot;.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="to" type="xsd:string" use="required">
						<xsd:annotation>
							<xsd:documentation>
								The name of the step to go to next. Must
								resolve to one of the other steps in this job.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="stop">
				<xsd:annotation>
					<xsd:documentation>
						Declares job should be stop at this point and
						provides pointer where execution should continue
						when
						the job is
						restarted.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:attribute name="on" type="xsd:string" use="required">
						<xsd:annotation>
							<xsd:documentation>A pattern to match against the exit status
								code. Use * and ? as wildcard characters.
								When a step
								finishes
								the most specific match will be chosen to
								select the next step.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="restart" type="xsd:string" use="required">
						<xsd:annotation>
							<xsd:documentation>The name of the step to start on when the
								stopped job is restarted.
								Must resolve to one of the
								other steps
								in this job.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="end">
				<xsd:annotation>
					<xsd:documentation>
						Declares job should end at this point, without
						the possibility of restart.
						BatchStatus will be
						COMPLETED.
						ExitStatus is configurable.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:attribute name="on" type="xsd:string" use="required">
						<xsd:annotation>
							<xsd:documentation>A pattern to match against the exit status
								code. Use * and ? as wildcard characters.
								When a step
								finishes
								the most specific match will be chosen to
								select the next step.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="exit-code" use="optional" type="xsd:string" default="COMPLETED">
						<xsd:annotation>
							<xsd:documentation>The exit code value to end on, defaults to
								COMPLETED.</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="fail">
				<xsd:annotation>
					<xsd:documentation>
						Declares job should fail at this point.
						BatchStatus will be FAILED. ExitStatus is configurable.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:attribute name="on" type="xsd:string" use="required">
						<xsd:annotation>
							<xsd:documentation>A pattern to match against the exit status
								code. Use * and ? as wildcard characters.
								When a step
								finishes
								the most specific match will be chosen to
								select the next step.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="exit-code" use="optional" type="xsd:string" default="FAILED">
						<xsd:annotation>
							<xsd:documentation>The exit code value to end on, defaults to
								FAILED.</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:complexType>
			</xsd:element>
		</xsd:choice>
	</xsd:group>

	<xsd:attributeGroup name="jobRepositoryAttribute">
		<xsd:attribute name="job-repository" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation source="java:org.springframework.batch.core.repository.JobRepository"><![CDATA[
				The bean name of the JobRepository that is to be used. This attribute
				is not required, and only needs to be specified explicitly
				if the bean name of the desired JobRepository is not 'jobRepository'.
				]]></xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref">
						<tool:expected-type type="org.springframework.batch.core.repository.JobRepository" />
					</tool:annotation>
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:attributeGroup>

	<xsd:attributeGroup name="parentAttribute">
		<xsd:attribute name="parent" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation>
					The name of the parent bean from which the
					configuration should inherit.
				</xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref" />
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:attributeGroup>

	<xsd:attributeGroup name="abstractAttribute">
		<xsd:attribute name="abstract" type="xsd:boolean" use="optional">
			<xsd:annotation>
				<xsd:documentation>
					Is this bean "abstract", that is, not meant to be
					instantiated itself
					but rather just serving as
					parent for concrete
					child bean definitions?
					The default is "false". Specify "true" to
					tell the bean factory to not
					try
					to instantiate that particular bean
					in any case.

					Note: This attribute will not be inherited by child
					bean definitions.
					Hence, it needs to be specified per abstract bean
					definition.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:attributeGroup>

	<xsd:attributeGroup name="mergeAttribute">
		<xsd:attribute name="merge" type="xsd:boolean" use="optional">
			<xsd:annotation>
				<xsd:documentation>
					Should this list be merged with the corresponding
					list provided
					by the parent? If not, it will
					overwrite the parent
					list.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:attributeGroup>

	<xsd:attributeGroup name="adapterMethodAttribute">
		<xsd:attribute name="adapter-method" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation>
					This attribute indicates the method from the
					class that should
					be used to dynamically create a
					proxy.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:attributeGroup>

	<xsd:simpleType name="description">
		<xsd:annotation>
			<xsd:documentation><![CDATA[
	Contains informative text describing the purpose of the enclosing element.
	Used primarily for user documentation of XML bean definition documents.
			]]></xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string" />
	</xsd:simpleType>

</xsd:schema>