473,326 Members | 2,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Converting XSD into DTD?

Hello,

does anyone know of a way/solution how to convert XML Schema documents into
DTD? I am aware of the fact that such a conversion won't be possible under
certain circumstances and that probably some information loss will occur
(esp. data types). However, in many cases it should be possible to obtain
at least the structure of the XSD.

Any help would be greatly appreciated. Thanks in advance.
--
Michael Wein
Jul 20 '05 #1
10 22465
Michael Wein wrote:
does anyone know of a way/solution how to convert XML Schema documents into
DTD? I am aware of the fact that such a conversion won't be possible under
certain circumstances and that probably some information loss will occur
(esp. data types). However, in many cases it should be possible to obtain
at least the structure of the XSD.


Hi Michael,

XMLSpy 2004 supports the conversion between XSD and DTD (Menu:
"DTD/Schema"->"Convert DTD/Schema...").

HTH,

Dirk
--
There are 10 people in the world.
Those who understand binary and those who don't.
Jul 20 '05 #2
On Fri, 27 Feb 2004 06:54:13 +0100, Dirk Segelhorst wrote:
XMLSpy 2004 supports the conversion between XSD and DTD (Menu:
"DTD/Schema"->"Convert DTD/Schema...").


Hi Dirk,

thank you for the quick reply. But as we don't have XML Spy at hand we have
to look for a different solution.
--
Michael Wein
Jul 20 '05 #3
Michael Wein wrote:
On Fri, 27 Feb 2004 06:54:13 +0100, Dirk Segelhorst wrote:

XMLSpy 2004 supports the conversion between XSD and DTD (Menu:
"DTD/Schema"->"Convert DTD/Schema...").

Hi Dirk,

thank you for the quick reply. But as we don't have XML Spy at hand we have
to look for a different solution.


Hi Michael,

perhaps you give the W3C dtd2xsd conversion tool a try:
http://www.w3.org/2000/04/schema_hack/

It is free, but I do not know if it is as mighty as the XMLSpy conversion.

Dirk

--
There are 10 people in the world.
Those who understand binary and those who don't.
Jul 20 '05 #4
On Fri, 27 Feb 2004 09:43:50 +0100, Dirk Segelhorst wrote:
perhaps you give the W3C dtd2xsd conversion tool a try:
http://www.w3.org/2000/04/schema_hack/

It is free, but I do not know if it is as mighty as the XMLSpy conversion.


Well, it is actually for the wrong direction -- as fas as I can see, it
converts DTD into XSD. For that purpose there exist several other (free)
tools (e.g. Syntext's dtd2xs).

In the mean time I found dtd2xsd.xsl
(http://crism.maden.org/consulting/pub/xsl/xsd2dtd.xsl), a simple style
sheet. We will have a closer look at it.
--
Michael Wein
Jul 20 '05 #5
Michael Wein wrote:
Well, it is actually for the wrong direction


Sorry... I had a too fast look at it ;o) Just had it in my bookmarks.

Why don't you parse the XSD and generate the DTD yourself? Should not be
too hard if you use an XSD Object Model (have a look at the XSD part of
Xerces or the XSD Tool in Eclipse).

Dirk.
--
There are 10 people in the world.
Those who understand binary and those who don't.
Jul 20 '05 #6
On Fri, 27 Feb 2004 06:54:13 +0100, Dirk Segelhorst wrote:
XMLSpy 2004 supports the conversion between XSD and DTD (Menu:
"DTD/Schema"->"Convert DTD/Schema...").


Just downloaded XML Spy and tried that "feature". The DTD generated is
completely useless (not to say: crap). E.g. it generated !ATTLIST for
complex types!? I fear that won't work. :-(
--
Michael Wein
Jul 20 '05 #7
On Fri, 27 Feb 2004 17:12:58 +0100, Michael Wein wrote:
On Fri, 27 Feb 2004 06:54:13 +0100, Dirk Segelhorst wrote:
XMLSpy 2004 supports the conversion between XSD and DTD (Menu:
"DTD/Schema"->"Convert DTD/Schema...").


Just downloaded XML Spy and tried that "feature". The DTD generated is
completely useless (not to say: crap). E.g. it generated !ATTLIST for
complex types!? I fear that won't work. :-(


Small correction: As I figured out, XML Spy simply generates a DTD for the
given XML file -- it completely ignores that the XML acutally is a schema
definition. So here we are at the wrong meta level ;-)
--
Michael Wein
Jul 20 '05 #8
Michael Wein wrote:
On Fri, 27 Feb 2004 17:12:58 +0100, Michael Wein wrote:

