Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

RE: RE: XML to CGI form

by BastardOperator (Monk)
on Nov 03, 2000 at 21:06 UTC ( [id://39853]=note: print w/replies, xml ) Need Help??


in reply to RE: XML to CGI form
in thread XML to CGI form

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>

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://39853]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-24 07:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found