In sca-core.xsd, component should not contain property type definition elements
-------------------------------------------------------------------------------
Key: TUSCANY-637
URL: http://issues.apache.org/jira/browse/TUSCANY-637
Project: Tuscany
Issue Type: Bug
Components: Specification
Affects Versions: Cpp-current
Reporter: Jean-Sebastien Delfino
Assigned To: Jean-Sebastien Delfino
Sca-core.xsd defines a single complexType for two very different things:
- the definition of a property type (in a Type definition, i.e. a component
type or a composite, which I view like a partial definition of a concrete type)
- the configuration of a property on a component (an instance of a type)
As far as I know we're not supporting the definition of property types on
instances yet, some programming languages do that and it's useful but we don't
support this on components yet :) so Component should define its <property>
element differently. We should have two different types:
- PropertyType - representing the definition of a property type
- Property - representing the configuration of a property on a component
I will bring this issue to the OSOA spec workgroup.
Here's what I propose:
<complexType name="PropertyType">
<complexContent>
<extension base="anyType">
<attribute name="name" type="NCName" use="required" />
<attribute name="type" type="QName" use="required" />
<attribute name="many" type="boolean" default="false"
use="optional" />
<attribute name="override" type="sca:OverrideOptions"
default="may" use="optional" />
<anyAttribute namespace="##any" processContents="lax" />
</extension>
</complexContent>
</complexType>
<complexType name="Property">
<complexContent>
<extension base="anyType">
<attribute name="name" type="NCName" use="required" />
<attribute name="source" type="string" use="optional" />
<anyAttribute namespace="##any" processContents="lax" />
</extension>
</complexContent>
</complexType>
Note: I also propose to change the definition of PropertyType and Property to
extend anyType instead of containing an <xsd:any>. The way the 0.95 XSD is
defined you cannot assign a simple value to a property or define a simple
default value on a property... for example the following SCDL will cause an
XMLSchema validation error complaining that property can only contain "element
only" content:
<property name="currency" type="xs:string">USD</property>
I'm not an XSD expert so maybe there's a better - simpler? :) way to support
this very simple case than extending anyType... but this definitely needs to be
fixed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]