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 2.0
12 Authors: Rob Harrop, Juergen Hoeller
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"/>
106 <xsd:enumeration value="autodetect"/>
110 <xsd:attribute name="default-dependency-check" default="none">
112 <xsd:documentation><![CDATA[
113 The default 'dependency-check' value; see the documentation for the
114 'dependency-check' attribute of the '<bean>' element.
115 ]]></xsd:documentation>
118 <xsd:restriction base="xsd:NMTOKEN">
119 <xsd:enumeration value="none"/>
120 <xsd:enumeration value="simple"/>
121 <xsd:enumeration value="objects"/>
122 <xsd:enumeration value="all"/>
126 <xsd:attribute name="default-init-method" type="xsd:string">
128 <xsd:documentation><![CDATA[
129 The default 'init-method' value; see the documentation for the
130 'init-method' attribute of the '<bean>' element.
131 ]]></xsd:documentation>
134 <xsd:attribute name="default-destroy-method" type="xsd:string">
136 <xsd:documentation><![CDATA[
137 The default 'destroy-method' value; see the documentation for the
138 'destroy-method' attribute of the '<bean>' element.
139 ]]></xsd:documentation>
145 <xsd:element name="description">
147 <xsd:documentation><![CDATA[
148 Contains informative text describing the purpose of the enclosing element.
149 Used primarily for user documentation of XML bean definition documents.
150 ]]></xsd:documentation>
152 <xsd:complexType mixed="true">
153 <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
157 <xsd:element name="import">
159 <xsd:documentation source="java:org.springframework.core.io.Resource"><![CDATA[
160 Specifies an XML bean definition resource to import.
161 ]]></xsd:documentation>
165 <xsd:restriction base="xsd:anyType">
166 <xsd:attribute name="resource" type="xsd:string" use="required">
168 <xsd:documentation><![CDATA[
169 The relative resource location of the XML (bean definition) file to import,
170 for example "myImport.xml" or "includes/myImport.xml" or "../myImport.xml".
171 ]]></xsd:documentation>
175 </xsd:complexContent>
179 <xsd:element name="alias">
181 <xsd:documentation><![CDATA[
182 Defines an alias for a bean (which can reside in a different definition
184 ]]></xsd:documentation>
188 <xsd:restriction base="xsd:anyType">
189 <xsd:attribute name="name" type="xsd:string" use="required">
191 <xsd:documentation><![CDATA[
192 The name of the bean to define an alias for.
193 ]]></xsd:documentation>
196 <xsd:attribute name="alias" type="xsd:string" use="required">
198 <xsd:documentation><![CDATA[
199 The alias name to define for the bean.
200 ]]></xsd:documentation>
204 </xsd:complexContent>
208 <xsd:group name="beanElements">
210 <xsd:element ref="description" minOccurs="0"/>
211 <xsd:choice minOccurs="0" maxOccurs="unbounded">
212 <xsd:element ref="meta"/>
213 <xsd:element ref="constructor-arg"/>
214 <xsd:element ref="property"/>
215 <xsd:element ref="lookup-method"/>
216 <xsd:element ref="replaced-method"/>
217 <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
222 <xsd:attributeGroup name="beanAttributes">
223 <xsd:attribute name="name" type="xsd:string">
225 <xsd:documentation><![CDATA[
226 Can be used to create one or more aliases illegal in an (XML) id.
227 Multiple aliases can be separated by any number of spaces, commas,
228 or semi-colons (or indeed any mixture of the three).
229 ]]></xsd:documentation>
232 <xsd:attribute name="class" type="xsd:string">
234 <xsd:documentation source="java:java.lang.Class"><![CDATA[
235 The fully qualified name of the bean's class, except if it serves only
236 as a parent definition for child bean definitions.
237 ]]></xsd:documentation>
240 <xsd:attribute name="parent" type="xsd:string">
242 <xsd:documentation><![CDATA[
243 The name of the parent bean definition.
245 Will use the bean class of the parent if none is specified, but can
246 also override it. In the latter case, the child bean class must be
247 compatible with the parent, i.e. accept the parent's property values
248 and constructor argument values, if any.
250 A child bean definition will inherit constructor argument values,
251 property values and method overrides from the parent, with the option
252 to add new values. If init method, destroy method, factory bean and/or
253 factory method are specified, they will override the corresponding
256 The remaining settings will always be taken from the child definition:
257 depends on, autowire mode, dependency check, scope, lazy init.
258 ]]></xsd:documentation>
261 <xsd:attribute name="scope" type="xsd:string">
263 <xsd:documentation><![CDATA[
264 The scope of this bean: typically "singleton" (one shared instance,
265 which will be returned by all calls to getBean with the given id), or
266 "prototype" (independent instance resulting from each call to getBean).
267 Default is "singleton".
269 Singletons are most commonly used, and are ideal for multi-threaded
270 service objects. Further scopes, such as "request" or "session", might
271 be supported by extended bean factories (e.g. in a web environment).
273 Note: This attribute will not be inherited by child bean definitions.
274 Hence, it needs to be specified per concrete bean definition.
276 Inner bean definitions inherit the singleton status of their containing
277 bean definition, unless explicitly specified: The inner bean will be a
278 singleton if the containing bean is a singleton, and a prototype if
279 the containing bean has any other scope.
280 ]]></xsd:documentation>
283 <xsd:attribute name="abstract" type="xsd:boolean">
285 <xsd:documentation><![CDATA[
286 Is this bean "abstract", that is, not meant to be instantiated itself
287 but rather just serving as parent for concrete child bean definitions?
288 The default is "false". Specify "true" to tell the bean factory to not
289 try to instantiate that particular bean in any case.
291 Note: This attribute will not be inherited by child bean definitions.
292 Hence, it needs to be specified per abstract bean definition.
293 ]]></xsd:documentation>
296 <xsd:attribute name="lazy-init" default="default" type="defaultable-boolean">
298 <xsd:documentation><![CDATA[
299 Indicates whether or not this bean is to be lazily initialized.
300 If false, it will be instantiated on startup by bean factories
301 that perform eager initialization of singletons. The default is
304 Note: This attribute will not be inherited by child bean definitions.
305 Hence, it needs to be specified per concrete bean definition.
306 ]]></xsd:documentation>
309 <xsd:attribute name="autowire" default="default">
311 <xsd:documentation><![CDATA[
312 Controls whether bean properties are "autowired".
313 This is an automagical process in which bean references don't need
314 to be coded explicitly in the XML bean definition file, but rather the
315 Spring container works out dependencies.
320 The traditional Spring default. No automagical wiring. Bean references
321 must be defined in the XML file via the <ref/> element (or "ref"
322 attribute). We recommend this in most cases as it makes documentation
326 Autowiring by property name. If a bean of class Cat exposes a "dog"
327 property, Spring will try to set this to the value of the bean "dog"
328 in the current container. If there is no matching bean by name, nothing
329 special happens; use dependency-check="objects" to raise an error in
333 Autowiring if there is exactly one bean of the property type in the
334 container. If there is more than one, a fatal error is raised, and
335 you cannot use byType autowiring for that bean. If there is none,
336 nothing special happens; use dependency-check="objects" to raise an
340 Analogous to "byType" for constructor arguments. If there is not exactly
341 one bean of the constructor argument type in the bean factory, a fatal
345 Chooses "constructor" or "byType" through introspection of the bean
346 class. If a default constructor is found, "byType" gets applied.
348 Note that explicit dependencies, i.e. "property" and "constructor-arg"
349 elements, always override autowiring. Autowire behavior can be combined
350 with dependency checking, which will be performed after all autowiring
353 Note: This attribute will not be inherited by child bean definitions.
354 Hence, it needs to be specified per concrete bean definition.
355 ]]></xsd:documentation>
358 <xsd:restriction base="xsd:NMTOKEN">
359 <xsd:enumeration value="default"/>
360 <xsd:enumeration value="no"/>
361 <xsd:enumeration value="byName"/>
362 <xsd:enumeration value="byType"/>
363 <xsd:enumeration value="constructor"/>
364 <xsd:enumeration value="autodetect"/>
368 <xsd:attribute name="dependency-check" default="default">
370 <xsd:documentation><![CDATA[
371 Controls whether or not to check whether all of this
372 bean's dependencies, expressed in its properties, are satisfied.
373 The default is to perform no dependency checking.
375 "simple" type dependency checking includes primitives and String;
376 "objects" includes collaborators (other beans in the factory);
377 "all" includes both types of dependency checking.
379 Note: This attribute will not be inherited by child bean definitions.
380 Hence, it needs to be specified per concrete bean definition.
381 ]]></xsd:documentation>
384 <xsd:restriction base="xsd:NMTOKEN">
385 <xsd:enumeration value="default"/>
386 <xsd:enumeration value="none"/>
387 <xsd:enumeration value="simple"/>
388 <xsd:enumeration value="objects"/>
389 <xsd:enumeration value="all"/>
393 <xsd:attribute name="depends-on" type="xsd:string">
395 <xsd:documentation><![CDATA[
396 The names of the beans that this bean depends on being initialized.
397 The bean factory will guarantee that these beans get initialized
400 Note that dependencies are normally expressed through bean properties
401 or constructor arguments. This property should just be necessary for
402 other kinds of dependencies like statics (*ugh*) or database preparation
405 Note: This attribute will not be inherited by child bean definitions.
406 Hence, it needs to be specified per concrete bean definition.
407 ]]></xsd:documentation>
410 <xsd:attribute name="autowire-candidate" type="xsd:boolean">
412 <xsd:documentation><![CDATA[
413 Indicates whether or not this bean should be considered when looking
414 for matching candidates to satisfy another bean's autowiring requirements.
415 Note that this does not affect explicit references by name, which will get
416 resolved even if the specified bean is not marked as an autowire candidate.
417 ]]></xsd:documentation>
420 <xsd:attribute name="init-method" type="xsd:string">
422 <xsd:documentation><![CDATA[
423 The name of the custom initialization method to invoke after setting
424 bean properties. The method must have no arguments, but may throw any
426 ]]></xsd:documentation>
429 <xsd:attribute name="destroy-method" type="xsd:string">
431 <xsd:documentation><![CDATA[
432 The name of the custom destroy method to invoke on bean factory
433 shutdown. The method must have no arguments, but may throw any
436 Note: Only invoked on beans whose lifecycle is under the full
437 control of the factory - which is always the case for singletons,
438 but not guaranteed for any other scope.
439 ]]></xsd:documentation>
442 <xsd:attribute name="factory-method" type="xsd:string">
444 <xsd:documentation><![CDATA[
445 The name of a factory method to use to create this object. Use
446 constructor-arg elements to specify arguments to the factory method,
447 if it takes arguments. Autowiring does not apply to factory methods.
449 If the "class" attribute is present, the factory method will be a static
450 method on the class specified by the "class" attribute on this bean
451 definition. Often this will be the same class as that of the constructed
452 object - for example, when the factory method is used as an alternative
453 to a constructor. However, it may be on a different class. In that case,
454 the created object will *not* be of the class specified in the "class"
455 attribute. This is analogous to FactoryBean behavior.
457 If the "factory-bean" attribute is present, the "class" attribute is not
458 used, and the factory method will be an instance method on the object
459 returned from a getBean call with the specified bean name. The factory
460 bean may be defined as a singleton or a prototype.
462 The factory method can have any number of arguments. Autowiring is not
463 supported. Use indexed constructor-arg elements in conjunction with the
464 factory-method attribute.
466 Setter Injection can be used in conjunction with a factory method.
467 Method Injection cannot, as the factory method returns an instance,
468 which will be used when the container creates the bean.
469 ]]></xsd:documentation>
472 <xsd:attribute name="factory-bean" type="xsd:string">
474 <xsd:documentation><![CDATA[
475 Alternative to class attribute for factory-method usage.
476 If this is specified, no class attribute should be used.
477 This must be set to the name of a bean in the current or
478 ancestor factories that contains the relevant factory method.
479 This allows the factory itself to be configured using Dependency
480 Injection, and an instance (rather than static) method to be used.
481 ]]></xsd:documentation>
484 <xsd:anyAttribute namespace="##other" processContents="lax"/>
485 </xsd:attributeGroup>
487 <xsd:element name="meta" type="metaType">
489 <xsd:documentation><![CDATA[
490 Arbitrary metadata attached to a bean definition.
491 ]]></xsd:documentation>
495 <xsd:complexType name="metaType">
496 <xsd:attribute name="key" type="xsd:string" use="required">
498 <xsd:documentation><![CDATA[
499 The key name of the metadata attribute being defined.
500 ]]></xsd:documentation>
503 <xsd:attribute name="value" type="xsd:string" use="required">
505 <xsd:documentation><![CDATA[
506 The value of the metadata attribute being defined (as a simple String).
507 ]]></xsd:documentation>
512 <xsd:element name="bean">
514 <xsd:documentation source="java:org.springframework.beans.factory.config.BeanDefinition"><![CDATA[
515 Defines a single (usually named) bean.
517 A bean definition may contain nested tags for constructor arguments,
518 property values, lookup methods, and replaced methods. Mixing constructor
519 injection and setter injection on the same bean is explicitly supported.
520 ]]></xsd:documentation>
524 <xsd:extension base="identifiedType">
525 <xsd:group ref="beanElements"/>
526 <xsd:attributeGroup ref="beanAttributes"/>
528 </xsd:complexContent>
532 <xsd:element name="constructor-arg">
534 <xsd:documentation source="java:org.springframework.beans.factory.config.ConstructorArgumentValues">
536 Bean definitions can specify zero or more constructor arguments.
537 This is an alternative to "autowire constructor".
538 Arguments correspond to either a specific index of the constructor
539 argument list or are supposed to be matched generically by type.
541 Note: A single generic argument value will just be used once, rather
542 than potentially matched multiple times (as of Spring 1.1).
544 constructor-arg elements are also used in conjunction with the
545 factory-method element to construct beans using static or instance
547 ]]></xsd:documentation>
551 <xsd:element ref="description" minOccurs="0"/>
552 <xsd:choice minOccurs="0" maxOccurs="1">
553 <xsd:element ref="bean"/>
554 <xsd:element ref="ref"/>
555 <xsd:element ref="idref"/>
556 <xsd:element ref="value"/>
557 <xsd:element ref="null"/>
558 <xsd:element ref="list"/>
559 <xsd:element ref="set"/>
560 <xsd:element ref="map"/>
561 <xsd:element ref="props"/>
562 <xsd:any namespace="##other" processContents="strict"/>
565 <xsd:attribute name="index" type="xsd:string">
567 <xsd:documentation><![CDATA[
568 The exact index of the argument in the constructor argument list.
569 Only needed to avoid ambiguities, e.g. in case of 2 arguments of
571 ]]></xsd:documentation>
574 <xsd:attribute name="type" type="xsd:string">
576 <xsd:documentation><![CDATA[
577 The exact type of the constructor argument. Only needed to avoid
578 ambiguities, e.g. in case of 2 single argument constructors
579 that can both be converted from a String.
580 ]]></xsd:documentation>
583 <xsd:attribute name="ref" type="xsd:string">
585 <xsd:documentation><![CDATA[
586 A short-cut alternative to a nested "<ref bean='...'/>" element.
587 ]]></xsd:documentation>
590 <xsd:attribute name="value" type="xsd:string">
592 <xsd:documentation><![CDATA[
593 A short-cut alternative to a nested "<value>...<value/>" element.
594 ]]></xsd:documentation>
600 <xsd:element name="property" type="propertyType">
602 <xsd:documentation><![CDATA[
603 Bean definitions can have zero or more properties.
604 Property elements correspond to JavaBean setter methods exposed
605 by the bean classes. Spring supports primitives, references to other
606 beans in the same or related factories, lists, maps and properties.
607 ]]></xsd:documentation>
611 <xsd:element name="lookup-method">
613 <xsd:documentation><![CDATA[
614 A lookup method causes the IoC container to override the given method
615 and return the bean with the name given in the bean attribute. This is
616 a form of Method Injection. It is particularly useful as an alternative
617 to implementing the BeanFactoryAware interface, in order to be able to
618 make getBean() calls for non-singleton instances at runtime. In this
619 case, Method Injection is a less invasive alternative.
620 ]]></xsd:documentation>
624 <xsd:restriction base="xsd:anyType">
625 <xsd:attribute name="name" type="xsd:string">
627 <xsd:documentation><![CDATA[
628 The name of the lookup method. This method must take no arguments.
629 ]]></xsd:documentation>
632 <xsd:attribute name="bean" type="xsd:string">
634 <xsd:documentation><![CDATA[
635 The name of the bean in the current or ancestor factories that
636 the lookup method should resolve to. Often this bean will be a
637 prototype, in which case the lookup method will return a distinct
638 instance on every invocation. This is useful for single-threaded objects.
639 ]]></xsd:documentation>
643 </xsd:complexContent>
647 <xsd:element name="replaced-method">
649 <xsd:documentation><![CDATA[
650 Similar to the lookup method mechanism, the replaced-method element
651 is used to control IoC container method overriding: Method Injection.
652 This mechanism allows the overriding of a method with arbitrary code.
653 ]]></xsd:documentation>
657 <xsd:choice minOccurs="0" maxOccurs="unbounded">
658 <xsd:element ref="arg-type"/>
661 <xsd:attribute name="name" type="xsd:string">
663 <xsd:documentation><![CDATA[
664 The name of the method whose implementation must be replaced by the
665 IoC container. If this method is not overloaded, there is no need
666 to use arg-type subelements. If this method is overloaded, arg-type
667 subelements must be used for all override definitions for the method.
668 ]]></xsd:documentation>
671 <xsd:attribute name="replacer" type="xsd:string">
673 <xsd:documentation source="java:org.springframework.beans.factory.support.MethodReplacer"><![CDATA[
674 Bean name of an implementation of the MethodReplacer interface in the
675 current or ancestor factories. This may be a singleton or prototype
676 bean. If it is a prototype, a new instance will be used for each
677 method replacement. Singleton usage is the norm.
678 ]]></xsd:documentation>
684 <xsd:element name="arg-type">
686 <xsd:documentation><![CDATA[
687 Identifies an argument for a replaced method in the event of
689 ]]></xsd:documentation>
691 <xsd:complexType mixed="true">
692 <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
693 <xsd:attribute name="match" type="xsd:string">
695 <xsd:documentation><![CDATA[
696 Specification of the type of an overloaded method argument as a String.
697 For convenience, this may be a substring of the FQN. E.g. all the
698 following would match "java.lang.String":
703 As the number of arguments will be checked also, this convenience
704 can often be used to save typing.
705 ]]></xsd:documentation>
711 <xsd:element name="ref">
713 <xsd:documentation><![CDATA[
714 Defines a reference to another bean in this factory or an external
715 factory (parent or included factory).
716 ]]></xsd:documentation>
720 <xsd:restriction base="xsd:anyType">
721 <xsd:attribute name="bean" type="xsd:string">
723 <xsd:documentation><![CDATA[
724 The name of the referenced bean.
725 ]]></xsd:documentation>
728 <xsd:attribute name="local" type="xsd:IDREF">
730 <xsd:documentation><![CDATA[
731 The name of the referenced bean. The value must be a bean ID and thus can
732 be checked by the XML parser. This is therefore the preferred technique
733 for referencing beans within the same bean factory XML file.
734 ]]></xsd:documentation>
737 <xsd:attribute name="parent" type="xsd:string">
739 <xsd:documentation><![CDATA[
740 The name of the referenced bean in a parent factory.
741 ]]></xsd:documentation>
745 </xsd:complexContent>
749 <xsd:element name="idref">
751 <xsd:documentation><![CDATA[
752 The id of another bean in this factory or an external factory
753 (parent or included factory).
754 While a regular 'value' element could instead be used for the
755 same effect, using idref in this case allows validation of local
756 bean ids by the XML parser, and name completion by supporting tools.
757 ]]></xsd:documentation>
761 <xsd:restriction base="xsd:anyType">
762 <xsd:attribute name="bean" type="xsd:string">
764 <xsd:documentation><![CDATA[
765 The name of the referenced bean.
766 ]]></xsd:documentation>
769 <xsd:attribute name="local" type="xsd:IDREF">
771 <xsd:documentation><![CDATA[
772 The name of the referenced bean. The value must be a bean ID and thus can
773 be checked by the XML parser. This is therefore the preferred technique
774 for referencing beans within the same bean factory XML file.
775 ]]></xsd:documentation>
779 </xsd:complexContent>
783 <xsd:element name="value">
785 <xsd:documentation><![CDATA[
786 Contains a string representation of a property value.
787 The property may be a string, or may be converted to the required
788 type using the JavaBeans PropertyEditor machinery. This makes it
789 possible for application developers to write custom PropertyEditor
790 implementations that can convert strings to arbitrary target objects.
792 Note that this is recommended for simple objects only. Configure
793 more complex objects by populating JavaBean properties with
794 references to other beans.
795 ]]></xsd:documentation>
797 <xsd:complexType mixed="true">
798 <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
799 <xsd:attribute name="type" type="xsd:string">
801 <xsd:documentation><![CDATA[
802 The exact type that the value should be converted to. Only needed
803 if the type of the target property or constructor argument is
804 too generic: for example, in case of a collection element.
805 ]]></xsd:documentation>
811 <xsd:element name="null">
813 <xsd:documentation><![CDATA[
814 Denotes a Java null value. Necessary because an empty "value" tag
815 will resolve to an empty String, which will not be resolved to a
816 null value unless a special PropertyEditor does so.
817 ]]></xsd:documentation>
819 <xsd:complexType mixed="true">
820 <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
824 <!-- Collection Elements -->
825 <xsd:group name="collectionElements">
827 <xsd:choice minOccurs="0" maxOccurs="unbounded">
828 <xsd:element ref="bean"/>
829 <xsd:element ref="ref"/>
830 <xsd:element ref="idref"/>
831 <xsd:element ref="value"/>
832 <xsd:element ref="null"/>
833 <xsd:element ref="list"/>
834 <xsd:element ref="set"/>
835 <xsd:element ref="map"/>
836 <xsd:element ref="props"/>
837 <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
842 <xsd:element name="list" type="listOrSetType">
844 <xsd:documentation><![CDATA[
845 A list can contain multiple inner bean, ref, collection, or value elements.
846 A list can also map to an array type; the necessary conversion is performed
848 ]]></xsd:documentation>
852 <xsd:element name="set" type="listOrSetType">
854 <xsd:documentation><![CDATA[
855 A set can contain multiple inner bean, ref, collection, or value elements.
856 ]]></xsd:documentation>
860 <xsd:element name="map" type="mapType">
862 <xsd:documentation><![CDATA[
863 A mapping from a key to an object. Maps may be empty.
864 ]]></xsd:documentation>
868 <xsd:element name="entry" type="entryType">
870 <xsd:documentation><![CDATA[
871 A map entry can be an inner bean, ref, value, or collection.
872 The key of the entry is given by the "key" attribute or child element.
873 ]]></xsd:documentation>
877 <xsd:element name="props" type="propsType">
879 <xsd:documentation><![CDATA[
880 Props elements differ from map elements in that values must be strings.
882 ]]></xsd:documentation>
886 <xsd:element name="key">
888 <xsd:documentation><![CDATA[
889 A key element can contain an inner bean, ref, value, or collection.
890 ]]></xsd:documentation>
893 <xsd:group ref="collectionElements"/>
897 <xsd:element name="prop">
899 <xsd:documentation><![CDATA[
900 The string value of the property. Note that whitespace is trimmed
901 off to avoid unwanted whitespace caused by typical XML formatting.
902 ]]></xsd:documentation>
904 <xsd:complexType mixed="true">
905 <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
906 <xsd:attribute name="key" type="xsd:string" use="required">
908 <xsd:documentation><![CDATA[
909 The key of the property entry.
910 ]]></xsd:documentation>
916 <xsd:complexType name="propertyType">
918 <xsd:element ref="description" minOccurs="0"/>
919 <xsd:choice minOccurs="0" maxOccurs="1">
920 <xsd:element ref="meta"/>
921 <xsd:element ref="bean"/>
922 <xsd:element ref="ref"/>
923 <xsd:element ref="idref"/>
924 <xsd:element ref="value"/>
925 <xsd:element ref="null"/>
926 <xsd:element ref="list"/>
927 <xsd:element ref="set"/>
928 <xsd:element ref="map"/>
929 <xsd:element ref="props"/>
930 <xsd:any namespace="##other" processContents="strict"/>
933 <xsd:attribute name="name" type="xsd:string" use="required">
935 <xsd:documentation><![CDATA[
936 The name of the property, following JavaBean naming conventions.
937 ]]></xsd:documentation>
940 <xsd:attribute name="ref" type="xsd:string">
942 <xsd:documentation><![CDATA[
943 A short-cut alternative to a nested "<ref bean='...'/>".
944 ]]></xsd:documentation>
947 <xsd:attribute name="value" type="xsd:string">
949 <xsd:documentation><![CDATA[
950 A short-cut alternative to a nested "<value>...</value>"
952 ]]></xsd:documentation>
957 <!-- Collection Types -->
959 <!-- base collection type -->
960 <xsd:complexType name="baseCollectionType">
961 <xsd:attribute name="merge" type="defaultable-boolean">
963 <xsd:documentation><![CDATA[
964 Enables/disables merging for collections when using parent/child beans.
965 ]]></xsd:documentation>
970 <!-- base type for collections that have (possibly) typed nested values -->
971 <xsd:complexType name="typedCollectionType">
973 <xsd:extension base="baseCollectionType">
974 <xsd:attribute name="value-type" type="xsd:string">
976 <xsd:documentation source="java:java.lang.Class"><![CDATA[
977 The default Java type for nested values. Must be a fully qualified
979 ]]></xsd:documentation>
983 </xsd:complexContent>
986 <!-- 'list' and 'set' collection type -->
987 <xsd:complexType name="listOrSetType">
989 <xsd:extension base="typedCollectionType">
990 <xsd:group ref="collectionElements"/>
992 </xsd:complexContent>
995 <!-- 'map' element type -->
996 <xsd:complexType name="mapType">
998 <xsd:extension base="typedCollectionType">
1000 <xsd:choice minOccurs="0" maxOccurs="unbounded">
1001 <xsd:element ref="entry"/>
1004 <xsd:attribute name="key-type" type="xsd:string">
1006 <xsd:documentation source="java:java.lang.Class"><![CDATA[
1007 The default Java type for nested entry keys. Must be a fully qualified
1009 ]]></xsd:documentation>
1013 </xsd:complexContent>
1016 <!-- 'entry' element type -->
1017 <xsd:complexType name="entryType">
1019 <xsd:element ref="key" minOccurs="0"/>
1020 <xsd:group ref="collectionElements"/>
1022 <xsd:attribute name="key" type="xsd:string">
1024 <xsd:documentation><![CDATA[
1025 Each map element must specify its key as attribute or as child element.
1026 A key attribute is always a String value.
1027 ]]></xsd:documentation>
1030 <xsd:attribute name="key-ref" type="xsd:string">
1032 <xsd:documentation><![CDATA[
1033 A short-cut alternative to a to a "key" element with a nested
1034 "<ref bean='...'/>".
1035 ]]></xsd:documentation>
1038 <xsd:attribute name="value" type="xsd:string">
1040 <xsd:documentation><![CDATA[
1041 A short-cut alternative to a nested "<value>...</value>"
1043 ]]></xsd:documentation>
1046 <xsd:attribute name="value-ref" type="xsd:string">
1048 <xsd:documentation><![CDATA[
1049 A short-cut alternative to a nested "<ref bean='...'/>".
1050 ]]></xsd:documentation>
1055 <!-- 'props' collection type -->
1056 <xsd:complexType name="propsType">
1057 <xsd:complexContent>
1058 <xsd:extension base="baseCollectionType">
1060 <xsd:choice minOccurs="0" maxOccurs="unbounded">
1061 <xsd:element ref="prop"/>
1065 </xsd:complexContent>
1068 <!-- simple internal types -->
1069 <xsd:simpleType name="defaultable-boolean">
1070 <xsd:restriction base="xsd:NMTOKEN">
1071 <xsd:enumeration value="default"/>
1072 <xsd:enumeration value="true"/>
1073 <xsd:enumeration value="false"/>