You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org> on 2006/08/16 20:02:16 UTC
[jira] Created: (TUSCANY-637) In sca-core.xsd, component should not
contain property type definition elements
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
[jira] Updated: (TUSCANY-637) In sca-core.xsd, component should not
contain property type definition elements
Posted by "ant elder (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-637?page=all ]
ant elder updated TUSCANY-637:
------------------------------
Fix Version/s: Cpp-current
> 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
> Fix For: Cpp-current
>
>
> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
[jira] Resolved: (TUSCANY-637) In sca-core.xsd, component should
not contain property type definition elements
Posted by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org>.
[ https://issues.apache.org/jira/browse/TUSCANY-637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jean-Sebastien Delfino resolved TUSCANY-637.
--------------------------------------------
Resolution: Fixed
This was resolved by SCA spec issue #126.
Here are the detailed XSD changes:
<!-- complex type for sca:property declaration -->
<complexType name="Property" mixed="true">
<extension base="PropertyValueBase">
<!-- extension defines the place to hold default value -->
<attribute name="name" type="NCName" use="required"/>
<attribute name="type" type="QName" use="optional"/>
<attribute name="element" type="QName" use="optional"/>
<attribute name="many" type="boolean" default="false" use="optional"/>
<attribute name="required" type="boolean" default="false" use="optional"/>
<anyAttribute namespace="##any" processContents="lax"/>
<!-- an extension point ; attribute-based only -->
</extension>
</complexType>
<complexType name="PropertyValueBase" mixed="true">
<!-- mixed="true" to handle simple type -->
<sequence>
<any namespace="##any" processContents="lax" minOccurs="0"
maxOccurs="1"/>
<!-- NOT an extension point ;
This xsd:any exists to accept the element-based or complex
type property
i.e. no element-based extension point under "sca:property"
-->
</sequence>
</complexType>
<complexType name="PropertyValue" mixed="true">
<complexContent>
<extension base="PropertyValueBase">
<attribute name="name" type="NCName" use="required"/>
<attribute name="source" type="string" use="optional"/>
<attribute name="file" type="xs:anyURI" use="optional"/>
<anyAttribute namespace="##any" processContents="lax"/>
<!-- an extension point ; attribute-based only -->
</extension>
<complexContent>
</complexType>
<complexType name="Component">
<sequence>
<element ref="sca:implementation" minOccurs="0"/>
<choice minOccurs="0" maxOccurs="unbounded">
<element name="reference" type="sca:ReferenceValue"/>
<element name="property" type="sca:PropertyValue" />
</choice>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="name" type="NCName" use="required"/>
<anyAttribute namespace="##any" processContents="lax"/>
</complexType>
> In sca-core.xsd, component should not contain property type definition elements
> -------------------------------------------------------------------------------
>
> Key: TUSCANY-637
> URL: https://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
> Fix For: Cpp-M3
>
>
> 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: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org