Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » ExtendedMetaData and <!DOCTYPE
ExtendedMetaData and <!DOCTYPE [message #482058] Tue, 25 August 2009 09:59 Go to next message
Mark Hoffmann is currently offline Mark HoffmannFriend
Messages: 113
Registered: July 2009
Location: Jena
Senior Member
Hi,

I already posted last week how to customize the serialization of my
ecore model. I use the ExtendedMetaData for this and it works very well
now.

Now I would like to add:
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"../docbook-xml-4.5/docbookx.dtd"> to my de/serialization.

But I don't have any idea how to do it using ExtendedMetaData. I've seen
how to do this with code, but not with ExtendedMetaData.

I think i have to add a reference or attribute to my DocumentRoot and
add some ExtendedMetaData for the DOCTYPE, systemId, publicId? Or do I
have to use other annotations?

Thank you in advance,
Mark
Re: ExtendedMetaData and <!DOCTYPE [message #482071 is a reply to message #482058] Tue, 25 August 2009 10:25 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090204000502090806010908
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Mark,

It seems best to use XMLResource's setDoctypeInfo in your resource factory:

/**
* Sets the values of <a
href=' http://www.w3.org/TR/2004/REC-xml-20040204/#NT-SystemLiteral'>system</a>
and
* <a
href='http://www.w3.org/TR/2004/REC-xml-20040204/#NT-PubidLiteral'>public</a>
identifiers on this resource.
* @param publicId
* @param systemId
*/
void setDoctypeInfo(String publicId, String systemId);



Mark Hoffmann wrote:
> Hi,
>
> I already posted last week how to customize the serialization of my
> ecore model. I use the ExtendedMetaData for this and it works very well
> now.
>
> Now I would like to add:
> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
> "../docbook-xml-4.5/docbookx.dtd"> to my de/serialization.
>
> But I don't have any idea how to do it using ExtendedMetaData. I've seen
> how to do this with code, but not with ExtendedMetaData.
>
> I think i have to add a reference or attribute to my DocumentRoot and
> add some ExtendedMetaData for the DOCTYPE, systemId, publicId? Or do I
> have to use other annotations?
>
> Thank you in advance,
> Mark
>

--------------090204000502090806010908
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">
Mark,<br>
<br>
It seems best to use XMLResource's setDoctypeInfo in your resource
factory:<br>
<blockquote>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: ExtendedMetaData and <!DOCTYPE [message #482102 is a reply to message #482071] Tue, 25 August 2009 11:39 Go to previous messageGo to next message
Mark Hoffmann is currently offline Mark HoffmannFriend
Messages: 113
Registered: July 2009
Location: Jena
Senior Member
Ed,

this works very well. Is it possible to tell the genmodel or the model
via annotations to save the doctype?

Mark

Ed Merks schrieb:
> Mark,
>
> It seems best to use XMLResource's setDoctypeInfo in your resource factory:
>
> /**
> * Sets the values of <a
> href=' http://www.w3.org/TR/2004/REC-xml-20040204/#NT-SystemLiteral'>system</a>
> and
> * <a
> href='http://www.w3.org/TR/2004/REC-xml-20040204/#NT-PubidLiteral'>public</a>
> identifiers on this resource.
> * @param publicId
> * @param systemId
> */
> void setDoctypeInfo(String publicId, String systemId);
>
>
>
> Mark Hoffmann wrote:
>> Hi,
>>
>> I already posted last week how to customize the serialization of my
>> ecore model. I use the ExtendedMetaData for this and it works very well
>> now.
>>
>> Now I would like to add:
>> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
>> "../docbook-xml-4.5/docbookx.dtd"> to my de/serialization.
>>
>> But I don't have any idea how to do it using ExtendedMetaData. I've seen
>> how to do this with code, but not with ExtendedMetaData.
>>
>> I think i have to add a reference or attribute to my DocumentRoot and
>> add some ExtendedMetaData for the DOCTYPE, systemId, publicId? Or do I
>> have to use other annotations?
>>
>> Thank you in advance,
>> Mark
>>
Re: ExtendedMetaData and <!DOCTYPE [message #482125 is a reply to message #482102] Tue, 25 August 2009 12:55 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Mark,

No, there's no GenModel support for this. There are way too many save
and load options to support and doctype is kind of an antiquated thing
from the DTD days...


Mark Hoffmann wrote:
> Ed,
>
> this works very well. Is it possible to tell the genmodel or the model
> via annotations to save the doctype?
>
> Mark
>
> Ed Merks schrieb:
>
>> Mark,
>>
>> It seems best to use XMLResource's setDoctypeInfo in your resource factory:
>>
>> /**
>> * Sets the values of <a
>> href=' http://www.w3.org/TR/2004/REC-xml-20040204/#NT-SystemLiteral'>system</a>
>> and
>> * <a
>> href='http://www.w3.org/TR/2004/REC-xml-20040204/#NT-PubidLiteral'>public</a>
>> identifiers on this resource.
>> * @param publicId
>> * @param systemId
>> */
>> void setDoctypeInfo(String publicId, String systemId);
>>
>>
>>
>> Mark Hoffmann wrote:
>>
>>> Hi,
>>>
>>> I already posted last week how to customize the serialization of my
>>> ecore model. I use the ExtendedMetaData for this and it works very well
>>> now.
>>>
>>> Now I would like to add:
>>> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
>>> "../docbook-xml-4.5/docbookx.dtd"> to my de/serialization.
>>>
>>> But I don't have any idea how to do it using ExtendedMetaData. I've seen
>>> how to do this with code, but not with ExtendedMetaData.
>>>
>>> I think i have to add a reference or attribute to my DocumentRoot and
>>> add some ExtendedMetaData for the DOCTYPE, systemId, publicId? Or do I
>>> have to use other annotations?
>>>
>>> Thank you in advance,
>>> Mark
>>>
>>>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Re: Non-containment references EMF reflective model editor
Next Topic:How do I add no duplicates to cdo resource?
Goto Forum:
  


Current Time: Thu Apr 25 14:11:24 GMT 2024

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

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

Back to the top