|
|
|
Re: How to model in XSD? [message #55735 is a reply to message #55706] |
Tue, 26 September 2006 12:07 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------000605080806030505000705
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Gaff,
I can't really answer questions about how you should model something
(since I don't really know what goal you are trying to achieve and don't
have the time). Typically its a good idea to define a global element for
anything you wish to serialize at the root of a document. If you
already know the model you want, but don't know how to write it as a
schema, you might want to try creating the Ecore model directly,
creating a GenModel for it, and then exporting the corresponding
schema. This demo might help:
http://adobedev.breezecentral.com/p17835008/
You should try to ask more specific questions because open ended ones
that require a long story are much less likely to get the kind of
information you are looking for...
Gaff wrote:
> Cheers, the XML Schema to Ecore Mapping is good for the syntax but not
> sure it really explains what needs to be in the file. Like, do I need
> to have an abstract definition first that contains all other figures?
> Do I need to state which is the diagram root element in the xsd file?
>
> Is this kind of stuff explained anywhere?
>
> To start with i'm just trying to get a node worknig by itself, the xsd
> is below, I've tried getting an editor working with it and get as far
> as ECore to GMFGraph, Diagram root element, as all the code is
> generated from my model there must be something wrong with it:
>
> (BTW, thanks for your hwelp ED)
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema xmlns:mindmap="http://www.example.org/mindmap"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
>
>
>
> <xsd:complexType name="DiaSeg">
> <xsd:sequence>
> <xsd:element maxOccurs="unbounded" minOccurs="0" name="intro"
> type="xsd:string"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0"
> name="transcript" type="xsd:string"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" name="outro"
> type="xsd:string"/>
> </xsd:sequence>
> <xsd:attribute name="alittlebit" type="xsd:string"/>
> </xsd:complexType>
> </xsd:schema>
>
--------------000605080806030505000705
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Gaff,<br>
<br>
I can't really answer questions about how you should model something
(since I don't really know what goal you are trying to achieve and
don't have the time). Typically its a good idea to define a global
element for anything you wish to serialize at the root of a document.
|
|
|
Powered by
FUDForum. Page generated in 0.04073 seconds