Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » ECore to XSD roundtripping question regarding keys
ECore to XSD roundtripping question regarding keys [message #431175] Wed, 01 July 2009 15:37 Go to next message
Adrian Herscu is currently offline Adrian HerscuFriend
Messages: 33
Registered: July 2009
Member
Hi all,

The following EReference

<eStructuralFeatures xsi:type="ecore:EReference" name="field"
upperBound="-1"
eType="#//Field" containment="true" resolveProxies="false"
eKeys="#//NamedEntity/name">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="field"/>
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>

is exported to XSD as follows:

<xsd:element ecore:keys="name" form="qualified" maxOccurs="unbounded"
minOccurs="0" name="field" type="appmodel:Field"/>

(and correctly imported back to ECore)

OTH, the following EReference

<eStructuralFeatures xsi:type="ecore:EReference" name="field"
lowerBound="1" eType="#//Reference"
eKeys="#//NamedEntity/name">
<eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="field"/>
</eAnnotations>
</eStructuralFeatures>

is exported to XSD as:

<xsd:attribute ecore:reference="appmodel:Reference" name="field"
type="xsd:anyURI" use="required"/>

loosing the key information :(
(the only difference between the two is the multiplicity)

Anything to look for?

Adrian.
Re: ECore to XSD roundtripping question regarding keys [message #431178 is a reply to message #431175] Wed, 01 July 2009 17:06 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Adrian,

Looks like an oversight. Perhaps only supporting it for elements or
only for containment references. Please open a bugzilla.


Adrian Herscu wrote:
> Hi all,
>
> The following EReference
>
> <eStructuralFeatures xsi:type="ecore:EReference" name="field"
> upperBound="-1"
> eType="#//Field" containment="true" resolveProxies="false"
> eKeys="#//NamedEntity/name">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="field"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
>
> is exported to XSD as follows:
>
> <xsd:element ecore:keys="name" form="qualified" maxOccurs="unbounded"
> minOccurs="0" name="field" type="appmodel:Field"/>
>
> (and correctly imported back to ECore)
>
> OTH, the following EReference
>
> <eStructuralFeatures xsi:type="ecore:EReference" name="field"
> lowerBound="1" eType="#//Reference"
> eKeys="#//NamedEntity/name">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="field"/>
> </eAnnotations>
> </eStructuralFeatures>
>
> is exported to XSD as:
>
> <xsd:attribute ecore:reference="appmodel:Reference" name="field"
> type="xsd:anyURI" use="required"/>
>
> loosing the key information :(
> (the only difference between the two is the multiplicity)
>
> Anything to look for?
>
> Adrian.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: ECore to XSD roundtripping question regarding keys [message #431183 is a reply to message #431178] Wed, 01 July 2009 18:14 Go to previous message
Adrian Herscu is currently offline Adrian HerscuFriend
Messages: 4
Registered: July 2009
Junior Member
Done.
https://bugs.eclipse.org/282191

Ed Merks wrote:
> Adrian,
>
> Looks like an oversight. Perhaps only supporting it for elements or
> only for containment references. Please open a bugzilla.
>
>
> Adrian Herscu wrote:
>> Hi all,
>>
>> The following EReference
>>
>> <eStructuralFeatures xsi:type="ecore:EReference" name="field"
>> upperBound="-1"
>> eType="#//Field" containment="true" resolveProxies="false"
>> eKeys="#//NamedEntity/name">
>> <eAnnotations
>> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
>> <details key="kind" value="element"/>
>> <details key="name" value="field"/>
>> <details key="namespace" value="##targetNamespace"/>
>> </eAnnotations>
>> </eStructuralFeatures>
>>
>> is exported to XSD as follows:
>>
>> <xsd:element ecore:keys="name" form="qualified" maxOccurs="unbounded"
>> minOccurs="0" name="field" type="appmodel:Field"/>
>>
>> (and correctly imported back to ECore)
>>
>> OTH, the following EReference
>>
>> <eStructuralFeatures xsi:type="ecore:EReference" name="field"
>> lowerBound="1" eType="#//Reference"
>> eKeys="#//NamedEntity/name">
>> <eAnnotations
>> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
>> <details key="kind" value="attribute"/>
>> <details key="name" value="field"/>
>> </eAnnotations>
>> </eStructuralFeatures>
>>
>> is exported to XSD as:
>>
>> <xsd:attribute ecore:reference="appmodel:Reference" name="field"
>> type="xsd:anyURI" use="required"/>
>>
>> loosing the key information :(
>> (the only difference between the two is the multiplicity)
>>
>> Anything to look for?
>>
>> Adrian.
Previous Topic:Use ECore to model XSD and IDL
Next Topic:Teneo 1.0.4/Teneo 1.1.1 Maintenance Builds, Hibernate version, xsd:any/xsd:anytype
Goto Forum:
  


Current Time: Thu Apr 25 19:23:51 GMT 2024

Powered by FUDForum. Page generated in 0.03426 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top