Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Modeling (top-level project) » Beginners trouble with modeling.
Beginners trouble with modeling. [message #378363] Mon, 25 September 2006 15:42 Go to next message
Conor Missing name is currently offline Conor Missing nameFriend
Messages: 159
Registered: July 2009
Senior Member
Hey,

I'm having trouble with building a model for gmf in a xsd file.

I want to start off with a very simple model that contains only one type
of element that can then be associated with other elements (a directed
association) of the same type. The element will have some attributes (or
should these be elements?) as well but it's doing the association I don't
understand.

What I want to model is a simple dialogue that is divided into segments.
Each node to be a segment in a graph structure.

So something like:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
targetNamespace="http://www.example.org/dialoguegraph"
xmlns:dialoguegraph="http://www.example.org/dialoguegraph"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
<xsd:complexType name="DialogueSegment">
<xsd:attribute name="intro_text" type="xsd:string"/> //set to max of one
<xsd:attribute name="transcript" type="xsd:string"/> //set to max of one
<xsd:attribute name="outro_text" type="xsd:string"/> //0..*
</xsd:complexType>

//set the relatonship between nodes?????

</xsd:schema>
Re: Beginners trouble with modeling. [message #378364 is a reply to message #378363] Mon, 25 September 2006 15:48 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Gaff,

I see you asked the same question on the GMF newsgroup, which is better
than posting to this more general newsgroup. When posting the same
question to multiple newsgroup, please using a single posting to all so
that an answer on one will appear on all (to reduce the workload of
answering the same question multiple times).


Gaff wrote:

> Hey,
>
> I'm having trouble with building a model for gmf in a xsd file.
>
> I want to start off with a very simple model that contains only one
> type of element that can then be associated with other elements (a
> directed association) of the same type. The element will have some
> attributes (or should these be elements?) as well but it's doing the
> association I don't understand.
>
> What I want to model is a simple dialogue that is divided into
> segments. Each node to be a segment in a graph structure.
>
> So something like:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema targetNamespace="http://www.example.org/dialoguegraph"
> xmlns:dialoguegraph="http://www.example.org/dialoguegraph"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
> <xsd:complexType name="DialogueSegment">
> <xsd:attribute name="intro_text" type="xsd:string"/> //set to max of one
> <xsd:attribute name="transcript" type="xsd:string"/> //set to max of one
> <xsd:attribute name="outro_text" type="xsd:string"/> //0..*
> </xsd:complexType>
>
> //set the relatonship between nodes?????
>
> </xsd:schema>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Beginners trouble with modeling. [message #582201 is a reply to message #378363] Mon, 25 September 2006 15:48 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Gaff,

I see you asked the same question on the GMF newsgroup, which is better
than posting to this more general newsgroup. When posting the same
question to multiple newsgroup, please using a single posting to all so
that an answer on one will appear on all (to reduce the workload of
answering the same question multiple times).


Gaff wrote:

> Hey,
>
> I'm having trouble with building a model for gmf in a xsd file.
>
> I want to start off with a very simple model that contains only one
> type of element that can then be associated with other elements (a
> directed association) of the same type. The element will have some
> attributes (or should these be elements?) as well but it's doing the
> association I don't understand.
>
> What I want to model is a simple dialogue that is divided into
> segments. Each node to be a segment in a graph structure.
>
> So something like:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema targetNamespace="http://www.example.org/dialoguegraph"
> xmlns:dialoguegraph="http://www.example.org/dialoguegraph"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
> <xsd:complexType name="DialogueSegment">
> <xsd:attribute name="intro_text" type="xsd:string"/> //set to max of one
> <xsd:attribute name="transcript" type="xsd:string"/> //set to max of one
> <xsd:attribute name="outro_text" type="xsd:string"/> //0..*
> </xsd:complexType>
>
> //set the relatonship between nodes?????
>
> </xsd:schema>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Beginners trouble with modeling.
Next Topic:Improved Documentation for EMF & related modeling projects
Goto Forum:
  


Current Time: Thu Apr 25 09:32:22 GMT 2024

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

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

Back to the top