On Fri, 27 Feb 2004 06:54:13 +0100, Dirk Segelhorst wrote:

XMLSpy 2004 supports the conversion between XSD and DTD (Menu:
"DTD/Schema"->"Convert DTD/Schema...").


Just downloaded XML Spy and tried that "feature". The DTD generated is
completely useless (not to say: crap). E.g. it generated !ATTLIST for
complex types!? I fear that won't work. :-(

Small correction: As I figured out, XML Spy simply generates a DTD for the
given XML file -- it completely ignores that the XML acutally is a schema
definition. So here we are at the wrong meta level ;-)


Which XMLSpy version do you use? Trying the same with XMLSpy 2004
Enterprise Edition works fine for my schema! And it really generated the
DTD from schema and not from XML.

Dirk.

--
There are 10 people in the world.
Those who understand binary and those who don't.
Jul 20 '05 #9
On Mon, 01 Mar 2004 06:53:14 +0100, Dirk Segelhorst wrote:
Michael Wein wrote:
On Fri, 27 Feb 2004 17:12:58 +0100, Michael Wein wrote:

On Fri, 27 Feb 2004 06:54:13 +0100, Dirk Segelhorst wrote:
XMLSpy 2004 supports the conversion between XSD and DTD (Menu:
"DTD/Schema"->"Convert DTD/Schema...").

Just downloaded XML Spy and tried that "feature". The DTD generated is
completely useless (not to say: crap). E.g. it generated !ATTLIST for
complex types!? I fear that won't work. :-(

Small correction: As I figured out, XML Spy simply generates a DTD for the
given XML file -- it completely ignores that the XML acutally is a schema
definition. So here we are at the wrong meta level ;-)


Which XMLSpy version do you use? Trying the same with XMLSpy 2004
Enterprise Edition works fine for my schema! And it really generated the
DTD from schema and not from XML.


Just one more correction: I must apologize for not following your advice
correctly. Instead of converting the schema the way you proposed I chose
"generate" schema what, of course, led to the wrong result. No looking
closer and *converting* the schema into a DTD seems to be successfull!
Thank you very much, this will be a good start for us.
--
Michael Wein
Jul 20 '05 #10


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: mustafa | last post by:
Dear sir , I have built my application in visual basic 6.0 and crystal Report8.5 , Now i migrated my application to VB.net using the upgrade wizard.My visual basic form is upgraded to vb.net...
29
by: Armand Karlsen | last post by:
I have a website ( http://www.zen62775.zen.co.uk ) that I made HTML 4.01 Transitional and CSS compliant, and I'm thinking of converting it into XHTML to learn a little about it. Which XHTML variant...
8
by: prabha | last post by:
Hello Everybody, I have to conert the word doc to multiple html files,according to the templates in the word doc. I had converted the word to xml.Also through Exsl ,had finished the multiple...
5
by: Robert | last post by:
I have a series of web applications (configured as separate applications) on a server. There is a main application at the root and then several virtual directories that are independant...
3
by: Mary | last post by:
Hi, Does anyone know of any software out there that would convert an application written in VBScript to either VB.NET or C#/C++ quite quickly for me, or will I have to re-write the application...
2
by: Map Reader | last post by:
Greetings, I am converting an old VB6 application to use .NET. One of the old controls loads icons from the disk and displays them. However, the transparent color turns to blue somewhere in the...
12
by: Frederik Vanderhaeghe | last post by:
Hi, I have a problem converting text to a double. Why doesn't the code work: If Not (txtdocbedrag.Text = "") Then Select Case ddlBedrag.SelectedIndex Case 0 Case 1
7
by: Tor Aadnevik | last post by:
Hi, I have a problem converting values from Single to double. eg. When the Single value 12.19 is converted to double, the result is 12.1899995803833. Anyone know how to avoid this? Regards...
4
by: gg9h0st | last post by:
i'm a newbie studying php. i was into array part on tutorial and it says i'll get an array having keys that from member variable's name by converting an object to array. i guessed "i can...
2
by: shenanwei | last post by:
DB2 V8.2 on AIX, type II index is created. I see this from deadlock event monitor. 5) Deadlocked Connection ... Participant no.: 2 Lock wait start time: 09/18/2006 23:04:09.911774 .........
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.