Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » DTD to Ecore
DTD to Ecore [message #407119] Wed, 14 February 2007 09:47 Go to next message
Annamalai Chockalingam is currently offline Annamalai ChockalingamFriend
Messages: 49
Registered: July 2009
Member
Hello All

I have a slightly different requirement. I tried to convert Schema to
Ecore programmatically and was successful in loading an XML file
corresponding to that XSD.

Now my problem is for all my XML i have DTD and not XSD. Therefore is
there any way that i can map an DTD to Ecore. Or atleast a DTD to XSD
Mapping, then i can do the XSD to Ecore and loading of XML.

Another information i need is, the DTD information is present inside each
XML File. So i need to even retrieve this information to find out the DTD
and then do the step as described above.

Why we want to do this is as each XML has its own DTD its not possible to
make static models for each of the XML. Therefore looking at Dynamic EMF
as the solution.

regards
Malai
Re: DTD to Ecore [message #407121 is a reply to message #407119] Wed, 14 February 2007 11:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: joerg.von.frantzius.artnology.com

<!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">
Hello Annamalai,<br>
<br>
we made some good experiences with <a
href="http://www.thaiopensource.com/relaxng/trang.html">Trang</a> for
converting DTDs to XSDs. I don't know if that will help you with your
DTDs included in the actual XML files, though.<br>
<br>
<br>
Annamalai C wrote:
<blockquote
cite="mid:2daf51f966dd3a0b8d5ee983629567b7$1@www.eclipse.org"
type="cite">Hello All
<br>
<br>
I have a slightly different requirement. I tried to convert Schema to
Ecore programmatically and was successful in loading an XML file
corresponding to that XSD.
<br>
<br>
Now my problem is for all my XML i have DTD and not XSD. Therefore is
there any way that i can map an DTD to Ecore. Or atleast a DTD to XSD
Mapping, then i can do the XSD to Ecore and loading of XML.
<br>
<br>
Another information i need is, the DTD information is present inside
each XML File. So i need to even retrieve this information to find out
the DTD and then do the step as described above.
<br>
<br>
Why we want to do this is as each XML has its own DTD its not possible
to make static models for each of the XML. Therefore looking at Dynamic
EMF as the solution.
<br>
<br>
regards
<br>
Malai
<br>
<br>
</blockquote>
<br>
</body>
</html>
Re: DTD to Ecore [message #407123 is a reply to message #407121] Wed, 14 February 2007 11:46 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070005030602050302040108
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Malai,

To do this on the fly, you'd need to specialize the XMLHandler and
process the SAX events to build the DTD and then try to convert it. I
kind of doubt that any existing tools will help you with that directly,
since most are likely to process only DTDs that are in a separate file.
So perhaps you'd want to take the approach of processing the DTD
directly to create a corresponding Ecore model using the XSDEcoreBuilder
as an example. Perhaps you'd even need to write the DTD back out, which
would be yet more work...


J


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: DTD to Ecore [message #407128 is a reply to message #407123] Wed, 14 February 2007 14:04 Go to previous messageGo to next message
Annamalai Chockalingam is currently offline Annamalai ChockalingamFriend
Messages: 49
Registered: July 2009
Member
Hello

Thanks for your quick reply. Just one clarification in my doubt. The path
of the DTD is present in the XML and not the whole DTD. Therefore now i
need to retrieve this path and find the DTD and convert to XSD and then
use the XSDEcoreGenerator.

Or is it easier to write a DTDEcoreGenerator. Wouldnt writing an
DTDEcoreGenerator be a huge task by itself.

Awaiting your replies as its a little urgent. We are in the process of
prototyping a solution.

regards
Malai
Re: DTD to Ecore [message #407131 is a reply to message #407121] Wed, 14 February 2007 14:46 Go to previous messageGo to next message
Annamalai Chockalingam is currently offline Annamalai ChockalingamFriend
Messages: 49
Registered: July 2009
Member
Hello Jon

Thank you for your info on Trang. I just tried out the tool and looks
really good. Even if not useful for this prototype would be definitely a
good tool to keep in hand.

Thank you once again.

regards
Malai
Re: DTD to Ecore [message #407133 is a reply to message #407128] Wed, 14 February 2007 15:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: joerg.von.frantzius.artnology.com

Annamalai C wrote:
> Hello
> Thanks for your quick reply. Just one clarification in my doubt. The
> path of the DTD is present in the XML and not the whole DTD. Therefore
> now i need to retrieve this path and find the DTD and convert to XSD
> and then use the XSDEcoreGenerator.
By the way I think trang is open source and written in Java, so
theoretically you should be able to use Trang to do an on-the-fly
conversion from DTD to XSD...
>
> Or is it easier to write a DTDEcoreGenerator. Wouldnt writing an
> DTDEcoreGenerator be a huge task by itself.
>
> Awaiting your replies as its a little urgent. We are in the process of
> prototyping a solution.
>
> regards
> Malai
>
Re: DTD to Ecore [message #407135 is a reply to message #407128] Wed, 14 February 2007 15:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070502080800080305000001
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Malai,

I see. That sounds more promising. XMLHandler has this method:

public void startDTD(String name, String publicId, String systemId)
{
xmlResource.setDoctypeInfo(publicId, systemId);
}

so it should be possible to use this information to locate the DTD and
then convert it. Probably it's possible to convert it at tool time and
then use the public ID to locate that already converted result. In
fact, maybe just the namespace will be sufficient just to locate the
EPackage as normal...


Annamalai C wrote:
> Hello
> Thanks for your quick reply. Just one clarification in my doubt. The
> path of the DTD is present in the XML and not the whole DTD. Therefore
> now i need to retrieve this path and find the DTD and convert to XSD
> and then use the XSDEcoreGenerator.
>
> Or is it easier to write a DTDEcoreGenerator. Wouldnt writing an
> DTDEcoreGenerator be a huge task by itself.
>
> Awaiting your replies as its a little urgent. We are in the process of
> prototyping a solution.
>
> regards
> Malai
>


--------------070502080800080305000001
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">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Malai,<br>
<br>
I see.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: DTD to Ecore [message #407165 is a reply to message #407135] Fri, 16 February 2007 09:34 Go to previous messageGo to next message
Annamalai Chockalingam is currently offline Annamalai ChockalingamFriend
Messages: 49
Registered: July 2009
Member
Hello Ed

I tried to provide an XML with DOCTYPE SYSTEM pointing to a DTD and i
landed up with an Exception during the parsing. If i use
resource.load(options) he intern calls load(inputStream, options) and not
load(node, options) which is to be used to call startDTD or even anything
related to DTD.

At the end if you trace through the PUBLIC ID and SYSTEM ID are found to
be null as they are calling load(inputStream, options)

now i am really lost of what should be my next step.

My Problem again
I have XML with has DTD Path inside the XML. I need to retrieve this path
and convert the DTD into XSD and then load the XML into an Ecore that
corresponds to the XSD created.

Solution
For DTD to XSD i can use Trang.
XSD to Ecore i have the code working.
XML Loading i have the code working.

But then to convert the DTD to XSD, i need the DTD Path.
After the XSD is created, how do i tell my loader to use this XSD and not
the DTD information to load the XML.

Hope i was clear enough to express my problem. Help would be really
appreciated as i seem lost with lots to EMF Code as i run through
XMLResourceImpl, XMLLoadImpl etc.

regards
Malai
Re: DTD to Ecore [message #407167 is a reply to message #407165] Fri, 16 February 2007 11:36 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030809020307030007050500
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Malai,

When loading from an input stream, XMLLoadImpl will create an input
source as follows:

InputSource inputSource = new InputSource(is);
if (resource.getURI() != null)
{
String resourceURI = resource.getURI().toString();
inputSource.setPublicId(resourceURI);
inputSource.setSystemId(resourceURI);
inputSource.setEncoding(encoding);
}

This will ensure that during SAX parsing, the XMLHandler.locator knows
the URI of the input stream itself. XMLHandler.startDTD does the following:

public void startDTD(String name, String publicId, String systemId)
{
xmlResource.setDoctypeInfo(publicId, systemId);
}

So that should correctly record the public ID and system ID of the DTD.
What you'll still need to do is specialize the resolveEntity method:

public InputSource resolveEntity(String publicId, String systemId)
throws SAXException
{
return null;
}

which is called when the SAX parser needs to locate the DTD (or entity).

Since no one has ever asked for this to be supported directly by EMF,
there is no default implementation, but it strikes me that we could
probably provide a pretty nice default implementation that uses the
entity's public/system ID to resolve an absolute URI (in the case of
relative URIs) and then use the containing resource's resource set's URI
converter to create an input stream and then wrap that as an input
source. If you care to send a small example of a document that
references a DTD along with its DTD, I'll probably be able to whip a
sample together very quickly (although I'll be away for the whole
morning and part of the afternoon). I can't do the DTD -> XSD part
though. Have a look at processSchemaLocations to see how it uses the
ecoreBuilder to process the schemas.


Annamalai C wrote:
> Hello Ed
>
> I tried to provide an XML with DOCTYPE SYSTEM pointing to a DTD and i
> landed up with an Exception during the parsing. If i use
> resource.load(options) he intern calls load(inputStream, options) and
> not load(node, options) which is to be used to call startDTD or even
> anything related to DTD.
>
> At the end if you trace through the PUBLIC ID and SYSTEM ID are found
> to be null as they are calling load(inputStream, options)
>
> now i am really lost of what should be my next step.
>
> My Problem again
> I have XML with has DTD Path inside the XML. I need to retrieve this
> path and convert the DTD into XSD and then load the XML into an Ecore
> that corresponds to the XSD created.
>
> Solution
> For DTD to XSD i can use Trang. XSD to Ecore i have the code working.
> XML Loading i have the code working.
>
> But then to convert the DTD to XSD, i need the DTD Path.
> After the XSD is created, how do i tell my loader to use this XSD and
> not the DTD information to load the XML.
>
> Hope i was clear enough to express my problem. Help would be really
> appreciated as i seem lost with lots to EMF Code as i run through
> XMLResourceImpl, XMLLoadImpl etc.
>
> regards
> Malai
>
>


--------------030809020307030007050500
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">
Malai,<br>
<br>
When loading from an input stream, XMLLoadImpl will create an input
source as follows:<br>
<blockquote>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: DTD to Ecore [message #407170 is a reply to message #407167] Fri, 16 February 2007 12:29 Go to previous messageGo to next message
Annamalai Chockalingam is currently offline Annamalai ChockalingamFriend
Messages: 49
Registered: July 2009
Member
hello Ed

I am attaching a sample XML and DTD file

DTD File

<?xml version='1.0' encoding='us-ascii'?>
<!DOCTYPE Library [
<!ELEMENT Book (Title | Author | Publisher | Date_Published)>
<!ATTLIST Book ISBN CDATA #IMPLIED>
<!ELEMENT Title (#PCDATA)>
<!ELEMENT Author (#PCDATA)>
<!ELEMENT Publisher (#PCDATA)>
<!ELEMENT Date_Published (#PCDATA)>
]>

XML File

<!DOCTYPE Library SYSTEM "library.dtd">
<Library>
<Book ISBN="8763-343-2343" >
<Title>Professional JINI</Title>
<Author>Sing Li</Author>
<Publisher>Wrox Publications</Publisher>
<Date_Published>22/10/1999</Date_Published>
</Book>
</Library>

It would be great if you could give me a starting point ...

Thanks in advance Ed.

regards
Malai
Re: DTD to Ecore [message #407172 is a reply to message #407170] Fri, 16 February 2007 12:39 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Malai,

Thanks. I'll have a look at this when I get back...


Annamalai C wrote:
> hello Ed
>
> I am attaching a sample XML and DTD file
> DTD File
>
> <?xml version='1.0' encoding='us-ascii'?>
> <!DOCTYPE Library [
> <!ELEMENT Book (Title | Author | Publisher | Date_Published)>
> <!ATTLIST Book ISBN CDATA #IMPLIED>
> <!ELEMENT Title (#PCDATA)>
> <!ELEMENT Author (#PCDATA)>
> <!ELEMENT Publisher (#PCDATA)>
> <!ELEMENT Date_Published (#PCDATA)>
> ]>
>
> XML File
>
> <!DOCTYPE Library SYSTEM "library.dtd">
> <Library> <Book ISBN="8763-343-2343" > <Title>Professional
> JINI</Title> <Author>Sing Li</Author>
> <Publisher>Wrox Publications</Publisher>
> <Date_Published>22/10/1999</Date_Published>
> </Book>
> </Library>
>
> It would be great if you could give me a starting point ...
> Thanks in advance Ed.
>
> regards
> Malai
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: DTD to Ecore [message #407184 is a reply to message #407172] Fri, 16 February 2007 21:07 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Malai,

Time has run short for today. I'll try to get to this soon...


Ed Merks wrote:
> Malai,
>
> Thanks. I'll have a look at this when I get back...
>
>
> Annamalai C wrote:
>> hello Ed
>>
>> I am attaching a sample XML and DTD file
>> DTD File
>>
>> <?xml version='1.0' encoding='us-ascii'?>
>> <!DOCTYPE Library [
>> <!ELEMENT Book (Title | Author | Publisher | Date_Published)>
>> <!ATTLIST Book ISBN CDATA #IMPLIED>
>> <!ELEMENT Title (#PCDATA)>
>> <!ELEMENT Author (#PCDATA)>
>> <!ELEMENT Publisher (#PCDATA)>
>> <!ELEMENT Date_Published (#PCDATA)>
>> ]>
>>
>> XML File
>>
>> <!DOCTYPE Library SYSTEM "library.dtd">
>> <Library> <Book ISBN="8763-343-2343" > <Title>Professional
>> JINI</Title> <Author>Sing Li</Author>
>> <Publisher>Wrox Publications</Publisher>
>> <Date_Published>22/10/1999</Date_Published>
>> </Book>
>> </Library>
>>
>> It would be great if you could give me a starting point ...
>> Thanks in advance Ed.
>>
>> regards
>> Malai
>>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: DTD to Ecore [message #407192 is a reply to message #407170] Sat, 17 February 2007 12:29 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020506060807040109020807
Content-Type: multipart/alternative;
boundary="------------030503020407040108010808"


--------------030503020407040108010808
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Malai,

I implemented the entity resolver method like this:

@Override
public InputSource resolveEntity(String publicId, String systemId)
throws SAXException
{
try
{
InputStream inputStream =
getURIConverter().createInputStream(URI.createURI(systemId)) ;
InputSource result = new InputSource(inputStream);
result.setPublicId(publicId);
result.setSystemId(systemId);
return result;
}
catch (IOException exception)
{
throw new SAXException(exception);
}
}

I've attached the full patch which includes a JUnit test. If you open a
bugzilla feature request, I think it makes sense to commit this. (Note
that your sample DTD file should not include the <!DOCTYPE Library [ ]>
brackets, which are used only for inline DTDs.


Annamalai C wrote:
> hello Ed
>
> I am attaching a sample XML and DTD file
> DTD File
>
> <?xml version='1.0' encoding='us-ascii'?>
> <!DOCTYPE Library [
> <!ELEMENT Book (Title | Author | Publisher | Date_Published)>
> <!ATTLIST Book ISBN CDATA #IMPLIED>
> <!ELEMENT Title (#PCDATA)>
> <!ELEMENT Author (#PCDATA)>
> <!ELEMENT Publisher (#PCDATA)>
> <!ELEMENT Date_Published (#PCDATA)>
> ]>
>
> XML File
>
> <!DOCTYPE Library SYSTEM "library.dtd">
> <Library> <Book ISBN="8763-343-2343" > <Title>Professional
> JINI</Title> <Author>Sing Li</Author>
> <Publisher>Wrox Publications</Publisher>
> <Date_Published>22/10/1999</Date_Published>
> </Book>
> </Library>
>
> It would be great if you could give me a starting point ...
> Thanks in advance Ed.
>
> regards
> Malai
>


--------------030503020407040108010808
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">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Malai,<br>
<br>
I implemented the entity resolver method like this:<br>
<blockquote>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: DTD to Ecore [message #407228 is a reply to message #407192] Mon, 19 February 2007 12:44 Go to previous messageGo to next message
Annamalai Chockalingam is currently offline Annamalai ChockalingamFriend
Messages: 49
Registered: July 2009
Member
Hello Ed

Thank you for your support. I have requested an feature enhancement in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=174617

I have tested your patch. Works amazingly good. Thank you once again ...
would look into it to see what i can do.

My immd task is
As of now if no XSD Information is provided inside the XML then EMF loads
the resource with a default AnyType XSD. I would like to interrupt this
and provide my own XSD as the default XSD if no XSD Information is found.
How is this possible ?

I am sure you would have the answer right away ... Thank you once again.

regards
Annamalai
Re: DTD to Ecore [message #407229 is a reply to message #407228] Mon, 19 February 2007 13:09 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040401060201080408060403
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Malai,

XMLHandler has this method. First it processes the schema locations, if
there are any, and then, if it's supposed to process any XML whatsoever,
it makes sure to demand create a package to handle the root element.

protected void handleTopLocations(String prefix, String name)
{
processSchemaLocations(prefix, name);
if (processAnyXML)
{
// Ensure that anything can be handled, even if it's not
recognized.
//
String uri = helper.getURI(prefix);
if (extendedMetaData.getPackage(uri) == null)
{
extendedMetaData.demandFeature(uri, name, true);
}
}
}

So probably the processSchemaLocations is the best place to ensure that
a Ecore model can be found for the namespace of the root element.


Annamalai C wrote:
> Hello Ed
>
> Thank you for your support. I have requested an feature enhancement in
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=174617
>
> I have tested your patch. Works amazingly good. Thank you once again
> ... would look into it to see what i can do.
>
> My immd task is
> As of now if no XSD Information is provided inside the XML then EMF
> loads the resource with a default AnyType XSD. I would like to
> interrupt this and provide my own XSD as the default XSD if no XSD
> Information is found. How is this possible ?
>
> I am sure you would have the answer right away ... Thank you once again.
> regards
> Annamalai
>


--------------040401060201080408060403
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">
Malai,<br>
<br>
XMLHandler has this method.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: DTD to Ecore [message #407230 is a reply to message #407229] Mon, 19 February 2007 13:29 Go to previous messageGo to next message
Annamalai Chockalingam is currently offline Annamalai ChockalingamFriend
Messages: 49
Registered: July 2009
Member
Hello Ed

I just traced and found out the full flow of the SourceCode within
XMLHandler. So now working on figuring out what i need to override and
what i need to do.

Will get back to you once i formulate an algorithm to implement for your
review.

So looks like i need to write my own DTDResourceImpl and also extend the
XMLHandler class to add in my own functionality. I would keep you posted
on the happenings as i progress further.

Thank you for your support. Its been of great help.

regards
Malai
Re: DTD to Ecore [message #407313 is a reply to message #407230] Wed, 21 February 2007 16:38 Go to previous messageGo to next message
Annamalai Chockalingam is currently offline Annamalai ChockalingamFriend
Messages: 49
Registered: July 2009
Member
Hello Ed

I got the DTD thing working. Thanks for your implementation. This is what
i did. Please do review to check if my steps are correct.

I created DTDXMLHandler, DTDXMLResourceFactoryImpl, DTDXMLResourceImpl,
DTDXMLLoadImpl.

In DTDXMLHandler i overried the startDTD() wherein as soon as i get the
systemID i look for the DTD File and convert it using trang and update the
uriToLocation map to contain the namespace and the URI of the XSD.

And i dont kno astonishingly even if the XML doesnt hav a namespace same
as the one in the uriToLocation map, it seems to load on to the tree with
the XSD.

Anyways i havent done major testing as of yet .. but thank you for your
support quiet happy to get it working. Now i am motivated enough to face
some more errors tomorrow.

regards
Malai
Re: DTD to Ecore [message #407315 is a reply to message #407313] Wed, 21 February 2007 16:42 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Malai,

This sounds like a good approach.


Annamalai C wrote:
> Hello Ed
>
> I got the DTD thing working. Thanks for your implementation. This is
> what i did. Please do review to check if my steps are correct.
>
> I created DTDXMLHandler, DTDXMLResourceFactoryImpl,
> DTDXMLResourceImpl, DTDXMLLoadImpl.
>
> In DTDXMLHandler i overried the startDTD() wherein as soon as i get
> the systemID i look for the DTD File and convert it using trang and
> update the uriToLocation map to contain the namespace and the URI of
> the XSD.
>
> And i dont kno astonishingly even if the XML doesnt hav a namespace
> same as the one in the uriToLocation map, it seems to load on to the
> tree with the XSD.
>
> Anyways i havent done major testing as of yet .. but thank you for
> your support quiet happy to get it working. Now i am motivated enough
> to face some more errors tomorrow.
>
> regards
> Malai
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: DTD to Ecore [message #407431 is a reply to message #407315] Tue, 27 February 2007 17:00 Go to previous messageGo to next message
Annamalai Chockalingam is currently offline Annamalai ChockalingamFriend
Messages: 49
Registered: July 2009
Member
Hello Ed

My DTD to Ecore and Loading of XML is working great. Now i would like to
take it further and contribute a DTD Importer to create an Ecore like XSD,
Java annotation to Ecore etc.

This is required in our project also as we have lot of DTDs that we now
want to convert into model .. and then would be a good contribution to the
community also ...

Now i need some starting points how to extend the importer ... places to
look for. Any help would be appretiated.

regards
Malai
Re: DTD to Ecore [message #407434 is a reply to message #407431] Tue, 27 February 2007 19:55 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Malai,

I'm in several days of meetings and in any case, the best I can do is
suggest you look at the XSD importer. (It would make a great contribution!)


Annamalai C wrote:
> Hello Ed
>
> My DTD to Ecore and Loading of XML is working great. Now i would like
> to take it further and contribute a DTD Importer to create an Ecore
> like XSD, Java annotation to Ecore etc.
>
> This is required in our project also as we have lot of DTDs that we
> now want to convert into model .. and then would be a good
> contribution to the community also ...
>
> Now i need some starting points how to extend the importer ... places
> to look for. Any help would be appretiated.
>
> regards
> Malai
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: DTD to Ecore [message #407452 is a reply to message #407434] Wed, 28 February 2007 13:58 Go to previous messageGo to next message
Annamalai Chockalingam is currently offline Annamalai ChockalingamFriend
Messages: 49
Registered: July 2009
Member
Hello Ed

Thank you so much for your support. I have completed the DTD Ecore
Converter. I have made a plugin called as org.eclipse.dtd.ecore.importer
similar to XSD Importer and contributed to the EMF Importer.

Its working fine with trang in the background. I was wondering if i can
submit it as an enhancement in the bugzilla tool for emf importer.

Please do let me know ..

regards
Malai
Re: DTD to Ecore [message #407458 is a reply to message #407452] Wed, 28 February 2007 15:31 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Malai,

If you want to contribute something, please open a bugzilla feature
request, attach the code, and explicitly say you are donating it. (I'll
have to find out more about trang and any other dependencies.)


Annamalai C wrote:
> Hello Ed
>
> Thank you so much for your support. I have completed the DTD Ecore
> Converter. I have made a plugin called as
> org.eclipse.dtd.ecore.importer similar to XSD Importer and contributed
> to the EMF Importer.
>
> Its working fine with trang in the background. I was wondering if i
> can submit it as an enhancement in the bugzilla tool for emf importer.
>
> Please do let me know ..
>
> regards
> Malai
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: DTD to Ecore [message #418052 is a reply to message #407452] Fri, 04 April 2008 09:49 Go to previous messageGo to next message
Jurrie Overgoor is currently offline Jurrie OvergoorFriend
Messages: 2
Registered: July 2009
Junior Member
Annamalai C wrote:
> Thank you so much for your support. I have completed the DTD Ecore
> Converter. I have made a plugin called as org.eclipse.dtd.ecore.importer
> similar to XSD Importer and contributed to the EMF Importer.
>
> Its working fine with trang in the background. I was wondering if i can
> submit it as an enhancement in the bugzilla tool for emf importer.

Hello Malai,

I also need a DTD to Ecore converter, and I was wondering if you ever
got around to submitting your plugin..?

With kind regards,

Jurrie
Re: DTD to Ecore [message #418054 is a reply to message #418052] Fri, 04 April 2008 10:35 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070008010505030508060600
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Jurrie,

There's 175843 <https://bugs.eclipse.org/bugs/show_bug.cgi?id=175843>
open but I didn't monitor it closely. :-(


Jurrie Overgoor wrote:
> Annamalai C wrote:
>
>> Thank you so much for your support. I have completed the DTD Ecore
>> Converter. I have made a plugin called as org.eclipse.dtd.ecore.importer
>> similar to XSD Importer and contributed to the EMF Importer.
>>
>> Its working fine with trang in the background. I was wondering if i can
>> submit it as an enhancement in the bugzilla tool for emf importer.
>>
>
> Hello Malai,
>
> I also need a DTD to Ecore converter, and I was wondering if you ever
> got around to submitting your plugin..?
>
> With kind regards,
>
> Jurrie
>


--------------070008010505030508060600
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">
Jurrie,<br>
<br>
There's <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175843">175843</a>
open but I didn't monitor it closely.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: DTD to Ecore [message #418056 is a reply to message #418054] Fri, 04 April 2008 10:46 Go to previous messageGo to next message
Jurrie Overgoor is currently offline Jurrie OvergoorFriend
Messages: 2
Registered: July 2009
Junior Member
Ed Merks wrote:
> There's 175843 <https://bugs.eclipse.org/bugs/show_bug.cgi?id=175843>
> open but I didn't monitor it closely. :-(

Thanks for your reply Ed. I did not see any updates regarding bug
175843. Nevertheless I've voted for it. Maybe, just maybe it'll trigger
some development by someone.

Woohoo! Go bug 175843! GO!! :)

With kind regards,

Jurrie
Re: DTD to Ecore [message #418058 is a reply to message #418056] Fri, 04 April 2008 11:02 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030904090304090809030504
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Jurrie,

Failing that, I think there are quite a few DTD -> XSD converters around
so perhaps indirectly you can solve your problem that way.


Jurrie Overgoor wrote:
> Ed Merks wrote:
>
>> There's 175843 <https://bugs.eclipse.org/bugs/show_bug.cgi?id=175843>
>> open but I didn't monitor it closely. :-(
>>
>
> Thanks for your reply Ed. I did not see any updates regarding bug
> 175843. Nevertheless I've voted for it. Maybe, just maybe it'll trigger
> some development by someone.
>
> Woohoo! Go bug 175843! GO!! :)
>
> With kind regards,
>
> Jurrie
>


--------------030904090304090809030504
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

<!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">
Jurrie,<br>
<br>
Failing that, I think there are quite a few DTD -&gt; XSD converters
around so perhaps indirectly you can solve your problem that way.<br>
<br>
<br>
Jurrie Overgoor wrote:
<blockquote cite="mid:ft50u2$o33$1@build.eclipse.org" type="cite">
<pre wrap="">Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">There's 175843 <a class="moz-txt-link-rfc2396E" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175843">&lt;https://bugs.eclipse.org/bugs/show_bug.cgi?id=175843&gt;</a>
open but I didn't monitor it closely. :-(
</pre>
</blockquote>
<pre wrap=""><!---->
Thanks for your reply Ed. I did not see any updates regarding bug
175843. Nevertheless I've voted for it. Maybe, just maybe it'll trigger
some development by someone.

Woohoo! Go bug 175843! GO!! :)

With kind regards,

Jurrie
</pre>
</blockquote>
<br>
</body>
</html>

--------------030904090304090809030504--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: DTD to Ecore [message #418190 is a reply to message #418058] Fri, 04 April 2008 14:27 Go to previous message
Eclipse UserFriend
Originally posted by: joerg.von.frantzius.artnology.com

<!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">
Last time I had a look, Trang was the best one around. Does anybody
know of any good converters other than trang?<br>
<br>
Ed Merks schrieb:
<blockquote cite="mid:ft51sf$7hd$2@build.eclipse.org" type="cite">
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
Jurrie,<br>
<br>
Failing that, I think there are quite a few DTD -&gt; XSD converters
around so perhaps indirectly you can solve your problem that way.<br>
<br>
<br>
Jurrie Overgoor wrote:
<blockquote cite="mid:ft50u2$o33$1@build.eclipse.org" type="cite">
<pre wrap="">Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">There's 175843 <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175843">&lt;https://bugs.eclipse.org/bugs/show_bug.cgi?id=175843&gt;</a>
open but I didn't monitor it closely. :-(
</pre>
</blockquote>
<pre wrap=""><!---->
Thanks for your reply Ed. I did not see any updates regarding bug
175843. Nevertheless I've voted for it. Maybe, just maybe it'll trigger
some development by someone.

Woohoo! Go bug 175843! GO!! :)

With kind regards,

Jurrie
</pre>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>
Previous Topic:Dealing with resource removals
Next Topic:Memory leak in UndoActionWrapper / RedoActionWrapper
Goto Forum:
  


Current Time: Fri Apr 26 00:38:44 GMT 2024

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

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

Back to the top