XML file from one DTD to another DTD

Discussion in 'Java' started by test, Jul 28, 2006.

  1. test

    test Guest

    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.
     
    test, Jul 28, 2006
    #1
    1. Advertising

  2. "test" <> wrote in
    news::

    > 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

    A. Top posters.
    Q. What is the most annoying thing on Usenet?
    ---------------------------------------------------------------------
     
    Greg R. Broderick, Jul 28, 2006
    #2
    1. Advertising

  3. test

    Oliver Wong Guest

    "test" <> wrote in message
    news:...
    >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
     
    Oliver Wong, Jul 28, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. loveNUNO
    Replies:
    2
    Views:
    949
    loveNUNO
    Nov 20, 2003
  2. Tony Prichard
    Replies:
    0
    Views:
    756
    Tony Prichard
    Dec 12, 2003
  3. Andy
    Replies:
    0
    Views:
    550
  4. jkflens
    Replies:
    2
    Views:
    1,515
    jkflens
    May 30, 2006
  5. Johan
    Replies:
    20
    Views:
    1,627
    Arndt Jonasson
    Feb 27, 2007
Loading...

Share This Page