blob: 4a9107965c3e11f0ad2a70ea72a3405fddd2428d [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema xmlns="http://www.springframework.org/schema/beans" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.springframework.org/schema/beans">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
<!-- base types -->
<xsd:complexType name="identifiedType" abstract="true">
<xsd:attribute name="id" type="xsd:ID"/>
</xsd:complexType>
<!-- Top-level <beans> tag -->
<xsd:element name="beans">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="description" minOccurs="0"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="import"/>
<xsd:element ref="alias"/>
<xsd:element ref="bean"/>
<xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="default-lazy-init" default="false" type="xsd:boolean"/>
<xsd:attribute name="default-merge" default="false" type="xsd:boolean"/>
<xsd:attribute name="default-dependency-check" default="none">
<xsd:simpleType>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="none"/>
<xsd:enumeration value="all"/>
<xsd:enumeration value="objects"/>
<xsd:enumeration value="simple"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="default-autowire" default="no">
<xsd:simpleType>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="byType"/>
<xsd:enumeration value="byName"/>
<xsd:enumeration value="no"/>
<xsd:enumeration value="autodetect"/>
<xsd:enumeration value="constructor"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="default-init-method" type="xsd:string"/>
<xsd:attribute name="default-destroy-method" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="description">
<xsd:complexType mixed="true">
<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="import">
<xsd:complexType>
<xsd:complexContent>
<xsd:restriction base="xsd:anyType">
<xsd:attribute name="resource" type="xsd:string" use="required"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="alias">
<xsd:complexType>
<xsd:complexContent>
<xsd:restriction base="xsd:anyType">
<xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="alias" type="xsd:string" use="required"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:group name="beanElements">
<xsd:sequence>
<xsd:element ref="description" minOccurs="0"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="meta"/>
<xsd:element ref="constructor-arg"/>
<xsd:element ref="property"/>
<xsd:element ref="lookup-method"/>
<xsd:element ref="replaced-method"/>
<xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
</xsd:sequence>
</xsd:group>
<!-- Attibutes for the <beans> tag -->
<xsd:attributeGroup name="beanAttributes">
<xsd:attribute name="name" type="xsd:string"/>
<xsd:attribute name="class" type="xsd:string"/>
<xsd:attribute name="parent" type="xsd:string"/>
<xsd:attribute name="abstract" default="false" type="xsd:boolean"/>
<xsd:attribute name="singleton" default="true" type="xsd:boolean"/>
<xsd:attribute name="lazy-init" default="default" type="defaultable-boolean"/>
<xsd:attribute name="autowire" default="default">
<xsd:simpleType>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="byType"/>
<xsd:enumeration value="byName"/>
<xsd:enumeration value="default"/>
<xsd:enumeration value="no"/>
<xsd:enumeration value="autodetect"/>
<xsd:enumeration value="constructor"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="dependency-check" default="default">
<xsd:simpleType>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="default"/>
<xsd:enumeration value="none"/>
<xsd:enumeration value="all"/>
<xsd:enumeration value="objects"/>
<xsd:enumeration value="simple"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="depends-on" type="xsd:string"/>
<xsd:attribute name="init-method" type="xsd:string"/>
<xsd:attribute name="destroy-method" type="xsd:string"/>
<xsd:attribute name="factory-method" type="xsd:string"/>
<xsd:attribute name="factory-bean" type="xsd:string"/>
<xsd:attribute name="autowire-candidate" type="xsd:boolean" default="true"/>
<xsd:anyAttribute namespace="##other" processContents="strict"/>
</xsd:attributeGroup>
<!-- the <meta> element -->
<xsd:element name="meta" type="metaType"/>
<xsd:complexType name="metaType">
<xsd:attribute name="key" type="xsd:string" use="required"/>
<xsd:attribute name="value" type="xsd:string" use="required"/>
</xsd:complexType>
<!-- the <bean> element -->
<xsd:element name="bean">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="identifiedType">
<xsd:group ref="beanElements"/>
<xsd:attributeGroup ref="beanAttributes"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="constructor-arg">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="description" minOccurs="0"/>
<xsd:choice minOccurs="0">
<xsd:element ref="bean"/>
<xsd:element ref="ref"/>
<xsd:element ref="idref"/>
<xsd:element ref="value"/>
<xsd:element ref="null"/>
<xsd:element ref="list"/>
<xsd:element ref="set"/>
<xsd:element ref="map"/>
<xsd:element ref="props"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="index" type="xsd:string"/>
<xsd:attribute name="type" type="xsd:string"/>
<xsd:attribute name="ref" type="xsd:string"/>
<xsd:attribute name="value" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="property" type="propertyType"/>
<xsd:element name="lookup-method">
<xsd:complexType>
<xsd:complexContent>
<xsd:restriction base="xsd:anyType">
<xsd:attribute name="name" type="xsd:string"/>
<xsd:attribute name="bean" type="xsd:string"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="replaced-method">
<xsd:complexType>
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="arg-type"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string"/>
<xsd:attribute name="replacer" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="arg-type">
<xsd:complexType mixed="true">
<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
<xsd:attribute name="match" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="ref">
<xsd:complexType>
<xsd:complexContent>
<xsd:restriction base="xsd:anyType">
<xsd:attribute name="bean" type="xsd:string"/>
<xsd:attribute name="local" type="xsd:IDREF"/>
<xsd:attribute name="parent" type="xsd:string"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="idref">
<xsd:complexType>
<xsd:complexContent>
<xsd:restriction base="xsd:anyType">
<xsd:attribute name="bean" type="xsd:string"/>
<xsd:attribute name="local" type="xsd:IDREF"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="value">
<xsd:complexType mixed="true">
<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
<xsd:attribute name="type" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="null">
<xsd:complexType mixed="true">
<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
</xsd:complexType>
</xsd:element>
<!-- Collection Elements -->
<xsd:group name="collectionElements">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="bean"/>
<xsd:element ref="ref"/>
<xsd:element ref="idref"/>
<xsd:element ref="value"/>
<xsd:element ref="null"/>
<xsd:element ref="list"/>
<xsd:element ref="set"/>
<xsd:element ref="map"/>
<xsd:element ref="props"/>
</xsd:choice>
</xsd:sequence>
</xsd:group>
<xsd:element name="list" type="listOrSetType"/>
<xsd:element name="set" type="listOrSetType"/>
<xsd:element name="map" type="mapType"/>
<xsd:element name="entry" type="entryType"/>
<xsd:element name="props" type="propsType"/>
<xsd:element name="key">
<xsd:complexType>
<xsd:group ref="collectionElements"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="prop">
<xsd:complexType mixed="true">
<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
<xsd:attribute name="key" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
<!-- Property Type -->
<xsd:complexType name="propertyType">
<xsd:sequence>
<xsd:element ref="description" minOccurs="0"/>
<xsd:choice minOccurs="0">
<xsd:element ref="meta"/>
<xsd:element ref="bean"/>
<xsd:element ref="ref"/>
<xsd:element ref="idref"/>
<xsd:element ref="value"/>
<xsd:element ref="null"/>
<xsd:element ref="list"/>
<xsd:element ref="set"/>
<xsd:element ref="map"/>
<xsd:element ref="props"/>
<xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="ref" type="xsd:string"/>
<xsd:attribute name="value" type="xsd:string"/>
</xsd:complexType>
<!-- Collection Types -->
<!-- base collection type -->
<xsd:complexType name="baseCollectionType">
<xsd:attribute name="merge" type="defaultable-boolean"/>
</xsd:complexType>
<!-- base type for collections that have (possibly) typed nested values -->
<xsd:complexType name="typedCollectionType">
<xsd:complexContent>
<xsd:extension base="baseCollectionType">
<xsd:attribute name="value-type" type="xsd:string"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<!-- 'map' element type -->
<xsd:complexType name="mapType">
<xsd:complexContent>
<xsd:extension base="typedCollectionType">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="entry"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="key-type" type="xsd:string"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<!-- 'entry' element type -->
<xsd:complexType name="entryType">
<xsd:sequence>
<xsd:element ref="key" minOccurs="0"/>
<xsd:group ref="collectionElements"/>
</xsd:sequence>
<xsd:attribute name="key" type="xsd:string"/>
<xsd:attribute name="key-ref" type="xsd:string"/>
<xsd:attribute name="value" type="xsd:string"/>
<xsd:attribute name="value-ref" type="xsd:string"/>
</xsd:complexType>
<!-- 'list' and 'set' collection type -->
<xsd:complexType name="listOrSetType">
<xsd:complexContent>
<xsd:extension base="typedCollectionType">
<xsd:group ref="collectionElements"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<!-- 'props' collection type -->
<xsd:complexType name="propsType">
<xsd:complexContent>
<xsd:extension base="baseCollectionType">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="prop"/>
</xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<!-- simple internal types -->
<xsd:simpleType name="defaultable-boolean">
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="default"/>
<xsd:enumeration value="true"/>
<xsd:enumeration value="false"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>