<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns="http://www.springframework.org/schema/context"
		xmlns:xsd="http://www.w3.org/2001/XMLSchema"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xmlns:tool="http://www.springframework.org/schema/tool"
		targetNamespace="http://www.springframework.org/schema/context"
		elementFormDefault="qualified"
		attributeFormDefault="unqualified">

	<xsd:import namespace="http://www.springframework.org/schema/tool"/>

	<xsd:annotation>
		<xsd:documentation><![CDATA[
	Defines the configuration elements for the Spring Framework's application
	context support. Effects the activation of various configuration styles
	for the containing Spring ApplicationContext.
		]]></xsd:documentation>
	</xsd:annotation>

	<xsd:element name="property-placeholder">
		<xsd:annotation>
			<xsd:documentation><![CDATA[
	Activates replacement of ${...} placeholders, resolved against the specified properties file
	(as a Spring resource location: a URL, a "classpath:" pseudo URL, or a relative file path).
	Alternatively, define a parameterized PropertyPlaceholderConfigurer bean in the context.
			]]></xsd:documentation>
			<xsd:appinfo>
				<tool:annotation>
					<tool:exports type="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
				</tool:annotation>
			</xsd:appinfo>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:attribute name="location" type="xsd:string" use="required"/>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="annotation-config">
		<xsd:annotation>
			<xsd:documentation><![CDATA[
	Activates various annotations to be detected in bean classes: Spring's @Required and
	@Autowired, as well as JSR 250's @PostConstruct, @PreDestroy and @Resource (if available)
	and JPA's @PersistenceContext and @PersistenceUnit (if available). Alternatively,
	you can choose to activate the individual BeanPostProcessors for those annotations.

	Note: This tag does not activate processing of Spring's @Transactional annotation.
	Consider the use of the <tx:annotation-driven> tag for that purpose.
			]]></xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:element name="component-scan">
		<xsd:annotation>
			<xsd:documentation><![CDATA[
	Scans the classpath for annotated components that will be auto-registered as Spring beans.
	By default, the Spring-provided @Component and @Repository stereotypes will be detected.

	Note: This tag implies the effects of the 'annotation-config' tag, activating @Required,
	@Autowired, @PostConstruct, @PreDestroy, @Resource, @PersistenceContext and @PersistenceUnit
	annotations in the component classes, which is usually desired for autodetected components
	(without external configuration). Turn off the 'annotation-config' attribute to deactivate
	this default behavior, for example in order to use custom BeanPostProcessor definitions
	for handling those annotations.
			]]></xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="include-filter" type="filterType" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element name="exclude-filter" type="filterType" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:sequence>
			<xsd:attribute name="base-package" type="xsd:string" use="required"/>
            <xsd:attribute name="resource-pattern" type="xsd:string"/>
			<xsd:attribute name="use-default-filters" type="xsd:boolean" default="true"/>
			<xsd:attribute name="annotation-config" type="xsd:boolean" default="true"/>
			<xsd:attribute name="name-generator" type="xsd:string"/>
			<xsd:attribute name="scope-resolver" type="xsd:string"/>
			<xsd:attribute name="scoped-proxy">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="no"/>
						<xsd:enumeration value="interfaces"/>
						<xsd:enumeration value="targetClass"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="load-time-weaver">
		<xsd:annotation>
			<xsd:documentation><![CDATA[
	Activates a Spring LoadTimeWeaver for this application context, available as
	a bean with the name "loadTimeWeaver". Any bean that implements the
	LoadTimeWeaverAware interface will then receive the LoadTimeWeaver reference
	automatically; for example, Spring's JPA bootstrap support.

	The default weaver is determined automatically. As of Spring 2.1: detecting
	Sun's GlassFish, Oracle's OC4J, Spring's VM agent and any ClassLoader
	supported by Spring's ReflectiveLoadTimeWeaver (for example, the
	TomcatInstrumentableClassLoader).

	The activation of AspectJ load-time weaving is specified via a simple flag
	(the 'aspectj-weaving' attribute), with the AspectJ class transformer
	registered through Spring's LoadTimeWeaver. AspectJ weaving will be activated
	by default if a "META-INF/aop.xml" resource is present in the classpath.
			]]></xsd:documentation>
			<xsd:appinfo>
				<tool:annotation>
					<tool:exports type="org.springframework.instrument.classloading.LoadTimeWeaver"/>
				</tool:annotation>
			</xsd:appinfo>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:attribute name="weaver-class" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
	The fully-qualified classname of the LoadTimeWeaver that is to be activated.
					]]></xsd:documentation>
					<xsd:appinfo>
						<tool:annotation>
							<tool:expected-type type="java.lang.Class"/>
							<tool:assignable-to type="org.springframework.instrument.classloading.LoadTimeWeaver"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="aspectj-weaving" default="autodetect">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="on">
							<xsd:annotation>
								<xsd:documentation><![CDATA[
	Switches Spring-based AspectJ load-time weaving on.
								]]></xsd:documentation>
							</xsd:annotation>
						</xsd:enumeration>
						<xsd:enumeration value="off">
							<xsd:annotation>
								<xsd:documentation><![CDATA[
	Switches Spring-based AspectJ load-time weaving off.
								]]></xsd:documentation>
							</xsd:annotation>
						</xsd:enumeration>
						<xsd:enumeration value="autodetect">
							<xsd:annotation>
								<xsd:documentation><![CDATA[
	Switches AspectJ load-time weaving on if a "META-INF/aop.xml" resource
	is present in the classpath. If there is no such resource, then AspectJ
	load-time weaving will be switched off.
								]]></xsd:documentation>
							</xsd:annotation>
						</xsd:enumeration>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="spring-configured">
		<xsd:annotation>
			<xsd:documentation source="java:org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect"><![CDATA[
	Signals the current application context to apply dependency injection
	to non-managed classes that are instantiated outside of the Spring bean
	factory (typically classes annotated with the @Configurable annotation).
			]]></xsd:documentation>
		</xsd:annotation>
		<xsd:simpleType>
			<xsd:restriction base="xsd:string"/>
		</xsd:simpleType>
	</xsd:element>

	<xsd:complexType name="filterType">
		<xsd:attribute name="type" use="required">
			<xsd:simpleType>
				<xsd:restriction base="xsd:string">
					<xsd:enumeration value="annotation"/>
                    <xsd:enumeration value="aspectj"/>
					<xsd:enumeration value="assignable"/>
					<xsd:enumeration value="regex"/>
				</xsd:restriction>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="expression" type="xsd:string" use="required"/>
	</xsd:complexType>

</xsd:schema>
