[whatwg] Web Forms as data schema language

Olav Junker Kjær olav at olav.dk
Thu Jul 7 12:04:21 PDT 2005


Ian Hickson wrote:
>>>It isn't a data schema language 
> The same reason it isn't a spreadsheet language: making it one wasn't one 
> of the goals of designing the language. :-)

Well, it still might have happened by accident!

I like to think of the input/select/textarea-elements as semantically 
describing a data type through constraints. Incidentally, the default 
rendering of these elements in a web browser is some kind of input 
widget designed for entering that type of data. (Of course the names of 
the input types is inspired by the default UI widget (checkbox instead 
of boolean etc.) but thats just because its easier to remember if you 
are not educated in formal logic.)

 > HTML could be used for describing a schema; it just wasn't designed to
 > do so, and thus would probably not be the best language to use for
 > that.

Perhaps not, but its not that bad either. The types in WF2 is comparable 
  to the basic types in a typical SQL database. Of course its far from 
as powerful as W3C XML Schema, which supports useful types like NOTATION 
and ENTITY, sorely missed in WF2.

A <form>-element could be considered a description of the interface to a 
web service. The input elements describes the schema for the input data, 
while other content is documentation. HTML is the WSDL for simple 
REST-like web services.

While some WSDL tool are able to generate "stub" code to be used by 
developers when developing client applications, HTML UA's are much more 
powerful since they are able to generate the whole client UI on the fly, 
just from the HTML-description. Of course a tool might also be able to 
generate stub code from a HTML-description, if a developer wanted to 
develop some custom software to access a service which already has a 
HTML-described interface.

regards
Olav Junker Kjær



More information about the whatwg mailing list