XForms 1.0

Dynamically setting the action attribute of submission element

We need to know how to set the action attribute of the submission element in a dynamic way..Currently in our 1.4 version of code we have the action attribute hardcoded to the endpoint url..We figured out that we could use the resource element with 1.6 formsplayer to configure the endpoint using xpath..something like

xf:resource value="instance('instWebserviceConfig')//config/endpoint/@uri"
/xf:resource

How do we do the something similar with 1.4.x

Regards
Nirmal

Application error caused by formsplayer

version: 1.6.1030 or 1.5
I used formsplayer in html page and loaded the page in a browser control of windows .net application
The form loaded well and displayed without any errors.
But the application gives the following error on closing the application

ApplicationName.exe Application error
the instruction at "0x064c0529" referenced memory at "0x073120c0". the memory could not be "read". click on ok to terminate the program.

when i dont use the formsplayer the application didn't give the error.
I think the formsplayer object causes some memory fault.
Actuall any activex objects used in the browser should have been disposed off by the browser itself.
i have used the following ways to release any memory occupied by the formsplayer object

Combo inside of switch fails to resize properly

If you remove the switch and case the combo box sizes properly as you change the size of the explorer window
But with the switch and case in place the combo box does not resize and you loose the down arrow...

<xforms:switch id="TabSwitch">
<xforms:case id="caseAccountDetailsTab" selected="false">

<div class="tab-head">
<xf:select1 ref="y" class="subtab">
<xf:item">
<xf:label>Work Profile</xf:label">
<xf:item>
<xforms:label>Endorsement Details</xf:label">
</xf:item">
</xf:select1">
</div">

</xforms:case">
</xforms:switch">

Labels on buttons gets separated from the button

After the browser has repainted, the labels on the button gets displaced from the button on the screen. After pointing the mouse on the displaced label it "drops" back over the button. This seems to be some kind of issue related to painting.

I have attached a document with screenshots.

Regards
Nirmal

Problem with focus

Hello,
As you can see in the attached test case, we have three controls in the same form. Two xform:input controls and an input type=button html control.
1. Change the value of the first name xf:input (transform "Toulouse" by "Toulous" for example), then click on the button. The both controls have the focus. The background-color of the xf:input.value normally change with constraint attribute.
2. Add the "e" at the end of "Toulous" and click to the button. The background-color of the xf:input.value doesn't change and the value contained in the instance doesn't change too.
3. Click in the surname control. The first name control seems not lost the focus.
4. Click in the first name control and next click in the surname control, the firstname control lost focus, the value contained in the instance changes.

range does not support non-integer steps

The XForms recommendation states that the range control may be bound to the following data types: xsd:duration, xsd:date, xsd:time, xsd:dateTime, xsd:gYearMonth, xsd:gYear, xsd:gMonthDay, xsd:gDay, xsd:gMonth, xsd:float, xsd:decimal, xsd:double [1]

formsPlayer's range control currently only works correctly with integer steps. The attached document contains a range bound to xsd:double that demonstrates this problem.

[1] http://www.w3.org/TR/xforms/slice8.html#ui-range

Mark Birbeck's picture

Validation of the selected data

After the selection step, the data to be submitted is then validated. No validation events are dispatched during this step, but the whole process of validation is the same as defined in xforms-revalidate. If any of the selected data has its required property set, but is found to be empty, or is invalid according to its constraint properties or a schema, then submission processing is stopped after dispatching event xforms-submit-error.

Since there will be situations where invalid data needs to be submitted--for example to save an incomplete form--XForms 1.1 introduced the validate attribute, which can be set to false to prevent this step of the processing. Validation is also disabled if @serialize

Mark Birbeck's picture

Selecting the data for submission

The data to be submitted is selected by evaluating the expression in the ref attribute. If no attribute is present, then its value is "/", which in effect means the first instance in the containing model. If a value for @ref is present, it represents the root of a fragment which will be used to find the data to be submitted. This obviously means that it is not necessary to submit an entire instance--smaller parts can be sent.

Sometimes an author will not want to serialise any data for submission, and for this reason XForms 1.1 adds the serialize attribute which can be set to false to indicate no data should be sent. But assuming this attribute is set to true, or is not set at all, then starting at the root of the fragment, all relevant nodes--i.e., all nodes that have their relevant Model Item Property evaluating to true--are collected to make up the data to be sent.

days-from-date()

number days-from-date(string)

This function returns a whole number of days, according to the following rules:

  1. If the string parameter represents a legal lexical xsd:date or xsd:dateTime, the return value is equal to the number of days difference between the specified date or dateTime (normalized to UTC) and 1970-01-01.
  2. Hour, minute, and second components are ignored after normalisation.
  3. Any other input parameter causes a return value of NaN.

Examples:

days-from-date("2002-01-01")

returns 11688

days-from-date("1969-12-31")

returns -1

instance()

node-set instance(string)

An XForms Model can contain more that one instance. This function allows access to instance data, within the same XForms Model, but outside the instance data containing the context node.

The argument is converted to a string as if by a call to the string function. This string is treated as an IDREF, which is matched against instance elements in the containing document. If a match is located, and the matching instance data is associated with the same XForms Model as the current context node, this function returns a node-set containing just the root element node (also called the document element node) of the referenced instance data. In all other cases, an empty node-set is returned.

Example:

For instance data corresponding to this XML: