Hi,
I've updated the dataservices configuration schema with the changes
required to eliminate the reported two issues. But I was confronted with
another issue as EMF model generation wizard does not seem to generate the
required mappings properly against simple elements defined in the schema.
IMO, this could be an issue in the EMF model generation process. Kalpa is
currently working on communicating this to the EMF mailing lists to get it
further clarified.
However, we could get rid of this by adding simpleType definitions to each
of the simpleElements. [1] also provides some insights into this and
recommends that particular approach. IMO, this wouldn't do any harm to the
existing definitions as the recommended approach is just another
representation of the same element. Just thought of getting some feedback
on it before we further proceed.
The original element definition and the modified element definition (to get
it to work with EMF model generation) are listed below.
Original Element
==============
<xs:element name="description" type="xs:string" maxOccurs="1"
minOccurs="0"/>
Modified element
===============
<xs:element name="description" maxOccurs="1" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
[1]
http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchemaToEcoreMapping.pdf
Regards,
Prabath
On Wed, Dec 21, 2011 at 1:07 PM, Prabath Abeysekera <[email protected]>wrote:
> Hi Kalpa,
>
> We'll have a look.
>
> On Wed, Dec 21, 2011 at 12:41 PM, Kalpa Senanayake <[email protected]> wrote:
>
>> Hi All,
>>
>> While trying to generate the EMF model for the updated .dbs schema
>> following things were found.
>>
>> 1. <xs:element name="call-query"> appear in
>> <result>,<operation>,<resource> tag definitions with the same definition
>> while previous schema clearly define
>> it separately and referenced on relevant positions well.
>>
>> Problem :- When generating ecore model it defines CallQueryType1 ,
>> CallQueryType2 ext..
>>
>> 2. In most of the cases content based restrictions are not there
>> for an example In previous schema
>>
>> <xs:element
>> name="property" maxOccurs="unbounded" minOccurs="1">
>> <xs:complexType ecore:name="ConfigurationProperty">
>> <xs:simpleContent>
>> <xs:extension base="xs:string">
>> <xs:attribute name="name" type="xs:string" use="required" />
>> </xs:extension>
>> <xs:simpleContent>
>> </xs:complexType>
>> </xs:element>
>>
>> but in updated schema
>>
>> <xs:element name="property"
>> maxOccurs="unbounded" minOccurs="1" />
>>
>> Problem :- In the ecore model, the class reffered to those
>> configurations are not defined with data types with true meaning. Because
>> of not well defined content types
>> EMF defines "AnySimpleType" but it is not acceptable
>> when we are in the EMF context.
>>
>> Please have a look.
>>
>> Thanks,
>> Kalpa.
>>
>
>
>
> --
> Prabath Abeysekara
> Software Engineer
> WSO2 Inc.
> Email: [email protected] <[email protected]>
> Mobile: +94774171471
>
> <http://harshana05.blogspot.com/>
>
>
--
Prabath Abeysekara
Software Engineer
WSO2 Inc.
Email: [email protected] <[email protected]>
Mobile: +94774171471
<http://harshana05.blogspot.com/>
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev