W3C home > Mailing lists > Public > www-forms@w3.org > May 2002

RE: XForms Object Model discussion?

From: Micah Dubinko <MDubinko@cardiff.com>
Date: Fri, 31 May 2002 13:48:08 -0700
Message-ID: <E840F0B7E6189547BDB91DA8BF2228AB28C503@csmail.cardiff.com>
To: "'Stefano Debenedetti'" <sdebenedetti@e-tree.com>, Wiebe Tijsma <wiebe@tijsma.com>
Cc: www-forms@w3.org

Hi guys,

I'm curious--what leads you to believe that a separate object model is
needed for XForms?

I've done a fair bit of scripting of HTML forms, and the most common thing
to do is to grab a reference to a form control object.

form[0].field[0].xxx (or nicer with names) htmlform.Entry1.xxx

Would it make sense to have similar functionality for XForms? Perhaps,
although anything beyond getElemetntById() is just a convenience function,

The other really common thing to do in form scripting is to get and set the
values in the form. Because of the way HTML forms were designed, in legacy
code this too has to go through the form control object.


XForms gets this right and separates content and appearance. The one
scripting function we do define is getInstanceDocument(), which returns a
DOM representation of the instance data. This is really all you ever need,
and it's completely separate from the presentation.

Besides, about 80% of the things for which you need script in HTML forms can
now be done with declarative markup. :-)

So in conclusion, I would strongly advise anyone not to "wait" for an XForms
Object Model, since you will be waiting a long long time! Instead, embrace
the way of XForms--we think you'll like it. :-)



P.S. The XForms Working Group members are travelling for the next week, with
an unknown level of net access. Expect slow replies for a while. Thanks. -m

-----Original Message-----
From: Stefano Debenedetti [mailto:sdebenedetti@e-tree.com]
Sent: Thursday, May 30, 2002 7:17 AM
To: Wiebe Tijsma
Cc: www-forms@w3.org
Subject: Re: XForms Object Model discussion?

same doubt over here too. I don't think an XFormsOM to be really 
required in order to put XForms to use but I do think we need some more 
hooks to integrate it with existing HTML based web sites and 
applications out there.

For example, wouldn't it be nice to just add an xforms:submitInfo 
attribute on any legacy HTML element to turn it into a nice 
presentation-independent <submitInfo> UI?

I could then throw an xforms:model in the head of my XHTMLs and just add 
the proper hooks (bind, ref, submitInfo, etc.) as xforms attributes to 

Will we have to wait for evolution of XHTML modularization + XForms 1.1 
to have that or am I missing something big here and the one I described 
above won't be the way to go and how can existing UI languages (as used 
by millions of forms applications today) be used w/XForms is still to be 

Thank you and best regards,

Wiebe Tijsma wrote:
> Hello All,
> maybe this is a stupid just-entered-the-xforms-dsicussion question and i'm
> not getting things right, but are there any plans/discussions for creating
> XForms Object Model? from my point of view creating XForms tests and
> implementations (XSmiles) seem pretty funny ofcourse, but wouldn't it be
> advisable to wait for a OM? I would like to be in that discussion! (don't
> really care about the syntax, however it is ofcourse the base for the
> functionality)
> Thanks and good luck in any way
> Wiebe Tijsma
> Triview Publishing Technologies
> Soest, The Netherlands
> wtijsma@triview.nl
> www.triview.nl
Received on Friday, 31 May 2002 16:50:04 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:06 UTC