[Beeframework-svn] SF.net SVN: beeframework:[233] trunk
Brought to you by:
b_hartmann,
m_plomer
From: <m_p...@us...> - 2014-09-26 14:04:24
|
Revision: 233 http://sourceforge.net/p/beeframework/code/233 Author: m_plomer Date: 2014-09-26 14:04:16 +0000 (Fri, 26 Sep 2014) Log Message: ----------- Context/Xml: added ability to decorate custom namespace beans with custom decorators - namespace fixes Modified Paths: -------------- trunk/framework/bee-beans-1.2.xsd trunk/framework/bee-util-1.0.xsd trunk/tests/Bee/Context/Xml/BeanDefinitionReaderTest-context.xml Modified: trunk/framework/bee-beans-1.2.xsd =================================================================== --- trunk/framework/bee-beans-1.2.xsd 2014-09-26 13:11:26 UTC (rev 232) +++ trunk/framework/bee-beans-1.2.xsd 2014-09-26 14:04:16 UTC (rev 233) @@ -325,6 +325,21 @@ </xsd:attribute> </xsd:attributeGroup> + <xsd:attributeGroup name="typedValueAttributes"> + <xsd:attribute name="value" type="xsd:string"> + <xsd:annotation> + <xsd:documentation> + <![CDATA[A short-cut alternative to a nested "<value>...</value>" element.]]></xsd:documentation> + </xsd:annotation> + </xsd:attribute> + <xsd:attribute name="type" type="xsd:string"> + <xsd:annotation> + <xsd:documentation><![CDATA[The type that the value attribute should be validated against and converted + to.]]></xsd:documentation> + </xsd:annotation> + </xsd:attribute> + </xsd:attributeGroup> + <xsd:element name="bean"> <xsd:annotation> <xsd:documentation source="java:org.springframework.beans.factory.config.BeanDefinition"><![CDATA[ @@ -670,12 +685,7 @@ <![CDATA[A short-cut alternative to a nested "<ref bean='...'/>".]]></xsd:documentation> </xsd:annotation> </xsd:attribute> - <xsd:attribute name="value" type="xsd:string"> - <xsd:annotation> - <xsd:documentation> - <![CDATA[A short-cut alternative to a nested "<value>...</value>" element.]]></xsd:documentation> - </xsd:annotation> - </xsd:attribute> + <xsd:attributeGroup ref="typedValueAttributes"/> </xsd:complexType> Modified: trunk/framework/bee-util-1.0.xsd =================================================================== --- trunk/framework/bee-util-1.0.xsd 2014-09-26 13:11:26 UTC (rev 232) +++ trunk/framework/bee-util-1.0.xsd 2014-09-26 14:04:16 UTC (rev 233) @@ -1,19 +1,20 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <xsd:schema xmlns="http://www.beeframework.org/schema/util" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:beans="http://www.beeframework.org/schema/beans" - targetNamespace="http://www.beeframework.org/schema/util" - elementFormDefault="qualified" - attributeFormDefault="unqualified"> + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:beans="http://www.beeframework.org/schema/beans" + targetNamespace="http://www.beeframework.org/schema/util" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> - <xsd:import namespace="http://www.beeframework.org/schema/beans" schemaLocation="http://www.beeframework.org/schema/beans/bee-beans-1.2.xsd"/> + <xsd:import namespace="http://www.beeframework.org/schema/beans" + schemaLocation="http://www.beeframework.org/schema/beans/bee-beans-1.2.xsd"/> - <xsd:annotation> - <xsd:documentation><![CDATA[ + <xsd:annotation> + <xsd:documentation><![CDATA[ Defines the configuration elements for misc context utilities. ]]></xsd:documentation> - </xsd:annotation> + </xsd:annotation> <xsd:element name="array"> <xsd:annotation> @@ -24,7 +25,7 @@ <xsd:complexType> <xsd:complexContent> <xsd:extension base="beans:identifiedType"> - <xsd:group ref="beans:arrayElements" /> + <xsd:group ref="beans:arrayElements"/> <xsd:attributeGroup ref="beans:commonBeanAttributes"/> <xsd:attributeGroup ref="beans:collectionBeanAttributes"/> </xsd:extension> @@ -34,18 +35,19 @@ <xsd:element name="value"> <xsd:annotation> - <xsd:documentation><![CDATA[ - Conveniently defines an array factory bean - ]]></xsd:documentation> + <xsd:documentation><![CDATA[Conveniently defines a value factory bean]]></xsd:documentation> </xsd:annotation> - <xsd:complexType mixed="true"> - <xsd:choice minOccurs="0" maxOccurs="unbounded"/> - <xsd:attribute name="type" type="xsd:string"> - <xsd:annotation> - <xsd:documentation><![CDATA[The type that the value attribute should be validated against and converted - to.]]></xsd:documentation> - </xsd:annotation> - </xsd:attribute> + <xsd:complexType> + <xsd:complexContent> + <xsd:extension base="beans:identifiedType"> + <xsd:sequence> + <xsd:element ref="beans:null" minOccurs="0" maxOccurs="1"/> + <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attributeGroup ref="beans:typedValueAttributes"/> + <xsd:attributeGroup ref="beans:commonBeanAttributes"/> + </xsd:extension> + </xsd:complexContent> </xsd:complexType> </xsd:element> Modified: trunk/tests/Bee/Context/Xml/BeanDefinitionReaderTest-context.xml =================================================================== --- trunk/tests/Bee/Context/Xml/BeanDefinitionReaderTest-context.xml 2014-09-26 13:11:26 UTC (rev 232) +++ trunk/tests/Bee/Context/Xml/BeanDefinitionReaderTest-context.xml 2014-09-26 14:04:16 UTC (rev 233) @@ -44,4 +44,6 @@ <assoc-item key="a" value="Zulu" /> </util:array> + <util:value type="int" id="tt" value="15"> + </util:value> </beans> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |