Salome HOME
*** empty log message ***
[tools/siman.git] / Workspace / 3dparty_src / spring / schema / spring-beans-3.0.xsd
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
3 <xsd:schema xmlns="http://www.springframework.org/schema/beans"
4                 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5                 targetNamespace="http://www.springframework.org/schema/beans">
6
7         <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
8
9         <xsd:annotation>
10                 <xsd:documentation><![CDATA[
11         Spring XML Beans Schema, version 3.0
12         Authors: Juergen Hoeller, Rob Harrop, Mark Fisher
13
14         This defines a simple and consistent way of creating a namespace
15         of JavaBeans objects, managed by a Spring BeanFactory, read by
16         XmlBeanDefinitionReader (with DefaultBeanDefinitionDocumentReader).
17
18         This document type is used by most Spring functionality, including
19         web application contexts, which are based on bean factories.
20
21         Each "bean" element in this document defines a JavaBean.
22         Typically the bean class is specified, along with JavaBean properties
23         and/or constructor arguments.
24
25         A bean instance can be a "singleton" (shared instance) or a "prototype"
26         (independent instance). Further scopes can be provided by extended
27         bean factories, for example in a web environment.
28
29         References among beans are supported, that is, setting a JavaBean property
30         or a constructor argument to refer to another bean in the same factory
31         (or an ancestor factory).
32
33         As alternative to bean references, "inner bean definitions" can be used.
34         Singleton flags of such inner bean definitions are effectively ignored:
35         inner beans are typically anonymous prototypes.
36
37         There is also support for lists, sets, maps, and java.util.Properties
38         as bean property types or constructor argument types.
39                 ]]></xsd:documentation>
40         </xsd:annotation>
41
42         <!-- base types -->
43         <xsd:complexType name="identifiedType" abstract="true">
44                 <xsd:annotation>
45                         <xsd:documentation><![CDATA[
46         The unique identifier for a bean. The scope of the identifier
47         is the enclosing bean factory.
48                         ]]></xsd:documentation>
49                 </xsd:annotation>
50                 <xsd:attribute name="id" type="xsd:ID">
51                         <xsd:annotation>
52                                 <xsd:documentation><![CDATA[
53         The unique identifier for a bean.
54                                 ]]></xsd:documentation>
55                         </xsd:annotation>
56                 </xsd:attribute>
57         </xsd:complexType>
58
59         <!-- Top-level <beans> tag -->
60         <xsd:element name="beans">
61                 <xsd:annotation>
62                         <xsd:documentation><![CDATA[
63         The top level (typically root) element. Allows the definition
64         of default values for all nested bean definitions.
65                         ]]></xsd:documentation>
66                 </xsd:annotation>
67                 <xsd:complexType>
68                         <xsd:sequence>
69                                 <xsd:element ref="description" minOccurs="0"/>
70                                 <xsd:choice minOccurs="0" maxOccurs="unbounded">
71                                         <xsd:element ref="import"/>
72                                         <xsd:element ref="alias"/>
73                                         <xsd:element ref="bean"/>
74                                         <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
75                                 </xsd:choice>
76                         </xsd:sequence>
77                         <xsd:attribute name="default-lazy-init" default="false" type="xsd:boolean">
78                                 <xsd:annotation>
79                                         <xsd:documentation><![CDATA[
80         The default 'lazy-init' value; see the documentation for the
81         'lazy-init' attribute of the '<bean>' element.
82                                         ]]></xsd:documentation>
83                                 </xsd:annotation>
84                         </xsd:attribute>
85                         <xsd:attribute name="default-merge" default="false" type="xsd:boolean">
86                                 <xsd:annotation>
87                                         <xsd:documentation><![CDATA[
88         The default 'merge' value; see the documentation for the
89         'merge' attribute of the various collection elements.
90                                         ]]></xsd:documentation>
91                                 </xsd:annotation>
92                         </xsd:attribute>
93                         <xsd:attribute name="default-autowire" default="no">
94                                 <xsd:annotation>
95                                         <xsd:documentation><![CDATA[
96         The default 'autowire' value; see the documentation for the
97         'autowire' attribute of the '<bean>' element.
98                                         ]]></xsd:documentation>
99                                 </xsd:annotation>
100                                 <xsd:simpleType>
101                                         <xsd:restriction base="xsd:NMTOKEN">
102                                                 <xsd:enumeration value="no"/>
103                                                 <xsd:enumeration value="byName"/>
104                                                 <xsd:enumeration value="byType"/>
105                                                 <xsd:enumeration value="constructor"/>
106                                         </xsd:restriction>
107                                 </xsd:simpleType>
108                         </xsd:attribute>
109                         <xsd:attribute name="default-autowire-candidates" type="xsd:string">
110                                 <xsd:annotation>
111                                         <xsd:documentation><![CDATA[
112         A default bean name pattern for identifying autowire candidates:
113         e.g. "*Service", "data*", "*Service*", "data*Service".
114         Also accepts a comma-separated list of patterns: e.g. "*Service,*Dao".
115         See the documentation for the 'autowire-candidate' attribute of the
116         '<bean/>' element for the semantic details of autowire candidate beans.
117                                         ]]></xsd:documentation>
118                                 </xsd:annotation>
119                         </xsd:attribute>
120                         <xsd:attribute name="default-init-method" type="xsd:string">
121                                 <xsd:annotation>
122                                         <xsd:documentation><![CDATA[
123         The default 'init-method' value; see the documentation for the
124         'init-method' attribute of the '<bean>' element.
125                                         ]]></xsd:documentation>
126                                 </xsd:annotation>
127                         </xsd:attribute>
128                         <xsd:attribute name="default-destroy-method" type="xsd:string">
129                                 <xsd:annotation>
130                                         <xsd:documentation><![CDATA[
131         The default 'destroy-method' value; see the documentation for the
132         'destroy-method' attribute of the '<bean>' element.
133                                         ]]></xsd:documentation>
134                                 </xsd:annotation>
135                         </xsd:attribute>
136                         <xsd:anyAttribute namespace="##other" processContents="lax"/>
137                 </xsd:complexType>
138         </xsd:element>
139
140         <xsd:element name="description">
141                 <xsd:annotation>
142                         <xsd:documentation><![CDATA[
143         Contains informative text describing the purpose of the enclosing element.
144         Used primarily for user documentation of XML bean definition documents.
145                         ]]></xsd:documentation>
146                 </xsd:annotation>
147                 <xsd:complexType mixed="true">
148                         <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
149                 </xsd:complexType>
150         </xsd:element>
151
152         <xsd:element name="import">
153                 <xsd:annotation>
154                         <xsd:documentation source="java:org.springframework.core.io.Resource"><![CDATA[
155         Specifies an XML bean definition resource to import.
156                         ]]></xsd:documentation>
157                 </xsd:annotation>
158                 <xsd:complexType>
159                         <xsd:complexContent>
160                                 <xsd:restriction base="xsd:anyType">
161                                         <xsd:attribute name="resource" type="xsd:string" use="required">
162                                                 <xsd:annotation>
163                                                         <xsd:documentation><![CDATA[
164         The relative resource location of the XML (bean definition) file to import,
165         for example "myImport.xml" or "includes/myImport.xml" or "../myImport.xml".
166                                                         ]]></xsd:documentation>
167                                                 </xsd:annotation>
168                                         </xsd:attribute>
169                                 </xsd:restriction>
170                         </xsd:complexContent>
171                 </xsd:complexType>
172         </xsd:element>
173
174         <xsd:element name="alias">
175                 <xsd:annotation>
176                         <xsd:documentation><![CDATA[
177         Defines an alias for a bean (which can reside in a different definition
178         resource).
179                         ]]></xsd:documentation>
180                 </xsd:annotation>
181                 <xsd:complexType>
182                         <xsd:complexContent>
183                                 <xsd:restriction base="xsd:anyType">
184                                         <xsd:attribute name="name" type="xsd:string" use="required">
185                                                 <xsd:annotation>
186                                                         <xsd:documentation><![CDATA[
187         The name of the bean to define an alias for.
188                                                         ]]></xsd:documentation>
189                                                 </xsd:annotation>
190                                         </xsd:attribute>
191                                         <xsd:attribute name="alias" type="xsd:string" use="required">
192                                                 <xsd:annotation>
193                                                         <xsd:documentation><![CDATA[
194         The alias name to define for the bean.
195                                                         ]]></xsd:documentation>
196                                                 </xsd:annotation>
197                                         </xsd:attribute>
198                                 </xsd:restriction>
199                         </xsd:complexContent>
200                 </xsd:complexType>
201         </xsd:element>
202
203         <xsd:group name="beanElements">
204                 <xsd:sequence>
205                         <xsd:element ref="description" minOccurs="0"/>
206                         <xsd:choice minOccurs="0" maxOccurs="unbounded">
207                                 <xsd:element ref="meta"/>
208                                 <xsd:element ref="constructor-arg"/>
209                                 <xsd:element ref="property"/>
210                                 <xsd:element ref="qualifier"/>
211                                 <xsd:element ref="lookup-method"/>
212                                 <xsd:element ref="replaced-method"/>
213                                 <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
214                         </xsd:choice>
215                 </xsd:sequence>
216         </xsd:group>
217
218         <xsd:attributeGroup name="beanAttributes">
219                 <xsd:attribute name="name" type="xsd:string">
220                         <xsd:annotation>
221                                 <xsd:documentation><![CDATA[
222         Can be used to create one or more aliases illegal in an (XML) id.
223         Multiple aliases can be separated by any number of spaces, commas,
224         or semi-colons (or indeed any mixture of the three).
225                                 ]]></xsd:documentation>
226                         </xsd:annotation>
227                 </xsd:attribute>
228                 <xsd:attribute name="class" type="xsd:string">
229                         <xsd:annotation>
230                                 <xsd:documentation source="java:java.lang.Class"><![CDATA[
231         The fully qualified name of the bean's class, except if it serves only
232         as a parent definition for child bean definitions.
233                                 ]]></xsd:documentation>
234                         </xsd:annotation>
235                 </xsd:attribute>
236                 <xsd:attribute name="parent" type="xsd:string">
237                         <xsd:annotation>
238                                 <xsd:documentation><![CDATA[
239         The name of the parent bean definition.
240
241         Will use the bean class of the parent if none is specified, but can
242         also override it. In the latter case, the child bean class must be
243         compatible with the parent, i.e. accept the parent's property values
244         and constructor argument values, if any.
245
246         A child bean definition will inherit constructor argument values,
247         property values and method overrides from the parent, with the option
248         to add new values. If init method, destroy method, factory bean and/or
249         factory method are specified, they will override the corresponding
250         parent settings.
251
252         The remaining settings will always be taken from the child definition:
253         depends on, autowire mode, scope, lazy init.
254                                 ]]></xsd:documentation>
255                         </xsd:annotation>
256                 </xsd:attribute>
257                 <xsd:attribute name="scope" type="xsd:string">
258                         <xsd:annotation>
259                                 <xsd:documentation><![CDATA[
260         The scope of this bean: typically "singleton" (one shared instance,
261         which will be returned by all calls to getBean with the given id), or
262         "prototype" (independent instance resulting from each call to getBean).
263
264         By default, a bean will be a singleton, unless the bean has a parent
265         bean definition in which case it will inherit the parent's scope.
266
267         Singletons are most commonly used, and are ideal for multi-threaded
268         service objects. Further scopes, such as "request" or "session", might
269         be supported by extended bean factories (e.g. in a web environment).
270
271         Inner bean definitions inherit the singleton status of their containing
272         bean definition, unless explicitly specified: The inner bean will be a
273         singleton if the containing bean is a singleton, and a prototype if
274         the containing bean has any other scope.
275                                 ]]></xsd:documentation>
276                         </xsd:annotation>
277                 </xsd:attribute>
278                 <xsd:attribute name="abstract" type="xsd:boolean">
279                         <xsd:annotation>
280                                 <xsd:documentation><![CDATA[
281         Is this bean "abstract", that is, not meant to be instantiated itself
282         but rather just serving as parent for concrete child bean definitions?
283         The default is "false". Specify "true" to tell the bean factory to not
284         try to instantiate that particular bean in any case.
285
286         Note: This attribute will not be inherited by child bean definitions.
287         Hence, it needs to be specified per abstract bean definition.
288                                 ]]></xsd:documentation>
289                         </xsd:annotation>
290                 </xsd:attribute>
291                 <xsd:attribute name="lazy-init" default="default" type="defaultable-boolean">
292                         <xsd:annotation>
293                                 <xsd:documentation><![CDATA[
294         Indicates whether or not this bean is to be lazily initialized.
295         If false, it will be instantiated on startup by bean factories
296         that perform eager initialization of singletons. The default is
297         "false".
298
299         Note: This attribute will not be inherited by child bean definitions.
300         Hence, it needs to be specified per concrete bean definition.
301                                 ]]></xsd:documentation>
302                         </xsd:annotation>
303                 </xsd:attribute>
304                 <xsd:attribute name="autowire" default="default">
305                         <xsd:annotation>
306                                 <xsd:documentation><![CDATA[
307         Controls whether bean properties are "autowired".
308         This is an automagical process in which bean references don't need
309         to be coded explicitly in the XML bean definition file, but rather the
310         Spring container works out dependencies.
311
312         There are 4 modes:
313
314         1. "no"
315         The traditional Spring default. No automagical wiring. Bean references
316         must be defined in the XML file via the <ref/> element (or "ref"
317         attribute). We recommend this in most cases as it makes documentation
318         more explicit.
319
320         Note that this default mode also allows for annotation-driven autowiring,
321         if activated. "no" refers to externally driven autowiring only, not
322         affecting any autowiring demands that the bean class itself expresses.
323
324         2. "byName"
325         Autowiring by property name. If a bean of class Cat exposes a "dog"
326         property, Spring will try to set this to the value of the bean "dog"
327         in the current container. If there is no matching bean by name, nothing
328         special happens.
329
330         3. "byType"
331         Autowiring if there is exactly one bean of the property type in the
332         container. If there is more than one, a fatal error is raised, and
333         you cannot use byType autowiring for that bean. If there is none,
334         nothing special happens.
335
336         4. "constructor"
337         Analogous to "byType" for constructor arguments. If there is not exactly
338         one bean of the constructor argument type in the bean factory, a fatal
339         error is raised.
340
341         Note that explicit dependencies, i.e. "property" and "constructor-arg"
342         elements, always override autowiring.
343
344         Note: This attribute will not be inherited by child bean definitions.
345         Hence, it needs to be specified per concrete bean definition.
346                                 ]]></xsd:documentation>
347                         </xsd:annotation>
348                         <xsd:simpleType>
349                                 <xsd:restriction base="xsd:NMTOKEN">
350                                         <xsd:enumeration value="default"/>
351                                         <xsd:enumeration value="no"/>
352                                         <xsd:enumeration value="byName"/>
353                                         <xsd:enumeration value="byType"/>
354                                         <xsd:enumeration value="constructor"/>
355                                 </xsd:restriction>
356                         </xsd:simpleType>
357                 </xsd:attribute>
358                 <xsd:attribute name="depends-on" type="xsd:string">
359                         <xsd:annotation>
360                                 <xsd:documentation><![CDATA[
361         The names of the beans that this bean depends on being initialized.
362         The bean factory will guarantee that these beans get initialized
363         before this bean.
364
365         Note that dependencies are normally expressed through bean properties
366         or constructor arguments. This property should just be necessary for
367         other kinds of dependencies like statics (*ugh*) or database preparation
368         on startup.
369
370         Note: This attribute will not be inherited by child bean definitions.
371         Hence, it needs to be specified per concrete bean definition.
372                                 ]]></xsd:documentation>
373                         </xsd:annotation>
374                 </xsd:attribute>
375                 <xsd:attribute name="autowire-candidate" default="default" type="defaultable-boolean">
376                         <xsd:annotation>
377                                 <xsd:documentation><![CDATA[
378         Indicates whether or not this bean should be considered when looking
379         for matching candidates to satisfy another bean's autowiring requirements.
380         Note that this does not affect explicit references by name, which will get
381         resolved even if the specified bean is not marked as an autowire candidate.
382                                 ]]></xsd:documentation>
383                         </xsd:annotation>
384                 </xsd:attribute>
385                 <xsd:attribute name="primary" type="xsd:boolean">
386                         <xsd:annotation>
387                                 <xsd:documentation><![CDATA[
388         Specifies that this bean should be given preference when multiple
389         candidates are qualified to autowire a single-valued dependency.
390         If exactly one 'primary' bean exists among the candidates, it
391         will be the autowired value.
392                                 ]]></xsd:documentation>
393                         </xsd:annotation>
394                 </xsd:attribute>
395                 <xsd:attribute name="init-method" type="xsd:string">
396                         <xsd:annotation>
397                                 <xsd:documentation><![CDATA[
398         The name of the custom initialization method to invoke after setting
399         bean properties. The method must have no arguments, but may throw any
400         exception.
401                                 ]]></xsd:documentation>
402                         </xsd:annotation>
403                 </xsd:attribute>
404                 <xsd:attribute name="destroy-method" type="xsd:string">
405                         <xsd:annotation>
406                                 <xsd:documentation><![CDATA[
407         The name of the custom destroy method to invoke on bean factory
408         shutdown. The method must have no arguments, but may throw any
409         exception.
410
411         Note: Only invoked on beans whose lifecycle is under the full
412         control of the factory - which is always the case for singletons,
413         but not guaranteed for any other scope.
414                                 ]]></xsd:documentation>
415                         </xsd:annotation>
416                 </xsd:attribute>
417                 <xsd:attribute name="factory-method" type="xsd:string">
418                         <xsd:annotation>
419                                 <xsd:documentation><![CDATA[
420         The name of a factory method to use to create this object. Use
421         constructor-arg elements to specify arguments to the factory method,
422         if it takes arguments. Autowiring does not apply to factory methods.
423
424         If the "class" attribute is present, the factory method will be a static
425         method on the class specified by the "class" attribute on this bean
426         definition. Often this will be the same class as that of the constructed
427         object - for example, when the factory method is used as an alternative
428         to a constructor. However, it may be on a different class. In that case,
429         the created object will *not* be of the class specified in the "class"
430         attribute. This is analogous to FactoryBean behavior.
431
432         If the "factory-bean" attribute is present, the "class" attribute is not
433         used, and the factory method will be an instance method on the object
434         returned from a getBean call with the specified bean name. The factory
435         bean may be defined as a singleton or a prototype.
436
437         The factory method can have any number of arguments. Autowiring is not
438         supported. Use indexed constructor-arg elements in conjunction with the
439         factory-method attribute.
440
441         Setter Injection can be used in conjunction with a factory method.
442         Method Injection cannot, as the factory method returns an instance,
443         which will be used when the container creates the bean.
444                                 ]]></xsd:documentation>
445                         </xsd:annotation>
446                 </xsd:attribute>
447                 <xsd:attribute name="factory-bean" type="xsd:string">
448                         <xsd:annotation>
449                                 <xsd:documentation><![CDATA[
450         Alternative to class attribute for factory-method usage.
451         If this is specified, no class attribute should be used.
452         This must be set to the name of a bean in the current or
453         ancestor factories that contains the relevant factory method.
454         This allows the factory itself to be configured using Dependency
455         Injection, and an instance (rather than static) method to be used.
456                                 ]]></xsd:documentation>
457                         </xsd:annotation>
458                 </xsd:attribute>
459                 <xsd:anyAttribute namespace="##other" processContents="lax"/>
460         </xsd:attributeGroup>
461
462         <xsd:element name="meta" type="metaType">
463                 <xsd:annotation>
464                         <xsd:documentation><![CDATA[
465         Arbitrary metadata attached to a bean definition.
466                         ]]></xsd:documentation>
467                 </xsd:annotation>
468         </xsd:element>
469
470         <xsd:complexType name="metaType">
471                 <xsd:attribute name="key" type="xsd:string" use="required">
472                         <xsd:annotation>
473                                 <xsd:documentation><![CDATA[
474         The key name of the metadata attribute being defined.
475                                 ]]></xsd:documentation>
476                         </xsd:annotation>
477                 </xsd:attribute>
478                 <xsd:attribute name="value" type="xsd:string" use="required">
479                         <xsd:annotation>
480                                 <xsd:documentation><![CDATA[
481         The value of the metadata attribute being defined (as a simple String).
482                                 ]]></xsd:documentation>
483                         </xsd:annotation>
484                 </xsd:attribute>
485         </xsd:complexType>
486
487         <xsd:element name="bean">
488                 <xsd:annotation>
489                         <xsd:documentation source="java:org.springframework.beans.factory.config.BeanDefinition"><![CDATA[
490         Defines a single (usually named) bean.
491
492         A bean definition may contain nested tags for constructor arguments,
493         property values, lookup methods, and replaced methods. Mixing constructor
494         injection and setter injection on the same bean is explicitly supported.
495                         ]]></xsd:documentation>
496                 </xsd:annotation>
497                 <xsd:complexType>
498                         <xsd:complexContent>
499                                 <xsd:extension base="identifiedType">
500                                         <xsd:group ref="beanElements"/>
501                                         <xsd:attributeGroup ref="beanAttributes"/>
502                                 </xsd:extension>
503                         </xsd:complexContent>
504                 </xsd:complexType>
505         </xsd:element>
506
507         <xsd:element name="constructor-arg">
508                 <xsd:annotation>
509                         <xsd:documentation source="java:org.springframework.beans.factory.config.ConstructorArgumentValues">
510                                 <![CDATA[
511         Bean definitions can specify zero or more constructor arguments.
512         This is an alternative to "autowire constructor".
513         Arguments correspond to either a specific index of the constructor
514         argument list or are supposed to be matched generically by type.
515
516         Note: A single generic argument value will just be used once, rather
517         than potentially matched multiple times (as of Spring 1.1).
518
519         constructor-arg elements are also used in conjunction with the
520         factory-method element to construct beans using static or instance
521         factory methods.
522                         ]]></xsd:documentation>
523                 </xsd:annotation>
524                 <xsd:complexType>
525                         <xsd:sequence>
526                                 <xsd:element ref="description" minOccurs="0"/>
527                                 <xsd:choice minOccurs="0" maxOccurs="1">
528                                         <xsd:element ref="bean"/>
529                                         <xsd:element ref="ref"/>
530                                         <xsd:element ref="idref"/>
531                                         <xsd:element ref="value"/>
532                                         <xsd:element ref="null"/>
533                                         <xsd:element ref="array"/>
534                                         <xsd:element ref="list"/>
535                                         <xsd:element ref="set"/>
536                                         <xsd:element ref="map"/>
537                                         <xsd:element ref="props"/>
538                                         <xsd:any namespace="##other" processContents="strict"/>
539                                 </xsd:choice>
540                         </xsd:sequence>
541                         <xsd:attribute name="index" type="xsd:string">
542                                 <xsd:annotation>
543                                         <xsd:documentation><![CDATA[
544         The exact index of the argument in the constructor argument list.
545         Only needed to avoid ambiguities, e.g. in case of 2 arguments of
546         the exact same type.
547                                         ]]></xsd:documentation>
548                                 </xsd:annotation>
549                         </xsd:attribute>
550                         <xsd:attribute name="type" type="xsd:string">
551                                 <xsd:annotation>
552                                         <xsd:documentation><![CDATA[
553         The exact type of the constructor argument. Only needed to avoid
554         ambiguities, e.g. in case of 2 single argument constructors
555         that can both be converted from a String.
556                                         ]]></xsd:documentation>
557                                 </xsd:annotation>
558                         </xsd:attribute>
559                         <xsd:attribute name="name" type="xsd:string">
560                                 <xsd:annotation>
561                                         <xsd:documentation><![CDATA[
562         The exact name of the argument in the constructor argument list.
563         Only needed to avoid ambiguities, e.g. in case of 2 arguments of
564         the exact same type. Note: This requires debug symbols to be
565         stored in the class file in order to introspect argument names!
566                                         ]]></xsd:documentation>
567                                 </xsd:annotation>
568                         </xsd:attribute>
569                         <xsd:attribute name="ref" type="xsd:string">
570                                 <xsd:annotation>
571                                         <xsd:documentation><![CDATA[
572         A short-cut alternative to a nested "<ref bean='...'/>" element.
573                                         ]]></xsd:documentation>
574                                 </xsd:annotation>
575                         </xsd:attribute>
576                         <xsd:attribute name="value" type="xsd:string">
577                                 <xsd:annotation>
578                                         <xsd:documentation><![CDATA[
579         A short-cut alternative to a nested "<value>...<value/>" element.
580                                         ]]></xsd:documentation>
581                                 </xsd:annotation>
582                         </xsd:attribute>
583                 </xsd:complexType>
584         </xsd:element>
585
586         <xsd:element name="property" type="propertyType">
587                 <xsd:annotation>
588                         <xsd:documentation><![CDATA[
589         Bean definitions can have zero or more properties.
590         Property elements correspond to JavaBean setter methods exposed
591         by the bean classes. Spring supports primitives, references to other
592         beans in the same or related factories, lists, maps and properties.
593                         ]]></xsd:documentation>
594                 </xsd:annotation>
595         </xsd:element>
596
597         <xsd:element name="qualifier">
598                 <xsd:annotation>
599                         <xsd:documentation><![CDATA[
600         Bean definitions can provide qualifiers to match against annotations
601         on a field or parameter for fine-grained autowire candidate resolution.
602                         ]]></xsd:documentation>
603                 </xsd:annotation>
604                 <xsd:complexType>
605                         <xsd:sequence>
606                                 <xsd:element ref="attribute" minOccurs="0" maxOccurs="unbounded"/>
607                         </xsd:sequence>
608                         <xsd:attribute name="type" type="xsd:string" default="org.springframework.beans.factory.annotation.Qualifier"/>
609                         <xsd:attribute name="value" type="xsd:string"/>
610                 </xsd:complexType>
611         </xsd:element>
612
613         <xsd:element name="attribute" type="metaType">
614                 <xsd:annotation>
615                         <xsd:documentation><![CDATA[
616         A qualifier element may contain attribute child elements as key-value
617         pairs. These will be available for matching against attributes of a
618         qualifier annotation on an autowired field or parameter if present.
619                         ]]></xsd:documentation>
620                 </xsd:annotation>
621         </xsd:element>
622
623         <xsd:element name="lookup-method">
624                 <xsd:annotation>
625                         <xsd:documentation><![CDATA[
626         A lookup method causes the IoC container to override the given method
627         and return the bean with the name given in the bean attribute. This is
628         a form of Method Injection. It is particularly useful as an alternative
629         to implementing the BeanFactoryAware interface, in order to be able to
630         make getBean() calls for non-singleton instances at runtime. In this
631         case, Method Injection is a less invasive alternative.
632                         ]]></xsd:documentation>
633                 </xsd:annotation>
634                 <xsd:complexType>
635                         <xsd:complexContent>
636                                 <xsd:restriction base="xsd:anyType">
637                                         <xsd:attribute name="name" type="xsd:string">
638                                                 <xsd:annotation>
639                                                         <xsd:documentation><![CDATA[
640         The name of the lookup method. This method must take no arguments.
641                                                         ]]></xsd:documentation>
642                                                 </xsd:annotation>
643                                         </xsd:attribute>
644                                         <xsd:attribute name="bean" type="xsd:string">
645                                                 <xsd:annotation>
646                                                         <xsd:documentation><![CDATA[
647         The name of the bean in the current or ancestor factories that
648         the lookup method should resolve to. Often this bean will be a
649         prototype, in which case the lookup method will return a distinct
650         instance on every invocation. This is useful for single-threaded objects.
651                                                         ]]></xsd:documentation>
652                                                 </xsd:annotation>
653                                         </xsd:attribute>
654                                 </xsd:restriction>
655                         </xsd:complexContent>
656                 </xsd:complexType>
657         </xsd:element>
658
659         <xsd:element name="replaced-method">
660                 <xsd:annotation>
661                         <xsd:documentation><![CDATA[
662         Similar to the lookup method mechanism, the replaced-method element
663         is used to control IoC container method overriding: Method Injection.
664         This mechanism allows the overriding of a method with arbitrary code.
665                         ]]></xsd:documentation>
666                 </xsd:annotation>
667                 <xsd:complexType>
668                         <xsd:sequence>
669                                 <xsd:choice minOccurs="0" maxOccurs="unbounded">
670                                         <xsd:element ref="arg-type"/>
671                                 </xsd:choice>
672                         </xsd:sequence>
673                         <xsd:attribute name="name" type="xsd:string">
674                                 <xsd:annotation>
675                                         <xsd:documentation><![CDATA[
676         The name of the method whose implementation must be replaced by the
677         IoC container. If this method is not overloaded, there is no need
678         to use arg-type subelements. If this method is overloaded, arg-type
679         subelements must be used for all override definitions for the method.
680                                         ]]></xsd:documentation>
681                                 </xsd:annotation>
682                         </xsd:attribute>
683                         <xsd:attribute name="replacer" type="xsd:string">
684                                 <xsd:annotation>
685                                         <xsd:documentation source="java:org.springframework.beans.factory.support.MethodReplacer"><![CDATA[
686         Bean name of an implementation of the MethodReplacer interface in the
687         current or ancestor factories. This may be a singleton or prototype
688         bean. If it is a prototype, a new instance will be used for each
689         method replacement. Singleton usage is the norm.
690                                         ]]></xsd:documentation>
691                                 </xsd:annotation>
692                         </xsd:attribute>
693                 </xsd:complexType>
694         </xsd:element>
695
696         <xsd:element name="arg-type">
697                 <xsd:annotation>
698                         <xsd:documentation><![CDATA[
699         Identifies an argument for a replaced method in the event of
700         method overloading.
701                         ]]></xsd:documentation>
702                 </xsd:annotation>
703                 <xsd:complexType mixed="true">
704                         <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
705                         <xsd:attribute name="match" type="xsd:string">
706                                 <xsd:annotation>
707                                         <xsd:documentation><![CDATA[
708         Specification of the type of an overloaded method argument as a String.
709         For convenience, this may be a substring of the FQN. E.g. all the
710         following would match "java.lang.String":
711         - java.lang.String
712         - String
713         - Str
714
715         As the number of arguments will be checked also, this convenience
716         can often be used to save typing.
717                                         ]]></xsd:documentation>
718                                 </xsd:annotation>
719                         </xsd:attribute>
720                 </xsd:complexType>
721         </xsd:element>
722
723         <xsd:element name="ref">
724                 <xsd:annotation>
725                         <xsd:documentation><![CDATA[
726         Defines a reference to another bean in this factory or an external
727         factory (parent or included factory).
728                         ]]></xsd:documentation>
729                 </xsd:annotation>
730                 <xsd:complexType>
731                         <xsd:complexContent>
732                                 <xsd:restriction base="xsd:anyType">
733                                         <xsd:attribute name="bean" type="xsd:string">
734                                                 <xsd:annotation>
735                                                         <xsd:documentation><![CDATA[
736         The name of the referenced bean.
737                                                         ]]></xsd:documentation>
738                                                 </xsd:annotation>
739                                         </xsd:attribute>
740                                         <xsd:attribute name="local" type="xsd:IDREF">
741                                                 <xsd:annotation>
742                                                         <xsd:documentation><![CDATA[
743         The name of the referenced bean. The value must be a bean ID and thus can 
744         be checked by the XML parser. This is therefore the preferred technique 
745         for referencing beans within the same bean factory XML file.
746                                                         ]]></xsd:documentation>
747                                                 </xsd:annotation>
748                                         </xsd:attribute>
749                                         <xsd:attribute name="parent" type="xsd:string">
750                                                 <xsd:annotation>
751                                                         <xsd:documentation><![CDATA[
752         The name of the referenced bean in a parent factory.
753                                                 ]]></xsd:documentation>
754                                                 </xsd:annotation>
755                                         </xsd:attribute>
756                                 </xsd:restriction>
757                         </xsd:complexContent>
758                 </xsd:complexType>
759         </xsd:element>
760
761         <xsd:element name="idref">
762                 <xsd:annotation>
763                         <xsd:documentation><![CDATA[
764         The id of another bean in this factory or an external factory
765         (parent or included factory).
766         While a regular 'value' element could instead be used for the
767         same effect, using idref in this case allows validation of local
768         bean ids by the XML parser, and name completion by supporting tools.
769                         ]]></xsd:documentation>
770                 </xsd:annotation>
771                 <xsd:complexType>
772                         <xsd:complexContent>
773                                 <xsd:restriction base="xsd:anyType">
774                                         <xsd:attribute name="bean" type="xsd:string">
775                                                 <xsd:annotation>
776                                                         <xsd:documentation><![CDATA[
777         The name of the referenced bean.
778                                                         ]]></xsd:documentation>
779                                                 </xsd:annotation>
780                                         </xsd:attribute>
781                                         <xsd:attribute name="local" type="xsd:IDREF">
782                                                 <xsd:annotation>
783                                                         <xsd:documentation><![CDATA[
784         The name of the referenced bean. The value must be a bean ID and thus can 
785         be checked by the XML parser. This is therefore the preferred technique 
786         for referencing beans within the same bean factory XML file.
787                                                         ]]></xsd:documentation>
788                                                 </xsd:annotation>
789                                         </xsd:attribute>
790                                 </xsd:restriction>
791                         </xsd:complexContent>
792                 </xsd:complexType>
793         </xsd:element>
794
795         <xsd:element name="value">
796                 <xsd:annotation>
797                         <xsd:documentation><![CDATA[
798         Contains a string representation of a property value.
799         The property may be a string, or may be converted to the required
800         type using the JavaBeans PropertyEditor machinery. This makes it
801         possible for application developers to write custom PropertyEditor
802         implementations that can convert strings to arbitrary target objects.
803
804         Note that this is recommended for simple objects only. Configure
805         more complex objects by populating JavaBean properties with
806         references to other beans.
807                         ]]></xsd:documentation>
808                 </xsd:annotation>
809                 <xsd:complexType mixed="true">
810                         <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
811                         <xsd:attribute name="type" type="xsd:string">
812                                 <xsd:annotation>
813                                         <xsd:documentation><![CDATA[
814         The exact type that the value should be converted to. Only needed
815         if the type of the target property or constructor argument is
816         too generic: for example, in case of a collection element.
817                                         ]]></xsd:documentation>
818                                 </xsd:annotation>
819                         </xsd:attribute>
820                 </xsd:complexType>
821         </xsd:element>
822
823         <xsd:element name="null">
824                 <xsd:annotation>
825                         <xsd:documentation><![CDATA[
826         Denotes a Java null value. Necessary because an empty "value" tag
827         will resolve to an empty String, which will not be resolved to a
828         null value unless a special PropertyEditor does so.
829                         ]]></xsd:documentation>
830                 </xsd:annotation>
831                 <xsd:complexType mixed="true">
832                         <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
833                 </xsd:complexType>
834         </xsd:element>
835
836         <!-- Collection Elements -->
837         <xsd:group name="collectionElements">
838                 <xsd:sequence>
839                         <xsd:element ref="description" minOccurs="0"/>
840                         <xsd:choice minOccurs="0" maxOccurs="unbounded">
841                                 <xsd:element ref="bean"/>
842                                 <xsd:element ref="ref"/>
843                                 <xsd:element ref="idref"/>
844                                 <xsd:element ref="value"/>
845                                 <xsd:element ref="null"/>
846                                 <xsd:element ref="array"/>
847                                 <xsd:element ref="list"/>
848                                 <xsd:element ref="set"/>
849                                 <xsd:element ref="map"/>
850                                 <xsd:element ref="props"/>
851                                 <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
852                         </xsd:choice>
853                 </xsd:sequence>
854         </xsd:group>
855
856         <xsd:element name="array">
857                 <xsd:annotation>
858                         <xsd:documentation><![CDATA[
859         An array can contain multiple inner bean, ref, collection, or value elements.
860         This configuration element will always result in an array, even when being
861         defined e.g. as a value for a map with value type Object.
862                         ]]></xsd:documentation>
863                 </xsd:annotation>
864                 <xsd:complexType>
865                         <xsd:complexContent>
866                                 <xsd:extension base="listOrSetType">
867                                         <xsd:attribute name="merge" default="default" type="defaultable-boolean">
868                                                 <xsd:annotation>
869                                                         <xsd:documentation><![CDATA[
870         Enables/disables merging for collections when using parent/child beans.
871                                                         ]]></xsd:documentation>
872                                                 </xsd:annotation>
873                                         </xsd:attribute>
874                                 </xsd:extension>
875                         </xsd:complexContent>
876                 </xsd:complexType>
877         </xsd:element>
878
879         <xsd:element name="list">
880                 <xsd:annotation>
881                         <xsd:documentation><![CDATA[
882         A list can contain multiple inner bean, ref, collection, or value elements.
883         A list can also map to an array type; the necessary conversion is performed
884         automatically.
885                         ]]></xsd:documentation>
886                 </xsd:annotation>
887                 <xsd:complexType>
888                         <xsd:complexContent>
889                                 <xsd:extension base="listOrSetType">
890                                         <xsd:attribute name="merge" default="default" type="defaultable-boolean">
891                                                 <xsd:annotation>
892                                                         <xsd:documentation><![CDATA[
893         Enables/disables merging for collections when using parent/child beans.
894                                                         ]]></xsd:documentation>
895                                                 </xsd:annotation>
896                                         </xsd:attribute>
897                                 </xsd:extension>
898                         </xsd:complexContent>
899                 </xsd:complexType>
900         </xsd:element>
901
902         <xsd:element name="set">
903                 <xsd:annotation>
904                         <xsd:documentation><![CDATA[
905         A set can contain multiple inner bean, ref, collection, or value elements.
906                         ]]></xsd:documentation>
907                 </xsd:annotation>
908                 <xsd:complexType>
909                         <xsd:complexContent>
910                                 <xsd:extension base="listOrSetType">
911                                         <xsd:attribute name="merge" default="default" type="defaultable-boolean">
912                                                 <xsd:annotation>
913                                                         <xsd:documentation><![CDATA[
914         Enables/disables merging for collections when using parent/child beans.
915                                                         ]]></xsd:documentation>
916                                                 </xsd:annotation>
917                                         </xsd:attribute>
918                                 </xsd:extension>
919                         </xsd:complexContent>
920                 </xsd:complexType>
921         </xsd:element>
922
923         <xsd:element name="map">
924                 <xsd:annotation>
925                         <xsd:documentation><![CDATA[
926         A mapping from a key to an object. Maps may be empty.
927                         ]]></xsd:documentation>
928                 </xsd:annotation>
929                 <xsd:complexType>
930                         <xsd:complexContent>
931                                 <xsd:extension base="mapType">
932                                         <xsd:attribute name="merge" default="default" type="defaultable-boolean">
933                                                 <xsd:annotation>
934                                                         <xsd:documentation><![CDATA[
935         Enables/disables merging for collections when using parent/child beans.
936                                                         ]]></xsd:documentation>
937                                                 </xsd:annotation>
938                                         </xsd:attribute>
939                                 </xsd:extension>
940                         </xsd:complexContent>
941                 </xsd:complexType>
942         </xsd:element>
943
944         <xsd:element name="entry" type="entryType">
945                 <xsd:annotation>
946                         <xsd:documentation><![CDATA[
947         A map entry can be an inner bean, ref, value, or collection.
948         The key of the entry is given by the "key" attribute or child element.
949                         ]]></xsd:documentation>
950                 </xsd:annotation>
951         </xsd:element>
952
953         <xsd:element name="props">
954                 <xsd:annotation>
955                         <xsd:documentation><![CDATA[
956         Props elements differ from map elements in that values must be strings.
957         Props may be empty.
958                         ]]></xsd:documentation>
959                 </xsd:annotation>
960                 <xsd:complexType>
961                         <xsd:complexContent>
962                                 <xsd:extension base="propsType">
963                                         <xsd:attribute name="merge" default="default" type="defaultable-boolean">
964                                                 <xsd:annotation>
965                                                         <xsd:documentation><![CDATA[
966         Enables/disables merging for collections when using parent/child beans.
967                                                         ]]></xsd:documentation>
968                                                 </xsd:annotation>
969                                         </xsd:attribute>
970                                 </xsd:extension>
971                         </xsd:complexContent>
972                 </xsd:complexType>
973         </xsd:element>
974
975         <xsd:element name="key">
976                 <xsd:annotation>
977                         <xsd:documentation><![CDATA[
978         A key element can contain an inner bean, ref, value, or collection.
979                         ]]></xsd:documentation>
980                 </xsd:annotation>
981                 <xsd:complexType>
982                         <xsd:group ref="collectionElements"/>
983                 </xsd:complexType>
984         </xsd:element>
985
986         <xsd:element name="prop">
987                 <xsd:annotation>
988                         <xsd:documentation><![CDATA[
989         The string value of the property. Note that whitespace is trimmed
990         off to avoid unwanted whitespace caused by typical XML formatting.
991                         ]]></xsd:documentation>
992                 </xsd:annotation>
993                 <xsd:complexType mixed="true">
994                         <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
995                         <xsd:attribute name="key" type="xsd:string" use="required">
996                                 <xsd:annotation>
997                                         <xsd:documentation><![CDATA[
998         The key of the property entry.
999                                         ]]></xsd:documentation>
1000                                 </xsd:annotation>
1001                         </xsd:attribute>
1002                 </xsd:complexType>
1003         </xsd:element>
1004
1005         <xsd:complexType name="propertyType">
1006                 <xsd:sequence>
1007                         <xsd:element ref="description" minOccurs="0"/>
1008                         <xsd:choice minOccurs="0" maxOccurs="1">
1009                                 <xsd:element ref="meta"/>
1010                                 <xsd:element ref="bean"/>
1011                                 <xsd:element ref="ref"/>
1012                                 <xsd:element ref="idref"/>
1013                                 <xsd:element ref="value"/>
1014                                 <xsd:element ref="null"/>
1015                                 <xsd:element ref="array"/>
1016                                 <xsd:element ref="list"/>
1017                                 <xsd:element ref="set"/>
1018                                 <xsd:element ref="map"/>
1019                                 <xsd:element ref="props"/>
1020                                 <xsd:any namespace="##other" processContents="strict"/>
1021                         </xsd:choice>
1022                 </xsd:sequence>
1023                 <xsd:attribute name="name" type="xsd:string" use="required">
1024                         <xsd:annotation>
1025                                 <xsd:documentation><![CDATA[
1026         The name of the property, following JavaBean naming conventions.
1027                                 ]]></xsd:documentation>
1028                         </xsd:annotation>
1029                 </xsd:attribute>
1030                 <xsd:attribute name="ref" type="xsd:string">
1031                         <xsd:annotation>
1032                                 <xsd:documentation><![CDATA[
1033         A short-cut alternative to a nested "<ref bean='...'/>".
1034                                 ]]></xsd:documentation>
1035                         </xsd:annotation>
1036                 </xsd:attribute>
1037                 <xsd:attribute name="value" type="xsd:string">
1038                         <xsd:annotation>
1039                                 <xsd:documentation><![CDATA[
1040         A short-cut alternative to a nested "<value>...</value>" element.
1041                                 ]]></xsd:documentation>
1042                         </xsd:annotation>
1043                 </xsd:attribute>
1044         </xsd:complexType>
1045
1046         <!-- Collection Types -->
1047
1048         <!-- base type for collections that have (possibly) typed nested values -->
1049         <xsd:complexType name="collectionType">
1050                 <xsd:attribute name="value-type" type="xsd:string">
1051                         <xsd:annotation>
1052                                 <xsd:documentation source="java:java.lang.Class"><![CDATA[
1053         The default Java type for nested values. Must be a fully qualified
1054         class name.
1055                                 ]]></xsd:documentation>
1056                         </xsd:annotation>
1057                 </xsd:attribute>
1058         </xsd:complexType>
1059
1060         <!-- 'list' and 'set' collection type -->
1061         <xsd:complexType name="listOrSetType">
1062                 <xsd:complexContent>
1063                         <xsd:extension base="collectionType">
1064                                 <xsd:group ref="collectionElements"/>
1065                         </xsd:extension>
1066                 </xsd:complexContent>
1067         </xsd:complexType>
1068
1069         <!-- 'map' element type -->
1070         <xsd:complexType name="mapType">
1071                 <xsd:complexContent>
1072                         <xsd:extension base="collectionType">
1073                                 <xsd:sequence>
1074                                         <xsd:element ref="description" minOccurs="0"/>
1075                                         <xsd:choice minOccurs="0" maxOccurs="unbounded">
1076                                                 <xsd:element ref="entry"/>
1077                                         </xsd:choice>
1078                                 </xsd:sequence>
1079                                 <xsd:attribute name="key-type" type="xsd:string">
1080                                         <xsd:annotation>
1081                                                 <xsd:documentation source="java:java.lang.Class"><![CDATA[
1082         The default Java type for nested entry keys. Must be a fully qualified
1083         class name.
1084                                                 ]]></xsd:documentation>
1085                                         </xsd:annotation>
1086                                 </xsd:attribute>
1087                         </xsd:extension>
1088                 </xsd:complexContent>
1089         </xsd:complexType>
1090
1091         <!-- 'entry' element type -->
1092         <xsd:complexType name="entryType">
1093                 <xsd:sequence>
1094                         <xsd:element ref="key" minOccurs="0"/>
1095                         <xsd:group ref="collectionElements"/>
1096                 </xsd:sequence>
1097                 <xsd:attribute name="key" type="xsd:string">
1098                         <xsd:annotation>
1099                                 <xsd:documentation><![CDATA[
1100         Each map element must specify its key as attribute or as child element.
1101         A key attribute is always a String value.
1102                                 ]]></xsd:documentation>
1103                         </xsd:annotation>
1104                 </xsd:attribute>
1105                 <xsd:attribute name="key-ref" type="xsd:string">
1106                         <xsd:annotation>
1107                                 <xsd:documentation><![CDATA[
1108         A short-cut alternative to a to a "key" element with a nested
1109         "<ref bean='...'/>".
1110                                 ]]></xsd:documentation>
1111                         </xsd:annotation>
1112                 </xsd:attribute>
1113                 <xsd:attribute name="value" type="xsd:string">
1114                         <xsd:annotation>
1115                                 <xsd:documentation><![CDATA[
1116         A short-cut alternative to a nested "<value>...</value>"
1117         element.
1118                                 ]]></xsd:documentation>
1119                         </xsd:annotation>
1120                 </xsd:attribute>
1121                 <xsd:attribute name="value-ref" type="xsd:string">
1122                         <xsd:annotation>
1123                                 <xsd:documentation><![CDATA[
1124         A short-cut alternative to a nested "<ref bean='...'/>".
1125                                 ]]></xsd:documentation>
1126                         </xsd:annotation>
1127                 </xsd:attribute>
1128         </xsd:complexType>
1129
1130         <!-- 'props' collection type -->
1131         <xsd:complexType name="propsType">
1132                 <xsd:complexContent>
1133                         <xsd:extension base="collectionType">
1134                                 <xsd:sequence>
1135                                         <xsd:choice minOccurs="0" maxOccurs="unbounded">
1136                                                 <xsd:element ref="prop"/>
1137                                         </xsd:choice>
1138                                 </xsd:sequence>
1139                         </xsd:extension>
1140                 </xsd:complexContent>
1141         </xsd:complexType>
1142
1143         <!-- simple internal types -->
1144         <xsd:simpleType name="defaultable-boolean">
1145                 <xsd:restriction base="xsd:NMTOKEN">
1146                         <xsd:enumeration value="default"/>
1147                         <xsd:enumeration value="true"/>
1148                         <xsd:enumeration value="false"/>
1149                 </xsd:restriction>
1150         </xsd:simpleType>
1151
1152 </xsd:schema>