Beginners trouble with modeling. [message #378363] |
Mon, 25 September 2006 11:42  |
Eclipse User |
|
|
|
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 11:48  |
Eclipse User |
|
|
|
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>
>
|
|
|
Re: Beginners trouble with modeling. [message #582201 is a reply to message #378363] |
Mon, 25 September 2006 11:48  |
Eclipse User |
|
|
|
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>
>
|
|
|
Powered by
FUDForum. Page generated in 0.24100 seconds