"be consistent" | |
PerlMonks |
XML to CGI formby BastardOperator (Monk) |
on Nov 03, 2000 at 19:50 UTC ( [id://39836]=perlquestion: print w/replies, xml ) | Need Help?? |
BastardOperator has asked for the wisdom of the Perl Monks concerning the following question:
After considering the responses given to a previous post, expect users to program of define a simple definition language?, I decided that XML was probably the best solution that I could hope for. So, I've been hacking around with some XML trying to figure out how I'm going to do this. Here's my question: My intent was to have the user use XML to basically describe a cgi form (this would also need to describe the database structure) to take input with (although, it's possible that the user could want fields that wouldn't be displayed but have some type of processing occuring, anyway...). As I began to try to define how this would work (with c-era's help), I started to realize that, for as customizable as I want this, the user will have to get pretty darned verbose. The definition started to look more like the user was actually writing the html form, rather than just describing bits and pieces (although with some other key tags in there that I'd need to use, flags and the like). So, how should I do this? Is there a way to allow them to use XML to describe this (I need the data to be structured) and have it create the form without me having to parse it and figure out what they're doing? I've thought of things like XSL, but that wouldn't really do the trick because then _I'd_ be defining the look of the form, plus it still seems too young. I looked around CPAN, Matt Seargant has a CGI::XMLform that does just the opposite of what I want to do, and he mentions "coming later will be a small module that uses my XML::DTDParser to create all the form elements given a DTD. ", but nothing so far that I can find. I'm determined to do this right the first time, so I'd love it if someone could give me some input on this or point me to a module or a better way.... Thank you!
Back to
Seekers of Perl Wisdom
|
|