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. Advertising

  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. 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. Ben Jessel
    Replies:
    0
    Views:
    399
    Ben Jessel
    Aug 5, 2004
  2. Joseph Tilian
    Replies:
    0
    Views:
    348
    Joseph Tilian
    Dec 21, 2004
  3. Ronald Fischer
    Replies:
    4
    Views:
    1,752
    Ronald Fischer
    Mar 17, 2005
  4. Syntext, Inc
    Replies:
    0
    Views:
    375
    Syntext, Inc
    Aug 21, 2003
  5. test
    Replies:
    2
    Views:
    2,015
    Oliver Wong
    Jul 28, 2006
Loading...

Share This Page