<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.springframework.org/schema/integration/print"
	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"
	targetNamespace="http://www.springframework.org/schema/integration/print"
	elementFormDefault="qualified" attributeFormDefault="unqualified">

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

	<xsd:annotation>
		<xsd:documentation><![CDATA[
			Defines the configuration elements for the Spring Integration
			Print Adapter.
		]]></xsd:documentation>
	</xsd:annotation>

	<xsd:element name="outbound-channel-adapter">
		<xsd:annotation>
			<xsd:documentation>
					Defines a Print Outbound Channel Adapter, allowing you
					to send payloadds to a connected printer using the Java
					Print Service API.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="integration:poller" minOccurs="0" maxOccurs="1" />
			</xsd:sequence>
			<xsd:attributeGroup ref="corePrintComponentAttributes"/>
			<xsd:attribute name="channel" type="xsd:string">
				<xsd:annotation>
					<xsd:appinfo>
						<xsd:documentation>
							Channel from which messages will be printed.
							When a message is sent to this channel it will
							cause the payload to be printed.
						</xsd:documentation>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.integration.MessageChannel" />
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="order">
				<xsd:annotation>
					<xsd:documentation>
						Specifies the order for invocation when this endpoint is connected as a
						subscriber to a SubscribableChannel.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<xsd:attributeGroup name="corePrintComponentAttributes">
		<xsd:attribute name="id" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation>
					Identifies the underlying Spring bean definition, which is an
					instance of either 'EventDrivenConsumer' or 'PollingConsumer',
					depending on whether the component's input channel is a
					'SubscribableChannel' or 'PollableChannel'.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="auto-startup" default="true" use="optional">
			<xsd:annotation>
				<xsd:documentation>
					Flag to indicate that the component should start automatically
					on startup (default true).
				</xsd:documentation>
			</xsd:annotation>
			<xsd:simpleType>
				<xsd:union memberTypes="xsd:boolean xsd:string" />
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="printer-name" use="optional" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					If the printer name is not provided the sytem's default printer
					is being used if available if available. Otherwise an
					exceptions is thrown.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="print-service-ref" use="optional" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					Allows you to provide a custom print-service implementation.
				</xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref">
						<tool:expected-type type="javax.print.PrintService" />
					</tool:annotation>
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="copies" use="optional">
			<xsd:annotation>
				<xsd:documentation>
					The number of copies to print. Uses the default of the printer.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="sides" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					Uses the default of the printer.
				]]></xsd:documentation>
			</xsd:annotation>
			<xsd:simpleType>
				<xsd:union memberTypes="sides xsd:string"/>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="media-tray" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					Uses the default of the printer.
				]]></xsd:documentation>
			</xsd:annotation>
			<xsd:simpleType>
				<xsd:union memberTypes="media-tray xsd:string"/>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="doc-flavor" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					See: http://docs.oracle.com/javase/6/docs/api/javax/print/DocFlavor.html
				]]></xsd:documentation>
			</xsd:annotation>
			<xsd:simpleType>
				<xsd:union memberTypes="doc-flavor xsd:string"/>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="mime-type" use="optional" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					See: http://docs.oracle.com/javase/6/docs/api/javax/print/DocFlavor.html
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:attributeGroup>

	<xsd:simpleType name="sides">
		<xsd:restriction base="xsd:token">
			<xsd:enumeration value="ONE_SIDED"/>
			<xsd:enumeration value="DUPLEX"/>
			<xsd:enumeration value="TUMBLE"/>
			<xsd:enumeration value="TWO_SIDED_LONG_EDGE"/>
			<xsd:enumeration value="TWO_SIDED_SHORT_EDGE"/>
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="chromaticity">
		<xsd:restriction base="xsd:token">
			<xsd:enumeration value="MONOCHROME"/>
			<xsd:enumeration value="COLOR"/>
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="doc-flavor">
		<xsd:restriction base="xsd:token">
			<xsd:enumeration value="INPUT_STREAM"/>
			<xsd:enumeration value="BYTE_ARRAY"/>
			<xsd:enumeration value="CHAR_ARRAY"/>
			<xsd:enumeration value="READER"/>
			<xsd:enumeration value="SERVICE_FORMATTED"/>
			<xsd:enumeration value="java.lang.String"/>
			<xsd:enumeration value="URL"/>
			<xsd:enumeration value="INPUT_STREAM"/>
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="media-tray">
		<xsd:restriction base="xsd:token">
			<xsd:enumeration value="BOTTOM"/>
			<xsd:enumeration value="ENVELOPE"/>
			<xsd:enumeration value="LARGE_CAPACITY"/>
			<xsd:enumeration value="MAIN"/>
			<xsd:enumeration value="MANUAL"/>
			<xsd:enumeration value="MIDDLE"/>
			<xsd:enumeration value="SIDE"/>
			<xsd:enumeration value="TOP"/>
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="media-size-name">
		<xsd:restriction base="xsd:token">
			<xsd:enumeration value="TISO_A0"/>
			<xsd:enumeration value="ISO_A1"/>
			<xsd:enumeration value="ISO_A2"/>
			<xsd:enumeration value="ISO_A3"/>
			<xsd:enumeration value="ISO_A4"/>
			<xsd:enumeration value="ISO_A5"/>
			<xsd:enumeration value="ISO_A6"/>
			<xsd:enumeration value="ISO_A7"/>
			<xsd:enumeration value="ISO_A8"/>
			<xsd:enumeration value="ISO_A9"/>
			<xsd:enumeration value="ISO_A10"/>
			<xsd:enumeration value="ISO_B0"/>
			<xsd:enumeration value="ISO_B1"/>
			<xsd:enumeration value="ISO_B2"/>
			<xsd:enumeration value="ISO_B3"/>
			<xsd:enumeration value="ISO_B4"/>
			<xsd:enumeration value="ISO_B5"/>
			<xsd:enumeration value="ISO_B6"/>
			<xsd:enumeration value="ISO_B7"/>
			<xsd:enumeration value="ISO_B8"/>
			<xsd:enumeration value="ISO_B9"/>
			<xsd:enumeration value="ISO_B10"/>
			<xsd:enumeration value="JIS_B0"/>
			<xsd:enumeration value="JIS_B1"/>
			<xsd:enumeration value="JIS_B2"/>
			<xsd:enumeration value="JIS_B3"/>
			<xsd:enumeration value="JIS_B4"/>
			<xsd:enumeration value="JIS_B5"/>
			<xsd:enumeration value="JIS_B6"/>
			<xsd:enumeration value="JIS_B7"/>
			<xsd:enumeration value="JIS_B8"/>
			<xsd:enumeration value="JIS_B9"/>
			<xsd:enumeration value="JIS_B10"/>
			<xsd:enumeration value="ISO_C0"/>
			<xsd:enumeration value="ISO_C1"/>
			<xsd:enumeration value="ISO_C2"/>
			<xsd:enumeration value="ISO_C3"/>
			<xsd:enumeration value="ISO_C4"/>
			<xsd:enumeration value="ISO_C5"/>
			<xsd:enumeration value="ISO_C6"/>
			<xsd:enumeration value="NA_LETTER"/>
			<xsd:enumeration value="NA_LEGAL"/>
			<xsd:enumeration value="EXECUTIVE"/>
			<xsd:enumeration value="LEDGER"/>
			<xsd:enumeration value="TABLOID"/>
			<xsd:enumeration value="INVOICE"/>
			<xsd:enumeration value="FOLIO"/>
			<xsd:enumeration value="QUARTO"/>
			<xsd:enumeration value="JAPANESE_POSTCARD"/>
			<xsd:enumeration value="JAPANESE_DOUBLE_POSTCARD"/>
			<xsd:enumeration value="A"/>
			<xsd:enumeration value="B"/>
			<xsd:enumeration value="C"/>
			<xsd:enumeration value="D"/>
			<xsd:enumeration value="E"/>
			<xsd:enumeration value="ISO_DESIGNATED_LONG"/>
			<xsd:enumeration value="ITALY_ENVELOPE"/>
			<xsd:enumeration value="MONARCH_ENVELOPE"/>
			<xsd:enumeration value="PERSONAL_ENVELOPE"/>
			<xsd:enumeration value="NA_NUMBER_9_ENVELOPE"/>
			<xsd:enumeration value="NA_NUMBER_10_ENVELOPE"/>
			<xsd:enumeration value="NA_NUMBER_11_ENVELOPE"/>
			<xsd:enumeration value="NA_NUMBER_12_ENVELOPE"/>
			<xsd:enumeration value="NA_NUMBER_14_ENVELOPE"/>
			<xsd:enumeration value="NA_6X9_ENVELOPE"/>
			<xsd:enumeration value="NA_7X9_ENVELOPE"/>
			<xsd:enumeration value="NA_9X11_ENVELOPE"/>
			<xsd:enumeration value="NA_9X12_ENVELOPE"/>
			<xsd:enumeration value="NA_10X13_ENVELOPE"/>
			<xsd:enumeration value="NA_10X14_ENVELOPE"/>
			<xsd:enumeration value="NA_10X15_ENVELOPE"/>
			<xsd:enumeration value="NA_5X7"/>
			<xsd:enumeration value="NA_8X10"/>
		</xsd:restriction>
	</xsd:simpleType>
</xsd:schema>
