Hi there axkitters.
I'm working on a system to use a Relax NG (RNG) schema to generate HTML
forms. The user will interact with the forms, and when they press
submit, XML will be generated from the form results. The XML can be
validated against the form either by javascript on the UA or by the
server after it gets it back
So... it seems that there's a company or two that's done this, but it's
all commercial stuff without much documentation. Once I settled on RNG
as my schema language, I converted the DTD I am using (Resume XML from
sourceforge) into RNG using dtdinst tool. Now I am writing an XSLT to
convert the RNG to HTML forms. The idea is to make it generic so that I
can change the forms by changing the RNG. I don't like working with
HTML forms directly, they are too messy.
Now, I can generate a huge mega form but that's not really practical,
it ends up as a 250K + HTML file that renders really slowly. As well,
there are <zeroOrMore> and <oneOrMore> tags in RNG to specify dynamic
sections of content. For the size reason, and because I don't know
javascript and DOM yet, I'm leaning towards a roundtripping server
solution. Also it will work on more browsers, AFAIK browser support for
DOM manipulation is spotty.
My idea is that when I hit a <zeroOrMore> tag with a FooBar child, I'll
prune the (RNG) tree at that point and provide a button that says
something like ((Add a FooBar element)). The button will pass back
information that identifies the pruned subtree uniquely to the server.
The server will then feed that subtree back into the RNG->HTML Form
XSLT and so on and so forth. I want to write as little application
(i.e., Resume XML) code as possible.
So how do I best handle the POST/GET parameters? I want to be able to
grab the params from the POST/GET whatever and feed the unique ID back
into the RNG-HTMLForms XSLT to generate the appropriate new section.
Also, I need to have some way to assemble the pieces of XML that are
created this way into a complete instance document. It should be easy
to name the HTML forms fields in such a way that I can generate XML
from them. I think there's already some code out there that
automatically generates XML from the form fields (Matt was that yours?)
I will probably need to assemble multiple pieces into the complete
instance document.
Please advise!
Simon
---
www.simonwoodside.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- Re: roundtripping forms based on schemas S Woodside
- Re: roundtripping forms based on schemas J�rg Walter
- Re: roundtripping forms based on schemas J�rg Walter
- Re: roundtripping forms based on schemas J�rg Walter
- Re: roundtripping forms based on schemas J�rg Walter
- Re: roundtripping forms based on schemas J�rg Walter
