XML file from one DTD to another DTD

T

test

I need some help and advice with creating an XML file.

I have the following inputs: DTD 3.0 , DTD 4.0 and test.xml file that
is for DTD3.0

Task to accomplish :Create a new test2.xml with the same values of
test.xml but
to validate against DTD 4.0.

Background about the DTDs: Both DTD 3.0 and DTD 4.0 are drastically
different.
There are parent child relationships that have been changed, new fields
introduced and old fields removed etc.

Feedback: Most important thing I want to know is can a tool accomplish
this( say Turbo xml etc)
If not, is it possible for a program ( say java) or am I trying
something that can't be done.
 
G

Greg R. Broderick

Task to accomplish :Create a new test2.xml with the same values of
test.xml but
to validate against DTD 4.0.

<http://www.w3.org/Style/XSL/>

Cheers
GRB


--
---------------------------------------------------------------------
Greg R. Broderick (e-mail address removed)

A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------
 
O

Oliver Wong

test said:
I need some help and advice with creating an XML file.

I have the following inputs: DTD 3.0 , DTD 4.0 and test.xml file that
is for DTD3.0

Task to accomplish :Create a new test2.xml with the same values of
test.xml but
to validate against DTD 4.0.

Background about the DTDs: Both DTD 3.0 and DTD 4.0 are drastically
different.
There are parent child relationships that have been changed, new fields
introduced and old fields removed etc.

Feedback: Most important thing I want to know is can a tool accomplish
this( say Turbo xml etc)
If not, is it possible for a program ( say java) or am I trying
something that can't be done.

I don't think this can be done for any arbitrary pair of DTDs. Consider
the following pseudo DTDs:

[BEGIN firstPseudoDTD]
Root element is "Person".
Person has attribute "Age" (int), "Name" (String)
[END firstPseudoDTD]

[BEGIN secondPseudoDTD]
Root element is "Hamburger".
Hamburger has attribute "withKetchup" (boolean), "withMustard" (boolean)
[END secondPseudoDTD]

How could you possibly convert an XML file complying with the first DTD
to the second one?

- Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,967
Messages
2,570,148
Members
46,694
Latest member
LetaCadwal

Latest Threads

Top