XForms Data model and presentation

Dear All,

I am quite interested in the XForm recommendation and I am trying to apply
the main concepts in my present applications. I have found some problems
defining the links between the data model and presentation layer.

I describe the data model using schema and I use a set of elements that I
have defined for the user interface (like checkboxes, pulldown list, input,
etc).

For example:

// Data model something like this-
<ElementType name="customer">
    <ElementType name="name" type="string" />
    <ElementType name="address" >
     <ElementType name="street" type="string"/>
     <ElementType name="city" type="string"/>
    </ElementType>
    <ElementType name="zipCode" type="int"/>
</ElementType>

// Presentation
<form action="/cgi-bin/customers"  method="post">
     Name: <input name="name"/>
     Street address:<input name="street"/>
     City: <input name="city"/>
     Zip:<input name="zipCode"/>
<button type="submit"/>
</form>

Form input "street" is linked to the element type "customer.address.street"
in data model.

I have not a clear idea of how to link these elements to their type
definition, in the data model, so I will be able to perform some input
validation.

My idea is to use XSL to process the data model + presentation to add HTML
tags and include the javascript code to perform the validation regarding to
the schema.

Thank you in advance and I am looking forward to get some good ideas or
useful references.

Best regards,

Juan E. Valera

Received on Monday, 21 August 2000 08:52:02 UTC