<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
	xmlns="http://www.springframework.org/schema/integration/scripting"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:beans="http://www.springframework.org/schema/beans"
	xmlns:tool="http://www.springframework.org/schema/tool"
	xmlns:integration="http://www.springframework.org/schema/integration"
	elementFormDefault="qualified" attributeFormDefault="unqualified">

	<xsd:import namespace="http://www.springframework.org/schema/tool" />
	<xsd:import namespace="http://www.springframework.org/schema/integration"
		schemaLocation="https://www.springframework.org/schema/integration/spring-integration-5.2.xsd" />


	<xsd:complexType name="ScriptType" mixed="true" abstract="true">
		<xsd:sequence>
			<xsd:element name="variable" minOccurs="0" maxOccurs="unbounded">
				<xsd:complexType>
					<xsd:annotation>
						<xsd:documentation>
							Allows you to define custom script variable bindings. The use of this
							sub-element is mutually
							exclusive with the 'script-variable-generator' attribute.
						</xsd:documentation>
					</xsd:annotation>
					<xsd:attribute name="name" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>
								Name of the script variable.
								</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="value" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>
								Value of the script variable as a literal.
								</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="ref" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>
								Value of the script variable as a bean reference.
								</xsd:documentation>
							<xsd:appinfo>
								<tool:expected-type type="java.lang.Object" />
							</xsd:appinfo>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="location">
			<xsd:annotation>
				<xsd:documentation>
					Resource location path for the Script. Either this or an inline script
					as body text should be provided, but not both.
					</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="script-variable-generator" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					Reference to the ScriptVariableGenerator bean. This attribute is mutually
					exclusive with any 'variable' sub-elements and 'variables' attribute.
					</xsd:documentation>
				<xsd:appinfo>
					<tool:expected-type
						type="org.springframework.integration.scripting.ScriptVariableGenerator" />
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>

		<xsd:attribute name="refresh-check-delay">
			<xsd:annotation>
				<xsd:documentation>
					Refresh delay for the script contents if specified as a resource
					location (defaults to -1, never refresh).
					</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="variables">
			<xsd:annotation>
				<xsd:documentation>
					Comma-delimited pairs of variables and their values.
					the variable name can applies '-ref' suffix, which mean to determine
					a variable value as a bean reference.
					This attribute isn't mutually exclusive with 'variable' sub-elements
					and all variables will be merged to one Map.
					This attribute is mutually exclusive with 'script-variable-generator' attribute.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>

</xsd:schema>
