1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
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">
7 <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
10 <xsd:documentation><![CDATA[
11 Spring XML Beans Schema, version 3.0
12 Authors: Juergen Hoeller, Rob Harrop, Mark Fisher
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).
18 This document type is used by most Spring functionality, including
19 web application contexts, which are based on bean factories.
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.
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.
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).
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.
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>
43 <xsd:complexType name="identifiedType" abstract="true">
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>
50 <xsd:attribute name="id" type="xsd:ID">
52 <xsd:documentation><![CDATA[
53 The unique identifier for a bean.
54 ]]></xsd:documentation>
59 <!-- Top-level <beans> tag -->
60 <xsd:element name="beans">
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>
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"/>
77 <xsd:attribute name="default-lazy-init" default="false" type="xsd:boolean">
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>
85 <xsd:attribute name="default-merge" default="false" type="xsd:boolean">
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>
93 <xsd:attribute name="default-autowire" default="no">
95 <xsd:documentation><![CDATA[
96 The default 'autowire' value; see the documentation for the
97 'autowire' attribute of the '<bean>' element.
98 ]]></xsd:documentation>
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"/>
109 <xsd:attribute name="default-autowire-candidates" type="xsd:string">
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>
120 <xsd:attribute name="default-init-method" type="xsd:string">
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>
128 <xsd:attribute name="default-destroy-method" type="xsd:string">
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>
136 <xsd:anyAttribute namespace="##other" processContents="lax"/>
140 <xsd:element name="description">
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>
147 <xsd:complexType mixed="true">
148 <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
152 <xsd:element name="import">
154 <xsd:documentation source="java:org.springframework.core.io.Resource"><![CDATA[
155 Specifies an XML bean definition resource to import.
156 ]]></xsd:documentation>
160 <xsd:restriction base="xsd:anyType">
161 <xsd:attribute name="resource" type="xsd:string" use="required">
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>
170 </xsd:complexContent>
174 <xsd:element name="alias">
176 <xsd:documentation><![CDATA[
177 Defines an alias for a bean (which can reside in a different definition
179 ]]></xsd:documentation>
183 <xsd:restriction base="xsd:anyType">
184 <xsd:attribute name="name" type="xsd:string" use="required">
186 <xsd:documentation><![CDATA[
187 The name of the bean to define an alias for.
188 ]]></xsd:documentation>
191 <xsd:attribute name="alias" type="xsd:string" use="required">
193 <xsd:documentation><![CDATA[
194 The alias name to define for the bean.
195 ]]></xsd:documentation>
199 </xsd:complexContent>
203 <xsd:group name="beanElements">
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"/>
218 <xsd:attributeGroup name="beanAttributes">
219 <xsd:attribute name="name" type="xsd:string">
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>
228 <xsd:attribute name="class" type="xsd:string">
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>
236 <xsd:attribute name="parent" type="xsd:string">
238 <xsd:documentation><![CDATA[
239 The name of the parent bean definition.
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.
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
252 The remaining settings will always be taken from the child definition:
253 depends on, autowire mode, scope, lazy init.
254 ]]></xsd:documentation>
257 <xsd:attribute name="scope" type="xsd:string">
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).
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.
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).
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>
278 <xsd:attribute name="abstract" type="xsd:boolean">
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.
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>
291 <xsd:attribute name="lazy-init" default="default" type="defaultable-boolean">
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
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>
304 <xsd:attribute name="autowire" default="default">
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.
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
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.
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
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.
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
341 Note that explicit dependencies, i.e. "property" and "constructor-arg"
342 elements, always override autowiring.
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>
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"/>
358 <xsd:attribute name="depends-on" type="xsd:string">
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
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
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>
375 <xsd:attribute name="autowire-candidate" default="default" type="defaultable-boolean">
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>
385 <xsd:attribute name="primary" type="xsd:boolean">
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>
395 <xsd:attribute name="init-method" type="xsd:string">
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
401 ]]></xsd:documentation>
404 <xsd:attribute name="destroy-method" type="xsd:string">
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
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>
417 <xsd:attribute name="factory-method" type="xsd:string">
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.
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.
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.
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.
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>
447 <xsd:attribute name="factory-bean" type="xsd:string">
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>
459 <xsd:anyAttribute namespace="##other" processContents="lax"/>
460 </xsd:attributeGroup>
462 <xsd:element name="meta" type="metaType">
464 <xsd:documentation><![CDATA[
465 Arbitrary metadata attached to a bean definition.
466 ]]></xsd:documentation>
470 <xsd:complexType name="metaType">
471 <xsd:attribute name="key" type="xsd:string" use="required">
473 <xsd:documentation><![CDATA[
474 The key name of the metadata attribute being defined.
475 ]]></xsd:documentation>
478 <xsd:attribute name="value" type="xsd:string" use="required">
480 <xsd:documentation><![CDATA[
481 The value of the metadata attribute being defined (as a simple String).
482 ]]></xsd:documentation>
487 <xsd:element name="bean">
489 <xsd:documentation source="java:org.springframework.beans.factory.config.BeanDefinition"><![CDATA[
490 Defines a single (usually named) bean.
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>
499 <xsd:extension base="identifiedType">
500 <xsd:group ref="beanElements"/>
501 <xsd:attributeGroup ref="beanAttributes"/>
503 </xsd:complexContent>
507 <xsd:element name="constructor-arg">
509 <xsd:documentation source="java:org.springframework.beans.factory.config.ConstructorArgumentValues">
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.
516 Note: A single generic argument value will just be used once, rather
517 than potentially matched multiple times (as of Spring 1.1).
519 constructor-arg elements are also used in conjunction with the
520 factory-method element to construct beans using static or instance
522 ]]></xsd:documentation>
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"/>
541 <xsd:attribute name="index" type="xsd:string">
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
547 ]]></xsd:documentation>
550 <xsd:attribute name="type" type="xsd:string">
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>
559 <xsd:attribute name="name" type="xsd:string">
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>
569 <xsd:attribute name="ref" type="xsd:string">
571 <xsd:documentation><![CDATA[
572 A short-cut alternative to a nested "<ref bean='...'/>" element.
573 ]]></xsd:documentation>
576 <xsd:attribute name="value" type="xsd:string">
578 <xsd:documentation><![CDATA[
579 A short-cut alternative to a nested "<value>...<value/>" element.
580 ]]></xsd:documentation>
586 <xsd:element name="property" type="propertyType">
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>
597 <xsd:element name="qualifier">
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>
606 <xsd:element ref="attribute" minOccurs="0" maxOccurs="unbounded"/>
608 <xsd:attribute name="type" type="xsd:string" default="org.springframework.beans.factory.annotation.Qualifier"/>
609 <xsd:attribute name="value" type="xsd:string"/>
613 <xsd:element name="attribute" type="metaType">
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>
623 <xsd:element name="lookup-method">
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>
636 <xsd:restriction base="xsd:anyType">
637 <xsd:attribute name="name" type="xsd:string">
639 <xsd:documentation><![CDATA[
640 The name of the lookup method. This method must take no arguments.
641 ]]></xsd:documentation>
644 <xsd:attribute name="bean" type="xsd:string">
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>
655 </xsd:complexContent>
659 <xsd:element name="replaced-method">
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>
669 <xsd:choice minOccurs="0" maxOccurs="unbounded">
670 <xsd:element ref="arg-type"/>
673 <xsd:attribute name="name" type="xsd:string">
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>
683 <xsd:attribute name="replacer" type="xsd:string">
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>
696 <xsd:element name="arg-type">
698 <xsd:documentation><![CDATA[
699 Identifies an argument for a replaced method in the event of
701 ]]></xsd:documentation>
703 <xsd:complexType mixed="true">
704 <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
705 <xsd:attribute name="match" type="xsd:string">
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":
715 As the number of arguments will be checked also, this convenience
716 can often be used to save typing.
717 ]]></xsd:documentation>
723 <xsd:element name="ref">
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>
732 <xsd:restriction base="xsd:anyType">
733 <xsd:attribute name="bean" type="xsd:string">
735 <xsd:documentation><![CDATA[
736 The name of the referenced bean.
737 ]]></xsd:documentation>
740 <xsd:attribute name="local" type="xsd:IDREF">
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>
749 <xsd:attribute name="parent" type="xsd:string">
751 <xsd:documentation><![CDATA[
752 The name of the referenced bean in a parent factory.
753 ]]></xsd:documentation>
757 </xsd:complexContent>
761 <xsd:element name="idref">
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>
773 <xsd:restriction base="xsd:anyType">
774 <xsd:attribute name="bean" type="xsd:string">
776 <xsd:documentation><![CDATA[
777 The name of the referenced bean.
778 ]]></xsd:documentation>
781 <xsd:attribute name="local" type="xsd:IDREF">
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>
791 </xsd:complexContent>
795 <xsd:element name="value">
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.
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>
809 <xsd:complexType mixed="true">
810 <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
811 <xsd:attribute name="type" type="xsd:string">
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>
823 <xsd:element name="null">
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>
831 <xsd:complexType mixed="true">
832 <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
836 <!-- Collection Elements -->
837 <xsd:group name="collectionElements">
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"/>
856 <xsd:element name="array">
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>
866 <xsd:extension base="listOrSetType">
867 <xsd:attribute name="merge" default="default" type="defaultable-boolean">
869 <xsd:documentation><![CDATA[
870 Enables/disables merging for collections when using parent/child beans.
871 ]]></xsd:documentation>
875 </xsd:complexContent>
879 <xsd:element name="list">
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
885 ]]></xsd:documentation>
889 <xsd:extension base="listOrSetType">
890 <xsd:attribute name="merge" default="default" type="defaultable-boolean">
892 <xsd:documentation><![CDATA[
893 Enables/disables merging for collections when using parent/child beans.
894 ]]></xsd:documentation>
898 </xsd:complexContent>
902 <xsd:element name="set">
904 <xsd:documentation><![CDATA[
905 A set can contain multiple inner bean, ref, collection, or value elements.
906 ]]></xsd:documentation>
910 <xsd:extension base="listOrSetType">
911 <xsd:attribute name="merge" default="default" type="defaultable-boolean">
913 <xsd:documentation><![CDATA[
914 Enables/disables merging for collections when using parent/child beans.
915 ]]></xsd:documentation>
919 </xsd:complexContent>
923 <xsd:element name="map">
925 <xsd:documentation><![CDATA[
926 A mapping from a key to an object. Maps may be empty.
927 ]]></xsd:documentation>
931 <xsd:extension base="mapType">
932 <xsd:attribute name="merge" default="default" type="defaultable-boolean">
934 <xsd:documentation><![CDATA[
935 Enables/disables merging for collections when using parent/child beans.
936 ]]></xsd:documentation>
940 </xsd:complexContent>
944 <xsd:element name="entry" type="entryType">
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>
953 <xsd:element name="props">
955 <xsd:documentation><![CDATA[
956 Props elements differ from map elements in that values must be strings.
958 ]]></xsd:documentation>
962 <xsd:extension base="propsType">
963 <xsd:attribute name="merge" default="default" type="defaultable-boolean">
965 <xsd:documentation><![CDATA[
966 Enables/disables merging for collections when using parent/child beans.
967 ]]></xsd:documentation>
971 </xsd:complexContent>
975 <xsd:element name="key">
977 <xsd:documentation><![CDATA[
978 A key element can contain an inner bean, ref, value, or collection.
979 ]]></xsd:documentation>
982 <xsd:group ref="collectionElements"/>
986 <xsd:element name="prop">
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>
993 <xsd:complexType mixed="true">
994 <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
995 <xsd:attribute name="key" type="xsd:string" use="required">
997 <xsd:documentation><![CDATA[
998 The key of the property entry.
999 ]]></xsd:documentation>
1005 <xsd:complexType name="propertyType">
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"/>
1023 <xsd:attribute name="name" type="xsd:string" use="required">
1025 <xsd:documentation><![CDATA[
1026 The name of the property, following JavaBean naming conventions.
1027 ]]></xsd:documentation>
1030 <xsd:attribute name="ref" type="xsd:string">
1032 <xsd:documentation><![CDATA[
1033 A short-cut alternative to a nested "<ref bean='...'/>".
1034 ]]></xsd:documentation>
1037 <xsd:attribute name="value" type="xsd:string">
1039 <xsd:documentation><![CDATA[
1040 A short-cut alternative to a nested "<value>...</value>" element.
1041 ]]></xsd:documentation>
1046 <!-- Collection Types -->
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">
1052 <xsd:documentation source="java:java.lang.Class"><![CDATA[
1053 The default Java type for nested values. Must be a fully qualified
1055 ]]></xsd:documentation>
1060 <!-- 'list' and 'set' collection type -->
1061 <xsd:complexType name="listOrSetType">
1062 <xsd:complexContent>
1063 <xsd:extension base="collectionType">
1064 <xsd:group ref="collectionElements"/>
1066 </xsd:complexContent>
1069 <!-- 'map' element type -->
1070 <xsd:complexType name="mapType">
1071 <xsd:complexContent>
1072 <xsd:extension base="collectionType">
1074 <xsd:element ref="description" minOccurs="0"/>
1075 <xsd:choice minOccurs="0" maxOccurs="unbounded">
1076 <xsd:element ref="entry"/>
1079 <xsd:attribute name="key-type" type="xsd:string">
1081 <xsd:documentation source="java:java.lang.Class"><![CDATA[
1082 The default Java type for nested entry keys. Must be a fully qualified
1084 ]]></xsd:documentation>
1088 </xsd:complexContent>
1091 <!-- 'entry' element type -->
1092 <xsd:complexType name="entryType">
1094 <xsd:element ref="key" minOccurs="0"/>
1095 <xsd:group ref="collectionElements"/>
1097 <xsd:attribute name="key" type="xsd:string">
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>
1105 <xsd:attribute name="key-ref" type="xsd:string">
1107 <xsd:documentation><![CDATA[
1108 A short-cut alternative to a to a "key" element with a nested
1109 "<ref bean='...'/>".
1110 ]]></xsd:documentation>
1113 <xsd:attribute name="value" type="xsd:string">
1115 <xsd:documentation><![CDATA[
1116 A short-cut alternative to a nested "<value>...</value>"
1118 ]]></xsd:documentation>
1121 <xsd:attribute name="value-ref" type="xsd:string">
1123 <xsd:documentation><![CDATA[
1124 A short-cut alternative to a nested "<ref bean='...'/>".
1125 ]]></xsd:documentation>
1130 <!-- 'props' collection type -->
1131 <xsd:complexType name="propsType">
1132 <xsd:complexContent>
1133 <xsd:extension base="collectionType">
1135 <xsd:choice minOccurs="0" maxOccurs="unbounded">
1136 <xsd:element ref="prop"/>
1140 </xsd:complexContent>
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"/>