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!
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.