xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j....@t-online.de (Juergen Hermann)
Subject Re: FORM is to HTML, as ? is to XML
Date Mon, 20 Dec 1999 06:50:15 GMT
On Fri, 17 Dec 1999 13:15:36 -0500, COFFMAN Steven wrote:

>but I can't seem to figure out a replacement for HTML FORMs for submitting
>client entered data back into a database. Is there such a mythical beast? Or
>must we still use XHTML forms which submit to the same old CGIs?

No, we must not. :)

Consider, as an example, a simple email form. Asks for to, from,
subject, text, in the simplest form. To and from must adhere to the
correct syntax for email addresses. You could then do this:

<query>
	<field name="from" validate="email"/>
	<field name="to" validate="email"/>
	...
</query>

Convert this (via XSLT) to a common XHTML form. While it may seems
there is not much difference between writing the above query structure
and writing the form tags directly, you gain this:
a) media independance, as usual. javascript enabled browsers can to the
validation client-side, others can rely on server-side checking.
b) the said server-side checking can parse the query.xml file and apply
the validation rules to the POST data. Also, the server-side easily
knows what fields it can expect from the client.

What it does in essence is to seperate the "information requirement"
specification from the technicalities of HTML form handling.

You may also take a look at WIDL (which I should do also :). WIDL
stands for "Web Interface Definition Language", I think you see the
relation.
Ciao, J├╝rgen



Mime
View raw message