Hi Monkers,

Does anyone know of a PERL Package or some code that will generate an HTML form using a DTD.

The idea is that:

  1. the code will read the DOCTYPE from an XML document instance submitted in the web browser,
  2. the code then GETs that DTD using the DOCTYPE URI,
  3. the code then creates an HTML form according to that DTD's structure,
  4. the content of each HTML form element is filled by the content of the relevant element in the XML document instance,
  5. the user can then edit the content in the HTML form,
  6. submit it and the result is an XML document instance that is valid against the DTD.

I know how to do all this except step 3.

I don't think that I can use XSL because the DTD changes according to that defined in the previous HTML form submission and thus there would have to be an XSL for every possible DTD.

Can anyone please help me?

Thanks.


In reply to Generating HTML forms from a DTD by Hacka

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.