DTD to XML template

Discussion in 'XML' started by k@sh, Jan 30, 2006.

  1. k@sh

    k@sh Guest

    Hi All,

    Does anyone have experience in converting a dtd to a random XML
    template which contains no values?
    Is there a way to do this in C#?

    Thanks in advance...
     
    k@sh, Jan 30, 2006
    #1
    1. Advertisements

  2. k@sh

    Soren Kuula Guest

    k@sh wrote:
    > Hi All,
    >
    > Does anyone have experience in converting a dtd to a random XML
    > template which contains no values?
    > Is there a way to do this in C#?
    >
    > Thanks in advance...
    >

    No, but been thinking about how to do that in a nice way... It depends
    on what you want. A minimal valid document? A document demonstrating som
    e varieties of what is possible?

    I guess one would start out the same way in all cases: Parse the DTD,
    and construct a graph with a node for each declaration, and one for each
    bit and piece of the regular expressions, with edges in the obvious
    places. One might want to add extra edges from some nodes to their
    successors, to indicate different decisions at a choice: For example, a
    node representing the expression b+ could have 2 edges to the
    declaration of b, one indicating "1 b child" and the other "2 b
    children". Or something like it....

    Then, find a traversal of the graph that uses all edges, from the
    declaration of something you decide to be the root element, and re-uses
    edges as few times as possible.

    Nice exercise anyway.

    Soren
     
    Soren Kuula, Jan 31, 2006
    #2
    1. Advertisements

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. Ben Jessel
    Replies:
    0
    Views:
    627
    Ben Jessel
    Aug 5, 2004
  2. Joseph Tilian
    Replies:
    0
    Views:
    533
    Joseph Tilian
    Dec 21, 2004
  3. Ronald Fischer
    Replies:
    4
    Views:
    2,044
    Ronald Fischer
    Mar 17, 2005
  4. Syntext, Inc
    Replies:
    0
    Views:
    478
    Syntext, Inc
    Aug 21, 2003
  5. Clifford W. Racz

    Checking XML DTD syntax and validating XML

    Clifford W. Racz, Jun 7, 2004, in forum: XML
    Replies:
    8
    Views:
    2,115
    Clifford W. Racz
    Jun 23, 2004
  6. test
    Replies:
    2
    Views:
    3,309
    Oliver Wong
    Jul 28, 2006
  7. Replies:
    2
    Views:
    680
    Joe Kesselman
    Oct 5, 2006
  8. Generic Usenet Account
    Replies:
    1
    Views:
    1,194
    Joe Kesselman
    May 6, 2009
Loading...