This content has been marked as final.
Show 2 replies
-
1. Re: Changing beanfactoryType class attribute
adrian.brock Nov 23, 2007 6:43 AM (in response to kabirkhan)"kabir.khan@jboss.com" wrote:
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107156#4107156
Following from this I need to change the class attribute of beanfactoryType to be optional<xsd:complexType name="beanfactoryType"> <xsd:annotation> <xsd:documentation> </xsd:documentation> </xsd:annotation> <xsd:sequence> <xsd:element name="alias" type="aliasType" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="classloader" type="classloaderType" minOccurs="0"/> <xsd:element name="constructor" type="constructorType" minOccurs="0"/> <xsd:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="create" type="lifecycleType" minOccurs="0"/> <xsd:element name="start" type="lifecycleType" minOccurs="0"/> <xsd:element name="depends" type="dependsType" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="demand" type="demandType" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="supply" type="supplyType" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="install" type="installType" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="uninstall" type="installType" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="optional"/> <!-- <xsd:attribute name="class" type="xsd:token" use="required"/> --> <xsd:attribute name="class" type="xsd:token" use="optional"/> </xsd:complexType>
I think it makes sense for aspect to be an extension of beanFactory so that we get all all the property, start, stop etc. stuff for free rather than having to redefince all that stuff?
Objections?
Don't do that. Create an abstractBeanFactoryType
then extend in two different ways in the different schemas:<xsd:complexType name="abstract-BeanfactoryType"> ... </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="optional"/> <!-- NO class here --> </xsd:complexType> <complexType name="beanFactoryType"> <complexContent> <extension base="abstract-BeanFactoryType"> </extension> <xsd:attribute name="class" type="xsd:token" use="required"/> </complexContent> </complexType>
You can then choose not to have the class attribute at all in your type. -
2. Re: Changing beanfactoryType class attribute
kabirkhan Nov 23, 2007 7:35 AM (in response to kabirkhan)Thanks for the suggestion, this has been done