Yes, this is very close to what I want to do. Although data for multiple selects and the like could potentially be pulled from database tables. The big question is, how will you translate that to html? I'd like to allow them to specify a font or whatever, but in doing that it gets so close to being the actual html form, that I may as well have them write it in html :). Will you parse it yourself and translate? I'd like to know if there is a way to do that without parsing it completely yourself.

Just for the sake of filling up vroom's database :), let me show you what I have so far (P.S. this describes a form, but it also tries to describe a table structure, both of which refer to adding an entry which is a computer system). This was done with the intent of parsing it myself to produce appropriate html, but again, if there's a way that I could rewrite/retag everything and use some module to produce the output, I'd love that.
<?xml version="1.0" standalone="yes"?> <!-- Everyone gets an id for free, you must have a unique "subject" ro +w!!! --> <!-- i.e. for every addition to a type, an id will be assigned --> <!-- i.e. everything must have a row named subject (VARCHAR(128) max) +--> <!-- which will contain the hostname or whatever you like, but it --> <!-- _must_ be named "subject" --> <!-- Stuff to think about --> <!-- <macro type="sql">SELECT * from foo</macro> --> <!-- <macro type="perl">sub { print 4 * 50 }</macro> --> <!-- select id,subject from (whatever) where something="stuff" --> <!-- <target>id:subect:something="stuff"</target> ? --> <!-- <name>file</name><datatype>blob</datatype><style>file_upload</sty +le> --> <!-- ********** START SYSTEM DEFINITION ********** --> <form> <name>System</name> <post_notes_to>1</post_notes_to> <email_notes>1</email_notes> <row> <element> <label>Hostname</label> <name>subject</name> <required>1</required> <validchars>[\w\.-_]+</validchars> <datatype>varchar</datatype> <size>25</size> </element> </row> <row> <element> <label>Vendor/Model</label> <name>sysdesc</name> <required>1</required> <validchars>[\w\.-_]+</validchars> <datatype>varchar</datatype> <size>64</size> <default>Sun UE6500</default> <instructions>(i.e. Sun UE6500)</instructions> </element> </row> <row> <element> <label>Serial#</label> <name>serialnum</name> <required>0</required> <validchars>[\w\.-_:]+</validchars> <datatype>varchar</datatype> <size>32</size> </element> </row> <row> <element> <label>Maint Contract</label> <name>maint</name> <required>0</required> <datatype>varchar</datatype> <style>pulldown</style> <title>Select Contract...</title> <info_from>Maintenance</info_from> <target>id:subject</target> </element> </row> <row> <element> <label>Mac Address</label> <name>mac</name> <required>0</required> <validchars>[\w:]+</validchars> <datatype>varchar</datatype> <size>32</size> </element> </row> <row> <element> <label>OS Level</label> <name>oslevel</name> <required>0</required> <validchars>[\w\.]+</validchars> <datatype>varchar</datatype> <size>32</size> <default>SunOS 5.8</default> </element> </row> <row> <element> <label>IP Address</label> <name>ipaddr1</name> <required>0</required> <validchars>[\d/:\.]+</validchars> <datatype>varchar</datatype> <size>32</size> </element> </row> <row> <element> <label>Contacts</label> <name>icontacts</name> <required>0</required> <datatype>varchar</datatype> <style>multiple</style> <size>3</size> <title>==Internal Contacts==</title> <info_from>Internal Contacts</info_from> <target>id:subject</target> </element> <element> <name>vcontacts</name> <required>0</required> <datatype>varchar</datatype> <style>multiple</style> <size>3</size> <title>==Vendor Contacts==</title> <info_from>Vendor Contacts</info_from> <target>id:subject</target> </element> </row> <row> <element> <label>Description</label> <name>description</name> <required>0</required> <datatype>text</datatype> <style>textarea</style> <size>45w:10h</size> </element> </row> <row> <element> <label>Last Modified</label> <name>date</name> <required>0</required> <datatype>date</datatype> </element> </row> </form>

In reply to RE: RE: XML to CGI form by BastardOperator
in thread XML to CGI form by BastardOperator

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.