"kabir.khan(a)jboss.com" wrote :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=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.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107306#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...