W3C home > Mailing lists > Public > www-forms@w3.org > December 2008

Latest XForms for HTML spec: 2 Questions on Form containment and multiple models generations

From: Thomas Ling <nkling@gmail.com>
Date: Tue, 2 Dec 2008 17:02:56 -0500
Message-ID: <884121640812021402udef3b49s5216227d0342ac3c@mail.gmail.com>
To: www-forms@w3.org

Hi All,

I have 2 questions regarding the latest XForms for HTML spec.
It is not clear to me what shouldbe  the exact behavior in XForms for
HTML for the following scenarios.

1. Orphan control outside of  Form containment, if I have the following markup:

  <form name="person" >
    <input name ="name" datatype="string" value="thomas" />

<!--- orphan control -->
  <input name ="address" datatype="string" value="100 Main St." />

from my understanding XForms for HTML would expand to something similar to this:

  <form name="person" id="person">
     <input name ="name" datatype="string" value="thomas" />

<!--- orphan control -->
<input id="a1" name ="address" datatype="string" value="100 Main St." />

My question is should XForm for HTML process the address input control
"a1" and how does it get processed?
Following the logic of lazy authoring from the XForms 1.1 spec. The
"address" node would be inserted to the
default model of the default instance document.. but it's not very
clear to me whether a default model would be created
in this case for the orphan control? or
the address node will be inserted and bind to the first existing model
of the document which is the model under
form "person".

2. Does cross forms bind allow in XForms for HTML?
   Can an orphan control bind and  do calculation to a node in more
than a model/form?
   If an orphan control is allowed, should it allow to bind to more
than one form?

<form name="f1">
    <input id="principal" name="principal" datatype="double"
value="10000"  constraint=". &gt;= 1000 and . &lt;= 100000" />
<form name="f2">
    <input id="interestrate" name="interestrate" datatype="double"
value="5" constraint=". &gt;= 5 and . &lt;= 60" />
    <input id="duration" name="duration" datatype="integer" value="12"
constraint=". &gt; 0 and . &lt;= 84" />

<!--- orphan control -->
<input id="total-output" name="totalpayout"
calculate="form('f1')/principal + (125 * form('f2')/interestrate *
(form('f2')/duration * 0.1)))" />

I am curious about the possibilities of the above scenario since it
does seem like something an HTML author might try.

Let me know what you think.


Best Regards

Received on Tuesday, 2 December 2008 22:03:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:58 UTC