You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Frank Budinsky (JIRA)" <tu...@ws.apache.org> on 2006/07/06 04:08:31 UTC

[jira] Resolved: (TUSCANY-518) Mapping Complex Type XSD that allows mixed content (mixed=true)

     [ http://issues.apache.org/jira/browse/TUSCANY-518?page=all ]
     
Frank Budinsky resolved TUSCANY-518:
------------------------------------

    Resolution: Duplicate

See TUSCANY-521

> Mapping Complex Type XSD that allows mixed content (mixed=true)
> ---------------------------------------------------------------
>
>          Key: TUSCANY-518
>          URL: http://issues.apache.org/jira/browse/TUSCANY-518
>      Project: Tuscany
>         Type: Sub-task

>   Components: Java SDO Tools
>     Versions: Java-Mx
>     Reporter: Venkatakrishnan

>
> 1.  The generated SDO Type ends up with a property named 'mixed', whereas the attributed 'mixed=true' is only to be interpretted to set the 'sequenced=true' for the SDO and not to be 'tranlated' into a property of the SDO.  
> Workaround :  When mapping the SDO to XSD, we could skip properties with name as 'mixed' or skip if the property's data type is a EFeatureMapEntry.  In the first case we might run into problems if there was actually a property named 'mixed' ( for example an element named 'mixed' in the xsd from which the SDOs were generated in the first place).  In the second case we will be have to go one level down  to Meta Modeling Facility over which the SDOs are implemented i.e EMF and in my opinion the SDO-XSD converter will go for a toss if we decide to change it is modeled over EMF.
> 2.  According to the specs (starting from Pg 107 onwards) if isSequenced is true for an SDO, then it is to be interpretted as complex type xsd that allows mixed content and the properties of the SDO are to be placed as content inside a repeating choice i.e. <xsd:choice maxOccurs="unbounded"> within this complex type.  Hence it ends up that the following two definitions are equivalent...
> <xsd:sequence>
> 			<xsd:element name="symbol" type="xsd:string" />
> 			<xsd:element name="companyName" type="xsd:string" />
> 			<xsd:element name="price" type="xsd:decimal" />
> 			<xsd:element name="open1" type="xsd:decimal" />
> 			<xsd:element name="high" type="xsd:decimal" />
> 			<xsd:element name="low" type="xsd:decimal" />
> 			<xsd:element name="volume" type="xsd:double" />
> 			<xsd:element name="change1" type="xsd:double" />
> 			<xsd:element maxOccurs="unbounded" minOccurs="0"
> 				name="quotes" type="seq:MixedQuote" />
> </xsd:sequence>
> <xsd:choice maxOccurs="unbounded" >
> 			<xsd:element name="symbol" type="xsd:string" />
> 			<xsd:element name="companyName" type="xsd:string" />
> 			<xsd:element name="price" type="xsd:decimal" />
> 			<xsd:element name="open1" type="xsd:decimal" />
> 			<xsd:element name="high" type="xsd:decimal" />
> 			<xsd:element name="low" type="xsd:decimal" />
> 			<xsd:element name="volume" type="xsd:double" />
> 			<xsd:element name="change1" type="xsd:double" />
> 			<xsd:element maxOccurs="unbounded" minOccurs="0"
> 				name="quotes" type="seq:MixedQuote" />
> </xsd:choice>

-- 
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