Skip to main content



      Home
Home » Modeling » EMF » xsdecorebuilder : how to recognise an xsd:element simpletype from an xsd:attribute
xsdecorebuilder : how to recognise an xsd:element simpletype from an xsd:attribute [message #1368773] Tue, 20 May 2014 05:13 Go to next message
Eclipse UserFriend
Hello,
I am using xsdecorebuilder to dynamically create an ecore model from my xsd.

while visiting the ecore, i need to recognise whether an EAttribute is corresponding to an xsd:element (simple type) or and xsd:attribute. I clearly saw in the EAnnotation that there is an entry "kind" = "element or attribute" but i wonder whether there is another possibility than looking in the EAnnotation

Thank you in advance
Philippe
Re: xsdecorebuilder : how to recognise an xsd:element simpletype from an xsd:attribute [message #1368967 is a reply to message #1368773] Tue, 20 May 2014 07:03 Go to previous messageGo to next message
Eclipse UserFriend
On 20/05/2014 11:13 AM, Philippe Favrais wrote:
> Hello,
> I am using xsdecorebuilder to dynamically create an ecore model from
> my xsd.
>
> while visiting the ecore, i need to recognise whether an EAttribute is
> corresponding to an xsd:element (simple type) or and xsd:attribute. I
> clearly saw in the EAnnotation that there is an entry "kind" =
> "element or attribute" but i wonder whether there is another
> possibility than looking in the EAnnotation
You can use ExtendedMetaData.INSTANCE to "query" the annotations; in
this case using
org.eclipse.emf.ecore.util.ExtendedMetaData.getFeatureKind(EStructuralFeature).
>
> Thank you in advance
> Philippe
Re: xsdecorebuilder : how to recognise an xsd:element simpletype from an xsd:attribute [message #1373408 is a reply to message #1368967] Thu, 22 May 2014 02:41 Go to previous message
Eclipse UserFriend
thank you Ed, indeed it helps a lot.
Previous Topic:[ChangeRecoder] Problem with beginRecording() after endRecording() was called
Next Topic:URI#createFileURI() does not add the file scheme Windows?!
Goto Forum:
  


Current Time: Sun Jul 27 08:17:24 EDT 2025

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

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

Back to the top