|
Re: Graphical Editor from DTD: How to handle CDATA references? [message #498589 is a reply to message #498444] |
Tue, 17 November 2009 15:35 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------030305030508020604080208
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Matthias,
This isn't really a GMF question. What XSD type are these attributes.
They need to be xsd:anyURI or xsd:IDREF to become EReferences in Ecore,
and you'd need to use ecore:* annotations to make that happen.
XML Schema to Ecore Mapping
< http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf>
Matthias Schmeling wrote:
> Hi,
>
> I have converted a DTD to XSD using the trang tool. Then I tried to
> generate a graphical editor using GMF. I am now facing the problem
> that I do not know what to do with the CDATA attributes. One example:
> When Mapping a class in the ecore model to a link with a link mapping,
> the mapping needs a source and a target reference from the ecore
> model. However, having generated the ecore from a DTD (where all those
> references are just CDATA attributes), these references do not
> reference node elements but are attributes of the type 'AnySimpleType'.
>
> I could just change these to be references of the needed types, but I
> need my saved files to have the same format as specified by the DTD
> file. I thought of implementing an option to transform the saved file
> to the DTD format with an XSLT, but nonetheless I wanted to ask if
> there is a better way to handle this.
>
> Regards,
> Matthias
--------------030305030508020604080208
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Matthias,<br>
<br>
This isn't really a GMF question. What XSD type are these attributes.
They need to be xsd:anyURI or xsd:IDREF to become EReferences in Ecore,
and you'd need to use ecore:* annotations to make that happen.<br>
<blockquote><a
href=" http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf">XML
Schema to Ecore Mapping</a><br>
</blockquote>
<br>
Matthias Schmeling wrote:
<blockquote cite="mid:hdsmjf$egl$1@build.eclipse.org" type="cite">Hi,
<br>
<br>
I have converted a DTD to XSD using the trang tool. Then I tried to
generate a graphical editor using GMF. I am now facing the problem that
I do not know what to do with the CDATA attributes. One example: When
Mapping a class in the ecore model to a link with a link mapping, the
mapping needs a source and a target reference from the ecore model.
However, having generated the ecore from a DTD (where all those
references are just CDATA attributes), these references do not
reference node elements but are attributes of the type 'AnySimpleType'.
<br>
<br>
I could just change these to be references of the needed types, but I
need my saved files to have the same format as specified by the DTD
file. I thought of implementing an option to transform the saved file
to the DTD format with an XSLT, but nonetheless I wanted to ask if
there is a better way to handle this.
<br>
<br>
Regards,
<br>
Matthias
<br>
</blockquote>
</body>
</html>
--------------030305030508020604080208--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Graphical Editor from DTD: How to handle CDATA references? [message #498657 is a reply to message #498589] |
Tue, 17 November 2009 22:13 |
No real name Messages: 62 Registered: July 2009 |
Member |
|
|
Hi Ed,
thanks for the reply and for the link. That PDF's very useful :)
Regards,
Matthias
Ed Merks wrote:
> Matthias,
>
> This isn't really a GMF question. What XSD type are these attributes.
> They need to be xsd:anyURI or xsd:IDREF to become EReferences in Ecore,
> and you'd need to use ecore:* annotations to make that happen.
>
> XML Schema to Ecore Mapping
> < http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf>
>
>
> Matthias Schmeling wrote:
>> Hi,
>>
>> I have converted a DTD to XSD using the trang tool. Then I tried to
>> generate a graphical editor using GMF. I am now facing the problem
>> that I do not know what to do with the CDATA attributes. One example:
>> When Mapping a class in the ecore model to a link with a link mapping,
>> the mapping needs a source and a target reference from the ecore
>> model. However, having generated the ecore from a DTD (where all those
>> references are just CDATA attributes), these references do not
>> reference node elements but are attributes of the type 'AnySimpleType'.
>>
>> I could just change these to be references of the needed types, but I
>> need my saved files to have the same format as specified by the DTD
>> file. I thought of implementing an option to transform the saved file
>> to the DTD format with an XSLT, but nonetheless I wanted to ask if
>> there is a better way to handle this.
>>
>> Regards,
>> Matthias
|
|
|
Powered by
FUDForum. Page generated in 0.03758 seconds